diff --git a/dist/index.js b/dist/index.js index cd774c9..eecdf65 100644 --- a/dist/index.js +++ b/dist/index.js @@ -79,7 +79,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -92,27 +92,27 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.issue = exports2.issueCommand = void 0; - var os7 = __importStar(require("os")); + var os6 = __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() + os7.EOL); + process.stdout.write(cmd.toString() + os6.EOL); } exports2.issueCommand = issueCommand; function issue2(name, message = "") { @@ -165,7 +165,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -178,49 +178,49 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto = __importStar(require("crypto")); - var fs4 = __importStar(require("fs")); - var os7 = __importStar(require("os")); + var crypto = __importStar2(require("crypto")); + var fs3 = __importStar2(require("fs")); + var os6 = __importStar2(require("os")); var utils_1 = require_utils(); 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 (!fs4.existsSync(filePath)) { + if (!fs3.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs4.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os7.EOL}`, { + fs3.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os6.EOL}`, { encoding: "utf8" }); } exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter3 = `ghadelimiter_${crypto.randomUUID()}`; + const delimiter2 = `ghadelimiter_${crypto.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); - if (key.includes(delimiter3)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter3}"`); + if (key.includes(delimiter2)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter2}"`); } - if (convertedValue.includes(delimiter3)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter3}"`); + if (convertedValue.includes(delimiter2)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter2}"`); } - return `${key}<<${delimiter3}${os7.EOL}${convertedValue}${os7.EOL}${delimiter3}`; + return `${key}<<${delimiter2}${os6.EOL}${convertedValue}${os6.EOL}${delimiter2}`; } exports2.prepareKeyValueMessage = prepareKeyValueMessage; } @@ -247,7 +247,7 @@ var require_proxy = __commonJS({ if (proxyVar) { try { return new DecodedURL(proxyVar); - } catch (_a3) { + } catch (_a) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); } @@ -293,8 +293,8 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } var DecodedURL = class extends URL { - constructor(url2, base) { - super(url2, base); + constructor(url, base) { + super(url, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } @@ -314,35 +314,35 @@ var require_tunnel = __commonJS({ "use strict"; var net = require("net"); var tls = require("tls"); - var http2 = require("http"); - var https2 = require("https"); + var http = require("http"); + var https = require("https"); var events = require("events"); var assert3 = require("assert"); - var util3 = require("util"); + var util = require("util"); exports2.httpOverHttp = httpOverHttp; exports2.httpsOverHttp = httpsOverHttp; exports2.httpOverHttps = httpOverHttps; exports2.httpsOverHttps = httpsOverHttps; function httpOverHttp(options2) { var agent = new TunnelingAgent(options2); - agent.request = http2.request; + agent.request = http.request; return agent; } function httpsOverHttp(options2) { var agent = new TunnelingAgent(options2); - agent.request = http2.request; + agent.request = http.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; } function httpOverHttps(options2) { var agent = new TunnelingAgent(options2); - agent.request = https2.request; + agent.request = https.request; return agent; } function httpsOverHttps(options2) { var agent = new TunnelingAgent(options2); - agent.request = https2.request; + agent.request = https.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; @@ -351,7 +351,7 @@ var require_tunnel = __commonJS({ var self2 = this; self2.options = options2 || {}; self2.proxyOptions = self2.options.proxy || {}; - self2.maxSockets = self2.options.maxSockets || http2.Agent.defaultMaxSockets; + self2.maxSockets = self2.options.maxSockets || http.Agent.defaultMaxSockets; self2.requests = []; self2.sockets = []; self2.on("free", function onFree(socket, host, port, localAddress) { @@ -368,7 +368,7 @@ var require_tunnel = __commonJS({ self2.removeSocket(socket); }); } - util3.inherits(TunnelingAgent, events.EventEmitter); + util.inherits(TunnelingAgent, events.EventEmitter); TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { var self2 = this; var options2 = mergeOptions({ request: req }, self2.options, toOptions(host, port, localAddress)); @@ -664,13 +664,13 @@ var require_errors = __commonJS({ } }; var ResponseStatusCodeError = class _ResponseStatusCodeError extends UndiciError { - constructor(message, statusCode, headers, body2) { + constructor(message, statusCode, headers, body) { super(message); Error.captureStackTrace(this, _ResponseStatusCodeError); this.name = "ResponseStatusCodeError"; this.message = message || "Response Status Code Error"; this.code = "UND_ERR_RESPONSE_STATUS_CODE"; - this.body = body2; + this.body = body; this.status = statusCode; this.statusCode = statusCode; this.headers = headers; @@ -969,65 +969,65 @@ var require_util = __commonJS({ function isBlobLike(object) { return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); } - function buildURL(url2, queryParams) { - if (url2.includes("?") || url2.includes("#")) { + function buildURL(url, queryParams) { + if (url.includes("?") || url.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify2(queryParams); if (stringified) { - url2 += "?" + stringified; + url += "?" + stringified; } - return url2; + return url; } - function parseURL(url2) { - if (typeof url2 === "string") { - url2 = new URL(url2); - if (!/^https?:/.test(url2.origin || url2.protocol)) { + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); + if (!/^https?:/.test(url.origin || url.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url2; + return url; } - if (!url2 || typeof url2 !== "object") { + if (!url || typeof url !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!/^https?:/.test(url2.origin || url2.protocol)) { + if (!/^https?:/.test(url.origin || url.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - if (!(url2 instanceof URL)) { - if (url2.port != null && url2.port !== "" && !Number.isFinite(parseInt(url2.port))) { + if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url2.path != null && typeof url2.path !== "string") { + if (url.path != null && typeof url.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url2.pathname != null && typeof url2.pathname !== "string") { + if (url.pathname != null && typeof url.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url2.hostname != null && typeof url2.hostname !== "string") { + if (url.hostname != null && typeof url.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url2.origin != null && typeof url2.origin !== "string") { + if (url.origin != null && typeof url.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; - let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; - let path4 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; + let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; + let path4 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } if (path4 && !path4.startsWith("/")) { path4 = `/${path4}`; } - url2 = new URL(origin + path4); + url = new URL(origin + path4); } - return url2; + return url; } - function parseOrigin(url2) { - url2 = parseURL(url2); - if (url2.pathname !== "/" || url2.search || url2.hash) { + function parseOrigin(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) { throw new InvalidArgumentError("invalid url"); } - return url2; + return url; } function getHostname(host) { if (host[0] === "[") { @@ -1059,16 +1059,16 @@ var require_util = __commonJS({ function isIterable(obj) { return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); } - function bodyLength(body2) { - if (body2 == null) { + function bodyLength(body) { + if (body == null) { return 0; - } else if (isStream(body2)) { - const state3 = body2._readableState; - return state3 && state3.objectMode === false && state3.ended === true && Number.isFinite(state3.length) ? state3.length : null; - } else if (isBlobLike(body2)) { - return body2.size != null ? body2.size : null; - } else if (isBuffer(body2)) { - return body2.byteLength; + } else if (isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike(body)) { + return body.size != null ? body.size : null; + } else if (isBuffer(body)) { + return body.byteLength; } return null; } @@ -1076,10 +1076,10 @@ var require_util = __commonJS({ return !stream2 || !!(stream2.destroyed || stream2[kDestroyed]); } function isReadableAborted(stream2) { - const state3 = stream2 && stream2._readableState; - return isDestroyed(stream2) && state3 && !state3.endEmitted; + const state = stream2 && stream2._readableState; + return isDestroyed(stream2) && state && !state.endEmitted; } - function destroy2(stream2, err) { + function destroy(stream2, err) { if (stream2 == null || !isStream(stream2) || isDestroyed(stream2)) { return; } @@ -1150,8 +1150,8 @@ var require_util = __commonJS({ } return ret; } - function isBuffer(buffer2) { - return buffer2 instanceof Uint8Array || Buffer.isBuffer(buffer2); + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); } function validateHandler(handler, method, upgrade) { if (!handler || typeof handler !== "object") { @@ -1182,17 +1182,17 @@ var require_util = __commonJS({ } } } - function isDisturbed(body2) { - return !!(body2 && (stream.isDisturbed ? stream.isDisturbed(body2) || body2[kBodyUsed] : body2[kBodyUsed] || body2.readableDidRead || body2._readableState && body2._readableState.dataEmitted || isReadableAborted(body2))); + function isDisturbed(body) { + return !!(body && (stream.isDisturbed ? stream.isDisturbed(body) || body[kBodyUsed] : body[kBodyUsed] || body.readableDidRead || body._readableState && body._readableState.dataEmitted || isReadableAborted(body))); } - function isErrored(body2) { - return !!(body2 && (stream.isErrored ? stream.isErrored(body2) : /state: 'errored'/.test( - nodeUtil.inspect(body2) + function isErrored(body) { + return !!(body && (stream.isErrored ? stream.isErrored(body) : /state: 'errored'/.test( + nodeUtil.inspect(body) ))); } - function isReadable(body2) { - return !!(body2 && (stream.isReadable ? stream.isReadable(body2) : /state: 'readable'/.test( - nodeUtil.inspect(body2) + function isReadable(body) { + return !!(body && (stream.isReadable ? stream.isReadable(body) : /state: 'readable'/.test( + nodeUtil.inspect(body) ))); } function getSocketInfo(socket) { @@ -1279,9 +1279,9 @@ var require_util = __commonJS({ } return `${val}`; } - function parseRangeHeader(range2) { - if (range2 == null || range2 === "") return { start: 0, end: null, size: null }; - const m = range2 ? range2.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + function parseRangeHeader(range) { + if (range == null || range === "") return { start: 0, end: null, size: null }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; return m ? { start: parseInt(m[1]), end: m[2] ? parseInt(m[2]) : null, @@ -1310,7 +1310,7 @@ var require_util = __commonJS({ parseRawHeaders, parseHeaders, parseKeepAliveTimeout, - destroy: destroy2, + destroy, bodyLength, deepClone, ReadableStreamFrom, @@ -1377,9 +1377,9 @@ var require_timers = __commonJS({ } } var Timeout = class { - constructor(callback, delay5, opaque) { + constructor(callback, delay2, opaque) { this.callback = callback; - this.delay = delay5; + this.delay = delay2; this.opaque = opaque; this.state = -2; this.refresh(); @@ -1398,8 +1398,8 @@ var require_timers = __commonJS({ } }; module2.exports = { - setTimeout(callback, delay5, opaque) { - return delay5 < 1e3 ? setTimeout(callback, delay5, opaque) : new Timeout(callback, delay5, opaque); + setTimeout(callback, delay2, opaque) { + return delay2 < 1e3 ? setTimeout(callback, delay2, opaque) : new Timeout(callback, delay2, opaque); }, clearTimeout(timeout) { if (timeout instanceof Timeout) { @@ -1416,7 +1416,7 @@ var require_timers = __commonJS({ var require_sbmh = __commonJS({ "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js"(exports2, module2) { "use strict"; - var EventEmitter3 = require("events").EventEmitter; + var EventEmitter = require("events").EventEmitter; var inherits = require("util").inherits; function SBMH(needle) { if (typeof needle === "string") { @@ -1443,7 +1443,7 @@ var require_sbmh = __commonJS({ this._occ[needle[i]] = needleLength - 1 - i; } } - inherits(SBMH, EventEmitter3); + inherits(SBMH, EventEmitter); SBMH.prototype.reset = function() { this._lookbehind_size = 0; this.matches = 0; @@ -1585,7 +1585,7 @@ var require_getLimit = __commonJS({ var require_HeaderParser = __commonJS({ "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js"(exports2, module2) { "use strict"; - var EventEmitter3 = require("events").EventEmitter; + var EventEmitter = require("events").EventEmitter; var inherits = require("util").inherits; var getLimit = require_getLimit(); var StreamSearch = require_sbmh(); @@ -1593,7 +1593,7 @@ var require_HeaderParser = __commonJS({ var RE_CRLF = /\r\n/g; var RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/; function HeaderParser(cfg) { - EventEmitter3.call(this); + EventEmitter.call(this); cfg = cfg || {}; const self2 = this; this.nread = 0; @@ -1621,7 +1621,7 @@ var require_HeaderParser = __commonJS({ } }); } - inherits(HeaderParser, EventEmitter3); + inherits(HeaderParser, EventEmitter); HeaderParser.prototype.push = function(data) { const r = this.ss.push(data); if (this.finished) { @@ -1737,8 +1737,8 @@ var require_Dicer = __commonJS({ process.nextTick(function() { self2.emit("error", new Error("Unexpected end of multipart data")); if (self2._part && !self2._ignoreData) { - const type2 = self2._isPreamble ? "Preamble" : "Part"; - self2._part.emit("error", new Error(type2 + " terminated early due to unexpected end of multipart data")); + const type = self2._isPreamble ? "Preamble" : "Part"; + self2._part.emit("error", new Error(type + " terminated early due to unexpected end of multipart data")); self2._part.push(null); process.nextTick(function() { self2._realFinish = true; @@ -2531,7 +2531,7 @@ var require_parseParams = __commonJS({ var STATE_LANG = 3; function parseParams(str) { const res = []; - let state3 = STATE_KEY; + let state = STATE_KEY; let charset = ""; let inquote = false; let escaping = false; @@ -2551,7 +2551,7 @@ var require_parseParams = __commonJS({ if (!escaping) { if (inquote) { inquote = false; - state3 = STATE_KEY; + state = STATE_KEY; } else { inquote = true; } @@ -2564,22 +2564,22 @@ var require_parseParams = __commonJS({ tmp += "\\"; } escaping = false; - if ((state3 === STATE_CHARSET || state3 === STATE_LANG) && char === "'") { - if (state3 === STATE_CHARSET) { - state3 = STATE_LANG; + if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { + if (state === STATE_CHARSET) { + state = STATE_LANG; charset = tmp.substring(1); } else { - state3 = STATE_VALUE; + state = STATE_VALUE; } tmp = ""; continue; - } else if (state3 === STATE_KEY && (char === "*" || char === "=") && res.length) { - state3 = char === "*" ? STATE_CHARSET : STATE_VALUE; + } else if (state === STATE_KEY && (char === "*" || char === "=") && res.length) { + state = char === "*" ? STATE_CHARSET : STATE_VALUE; res[p] = [tmp, void 0]; tmp = ""; continue; } else if (!inquote && char === ";") { - state3 = STATE_KEY; + state = STATE_KEY; if (charset) { if (tmp.length) { tmp = decodeText( @@ -2654,7 +2654,7 @@ var require_basename = __commonJS({ var require_multipart = __commonJS({ "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js"(exports2, module2) { "use strict"; - var { Readable: Readable5 } = require("stream"); + var { Readable } = require("stream"); var { inherits } = require("util"); var Dicer = require_Dicer(); var parseParams = require_parseParams(); @@ -2673,7 +2673,7 @@ var require_multipart = __commonJS({ const self2 = this; let boundary; const limits = cfg.limits; - const isPartAFile = cfg.isPartAFile || ((fieldName, contentType2, fileName) => contentType2 === "application/octet-stream" || fileName !== void 0); + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => contentType === "application/octet-stream" || fileName !== void 0); const parsedConType = cfg.parsedConType || []; const defCharset = cfg.defCharset || "utf8"; const preservePath = cfg.preservePath; @@ -2857,25 +2857,25 @@ var require_multipart = __commonJS({ } ++nfields; ++nends; - let buffer2 = ""; + let buffer = ""; let truncated = false; curField = part; onData = function(data) { if ((nsize += data.length) > fieldSizeLimit) { const extralen = fieldSizeLimit - (nsize - data.length); - buffer2 += data.toString("binary", 0, extralen); + buffer += data.toString("binary", 0, extralen); truncated = true; part.removeAllListeners("data"); } else { - buffer2 += data.toString("binary"); + buffer += data.toString("binary"); } }; onEnd = function() { curField = void 0; - if (buffer2.length) { - buffer2 = decodeText(buffer2, "binary", charset); + if (buffer.length) { + buffer = decodeText(buffer, "binary", charset); } - boy.emit("field", fieldname, buffer2, false, truncated, encoding, contype); + boy.emit("field", fieldname, buffer, false, truncated, encoding, contype); --nends; checkFinished(); }; @@ -2919,11 +2919,11 @@ var require_multipart = __commonJS({ part.resume(); } function FileStream(opts) { - Readable5.call(this, opts); + Readable.call(this, opts); this.bytesRead = 0; this.truncated = false; } - inherits(FileStream, Readable5); + inherits(FileStream, Readable); FileStream.prototype._read = function(n) { }; module2.exports = Multipart; @@ -3674,12 +3674,12 @@ var require_util2 = __commonJS({ } return location; } - function requestCurrentURL(request3) { - return request3.urlList[request3.urlList.length - 1]; + function requestCurrentURL(request) { + return request.urlList[request.urlList.length - 1]; } - function requestBadPort(request3) { - const url2 = requestCurrentURL(request3); - if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) { + function requestBadPort(request) { + const url = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { return "blocked"; } return "allowed"; @@ -3745,7 +3745,7 @@ var require_util2 = __commonJS({ } return true; } - function setRequestReferrerPolicyOnRedirect(request3, actualResponse) { + function setRequestReferrerPolicyOnRedirect(request, actualResponse) { const { headersList } = actualResponse; const policyHeader = (headersList.get("referrer-policy") ?? "").split(","); let policy = ""; @@ -3759,7 +3759,7 @@ var require_util2 = __commonJS({ } } if (policy !== "") { - request3.referrerPolicy = policy; + request.referrerPolicy = policy; } } function crossOriginResourcePolicyCheck() { @@ -3776,33 +3776,33 @@ var require_util2 = __commonJS({ header = httpRequest.mode; httpRequest.headersList.set("sec-fetch-mode", header); } - function appendRequestOriginHeader(request3) { - let serializedOrigin = request3.origin; - if (request3.responseTainting === "cors" || request3.mode === "websocket") { + function appendRequestOriginHeader(request) { + let serializedOrigin = request.origin; + if (request.responseTainting === "cors" || request.mode === "websocket") { if (serializedOrigin) { - request3.headersList.append("origin", serializedOrigin); + request.headersList.append("origin", serializedOrigin); } - } else if (request3.method !== "GET" && request3.method !== "HEAD") { - switch (request3.referrerPolicy) { + } else if (request.method !== "GET" && request.method !== "HEAD") { + switch (request.referrerPolicy) { case "no-referrer": serializedOrigin = null; break; case "no-referrer-when-downgrade": case "strict-origin": case "strict-origin-when-cross-origin": - if (request3.origin && urlHasHttpsScheme(request3.origin) && !urlHasHttpsScheme(requestCurrentURL(request3))) { + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { serializedOrigin = null; } break; case "same-origin": - if (!sameOrigin(request3, requestCurrentURL(request3))) { + if (!sameOrigin(request, requestCurrentURL(request))) { serializedOrigin = null; } break; default: } if (serializedOrigin) { - request3.headersList.append("origin", serializedOrigin); + request.headersList.append("origin", serializedOrigin); } } } @@ -3834,26 +3834,26 @@ var require_util2 = __commonJS({ referrerPolicy: policyContainer.referrerPolicy }; } - function determineRequestsReferrer(request3) { - const policy = request3.referrerPolicy; + function determineRequestsReferrer(request) { + const policy = request.referrerPolicy; assert3(policy); let referrerSource = null; - if (request3.referrer === "client") { + if (request.referrer === "client") { const globalOrigin = getGlobalOrigin(); if (!globalOrigin || globalOrigin.origin === "null") { return "no-referrer"; } referrerSource = new URL(globalOrigin); - } else if (request3.referrer instanceof URL) { - referrerSource = request3.referrer; + } else if (request.referrer instanceof URL) { + referrerSource = request.referrer; } let referrerURL = stripURLForReferrer(referrerSource); const referrerOrigin = stripURLForReferrer(referrerSource, true); if (referrerURL.toString().length > 4096) { referrerURL = referrerOrigin; } - const areSameOrigin = sameOrigin(request3, referrerURL); - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request3.url); + const areSameOrigin = sameOrigin(request, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url); switch (policy) { case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); @@ -3864,7 +3864,7 @@ var require_util2 = __commonJS({ case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; case "strict-origin-when-cross-origin": { - const currentURL = requestCurrentURL(request3); + const currentURL = requestCurrentURL(request); if (sameOrigin(referrerURL, currentURL)) { return referrerURL; } @@ -3893,30 +3893,30 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } - function stripURLForReferrer(url2, originOnly) { - assert3(url2 instanceof URL); - if (url2.protocol === "file:" || url2.protocol === "about:" || url2.protocol === "blank:") { + function stripURLForReferrer(url, originOnly) { + assert3(url instanceof URL); + if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { return "no-referrer"; } - url2.username = ""; - url2.password = ""; - url2.hash = ""; + url.username = ""; + url.password = ""; + url.hash = ""; if (originOnly) { - url2.pathname = ""; - url2.search = ""; + url.pathname = ""; + url.search = ""; } - return url2; + return url; } - function isURLPotentiallyTrustworthy(url2) { - if (!(url2 instanceof URL)) { + function isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) { return false; } - if (url2.href === "about:blank" || url2.href === "about:srcdoc") { + if (url.href === "about:blank" || url.href === "about:srcdoc") { return true; } - if (url2.protocol === "data:") return true; - if (url2.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url2.origin); + if (url.protocol === "data:") return true; + if (url.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url.origin); function isOriginPotentiallyTrustworthy(origin) { if (origin == null || origin === "null") return false; const originAsURL = new URL(origin); @@ -3941,8 +3941,8 @@ var require_util2 = __commonJS({ return true; } const strongest = getStrongestMetadata(parsedMetadata); - const metadata2 = filterMetadataListByAlgorithm(parsedMetadata, strongest); - for (const item of metadata2) { + const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest); + for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); @@ -3960,10 +3960,10 @@ var require_util2 = __commonJS({ return false; } var parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; - function parseMetadata(metadata2) { + function parseMetadata(metadata) { const result = []; let empty = true; - for (const token of metadata2.split(" ")) { + for (const token of metadata.split(" ")) { empty = false; const parsedToken = parseHashWithOptions.exec(token); if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) { @@ -3985,13 +3985,13 @@ var require_util2 = __commonJS({ return algorithm; } for (let i = 1; i < metadataList.length; ++i) { - const metadata2 = metadataList[i]; - if (metadata2.algo[3] === "5") { + const metadata = metadataList[i]; + if (metadata.algo[3] === "5") { algorithm = "sha512"; break; } else if (algorithm[3] === "3") { continue; - } else if (metadata2.algo[3] === "3") { + } else if (metadata.algo[3] === "3") { algorithm = "sha384"; } } @@ -4024,7 +4024,7 @@ var require_util2 = __commonJS({ } return true; } - function tryUpgradeRequestToAPotentiallyTrustworthyURL(request3) { + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) { } function sameOrigin(A, B) { if (A.origin === B.origin && A.origin === "null") { @@ -4125,12 +4125,12 @@ var require_util2 = __commonJS({ } return { value: result, done: false }; } - async function fullyReadBody(body2, processBody, processBodyError) { + async function fullyReadBody(body, processBody, processBodyError) { const successSteps = processBody; const errorSteps = processBodyError; let reader; try { - reader = body2.stream.getReader(); + reader = body.stream.getReader(); } catch (e) { errorSteps(e); return; @@ -4186,20 +4186,20 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } - function urlIsLocal(url2) { - assert3("protocol" in url2); - const protocol = url2.protocol; + function urlIsLocal(url) { + assert3("protocol" in url); + const protocol = url.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url2) { - if (typeof url2 === "string") { - return url2.startsWith("https:"); + function urlHasHttpsScheme(url) { + if (typeof url === "string") { + return url.startsWith("https:"); } - return url2.protocol === "https:"; + return url.protocol === "https:"; } - function urlIsHttpHttpsScheme(url2) { - assert3("protocol" in url2); - const protocol = url2.protocol; + function urlIsHttpHttpsScheme(url) { + assert3("protocol" in url); + const protocol = url.protocol; return protocol === "http:" || protocol === "https:"; } var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); @@ -4471,11 +4471,11 @@ var require_webidl = __commonJS({ }; webidl.dictionaryConverter = function(converters) { return (dictionary) => { - const type2 = webidl.util.Type(dictionary); + const type = webidl.util.Type(dictionary); const dict = {}; - if (type2 === "Null" || type2 === "Undefined") { + if (type === "Null" || type === "Undefined") { return dict; - } else if (type2 !== "Object") { + } else if (type !== "Object") { throw webidl.errors.exception({ header: "Dictionary", message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` @@ -4665,11 +4665,11 @@ var require_dataURL = __commonJS({ } position.position++; const encodedBody = input.slice(mimeTypeLength + 1); - let body2 = stringPercentDecode(encodedBody); + let body = stringPercentDecode(encodedBody); if (/;(\u0020){0,}base64$/i.test(mimeType)) { - const stringBody = isomorphicDecode(body2); - body2 = forgivingBase64(stringBody); - if (body2 === "failure") { + const stringBody = isomorphicDecode(body); + body = forgivingBase64(stringBody); + if (body === "failure") { return "failure"; } mimeType = mimeType.slice(0, -6); @@ -4683,14 +4683,14 @@ var require_dataURL = __commonJS({ if (mimeTypeRecord === "failure") { mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); } - return { mimeType: mimeTypeRecord, body: body2 }; + return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url2, excludeFragment = false) { + function URLSerializer(url, excludeFragment = false) { if (!excludeFragment) { - return url2.href; + return url.href; } - const href = url2.href; - const hashLength = url2.hash.length; + const href = url.href; + const hashLength = url.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } function collectASequenceOfCodePoints(condition, input, position) { @@ -4735,12 +4735,12 @@ var require_dataURL = __commonJS({ function parseMIMEType(input) { input = removeHTTPWhitespace(input, true, true); const position = { position: 0 }; - const type2 = collectASequenceOfCodePointsFast( + const type = collectASequenceOfCodePointsFast( "/", input, position ); - if (type2.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type2)) { + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } if (position.position > input.length) { @@ -4756,7 +4756,7 @@ var require_dataURL = __commonJS({ if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { return "failure"; } - const typeLowercase = type2.toLowerCase(); + const typeLowercase = type.toLowerCase(); const subtypeLowercase = subtype.toLowerCase(); const mimeType = { type: typeLowercase, @@ -5270,7 +5270,7 @@ var require_body = __commonJS({ "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/body.js"(exports2, module2) { "use strict"; var Busboy = require_main(); - var util3 = require_util(); + var util = require_util(); var { ReadableStreamFrom, isBlobLike, @@ -5287,7 +5287,7 @@ var require_body = __commonJS({ var { kBodyUsed } = require_symbols(); var assert3 = require("assert"); var { isErrored } = require_util(); - var { isUint8Array, isArrayBuffer: isArrayBuffer2 } = require("util/types"); + var { isUint8Array, isArrayBuffer } = require("util/types"); var { File: UndiciFile } = require_file(); var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; @@ -5324,25 +5324,25 @@ var require_body = __commonJS({ }); } assert3(isReadableStreamLike(stream)); - let action5 = null; + let action = null; let source = null; let length = null; - let type2 = null; + let type = null; if (typeof object === "string") { source = object; - type2 = "text/plain;charset=UTF-8"; + type = "text/plain;charset=UTF-8"; } else if (object instanceof URLSearchParams) { source = object.toString(); - type2 = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isArrayBuffer2(object)) { + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) { source = new Uint8Array(object.slice()); } else if (ArrayBuffer.isView(object)) { source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); - } else if (util3.isFormDataLike(object)) { + } else if (util.isFormDataLike(object)) { const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; - const prefix2 = `--${boundary}\r + const prefix = `--${boundary}\r Content-Disposition: form-data`; - const escape2 = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); const blobParts = []; const rn = new Uint8Array([13, 10]); @@ -5350,14 +5350,14 @@ Content-Disposition: form-data`; let hasUnknownSizeValue = false; for (const [name, value] of object) { if (typeof value === "string") { - const chunk2 = textEncoder.encode(prefix2 + `; name="${escape2(normalizeLinefeeds(name))}"\r + const chunk2 = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r \r ${normalizeLinefeeds(value)}\r `); blobParts.push(chunk2); length += chunk2.byteLength; } else { - const chunk2 = textEncoder.encode(`${prefix2}; name="${escape2(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape2(value.name)}"` : "") + `\r + const chunk2 = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r Content-Type: ${value.type || "application/octet-stream"}\r \r `); @@ -5376,7 +5376,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r length = null; } source = object; - action5 = async function* () { + action = async function* () { for (const part of blobParts) { if (part.stream) { yield* part.stream(); @@ -5385,32 +5385,32 @@ Content-Type: ${value.type || "application/octet-stream"}\r } } }; - type2 = "multipart/form-data; boundary=" + boundary; + type = "multipart/form-data; boundary=" + boundary; } else if (isBlobLike(object)) { source = object; length = object.size; if (object.type) { - type2 = object.type; + type = object.type; } } else if (typeof object[Symbol.asyncIterator] === "function") { if (keepalive) { throw new TypeError("keepalive"); } - if (util3.isDisturbed(object) || object.locked) { + if (util.isDisturbed(object) || object.locked) { throw new TypeError( "Response body object should not be disturbed or locked" ); } stream = object instanceof ReadableStream2 ? object : ReadableStreamFrom(object); } - if (typeof source === "string" || util3.isBuffer(source)) { + if (typeof source === "string" || util.isBuffer(source)) { length = Buffer.byteLength(source); } - if (action5 != null) { + if (action != null) { let iterator; stream = new ReadableStream2({ async start() { - iterator = action5(object)[Symbol.asyncIterator](); + iterator = action(object)[Symbol.asyncIterator](); }, async pull(controller) { const { value, done } = await iterator.next(); @@ -5431,37 +5431,37 @@ Content-Type: ${value.type || "application/octet-stream"}\r type: void 0 }); } - const body2 = { stream, source, length }; - return [body2, type2]; + const body = { stream, source, length }; + return [body, type]; } function safelyExtractBody(object, keepalive = false) { if (!ReadableStream2) { ReadableStream2 = require("stream/web").ReadableStream; } if (object instanceof ReadableStream2) { - assert3(!util3.isDisturbed(object), "The body has already been consumed."); + assert3(!util.isDisturbed(object), "The body has already been consumed."); assert3(!object.locked, "The stream is locked."); } return extractBody(object, keepalive); } - function cloneBody(body2) { - const [out1, out2] = body2.stream.tee(); + function cloneBody(body) { + const [out1, out2] = body.stream.tee(); const out2Clone = structuredClone(out2, { transfer: [out2] }); const [, finalClone] = out2Clone.tee(); - body2.stream = out1; + body.stream = out1; return { stream: finalClone, - length: body2.length, - source: body2.source + length: body.length, + source: body.source }; } - async function* consumeBody(body2) { - if (body2) { - if (isUint8Array(body2)) { - yield body2; + async function* consumeBody(body) { + if (body) { + if (isUint8Array(body)) { + yield body; } else { - const stream = body2.stream; - if (util3.isDisturbed(stream)) { + const stream = body.stream; + if (util.isDisturbed(stream)) { throw new TypeError("The body has already been consumed."); } if (stream.locked) { @@ -5472,8 +5472,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r } } } - function throwIfAborted(state3) { - if (state3.aborted) { + function throwIfAborted(state) { + if (state.aborted) { throw new DOMException2("The operation was aborted.", "AbortError"); } } @@ -5504,8 +5504,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r async formData() { webidl.brandCheck(this, instance); throwIfAborted(this[kState]); - const contentType2 = this.headers.get("Content-Type"); - if (/multipart\/form-data/.test(contentType2)) { + const contentType = this.headers.get("Content-Type"); + if (/multipart\/form-data/.test(contentType)) { const headers = {}; for (const [key, value] of this.headers) headers[key.toLowerCase()] = value; const responseFormData = new FormData2(); @@ -5552,7 +5552,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r busboy.end(); await busboyResolve; return responseFormData; - } else if (/application\/x-www-form-urlencoded/.test(contentType2)) { + } else if (/application\/x-www-form-urlencoded/.test(contentType)) { let entries; try { let text = ""; @@ -5610,17 +5610,17 @@ Content-Type: ${value.type || "application/octet-stream"}\r await fullyReadBody(object[kState].body, successSteps, errorSteps); return promise.promise; } - function bodyUnusable(body2) { - return body2 != null && (body2.stream.locked || util3.isDisturbed(body2.stream)); + function bodyUnusable(body) { + return body != null && (body.stream.locked || util.isDisturbed(body.stream)); } - function utf8DecodeBytes(buffer2) { - if (buffer2.length === 0) { + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) { return ""; } - if (buffer2[0] === 239 && buffer2[1] === 187 && buffer2[2] === 191) { - buffer2 = buffer2.subarray(3); + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { + buffer = buffer.subarray(3); } - const output = textDecoder.decode(buffer2); + const output = textDecoder.decode(buffer); return output; } function parseJSONFromBytes(bytes) { @@ -5628,11 +5628,11 @@ Content-Type: ${value.type || "application/octet-stream"}\r } function bodyMimeType(object) { const { headersList } = object[kState]; - const contentType2 = headersList.get("content-type"); - if (contentType2 === null) { + const contentType = headersList.get("content-type"); + if (contentType === null) { return "failure"; } - return parseMIMEType(contentType2); + return parseMIMEType(contentType); } module2.exports = { extractBody, @@ -5653,7 +5653,7 @@ var require_request = __commonJS({ } = require_errors(); var assert3 = require("assert"); var { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require_symbols(); - var util3 = require_util(); + var util = require_util(); var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; var invalidPathRegex = /[^\u0021-\u00ff]/; @@ -5678,7 +5678,7 @@ var require_request = __commonJS({ constructor(origin, { path: path4, method, - body: body2, + body, headers, query, idempotent, @@ -5722,14 +5722,14 @@ var require_request = __commonJS({ this.throwOnError = throwOnError === true; this.method = method; this.abort = null; - if (body2 == null) { + if (body == null) { this.body = null; - } else if (util3.isStream(body2)) { - this.body = body2; + } else if (util.isStream(body)) { + this.body = body; const rState = this.body._readableState; if (!rState || !rState.autoDestroy) { this.endHandler = function autoDestroy() { - util3.destroy(this); + util.destroy(this); }; this.body.on("end", this.endHandler); } @@ -5741,23 +5741,23 @@ var require_request = __commonJS({ } }; this.body.on("error", this.errorHandler); - } else if (util3.isBuffer(body2)) { - this.body = body2.byteLength ? body2 : null; - } else if (ArrayBuffer.isView(body2)) { - this.body = body2.buffer.byteLength ? Buffer.from(body2.buffer, body2.byteOffset, body2.byteLength) : null; - } else if (body2 instanceof ArrayBuffer) { - this.body = body2.byteLength ? Buffer.from(body2) : null; - } else if (typeof body2 === "string") { - this.body = body2.length ? Buffer.from(body2) : null; - } else if (util3.isFormDataLike(body2) || util3.isIterable(body2) || util3.isBlobLike(body2)) { - this.body = body2; + } else if (util.isBuffer(body)) { + this.body = body.byteLength ? body : null; + } else if (ArrayBuffer.isView(body)) { + this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + } else if (body instanceof ArrayBuffer) { + this.body = body.byteLength ? Buffer.from(body) : null; + } else if (typeof body === "string") { + this.body = body.length ? Buffer.from(body) : null; + } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) { + this.body = body; } else { throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); } this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util3.buildURL(path4, query) : path4; + this.path = query ? util.buildURL(path4, query) : path4; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -5783,28 +5783,28 @@ var require_request = __commonJS({ } else if (headers != null) { throw new InvalidArgumentError("headers must be an object or an array"); } - if (util3.isFormDataLike(this.body)) { - if (util3.nodeMajor < 16 || util3.nodeMajor === 16 && util3.nodeMinor < 8) { + if (util.isFormDataLike(this.body)) { + if (util.nodeMajor < 16 || util.nodeMajor === 16 && util.nodeMinor < 8) { throw new InvalidArgumentError("Form-Data bodies are only supported in node v16.8 and newer."); } if (!extractBody) { extractBody = require_body().extractBody; } - const [bodyStream, contentType2] = extractBody(body2); + const [bodyStream, contentType] = extractBody(body); if (this.contentType == null) { - this.contentType = contentType2; - this.headers += `content-type: ${contentType2}\r + this.contentType = contentType; + this.headers += `content-type: ${contentType}\r `; } this.body = bodyStream.stream; this.contentLength = bodyStream.length; - } else if (util3.isBlobLike(body2) && this.contentType == null && body2.type) { - this.contentType = body2.type; - this.headers += `content-type: ${body2.type}\r + } else if (util.isBlobLike(body) && this.contentType == null && body.type) { + this.contentType = body.type; + this.headers += `content-type: ${body.type}\r `; } - util3.validateHandler(handler, method, upgrade); - this.servername = util3.getServerName(this.host); + util.validateHandler(handler, method, upgrade); + this.servername = util.getServerName(this.host); this[kHandler] = handler; if (channels.create.hasSubscribers) { channels.create.publish({ request: this }); @@ -5913,25 +5913,25 @@ var require_request = __commonJS({ static [kHTTP2BuildRequest](origin, opts, handler) { const headers = opts.headers; opts = { ...opts, headers: null }; - const request3 = new _Request(origin, opts, handler); - request3.headers = {}; + const request = new _Request(origin, opts, handler); + request.headers = {}; if (Array.isArray(headers)) { if (headers.length % 2 !== 0) { throw new InvalidArgumentError("headers array must be even"); } for (let i = 0; i < headers.length; i += 2) { - processHeader(request3, headers[i], headers[i + 1], true); + processHeader(request, headers[i], headers[i + 1], true); } } else if (headers && typeof headers === "object") { const keys = Object.keys(headers); for (let i = 0; i < keys.length; i++) { const key = keys[i]; - processHeader(request3, key, headers[key], true); + processHeader(request, key, headers[key], true); } } else if (headers != null) { throw new InvalidArgumentError("headers must be an object or an array"); } - return request3; + return request; } static [kHTTP2CopyHeaders](raw) { const rawHeaders = raw.split("\r\n"); @@ -5956,26 +5956,26 @@ var require_request = __commonJS({ return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request3, key, val, skipAppend = false) { + function processHeader(request, key, val, skipAppend = false) { if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); } else if (val === void 0) { return; } - if (request3.host === null && key.length === 4 && key.toLowerCase() === "host") { + if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request3.host = val; - } else if (request3.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request3.contentLength = parseInt(val, 10); - if (!Number.isFinite(request3.contentLength)) { + request.host = val; + } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { + request.contentLength = parseInt(val, 10); + if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } - } else if (request3.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request3.contentType = val; - if (skipAppend) request3.headers[key] = processHeaderValue(key, val, skipAppend); - else request3.headers += processHeaderValue(key, val); + } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { + 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") { @@ -5983,7 +5983,7 @@ var require_request = __commonJS({ if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { - request3.reset = true; + request.reset = true; } } else if (key.length === 10 && key.toLowerCase() === "keep-alive") { throw new InvalidArgumentError("invalid keep-alive header"); @@ -5997,15 +5997,15 @@ var require_request = __commonJS({ if (Array.isArray(val)) { for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request3.headers[key]) request3.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; - else request3.headers[key] = processHeaderValue(key, val[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request3.headers += processHeaderValue(key, val[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request3.headers[key] = processHeaderValue(key, val, skipAppend); - else request3.headers += processHeaderValue(key, val); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -6017,8 +6017,8 @@ var require_request = __commonJS({ var require_dispatcher = __commonJS({ "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/dispatcher.js"(exports2, module2) { "use strict"; - var EventEmitter3 = require("events"); - var Dispatcher = class extends EventEmitter3 { + var EventEmitter = require("events"); + var Dispatcher = class extends EventEmitter { dispatch() { throw new Error("not implemented"); } @@ -6202,7 +6202,7 @@ var require_connect = __commonJS({ "use strict"; var net = require("net"); var assert3 = require("assert"); - var util3 = require_util(); + var util = require_util(); var { InvalidArgumentError, ConnectTimeoutError } = require_errors(); var tls; var SessionCache; @@ -6268,7 +6268,7 @@ var require_connect = __commonJS({ if (!tls) { tls = require("tls"); } - servername = servername || options2.servername || util3.getServerName(host) || null; + servername = servername || options2.servername || util.getServerName(host) || null; const sessionKey = servername || hostname2; const session = sessionCache.get(sessionKey) || null; assert3(sessionKey); @@ -6346,7 +6346,7 @@ var require_connect = __commonJS({ }; } function onConnectTimeout(socket) { - util3.destroy(socket, new ConnectTimeoutError()); + util.destroy(socket, new ConnectTimeoutError()); } module2.exports = buildConnector; } @@ -6697,7 +6697,7 @@ var require_constants3 = __commonJS({ var require_RedirectHandler = __commonJS({ "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js"(exports2, module2) { "use strict"; - var util3 = require_util(); + var util = require_util(); var { kBodyUsed } = require_symbols(); var assert3 = require("assert"); var { InvalidArgumentError } = require_errors(); @@ -6705,8 +6705,8 @@ var require_RedirectHandler = __commonJS({ var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; var kBody = Symbol("body"); var BodyAsyncIterable = class { - constructor(body2) { - this[kBody] = body2; + constructor(body) { + this[kBody] = body; this[kBodyUsed] = false; } async *[Symbol.asyncIterator]() { @@ -6720,7 +6720,7 @@ var require_RedirectHandler = __commonJS({ if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { throw new InvalidArgumentError("maxRedirections must be a positive number"); } - util3.validateHandler(handler, opts.method, opts.upgrade); + util.validateHandler(handler, opts.method, opts.upgrade); this.dispatch = dispatch; this.location = null; this.abort = null; @@ -6728,8 +6728,8 @@ var require_RedirectHandler = __commonJS({ this.maxRedirections = maxRedirections; this.handler = handler; this.history = []; - if (util3.isStream(this.opts.body)) { - if (util3.bodyLength(this.opts.body) === 0) { + if (util.isStream(this.opts.body)) { + if (util.bodyLength(this.opts.body) === 0) { this.opts.body.on("data", function() { assert3(false); }); @@ -6742,7 +6742,7 @@ var require_RedirectHandler = __commonJS({ } } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") { this.opts.body = new BodyAsyncIterable(this.opts.body); - } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util3.isIterable(this.opts.body)) { + } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) { this.opts.body = new BodyAsyncIterable(this.opts.body); } } @@ -6757,14 +6757,14 @@ var require_RedirectHandler = __commonJS({ this.handler.onError(error3); } onHeaders(statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util3.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); if (this.opts.origin) { this.history.push(new URL(this.opts.path, this.opts.origin)); } if (!this.location) { return this.handler.onHeaders(statusCode, headers, resume, statusText); } - const { origin, pathname, search } = util3.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); const path4 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); this.opts.path = path4; @@ -6809,13 +6809,13 @@ var require_RedirectHandler = __commonJS({ } function shouldRemoveHeader(header, removeContent, unknownOrigin) { if (header.length === 4) { - return util3.headerNameToString(header) === "host"; + return util.headerNameToString(header) === "host"; } - if (removeContent && util3.headerNameToString(header).startsWith("content-")) { + if (removeContent && util.headerNameToString(header).startsWith("content-")) { return true; } if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util3.headerNameToString(header); + const name = util.headerNameToString(header); return name === "authorization" || name === "cookie" || name === "proxy-authorization"; } return false; @@ -6887,9 +6887,9 @@ var require_client = __commonJS({ "use strict"; var assert3 = require("assert"); var net = require("net"); - var http2 = require("http"); + var http = require("http"); var { pipeline } = require("stream"); - var util3 = require_util(); + var util = require_util(); var timers = require_timers(); var Request = require_request(); var DispatcherBase = require_dispatcher_base(); @@ -6960,11 +6960,11 @@ var require_client = __commonJS({ kHTTP2CopyHeaders, kHTTP1BuildRequest } = require_symbols(); - var http22; + var http2; try { - http22 = require("http2"); + http2 = require("http2"); } catch { - http22 = { constants: {} }; + http2 = { constants: {} }; } var { constants: { @@ -6976,7 +6976,7 @@ var require_client = __commonJS({ HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } - } = http22; + } = http2; var h2ExperimentalWarned = false; var FastBuffer = Buffer[Symbol.species]; var kClosedResolve = Symbol("kClosedResolve"); @@ -6999,7 +6999,7 @@ var require_client = __commonJS({ * @param {string|URL} url * @param {import('../types/client').Client.Options} options */ - constructor(url2, { + constructor(url, { interceptors, maxHeaderSize, headersTimeout, @@ -7100,16 +7100,16 @@ var require_client = __commonJS({ allowH2, socketPath, timeout: connectTimeout, - ...util3.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, ...connect2 }); } this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; - this[kUrl] = util3.parseOrigin(url2); + this[kUrl] = util.parseOrigin(url); this[kConnector] = connect2; this[kSocket] = null; this[kPipelining] = pipelining != null ? pipelining : 1; - this[kMaxHeadersSize] = maxHeaderSize || http2.maxHeaderSize; + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize; this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold; @@ -7171,10 +7171,10 @@ var require_client = __commonJS({ } [kDispatch](opts, handler) { const origin = opts.origin || this[kUrl].origin; - const request3 = this[kHTTPConnVersion] === "h2" ? Request[kHTTP2BuildRequest](origin, opts, handler) : Request[kHTTP1BuildRequest](origin, opts, handler); - this[kQueue].push(request3); + const request = this[kHTTPConnVersion] === "h2" ? Request[kHTTP2BuildRequest](origin, opts, handler) : Request[kHTTP1BuildRequest](origin, opts, handler); + this[kQueue].push(request); if (this[kResuming]) { - } else if (util3.bodyLength(request3.body) == null && util3.isIterable(request3.body)) { + } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { this[kResuming] = 1; process.nextTick(resume, this); } else { @@ -7198,8 +7198,8 @@ var require_client = __commonJS({ return new Promise((resolve) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { - const request3 = requests[i]; - errorRequest(this, request3, err); + const request = requests[i]; + errorRequest(this, request, err); } const callback = () => { if (this[kClosedResolve]) { @@ -7209,14 +7209,14 @@ var require_client = __commonJS({ resolve(); }; if (this[kHTTP2Session] != null) { - util3.destroy(this[kHTTP2Session], err); + util.destroy(this[kHTTP2Session], err); this[kHTTP2Session] = null; this[kHTTP2SessionState] = null; } if (!this[kSocket]) { queueMicrotask(callback); } else { - util3.destroy(this[kSocket].on("close", callback), err); + util.destroy(this[kSocket].on("close", callback), err); } resume(this); }); @@ -7227,16 +7227,16 @@ var require_client = __commonJS({ this[kSocket][kError] = err; onError(this[kClient], err); } - function onHttp2FrameError(type2, code, id) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`); + function onHttp2FrameError(type, code, id) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); if (id === 0) { this[kSocket][kError] = err; onError(this[kClient], err); } } function onHttp2SessionEnd() { - util3.destroy(this, new SocketError("other side closed")); - util3.destroy(this[kSocket], new SocketError("other side closed")); + util.destroy(this, new SocketError("other side closed")); + util.destroy(this[kSocket], new SocketError("other side closed")); } function onHTTP2GoAway(code) { const client = this[kClient]; @@ -7247,13 +7247,13 @@ var require_client = __commonJS({ assert3(this[kPending] === 0); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { - const request3 = requests[i]; - errorRequest(this, request3, err); + const request = requests[i]; + errorRequest(this, request, err); } } else if (client[kRunning] > 0) { - const request3 = client[kQueue][client[kRunningIdx]]; + const request = client[kQueue][client[kRunningIdx]]; client[kQueue][client[kRunningIdx]++] = null; - errorRequest(client, request3, err); + errorRequest(client, request, err); } client[kPendingIdx] = client[kRunningIdx]; assert3(client[kRunning] === 0); @@ -7353,8 +7353,8 @@ var require_client = __commonJS({ this.connection = ""; this.maxResponseSize = client[kMaxResponseSize]; } - setTimeout(value, type2) { - this.timeoutType = type2; + setTimeout(value, type) { + this.timeoutType = type; if (value !== this.timeoutValue) { timers.clearTimeout(this.timeout); if (value) { @@ -7439,7 +7439,7 @@ var require_client = __commonJS({ throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); } } catch (err) { - util3.destroy(socket, err); + util.destroy(socket, err); } } destroy() { @@ -7461,8 +7461,8 @@ var require_client = __commonJS({ if (socket.destroyed) { return -1; } - const request3 = client[kQueue][client[kRunningIdx]]; - if (!request3) { + const request = client[kQueue][client[kRunningIdx]]; + if (!request) { return -1; } } @@ -7496,18 +7496,18 @@ var require_client = __commonJS({ trackHeader(len) { this.headersSize += len; if (this.headersSize >= this.headersMaxSize) { - util3.destroy(this.socket, new HeadersOverflowError()); + util.destroy(this.socket, new HeadersOverflowError()); } } onUpgrade(head) { const { upgrade, client, socket, headers, statusCode } = this; assert3(upgrade); - const request3 = client[kQueue][client[kRunningIdx]]; - assert3(request3); + const request = client[kQueue][client[kRunningIdx]]; + assert3(request); assert3(!socket.destroyed); assert3(socket === client[kSocket]); assert3(!this.paused); - assert3(request3.upgrade || request3.method === "CONNECT"); + assert3(request.upgrade || request.method === "CONNECT"); this.statusCode = null; this.statusText = ""; this.shouldKeepAlive = null; @@ -7524,9 +7524,9 @@ var require_client = __commonJS({ client[kQueue][client[kRunningIdx]++] = null; client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); try { - request3.onUpgrade(statusCode, headers, socket); + request.onUpgrade(statusCode, headers, socket); } catch (err) { - util3.destroy(socket, err); + util.destroy(socket, err); } resume(client); } @@ -7535,33 +7535,33 @@ var require_client = __commonJS({ if (socket.destroyed) { return -1; } - const request3 = client[kQueue][client[kRunningIdx]]; - if (!request3) { + const request = client[kQueue][client[kRunningIdx]]; + if (!request) { return -1; } assert3(!this.upgrade); assert3(this.statusCode < 200); if (statusCode === 100) { - util3.destroy(socket, new SocketError("bad response", util3.getSocketInfo(socket))); + util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); return -1; } - if (upgrade && !request3.upgrade) { - util3.destroy(socket, new SocketError("bad upgrade", util3.getSocketInfo(socket))); + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); return -1; } assert3.strictEqual(this.timeoutType, TIMEOUT_HEADERS); this.statusCode = statusCode; this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. - request3.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; if (this.statusCode >= 200) { - const bodyTimeout = request3.bodyTimeout != null ? request3.bodyTimeout : client[kBodyTimeout]; + const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; this.setTimeout(bodyTimeout, TIMEOUT_BODY); } else if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); } } - if (request3.method === "CONNECT") { + if (request.method === "CONNECT") { assert3(client[kRunning] === 1); this.upgrade = true; return 2; @@ -7575,7 +7575,7 @@ var require_client = __commonJS({ this.headers = []; this.headersSize = 0; if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util3.parseKeepAliveTimeout(this.keepAlive) : null; + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; if (keepAliveTimeout != null) { const timeout = Math.min( keepAliveTimeout - client[kKeepAliveTimeoutThreshold], @@ -7592,11 +7592,11 @@ var require_client = __commonJS({ } else { socket[kReset] = true; } - const pause = request3.onHeaders(statusCode, headers, this.resume, statusText) === false; - if (request3.aborted) { + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) { return -1; } - if (request3.method === "HEAD") { + if (request.method === "HEAD") { return 1; } if (statusCode < 200) { @@ -7613,8 +7613,8 @@ var require_client = __commonJS({ if (socket.destroyed) { return -1; } - const request3 = client[kQueue][client[kRunningIdx]]; - assert3(request3); + const request = client[kQueue][client[kRunningIdx]]; + assert3(request); assert3.strictEqual(this.timeoutType, TIMEOUT_BODY); if (this.timeout) { if (this.timeout.refresh) { @@ -7623,24 +7623,24 @@ var require_client = __commonJS({ } assert3(statusCode >= 200); if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util3.destroy(socket, new ResponseExceededMaxSizeError()); + util.destroy(socket, new ResponseExceededMaxSizeError()); return -1; } this.bytesRead += buf.length; - if (request3.onData(buf) === false) { + if (request.onData(buf) === false) { return constants.ERROR.PAUSED; } } onMessageComplete() { - const { client, socket, statusCode, upgrade, headers, contentLength: contentLength2, bytesRead, shouldKeepAlive } = this; + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; if (socket.destroyed && (!statusCode || shouldKeepAlive)) { return -1; } if (upgrade) { return; } - const request3 = client[kQueue][client[kRunningIdx]]; - assert3(request3); + const request = client[kQueue][client[kRunningIdx]]; + assert3(request); assert3(statusCode >= 100); this.statusCode = null; this.statusText = ""; @@ -7654,21 +7654,21 @@ var require_client = __commonJS({ if (statusCode < 200) { return; } - if (request3.method !== "HEAD" && contentLength2 && bytesRead !== parseInt(contentLength2, 10)) { - util3.destroy(socket, new ResponseContentLengthMismatchError()); + if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()); return -1; } - request3.onComplete(headers); + request.onComplete(headers); client[kQueue][client[kRunningIdx]++] = null; if (socket[kWriting]) { assert3.strictEqual(client[kRunning], 0); - util3.destroy(socket, new InformationalError("reset")); + util.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; } else if (!shouldKeepAlive) { - util3.destroy(socket, new InformationalError("reset")); + util.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; } else if (socket[kReset] && client[kRunning] === 0) { - util3.destroy(socket, new InformationalError("reset")); + util.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; } else if (client[kPipelining] === 1) { setImmediate(resume, client); @@ -7682,15 +7682,15 @@ var require_client = __commonJS({ if (timeoutType === TIMEOUT_HEADERS) { if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { assert3(!parser.paused, "cannot be paused while waiting for headers"); - util3.destroy(socket, new HeadersTimeoutError()); + util.destroy(socket, new HeadersTimeoutError()); } } else if (timeoutType === TIMEOUT_BODY) { if (!parser.paused) { - util3.destroy(socket, new BodyTimeoutError()); + util.destroy(socket, new BodyTimeoutError()); } } else if (timeoutType === TIMEOUT_IDLE) { assert3(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); - util3.destroy(socket, new InformationalError("socket idle timeout")); + util.destroy(socket, new InformationalError("socket idle timeout")); } } function onSocketReadable() { @@ -7716,8 +7716,8 @@ var require_client = __commonJS({ assert3(client[kPendingIdx] === client[kRunningIdx]); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { - const request3 = requests[i]; - errorRequest(client, request3, err); + const request = requests[i]; + errorRequest(client, request, err); } assert3(client[kSize] === 0); } @@ -7730,7 +7730,7 @@ var require_client = __commonJS({ return; } } - util3.destroy(this, new SocketError("other side closed", util3.getSocketInfo(this))); + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); } function onSocketClose() { const { [kClient]: client, [kParser]: parser } = this; @@ -7741,19 +7741,19 @@ var require_client = __commonJS({ this[kParser].destroy(); this[kParser] = null; } - const err = this[kError] || new SocketError("closed", util3.getSocketInfo(this)); + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); client[kSocket] = null; if (client.destroyed) { assert3(client[kPending] === 0); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { - const request3 = requests[i]; - errorRequest(client, request3, err); + const request = requests[i]; + errorRequest(client, request, err); } } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { - const request3 = client[kQueue][client[kRunningIdx]]; + const request = client[kQueue][client[kRunningIdx]]; client[kQueue][client[kRunningIdx]++] = null; - errorRequest(client, request3, err); + errorRequest(client, request, err); } client[kPendingIdx] = client[kRunningIdx]; assert3(client[kRunning] === 0); @@ -7803,7 +7803,7 @@ var require_client = __commonJS({ }); }); if (client.destroyed) { - util3.destroy(socket.on("error", () => { + util.destroy(socket.on("error", () => { }), new ClientDestroyedError()); return; } @@ -7817,7 +7817,7 @@ var require_client = __commonJS({ code: "UNDICI-H2" }); } - const session = http22.connect(client[kUrl], { + const session = http2.connect(client[kUrl], { createConnection: () => socket, peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams }); @@ -7886,8 +7886,8 @@ var require_client = __commonJS({ if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { assert3(client[kRunning] === 0); while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request3 = client[kQueue][client[kPendingIdx]++]; - errorRequest(client, request3, err); + const request = client[kQueue][client[kPendingIdx]++]; + errorRequest(client, request, err); } } else { onError(client, err); @@ -7941,8 +7941,8 @@ var require_client = __commonJS({ } } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request4 = client[kQueue][client[kRunningIdx]]; - const headersTimeout = request4.headersTimeout != null ? request4.headersTimeout : client[kHeadersTimeout]; + const request2 = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request2.headersTimeout != null ? request2.headersTimeout : client[kHeadersTimeout]; socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); } } @@ -7964,14 +7964,14 @@ var require_client = __commonJS({ if (client[kRunning] >= (client[kPipelining] || 1)) { return; } - const request3 = client[kQueue][client[kPendingIdx]]; - if (client[kUrl].protocol === "https:" && client[kServerName] !== request3.servername) { + const request = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { if (client[kRunning] > 0) { return; } - client[kServerName] = request3.servername; - if (socket && socket.servername !== request3.servername) { - util3.destroy(socket, new InformationalError("servername changed")); + client[kServerName] = request.servername; + if (socket && socket.servername !== request.servername) { + util.destroy(socket, new InformationalError("servername changed")); return; } } @@ -7985,16 +7985,16 @@ var require_client = __commonJS({ if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { return; } - if (client[kRunning] > 0 && !request3.idempotent) { + if (client[kRunning] > 0 && !request.idempotent) { return; } - if (client[kRunning] > 0 && (request3.upgrade || request3.method === "CONNECT")) { + if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) { return; } - if (client[kRunning] > 0 && util3.bodyLength(request3.body) !== 0 && (util3.isStream(request3.body) || util3.isAsyncIterable(request3.body))) { + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body))) { return; } - if (!request3.aborted && write(client, request3)) { + if (!request.aborted && write(client, request)) { client[kPendingIdx]++; } else { client[kQueue].splice(client[kPendingIdx], 1); @@ -8004,44 +8004,44 @@ var require_client = __commonJS({ function shouldSendContentLength(method) { return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } - function write(client, request3) { + function write(client, request) { if (client[kHTTPConnVersion] === "h2") { - writeH2(client, client[kHTTP2Session], request3); + writeH2(client, client[kHTTP2Session], request); return; } - const { body: body2, method, path: path4, host, upgrade, headers, blocking, reset } = request3; + const { body, method, path: path4, host, upgrade, headers, blocking, reset } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body2 && typeof body2.read === "function") { - body2.read(0); + if (body && typeof body.read === "function") { + body.read(0); } - const bodyLength = util3.bodyLength(body2); - let contentLength2 = bodyLength; - if (contentLength2 === null) { - contentLength2 = request3.contentLength; + const bodyLength = util.bodyLength(body); + let contentLength = bodyLength; + if (contentLength === null) { + contentLength = request.contentLength; } - if (contentLength2 === 0 && !expectsPayload) { - contentLength2 = null; + if (contentLength === 0 && !expectsPayload) { + contentLength = null; } - if (shouldSendContentLength(method) && contentLength2 > 0 && request3.contentLength !== null && request3.contentLength !== contentLength2) { + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { - errorRequest(client, request3, new RequestContentLengthMismatchError()); + errorRequest(client, request, new RequestContentLengthMismatchError()); return false; } process.emitWarning(new RequestContentLengthMismatchError()); } const socket = client[kSocket]; try { - request3.onConnect((err) => { - if (request3.aborted || request3.completed) { + request.onConnect((err) => { + if (request.aborted || request.completed) { return; } - errorRequest(client, request3, err || new RequestAbortedError()); - util3.destroy(socket, new InformationalError("aborted")); + errorRequest(client, request, err || new RequestAbortedError()); + util.destroy(socket, new InformationalError("aborted")); }); } catch (err) { - errorRequest(client, request3, err); + errorRequest(client, request, err); } - if (request3.aborted) { + if (request.aborted) { return false; } if (method === "HEAD") { @@ -8080,67 +8080,67 @@ upgrade: ${upgrade}\r header += headers; } if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request: request3, headers: header, socket }); + channels.sendHeaders.publish({ request, headers: header, socket }); } - if (!body2 || bodyLength === 0) { - if (contentLength2 === 0) { + if (!body || bodyLength === 0) { + if (contentLength === 0) { socket.write(`${header}content-length: 0\r \r `, "latin1"); } else { - assert3(contentLength2 === null, "no body must not have content length"); + assert3(contentLength === null, "no body must not have content length"); socket.write(`${header}\r `, "latin1"); } - request3.onRequestSent(); - } else if (util3.isBuffer(body2)) { - assert3(contentLength2 === body2.byteLength, "buffer body must have content length"); + request.onRequestSent(); + } else if (util.isBuffer(body)) { + assert3(contentLength === body.byteLength, "buffer body must have content length"); socket.cork(); - socket.write(`${header}content-length: ${contentLength2}\r + socket.write(`${header}content-length: ${contentLength}\r \r `, "latin1"); - socket.write(body2); + socket.write(body); socket.uncork(); - request3.onBodySent(body2); - request3.onRequestSent(); + request.onBodySent(body); + request.onRequestSent(); if (!expectsPayload) { socket[kReset] = true; } - } else if (util3.isBlobLike(body2)) { - if (typeof body2.stream === "function") { - writeIterable({ body: body2.stream(), client, request: request3, socket, contentLength: contentLength2, header, expectsPayload }); + } else if (util.isBlobLike(body)) { + if (typeof body.stream === "function") { + writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload }); } else { - writeBlob({ body: body2, client, request: request3, socket, contentLength: contentLength2, header, expectsPayload }); + writeBlob({ body, client, request, socket, contentLength, header, expectsPayload }); } - } else if (util3.isStream(body2)) { - writeStream({ body: body2, client, request: request3, socket, contentLength: contentLength2, header, expectsPayload }); - } else if (util3.isIterable(body2)) { - writeIterable({ body: body2, client, request: request3, socket, contentLength: contentLength2, header, expectsPayload }); + } else if (util.isStream(body)) { + writeStream({ body, client, request, socket, contentLength, header, expectsPayload }); + } else if (util.isIterable(body)) { + writeIterable({ body, client, request, socket, contentLength, header, expectsPayload }); } else { assert3(false); } return true; } - function writeH2(client, session, request3) { - const { body: body2, method, path: path4, host, upgrade, expectContinue, signal, headers: reqHeaders } = request3; + function writeH2(client, session, request) { + const { body, method, path: path4, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; if (upgrade) { - errorRequest(client, request3, new Error("Upgrade not supported for H2")); + errorRequest(client, request, new Error("Upgrade not supported for H2")); return false; } try { - request3.onConnect((err) => { - if (request3.aborted || request3.completed) { + request.onConnect((err) => { + if (request.aborted || request.completed) { return; } - errorRequest(client, request3, err || new RequestAbortedError()); + errorRequest(client, request, err || new RequestAbortedError()); }); } catch (err) { - errorRequest(client, request3, err); + errorRequest(client, request, err); } - if (request3.aborted) { + if (request.aborted) { return false; } let stream; @@ -8151,11 +8151,11 @@ upgrade: ${upgrade}\r session.ref(); stream = session.request(headers, { endStream: false, signal }); if (stream.id && !stream.pending) { - request3.onUpgrade(null, null, stream); + request.onUpgrade(null, null, stream); ++h2State.openStreams; } else { stream.once("ready", () => { - request3.onUpgrade(null, null, stream); + request.onUpgrade(null, null, stream); ++h2State.openStreams; }); } @@ -8168,26 +8168,26 @@ upgrade: ${upgrade}\r headers[HTTP2_HEADER_PATH] = path4; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body2 && typeof body2.read === "function") { - body2.read(0); + if (body && typeof body.read === "function") { + body.read(0); } - let contentLength2 = util3.bodyLength(body2); - if (contentLength2 == null) { - contentLength2 = request3.contentLength; + let contentLength = util.bodyLength(body); + if (contentLength == null) { + contentLength = request.contentLength; } - if (contentLength2 === 0 || !expectsPayload) { - contentLength2 = null; + if (contentLength === 0 || !expectsPayload) { + contentLength = null; } - if (shouldSendContentLength(method) && contentLength2 > 0 && request3.contentLength != null && request3.contentLength !== contentLength2) { + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { - errorRequest(client, request3, new RequestContentLengthMismatchError()); + errorRequest(client, request, new RequestContentLengthMismatchError()); return false; } process.emitWarning(new RequestContentLengthMismatchError()); } - if (contentLength2 != null) { - assert3(body2, "no body must not have content length"); - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength2}`; + if (contentLength != null) { + assert3(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); const shouldEndStream = method === "GET" || method === "HEAD"; @@ -8205,15 +8205,15 @@ upgrade: ${upgrade}\r ++h2State.openStreams; stream.once("response", (headers2) => { const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; - if (request3.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), "") === false) { + if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), "") === false) { stream.pause(); } }); stream.once("end", () => { - request3.onComplete([]); + request.onComplete([]); }); stream.on("data", (chunk) => { - if (request3.onData(chunk) === false) { + if (request.onData(chunk) === false) { stream.pause(); } }); @@ -8226,70 +8226,70 @@ upgrade: ${upgrade}\r stream.once("error", function(err) { if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { h2State.streams -= 1; - util3.destroy(stream, err); + util.destroy(stream, err); } }); - stream.once("frameError", (type2, code) => { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`); - errorRequest(client, request3, err); + stream.once("frameError", (type, code) => { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + errorRequest(client, request, err); if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { h2State.streams -= 1; - util3.destroy(stream, err); + util.destroy(stream, err); } }); return true; function writeBodyH2() { - if (!body2) { - request3.onRequestSent(); - } else if (util3.isBuffer(body2)) { - assert3(contentLength2 === body2.byteLength, "buffer body must have content length"); + if (!body) { + request.onRequestSent(); + } else if (util.isBuffer(body)) { + assert3(contentLength === body.byteLength, "buffer body must have content length"); stream.cork(); - stream.write(body2); + stream.write(body); stream.uncork(); stream.end(); - request3.onBodySent(body2); - request3.onRequestSent(); - } else if (util3.isBlobLike(body2)) { - if (typeof body2.stream === "function") { + request.onBodySent(body); + request.onRequestSent(); + } else if (util.isBlobLike(body)) { + if (typeof body.stream === "function") { writeIterable({ client, - request: request3, - contentLength: contentLength2, + request, + contentLength, h2stream: stream, expectsPayload, - body: body2.stream(), + body: body.stream(), socket: client[kSocket], header: "" }); } else { writeBlob({ - body: body2, + body, client, - request: request3, - contentLength: contentLength2, + request, + contentLength, expectsPayload, h2stream: stream, header: "", socket: client[kSocket] }); } - } else if (util3.isStream(body2)) { + } else if (util.isStream(body)) { writeStream({ - body: body2, + body, client, - request: request3, - contentLength: contentLength2, + request, + contentLength, expectsPayload, socket: client[kSocket], h2stream: stream, header: "" }); - } else if (util3.isIterable(body2)) { + } else if (util.isIterable(body)) { writeIterable({ - body: body2, + body, client, - request: request3, - contentLength: contentLength2, + request, + contentLength, expectsPayload, header: "", h2stream: stream, @@ -8300,33 +8300,33 @@ upgrade: ${upgrade}\r } } } - function writeStream({ h2stream, body: body2, client, request: request3, socket, contentLength: contentLength2, header, expectsPayload }) { - assert3(contentLength2 !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + function writeStream({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert3(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); if (client[kHTTPConnVersion] === "h2") { let onPipeData = function(chunk) { - request3.onBodySent(chunk); + request.onBodySent(chunk); }; const pipe2 = pipeline( - body2, + body, h2stream, (err) => { if (err) { - util3.destroy(body2, err); - util3.destroy(h2stream, err); + util.destroy(body, err); + util.destroy(h2stream, err); } else { - request3.onRequestSent(); + request.onRequestSent(); } } ); pipe2.on("data", onPipeData); pipe2.once("end", () => { pipe2.removeListener("data", onPipeData); - util3.destroy(pipe2); + util.destroy(pipe2); }); return; } let finished = false; - const writer = new AsyncWriter({ socket, request: request3, contentLength: contentLength2, client, expectsPayload, header }); + const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { if (finished) { return; @@ -8336,15 +8336,15 @@ upgrade: ${upgrade}\r this.pause(); } } catch (err) { - util3.destroy(this, err); + util.destroy(this, err); } }; const onDrain = function() { if (finished) { return; } - if (body2.resume) { - body2.resume(); + if (body.resume) { + body.resume(); } }; const onAbort = function() { @@ -8361,7 +8361,7 @@ upgrade: ${upgrade}\r finished = true; assert3(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); - body2.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); + body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); if (!err) { try { writer.end(); @@ -8371,49 +8371,49 @@ upgrade: ${upgrade}\r } writer.destroy(err); if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) { - util3.destroy(body2, err); + util.destroy(body, err); } else { - util3.destroy(body2); + util.destroy(body); } }; - body2.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onAbort); - if (body2.resume) { - body2.resume(); + body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onAbort); + if (body.resume) { + body.resume(); } socket.on("drain", onDrain).on("error", onFinished); } - async function writeBlob({ h2stream, body: body2, client, request: request3, socket, contentLength: contentLength2, header, expectsPayload }) { - assert3(contentLength2 === body2.size, "blob body must have content length"); + async function writeBlob({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert3(contentLength === body.size, "blob body must have content length"); const isH2 = client[kHTTPConnVersion] === "h2"; try { - if (contentLength2 != null && contentLength2 !== body2.size) { + if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError(); } - const buffer2 = Buffer.from(await body2.arrayBuffer()); + const buffer = Buffer.from(await body.arrayBuffer()); if (isH2) { h2stream.cork(); - h2stream.write(buffer2); + h2stream.write(buffer); h2stream.uncork(); } else { socket.cork(); - socket.write(`${header}content-length: ${contentLength2}\r + socket.write(`${header}content-length: ${contentLength}\r \r `, "latin1"); - socket.write(buffer2); + socket.write(buffer); socket.uncork(); } - request3.onBodySent(buffer2); - request3.onRequestSent(); + request.onBodySent(buffer); + request.onRequestSent(); if (!expectsPayload) { socket[kReset] = true; } resume(client); } catch (err) { - util3.destroy(isH2 ? h2stream : socket, err); + util.destroy(isH2 ? h2stream : socket, err); } } - async function writeIterable({ h2stream, body: body2, client, request: request3, socket, contentLength: contentLength2, header, expectsPayload }) { - assert3(contentLength2 !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + async function writeIterable({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert3(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { if (callback) { @@ -8433,12 +8433,12 @@ upgrade: ${upgrade}\r if (client[kHTTPConnVersion] === "h2") { h2stream.on("close", onDrain).on("drain", onDrain); try { - for await (const chunk of body2) { + for await (const chunk of body) { if (socket[kError]) { throw socket[kError]; } const res = h2stream.write(chunk); - request3.onBodySent(chunk); + request.onBodySent(chunk); if (!res) { await waitForDrain(); } @@ -8446,16 +8446,16 @@ upgrade: ${upgrade}\r } catch (err) { h2stream.destroy(err); } finally { - request3.onRequestSent(); + request.onRequestSent(); h2stream.end(); h2stream.off("close", onDrain).off("drain", onDrain); } return; } socket.on("close", onDrain).on("drain", onDrain); - const writer = new AsyncWriter({ socket, request: request3, contentLength: contentLength2, client, expectsPayload, header }); + const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); try { - for await (const chunk of body2) { + for await (const chunk of body) { if (socket[kError]) { throw socket[kError]; } @@ -8471,10 +8471,10 @@ upgrade: ${upgrade}\r } } var AsyncWriter = class { - constructor({ socket, request: request3, contentLength: contentLength2, client, expectsPayload, header }) { + constructor({ socket, request, contentLength, client, expectsPayload, header }) { this.socket = socket; - this.request = request3; - this.contentLength = contentLength2; + this.request = request; + this.contentLength = contentLength; this.client = client; this.bytesWritten = 0; this.expectsPayload = expectsPayload; @@ -8482,7 +8482,7 @@ upgrade: ${upgrade}\r socket[kWriting] = true; } write(chunk) { - const { socket, request: request3, contentLength: contentLength2, client, bytesWritten, expectsPayload, header } = this; + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; if (socket[kError]) { throw socket[kError]; } @@ -8493,7 +8493,7 @@ upgrade: ${upgrade}\r if (!len) { return true; } - if (contentLength2 !== null && bytesWritten + len > contentLength2) { + if (contentLength !== null && bytesWritten + len > contentLength) { if (client[kStrictContentLength]) { throw new RequestContentLengthMismatchError(); } @@ -8504,16 +8504,16 @@ upgrade: ${upgrade}\r if (!expectsPayload) { socket[kReset] = true; } - if (contentLength2 === null) { + if (contentLength === null) { socket.write(`${header}transfer-encoding: chunked\r `, "latin1"); } else { - socket.write(`${header}content-length: ${contentLength2}\r + socket.write(`${header}content-length: ${contentLength}\r \r `, "latin1"); } } - if (contentLength2 === null) { + if (contentLength === null) { socket.write(`\r ${len.toString(16)}\r `, "latin1"); @@ -8521,7 +8521,7 @@ ${len.toString(16)}\r this.bytesWritten += len; const ret = socket.write(chunk); socket.uncork(); - request3.onBodySent(chunk); + request.onBodySent(chunk); if (!ret) { if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { if (socket[kParser].timeout.refresh) { @@ -8532,8 +8532,8 @@ ${len.toString(16)}\r return ret; } end() { - const { socket, contentLength: contentLength2, client, bytesWritten, expectsPayload, header, request: request3 } = this; - request3.onRequestSent(); + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; + request.onRequestSent(); socket[kWriting] = false; if (socket[kError]) { throw socket[kError]; @@ -8550,10 +8550,10 @@ ${len.toString(16)}\r socket.write(`${header}\r `, "latin1"); } - } else if (contentLength2 === null) { + } else if (contentLength === null) { socket.write("\r\n0\r\n\r\n", "latin1"); } - if (contentLength2 !== null && bytesWritten !== contentLength2) { + if (contentLength !== null && bytesWritten !== contentLength) { if (client[kStrictContentLength]) { throw new RequestContentLengthMismatchError(); } else { @@ -8572,14 +8572,14 @@ ${len.toString(16)}\r socket[kWriting] = false; if (err) { assert3(client[kRunning] <= 1, "pipeline should only contain this request"); - util3.destroy(socket, err); + util.destroy(socket, err); } } }; - function errorRequest(client, request3, err) { + function errorRequest(client, request, err) { try { - request3.onError(err); - assert3(request3.aborted); + request.onError(err); + assert3(request.aborted); } catch (err2) { client.emit("error", err2); } @@ -8848,7 +8848,7 @@ var require_pool = __commonJS({ var { InvalidArgumentError } = require_errors(); - var util3 = require_util(); + var util = require_util(); var { kUrl, kInterceptors } = require_symbols(); var buildConnector = require_connect(); var kOptions = Symbol("options"); @@ -8888,14 +8888,14 @@ var require_pool = __commonJS({ allowH2, socketPath, timeout: connectTimeout, - ...util3.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, ...connect }); } this[kInterceptors] = options2.interceptors && options2.interceptors.Pool && Array.isArray(options2.interceptors.Pool) ? options2.interceptors.Pool : []; this[kConnections] = connections || null; - this[kUrl] = util3.parseOrigin(origin); - this[kOptions] = { ...util3.deepClone(options2), connect, allowH2 }; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { ...util.deepClone(options2), connect, allowH2 }; this[kOptions].interceptors = options2.interceptors ? { ...options2.interceptors } : void 0; this[kFactory] = factory; this.on("connectionError", (origin2, targets, error3) => { @@ -9109,7 +9109,7 @@ var require_agent = __commonJS({ var DispatcherBase = require_dispatcher_base(); var Pool = require_pool(); var Client = require_client(); - var util3 = require_util(); + var util = require_util(); var createRedirectInterceptor = require_redirectInterceptor(); var { WeakRef: WeakRef2, FinalizationRegistry } = require_dispatcher_weakref()(); var kOnConnect = Symbol("onConnect"); @@ -9123,7 +9123,7 @@ var require_agent = __commonJS({ function defaultFactory(origin, opts) { return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); } - var Agent3 = class extends DispatcherBase { + var Agent = class extends DispatcherBase { constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options2 } = {}) { super(); if (typeof factory !== "function") { @@ -9139,7 +9139,7 @@ var require_agent = __commonJS({ connect = { ...connect }; } this[kInterceptors] = options2.interceptors && options2.interceptors.Agent && Array.isArray(options2.interceptors.Agent) ? options2.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; - this[kOptions] = { ...util3.deepClone(options2), connect }; + this[kOptions] = { ...util.deepClone(options2), connect }; this[kOptions].interceptors = options2.interceptors ? { ...options2.interceptors } : void 0; this[kMaxRedirections] = maxRedirections; this[kFactory] = factory; @@ -9214,7 +9214,7 @@ var require_agent = __commonJS({ await Promise.all(destroyPromises); } }; - module2.exports = Agent3; + module2.exports = Agent; } }); @@ -9223,9 +9223,9 @@ var require_readable = __commonJS({ "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/readable.js"(exports2, module2) { "use strict"; var assert3 = require("assert"); - var { Readable: Readable5 } = require("stream"); + var { Readable } = require("stream"); var { RequestAbortedError, NotSupportedError, InvalidArgumentError } = require_errors(); - var util3 = require_util(); + var util = require_util(); var { ReadableStreamFrom, toUSVString } = require_util(); var Blob2; var kConsume = Symbol("kConsume"); @@ -9235,11 +9235,11 @@ var require_readable = __commonJS({ var kContentType = Symbol("kContentType"); var noop = () => { }; - module2.exports = class BodyReadable extends Readable5 { + module2.exports = class BodyReadable extends Readable { constructor({ resume, abort, - contentType: contentType2 = "", + contentType = "", highWaterMark = 64 * 1024 // Same as nodejs fs streams. }) { @@ -9252,7 +9252,7 @@ var require_readable = __commonJS({ this[kAbort] = abort; this[kConsume] = null; this[kBody] = null; - this[kContentType] = contentType2; + this[kContentType] = contentType; this[kReading] = false; } destroy(err) { @@ -9323,7 +9323,7 @@ var require_readable = __commonJS({ } // https://fetch.spec.whatwg.org/#dom-body-bodyused get bodyUsed() { - return util3.isDisturbed(this); + return util.isDisturbed(this); } // https://fetch.spec.whatwg.org/#dom-body-body get body() { @@ -9344,7 +9344,7 @@ var require_readable = __commonJS({ if (typeof signal !== "object" || !("aborted" in signal)) { throw new InvalidArgumentError("signal must be an AbortSignal"); } - util3.throwIfAborted(signal); + util.throwIfAborted(signal); } catch (err) { return Promise.reject(err); } @@ -9353,7 +9353,7 @@ var require_readable = __commonJS({ return Promise.resolve(null); } return new Promise((resolve, reject) => { - const signalListenerCleanup = signal ? util3.addAbortListener(signal, () => { + const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); }) : noop; this.on("close", function() { @@ -9376,16 +9376,16 @@ var require_readable = __commonJS({ return self2[kBody] && self2[kBody].locked === true || self2[kConsume]; } function isUnusable(self2) { - return util3.isDisturbed(self2) || isLocked(self2); + return util.isDisturbed(self2) || isLocked(self2); } - async function consume(stream, type2) { + async function consume(stream, type) { if (isUnusable(stream)) { throw new TypeError("unusable"); } assert3(!stream[kConsume]); return new Promise((resolve, reject) => { stream[kConsume] = { - type: type2, + type, stream, resolve, reject, @@ -9406,11 +9406,11 @@ var require_readable = __commonJS({ if (consume2.body === null) { return; } - const { _readableState: state3 } = consume2.stream; - for (const chunk of state3.buffer) { + const { _readableState: state } = consume2.stream; + for (const chunk of state.buffer) { consumePush(consume2, chunk); } - if (state3.endEmitted) { + if (state.endEmitted) { consumeEnd(this[kConsume]); } else { consume2.stream.on("end", function() { @@ -9422,25 +9422,25 @@ var require_readable = __commonJS({ } } function consumeEnd(consume2) { - const { type: type2, body: body2, resolve, stream, length } = consume2; + const { type, body, resolve, stream, length } = consume2; try { - if (type2 === "text") { - resolve(toUSVString(Buffer.concat(body2))); - } else if (type2 === "json") { - resolve(JSON.parse(Buffer.concat(body2))); - } else if (type2 === "arrayBuffer") { + if (type === "text") { + resolve(toUSVString(Buffer.concat(body))); + } else if (type === "json") { + resolve(JSON.parse(Buffer.concat(body))); + } else if (type === "arrayBuffer") { const dst = new Uint8Array(length); let pos = 0; - for (const buf of body2) { + for (const buf of body) { dst.set(buf, pos); pos += buf.byteLength; } resolve(dst.buffer); - } else if (type2 === "blob") { + } else if (type === "blob") { if (!Blob2) { Blob2 = require("buffer").Blob; } - resolve(new Blob2(body2, { type: stream[kContentType] })); + resolve(new Blob2(body, { type: stream[kContentType] })); } consumeFinish(consume2); } catch (err) { @@ -9479,11 +9479,11 @@ var require_util3 = __commonJS({ ResponseStatusCodeError } = require_errors(); var { toUSVString } = require_util(); - async function getResolveErrorBodyCallback({ callback, body: body2, contentType: contentType2, statusCode, statusMessage, headers }) { - assert3(body2); + async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert3(body); let chunks = []; let limit = 0; - for await (const chunk of body2) { + for await (const chunk of body) { chunks.push(chunk); limit += chunk.length; if (limit > 128 * 1024) { @@ -9491,17 +9491,17 @@ var require_util3 = __commonJS({ break; } } - if (statusCode === 204 || !contentType2 || !chunks) { + if (statusCode === 204 || !contentType || !chunks) { process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); return; } try { - if (contentType2.startsWith("application/json")) { + if (contentType.startsWith("application/json")) { const payload = JSON.parse(toUSVString(Buffer.concat(chunks))); process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); return; } - if (contentType2.startsWith("text/")) { + if (contentType.startsWith("text/")) { const payload = toUSVString(Buffer.concat(chunks)); process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); return; @@ -9568,12 +9568,12 @@ var require_abort_signal = __commonJS({ var require_api_request = __commonJS({ "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-request.js"(exports2, module2) { "use strict"; - var Readable5 = require_readable(); + var Readable = require_readable(); var { InvalidArgumentError, RequestAbortedError } = require_errors(); - var util3 = require_util(); + var util = require_util(); var { getResolveErrorBodyCallback } = require_util3(); var { AsyncResource } = require("async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); @@ -9582,7 +9582,7 @@ var require_api_request = __commonJS({ if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); } - const { signal, method, opaque, body: body2, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; try { if (typeof callback !== "function") { throw new InvalidArgumentError("invalid callback"); @@ -9601,8 +9601,8 @@ var require_api_request = __commonJS({ } super("UNDICI_REQUEST"); } catch (err) { - if (util3.isStream(body2)) { - util3.destroy(body2.on("error", util3.nop), err); + if (util.isStream(body)) { + util.destroy(body.on("error", util.nop), err); } throw err; } @@ -9611,14 +9611,14 @@ var require_api_request = __commonJS({ this.callback = callback; this.res = null; this.abort = null; - this.body = body2; + this.body = body; this.trailers = {}; this.context = null; this.onInfo = onInfo || null; this.throwOnError = throwOnError; this.highWaterMark = highWaterMark; - if (util3.isStream(body2)) { - body2.on("error", (err) => { + if (util.isStream(body)) { + body.on("error", (err) => { this.onError(err); }); } @@ -9633,24 +9633,24 @@ var require_api_request = __commonJS({ } onHeaders(statusCode, rawHeaders, resume, statusMessage) { const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; - const headers = responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); if (statusCode < 200) { if (this.onInfo) { this.onInfo({ statusCode, headers }); } return; } - const parsedHeaders = responseHeaders === "raw" ? util3.parseHeaders(rawHeaders) : headers; - const contentType2 = parsedHeaders["content-type"]; - const body2 = new Readable5({ resume, abort, contentType: contentType2, highWaterMark }); + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const body = new Readable({ resume, abort, contentType, highWaterMark }); this.callback = null; - this.res = body2; + this.res = body; if (callback !== null) { if (this.throwOnError && statusCode >= 400) { this.runInAsyncScope( getResolveErrorBodyCallback, null, - { callback, body: body2, contentType: contentType2, statusCode, statusMessage, headers } + { callback, body, contentType, statusCode, statusMessage, headers } ); } else { this.runInAsyncScope(callback, null, null, { @@ -9658,7 +9658,7 @@ var require_api_request = __commonJS({ headers, trailers: this.trailers, opaque, - body: body2, + body, context }); } @@ -9671,11 +9671,11 @@ var require_api_request = __commonJS({ onComplete(trailers) { const { res } = this; removeSignal(this); - util3.parseHeaders(trailers, this.trailers); + util.parseHeaders(trailers, this.trailers); res.push(null); } onError(err) { - const { res, callback, body: body2, opaque } = this; + const { res, callback, body, opaque } = this; removeSignal(this); if (callback) { this.callback = null; @@ -9686,19 +9686,19 @@ var require_api_request = __commonJS({ if (res) { this.res = null; queueMicrotask(() => { - util3.destroy(res, err); + util.destroy(res, err); }); } - if (body2) { + if (body) { this.body = null; - util3.destroy(body2, err); + util.destroy(body, err); } } }; - function request3(opts, callback) { + function request(opts, callback) { if (callback === void 0) { return new Promise((resolve, reject) => { - request3.call(this, opts, (err, data) => { + request.call(this, opts, (err, data) => { return err ? reject(err) : resolve(data); }); }); @@ -9713,7 +9713,7 @@ var require_api_request = __commonJS({ queueMicrotask(() => callback(err, { opaque })); } } - module2.exports = request3; + module2.exports = request; module2.exports.RequestHandler = RequestHandler; } }); @@ -9728,7 +9728,7 @@ var require_api_stream = __commonJS({ InvalidReturnValueError, RequestAbortedError } = require_errors(); - var util3 = require_util(); + var util = require_util(); var { getResolveErrorBodyCallback } = require_util3(); var { AsyncResource } = require("async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); @@ -9737,7 +9737,7 @@ var require_api_stream = __commonJS({ if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); } - const { signal, method, opaque, body: body2, onInfo, responseHeaders, throwOnError } = opts; + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; try { if (typeof callback !== "function") { throw new InvalidArgumentError("invalid callback"); @@ -9756,8 +9756,8 @@ var require_api_stream = __commonJS({ } super("UNDICI_STREAM"); } catch (err) { - if (util3.isStream(body2)) { - util3.destroy(body2.on("error", util3.nop), err); + if (util.isStream(body)) { + util.destroy(body.on("error", util.nop), err); } throw err; } @@ -9769,11 +9769,11 @@ var require_api_stream = __commonJS({ this.abort = null; this.context = null; this.trailers = null; - this.body = body2; + this.body = body; this.onInfo = onInfo || null; this.throwOnError = throwOnError || false; - if (util3.isStream(body2)) { - body2.on("error", (err) => { + if (util.isStream(body)) { + body.on("error", (err) => { this.onError(err); }); } @@ -9788,7 +9788,7 @@ var require_api_stream = __commonJS({ } onHeaders(statusCode, rawHeaders, resume, statusMessage) { const { factory, opaque, context, callback, responseHeaders } = this; - const headers = responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); if (statusCode < 200) { if (this.onInfo) { this.onInfo({ statusCode, headers }); @@ -9798,14 +9798,14 @@ var require_api_stream = __commonJS({ this.factory = null; let res; if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === "raw" ? util3.parseHeaders(rawHeaders) : headers; - const contentType2 = parsedHeaders["content-type"]; + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; res = new PassThrough(); this.callback = null; this.runInAsyncScope( getResolveErrorBodyCallback, null, - { callback, body: res, contentType: contentType2, statusCode, statusMessage, headers } + { callback, body: res, contentType, statusCode, statusMessage, headers } ); } else { if (factory === null) { @@ -9824,7 +9824,7 @@ var require_api_stream = __commonJS({ const { callback: callback2, res: res2, opaque: opaque2, trailers, abort } = this; this.res = null; if (err || !res2.readable) { - util3.destroy(res2, err); + util.destroy(res2, err); } this.callback = null; this.runInAsyncScope(callback2, null, err || null, { opaque: opaque2, trailers }); @@ -9848,25 +9848,25 @@ var require_api_stream = __commonJS({ if (!res) { return; } - this.trailers = util3.parseHeaders(trailers); + this.trailers = util.parseHeaders(trailers); res.end(); } onError(err) { - const { res, callback, opaque, body: body2 } = this; + const { res, callback, opaque, body } = this; removeSignal(this); this.factory = null; if (res) { this.res = null; - util3.destroy(res, err); + util.destroy(res, err); } else if (callback) { this.callback = null; queueMicrotask(() => { this.runInAsyncScope(callback, null, err, { opaque }); }); } - if (body2) { + if (body) { this.body = null; - util3.destroy(body2, err); + util.destroy(body, err); } } }; @@ -9897,7 +9897,7 @@ var require_api_pipeline = __commonJS({ "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js"(exports2, module2) { "use strict"; var { - Readable: Readable5, + Readable, Duplex, PassThrough } = require("stream"); @@ -9906,12 +9906,12 @@ var require_api_pipeline = __commonJS({ InvalidReturnValueError, RequestAbortedError } = require_errors(); - var util3 = require_util(); + var util = require_util(); var { AsyncResource } = require("async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); var assert3 = require("assert"); var kResume = Symbol("resume"); - var PipelineRequest = class extends Readable5 { + var PipelineRequest = class extends Readable { constructor() { super({ autoDestroy: true }); this[kResume] = null; @@ -9928,7 +9928,7 @@ var require_api_pipeline = __commonJS({ callback(err); } }; - var PipelineResponse = class extends Readable5 { + var PipelineResponse = class extends Readable { constructor(resume) { super({ autoDestroy: true }); this[kResume] = resume; @@ -9968,14 +9968,14 @@ var require_api_pipeline = __commonJS({ this.abort = null; this.context = null; this.onInfo = onInfo || null; - this.req = new PipelineRequest().on("error", util3.nop); + this.req = new PipelineRequest().on("error", util.nop); this.ret = new Duplex({ readableObjectMode: opts.objectMode, autoDestroy: true, read: () => { - const { body: body2 } = this; - if (body2 && body2.resume) { - body2.resume(); + const { body } = this; + if (body && body.resume) { + body.resume(); } }, write: (chunk, encoding, callback) => { @@ -9987,16 +9987,16 @@ var require_api_pipeline = __commonJS({ } }, destroy: (err, callback) => { - const { body: body2, req, res, ret, abort } = this; + const { body, req, res, ret, abort } = this; if (!err && !ret._readableState.endEmitted) { err = new RequestAbortedError(); } if (abort && err) { abort(); } - util3.destroy(body2, err); - util3.destroy(req, err); - util3.destroy(res, err); + util.destroy(body, err); + util.destroy(req, err); + util.destroy(res, err); removeSignal(this); callback(err); } @@ -10020,17 +10020,17 @@ var require_api_pipeline = __commonJS({ const { opaque, handler, context } = this; if (statusCode < 200) { if (this.onInfo) { - const headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); this.onInfo({ statusCode, headers }); } return; } this.res = new PipelineResponse(resume); - let body2; + let body; try { this.handler = null; - const headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); - body2 = this.runInAsyncScope(handler, null, { + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler, null, { statusCode, headers, opaque, @@ -10038,30 +10038,30 @@ var require_api_pipeline = __commonJS({ context }); } catch (err) { - this.res.on("error", util3.nop); + this.res.on("error", util.nop); throw err; } - if (!body2 || typeof body2.on !== "function") { + if (!body || typeof body.on !== "function") { throw new InvalidReturnValueError("expected Readable"); } - body2.on("data", (chunk) => { - const { ret, body: body3 } = this; - if (!ret.push(chunk) && body3.pause) { - body3.pause(); + body.on("data", (chunk) => { + const { ret, body: body2 } = this; + if (!ret.push(chunk) && body2.pause) { + body2.pause(); } }).on("error", (err) => { const { ret } = this; - util3.destroy(ret, err); + util.destroy(ret, err); }).on("end", () => { const { ret } = this; ret.push(null); }).on("close", () => { const { ret } = this; if (!ret._readableState.ended) { - util3.destroy(ret, new RequestAbortedError()); + util.destroy(ret, new RequestAbortedError()); } }); - this.body = body2; + this.body = body; } onData(chunk) { const { res } = this; @@ -10074,7 +10074,7 @@ var require_api_pipeline = __commonJS({ onError(err) { const { ret } = this; this.handler = null; - util3.destroy(ret, err); + util.destroy(ret, err); } }; function pipeline(opts, handler) { @@ -10096,7 +10096,7 @@ var require_api_upgrade = __commonJS({ "use strict"; var { InvalidArgumentError, RequestAbortedError, SocketError } = require_errors(); var { AsyncResource } = require("async_hooks"); - var util3 = require_util(); + var util = require_util(); var { addSignal, removeSignal } = require_abort_signal(); var assert3 = require("assert"); var UpgradeHandler = class extends AsyncResource { @@ -10134,7 +10134,7 @@ var require_api_upgrade = __commonJS({ assert3.strictEqual(statusCode, 101); removeSignal(this); this.callback = null; - const headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); this.runInAsyncScope(callback, null, null, { headers, socket, @@ -10186,7 +10186,7 @@ var require_api_connect = __commonJS({ "use strict"; var { AsyncResource } = require("async_hooks"); var { InvalidArgumentError, RequestAbortedError, SocketError } = require_errors(); - var util3 = require_util(); + var util = require_util(); var { addSignal, removeSignal } = require_abort_signal(); var ConnectHandler = class extends AsyncResource { constructor(opts, callback) { @@ -10223,7 +10223,7 @@ var require_api_connect = __commonJS({ this.callback = null; let headers = rawHeaders; if (headers != null) { - headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); + headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); } this.runInAsyncScope(callback, null, null, { statusCode, @@ -10420,10 +10420,10 @@ var require_mock_utils = __commonJS({ qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path4, method, body: body2, headers }) { + function matchKey(mockDispatch2, { path: path4, method, body, headers }) { const pathMatch = matchValue(mockDispatch2.path, path4); const methodMatch = matchValue(mockDispatch2.method, method); - const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body2) : true; + const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); return pathMatch && methodMatch && bodyMatch && headersMatch; } @@ -10447,7 +10447,7 @@ var require_mock_utils = __commonJS({ if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`); } - matchedMockDispatches = matchedMockDispatches.filter(({ body: body2 }) => typeof body2 !== "undefined" ? matchValue(body2, key.body) : true); + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`); } @@ -10476,11 +10476,11 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path4, method, body: body2, headers, query } = opts; + const { path: path4, method, body, headers, query } = opts; return { path: path4, method, - body: body2, + body, headers, query }; @@ -10495,9 +10495,9 @@ var require_mock_utils = __commonJS({ function getStatusText(statusCode) { return STATUS_CODES[statusCode] || "unknown"; } - async function getResponse(body2) { + async function getResponse(body) { const buffers = []; - for await (const data of body2) { + for await (const data of body) { buffers.push(data); } return Buffer.concat(buffers).toString("utf8"); @@ -10509,7 +10509,7 @@ var require_mock_utils = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error: error3 }, delay: delay5, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error3 }, delay: delay2, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; @@ -10518,21 +10518,21 @@ var require_mock_utils = __commonJS({ handler.onError(error3); return true; } - if (typeof delay5 === "number" && delay5 > 0) { + if (typeof delay2 === "number" && delay2 > 0) { setTimeout(() => { handleReply(this[kDispatches]); - }, delay5); + }, delay2); } else { handleReply(this[kDispatches]); } function handleReply(mockDispatches, _data = data) { const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; - const body2 = typeof _data === "function" ? _data({ ...opts, headers: optsHeaders }) : _data; - if (isPromise(body2)) { - body2.then((newData) => handleReply(mockDispatches, newData)); + const body = typeof _data === "function" ? _data({ ...opts, headers: optsHeaders }) : _data; + if (isPromise(body)) { + body.then((newData) => handleReply(mockDispatches, newData)); return; } - const responseData = getResponseData(body2); + const responseData = getResponseData(body); const responseHeaders = generateKeyValues(headers); const responseTrailers = generateKeyValues(trailers); handler.abort = nop; @@ -10574,10 +10574,10 @@ var require_mock_utils = __commonJS({ }; } function checkNetConnect(netConnect, origin) { - const url2 = new URL(origin); + const url = new URL(origin); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { return true; } return false; @@ -10684,8 +10684,8 @@ var require_mock_interceptor = __commonJS({ } createMockScopeDispatchData(statusCode, data, responseOptions = {}) { const responseData = getResponseData(data); - const contentLength2 = this[kContentLength] ? { "content-length": responseData.length } : {}; - const headers = { ...this[kDefaultHeaders], ...contentLength2, ...responseOptions.headers }; + const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; + const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }; const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }; return { statusCode, data, headers, trailers }; } @@ -10772,7 +10772,7 @@ var require_mock_interceptor = __commonJS({ var require_mock_client = __commonJS({ "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify } = require("util"); var Client = require_client(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10812,7 +10812,7 @@ var require_mock_client = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify2(this[kOriginalClose])(); + await promisify(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10825,7 +10825,7 @@ var require_mock_client = __commonJS({ var require_mock_pool = __commonJS({ "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify } = require("util"); var Pool = require_pool(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10865,7 +10865,7 @@ var require_mock_pool = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify2(this[kOriginalClose])(); + await promisify(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10909,11 +10909,11 @@ var require_pluralizer = __commonJS({ var require_pending_interceptors_formatter = __commonJS({ "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports2, module2) { "use strict"; - var { Transform: Transform2 } = require("stream"); + var { Transform } = require("stream"); var { Console } = require("console"); module2.exports = class PendingInterceptorsFormatter { constructor({ disableColors } = {}) { - this.transform = new Transform2({ + this.transform = new Transform({ transform(chunk, _enc, cb) { cb(null, chunk); } @@ -10949,7 +10949,7 @@ var require_mock_agent = __commonJS({ "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js"(exports2, module2) { "use strict"; var { kClients } = require_symbols(); - var Agent3 = require_agent(); + var Agent = require_agent(); var { kAgent, kMockAgentSet, @@ -10984,7 +10984,7 @@ var require_mock_agent = __commonJS({ if (opts && opts.agent && typeof opts.agent.dispatch !== "function") { throw new InvalidArgumentError("Argument opts.agent must implement Agent"); } - const agent = opts && opts.agent ? opts.agent : new Agent3(opts); + const agent = opts && opts.agent ? opts.agent : new Agent(opts); this[kAgent] = agent; this[kClients] = agent[kClients]; this[kOptions] = buildMockOptions(opts); @@ -11089,7 +11089,7 @@ var require_proxy_agent = __commonJS({ "use strict"; var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols(); var { URL: URL2 } = require("url"); - var Agent3 = require_agent(); + var Agent = require_agent(); var Pool = require_pool(); var DispatcherBase = require_dispatcher_base(); var { InvalidArgumentError, RequestAbortedError } = require_errors(); @@ -11122,7 +11122,7 @@ var require_proxy_agent = __commonJS({ constructor(opts) { super(opts); this[kProxy] = buildProxyOptions(opts); - this[kAgent] = new Agent3(opts); + this[kAgent] = new Agent(opts); this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; if (typeof opts === "string") { opts = { uri: opts }; @@ -11151,7 +11151,7 @@ var require_proxy_agent = __commonJS({ const connect = buildConnector({ ...opts.proxyTls }); this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); this[kClient] = clientFactory(resolvedUrl, { connect }); - this[kAgent] = new Agent3({ + this[kAgent] = new Agent({ ...opts, connect: async (opts2, callback) => { let requestedHost = opts2.host; @@ -11328,7 +11328,7 @@ var require_RetryHandler = __commonJS({ onBodySent(chunk) { if (this.handler.onBodySent) return this.handler.onBodySent(chunk); } - static [kRetryHandlerDefaultRetry](err, { state: state3, opts }, cb) { + static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { const { statusCode, code, headers } = err; const { method, retryOptions } = opts; const { @@ -11340,7 +11340,7 @@ var require_RetryHandler = __commonJS({ errorCodes, methods } = retryOptions; - let { counter, currentTimeout } = state3; + let { counter, currentTimeout } = state; currentTimeout = currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout; if (code && code !== "UND_ERR_REQ_RETRY" && code !== "UND_ERR_SOCKET" && !errorCodes.includes(code)) { cb(err); @@ -11364,7 +11364,7 @@ var require_RetryHandler = __commonJS({ retryAfterHeader = isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; } const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout); - state3.currentTimeout = retryTimeout; + state.currentTimeout = retryTimeout; setTimeout(() => cb(null), retryTimeout); } onHeaders(statusCode, rawHeaders, resume, statusMessage) { @@ -11411,8 +11411,8 @@ var require_RetryHandler = __commonJS({ } if (this.end == null) { if (statusCode === 206) { - const range2 = parseRangeHeader(headers["content-range"]); - if (range2 == null) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) { return this.handler.onHeaders( statusCode, rawHeaders, @@ -11420,7 +11420,7 @@ var require_RetryHandler = __commonJS({ statusMessage ); } - const { start, size, end = size } = range2; + const { start, size, end = size } = range; assert3( start != null && Number.isFinite(start) && this.start !== start, "content-range mismatch" @@ -11434,8 +11434,8 @@ var require_RetryHandler = __commonJS({ this.end = end; } if (this.end == null) { - const contentLength2 = headers["content-length"]; - this.end = contentLength2 != null ? Number(contentLength2) : null; + const contentLength = headers["content-length"]; + this.end = contentLength != null ? Number(contentLength) : null; } assert3(Number.isFinite(this.start)); assert3( @@ -11509,9 +11509,9 @@ var require_global2 = __commonJS({ "use strict"; var globalDispatcher = Symbol.for("undici.globalDispatcher.1"); var { InvalidArgumentError } = require_errors(); - var Agent3 = require_agent(); + var Agent = require_agent(); if (getGlobalDispatcher() === void 0) { - setGlobalDispatcher(new Agent3()); + setGlobalDispatcher(new Agent()); } function setGlobalDispatcher(agent) { if (!agent || typeof agent.dispatch !== "function") { @@ -11579,7 +11579,7 @@ var require_headers = __commonJS({ isValidHeaderName, isValidHeaderValue } = require_util2(); - var util3 = require("util"); + var util = require("util"); var { webidl } = require_webidl(); var assert3 = require("assert"); var kHeadersMap = Symbol("headers map"); @@ -11669,10 +11669,10 @@ var require_headers = __commonJS({ const lowercaseName = name.toLowerCase(); const exists = this[kHeadersMap].get(lowercaseName); if (exists) { - const delimiter3 = lowercaseName === "cookie" ? "; " : ", "; + const delimiter2 = lowercaseName === "cookie" ? "; " : ", "; this[kHeadersMap].set(lowercaseName, { name: exists.name, - value: `${exists.value}${delimiter3}${value}` + value: `${exists.value}${delimiter2}${value}` }); } else { this[kHeadersMap].set(lowercaseName, { name, value }); @@ -11932,7 +11932,7 @@ var require_headers = __commonJS({ value: "Headers", configurable: true }, - [util3.inspect.custom]: { + [util.inspect.custom]: { enumerable: false } }); @@ -11963,8 +11963,8 @@ var require_response = __commonJS({ "use strict"; var { Headers, HeadersList, fill } = require_headers(); var { extractBody, cloneBody, mixinBody } = require_body(); - var util3 = require_util(); - var { kEnumerableProperty } = util3; + var util = require_util(); + var { kEnumerableProperty } = util; var { isValidReasonPhrase, isCancelled, @@ -12010,26 +12010,26 @@ var require_response = __commonJS({ const bytes = textEncoder.encode( serializeJavascriptValueToJSONString(data) ); - const body2 = extractBody(bytes); + const body = extractBody(bytes); const relevantRealm = { settingsObject: {} }; const responseObject = new _Response(); responseObject[kRealm] = relevantRealm; responseObject[kHeaders][kGuard] = "response"; responseObject[kHeaders][kRealm] = relevantRealm; - initializeResponse(responseObject, init, { body: body2[0], type: "application/json" }); + initializeResponse(responseObject, init, { body: body[0], type: "application/json" }); return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url2, status = 302) { + static redirect(url, status = 302) { const relevantRealm = { settingsObject: {} }; webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url2 = webidl.converters.USVString(url2); + url = webidl.converters.USVString(url); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url2, getGlobalOrigin()); + parsedURL = new URL(url, getGlobalOrigin()); } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url2), { + throw Object.assign(new TypeError("Failed to parse URL from " + url), { cause: err }); } @@ -12046,9 +12046,9 @@ var require_response = __commonJS({ return responseObject; } // https://fetch.spec.whatwg.org/#dom-response - constructor(body2 = null, init = {}) { - if (body2 !== null) { - body2 = webidl.converters.BodyInit(body2); + constructor(body = null, init = {}) { + if (body !== null) { + body = webidl.converters.BodyInit(body); } init = webidl.converters.ResponseInit(init); this[kRealm] = { settingsObject: {} }; @@ -12058,9 +12058,9 @@ var require_response = __commonJS({ this[kHeaders][kHeadersList] = this[kState].headersList; this[kHeaders][kRealm] = this[kRealm]; let bodyWithType = null; - if (body2 != null) { - const [extractedBody, type2] = extractBody(body2); - bodyWithType = { body: extractedBody, type: type2 }; + if (body != null) { + const [extractedBody, type] = extractBody(body); + bodyWithType = { body: extractedBody, type }; } initializeResponse(this, init, bodyWithType); } @@ -12073,11 +12073,11 @@ var require_response = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; - const url2 = urlList[urlList.length - 1] ?? null; - if (url2 === null) { + const url = urlList[urlList.length - 1] ?? null; + if (url === null) { return ""; } - return URLSerializer(url2, true); + return URLSerializer(url, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -12110,7 +12110,7 @@ var require_response = __commonJS({ } get bodyUsed() { webidl.brandCheck(this, _Response); - return !!this[kState].body && util3.isDisturbed(this[kState].body.stream); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); } // Returns a clone of response. clone() { @@ -12183,42 +12183,42 @@ var require_response = __commonJS({ }; } function makeNetworkError(reason) { - const isError2 = isErrorLike(reason); + const isError = isErrorLike(reason); return makeResponse({ type: "error", status: 0, - error: isError2 ? reason : new Error(reason ? String(reason) : reason), + error: isError ? reason : new Error(reason ? String(reason) : reason), aborted: reason && reason.name === "AbortError" }); } - function makeFilteredResponse(response, state3) { - state3 = { + function makeFilteredResponse(response, state) { + state = { internalResponse: response, - ...state3 + ...state }; return new Proxy(response, { get(target, p) { - return p in state3 ? state3[p] : target[p]; + return p in state ? state[p] : target[p]; }, set(target, p, value) { - assert3(!(p in state3)); + assert3(!(p in state)); target[p] = value; return true; } }); } - function filterResponse(response, type2) { - if (type2 === "basic") { + function filterResponse(response, type) { + if (type === "basic") { return makeFilteredResponse(response, { type: "basic", headersList: response.headersList }); - } else if (type2 === "cors") { + } else if (type === "cors") { return makeFilteredResponse(response, { type: "cors", headersList: response.headersList }); - } else if (type2 === "opaque") { + } else if (type === "opaque") { return makeFilteredResponse(response, { type: "opaque", urlList: Object.freeze([]), @@ -12226,7 +12226,7 @@ var require_response = __commonJS({ statusText: "", body: null }); - } else if (type2 === "opaqueredirect") { + } else if (type === "opaqueredirect") { return makeFilteredResponse(response, { type: "opaqueredirect", status: 0, @@ -12242,7 +12242,7 @@ var require_response = __commonJS({ assert3(isCancelled(fetchParams)); return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException2("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException2("Request was cancelled."), { cause: err })); } - function initializeResponse(response, init, body2) { + function initializeResponse(response, init, body) { if (init.status !== null && (init.status < 200 || init.status > 599)) { throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.'); } @@ -12260,16 +12260,16 @@ var require_response = __commonJS({ if ("headers" in init && init.headers != null) { fill(response[kHeaders], init.headers); } - if (body2) { + if (body) { if (nullBodyStatus.includes(response.status)) { throw webidl.errors.exception({ header: "Response constructor", message: "Invalid response status code " + response.status }); } - response[kState].body = body2.body; - if (body2.type != null && !response[kState].headersList.contains("Content-Type")) { - response[kState].headersList.append("content-type", body2.type); + response[kState].body = body.body; + if (body.type != null && !response[kState].headersList.contains("Content-Type")) { + response[kState].headersList.append("content-type", body.type); } } } @@ -12292,7 +12292,7 @@ var require_response = __commonJS({ if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { return webidl.converters.BufferSource(V); } - if (util3.isFormDataLike(V)) { + if (util.isFormDataLike(V)) { return webidl.converters.FormData(V, { strict: false }); } if (V instanceof URLSearchParams) { @@ -12343,7 +12343,7 @@ var require_request2 = __commonJS({ var { extractBody, mixinBody, cloneBody } = require_body(); var { Headers, fill: fillHeaders, HeadersList } = require_headers(); var { FinalizationRegistry } = require_dispatcher_weakref()(); - var util3 = require_util(); + var util = require_util(); var { isValidHTTPToken, sameOrigin, @@ -12361,7 +12361,7 @@ var require_request2 = __commonJS({ requestCache, requestDuplex } = require_constants2(); - var { kEnumerableProperty } = util3; + var { kEnumerableProperty } = util; var { kHeaders, kSignal, kState, kGuard, kRealm } = require_symbols2(); var { webidl } = require_webidl(); var { getGlobalOrigin } = require_global(); @@ -12392,7 +12392,7 @@ var require_request2 = __commonJS({ policyContainer: makePolicyContainer() } }; - let request3 = null; + let request = null; let fallbackMode = null; const baseUrl = this[kRealm].settingsObject.baseUrl; let signal = null; @@ -12408,17 +12408,17 @@ var require_request2 = __commonJS({ "Request cannot be constructed from a URL that includes credentials: " + input ); } - request3 = makeRequest({ urlList: [parsedURL] }); + request = makeRequest({ urlList: [parsedURL] }); fallbackMode = "cors"; } else { assert3(input instanceof _Request); - request3 = input[kState]; + request = input[kState]; signal = input[kSignal]; } const origin = this[kRealm].settingsObject.origin; let window2 = "client"; - if (request3.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request3.window, origin)) { - window2 = request3.window; + if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) { + window2 = request.window; } if (init.window != null) { throw new TypeError(`'window' option '${window2}' must be null`); @@ -12426,66 +12426,66 @@ var require_request2 = __commonJS({ if ("window" in init) { window2 = "no-window"; } - request3 = makeRequest({ + request = makeRequest({ // URL request’s URL. // undici implementation note: this is set as the first item in request's urlList in makeRequest // method request’s method. - method: request3.method, + method: request.method, // header list A copy of request’s header list. // undici implementation note: headersList is cloned in makeRequest - headersList: request3.headersList, + headersList: request.headersList, // unsafe-request flag Set. - unsafeRequest: request3.unsafeRequest, + unsafeRequest: request.unsafeRequest, // client This’s relevant settings object. client: this[kRealm].settingsObject, // window window. window: window2, // priority request’s priority. - priority: request3.priority, + priority: request.priority, // origin request’s origin. The propagation of the origin is only significant for navigation requests // being handled by a service worker. In this scenario a request can have an origin that is different // from the current client. - origin: request3.origin, + origin: request.origin, // referrer request’s referrer. - referrer: request3.referrer, + referrer: request.referrer, // referrer policy request’s referrer policy. - referrerPolicy: request3.referrerPolicy, + referrerPolicy: request.referrerPolicy, // mode request’s mode. - mode: request3.mode, + mode: request.mode, // credentials mode request’s credentials mode. - credentials: request3.credentials, + credentials: request.credentials, // cache mode request’s cache mode. - cache: request3.cache, + cache: request.cache, // redirect mode request’s redirect mode. - redirect: request3.redirect, + redirect: request.redirect, // integrity metadata request’s integrity metadata. - integrity: request3.integrity, + integrity: request.integrity, // keepalive request’s keepalive. - keepalive: request3.keepalive, + keepalive: request.keepalive, // reload-navigation flag request’s reload-navigation flag. - reloadNavigation: request3.reloadNavigation, + reloadNavigation: request.reloadNavigation, // history-navigation flag request’s history-navigation flag. - historyNavigation: request3.historyNavigation, + historyNavigation: request.historyNavigation, // URL list A clone of request’s URL list. - urlList: [...request3.urlList] + urlList: [...request.urlList] }); const initHasKey = Object.keys(init).length !== 0; if (initHasKey) { - if (request3.mode === "navigate") { - request3.mode = "same-origin"; + if (request.mode === "navigate") { + request.mode = "same-origin"; } - request3.reloadNavigation = false; - request3.historyNavigation = false; - request3.origin = "client"; - request3.referrer = "client"; - request3.referrerPolicy = ""; - request3.url = request3.urlList[request3.urlList.length - 1]; - request3.urlList = [request3.url]; + request.reloadNavigation = false; + request.historyNavigation = false; + request.origin = "client"; + request.referrer = "client"; + request.referrerPolicy = ""; + request.url = request.urlList[request.urlList.length - 1]; + request.urlList = [request.url]; } if (init.referrer !== void 0) { const referrer = init.referrer; if (referrer === "") { - request3.referrer = "no-referrer"; + request.referrer = "no-referrer"; } else { let parsedReferrer; try { @@ -12494,14 +12494,14 @@ var require_request2 = __commonJS({ throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); } if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) { - request3.referrer = "client"; + request.referrer = "client"; } else { - request3.referrer = parsedReferrer; + request.referrer = parsedReferrer; } } } if (init.referrerPolicy !== void 0) { - request3.referrerPolicy = init.referrerPolicy; + request.referrerPolicy = init.referrerPolicy; } let mode; if (init.mode !== void 0) { @@ -12516,27 +12516,27 @@ var require_request2 = __commonJS({ }); } if (mode != null) { - request3.mode = mode; + request.mode = mode; } if (init.credentials !== void 0) { - request3.credentials = init.credentials; + request.credentials = init.credentials; } if (init.cache !== void 0) { - request3.cache = init.cache; + request.cache = init.cache; } - if (request3.cache === "only-if-cached" && request3.mode !== "same-origin") { + if (request.cache === "only-if-cached" && request.mode !== "same-origin") { throw new TypeError( "'only-if-cached' can be set only with 'same-origin' mode" ); } if (init.redirect !== void 0) { - request3.redirect = init.redirect; + request.redirect = init.redirect; } if (init.integrity != null) { - request3.integrity = String(init.integrity); + request.integrity = String(init.integrity); } if (init.keepalive !== void 0) { - request3.keepalive = Boolean(init.keepalive); + request.keepalive = Boolean(init.keepalive); } if (init.method !== void 0) { let method = init.method; @@ -12547,12 +12547,12 @@ var require_request2 = __commonJS({ throw new TypeError(`'${method}' HTTP method is unsupported.`); } method = normalizeMethodRecord[method] ?? normalizeMethod(method); - request3.method = method; + request.method = method; } if (init.signal !== void 0) { signal = init.signal; } - this[kState] = request3; + this[kState] = request; const ac = new AbortController(); this[kSignal] = ac.signal; this[kSignal][kRealm] = this[kRealm]; @@ -12581,18 +12581,18 @@ var require_request2 = __commonJS({ } } catch { } - util3.addAbortListener(signal, abort); + util.addAbortListener(signal, abort); requestFinalizer.register(ac, { signal, abort }); } } this[kHeaders] = new Headers(kConstruct); - this[kHeaders][kHeadersList] = request3.headersList; + this[kHeaders][kHeadersList] = request.headersList; this[kHeaders][kGuard] = "request"; this[kHeaders][kRealm] = this[kRealm]; if (mode === "no-cors") { - if (!corsSafeListedMethodsSet.has(request3.method)) { + if (!corsSafeListedMethodsSet.has(request.method)) { throw new TypeError( - `'${request3.method} is unsupported in no-cors mode.` + `'${request.method} is unsupported in no-cors mode.` ); } this[kHeaders][kGuard] = "request-no-cors"; @@ -12611,18 +12611,18 @@ var require_request2 = __commonJS({ } } const inputBody = input instanceof _Request ? input[kState].body : null; - if ((init.body != null || inputBody != null) && (request3.method === "GET" || request3.method === "HEAD")) { + if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) { throw new TypeError("Request with GET/HEAD method cannot have body."); } let initBody = null; if (init.body != null) { - const [extractedBody, contentType2] = extractBody( + const [extractedBody, contentType] = extractBody( init.body, - request3.keepalive + request.keepalive ); initBody = extractedBody; - if (contentType2 && !this[kHeaders][kHeadersList].contains("content-type")) { - this[kHeaders].append("content-type", contentType2); + if (contentType && !this[kHeaders][kHeadersList].contains("content-type")) { + this[kHeaders].append("content-type", contentType); } } const inputOrInitBody = initBody ?? inputBody; @@ -12630,16 +12630,16 @@ var require_request2 = __commonJS({ if (initBody != null && init.duplex == null) { throw new TypeError("RequestInit: duplex option is required when sending a body."); } - if (request3.mode !== "same-origin" && request3.mode !== "cors") { + if (request.mode !== "same-origin" && request.mode !== "cors") { throw new TypeError( 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' ); } - request3.useCORSPreflightFlag = true; + request.useCORSPreflightFlag = true; } let finalBody = inputOrInitBody; if (initBody == null && inputBody != null) { - if (util3.isDisturbed(inputBody.stream) || inputBody.stream.locked) { + if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) { throw new TypeError( "Cannot construct a Request with a Request object that has already been used." ); @@ -12768,7 +12768,7 @@ var require_request2 = __commonJS({ } get bodyUsed() { webidl.brandCheck(this, _Request); - return !!this[kState].body && util3.isDisturbed(this[kState].body.stream); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); } get duplex() { webidl.brandCheck(this, _Request); @@ -12792,7 +12792,7 @@ var require_request2 = __commonJS({ if (this.signal.aborted) { ac.abort(this.signal.reason); } else { - util3.addAbortListener( + util.addAbortListener( this.signal, () => { ac.abort(this.signal.reason); @@ -12805,7 +12805,7 @@ var require_request2 = __commonJS({ }; mixinBody(Request); function makeRequest(init) { - const request3 = { + const request = { method: "GET", localURLsOnly: false, unsafeRequest: false, @@ -12844,13 +12844,13 @@ var require_request2 = __commonJS({ ...init, headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() }; - request3.url = request3.urlList[0]; - return request3; + request.url = request.urlList[0]; + return request; } - function cloneRequest(request3) { - const newRequest = makeRequest({ ...request3, body: null }); - if (request3.body != null) { - newRequest.body = cloneBody(request3.body); + function cloneRequest(request) { + const newRequest = makeRequest({ ...request, body: null }); + if (request.body != null) { + newRequest.body = cloneBody(request.body); } return newRequest; } @@ -12988,7 +12988,7 @@ var require_fetch = __commonJS({ } = require_response(); var { Headers } = require_headers(); var { Request, makeRequest } = require_request2(); - var zlib2 = require("zlib"); + var zlib = require("zlib"); var { bytesMatch, makePolicyContainer, @@ -13032,7 +13032,7 @@ var require_fetch = __commonJS({ } = require_constants2(); var { kHeadersList } = require_symbols(); var EE = require("events"); - var { Readable: Readable5, pipeline } = require("stream"); + var { Readable, pipeline } = require("stream"); var { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = require_util(); var { dataURLProcessor, serializeAMimeType } = require_dataURL(); var { TransformStream } = require("stream/web"); @@ -13083,14 +13083,14 @@ var require_fetch = __commonJS({ p.reject(e); return p.promise; } - const request3 = requestObject[kState]; + const request = requestObject[kState]; if (requestObject.signal.aborted) { - abortFetch(p, request3, null, requestObject.signal.reason); + abortFetch(p, request, null, requestObject.signal.reason); return p.promise; } - const globalObject = request3.client.globalObject; + const globalObject = request.client.globalObject; if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") { - request3.serviceWorkers = "none"; + request.serviceWorkers = "none"; } let responseObject = null; const relevantRealm = null; @@ -13102,7 +13102,7 @@ var require_fetch = __commonJS({ locallyAborted = true; assert3(controller != null); controller.abort(requestObject.signal.reason); - abortFetch(p, request3, responseObject, requestObject.signal.reason); + abortFetch(p, request, responseObject, requestObject.signal.reason); } ); const handleFetchDone = (response) => finalizeAndReportTiming(response, "fetch"); @@ -13111,7 +13111,7 @@ var require_fetch = __commonJS({ return Promise.resolve(); } if (response.aborted) { - abortFetch(p, request3, responseObject, controller.serializedAbortReason); + abortFetch(p, request, responseObject, controller.serializedAbortReason); return Promise.resolve(); } if (response.type === "error") { @@ -13129,7 +13129,7 @@ var require_fetch = __commonJS({ p.resolve(responseObject); }; controller = fetching({ - request: request3, + request, processResponseEndOfBody: handleFetchDone, processResponse, dispatcher: init.dispatcher ?? getGlobalDispatcher() @@ -13174,13 +13174,13 @@ var require_fetch = __commonJS({ performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis2, cacheState); } } - function abortFetch(p, request3, responseObject, error3) { + function abortFetch(p, request, responseObject, error3) { if (!error3) { error3 = new DOMException2("The operation was aborted.", "AbortError"); } p.reject(error3); - if (request3.body != null && isReadable(request3.body?.stream)) { - request3.body.stream.cancel(error3).catch((err) => { + if (request.body != null && isReadable(request.body?.stream)) { + request.body.stream.cancel(error3).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13201,7 +13201,7 @@ var require_fetch = __commonJS({ } } function fetching({ - request: request3, + request, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, @@ -13213,9 +13213,9 @@ var require_fetch = __commonJS({ }) { let taskDestination = null; let crossOriginIsolatedCapability = false; - if (request3.client != null) { - taskDestination = request3.client.globalObject; - crossOriginIsolatedCapability = request3.client.crossOriginIsolatedCapability; + if (request.client != null) { + taskDestination = request.client.globalObject; + crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; } const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); const timingInfo = createOpaqueTimingInfo({ @@ -13223,7 +13223,7 @@ var require_fetch = __commonJS({ }); const fetchParams = { controller: new Fetch(dispatcher), - request: request3, + request, timingInfo, processRequestBodyChunkLength, processRequestEndOfBody, @@ -13233,32 +13233,32 @@ var require_fetch = __commonJS({ taskDestination, crossOriginIsolatedCapability }; - assert3(!request3.body || request3.body.stream); - if (request3.window === "client") { - request3.window = request3.client?.globalObject?.constructor?.name === "Window" ? request3.client : "no-window"; + assert3(!request.body || request.body.stream); + if (request.window === "client") { + request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; } - if (request3.origin === "client") { - request3.origin = request3.client?.origin; + if (request.origin === "client") { + request.origin = request.client?.origin; } - if (request3.policyContainer === "client") { - if (request3.client != null) { - request3.policyContainer = clonePolicyContainer( - request3.client.policyContainer + if (request.policyContainer === "client") { + if (request.client != null) { + request.policyContainer = clonePolicyContainer( + request.client.policyContainer ); } else { - request3.policyContainer = makePolicyContainer(); + request.policyContainer = makePolicyContainer(); } } - if (!request3.headersList.contains("accept")) { + if (!request.headersList.contains("accept")) { const value = "*/*"; - request3.headersList.append("accept", value); + request.headersList.append("accept", value); } - if (!request3.headersList.contains("accept-language")) { - request3.headersList.append("accept-language", "*"); + if (!request.headersList.contains("accept-language")) { + request.headersList.append("accept-language", "*"); } - if (request3.priority === null) { + if (request.priority === null) { } - if (subresourceSet.has(request3.destination)) { + if (subresourceSet.has(request.destination)) { } mainFetch(fetchParams).catch((err) => { fetchParams.controller.terminate(err); @@ -13266,50 +13266,50 @@ var require_fetch = __commonJS({ return fetchParams.controller; } async function mainFetch(fetchParams, recursive = false) { - const request3 = fetchParams.request; + const request = fetchParams.request; let response = null; - if (request3.localURLsOnly && !urlIsLocal(requestCurrentURL(request3))) { + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { response = makeNetworkError("local URLs only"); } - tryUpgradeRequestToAPotentiallyTrustworthyURL(request3); - if (requestBadPort(request3) === "blocked") { + tryUpgradeRequestToAPotentiallyTrustworthyURL(request); + if (requestBadPort(request) === "blocked") { response = makeNetworkError("bad port"); } - if (request3.referrerPolicy === "") { - request3.referrerPolicy = request3.policyContainer.referrerPolicy; + if (request.referrerPolicy === "") { + request.referrerPolicy = request.policyContainer.referrerPolicy; } - if (request3.referrer !== "no-referrer") { - request3.referrer = determineRequestsReferrer(request3); + if (request.referrer !== "no-referrer") { + request.referrer = determineRequestsReferrer(request); } if (response === null) { response = await (async () => { - const currentURL = requestCurrentURL(request3); + const currentURL = requestCurrentURL(request); if ( // - request’s current URL’s origin is same origin with request’s origin, // and request’s response tainting is "basic" - sameOrigin(currentURL, request3.url) && request3.responseTainting === "basic" || // request’s current URL’s scheme is "data" + sameOrigin(currentURL, request.url) && request.responseTainting === "basic" || // request’s current URL’s scheme is "data" currentURL.protocol === "data:" || // - request’s mode is "navigate" or "websocket" - (request3.mode === "navigate" || request3.mode === "websocket") + (request.mode === "navigate" || request.mode === "websocket") ) { - request3.responseTainting = "basic"; + request.responseTainting = "basic"; return await schemeFetch(fetchParams); } - if (request3.mode === "same-origin") { + if (request.mode === "same-origin") { return makeNetworkError('request mode cannot be "same-origin"'); } - if (request3.mode === "no-cors") { - if (request3.redirect !== "follow") { + if (request.mode === "no-cors") { + if (request.redirect !== "follow") { return makeNetworkError( 'redirect mode cannot be "follow" for "no-cors" request' ); } - request3.responseTainting = "opaque"; + request.responseTainting = "opaque"; return await schemeFetch(fetchParams); } - if (!urlIsHttpHttpsScheme(requestCurrentURL(request3))) { + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { return makeNetworkError("URL scheme must be a HTTP(S) scheme"); } - request3.responseTainting = "cors"; + request.responseTainting = "cors"; return await httpFetch(fetchParams); })(); } @@ -13317,13 +13317,13 @@ var require_fetch = __commonJS({ return response; } if (response.status !== 0 && !response.internalResponse) { - if (request3.responseTainting === "cors") { + if (request.responseTainting === "cors") { } - if (request3.responseTainting === "basic") { + if (request.responseTainting === "basic") { response = filterResponse(response, "basic"); - } else if (request3.responseTainting === "cors") { + } else if (request.responseTainting === "cors") { response = filterResponse(response, "cors"); - } else if (request3.responseTainting === "opaque") { + } else if (request.responseTainting === "opaque") { response = filterResponse(response, "opaque"); } else { assert3(false); @@ -13331,26 +13331,26 @@ var require_fetch = __commonJS({ } let internalResponse = response.status === 0 ? response : response.internalResponse; if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request3.urlList); + internalResponse.urlList.push(...request.urlList); } - if (!request3.timingAllowFailed) { + if (!request.timingAllowFailed) { response.timingAllowPassed = true; } - if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request3.headers.contains("range")) { + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range")) { response = internalResponse = makeNetworkError(); } - if (response.status !== 0 && (request3.method === "HEAD" || request3.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + if (response.status !== 0 && (request.method === "HEAD" || request.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { internalResponse.body = null; fetchParams.controller.dump = true; } - if (request3.integrity) { + if (request.integrity) { const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); - if (request3.responseTainting === "opaque" || response.body == null) { + if (request.responseTainting === "opaque" || response.body == null) { processBodyError(response.error); return; } const processBody = (bytes) => { - if (!bytesMatch(bytes, request3.integrity)) { + if (!bytesMatch(bytes, request.integrity)) { processBodyError("integrity mismatch"); return; } @@ -13366,8 +13366,8 @@ var require_fetch = __commonJS({ if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { return Promise.resolve(makeAppropriateNetworkError(fetchParams)); } - const { request: request3 } = fetchParams; - const { protocol: scheme } = requestCurrentURL(request3); + const { request } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request); switch (scheme) { case "about:": { return Promise.resolve(makeNetworkError("about scheme is not supported")); @@ -13376,30 +13376,30 @@ var require_fetch = __commonJS({ if (!resolveObjectURL) { resolveObjectURL = require("buffer").resolveObjectURL; } - const blobURLEntry = requestCurrentURL(request3); + const blobURLEntry = requestCurrentURL(request); if (blobURLEntry.search.length !== 0) { return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); } const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()); - if (request3.method !== "GET" || !isBlobLike(blobURLEntryObject)) { + if (request.method !== "GET" || !isBlobLike(blobURLEntryObject)) { return Promise.resolve(makeNetworkError("invalid method")); } const bodyWithType = safelyExtractBody(blobURLEntryObject); - const body2 = bodyWithType[0]; - const length = isomorphicEncode(`${body2.length}`); - const type2 = bodyWithType[1] ?? ""; + const body = bodyWithType[0]; + const length = isomorphicEncode(`${body.length}`); + const type = bodyWithType[1] ?? ""; const response = makeResponse({ statusText: "OK", headersList: [ ["content-length", { name: "Content-Length", value: length }], - ["content-type", { name: "Content-Type", value: type2 }] + ["content-type", { name: "Content-Type", value: type }] ] }); - response.body = body2; + response.body = body; return Promise.resolve(response); } case "data:": { - const currentURL = requestCurrentURL(request3); + const currentURL = requestCurrentURL(request); const dataURLStruct = dataURLProcessor(currentURL); if (dataURLStruct === "failure") { return Promise.resolve(makeNetworkError("failed to fetch the data URL")); @@ -13481,41 +13481,41 @@ var require_fetch = __commonJS({ } } async function httpFetch(fetchParams) { - const request3 = fetchParams.request; + const request = fetchParams.request; let response = null; let actualResponse = null; const timingInfo = fetchParams.timingInfo; - if (request3.serviceWorkers === "all") { + if (request.serviceWorkers === "all") { } if (response === null) { - if (request3.redirect === "follow") { - request3.serviceWorkers = "none"; + if (request.redirect === "follow") { + request.serviceWorkers = "none"; } actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); - if (request3.responseTainting === "cors" && corsCheck(request3, response) === "failure") { + if (request.responseTainting === "cors" && corsCheck(request, response) === "failure") { return makeNetworkError("cors failure"); } - if (TAOCheck(request3, response) === "failure") { - request3.timingAllowFailed = true; + if (TAOCheck(request, response) === "failure") { + request.timingAllowFailed = true; } } - if ((request3.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck( - request3.origin, - request3.client, - request3.destination, + if ((request.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck( + request.origin, + request.client, + request.destination, actualResponse ) === "blocked") { return makeNetworkError("blocked"); } if (redirectStatusSet.has(actualResponse.status)) { - if (request3.redirect !== "manual") { + if (request.redirect !== "manual") { fetchParams.controller.connection.destroy(); } - if (request3.redirect === "error") { + if (request.redirect === "error") { response = makeNetworkError("unexpected redirect"); - } else if (request3.redirect === "manual") { + } else if (request.redirect === "manual") { response = actualResponse; - } else if (request3.redirect === "follow") { + } else if (request.redirect === "follow") { response = await httpRedirectFetch(fetchParams, response); } else { assert3(false); @@ -13525,13 +13525,13 @@ var require_fetch = __commonJS({ return response; } function httpRedirectFetch(fetchParams, response) { - const request3 = fetchParams.request; + const request = fetchParams.request; const actualResponse = response.internalResponse ? response.internalResponse : response; let locationURL; try { locationURL = responseLocationURL( actualResponse, - requestCurrentURL(request3).hash + requestCurrentURL(request).hash ); if (locationURL == null) { return response; @@ -13542,75 +13542,75 @@ var require_fetch = __commonJS({ if (!urlIsHttpHttpsScheme(locationURL)) { return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); } - if (request3.redirectCount === 20) { + if (request.redirectCount === 20) { return Promise.resolve(makeNetworkError("redirect count exceeded")); } - request3.redirectCount += 1; - if (request3.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request3, locationURL)) { + request.redirectCount += 1; + if (request.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL)) { return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')); } - if (request3.responseTainting === "cors" && (locationURL.username || locationURL.password)) { + if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) { return Promise.resolve(makeNetworkError( 'URL cannot contain credentials for request mode "cors"' )); } - if (actualResponse.status !== 303 && request3.body != null && request3.body.source == null) { + if (actualResponse.status !== 303 && request.body != null && request.body.source == null) { return Promise.resolve(makeNetworkError()); } - if ([301, 302].includes(actualResponse.status) && request3.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request3.method)) { - request3.method = "GET"; - request3.body = null; + if ([301, 302].includes(actualResponse.status) && request.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request.method)) { + request.method = "GET"; + request.body = null; for (const headerName of requestBodyHeader) { - request3.headersList.delete(headerName); + request.headersList.delete(headerName); } } - if (!sameOrigin(requestCurrentURL(request3), locationURL)) { - request3.headersList.delete("authorization"); - request3.headersList.delete("proxy-authorization", true); - request3.headersList.delete("cookie"); - request3.headersList.delete("host"); + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + request.headersList.delete("authorization"); + request.headersList.delete("proxy-authorization", true); + request.headersList.delete("cookie"); + request.headersList.delete("host"); } - if (request3.body != null) { - assert3(request3.body.source != null); - request3.body = safelyExtractBody(request3.body.source)[0]; + if (request.body != null) { + assert3(request.body.source != null); + request.body = safelyExtractBody(request.body.source)[0]; } const timingInfo = fetchParams.timingInfo; timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); if (timingInfo.redirectStartTime === 0) { timingInfo.redirectStartTime = timingInfo.startTime; } - request3.urlList.push(locationURL); - setRequestReferrerPolicyOnRedirect(request3, actualResponse); + request.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request, actualResponse); return mainFetch(fetchParams, true); } async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { - const request3 = fetchParams.request; + const request = fetchParams.request; let httpFetchParams = null; let httpRequest = null; let response = null; const httpCache = null; const revalidatingFlag = false; - if (request3.window === "no-window" && request3.redirect === "error") { + if (request.window === "no-window" && request.redirect === "error") { httpFetchParams = fetchParams; - httpRequest = request3; + httpRequest = request; } else { - httpRequest = makeRequest(request3); + httpRequest = makeRequest(request); httpFetchParams = { ...fetchParams }; httpFetchParams.request = httpRequest; } - const includeCredentials = request3.credentials === "include" || request3.credentials === "same-origin" && request3.responseTainting === "basic"; - const contentLength2 = httpRequest.body ? httpRequest.body.length : null; + const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; + const contentLength = httpRequest.body ? httpRequest.body.length : null; let contentLengthHeaderValue = null; if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) { contentLengthHeaderValue = "0"; } - if (contentLength2 != null) { - contentLengthHeaderValue = isomorphicEncode(`${contentLength2}`); + if (contentLength != null) { + contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); } if (contentLengthHeaderValue != null) { httpRequest.headersList.append("content-length", contentLengthHeaderValue); } - if (contentLength2 != null && httpRequest.keepalive) { + if (contentLength != null && httpRequest.keepalive) { } if (httpRequest.referrer instanceof URL) { httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href)); @@ -13675,7 +13675,7 @@ var require_fetch = __commonJS({ } response.requestIncludesCredentials = includeCredentials; if (response.status === 407) { - if (request3.window === "no-window") { + if (request.window === "no-window") { return makeNetworkError(); } if (isCancelled(fetchParams)) { @@ -13687,7 +13687,7 @@ var require_fetch = __commonJS({ // response’s status is 421 response.status === 421 && // isNewConnectionFetch is false !isNewConnectionFetch && // request’s body is null, or request’s body is non-null and request’s body’s source is non-null - (request3.body == null || request3.body.source != null) + (request.body == null || request.body.source != null) ) { if (isCancelled(fetchParams)) { return makeAppropriateNetworkError(fetchParams); @@ -13715,21 +13715,21 @@ var require_fetch = __commonJS({ } } }; - const request3 = fetchParams.request; + const request = fetchParams.request; let response = null; const timingInfo = fetchParams.timingInfo; const httpCache = null; if (httpCache == null) { - request3.cache = "no-store"; + request.cache = "no-store"; } const newConnection = forceNewConnection ? "yes" : "no"; - if (request3.mode === "websocket") { + if (request.mode === "websocket") { } else { } let requestBody = null; - if (request3.body == null && fetchParams.processRequestEndOfBody) { + if (request.body == null && fetchParams.processRequestEndOfBody) { queueMicrotask(() => fetchParams.processRequestEndOfBody()); - } else if (request3.body != null) { + } else if (request.body != null) { const processBodyChunk = async function* (bytes) { if (isCancelled(fetchParams)) { return; @@ -13757,7 +13757,7 @@ var require_fetch = __commonJS({ }; requestBody = async function* () { try { - for await (const bytes of request3.body.stream) { + for await (const bytes of request.body.stream) { yield* processBodyChunk(bytes); } processEndOfBody(); @@ -13767,11 +13767,11 @@ var require_fetch = __commonJS({ }(); } try { - const { body: body2, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); if (socket) { response = makeResponse({ status, statusText, headersList, socket }); } else { - const iterator = body2[Symbol.asyncIterator](); + const iterator = body[Symbol.asyncIterator](); fetchParams.controller.next = () => iterator.next(); response = makeResponse({ status, statusText, headersList }); } @@ -13868,18 +13868,18 @@ var require_fetch = __commonJS({ fetchParams.controller.connection.destroy(); } return response; - async function dispatch({ body: body2 }) { - const url2 = requestCurrentURL(request3); + async function dispatch({ body }) { + const url = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; return new Promise((resolve, reject) => agent.dispatch( { - path: url2.pathname + url2.search, - origin: url2.origin, - method: request3.method, - body: fetchParams.controller.dispatcher.isMockActive ? request3.body && (request3.body.source || request3.body.stream) : body2, - headers: request3.headersList.entries, + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, maxRedirections: 0, - upgrade: request3.mode === "websocket" ? "websocket" : void 0 + upgrade: request.mode === "websocket" ? "websocket" : void 0 }, { body: null, @@ -13923,24 +13923,24 @@ var require_fetch = __commonJS({ headers[kHeadersList].append(key, val); } } - this.body = new Readable5({ read: resume }); + this.body = new Readable({ read: resume }); const decoders = []; - const willFollow = request3.redirect === "follow" && location && redirectStatusSet.has(status); - if (request3.method !== "HEAD" && request3.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { + const willFollow = request.redirect === "follow" && location && redirectStatusSet.has(status); + if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { for (const coding of codings) { if (coding === "x-gzip" || coding === "gzip") { - decoders.push(zlib2.createGunzip({ + decoders.push(zlib.createGunzip({ // Be less strict when decoding compressed responses, since sometimes // servers send slightly invalid responses that are still accepted // by common browsers. // Always using Z_SYNC_FLUSH is what cURL does. - flush: zlib2.constants.Z_SYNC_FLUSH, - finishFlush: zlib2.constants.Z_SYNC_FLUSH + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH })); } else if (coding === "deflate") { - decoders.push(zlib2.createInflate()); + decoders.push(zlib.createInflate()); } else if (coding === "br") { - decoders.push(zlib2.createBrotliDecompress()); + decoders.push(zlib.createBrotliDecompress()); } else { decoders.length = 0; break; @@ -14033,10 +14033,10 @@ var require_progressevent = __commonJS({ var { webidl } = require_webidl(); var kState = Symbol("ProgressEvent state"); var ProgressEvent = class _ProgressEvent extends Event { - constructor(type2, eventInitDict = {}) { - type2 = webidl.converters.DOMString(type2); + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type); eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); - super(type2, eventInitDict); + super(type, eventInitDict); this[kState] = { lengthComputable: eventInitDict.lengthComputable, loaded: eventInitDict.loaded, @@ -14403,7 +14403,7 @@ var require_util4 = __commonJS({ writable: false, configurable: false }; - function readOperation(fr, blob, type2, encodingName) { + function readOperation(fr, blob, type, encodingName) { if (fr[kState] === "loading") { throw new DOMException2("Invalid state", "InvalidStateError"); } @@ -14438,7 +14438,7 @@ var require_util4 = __commonJS({ queueMicrotask(() => { fr[kState] = "done"; try { - const result = packageData(bytes, type2, blob.type, encodingName); + const result = packageData(bytes, type, blob.type, encodingName); if (fr[kAborted]) { return; } @@ -14478,8 +14478,8 @@ var require_util4 = __commonJS({ }); reader.dispatchEvent(event); } - function packageData(bytes, type2, mimeType, encodingName) { - switch (type2) { + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { case "DataURL": { let dataURL = "data:"; const parsed = parseMIMEType(mimeType || "application/octet-stream"); @@ -14500,15 +14500,15 @@ var require_util4 = __commonJS({ encoding = getEncoding(encodingName); } if (encoding === "failure" && mimeType) { - const type3 = parseMIMEType(mimeType); - if (type3 !== "failure") { - encoding = getEncoding(type3.parameters.get("charset")); + const type2 = parseMIMEType(mimeType); + if (type2 !== "failure") { + encoding = getEncoding(type2.parameters.get("charset")); } } if (encoding === "failure") { encoding = "UTF-8"; } - return decode(bytes, encoding); + return decode2(bytes, encoding); } case "ArrayBuffer": { const sequence = combineByteSequences(bytes); @@ -14525,7 +14525,7 @@ var require_util4 = __commonJS({ } } } - function decode(ioQueue, encoding) { + function decode2(ioQueue, encoding) { const bytes = combineByteSequences(ioQueue); const BOMEncoding = BOMSniffing(bytes); let slice = 0; @@ -14898,34 +14898,34 @@ var require_cache = __commonJS({ } __privateSet(this, _relevantRequestResponseList, arguments[1]); } - async match(request3, options2 = {}) { + async match(request, options2 = {}) { webidl.brandCheck(this, _Cache); webidl.argumentLengthCheck(arguments, 1, { header: "Cache.match" }); - request3 = webidl.converters.RequestInfo(request3); + request = webidl.converters.RequestInfo(request); options2 = webidl.converters.CacheQueryOptions(options2); - const p = await this.matchAll(request3, options2); + const p = await this.matchAll(request, options2); if (p.length === 0) { return; } return p[0]; } - async matchAll(request3 = void 0, options2 = {}) { + async matchAll(request = void 0, options2 = {}) { webidl.brandCheck(this, _Cache); - if (request3 !== void 0) request3 = webidl.converters.RequestInfo(request3); + if (request !== void 0) request = webidl.converters.RequestInfo(request); options2 = webidl.converters.CacheQueryOptions(options2); let r = null; - if (request3 !== void 0) { - if (request3 instanceof Request) { - r = request3[kState]; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; if (r.method !== "GET" && !options2.ignoreMethod) { return []; } - } else if (typeof request3 === "string") { - r = new Request(request3)[kState]; + } else if (typeof request === "string") { + r = new Request(request)[kState]; } } const responses = []; - if (request3 === void 0) { + if (request === void 0) { for (const requestResponse of __privateGet(this, _relevantRequestResponseList)) { responses.push(requestResponse[1]); } @@ -14938,20 +14938,20 @@ var require_cache = __commonJS({ const responseList = []; for (const response of responses) { const responseObject = new Response(response.body?.source ?? null); - const body2 = responseObject[kState].body; + const body = responseObject[kState].body; responseObject[kState] = response; - responseObject[kState].body = body2; + responseObject[kState].body = body; responseObject[kHeaders][kHeadersList] = response.headersList; responseObject[kHeaders][kGuard] = "immutable"; responseList.push(responseObject); } return Object.freeze(responseList); } - async add(request3) { + async add(request) { webidl.brandCheck(this, _Cache); webidl.argumentLengthCheck(arguments, 1, { header: "Cache.add" }); - request3 = webidl.converters.RequestInfo(request3); - const requests = [request3]; + request = webidl.converters.RequestInfo(request); + const requests = [request]; const responseArrayPromise = this.addAll(requests); return await responseArrayPromise; } @@ -14961,11 +14961,11 @@ var require_cache = __commonJS({ requests = webidl.converters["sequence"](requests); const responsePromises = []; const requestList = []; - for (const request3 of requests) { - if (typeof request3 === "string") { + for (const request of requests) { + if (typeof request === "string") { continue; } - const r = request3[kState]; + const r = request[kState]; if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") { throw webidl.errors.exception({ header: "Cache.addAll", @@ -14974,8 +14974,8 @@ var require_cache = __commonJS({ } } const fetchControllers = []; - for (const request3 of requests) { - const r = new Request(request3)[kState]; + for (const request of requests) { + const r = new Request(request)[kState]; if (!urlIsHttpHttpsScheme(r.url)) { throw webidl.errors.exception({ header: "Cache.addAll", @@ -15053,16 +15053,16 @@ var require_cache = __commonJS({ }); return cacheJobPromise.promise; } - async put(request3, response) { + async put(request, response) { webidl.brandCheck(this, _Cache); webidl.argumentLengthCheck(arguments, 2, { header: "Cache.put" }); - request3 = webidl.converters.RequestInfo(request3); + request = webidl.converters.RequestInfo(request); response = webidl.converters.Response(response); let innerRequest = null; - if (request3 instanceof Request) { - innerRequest = request3[kState]; + if (request instanceof Request) { + innerRequest = request[kState]; } else { - innerRequest = new Request(request3)[kState]; + innerRequest = new Request(request)[kState]; } if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") { throw webidl.errors.exception({ @@ -15133,20 +15133,20 @@ var require_cache = __commonJS({ }); return cacheJobPromise.promise; } - async delete(request3, options2 = {}) { + async delete(request, options2 = {}) { webidl.brandCheck(this, _Cache); webidl.argumentLengthCheck(arguments, 1, { header: "Cache.delete" }); - request3 = webidl.converters.RequestInfo(request3); + request = webidl.converters.RequestInfo(request); options2 = webidl.converters.CacheQueryOptions(options2); let r = null; - if (request3 instanceof Request) { - r = request3[kState]; + if (request instanceof Request) { + r = request[kState]; if (r.method !== "GET" && !options2.ignoreMethod) { return false; } } else { - assert3(typeof request3 === "string"); - r = new Request(request3)[kState]; + assert3(typeof request === "string"); + r = new Request(request)[kState]; } const operations = []; const operation = { @@ -15178,24 +15178,24 @@ var require_cache = __commonJS({ * @param {import('../../types/cache').CacheQueryOptions} options * @returns {readonly Request[]} */ - async keys(request3 = void 0, options2 = {}) { + async keys(request = void 0, options2 = {}) { webidl.brandCheck(this, _Cache); - if (request3 !== void 0) request3 = webidl.converters.RequestInfo(request3); + if (request !== void 0) request = webidl.converters.RequestInfo(request); options2 = webidl.converters.CacheQueryOptions(options2); let r = null; - if (request3 !== void 0) { - if (request3 instanceof Request) { - r = request3[kState]; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; if (r.method !== "GET" && !options2.ignoreMethod) { return []; } - } else if (typeof request3 === "string") { - r = new Request(request3)[kState]; + } else if (typeof request === "string") { + r = new Request(request)[kState]; } } const promise = createDeferredPromise(); const requests = []; - if (request3 === void 0) { + if (request === void 0) { for (const requestResponse of __privateGet(this, _relevantRequestResponseList)) { requests.push(requestResponse[0]); } @@ -15207,12 +15207,12 @@ var require_cache = __commonJS({ } queueMicrotask(() => { const requestList = []; - for (const request4 of requests) { + for (const request2 of requests) { const requestObject = new Request("https://a"); - requestObject[kState] = request4; - requestObject[kHeaders][kHeadersList] = request4.headersList; + requestObject[kState] = request2; + requestObject[kHeaders][kHeadersList] = request2.headersList; requestObject[kHeaders][kGuard] = "immutable"; - requestObject[kRealm] = request4.client; + requestObject[kRealm] = request2.client; requestList.push(requestObject); } promise.resolve(Object.freeze(requestList)); @@ -15330,9 +15330,9 @@ var require_cache = __commonJS({ * @param {import('../../types/cache').CacheQueryOptions | undefined} options * @returns {boolean} */ - requestMatchesCachedItem_fn = function(requestQuery, request3, response = null, options2) { + requestMatchesCachedItem_fn = function(requestQuery, request, response = null, options2) { const queryURL = new URL(requestQuery.url); - const cachedURL = new URL(request3.url); + const cachedURL = new URL(request.url); if (options2?.ignoreSearch) { cachedURL.search = ""; queryURL.search = ""; @@ -15348,7 +15348,7 @@ var require_cache = __commonJS({ if (fieldValue === "*") { return false; } - const requestValue = request3.headersList.get(fieldValue); + const requestValue = request.headersList.get(fieldValue); const queryValue = requestQuery.headersList.get(fieldValue); if (requestValue !== queryValue) { return false; @@ -15425,21 +15425,21 @@ var require_cachestorage = __commonJS({ webidl.illegalConstructor(); } } - async match(request3, options2 = {}) { + async match(request, options2 = {}) { webidl.brandCheck(this, _CacheStorage); webidl.argumentLengthCheck(arguments, 1, { header: "CacheStorage.match" }); - request3 = webidl.converters.RequestInfo(request3); + request = webidl.converters.RequestInfo(request); options2 = webidl.converters.MultiCacheQueryOptions(options2); if (options2.cacheName != null) { if (__privateGet(this, _caches).has(options2.cacheName)) { const cacheList = __privateGet(this, _caches).get(options2.cacheName); const cache2 = new Cache(kConstruct, cacheList); - return await cache2.match(request3, options2); + return await cache2.match(request, options2); } } else { for (const cacheList of __privateGet(this, _caches).values()) { const cache2 = new Cache(kConstruct, cacheList); - const response = await cache2.match(request3, options2); + const response = await cache2.match(request, options2); if (response !== void 0) { return response; } @@ -16010,11 +16010,11 @@ var require_events = __commonJS({ var { MessagePort } = require("worker_threads"); var _eventInit; var _MessageEvent = class _MessageEvent extends Event { - constructor(type2, eventInitDict = {}) { + constructor(type, eventInitDict = {}) { webidl.argumentLengthCheck(arguments, 1, { header: "MessageEvent constructor" }); - type2 = webidl.converters.DOMString(type2); + type = webidl.converters.DOMString(type); eventInitDict = webidl.converters.MessageEventInit(eventInitDict); - super(type2, eventInitDict); + super(type, eventInitDict); __privateAdd(this, _eventInit); __privateSet(this, _eventInit, eventInitDict); } @@ -16041,10 +16041,10 @@ var require_events = __commonJS({ } return __privateGet(this, _eventInit).ports; } - initMessageEvent(type2, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { webidl.brandCheck(this, _MessageEvent); webidl.argumentLengthCheck(arguments, 1, { header: "MessageEvent.initMessageEvent" }); - return new _MessageEvent(type2, { + return new _MessageEvent(type, { bubbles, cancelable, data, @@ -16059,11 +16059,11 @@ var require_events = __commonJS({ var MessageEvent = _MessageEvent; var _eventInit2; var _CloseEvent = class _CloseEvent extends Event { - constructor(type2, eventInitDict = {}) { + constructor(type, eventInitDict = {}) { webidl.argumentLengthCheck(arguments, 1, { header: "CloseEvent constructor" }); - type2 = webidl.converters.DOMString(type2); + type = webidl.converters.DOMString(type); eventInitDict = webidl.converters.CloseEventInit(eventInitDict); - super(type2, eventInitDict); + super(type, eventInitDict); __privateAdd(this, _eventInit2); __privateSet(this, _eventInit2, eventInitDict); } @@ -16084,11 +16084,11 @@ var require_events = __commonJS({ var CloseEvent = _CloseEvent; var _eventInit3; var _ErrorEvent = class _ErrorEvent extends Event { - constructor(type2, eventInitDict) { + constructor(type, eventInitDict) { webidl.argumentLengthCheck(arguments, 1, { header: "ErrorEvent constructor" }); - super(type2, eventInitDict); + super(type, eventInitDict); __privateAdd(this, _eventInit3); - type2 = webidl.converters.DOMString(type2); + type = webidl.converters.DOMString(type); eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); __privateSet(this, _eventInit3, eventInitDict); } @@ -16273,19 +16273,19 @@ var require_util7 = __commonJS({ const event = new eventConstructor(e, eventInitDict); target.dispatchEvent(event); } - function websocketMessageReceived(ws, type2, data) { + function websocketMessageReceived(ws, type, data) { if (ws[kReadyState] !== states.OPEN) { return; } let dataForEvent; - if (type2 === opcodes.TEXT) { + if (type === opcodes.TEXT) { try { dataForEvent = new TextDecoder("utf-8", { fatal: true }).decode(data); } catch { failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); return; } - } else if (type2 === opcodes.BINARY) { + } else if (type === opcodes.BINARY) { if (ws[kBinaryType] === "blob") { dataForEvent = new Blob([data]); } else { @@ -16371,10 +16371,10 @@ var require_connection = __commonJS({ crypto = require("crypto"); } catch { } - function establishWebSocketConnection(url2, protocols, ws, onEstablish, options2) { - const requestURL = url2; - requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:"; - const request3 = makeRequest({ + function establishWebSocketConnection(url, protocols, ws, onEstablish, options2) { + const requestURL = url; + requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + const request = makeRequest({ urlList: [requestURL], serviceWorkers: "none", referrer: "no-referrer", @@ -16385,17 +16385,17 @@ var require_connection = __commonJS({ }); if (options2.headers) { const headersList = new Headers(options2.headers)[kHeadersList]; - request3.headersList = headersList; + request.headersList = headersList; } const keyValue = crypto.randomBytes(16).toString("base64"); - request3.headersList.append("sec-websocket-key", keyValue); - request3.headersList.append("sec-websocket-version", "13"); + request.headersList.append("sec-websocket-key", keyValue); + request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { - request3.headersList.append("sec-websocket-protocol", protocol); + request.headersList.append("sec-websocket-protocol", protocol); } const permessageDeflate = ""; const controller = fetching({ - request: request3, + request, useParallelQueue: true, dispatcher: options2.dispatcher ?? getGlobalDispatcher(), processResponse(response) { @@ -16427,7 +16427,7 @@ var require_connection = __commonJS({ return; } const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); - if (secProtocol !== null && secProtocol !== request3.headersList.get("Sec-WebSocket-Protocol")) { + if (secProtocol !== null && secProtocol !== request.headersList.get("Sec-WebSocket-Protocol")) { failWebsocketConnection(ws, "Protocol was not set in the opening handshake."); return; } @@ -16520,26 +16520,26 @@ var require_frame = __commonJS({ offset += 2; payloadLength = 126; } - const buffer2 = Buffer.allocUnsafe(bodyLength + offset); - buffer2[0] = buffer2[1] = 0; - buffer2[0] |= 128; - buffer2[0] = (buffer2[0] & 240) + opcode; - buffer2[offset - 4] = this.maskKey[0]; - buffer2[offset - 3] = this.maskKey[1]; - buffer2[offset - 2] = this.maskKey[2]; - buffer2[offset - 1] = this.maskKey[3]; - buffer2[1] = payloadLength; + const buffer = Buffer.allocUnsafe(bodyLength + offset); + buffer[0] = buffer[1] = 0; + buffer[0] |= 128; + buffer[0] = (buffer[0] & 240) + opcode; + buffer[offset - 4] = this.maskKey[0]; + buffer[offset - 3] = this.maskKey[1]; + buffer[offset - 2] = this.maskKey[2]; + buffer[offset - 1] = this.maskKey[3]; + buffer[1] = payloadLength; if (payloadLength === 126) { - buffer2.writeUInt16BE(bodyLength, 2); + buffer.writeUInt16BE(bodyLength, 2); } else if (payloadLength === 127) { - buffer2[2] = buffer2[3] = 0; - buffer2.writeUIntBE(bodyLength, 4, 6); + buffer[2] = buffer[3] = 0; + buffer.writeUIntBE(bodyLength, 4, 6); } - buffer2[1] |= 128; + buffer[1] |= 128; for (let i = 0; i < bodyLength; i++) { - buffer2[offset + i] = this.frameData[i] ^ this.maskKey[i % 4]; + buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4]; } - return buffer2; + return buffer; } }; module2.exports = { @@ -16587,22 +16587,22 @@ var require_receiver = __commonJS({ * or not enough bytes are buffered to parse. */ run(callback) { - var _a3; + var _a; while (true) { if (__privateGet(this, _state) === parserStates.INFO) { if (__privateGet(this, _byteOffset) < 2) { return callback(); } - const buffer2 = this.consume(2); - __privateGet(this, _info).fin = (buffer2[0] & 128) !== 0; - __privateGet(this, _info).opcode = buffer2[0] & 15; - (_a3 = __privateGet(this, _info)).originalOpcode ?? (_a3.originalOpcode = __privateGet(this, _info).opcode); + const buffer = this.consume(2); + __privateGet(this, _info).fin = (buffer[0] & 128) !== 0; + __privateGet(this, _info).opcode = buffer[0] & 15; + (_a = __privateGet(this, _info)).originalOpcode ?? (_a.originalOpcode = __privateGet(this, _info).opcode); __privateGet(this, _info).fragmented = !__privateGet(this, _info).fin && __privateGet(this, _info).opcode !== opcodes.CONTINUATION; if (__privateGet(this, _info).fragmented && __privateGet(this, _info).opcode !== opcodes.BINARY && __privateGet(this, _info).opcode !== opcodes.TEXT) { failWebsocketConnection(this.ws, "Invalid frame type was fragmented."); return; } - const payloadLength = buffer2[1] & 127; + const payloadLength = buffer[1] & 127; if (payloadLength <= 125) { __privateGet(this, _info).payloadLength = payloadLength; __privateSet(this, _state, parserStates.READ_DATA); @@ -16622,12 +16622,12 @@ var require_receiver = __commonJS({ failWebsocketConnection(this.ws, "Received close frame with a 1-byte body."); return; } - const body2 = this.consume(payloadLength); - __privateGet(this, _info).closeInfo = this.parseCloseBody(false, body2); + const body = this.consume(payloadLength); + __privateGet(this, _info).closeInfo = this.parseCloseBody(false, body); if (!this.ws[kSentClose]) { - const body3 = Buffer.allocUnsafe(2); - body3.writeUInt16BE(__privateGet(this, _info).closeInfo.code, 0); - const closeFrame = new WebsocketFrameSend(body3); + const body2 = Buffer.allocUnsafe(2); + body2.writeUInt16BE(__privateGet(this, _info).closeInfo.code, 0); + const closeFrame = new WebsocketFrameSend(body2); this.ws[kResponse].socket.write( closeFrame.createFrame(opcodes.CLOSE), (err) => { @@ -16642,13 +16642,13 @@ var require_receiver = __commonJS({ this.end(); return; } else if (__privateGet(this, _info).opcode === opcodes.PING) { - const body2 = this.consume(payloadLength); + const body = this.consume(payloadLength); if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend(body2); + const frame = new WebsocketFrameSend(body); this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)); if (channels.ping.hasSubscribers) { channels.ping.publish({ - payload: body2 + payload: body }); } } @@ -16660,10 +16660,10 @@ var require_receiver = __commonJS({ return; } } else if (__privateGet(this, _info).opcode === opcodes.PONG) { - const body2 = this.consume(payloadLength); + const body = this.consume(payloadLength); if (channels.pong.hasSubscribers) { channels.pong.publish({ - payload: body2 + payload: body }); } if (__privateGet(this, _byteOffset) > 0) { @@ -16677,28 +16677,28 @@ var require_receiver = __commonJS({ if (__privateGet(this, _byteOffset) < 2) { return callback(); } - const buffer2 = this.consume(2); - __privateGet(this, _info).payloadLength = buffer2.readUInt16BE(0); + const buffer = this.consume(2); + __privateGet(this, _info).payloadLength = buffer.readUInt16BE(0); __privateSet(this, _state, parserStates.READ_DATA); } else if (__privateGet(this, _state) === parserStates.PAYLOADLENGTH_64) { if (__privateGet(this, _byteOffset) < 8) { return callback(); } - const buffer2 = this.consume(8); - const upper = buffer2.readUInt32BE(0); + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); if (upper > 2 ** 31 - 1) { failWebsocketConnection(this.ws, "Received payload length > 2^31 bytes."); return; } - const lower = buffer2.readUInt32BE(4); + const lower = buffer.readUInt32BE(4); __privateGet(this, _info).payloadLength = (upper << 8) + lower; __privateSet(this, _state, parserStates.READ_DATA); } else if (__privateGet(this, _state) === parserStates.READ_DATA) { if (__privateGet(this, _byteOffset) < __privateGet(this, _info).payloadLength) { return callback(); } else if (__privateGet(this, _byteOffset) >= __privateGet(this, _info).payloadLength) { - const body2 = this.consume(__privateGet(this, _info).payloadLength); - __privateGet(this, _fragments).push(body2); + const body = this.consume(__privateGet(this, _info).payloadLength); + __privateGet(this, _fragments).push(body); if (!__privateGet(this, _info).fragmented || __privateGet(this, _info).fin && __privateGet(this, _info).opcode === opcodes.CONTINUATION) { const fullMessage = Buffer.concat(__privateGet(this, _fragments)); websocketMessageReceived(this.ws, __privateGet(this, _info).originalOpcode, fullMessage); @@ -16731,25 +16731,25 @@ var require_receiver = __commonJS({ __privateSet(this, _byteOffset, __privateGet(this, _byteOffset) - __privateGet(this, _buffers)[0].length); return __privateGet(this, _buffers).shift(); } - const buffer2 = Buffer.allocUnsafe(n); + const buffer = Buffer.allocUnsafe(n); let offset = 0; while (offset !== n) { const next = __privateGet(this, _buffers)[0]; const { length } = next; if (length + offset === n) { - buffer2.set(__privateGet(this, _buffers).shift(), offset); + buffer.set(__privateGet(this, _buffers).shift(), offset); break; } else if (length + offset > n) { - buffer2.set(next.subarray(0, n - offset), offset); + buffer.set(next.subarray(0, n - offset), offset); __privateGet(this, _buffers)[0] = next.subarray(n - offset); break; } else { - buffer2.set(__privateGet(this, _buffers).shift(), offset); + buffer.set(__privateGet(this, _buffers).shift(), offset); offset += next.length; } } __privateSet(this, _byteOffset, __privateGet(this, _byteOffset) - n); - return buffer2; + return buffer; } parseCloseBody(onlyCode, data) { let code; @@ -16823,7 +16823,7 @@ var require_websocket = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url2, protocols = []) { + constructor(url, protocols = []) { super(); __privateAdd(this, _WebSocket_instances); __privateAdd(this, _events, { @@ -16843,12 +16843,12 @@ var require_websocket = __commonJS({ }); } const options2 = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url2 = webidl.converters.USVString(url2); + url = webidl.converters.USVString(url); protocols = options2.protocols; const baseURL = getGlobalOrigin(); let urlRecord; try { - urlRecord = new URL(url2, baseURL); + urlRecord = new URL(url, baseURL); } catch (e) { throw new DOMException2(e, "SyntaxError"); } @@ -16959,25 +16959,25 @@ var require_websocket = __commonJS({ if (typeof data === "string") { const value = Buffer.from(data); const frame = new WebsocketFrameSend(value); - const buffer2 = frame.createFrame(opcodes.TEXT); + const buffer = frame.createFrame(opcodes.TEXT); __privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) + value.byteLength); - socket.write(buffer2, () => { + socket.write(buffer, () => { __privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) - value.byteLength); }); } else if (types.isArrayBuffer(data)) { const value = Buffer.from(data); const frame = new WebsocketFrameSend(value); - const buffer2 = frame.createFrame(opcodes.BINARY); + const buffer = frame.createFrame(opcodes.BINARY); __privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) + value.byteLength); - socket.write(buffer2, () => { + socket.write(buffer, () => { __privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) - value.byteLength); }); } else if (ArrayBuffer.isView(data)) { const ab = Buffer.from(data, data.byteOffset, data.byteLength); const frame = new WebsocketFrameSend(ab); - const buffer2 = frame.createFrame(opcodes.BINARY); + const buffer = frame.createFrame(opcodes.BINARY); __privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) + ab.byteLength); - socket.write(buffer2, () => { + socket.write(buffer, () => { __privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) - ab.byteLength); }); } else if (isBlobLike(data)) { @@ -16985,9 +16985,9 @@ var require_websocket = __commonJS({ data.arrayBuffer().then((ab) => { const value = Buffer.from(ab); frame.frameData = value; - const buffer2 = frame.createFrame(opcodes.BINARY); + const buffer = frame.createFrame(opcodes.BINARY); __privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) + value.byteLength); - socket.write(buffer2, () => { + socket.write(buffer, () => { __privateSet(this, _bufferedAmount, __privateGet(this, _bufferedAmount) - value.byteLength); }); }); @@ -17081,12 +17081,12 @@ var require_websocket = __commonJS({ webidl.brandCheck(this, _WebSocket); return this[kBinaryType]; } - set binaryType(type2) { + set binaryType(type) { webidl.brandCheck(this, _WebSocket); - if (type2 !== "blob" && type2 !== "arraybuffer") { + if (type !== "blob" && type !== "arraybuffer") { this[kBinaryType] = "blob"; } else { - this[kBinaryType] = type2; + this[kBinaryType] = type; } } }; @@ -17213,8 +17213,8 @@ var require_undici = __commonJS({ var errors = require_errors(); var Pool = require_pool(); var BalancedPool = require_balanced_pool(); - var Agent3 = require_agent(); - var util3 = require_util(); + var Agent = require_agent(); + var util = require_util(); var { InvalidArgumentError } = errors; var api = require_api(); var buildConnector = require_connect(); @@ -17240,7 +17240,7 @@ var require_undici = __commonJS({ module2.exports.Client = Client; module2.exports.Pool = Pool; module2.exports.BalancedPool = BalancedPool; - module2.exports.Agent = Agent3; + module2.exports.Agent = Agent; module2.exports.ProxyAgent = ProxyAgent; module2.exports.RetryHandler = RetryHandler; module2.exports.DecoratorHandler = DecoratorHandler; @@ -17249,12 +17249,12 @@ var require_undici = __commonJS({ module2.exports.buildConnector = buildConnector; module2.exports.errors = errors; function makeDispatcher(fn) { - return (url2, opts, handler) => { + return (url, opts, handler) => { if (typeof opts === "function") { handler = opts; opts = null; } - if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) { + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -17268,12 +17268,12 @@ var require_undici = __commonJS({ if (!opts.path.startsWith("/")) { path4 = `/${path4}`; } - url2 = new URL(util3.parseOrigin(url2).origin + path4); + url = new URL(util.parseOrigin(url).origin + path4); } else { if (!opts) { - opts = typeof url2 === "object" ? url2 : {}; + opts = typeof url === "object" ? url : {}; } - url2 = util3.parseURL(url2); + url = util.parseURL(url); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { @@ -17281,15 +17281,15 @@ var require_undici = __commonJS({ } return fn.call(dispatcher, { ...opts, - origin: url2.origin, - path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler); }; } module2.exports.setGlobalDispatcher = setGlobalDispatcher; module2.exports.getGlobalDispatcher = getGlobalDispatcher; - if (util3.nodeMajor > 16 || util3.nodeMajor === 16 && util3.nodeMinor >= 8) { + if (util.nodeMajor > 16 || util.nodeMajor === 16 && util.nodeMinor >= 8) { let fetchImpl = null; module2.exports.fetch = async function fetch(resource) { if (!fetchImpl) { @@ -17317,7 +17317,7 @@ var require_undici = __commonJS({ const { kConstruct } = require_symbols4(); module2.exports.caches = new CacheStorage(kConstruct); } - if (util3.nodeMajor >= 16) { + if (util.nodeMajor >= 16) { const { deleteCookie, getCookies, getSetCookies, setCookie } = require_cookies(); module2.exports.deleteCookie = deleteCookie; module2.exports.getCookies = getCookies; @@ -17327,7 +17327,7 @@ var require_undici = __commonJS({ module2.exports.parseMIMEType = parseMIMEType; module2.exports.serializeAMimeType = serializeAMimeType; } - if (util3.nodeMajor >= 18 && hasCrypto) { + if (util.nodeMajor >= 18 && hasCrypto) { const { WebSocket } = require_websocket(); module2.exports.WebSocket = WebSocket; } @@ -17347,7 +17347,7 @@ var require_undici = __commonJS({ var require_lib = __commonJS({ "node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17360,21 +17360,21 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -17403,10 +17403,10 @@ 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 http2 = __importStar(require("http")); - var https2 = __importStar(require("https")); - var pm = __importStar(require_proxy()); - var tunnel = __importStar(require_tunnel2()); + 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) { @@ -17481,8 +17481,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter6(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter7(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17494,8 +17494,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter6(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter7(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17552,42 +17552,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -17596,14 +17596,14 @@ var require_lib = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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 __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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); @@ -17612,7 +17612,7 @@ var require_lib = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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); @@ -17621,7 +17621,7 @@ var require_lib = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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); @@ -17635,7 +17635,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17709,7 +17709,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info5, data) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { function callbackForResult(err, res) { if (err) { @@ -17795,7 +17795,7 @@ var require_lib = __commonJS({ const info5 = {}; info5.parsedUrl = requestUrl; const usingSsl = info5.parsedUrl.protocol === "https:"; - info5.httpModule = usingSsl ? https2 : http2; + info5.httpModule = usingSsl ? https : http; const defaultPort = usingSsl ? 443 : 80; info5.options = {}; info5.options.host = info5.parsedUrl.hostname; @@ -17843,7 +17843,7 @@ var require_lib = __commonJS({ const usingSsl = parsedUrl.protocol === "https:"; let maxSockets = 100; if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http2.globalAgent.maxSockets; + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; } if (proxyUrl && proxyUrl.hostname) { const agentOptions = { @@ -17865,7 +17865,7 @@ var require_lib = __commonJS({ } if (!agent) { const options2 = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options2) : new http2.Agent(options2); + agent = usingSsl ? new https.Agent(options2) : new http.Agent(options2); this._agent = agent; } if (usingSsl && this._ignoreSslError) { @@ -17896,15 +17896,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve) => setTimeout(() => resolve(), ms)); }); } _processResponse(res, options2) { - return __awaiter6(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter7(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17966,7 +17966,7 @@ var require_lib = __commonJS({ var require_auth = __commonJS({ "node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -18011,7 +18011,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18034,7 +18034,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18057,7 +18057,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18070,7 +18070,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -18125,8 +18125,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a3; - return __awaiter6(this, void 0, void 0, function* () { + var _a; + return __awaiter7(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. @@ -18135,7 +18135,7 @@ var require_oidc_utils = __commonJS({ Error Message: ${error3.message}`); }); - const id_token = (_a3 = res.result) === null || _a3 === void 0 ? void 0 : _a3.value; + 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"); } @@ -18143,7 +18143,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18168,7 +18168,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -18199,7 +18199,7 @@ var require_summary = __commonJS({ 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: access2, appendFile, writeFile } = fs_1.promises; + 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 { @@ -18213,7 +18213,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18222,8 +18222,8 @@ var require_summary = __commonJS({ throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); } try { - yield access2(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } catch (_a3) { + 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; @@ -18254,7 +18254,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options2) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const overwrite = !!(options2 === null || options2 === void 0 ? void 0 : options2.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18268,7 +18268,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18462,7 +18462,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18475,23 +18475,23 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path4 = __importStar(require("path")); + var path4 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -18511,7 +18511,7 @@ var require_path_utils = __commonJS({ var require_io_util = __commonJS({ "node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.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]; @@ -18520,21 +18520,21 @@ var require_io_util = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -18561,17 +18561,17 @@ var require_io_util = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var _a3; + 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 fs4 = __importStar(require("fs")); - var path4 = __importStar(require("path")); - _a3 = fs4.promises, exports2.chmod = _a3.chmod, exports2.copyFile = _a3.copyFile, exports2.lstat = _a3.lstat, exports2.mkdir = _a3.mkdir, exports2.open = _a3.open, exports2.readdir = _a3.readdir, exports2.readlink = _a3.readlink, exports2.rename = _a3.rename, exports2.rm = _a3.rm, exports2.rmdir = _a3.rmdir, exports2.stat = _a3.stat, exports2.symlink = _a3.symlink, exports2.unlink = _a3.unlink; + var fs3 = __importStar2(require("fs")); + var path4 = __importStar2(require("path")); + _a = fs3.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 = fs4.constants.O_RDONLY; + exports2.READONLY = fs3.constants.O_RDONLY; function exists(fsPath) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { try { yield exports2.stat(fsPath); } catch (err) { @@ -18585,7 +18585,7 @@ var require_io_util = __commonJS({ } exports2.exists = exists; function isDirectory(fsPath, useStat = false) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); return stats.isDirectory(); }); @@ -18603,7 +18603,7 @@ var require_io_util = __commonJS({ } exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { let stats = void 0; try { stats = yield exports2.stat(filePath); @@ -18673,8 +18673,8 @@ var require_io_util = __commonJS({ return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); } function getCmdPath() { - var _a4; - return (_a4 = process.env["COMSPEC"]) !== null && _a4 !== void 0 ? _a4 : `cmd.exe`; + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } exports2.getCmdPath = getCmdPath; } @@ -18684,7 +18684,7 @@ var require_io_util = __commonJS({ var require_io = __commonJS({ "node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.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]; @@ -18693,21 +18693,21 @@ var require_io = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -18737,10 +18737,10 @@ var require_io = __commonJS({ 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 path4 = __importStar(require("path")); - var ioUtil = __importStar(require_io_util()); + var path4 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); function cp(source, dest, options2 = {}) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const { force, recursive, copySourceDirectory } = readCopyOptions(options2); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18767,7 +18767,7 @@ var require_io = __commonJS({ } exports2.cp = cp; function mv(source, dest, options2 = {}) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18788,7 +18788,7 @@ var require_io = __commonJS({ } exports2.mv = mv; function rmRF(inputPath) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18808,14 +18808,14 @@ var require_io = __commonJS({ } exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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 which2(tool, check) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18839,7 +18839,7 @@ var require_io = __commonJS({ } exports2.which = which2; function findInPath(tool) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18887,7 +18887,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18907,7 +18907,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18932,7 +18932,7 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.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]; @@ -18941,21 +18941,21 @@ var require_toolrunner = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -18984,12 +18984,12 @@ var require_toolrunner = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.argStringToArray = exports2.ToolRunner = void 0; - var os7 = __importStar(require("os")); - var events = __importStar(require("events")); - var child = __importStar(require("child_process")); - var path4 = __importStar(require("path")); - var io = __importStar(require_io()); - var ioUtil = __importStar(require_io_util()); + var os6 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path4 = __importStar2(require("path")); + var io = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner = class extends events.EventEmitter { @@ -19039,12 +19039,12 @@ var require_toolrunner = __commonJS({ _processLineBuffer(data, strBuffer, onLine) { try { let s = strBuffer + data.toString(); - let n = s.indexOf(os7.EOL); + let n = s.indexOf(os6.EOL); while (n > -1) { const line = s.substring(0, n); onLine(line); - s = s.substring(n + os7.EOL.length); - n = s.indexOf(os7.EOL); + s = s.substring(n + os6.EOL.length); + n = s.indexOf(os6.EOL); } return s; } catch (err) { @@ -19200,12 +19200,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path4.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io.which(this.toolPath, true); - return new Promise((resolve, reject) => __awaiter6(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter7(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19213,10 +19213,10 @@ var require_toolrunner = __commonJS({ } const optionsNonNull = this._cloneExecOptions(this.options); if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os7.EOL); + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os6.EOL); } - const state3 = new ExecState(optionsNonNull, this.toolPath); - state3.on("debug", (message) => { + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { this._debug(message); }); if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { @@ -19243,7 +19243,7 @@ var require_toolrunner = __commonJS({ let errbuffer = ""; if (cp.stderr) { cp.stderr.on("data", (data) => { - state3.processStderr = true; + state.processStderr = true; if (this.options.listeners && this.options.listeners.stderr) { this.options.listeners.stderr(data); } @@ -19259,25 +19259,25 @@ var require_toolrunner = __commonJS({ }); } cp.on("error", (err) => { - state3.processError = err.message; - state3.processExited = true; - state3.processClosed = true; - state3.CheckComplete(); + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); }); cp.on("exit", (code) => { - state3.processExitCode = code; - state3.processExited = true; + state.processExitCode = code; + state.processExited = true; this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state3.CheckComplete(); + state.CheckComplete(); }); cp.on("close", (code) => { - state3.processExitCode = code; - state3.processExited = true; - state3.processClosed = true; + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state3.CheckComplete(); + state.CheckComplete(); }); - state3.on("done", (error3, exitCode) => { + state.on("done", (error3, exitCode) => { if (stdbuffer.length > 0) { this.emit("stdline", stdbuffer); } @@ -19398,15 +19398,15 @@ var require_toolrunner = __commonJS({ this.done = true; this.emit("done", error3, this.processExitCode); } - static HandleTimeout(state3) { - if (state3.done) { + static HandleTimeout(state) { + if (state.done) { return; } - if (!state3.processClosed && state3.processExited) { - const message = `The STDIO streams did not close within ${state3.delay / 1e3} seconds of the exit event from process '${state3.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state3._debug(message); + 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); } - state3._setResult(); + state._setResult(); } }; } @@ -19416,7 +19416,7 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.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]; @@ -19425,21 +19425,21 @@ var require_exec = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -19469,9 +19469,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 = __importStar(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec2(commandLine, args, options2) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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.`); @@ -19484,16 +19484,16 @@ var require_exec = __commonJS({ } exports2.exec = exec2; function getExecOutput2(commandLine, args, options2) { - var _a3, _b2; - return __awaiter6(this, void 0, void 0, function* () { + var _a, _b; + return __awaiter7(this, void 0, void 0, function* () { let stdout = ""; - let stderr2 = ""; + let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); - const originalStdoutListener = (_a3 = options2 === null || options2 === void 0 ? void 0 : options2.listeners) === null || _a3 === void 0 ? void 0 : _a3.stdout; - const originalStdErrListener = (_b2 = options2 === null || options2 === void 0 ? void 0 : options2.listeners) === null || _b2 === void 0 ? void 0 : _b2.stderr; + const originalStdoutListener = (_a = options2 === null || options2 === void 0 ? void 0 : options2.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options2 === null || options2 === void 0 ? void 0 : options2.listeners) === null || _b === void 0 ? void 0 : _b.stderr; const stdErrListener = (data) => { - stderr2 += stderrDecoder.write(data); + stderr += stderrDecoder.write(data); if (originalStdErrListener) { originalStdErrListener(data); } @@ -19507,11 +19507,11 @@ var require_exec = __commonJS({ const listeners = Object.assign(Object.assign({}, options2 === null || options2 === void 0 ? void 0 : options2.listeners), { stdout: stdOutListener, stderr: stdErrListener }); const exitCode = yield exec2(commandLine, args, Object.assign(Object.assign({}, options2), { listeners })); stdout += stdoutDecoder.end(); - stderr2 += stderrDecoder.end(); + stderr += stderrDecoder.end(); return { exitCode, stdout, - stderr: stderr2 + stderr }; }); } @@ -19523,7 +19523,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19536,21 +19536,21 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -19577,15 +19577,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault = 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 = __importDefault(require("os")); - var exec2 = __importStar(require_exec()); - var getWindowsInfo = () => __awaiter6(void 0, void 0, void 0, function* () { - const { stdout: version3 } = yield exec2.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + var os_1 = __importDefault2(require("os")); + var exec2 = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter7(void 0, void 0, void 0, function* () { + const { stdout: version2 } = yield exec2.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); const { stdout: name } = yield exec2.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { @@ -19593,29 +19593,29 @@ var require_platform = __commonJS({ }); return { name: name.trim(), - version: version3.trim() + version: version2.trim() }; }); - var getMacOsInfo = () => __awaiter6(void 0, void 0, void 0, function* () { - var _a3, _b2, _c2, _d2; + var getMacOsInfo = () => __awaiter7(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; const { stdout } = yield exec2.getExecOutput("sw_vers", void 0, { silent: true }); - const version3 = (_b2 = (_a3 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a3 === void 0 ? void 0 : _a3[1]) !== null && _b2 !== void 0 ? _b2 : ""; - const name = (_d2 = (_c2 = stdout.match(/ProductName:\s*(.+)/)) === null || _c2 === void 0 ? void 0 : _c2[1]) !== null && _d2 !== void 0 ? _d2 : ""; + const version2 = (_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: version3 + version: version2 }; }); - var getLinuxInfo = () => __awaiter6(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter7(void 0, void 0, void 0, function* () { const { stdout } = yield exec2.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); - const [name, version3] = stdout.trim().split("\n"); + const [name, version2] = stdout.trim().split("\n"); return { name, - version: version3 + version: version2 }; }); exports2.platform = os_1.default.platform(); @@ -19624,7 +19624,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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, @@ -19642,7 +19642,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19655,21 +19655,21 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -19701,8 +19701,8 @@ var require_core = __commonJS({ var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os7 = __importStar(require("os")); - var path4 = __importStar(require("path")); + var os6 = __importStar2(require("os")); + var path4 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -19769,12 +19769,12 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); if (filePath) { return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); } - process.stdout.write(os7.EOL); + process.stdout.write(os6.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } exports2.setOutput = setOutput; - function setCommandEcho(enabled2) { - (0, command_1.issue)("echo", enabled2 ? "on" : "off"); + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); } exports2.setCommandEcho = setCommandEcho; function setFailed3(message) { @@ -19803,7 +19803,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports2.notice = notice; function info5(message) { - process.stdout.write(message + os7.EOL); + process.stdout.write(message + os6.EOL); } exports2.info = info5; function startGroup(name) { @@ -19815,7 +19815,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports2.endGroup = endGroup; function group3(name, fn) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { startGroup(name); let result; try { @@ -19840,7 +19840,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports2.getState = getState; function getIDToken(aud) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } @@ -19863,7 +19863,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 = __importStar(require_platform()); + exports2.platform = __importStar2(require_platform()); } }); @@ -20006,73 +20006,73 @@ var require_semver = __commonJS({ } var i; exports2.parse = parse4; - function parse4(version3, options2) { + function parse4(version2, options2) { if (!options2 || typeof options2 !== "object") { options2 = { loose: !!options2, includePrerelease: false }; } - if (version3 instanceof SemVer) { - return version3; + if (version2 instanceof SemVer) { + return version2; } - if (typeof version3 !== "string") { + if (typeof version2 !== "string") { return null; } - if (version3.length > MAX_LENGTH) { + if (version2.length > MAX_LENGTH) { return null; } var r = options2.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]; - if (!r.test(version3)) { + if (!r.test(version2)) { return null; } try { - return new SemVer(version3, options2); + return new SemVer(version2, options2); } catch (er) { return null; } } exports2.valid = valid; - function valid(version3, options2) { - var v = parse4(version3, options2); + function valid(version2, options2) { + var v = parse4(version2, options2); return v ? v.version : null; } exports2.clean = clean; - function clean(version3, options2) { - var s = parse4(version3.trim().replace(/^[=v]+/, ""), options2); + function clean(version2, options2) { + var s = parse4(version2.trim().replace(/^[=v]+/, ""), options2); return s ? s.version : null; } exports2.SemVer = SemVer; - function SemVer(version3, options2) { + function SemVer(version2, options2) { if (!options2 || typeof options2 !== "object") { options2 = { loose: !!options2, includePrerelease: false }; } - if (version3 instanceof SemVer) { - if (version3.loose === options2.loose) { - return version3; + if (version2 instanceof SemVer) { + if (version2.loose === options2.loose) { + return version2; } else { - version3 = version3.version; + version2 = version2.version; } - } else if (typeof version3 !== "string") { - throw new TypeError("Invalid Version: " + version3); + } else if (typeof version2 !== "string") { + throw new TypeError("Invalid Version: " + version2); } - if (version3.length > MAX_LENGTH) { + if (version2.length > MAX_LENGTH) { throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); } if (!(this instanceof SemVer)) { - return new SemVer(version3, options2); + return new SemVer(version2, options2); } - debug6("SemVer", version3, options2); + debug6("SemVer", version2, options2); this.options = options2; this.loose = !!options2.loose; - var m = version3.trim().match(options2.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); + var m = version2.trim().match(options2.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); if (!m) { - throw new TypeError("Invalid Version: " + version3); + throw new TypeError("Invalid Version: " + version2); } - this.raw = version3; + this.raw = version2; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; @@ -20175,8 +20175,8 @@ var require_semver = __commonJS({ } } while (++i2); }; - SemVer.prototype.inc = function(release2, identifier) { - switch (release2) { + SemVer.prototype.inc = function(release, identifier) { + switch (release) { case "premajor": this.prerelease.length = 0; this.patch = 0; @@ -20252,40 +20252,40 @@ var require_semver = __commonJS({ } break; default: - throw new Error("invalid increment argument: " + release2); + throw new Error("invalid increment argument: " + release); } this.format(); this.raw = this.version; return this; }; exports2.inc = inc; - function inc(version3, release2, loose, identifier) { + function inc(version2, release, loose, identifier) { if (typeof loose === "string") { identifier = loose; loose = void 0; } try { - return new SemVer(version3, loose).inc(release2, identifier).version; + return new SemVer(version2, loose).inc(release, identifier).version; } catch (er) { return null; } } exports2.diff = diff; - function diff(version1, version22) { - if (eq(version1, version22)) { + function diff(version1, version2) { + if (eq(version1, version2)) { return null; } else { var v1 = parse4(version1); - var v2 = parse4(version22); - var prefix2 = ""; + var v2 = parse4(version2); + var prefix = ""; if (v1.prerelease.length || v2.prerelease.length) { - prefix2 = "pre"; + prefix = "pre"; var defaultResult = "prerelease"; } for (var key in v1) { if (key === "major" || key === "minor" || key === "patch") { if (v1[key] !== v2[key]) { - return prefix2 + key; + return prefix + key; } } } @@ -20407,28 +20407,28 @@ var require_semver = __commonJS({ } } exports2.Comparator = Comparator; - function Comparator(comp26, options2) { + function Comparator(comp, options2) { if (!options2 || typeof options2 !== "object") { options2 = { loose: !!options2, includePrerelease: false }; } - if (comp26 instanceof Comparator) { - if (comp26.loose === !!options2.loose) { - return comp26; + if (comp instanceof Comparator) { + if (comp.loose === !!options2.loose) { + return comp; } else { - comp26 = comp26.value; + comp = comp.value; } } if (!(this instanceof Comparator)) { - return new Comparator(comp26, options2); + return new Comparator(comp, options2); } - comp26 = comp26.trim().split(/\s+/).join(" "); - debug6("comparator", comp26, options2); + comp = comp.trim().split(/\s+/).join(" "); + debug6("comparator", comp, options2); this.options = options2; this.loose = !!options2.loose; - this.parse(comp26); + this.parse(comp); if (this.semver === ANY) { this.value = ""; } else { @@ -20437,11 +20437,11 @@ var require_semver = __commonJS({ debug6("comp", this); } var ANY = {}; - Comparator.prototype.parse = function(comp26) { + Comparator.prototype.parse = function(comp) { var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; - var m = comp26.match(r); + var m = comp.match(r); if (!m) { - throw new TypeError("Invalid comparator: " + comp26); + throw new TypeError("Invalid comparator: " + comp); } this.operator = m[1] !== void 0 ? m[1] : ""; if (this.operator === "=") { @@ -20456,22 +20456,22 @@ var require_semver = __commonJS({ Comparator.prototype.toString = function() { return this.value; }; - Comparator.prototype.test = function(version3) { - debug6("Comparator.test", version3, this.options.loose); - if (this.semver === ANY || version3 === ANY) { + Comparator.prototype.test = function(version2) { + debug6("Comparator.test", version2, this.options.loose); + if (this.semver === ANY || version2 === ANY) { return true; } - if (typeof version3 === "string") { + if (typeof version2 === "string") { try { - version3 = new SemVer(version3, this.options); + version2 = new SemVer(version2, this.options); } catch (er) { return false; } } - return cmp(version3, this.operator, this.semver, this.options); + return cmp(version2, this.operator, this.semver, this.options); }; - Comparator.prototype.intersects = function(comp26, options2) { - if (!(comp26 instanceof Comparator)) { + Comparator.prototype.intersects = function(comp, options2) { + if (!(comp instanceof Comparator)) { throw new TypeError("a Comparator is required"); } if (!options2 || typeof options2 !== "object") { @@ -20485,50 +20485,50 @@ var require_semver = __commonJS({ if (this.value === "") { return true; } - rangeTmp = new Range(comp26.value, options2); + rangeTmp = new Range(comp.value, options2); return satisfies(this.value, rangeTmp, options2); - } else if (comp26.operator === "") { - if (comp26.value === "") { + } else if (comp.operator === "") { + if (comp.value === "") { return true; } rangeTmp = new Range(this.value, options2); - return satisfies(comp26.semver, rangeTmp, options2); - } - var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp26.operator === ">=" || comp26.operator === ">"); - var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp26.operator === "<=" || comp26.operator === "<"); - var sameSemVer = this.semver.version === comp26.semver.version; - var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp26.operator === ">=" || comp26.operator === "<="); - var oppositeDirectionsLessThan = cmp(this.semver, "<", comp26.semver, options2) && ((this.operator === ">=" || this.operator === ">") && (comp26.operator === "<=" || comp26.operator === "<")); - var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp26.semver, options2) && ((this.operator === "<=" || this.operator === "<") && (comp26.operator === ">=" || comp26.operator === ">")); + return satisfies(comp.semver, rangeTmp, options2); + } + var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); + var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); + var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options2) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<")); + var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options2) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">")); return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; }; exports2.Range = Range; - function Range(range2, options2) { + function Range(range, options2) { if (!options2 || typeof options2 !== "object") { options2 = { loose: !!options2, includePrerelease: false }; } - if (range2 instanceof Range) { - if (range2.loose === !!options2.loose && range2.includePrerelease === !!options2.includePrerelease) { - return range2; + if (range instanceof Range) { + if (range.loose === !!options2.loose && range.includePrerelease === !!options2.includePrerelease) { + return range; } else { - return new Range(range2.raw, options2); + return new Range(range.raw, options2); } } - if (range2 instanceof Comparator) { - return new Range(range2.value, options2); + if (range instanceof Comparator) { + return new Range(range.value, options2); } if (!(this instanceof Range)) { - return new Range(range2, options2); + return new Range(range, options2); } this.options = options2; this.loose = !!options2.loose; this.includePrerelease = !!options2.includePrerelease; - this.raw = range2.trim().split(/\s+/).join(" "); - this.set = this.raw.split("||").map(function(range3) { - return this.parseRange(range3.trim()); + this.raw = range.trim().split(/\s+/).join(" "); + this.set = this.raw.split("||").map(function(range2) { + return this.parseRange(range2.trim()); }, this).filter(function(c) { return c.length; }); @@ -20546,36 +20546,36 @@ var require_semver = __commonJS({ Range.prototype.toString = function() { return this.range; }; - Range.prototype.parseRange = function(range2) { + Range.prototype.parseRange = function(range) { var loose = this.options.loose; var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]; - range2 = range2.replace(hr, hyphenReplace); - debug6("hyphen replace", range2); - range2 = range2.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); - debug6("comparator trim", range2, safeRe[t.COMPARATORTRIM]); - range2 = range2.replace(safeRe[t.TILDETRIM], tildeTrimReplace); - range2 = range2.replace(safeRe[t.CARETTRIM], caretTrimReplace); - range2 = range2.split(/\s+/).join(" "); + range = range.replace(hr, hyphenReplace); + debug6("hyphen replace", range); + range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); + debug6("comparator trim", range, safeRe[t.COMPARATORTRIM]); + range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace); + range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace); + range = range.split(/\s+/).join(" "); var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; - var set = range2.split(" ").map(function(comp26) { - return parseComparator(comp26, this.options); + var set = range.split(" ").map(function(comp) { + return parseComparator(comp, this.options); }, this).join(" ").split(/\s+/); if (this.options.loose) { - set = set.filter(function(comp26) { - return !!comp26.match(compRe); + set = set.filter(function(comp) { + return !!comp.match(compRe); }); } - set = set.map(function(comp26) { - return new Comparator(comp26, this.options); + set = set.map(function(comp) { + return new Comparator(comp, this.options); }, this); return set; }; - Range.prototype.intersects = function(range2, options2) { - if (!(range2 instanceof Range)) { + Range.prototype.intersects = function(range, options2) { + if (!(range instanceof Range)) { throw new TypeError("a Range is required"); } return this.set.some(function(thisComparators) { - return isSatisfiable(thisComparators, options2) && range2.set.some(function(rangeComparators) { + return isSatisfiable(thisComparators, options2) && range.set.some(function(rangeComparators) { return isSatisfiable(rangeComparators, options2) && thisComparators.every(function(thisComparator) { return rangeComparators.every(function(rangeComparator) { return thisComparator.intersects(rangeComparator, options2); @@ -20597,37 +20597,37 @@ var require_semver = __commonJS({ return result; } exports2.toComparators = toComparators; - function toComparators(range2, options2) { - return new Range(range2, options2).set.map(function(comp26) { - return comp26.map(function(c) { + function toComparators(range, options2) { + return new Range(range, options2).set.map(function(comp) { + return comp.map(function(c) { return c.value; }).join(" ").trim().split(" "); }); } - function parseComparator(comp26, options2) { - debug6("comp", comp26, options2); - comp26 = replaceCarets(comp26, options2); - debug6("caret", comp26); - comp26 = replaceTildes(comp26, options2); - debug6("tildes", comp26); - comp26 = replaceXRanges(comp26, options2); - debug6("xrange", comp26); - comp26 = replaceStars(comp26, options2); - debug6("stars", comp26); - return comp26; + function parseComparator(comp, options2) { + debug6("comp", comp, options2); + comp = replaceCarets(comp, options2); + debug6("caret", comp); + comp = replaceTildes(comp, options2); + debug6("tildes", comp); + comp = replaceXRanges(comp, options2); + debug6("xrange", comp); + comp = replaceStars(comp, options2); + debug6("stars", comp); + return comp; } function isX(id) { return !id || id.toLowerCase() === "x" || id === "*"; } - function replaceTildes(comp26, options2) { - return comp26.trim().split(/\s+/).map(function(comp27) { - return replaceTilde(comp27, options2); + function replaceTildes(comp, options2) { + return comp.trim().split(/\s+/).map(function(comp2) { + return replaceTilde(comp2, options2); }).join(" "); } - function replaceTilde(comp26, options2) { + function replaceTilde(comp, options2) { var r = options2.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]; - return comp26.replace(r, function(_, M, m, p, pr) { - debug6("tilde", comp26, _, M, m, p, pr); + return comp.replace(r, function(_, M, m, p, pr) { + debug6("tilde", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; @@ -20645,16 +20645,16 @@ var require_semver = __commonJS({ return ret; }); } - function replaceCarets(comp26, options2) { - return comp26.trim().split(/\s+/).map(function(comp27) { - return replaceCaret(comp27, options2); + function replaceCarets(comp, options2) { + return comp.trim().split(/\s+/).map(function(comp2) { + return replaceCaret(comp2, options2); }).join(" "); } - function replaceCaret(comp26, options2) { - debug6("caret", comp26, options2); + function replaceCaret(comp, options2) { + debug6("caret", comp, options2); var r = options2.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]; - return comp26.replace(r, function(_, M, m, p, pr) { - debug6("caret", comp26, _, M, m, p, pr); + return comp.replace(r, function(_, M, m, p, pr) { + debug6("caret", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; @@ -20693,17 +20693,17 @@ var require_semver = __commonJS({ return ret; }); } - function replaceXRanges(comp26, options2) { - debug6("replaceXRanges", comp26, options2); - return comp26.split(/\s+/).map(function(comp27) { - return replaceXRange(comp27, options2); + function replaceXRanges(comp, options2) { + debug6("replaceXRanges", comp, options2); + return comp.split(/\s+/).map(function(comp2) { + return replaceXRange(comp2, options2); }).join(" "); } - function replaceXRange(comp26, options2) { - comp26 = comp26.trim(); + function replaceXRange(comp, options2) { + comp = comp.trim(); var r = options2.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]; - return comp26.replace(r, function(ret, gtlt, M, m, p, pr) { - debug6("xRange", comp26, ret, gtlt, M, m, p, pr); + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug6("xRange", comp, ret, gtlt, M, m, p, pr); var xM = isX(M); var xm = xM || isX(m); var xp = xm || isX(p); @@ -20751,9 +20751,9 @@ var require_semver = __commonJS({ return ret; }); } - function replaceStars(comp26, options2) { - debug6("replaceStars", comp26, options2); - return comp26.trim().replace(safeRe[t.STAR], ""); + function replaceStars(comp, options2) { + debug6("replaceStars", comp, options2); + return comp.trim().replace(safeRe[t.STAR], ""); } function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { if (isX(fM)) { @@ -20778,31 +20778,31 @@ var require_semver = __commonJS({ } return (from + " " + to).trim(); } - Range.prototype.test = function(version3) { - if (!version3) { + Range.prototype.test = function(version2) { + if (!version2) { return false; } - if (typeof version3 === "string") { + if (typeof version2 === "string") { try { - version3 = new SemVer(version3, this.options); + version2 = new SemVer(version2, this.options); } catch (er) { return false; } } for (var i2 = 0; i2 < this.set.length; i2++) { - if (testSet(this.set[i2], version3, this.options)) { + if (testSet(this.set[i2], version2, this.options)) { return true; } } return false; }; - function testSet(set, version3, options2) { + function testSet(set, version2, options2) { for (var i2 = 0; i2 < set.length; i2++) { - if (!set[i2].test(version3)) { + if (!set[i2].test(version2)) { return false; } } - if (version3.prerelease.length && !options2.includePrerelease) { + if (version2.prerelease.length && !options2.includePrerelease) { for (i2 = 0; i2 < set.length; i2++) { debug6(set[i2].semver); if (set[i2].semver === ANY) { @@ -20810,7 +20810,7 @@ var require_semver = __commonJS({ } if (set[i2].semver.prerelease.length > 0) { var allowed = set[i2].semver; - if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { + if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { return true; } } @@ -20820,24 +20820,24 @@ var require_semver = __commonJS({ return true; } exports2.satisfies = satisfies; - function satisfies(version3, range2, options2) { + function satisfies(version2, range, options2) { try { - range2 = new Range(range2, options2); + range = new Range(range, options2); } catch (er) { return false; } - return range2.test(version3); + return range.test(version2); } exports2.maxSatisfying = maxSatisfying; - function maxSatisfying(versions2, range2, options2) { + function maxSatisfying(versions, range, options2) { var max = null; var maxSV = null; try { - var rangeObj = new Range(range2, options2); + var rangeObj = new Range(range, options2); } catch (er) { return null; } - versions2.forEach(function(v) { + versions.forEach(function(v) { if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; @@ -20848,15 +20848,15 @@ var require_semver = __commonJS({ return max; } exports2.minSatisfying = minSatisfying; - function minSatisfying(versions2, range2, options2) { + function minSatisfying(versions, range, options2) { var min = null; var minSV = null; try { - var rangeObj = new Range(range2, options2); + var rangeObj = new Range(range, options2); } catch (er) { return null; } - versions2.forEach(function(v) { + versions.forEach(function(v) { if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; @@ -20867,19 +20867,19 @@ var require_semver = __commonJS({ return min; } exports2.minVersion = minVersion; - function minVersion(range2, loose) { - range2 = new Range(range2, loose); + function minVersion(range, loose) { + range = new Range(range, loose); var minver = new SemVer("0.0.0"); - if (range2.test(minver)) { + if (range.test(minver)) { return minver; } minver = new SemVer("0.0.0-0"); - if (range2.test(minver)) { + if (range.test(minver)) { return minver; } minver = null; - for (var i2 = 0; i2 < range2.set.length; ++i2) { - var comparators = range2.set[i2]; + for (var i2 = 0; i2 < range.set.length; ++i2) { + var comparators = range.set[i2]; comparators.forEach(function(comparator) { var compver = new SemVer(comparator.semver.version); switch (comparator.operator) { @@ -20906,55 +20906,55 @@ var require_semver = __commonJS({ } }); } - if (minver && range2.test(minver)) { + if (minver && range.test(minver)) { return minver; } return null; } exports2.validRange = validRange; - function validRange(range2, options2) { + function validRange(range, options2) { try { - return new Range(range2, options2).range || "*"; + return new Range(range, options2).range || "*"; } catch (er) { return null; } } exports2.ltr = ltr; - function ltr(version3, range2, options2) { - return outside(version3, range2, "<", options2); + function ltr(version2, range, options2) { + return outside(version2, range, "<", options2); } exports2.gtr = gtr; - function gtr(version3, range2, options2) { - return outside(version3, range2, ">", options2); + function gtr(version2, range, options2) { + return outside(version2, range, ">", options2); } exports2.outside = outside; - function outside(version3, range2, hilo, options2) { - version3 = new SemVer(version3, options2); - range2 = new Range(range2, options2); - var gtfn, ltefn, ltfn, comp26, ecomp; + function outside(version2, range, hilo, options2) { + version2 = new SemVer(version2, options2); + range = new Range(range, options2); + var gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt; ltefn = lte; ltfn = lt; - comp26 = ">"; + comp = ">"; ecomp = ">="; break; case "<": gtfn = lt; ltefn = gte; ltfn = gt; - comp26 = "<"; + comp = "<"; ecomp = "<="; break; default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } - if (satisfies(version3, range2, options2)) { + if (satisfies(version2, range, options2)) { return false; } - for (var i2 = 0; i2 < range2.set.length; ++i2) { - var comparators = range2.set[i2]; + for (var i2 = 0; i2 < range.set.length; ++i2) { + var comparators = range.set[i2]; var high = null; var low = null; comparators.forEach(function(comparator) { @@ -20969,20 +20969,20 @@ var require_semver = __commonJS({ low = comparator; } }); - if (high.operator === comp26 || high.operator === ecomp) { + if (high.operator === comp || high.operator === ecomp) { return false; } - if ((!low.operator || low.operator === comp26) && ltefn(version3, low.semver)) { + if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { return false; - } else if (low.operator === ecomp && ltfn(version3, low.semver)) { + } else if (low.operator === ecomp && ltfn(version2, low.semver)) { return false; } } return true; } exports2.prerelease = prerelease; - function prerelease(version3, options2) { - var parsed = parse4(version3, options2); + function prerelease(version2, options2) { + var parsed = parse4(version2, options2); return parsed && parsed.prerelease.length ? parsed.prerelease : null; } exports2.intersects = intersects; @@ -20992,23 +20992,23 @@ var require_semver = __commonJS({ return r1.intersects(r2); } exports2.coerce = coerce; - function coerce(version3, options2) { - if (version3 instanceof SemVer) { - return version3; + function coerce(version2, options2) { + if (version2 instanceof SemVer) { + return version2; } - if (typeof version3 === "number") { - version3 = String(version3); + if (typeof version2 === "number") { + version2 = String(version2); } - if (typeof version3 !== "string") { + if (typeof version2 !== "string") { return null; } options2 = options2 || {}; var match = null; if (!options2.rtl) { - match = version3.match(safeRe[t.COERCE]); + match = version2.match(safeRe[t.COERCE]); } else { var next; - while ((next = safeRe[t.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) { + while ((next = safeRe[t.COERCERTL].exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } @@ -21028,7 +21028,7 @@ var require_semver = __commonJS({ var require_manifest = __commonJS({ "node_modules/.pnpm/@actions+tool-cache@2.0.2/node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -21041,21 +21041,21 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -21084,21 +21084,21 @@ var require_manifest = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver = __importStar(require_semver()); + var semver = __importStar2(require_semver()); var core_1 = require_core(); - var os7 = require("os"); + var os6 = require("os"); var cp = require("child_process"); - var fs4 = require("fs"); + var fs3 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter6(this, void 0, void 0, function* () { - const platFilter = os7.platform(); + return __awaiter7(this, void 0, void 0, function* () { + const platFilter = os6.platform(); let result; let match; let file; for (const candidate of candidates) { - const version3 = candidate.version; - (0, core_1.debug)(`check ${version3} satisfies ${versionSpec}`); - if (semver.satisfies(version3, versionSpec) && (!stable || candidate.stable === stable)) { + const version2 = candidate.version; + (0, core_1.debug)(`check ${version2} satisfies ${versionSpec}`); + if (semver.satisfies(version2, 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; @@ -21128,10 +21128,10 @@ var require_manifest = __commonJS({ } exports2._findMatch = _findMatch; function _getOsVersion() { - const plat = os7.platform(); - let version3 = ""; + const plat = os6.platform(); + let version2 = ""; if (plat === "darwin") { - version3 = cp.execSync("sw_vers -productVersion").toString(); + version2 = cp.execSync("sw_vers -productVersion").toString(); } else if (plat === "linux") { const lsbContents = module2.exports._readLinuxVersionFile(); if (lsbContents) { @@ -21139,23 +21139,23 @@ var require_manifest = __commonJS({ for (const line of lines) { const parts = line.split("="); if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version3 = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + version2 = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); break; } } } } - return version3; + return version2; } exports2._getOsVersion = _getOsVersion; function _readLinuxVersionFile() { const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs4.existsSync(lsbReleaseFile)) { - contents = fs4.readFileSync(lsbReleaseFile).toString(); - } else if (fs4.existsSync(osReleaseFile)) { - contents = fs4.readFileSync(osReleaseFile).toString(); + if (fs3.existsSync(lsbReleaseFile)) { + contents = fs3.readFileSync(lsbReleaseFile).toString(); + } else if (fs3.existsSync(osReleaseFile)) { + contents = fs3.readFileSync(osReleaseFile).toString(); } return contents; } @@ -21167,7 +21167,7 @@ var require_manifest = __commonJS({ var require_retry_helper = __commonJS({ "node_modules/.pnpm/@actions+tool-cache@2.0.2/node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -21180,21 +21180,21 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -21223,7 +21223,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core6 = __importStar(require_core()); + var core6 = __importStar2(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -21236,12 +21236,12 @@ var require_retry_helper = __commonJS({ throw new Error("min seconds should be less than or equal to max seconds"); } } - execute(action5, isRetryable) { - return __awaiter6(this, void 0, void 0, function* () { + execute(action, isRetryable) { + return __awaiter7(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { - return yield action5(); + return yield action(); } catch (err) { if (isRetryable && !isRetryable(err)) { throw err; @@ -21253,14 +21253,14 @@ var require_retry_helper = __commonJS({ yield this.sleep(seconds); attempt++; } - return yield action5(); + return yield action(); }); } getSleepAmount() { return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); }); } @@ -21273,7 +21273,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/.pnpm/@actions+tool-cache@2.0.2/node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -21286,21 +21286,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -21329,17 +21329,17 @@ 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 core6 = __importStar(require_core()); - var io = __importStar(require_io()); - var crypto = __importStar(require("crypto")); - var fs4 = __importStar(require("fs")); - var mm = __importStar(require_manifest()); - var os7 = __importStar(require("os")); - var path4 = __importStar(require("path")); - var httpm = __importStar(require_lib()); - var semver = __importStar(require_semver()); - var stream = __importStar(require("stream")); - var util3 = __importStar(require("util")); + var core6 = __importStar2(require_core()); + var io = __importStar2(require_io()); + var crypto = __importStar2(require("crypto")); + var fs3 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os6 = __importStar2(require("os")); + var path4 = __importStar2(require("path")); + var httpm = __importStar2(require_lib()); + var semver = __importStar2(require_semver()); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); var exec_1 = require_exec(); var retry_helper_1 = require_retry_helper(); @@ -21354,18 +21354,18 @@ var require_tool_cache = __commonJS({ var IS_WINDOWS = process.platform === "win32"; var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; - function downloadTool2(url2, dest, auth, headers) { - return __awaiter6(this, void 0, void 0, function* () { + function downloadTool2(url, dest, auth, headers) { + return __awaiter7(this, void 0, void 0, function* () { dest = dest || path4.join(_getTempDirectory(), crypto.randomUUID()); yield io.mkdirP(path4.dirname(dest)); - core6.debug(`Downloading ${url2}`); + core6.debug(`Downloading ${url}`); core6.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); - return yield retryHelper.execute(() => __awaiter6(this, void 0, void 0, function* () { - return yield downloadToolAttempt(url2, dest || "", auth, headers); + return yield retryHelper.execute(() => __awaiter7(this, void 0, void 0, function* () { + return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { @@ -21377,12 +21377,12 @@ var require_tool_cache = __commonJS({ }); } exports2.downloadTool = downloadTool2; - function downloadToolAttempt(url2, dest, auth, headers) { - return __awaiter6(this, void 0, void 0, function* () { - if (fs4.existsSync(dest)) { + function downloadToolAttempt(url, dest, auth, headers) { + return __awaiter7(this, void 0, void 0, function* () { + if (fs3.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } - const http2 = new httpm.HttpClient(userAgent, [], { + const http = new httpm.HttpClient(userAgent, [], { allowRetries: false }); if (auth) { @@ -21392,18 +21392,18 @@ var require_tool_cache = __commonJS({ } headers.authorization = auth; } - const response = yield http2.get(url2, headers); + const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core6.debug(`Failed to download from "${url2}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core6.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } - const pipeline = util3.promisify(stream.pipeline); + const pipeline = util.promisify(stream.pipeline); const responseMessageFactory = _getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY", () => response.message); const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs4.createWriteStream(dest)); + yield pipeline(readStream, fs3.createWriteStream(dest)); core6.debug("download complete"); succeeded = true; return dest; @@ -21420,7 +21420,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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); @@ -21473,7 +21473,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar(file, dest, flags = "xz") { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -21517,7 +21517,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar; function extractXar(file, dest, flags = []) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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); @@ -21538,7 +21538,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -21553,7 +21553,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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 io.which("pwsh", false); @@ -21599,7 +21599,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const unzipPath = yield io.which("unzip", true); const args = [file]; if (!core6.isDebug()) { @@ -21609,63 +21609,63 @@ var require_tool_cache = __commonJS({ yield (0, exec_1.exec)(`"${unzipPath}"`, args, { cwd: dest }); }); } - function cacheDir(sourceDir, tool, version3, arch2) { - return __awaiter6(this, void 0, void 0, function* () { - version3 = semver.clean(version3) || version3; - arch2 = arch2 || os7.arch(); - core6.debug(`Caching tool ${tool} ${version3} ${arch2}`); + function cacheDir(sourceDir, tool, version2, arch) { + return __awaiter7(this, void 0, void 0, function* () { + version2 = semver.clean(version2) || version2; + arch = arch || os6.arch(); + core6.debug(`Caching tool ${tool} ${version2} ${arch}`); core6.debug(`source dir: ${sourceDir}`); - if (!fs4.statSync(sourceDir).isDirectory()) { + if (!fs3.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } - const destPath = yield _createToolPath(tool, version3, arch2); - for (const itemName of fs4.readdirSync(sourceDir)) { + const destPath = yield _createToolPath(tool, version2, arch); + for (const itemName of fs3.readdirSync(sourceDir)) { const s = path4.join(sourceDir, itemName); yield io.cp(s, destPath, { recursive: true }); } - _completeToolPath(tool, version3, arch2); + _completeToolPath(tool, version2, arch); return destPath; }); } exports2.cacheDir = cacheDir; - function cacheFile(sourceFile, targetFile, tool, version3, arch2) { - return __awaiter6(this, void 0, void 0, function* () { - version3 = semver.clean(version3) || version3; - arch2 = arch2 || os7.arch(); - core6.debug(`Caching tool ${tool} ${version3} ${arch2}`); + function cacheFile(sourceFile, targetFile, tool, version2, arch) { + return __awaiter7(this, void 0, void 0, function* () { + version2 = semver.clean(version2) || version2; + arch = arch || os6.arch(); + core6.debug(`Caching tool ${tool} ${version2} ${arch}`); core6.debug(`source file: ${sourceFile}`); - if (!fs4.statSync(sourceFile).isFile()) { + if (!fs3.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } - const destFolder = yield _createToolPath(tool, version3, arch2); + const destFolder = yield _createToolPath(tool, version2, arch); const destPath = path4.join(destFolder, targetFile); core6.debug(`destination file ${destPath}`); yield io.cp(sourceFile, destPath); - _completeToolPath(tool, version3, arch2); + _completeToolPath(tool, version2, arch); return destFolder; }); } exports2.cacheFile = cacheFile; - function find(toolName, versionSpec, arch2) { + function find(toolName, versionSpec, arch) { if (!toolName) { throw new Error("toolName parameter is required"); } if (!versionSpec) { throw new Error("versionSpec parameter is required"); } - arch2 = arch2 || os7.arch(); + arch = arch || os6.arch(); if (!isExplicitVersion(versionSpec)) { - const localVersions = findAllVersions(toolName, arch2); + const localVersions = findAllVersions(toolName, arch); const match = evaluateVersions(localVersions, versionSpec); versionSpec = match; } let toolPath = ""; if (versionSpec) { versionSpec = semver.clean(versionSpec) || ""; - const cachePath2 = path4.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath2 = path4.join(_getCacheDirectory(), toolName, versionSpec, arch); core6.debug(`checking cache: ${cachePath2}`); - if (fs4.existsSync(cachePath2) && fs4.existsSync(`${cachePath2}.complete`)) { - core6.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); + if (fs3.existsSync(cachePath2) && fs3.existsSync(`${cachePath2}.complete`)) { + core6.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); toolPath = cachePath2; } else { core6.debug("not found"); @@ -21674,35 +21674,35 @@ var require_tool_cache = __commonJS({ return toolPath; } exports2.find = find; - function findAllVersions(toolName, arch2) { - const versions2 = []; - arch2 = arch2 || os7.arch(); + function findAllVersions(toolName, arch) { + const versions = []; + arch = arch || os6.arch(); const toolPath = path4.join(_getCacheDirectory(), toolName); - if (fs4.existsSync(toolPath)) { - const children = fs4.readdirSync(toolPath); + if (fs3.existsSync(toolPath)) { + const children = fs3.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path4.join(toolPath, child, arch2 || ""); - if (fs4.existsSync(fullPath) && fs4.existsSync(`${fullPath}.complete`)) { - versions2.push(child); + const fullPath = path4.join(toolPath, child, arch || ""); + if (fs3.existsSync(fullPath) && fs3.existsSync(`${fullPath}.complete`)) { + versions.push(child); } } } } - return versions2; + return versions; } exports2.findAllVersions = findAllVersions; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; - const http2 = new httpm.HttpClient("tool-cache"); + const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { core6.debug("set auth"); headers.authorization = auth; } - const response = yield http2.getJson(treeUrl, headers); + const response = yield http.getJson(treeUrl, headers); if (!response.result) { return releases; } @@ -21714,12 +21714,12 @@ var require_tool_cache = __commonJS({ } } headers["accept"] = "application/vnd.github.VERSION.raw"; - let versionsRaw = yield (yield http2.get(manifestUrl, headers)).readBody(); + let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody(); if (versionsRaw) { versionsRaw = versionsRaw.replace(/^\uFEFF/, ""); try { releases = JSON.parse(versionsRaw); - } catch (_a3) { + } catch (_a) { core6.debug("Invalid json"); } } @@ -21727,15 +21727,15 @@ var require_tool_cache = __commonJS({ }); } exports2.getManifestFromRepo = getManifestFromRepo; - function findFromManifest(versionSpec, stable, manifest, archFilter = os7.arch()) { - return __awaiter6(this, void 0, void 0, function* () { + function findFromManifest(versionSpec, stable, manifest, archFilter = os6.arch()) { + return __awaiter7(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (!dest) { dest = path4.join(_getTempDirectory(), crypto.randomUUID()); } @@ -21743,9 +21743,9 @@ var require_tool_cache = __commonJS({ return dest; }); } - function _createToolPath(tool, version3, arch2) { - return __awaiter6(this, void 0, void 0, function* () { - const folderPath = path4.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch2 || ""); + function _createToolPath(tool, version2, arch) { + return __awaiter7(this, void 0, void 0, function* () { + const folderPath = path4.join(_getCacheDirectory(), tool, semver.clean(version2) || version2, arch || ""); core6.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io.rmRF(folderPath); @@ -21754,10 +21754,10 @@ var require_tool_cache = __commonJS({ return folderPath; }); } - function _completeToolPath(tool, version3, arch2) { - const folderPath = path4.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch2 || ""); + function _completeToolPath(tool, version2, arch) { + const folderPath = path4.join(_getCacheDirectory(), tool, semver.clean(version2) || version2, arch || ""); const markerPath = `${folderPath}.complete`; - fs4.writeFileSync(markerPath, ""); + fs3.writeFileSync(markerPath, ""); core6.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -21768,29 +21768,29 @@ var require_tool_cache = __commonJS({ return valid; } exports2.isExplicitVersion = isExplicitVersion; - function evaluateVersions(versions2, versionSpec) { - let version3 = ""; - core6.debug(`evaluating ${versions2.length} versions`); - versions2 = versions2.sort((a, b) => { + function evaluateVersions(versions, versionSpec) { + let version2 = ""; + core6.debug(`evaluating ${versions.length} versions`); + versions = versions.sort((a, b) => { if (semver.gt(a, b)) { return 1; } return -1; }); - for (let i = versions2.length - 1; i >= 0; i--) { - const potential = versions2[i]; + for (let i = versions.length - 1; i >= 0; i--) { + const potential = versions[i]; const satisfied = semver.satisfies(potential, versionSpec); if (satisfied) { - version3 = potential; + version2 = potential; break; } } - if (version3) { - core6.debug(`matched: ${version3}`); + if (version2) { + core6.debug(`matched: ${version2}`); } else { core6.debug("match not found"); } - return version3; + return version2; } exports2.evaluateVersions = evaluateVersions; function _getCacheDirectory() { @@ -21845,8 +21845,8 @@ var require_posix = __commonJS({ } }; exports2.sync = sync; - var checkStat = (stat2, options2) => stat2.isFile() && checkMode(stat2, options2); - var checkMode = (stat2, options2) => { + var checkStat = (stat, options2) => stat.isFile() && checkMode(stat, options2); + var checkMode = (stat, options2) => { const myUid = options2.uid ?? process.getuid?.(); const myGroups = options2.groups ?? process.getgroups?.() ?? []; const myGid = options2.gid ?? process.getgid?.() ?? myGroups[0]; @@ -21854,9 +21854,9 @@ var require_posix = __commonJS({ throw new Error("cannot get uid or gid"); } const groups = /* @__PURE__ */ new Set([myGid, ...myGroups]); - const mod = stat2.mode; - const uid = stat2.uid; - const gid = stat2.gid; + const mod = stat.mode; + const uid = stat.uid; + const gid = stat.gid; const u = parseInt("100", 8); const g = parseInt("010", 8); const o = parseInt("001", 8); @@ -21913,7 +21913,7 @@ var require_win32 = __commonJS({ } return false; }; - var checkStat = (stat2, path4, options2) => stat2.isFile() && checkPathExt(path4, options2); + var checkStat = (stat, path4, options2) => stat.isFile() && checkPathExt(path4, options2); } }); @@ -21929,7 +21929,7 @@ var require_options = __commonJS({ var require_cjs = __commonJS({ "node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -21942,30 +21942,30 @@ var require_cjs = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(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.sync = exports2.isexe = exports2.posix = exports2.win32 = void 0; - var posix = __importStar(require_posix()); + var posix = __importStar2(require_posix()); exports2.posix = posix; - var win32 = __importStar(require_win32()); + var win32 = __importStar2(require_win32()); exports2.win32 = win32; - __exportStar(require_options(), exports2); + __exportStar2(require_options(), exports2); var platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform; var impl = platform === "win32" ? win32 : posix; exports2.isexe = impl.isexe; @@ -21978,7 +21978,7 @@ var require_lib2 = __commonJS({ "node_modules/.pnpm/which@5.0.0/node_modules/which/lib/index.js"(exports2, module2) { "use strict"; var { isexe, sync: isexeSync } = require_cjs(); - var { join, delimiter: delimiter3, sep, posix } = require("path"); + var { join, delimiter: delimiter2, sep, posix } = require("path"); var isWindows = process.platform === "win32"; var rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? "" : sep}]`.replace(/(\\)/g, "\\$1")); var rRel = new RegExp(`^\\.${rSlash.source}`); @@ -21986,7 +21986,7 @@ var require_lib2 = __commonJS({ var getPathInfo = (cmd, { path: optPath = process.env.PATH, pathExt: optPathExt = process.env.PATHEXT, - delimiter: optDelimiter = delimiter3 + delimiter: optDelimiter = delimiter2 }) => { const pathEnv = cmd.match(rSlash) ? [""] : [ // windows always checks the cwd first @@ -22006,8 +22006,8 @@ var require_lib2 = __commonJS({ }; var getPathPart = (raw, cmd) => { const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw; - const prefix2 = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ""; - return prefix2 + join(pathPart, cmd); + const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ""; + return prefix + join(pathPart, cmd); }; var which2 = async (cmd, opt = {}) => { const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); @@ -22067,14 +22067,14 @@ var require_utils3 = __commonJS({ "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/utils.js"(exports2) { "use strict"; exports2.__esModule = true; - exports2.extend = extend3; + exports2.extend = extend2; exports2.indexOf = indexOf; exports2.escapeExpression = escapeExpression; exports2.isEmpty = isEmpty; exports2.createFrame = createFrame; exports2.blockParams = blockParams; exports2.appendContextPath = appendContextPath; - var escape2 = { + var escape = { "&": "&", "<": "<", ">": ">", @@ -22086,9 +22086,9 @@ var require_utils3 = __commonJS({ var badChars = /[&<>"'`=]/g; var possible = /[&<>"'`=]/; function escapeChar(chr) { - return escape2[chr]; + return escape[chr]; } - function extend3(obj) { + function extend2(obj) { for (var i = 1; i < arguments.length; i++) { for (var key in arguments[i]) { if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { @@ -22098,19 +22098,19 @@ var require_utils3 = __commonJS({ } return obj; } - var toString3 = Object.prototype.toString; - exports2.toString = toString3; + var toString = Object.prototype.toString; + exports2.toString = toString; var isFunction = function isFunction2(value) { return typeof value === "function"; }; if (isFunction(/x/)) { exports2.isFunction = isFunction = function(value) { - return typeof value === "function" && toString3.call(value) === "[object Function]"; + return typeof value === "function" && toString.call(value) === "[object Function]"; }; } exports2.isFunction = isFunction; var isArray = Array.isArray || function(value) { - return value && typeof value === "object" ? toString3.call(value) === "[object Array]" : false; + return value && typeof value === "object" ? toString.call(value) === "[object Array]" : false; }; exports2.isArray = isArray; function indexOf(array2, value) { @@ -22147,7 +22147,7 @@ var require_utils3 = __commonJS({ } } function createFrame(object) { - var frame = extend3({}, object); + var frame = extend2({}, object); frame._parent = object; return frame; } @@ -22568,15 +22568,15 @@ var require_logger = __commonJS({ "use strict"; exports2.__esModule = true; var _utils = require_utils3(); - var logger5 = { + var logger = { methodMap: ["debug", "info", "warn", "error"], level: "info", // Maps a given level value to the `methodMap` indexes above. lookupLevel: function lookupLevel(level) { if (typeof level === "string") { - var levelMap2 = _utils.indexOf(logger5.methodMap, level.toLowerCase()); - if (levelMap2 >= 0) { - level = levelMap2; + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; } else { level = parseInt(level, 10); } @@ -22584,10 +22584,10 @@ var require_logger = __commonJS({ return level; }, // Can be overridden in the host environment - log: function log2(level) { - level = logger5.lookupLevel(level); - if (typeof console !== "undefined" && logger5.lookupLevel(logger5.level) <= level) { - var method = logger5.methodMap[level]; + log: function log(level) { + level = logger.lookupLevel(level); + if (typeof console !== "undefined" && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; if (!console[method]) { method = "log"; } @@ -22598,7 +22598,7 @@ var require_logger = __commonJS({ } } }; - exports2["default"] = logger5; + exports2["default"] = logger; module2.exports = exports2["default"]; } }); @@ -22778,8 +22778,8 @@ var require_base = __commonJS({ _internalProtoAccess.resetLoggedProperties(); } }; - var log2 = _logger2["default"].log; - exports2.log = log2; + var log = _logger2["default"].log; + exports2.log = log; exports2.createFrame = _utils.createFrame; exports2.logger = _logger2["default"]; } @@ -23528,22 +23528,22 @@ var require_parser = __commonJS({ } return token; } - var symbol, preErrorSymbol, state3, action5, a, r, yyval = {}, p, len, newState, expected; + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; while (true) { - state3 = stack[stack.length - 1]; - if (this.defaultActions[state3]) { - action5 = this.defaultActions[state3]; + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; } else { if (symbol === null || typeof symbol == "undefined") { symbol = lex(); } - action5 = table[state3] && table[state3][symbol]; + action = table[state] && table[state][symbol]; } - if (typeof action5 === "undefined" || !action5.length || !action5[0]) { + if (typeof action === "undefined" || !action.length || !action[0]) { var errStr = ""; if (!recovering) { expected = []; - for (p in table[state3]) if (this.terminals_[p] && p > 2) { + for (p in table[state]) if (this.terminals_[p] && p > 2) { expected.push("'" + this.terminals_[p] + "'"); } if (this.lexer.showPosition) { @@ -23554,15 +23554,15 @@ var require_parser = __commonJS({ this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected }); } } - if (action5[0] instanceof Array && action5.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state3 + ", token: " + symbol); + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); } - switch (action5[0]) { + switch (action[0]) { case 1: stack.push(symbol); vstack.push(this.lexer.yytext); lstack.push(this.lexer.yylloc); - stack.push(action5[1]); + stack.push(action[1]); symbol = null; if (!preErrorSymbol) { yyleng = this.lexer.yyleng; @@ -23576,13 +23576,13 @@ var require_parser = __commonJS({ } break; case 2: - len = this.productions_[action5[1]][1]; + len = this.productions_[action[1]][1]; yyval.$ = vstack[vstack.length - len]; yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; if (ranges) { yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action5[1], vstack, lstack); + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); if (typeof r !== "undefined") { return r; } @@ -23591,7 +23591,7 @@ var require_parser = __commonJS({ vstack = vstack.slice(0, -1 * len); lstack = lstack.slice(0, -1 * len); } - stack.push(this.productions_[action5[1]][0]); + stack.push(this.productions_[action[1]][0]); vstack.push(yyval.$); lstack.push(yyval._$); newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; @@ -23997,7 +23997,7 @@ var require_visitor = __commonJS({ } } }, - accept: function accept3(object) { + accept: function accept(object) { if (!object) { return; } @@ -24091,33 +24091,33 @@ var require_whitespace_control = __commonJS({ var doStandalone = !this.options.ignoreStandalone; var isRoot = !this.isRootSeen; this.isRootSeen = true; - var body2 = program.body; - for (var i = 0, l = body2.length; i < l; i++) { - var current = body2[i], strip = this.accept(current); + var body = program.body; + for (var i = 0, l = body.length; i < l; i++) { + var current = body[i], strip = this.accept(current); if (!strip) { continue; } - var _isPrevWhitespace = isPrevWhitespace(body2, i, isRoot), _isNextWhitespace = isNextWhitespace(body2, i, isRoot), openStandalone = strip.openStandalone && _isPrevWhitespace, closeStandalone = strip.closeStandalone && _isNextWhitespace, inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; + var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), _isNextWhitespace = isNextWhitespace(body, i, isRoot), openStandalone = strip.openStandalone && _isPrevWhitespace, closeStandalone = strip.closeStandalone && _isNextWhitespace, inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; if (strip.close) { - omitRight(body2, i, true); + omitRight(body, i, true); } if (strip.open) { - omitLeft(body2, i, true); + omitLeft(body, i, true); } if (doStandalone && inlineStandalone) { - omitRight(body2, i); - if (omitLeft(body2, i)) { + omitRight(body, i); + if (omitLeft(body, i)) { if (current.type === "PartialStatement") { - current.indent = /([ \t]+$)/.exec(body2[i - 1].original)[1]; + current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; } } } if (doStandalone && openStandalone) { omitRight((current.program || current.inverse).body); - omitLeft(body2, i); + omitLeft(body, i); } if (doStandalone && closeStandalone) { - omitRight(body2, i); + omitRight(body, i); omitLeft((current.inverse || current.program).body); } } @@ -24175,11 +24175,11 @@ var require_whitespace_control = __commonJS({ close: strip.close }; }; - function isPrevWhitespace(body2, i, isRoot) { + function isPrevWhitespace(body, i, isRoot) { if (i === void 0) { - i = body2.length; + i = body.length; } - var prev = body2[i - 1], sibling = body2[i - 2]; + var prev = body[i - 1], sibling = body[i - 2]; if (!prev) { return isRoot; } @@ -24187,11 +24187,11 @@ var require_whitespace_control = __commonJS({ return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); } } - function isNextWhitespace(body2, i, isRoot) { + function isNextWhitespace(body, i, isRoot) { if (i === void 0) { i = -1; } - var next = body2[i + 1], sibling = body2[i + 2]; + var next = body[i + 1], sibling = body[i + 2]; if (!next) { return isRoot; } @@ -24199,8 +24199,8 @@ var require_whitespace_control = __commonJS({ return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); } } - function omitRight(body2, i, multiple) { - var current = body2[i == null ? 0 : i + 1]; + function omitRight(body, i, multiple) { + var current = body[i == null ? 0 : i + 1]; if (!current || current.type !== "ContentStatement" || !multiple && current.rightStripped) { return; } @@ -24208,8 +24208,8 @@ var require_whitespace_control = __commonJS({ current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ""); current.rightStripped = current.value !== original; } - function omitLeft(body2, i, multiple) { - var current = body2[i == null ? body2.length - 1 : i - 1]; + function omitLeft(body, i, multiple) { + var current = body[i == null ? body.length - 1 : i - 1]; if (!current || current.type !== "ContentStatement" || !multiple && current.leftStripped) { return; } @@ -24532,7 +24532,7 @@ var require_compiler = __commonJS({ this.useDepths = this.useDepths || result.useDepths; return guid2; }, - accept: function accept3(node) { + accept: function accept(node) { if (!this[node.type]) { throw new _exception2["default"]("Unknown type: " + node.type, node); } @@ -24543,9 +24543,9 @@ var require_compiler = __commonJS({ }, Program: function Program(program) { this.options.blockParams.unshift(program.blockParams); - var body2 = program.body, bodyLength = body2.length; + var body = program.body, bodyLength = body.length; for (var i = 0; i < bodyLength; i++) { - this.accept(body2[i]); + this.accept(body[i]); } this.options.blockParams.shift(); this.isSimple = bodyLength === 1; @@ -24557,10 +24557,10 @@ var require_compiler = __commonJS({ var program = block.program, inverse = block.inverse; program = program && this.compileProgram(program); inverse = inverse && this.compileProgram(inverse); - var type2 = this.classifySexpr(block); - if (type2 === "helper") { + var type = this.classifySexpr(block); + if (type === "helper") { this.helperSexpr(block, program, inverse); - } else if (type2 === "simple") { + } else if (type === "simple") { this.simpleSexpr(block); this.opcode("pushProgram", program); this.opcode("pushProgram", inverse); @@ -24633,10 +24633,10 @@ var require_compiler = __commonJS({ }, SubExpression: function SubExpression(sexpr) { transformLiteralToPath(sexpr); - var type2 = this.classifySexpr(sexpr); - if (type2 === "simple") { + var type = this.classifySexpr(sexpr); + if (type === "simple") { this.simpleSexpr(sexpr); - } else if (type2 === "helper") { + } else if (type === "helper") { this.helperSexpr(sexpr); } else { this.ambiguousSexpr(sexpr); @@ -25014,34 +25014,34 @@ var require_util8 = __commonJS({ } exports2.urlParse = urlParse; function urlGenerate(aParsedUrl) { - var url2 = ""; + var url = ""; if (aParsedUrl.scheme) { - url2 += aParsedUrl.scheme + ":"; + url += aParsedUrl.scheme + ":"; } - url2 += "//"; + url += "//"; if (aParsedUrl.auth) { - url2 += aParsedUrl.auth + "@"; + url += aParsedUrl.auth + "@"; } if (aParsedUrl.host) { - url2 += aParsedUrl.host; + url += aParsedUrl.host; } if (aParsedUrl.port) { - url2 += ":" + aParsedUrl.port; + url += ":" + aParsedUrl.port; } if (aParsedUrl.path) { - url2 += aParsedUrl.path; + url += aParsedUrl.path; } - return url2; + return url; } exports2.urlGenerate = urlGenerate; function normalize(aPath) { var path4 = aPath; - var url2 = urlParse(aPath); - if (url2) { - if (!url2.path) { + var url = urlParse(aPath); + if (url) { + if (!url.path) { return aPath; } - path4 = url2.path; + path4 = url.path; } var isAbsolute = exports2.isAbsolute(path4); var parts = path4.split(/\/+/); @@ -25065,9 +25065,9 @@ var require_util8 = __commonJS({ if (path4 === "") { path4 = isAbsolute ? "/" : "."; } - if (url2) { - url2.path = path4; - return urlGenerate(url2); + if (url) { + url.path = path4; + return urlGenerate(url); } return path4; } @@ -25289,7 +25289,7 @@ var require_util8 = __commonJS({ var require_array_set = __commonJS({ "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js"(exports2) { "use strict"; - var util3 = require_util8(); + var util = require_util8(); var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; function ArraySet() { @@ -25307,7 +25307,7 @@ var require_array_set = __commonJS({ return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; }; ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util3.toSetString(aStr); + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); var idx = this._array.length; if (!isDuplicate || aAllowDuplicates) { @@ -25325,7 +25325,7 @@ var require_array_set = __commonJS({ if (hasNativeMap) { return this._set.has(aStr); } else { - var sStr = util3.toSetString(aStr); + var sStr = util.toSetString(aStr); return has.call(this._set, sStr); } }; @@ -25336,7 +25336,7 @@ var require_array_set = __commonJS({ return idx; } } else { - var sStr = util3.toSetString(aStr); + var sStr = util.toSetString(aStr); if (has.call(this._set, sStr)) { return this._set[sStr]; } @@ -25360,13 +25360,13 @@ var require_array_set = __commonJS({ var require_mapping_list = __commonJS({ "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js"(exports2) { "use strict"; - var util3 = require_util8(); + var util = require_util8(); function generatedPositionAfter(mappingA, mappingB) { var lineA = mappingA.generatedLine; var lineB = mappingB.generatedLine; var columnA = mappingA.generatedColumn; var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || util3.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; } function MappingList() { this._array = []; @@ -25387,7 +25387,7 @@ var require_mapping_list = __commonJS({ }; MappingList.prototype.toArray = function MappingList_toArray() { if (!this._sorted) { - this._array.sort(util3.compareByGeneratedPositionsInflated); + this._array.sort(util.compareByGeneratedPositionsInflated); this._sorted = true; } return this._array; @@ -25401,16 +25401,16 @@ var require_source_map_generator = __commonJS({ "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js"(exports2) { "use strict"; var base64VLQ = require_base64_vlq(); - var util3 = require_util8(); + var util = require_util8(); var ArraySet = require_array_set().ArraySet; var MappingList = require_mapping_list().MappingList; function SourceMapGenerator(aArgs) { if (!aArgs) { aArgs = {}; } - this._file = util3.getArg(aArgs, "file", null); - this._sourceRoot = util3.getArg(aArgs, "sourceRoot", null); - this._skipValidation = util3.getArg(aArgs, "skipValidation", false); + this._file = util.getArg(aArgs, "file", null); + this._sourceRoot = util.getArg(aArgs, "sourceRoot", null); + this._skipValidation = util.getArg(aArgs, "skipValidation", false); this._sources = new ArraySet(); this._names = new ArraySet(); this._mappings = new MappingList(); @@ -25433,7 +25433,7 @@ var require_source_map_generator = __commonJS({ if (mapping.source != null) { newMapping.source = mapping.source; if (sourceRoot != null) { - newMapping.source = util3.relative(sourceRoot, newMapping.source); + newMapping.source = util.relative(sourceRoot, newMapping.source); } newMapping.original = { line: mapping.originalLine, @@ -25448,7 +25448,7 @@ var require_source_map_generator = __commonJS({ aSourceMapConsumer.sources.forEach(function(sourceFile) { var sourceRelative = sourceFile; if (sourceRoot !== null) { - sourceRelative = util3.relative(sourceRoot, sourceFile); + sourceRelative = util.relative(sourceRoot, sourceFile); } if (!generator._sources.has(sourceRelative)) { generator._sources.add(sourceRelative); @@ -25461,10 +25461,10 @@ var require_source_map_generator = __commonJS({ return generator; }; SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { - var generated = util3.getArg(aArgs, "generated"); - var original = util3.getArg(aArgs, "original", null); - var source = util3.getArg(aArgs, "source", null); - var name = util3.getArg(aArgs, "name", null); + var generated = util.getArg(aArgs, "generated"); + var original = util.getArg(aArgs, "original", null); + var source = util.getArg(aArgs, "source", null); + var name = util.getArg(aArgs, "name", null); if (!this._skipValidation) { this._validateMapping(generated, original, source, name); } @@ -25492,15 +25492,15 @@ var require_source_map_generator = __commonJS({ SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { var source = aSourceFile; if (this._sourceRoot != null) { - source = util3.relative(this._sourceRoot, source); + source = util.relative(this._sourceRoot, source); } if (aSourceContent != null) { if (!this._sourcesContents) { this._sourcesContents = /* @__PURE__ */ Object.create(null); } - this._sourcesContents[util3.toSetString(source)] = aSourceContent; + this._sourcesContents[util.toSetString(source)] = aSourceContent; } else if (this._sourcesContents) { - delete this._sourcesContents[util3.toSetString(source)]; + delete this._sourcesContents[util.toSetString(source)]; if (Object.keys(this._sourcesContents).length === 0) { this._sourcesContents = null; } @@ -25518,7 +25518,7 @@ var require_source_map_generator = __commonJS({ } var sourceRoot = this._sourceRoot; if (sourceRoot != null) { - sourceFile = util3.relative(sourceRoot, sourceFile); + sourceFile = util.relative(sourceRoot, sourceFile); } var newSources = new ArraySet(); var newNames = new ArraySet(); @@ -25531,10 +25531,10 @@ var require_source_map_generator = __commonJS({ if (original.source != null) { mapping.source = original.source; if (aSourceMapPath != null) { - mapping.source = util3.join(aSourceMapPath, mapping.source); + mapping.source = util.join(aSourceMapPath, mapping.source); } if (sourceRoot != null) { - mapping.source = util3.relative(sourceRoot, mapping.source); + mapping.source = util.relative(sourceRoot, mapping.source); } mapping.originalLine = original.line; mapping.originalColumn = original.column; @@ -25558,10 +25558,10 @@ var require_source_map_generator = __commonJS({ var content = aSourceMapConsumer.sourceContentFor(sourceFile2); if (content != null) { if (aSourceMapPath != null) { - sourceFile2 = util3.join(aSourceMapPath, sourceFile2); + sourceFile2 = util.join(aSourceMapPath, sourceFile2); } if (sourceRoot != null) { - sourceFile2 = util3.relative(sourceRoot, sourceFile2); + sourceFile2 = util.relative(sourceRoot, sourceFile2); } this.setSourceContent(sourceFile2, content); } @@ -25610,7 +25610,7 @@ var require_source_map_generator = __commonJS({ } } else { if (i > 0) { - if (!util3.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { continue; } next += ","; @@ -25642,9 +25642,9 @@ var require_source_map_generator = __commonJS({ return null; } if (aSourceRoot != null) { - source = util3.relative(aSourceRoot, source); + source = util.relative(aSourceRoot, source); } - var key = util3.toSetString(source); + var key = util.toSetString(source); return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; }, this); }; @@ -25770,7 +25770,7 @@ var require_quick_sort = __commonJS({ var require_source_map_consumer = __commonJS({ "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js"(exports2) { "use strict"; - var util3 = require_util8(); + var util = require_util8(); var binarySearch = require_binary_search(); var ArraySet = require_array_set().ArraySet; var base64VLQ = require_base64_vlq(); @@ -25778,7 +25778,7 @@ var require_source_map_consumer = __commonJS({ function SourceMapConsumer(aSourceMap, aSourceMapURL) { var sourceMap = aSourceMap; if (typeof aSourceMap === "string") { - sourceMap = util3.parseSourceMapInput(aSourceMap); + sourceMap = util.parseSourceMapInput(aSourceMap); } return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); } @@ -25836,7 +25836,7 @@ var require_source_map_consumer = __commonJS({ var sourceRoot = this.sourceRoot; mappings.map(function(mapping) { var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util3.computeSourceURL(sourceRoot, source, this._sourceMapURL); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); return { source, generatedLine: mapping.generatedLine, @@ -25848,11 +25848,11 @@ var require_source_map_consumer = __commonJS({ }, this).forEach(aCallback, context); }; SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util3.getArg(aArgs, "line"); + var line = util.getArg(aArgs, "line"); var needle = { - source: util3.getArg(aArgs, "source"), + source: util.getArg(aArgs, "source"), originalLine: line, - originalColumn: util3.getArg(aArgs, "column", 0) + originalColumn: util.getArg(aArgs, "column", 0) }; needle.source = this._findSourceIndex(needle.source); if (needle.source < 0) { @@ -25864,7 +25864,7 @@ var require_source_map_consumer = __commonJS({ this._originalMappings, "originalLine", "originalColumn", - util3.compareByOriginalPositions, + util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND ); if (index >= 0) { @@ -25873,9 +25873,9 @@ var require_source_map_consumer = __commonJS({ var originalLine = mapping.originalLine; while (mapping && mapping.originalLine === originalLine) { mappings.push({ - line: util3.getArg(mapping, "generatedLine", null), - column: util3.getArg(mapping, "generatedColumn", null), - lastColumn: util3.getArg(mapping, "lastGeneratedColumn", null) + line: util.getArg(mapping, "generatedLine", null), + column: util.getArg(mapping, "generatedColumn", null), + lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) }); mapping = this._originalMappings[++index]; } @@ -25883,9 +25883,9 @@ var require_source_map_consumer = __commonJS({ var originalColumn = mapping.originalColumn; while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) { mappings.push({ - line: util3.getArg(mapping, "generatedLine", null), - column: util3.getArg(mapping, "generatedColumn", null), - lastColumn: util3.getArg(mapping, "lastGeneratedColumn", null) + line: util.getArg(mapping, "generatedLine", null), + column: util.getArg(mapping, "generatedColumn", null), + lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) }); mapping = this._originalMappings[++index]; } @@ -25897,28 +25897,28 @@ var require_source_map_consumer = __commonJS({ function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { var sourceMap = aSourceMap; if (typeof aSourceMap === "string") { - sourceMap = util3.parseSourceMapInput(aSourceMap); - } - var version3 = util3.getArg(sourceMap, "version"); - var sources = util3.getArg(sourceMap, "sources"); - var names = util3.getArg(sourceMap, "names", []); - var sourceRoot = util3.getArg(sourceMap, "sourceRoot", null); - var sourcesContent = util3.getArg(sourceMap, "sourcesContent", null); - var mappings = util3.getArg(sourceMap, "mappings"); - var file = util3.getArg(sourceMap, "file", null); - if (version3 != this._version) { - throw new Error("Unsupported version: " + version3); + sourceMap = util.parseSourceMapInput(aSourceMap); + } + var version2 = util.getArg(sourceMap, "version"); + var sources = util.getArg(sourceMap, "sources"); + var names = util.getArg(sourceMap, "names", []); + var sourceRoot = util.getArg(sourceMap, "sourceRoot", null); + var sourcesContent = util.getArg(sourceMap, "sourcesContent", null); + var mappings = util.getArg(sourceMap, "mappings"); + var file = util.getArg(sourceMap, "file", null); + if (version2 != this._version) { + throw new Error("Unsupported version: " + version2); } if (sourceRoot) { - sourceRoot = util3.normalize(sourceRoot); + sourceRoot = util.normalize(sourceRoot); } - sources = sources.map(String).map(util3.normalize).map(function(source) { - return sourceRoot && util3.isAbsolute(sourceRoot) && util3.isAbsolute(source) ? util3.relative(sourceRoot, source) : source; + sources = sources.map(String).map(util.normalize).map(function(source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source; }); this._names = ArraySet.fromArray(names.map(String), true); this._sources = ArraySet.fromArray(sources, true); this._absoluteSources = this._sources.toArray().map(function(s) { - return util3.computeSourceURL(sourceRoot, s, aSourceMapURL); + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); }); this.sourceRoot = sourceRoot; this.sourcesContent = sourcesContent; @@ -25931,7 +25931,7 @@ var require_source_map_consumer = __commonJS({ BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { var relativeSource = aSource; if (this.sourceRoot != null) { - relativeSource = util3.relative(this.sourceRoot, relativeSource); + relativeSource = util.relative(this.sourceRoot, relativeSource); } if (this._sources.has(relativeSource)) { return this._sources.indexOf(relativeSource); @@ -25956,7 +25956,7 @@ var require_source_map_consumer = __commonJS({ smc.file = aSourceMap._file; smc._sourceMapURL = aSourceMapURL; smc._absoluteSources = smc._sources.toArray().map(function(s) { - return util3.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); }); var generatedMappings = aSourceMap._mappings.toArray().slice(); var destGeneratedMappings = smc.__generatedMappings = []; @@ -25977,7 +25977,7 @@ var require_source_map_consumer = __commonJS({ } destGeneratedMappings.push(destMapping); } - quickSort(smc.__originalMappings, util3.compareByOriginalPositions); + quickSort(smc.__originalMappings, util.compareByOriginalPositions); return smc; }; BasicSourceMapConsumer.prototype._version = 3; @@ -26064,9 +26064,9 @@ var require_source_map_consumer = __commonJS({ } } } - quickSort(generatedMappings, util3.compareByGeneratedPositionsDeflated); + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); this.__generatedMappings = generatedMappings; - quickSort(originalMappings, util3.compareByOriginalPositions); + quickSort(originalMappings, util.compareByOriginalPositions); this.__originalMappings = originalMappings; }; BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) { @@ -26093,33 +26093,33 @@ var require_source_map_consumer = __commonJS({ }; BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { var needle = { - generatedLine: util3.getArg(aArgs, "line"), - generatedColumn: util3.getArg(aArgs, "column") + generatedLine: util.getArg(aArgs, "line"), + generatedColumn: util.getArg(aArgs, "column") }; var index = this._findMapping( needle, this._generatedMappings, "generatedLine", "generatedColumn", - util3.compareByGeneratedPositionsDeflated, - util3.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND) + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND) ); if (index >= 0) { var mapping = this._generatedMappings[index]; if (mapping.generatedLine === needle.generatedLine) { - var source = util3.getArg(mapping, "source", null); + var source = util.getArg(mapping, "source", null); if (source !== null) { source = this._sources.at(source); - source = util3.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); } - var name = util3.getArg(mapping, "name", null); + var name = util.getArg(mapping, "name", null); if (name !== null) { name = this._names.at(name); } return { source, - line: util3.getArg(mapping, "originalLine", null), - column: util3.getArg(mapping, "originalColumn", null), + line: util.getArg(mapping, "originalLine", null), + column: util.getArg(mapping, "originalColumn", null), name }; } @@ -26149,15 +26149,15 @@ var require_source_map_consumer = __commonJS({ } var relativeSource = aSource; if (this.sourceRoot != null) { - relativeSource = util3.relative(this.sourceRoot, relativeSource); + relativeSource = util.relative(this.sourceRoot, relativeSource); } - var url2; - if (this.sourceRoot != null && (url2 = util3.urlParse(this.sourceRoot))) { + var url; + if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) { var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url2.scheme == "file" && this._sources.has(fileUriAbsPath)) { + if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) { return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]; } - if ((!url2.path || url2.path == "/") && this._sources.has("/" + relativeSource)) { + if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) { return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; } } @@ -26168,7 +26168,7 @@ var require_source_map_consumer = __commonJS({ } }; BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util3.getArg(aArgs, "source"); + var source = util.getArg(aArgs, "source"); source = this._findSourceIndex(source); if (source < 0) { return { @@ -26179,24 +26179,24 @@ var require_source_map_consumer = __commonJS({ } var needle = { source, - originalLine: util3.getArg(aArgs, "line"), - originalColumn: util3.getArg(aArgs, "column") + originalLine: util.getArg(aArgs, "line"), + originalColumn: util.getArg(aArgs, "column") }; var index = this._findMapping( needle, this._originalMappings, "originalLine", "originalColumn", - util3.compareByOriginalPositions, - util3.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND) + util.compareByOriginalPositions, + util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND) ); if (index >= 0) { var mapping = this._originalMappings[index]; if (mapping.source === needle.source) { return { - line: util3.getArg(mapping, "generatedLine", null), - column: util3.getArg(mapping, "generatedColumn", null), - lastColumn: util3.getArg(mapping, "lastGeneratedColumn", null) + line: util.getArg(mapping, "generatedLine", null), + column: util.getArg(mapping, "generatedColumn", null), + lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) }; } } @@ -26210,12 +26210,12 @@ var require_source_map_consumer = __commonJS({ function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { var sourceMap = aSourceMap; if (typeof aSourceMap === "string") { - sourceMap = util3.parseSourceMapInput(aSourceMap); + sourceMap = util.parseSourceMapInput(aSourceMap); } - var version3 = util3.getArg(sourceMap, "version"); - var sections = util3.getArg(sourceMap, "sections"); - if (version3 != this._version) { - throw new Error("Unsupported version: " + version3); + var version2 = util.getArg(sourceMap, "version"); + var sections = util.getArg(sourceMap, "sections"); + if (version2 != this._version) { + throw new Error("Unsupported version: " + version2); } this._sources = new ArraySet(); this._names = new ArraySet(); @@ -26227,9 +26227,9 @@ var require_source_map_consumer = __commonJS({ if (s.url) { throw new Error("Support for url field in sections not implemented."); } - var offset = util3.getArg(s, "offset"); - var offsetLine = util3.getArg(offset, "line"); - var offsetColumn = util3.getArg(offset, "column"); + var offset = util.getArg(s, "offset"); + var offsetLine = util.getArg(offset, "line"); + var offsetColumn = util.getArg(offset, "column"); if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) { throw new Error("Section offsets must be ordered and non-overlapping."); } @@ -26241,7 +26241,7 @@ var require_source_map_consumer = __commonJS({ generatedLine: offsetLine + 1, generatedColumn: offsetColumn + 1 }, - consumer: new SourceMapConsumer(util3.getArg(s, "map"), aSourceMapURL) + consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL) }; }); } @@ -26261,8 +26261,8 @@ var require_source_map_consumer = __commonJS({ }); IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { var needle = { - generatedLine: util3.getArg(aArgs, "line"), - generatedColumn: util3.getArg(aArgs, "column") + generatedLine: util.getArg(aArgs, "line"), + generatedColumn: util.getArg(aArgs, "column") }; var sectionIndex = binarySearch.search( needle, @@ -26312,7 +26312,7 @@ var require_source_map_consumer = __commonJS({ IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { for (var i = 0; i < this._sections.length; i++) { var section = this._sections[i]; - if (section.consumer._findSourceIndex(util3.getArg(aArgs, "source")) === -1) { + if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) { continue; } var generatedPosition = section.consumer.generatedPositionFor(aArgs); @@ -26338,7 +26338,7 @@ var require_source_map_consumer = __commonJS({ for (var j = 0; j < sectionMappings.length; j++) { var mapping = sectionMappings[j]; var source = section.consumer._sources.at(mapping.source); - source = util3.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); this._sources.add(source); source = this._sources.indexOf(source); var name = null; @@ -26361,8 +26361,8 @@ var require_source_map_consumer = __commonJS({ } } } - quickSort(this.__generatedMappings, util3.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util3.compareByOriginalPositions); + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); }; exports2.IndexedSourceMapConsumer = IndexedSourceMapConsumer; } @@ -26373,7 +26373,7 @@ var require_source_node = __commonJS({ "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js"(exports2) { "use strict"; var SourceMapGenerator = require_source_map_generator().SourceMapGenerator; - var util3 = require_util8(); + var util = require_util8(); var REGEX_NEWLINE = /(\r?\n)/; var NEWLINE_CODE = 10; var isSourceNode = "$$$isSourceNode$$$"; @@ -26439,7 +26439,7 @@ var require_source_node = __commonJS({ var content = aSourceMapConsumer.sourceContentFor(sourceFile); if (content != null) { if (aRelativePath != null) { - sourceFile = util3.join(aRelativePath, sourceFile); + sourceFile = util.join(aRelativePath, sourceFile); } node.setSourceContent(sourceFile, content); } @@ -26449,7 +26449,7 @@ var require_source_node = __commonJS({ if (mapping === null || mapping.source === void 0) { node.add(code); } else { - var source = aRelativePath ? util3.join(aRelativePath, mapping.source) : mapping.source; + var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source; node.add(new SourceNode( mapping.originalLine, mapping.originalColumn, @@ -26535,7 +26535,7 @@ var require_source_node = __commonJS({ return this; }; SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util3.toSetString(aSourceFile)] = aSourceContent; + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; }; SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) { for (var i = 0, len = this.children.length; i < len; i++) { @@ -26545,7 +26545,7 @@ var require_source_node = __commonJS({ } var sources = Object.keys(this.sourceContents); for (var i = 0, len = sources.length; i < len; i++) { - aFn(util3.fromSetString(sources[i]), this.sourceContents[sources[i]]); + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); } }; SourceNode.prototype.toString = function SourceNode_toString() { @@ -26682,7 +26682,7 @@ var require_code_gen = __commonJS({ toStringWithSourceMap: function toStringWithSourceMap() { return { code: this.toString() }; }, - toString: function toString3() { + toString: function toString() { return this.src; } }; @@ -26737,9 +26737,9 @@ var require_code_gen = __commonJS({ chunk = castChunk(chunk, this, loc); return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); }, - functionCall: function functionCall(fn, type2, params) { + functionCall: function functionCall(fn, type, params) { params = this.generateList(params); - return this.wrap([fn, type2 ? "." + type2 + "(" : "(", params, ")"]); + return this.wrap([fn, type ? "." + type + "(" : "(", params, ")"]); }, quotedString: function quotedString(str) { return '"' + (str + "").replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029") + '"'; @@ -26809,8 +26809,8 @@ var require_javascript_compiler = __commonJS({ return [this.aliasable("container.lookup"), "(depths, ", JSON.stringify(name), ")"]; }, compilerInfo: function compilerInfo() { - var revision = _base.COMPILER_REVISION, versions2 = _base.REVISION_CHANGES[revision]; - return [revision, versions2]; + var revision = _base.COMPILER_REVISION, versions = _base.REVISION_CHANGES[revision]; + return [revision, versions]; }, appendToBuffer: function appendToBuffer(source, location, explicit) { if (!_utils.isArray(source)) { @@ -27166,16 +27166,16 @@ var require_javascript_compiler = __commonJS({ } this.resolvePath("data", parts, 0, true, strict); }, - resolvePath: function resolvePath(type2, parts, i, falsy, strict) { + resolvePath: function resolvePath(type, parts, i, falsy, strict) { var _this2 = this; if (this.options.strict || this.options.assumeObjects) { - this.push(strictLookup(this.options.strict && strict, this, parts, i, type2)); + this.push(strictLookup(this.options.strict && strict, this, parts, i, type)); return; } var len = parts.length; for (; i < len; i++) { this.replaceStack(function(current) { - var lookup = _this2.nameLookup(current, parts[i], type2); + var lookup = _this2.nameLookup(current, parts[i], type); if (!falsy) { return [" != null ? ", lookup, " : ", current]; } else { @@ -27202,10 +27202,10 @@ var require_javascript_compiler = __commonJS({ // This opcode is designed for use in string mode, which // provides the string value of a parameter along with its // depth rather than resolving it immediately. - pushStringParam: function pushStringParam(string3, type2) { + pushStringParam: function pushStringParam(string3, type) { this.pushContext(); - this.pushString(type2); - if (type2 !== "SubExpression") { + this.pushString(type); + if (type !== "SubExpression") { if (typeof string3 === "string") { this.pushString(string3); } else { @@ -27392,32 +27392,32 @@ var require_javascript_compiler = __commonJS({ // // Pops a value off the stack and assigns it to the current hash assignToHash: function assignToHash(key) { - var value = this.popStack(), context = void 0, type2 = void 0, id = void 0; + var value = this.popStack(), context = void 0, type = void 0, id = void 0; if (this.trackIds) { id = this.popStack(); } if (this.stringParams) { - type2 = this.popStack(); + type = this.popStack(); context = this.popStack(); } var hash = this.hash; if (context) { hash.contexts[key] = context; } - if (type2) { - hash.types[key] = type2; + if (type) { + hash.types[key] = type; } if (id) { hash.ids[key] = id; } hash.values[key] = value; }, - pushId: function pushId(type2, name, child) { - if (type2 === "BlockParam") { + pushId: function pushId(type, name, child) { + if (type === "BlockParam") { this.pushStackLiteral("blockParams[" + name[0] + "].path[" + name[1] + "]" + (child ? " + " + JSON.stringify("." + child) : "")); - } else if (type2 === "PathExpression") { + } else if (type === "PathExpression") { this.pushString(name); - } else if (type2 === "SubExpression") { + } else if (type === "SubExpression") { this.pushStackLiteral("true"); } else { this.pushStackLiteral("null"); @@ -27495,19 +27495,19 @@ var require_javascript_compiler = __commonJS({ } }, replaceStack: function replaceStack(callback) { - var prefix2 = ["("], stack = void 0, createdStack = void 0, usedLiteral = void 0; + var prefix = ["("], stack = void 0, createdStack = void 0, usedLiteral = void 0; if (!this.isInline()) { throw new _exception2["default"]("replaceStack on non-inline"); } var top = this.popStack(true); if (top instanceof Literal) { stack = [top.value]; - prefix2 = ["(", stack]; + prefix = ["(", stack]; usedLiteral = true; } else { createdStack = true; var _name = this.incrStack(); - prefix2 = ["((", this.push(_name), " = ", top, ")"]; + prefix = ["((", this.push(_name), " = ", top, ")"]; stack = this.topStack(); } var item = callback.call(this, stack); @@ -27517,7 +27517,7 @@ var require_javascript_compiler = __commonJS({ if (createdStack) { this.stackSlot--; } - this.push(prefix2.concat(item, ")")); + this.push(prefix.concat(item, ")")); }, incrStack: function incrStack() { this.stackSlot++; @@ -27677,13 +27677,13 @@ var require_javascript_compiler = __commonJS({ JavaScriptCompiler.isValidJavaScriptVariableName = function(name) { return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); }; - function strictLookup(requireTerminal, compiler, parts, i, type2) { + function strictLookup(requireTerminal, compiler, parts, i, type) { var stack = compiler.popStack(), len = parts.length; if (requireTerminal) { len--; } for (; i < len; i++) { - stack = compiler.nameLookup(stack, parts[i], type2); + stack = compiler.nameLookup(stack, parts[i], type); } if (requireTerminal) { return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[i]), ", ", JSON.stringify(compiler.source.currentLocation), " )"]; @@ -27771,7 +27771,7 @@ var require_printer = __commonJS({ return out; }; PrintVisitor.prototype.Program = function(program) { - var out = "", body2 = program.body, i = void 0, l = void 0; + var out = "", body = program.body, i = void 0, l = void 0; if (program.blockParams) { var blockParams = "BLOCK PARAMS: ["; for (i = 0, l = program.blockParams.length; i < l; i++) { @@ -27780,8 +27780,8 @@ var require_printer = __commonJS({ blockParams += " ]"; out += this.pad(blockParams); } - for (i = 0, l = body2.length; i < l; i++) { - out += this.accept(body2[i]); + for (i = 0, l = body.length; i < l; i++) { + out += this.accept(body[i]); } this.padding--; return out; @@ -27899,8 +27899,8 @@ var require_lib3 = __commonJS({ handlebars.print = printer.print; module2.exports = handlebars; function extension(module3, filename) { - var fs4 = require("fs"); - var templateString = fs4.readFileSync(filename, "utf8"); + var fs3 = require("fs"); + var templateString = fs3.readFileSync(filename, "utf8"); module3.exports = handlebars.compile(templateString); } if (typeof require !== "undefined" && require.extensions) { @@ -27914,7 +27914,7 @@ var require_lib3 = __commonJS({ var require_internal_glob_options_helper = __commonJS({ "node_modules/.pnpm/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.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]; @@ -27923,23 +27923,23 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core6 = __importStar(require_core()); + var core6 = __importStar2(require_core()); function getOptions2(copy2) { const result = { followSymbolicLinks: true, @@ -27970,7 +27970,7 @@ var require_internal_glob_options_helper = __commonJS({ var require_internal_path_helper = __commonJS({ "node_modules/.pnpm/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.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]; @@ -27979,27 +27979,27 @@ var require_internal_path_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault = 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 path4 = __importStar(require("path")); - var assert_1 = __importDefault(require("assert")); + var path4 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname(p) { p = safeTrimTrailingSeparator(p); @@ -28117,7 +28117,7 @@ var require_internal_match_kind = __commonJS({ var require_internal_pattern_helper = __commonJS({ "node_modules/.pnpm/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.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]; @@ -28126,23 +28126,23 @@ var require_internal_pattern_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar(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) { @@ -28223,7 +28223,7 @@ var require_balanced_match = __commonJS({ function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); if (b instanceof RegExp) b = maybeMatch(b, str); - var r = range2(a, b, str); + var r = range(a, b, str); return r && { start: r[0], end: r[1], @@ -28236,8 +28236,8 @@ var require_balanced_match = __commonJS({ var m = str.match(reg); return m ? m[0] : null; } - balanced.range = range2; - function range2(a, b, str) { + balanced.range = range; + function range(a, b, str) { var begs, beg, left, right, result; var ai = str.indexOf(a); var bi = str.indexOf(b, ai + 1); @@ -28302,10 +28302,10 @@ var require_brace_expansion = __commonJS({ if (!m) return str.split(","); var pre = m.pre; - var body2 = m.body; + var body = m.body; var post = m.post; var p = pre.split(","); - p[p.length - 1] += "{" + body2 + "}"; + p[p.length - 1] += "{" + body + "}"; var postParts = parseCommaParts(post); if (post.length) { p[p.length - 1] += postParts.shift(); @@ -28996,7 +28996,7 @@ var require_minimatch = __commonJS({ var require_internal_path = __commonJS({ "node_modules/.pnpm/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.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]; @@ -29005,28 +29005,28 @@ var require_internal_path = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault = 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 path4 = __importStar(require("path")); - var pathHelper = __importStar(require_internal_path_helper()); - var assert_1 = __importDefault(require("assert")); + var path4 = __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 { /** @@ -29093,7 +29093,7 @@ var require_internal_path = __commonJS({ var require_internal_pattern = __commonJS({ "node_modules/.pnpm/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.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]; @@ -29102,29 +29102,29 @@ var require_internal_pattern = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault = 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 os7 = __importStar(require("os")); - var path4 = __importStar(require("path")); - var pathHelper = __importStar(require_internal_path_helper()); - var assert_1 = __importDefault(require("assert")); + var os6 = __importStar2(require("os")); + var path4 = __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(); @@ -29214,7 +29214,7 @@ var require_internal_pattern = __commonJS({ if (pattern === "." || pattern.startsWith(`.${path4.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path4.sep}`)) { - homedir = homedir || os7.homedir(); + homedir = homedir || os6.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}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); @@ -29310,7 +29310,7 @@ var require_internal_search_state = __commonJS({ var require_internal_globber = __commonJS({ "node_modules/.pnpm/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.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]; @@ -29319,21 +29319,21 @@ var require_internal_globber = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -29417,11 +29417,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core6 = __importStar(require_core()); - var fs4 = __importStar(require("fs")); - var globOptionsHelper = __importStar(require_internal_glob_options_helper()); - var path4 = __importStar(require("path")); - var patternHelper = __importStar(require_internal_pattern_helper()); + var core6 = __importStar2(require_core()); + var fs3 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path4 = __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(); @@ -29436,19 +29436,19 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a3; - return __awaiter6(this, void 0, void 0, function* () { + var e_1, _a; + return __awaiter7(this, void 0, void 0, function* () { const result = []; try { - for (var _b2 = __asyncValues2(this.globGenerator()), _c2; _c2 = yield _b2.next(), !_c2.done; ) { - const itemPath = _c2.value; + for (var _b = __asyncValues2(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c2 && !_c2.done && (_a3 = _b2.return)) yield _a3.call(_b2); + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); } finally { if (e_1) throw e_1.error; } @@ -29470,7 +29470,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core6.debug(`Search path '${searchPath}'`); try { - yield __await2(fs4.promises.lstat(searchPath)); + yield __await2(fs3.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -29501,7 +29501,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs4.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path4.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs3.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path4.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -29513,7 +29513,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options2) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options2); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -29532,11 +29532,11 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options2, traversalChain) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { let stats; if (options2.followSymbolicLinks) { try { - stats = yield fs4.promises.stat(item.path); + stats = yield fs3.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options2.omitBrokenSymbolicLinks) { @@ -29548,10 +29548,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs4.promises.lstat(item.path); + stats = yield fs3.promises.lstat(item.path); } if (stats.isDirectory() && options2.followSymbolicLinks) { - const realPath = yield fs4.promises.realpath(item.path); + const realPath = yield fs3.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -29573,7 +29573,7 @@ var require_internal_globber = __commonJS({ var require_glob = __commonJS({ "node_modules/.pnpm/@actions+glob@0.1.2/node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -29604,7 +29604,7 @@ var require_glob = __commonJS({ exports2.create = void 0; var internal_globber_1 = require_internal_globber(); function create(patterns, options2) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options2); }); } @@ -29612,9 +29612,9 @@ var require_glob = __commonJS({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/constants.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/constants.js var require_constants6 = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/constants.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheFileSizeLimit = exports2.ManifestFilename = exports2.TarFilename = exports2.SystemTarPathOnWindows = exports2.GnuTarPathOnWindows = exports2.SocketTimeout = exports2.DefaultRetryDelay = exports2.DefaultRetryAttempts = exports2.ArchiveToolType = exports2.CompressionMethod = exports2.CacheFilename = void 0; @@ -29645,11 +29645,11 @@ var require_constants6 = __commonJS({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheUtils.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/cacheUtils.js var require_cacheUtils = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -29662,21 +29662,21 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -29724,19 +29724,19 @@ 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 core6 = __importStar(require_core()); - var exec2 = __importStar(require_exec()); - var glob = __importStar(require_glob()); - var io = __importStar(require_io()); - var crypto = __importStar(require("crypto")); - var fs4 = __importStar(require("fs")); - var path4 = __importStar(require("path")); - var semver = __importStar(require_semver()); - var util3 = __importStar(require("util")); + var core6 = __importStar2(require_core()); + var exec2 = __importStar2(require_exec()); + var glob = __importStar2(require_glob()); + var io = __importStar2(require_io()); + var crypto = __importStar2(require("crypto")); + var fs3 = __importStar2(require("fs")); + var path4 = __importStar2(require("path")); + var semver = __importStar2(require_semver()); + var util = __importStar2(require("util")); var constants_1 = require_constants6(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -29759,23 +29759,23 @@ var require_cacheUtils = __commonJS({ } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs4.statSync(filePath).size; + return fs3.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a3, e_1, _b2, _c2; - var _d2; - return __awaiter6(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; + return __awaiter7(this, void 0, void 0, function* () { const paths = []; - const workspace = (_d2 = process.env["GITHUB_WORKSPACE"]) !== null && _d2 !== void 0 ? _d2 : process.cwd(); + 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 = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a3 = _g.done, !_a3; _e = true) { - _c2 = _g.value; + 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 = _c2; + const file = _c; const relativeFile = path4.relative(workspace, file).replace(new RegExp(`\\${path4.sep}`, "g"), "/"); core6.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { @@ -29788,7 +29788,7 @@ var require_cacheUtils = __commonJS({ e_1 = { error: e_1_1 }; } finally { try { - if (!_e && !_a3 && (_b2 = _f.return)) yield _b2.call(_f); + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); } finally { if (e_1) throw e_1.error; } @@ -29798,13 +29798,13 @@ var require_cacheUtils = __commonJS({ } exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter6(this, void 0, void 0, function* () { - return util3.promisify(fs4.unlink)(filePath); + return __awaiter7(this, void 0, void 0, function* () { + return util.promisify(fs3.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; function getVersion(app, additionalArgs = []) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); core6.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -29826,10 +29826,10 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); - const version3 = semver.clean(versionOutput); - core6.debug(`zstd version: ${version3}`); + const version2 = semver.clean(versionOutput); + core6.debug(`zstd version: ${version2}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -29843,8 +29843,8 @@ var require_cacheUtils = __commonJS({ } exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter6(this, void 0, void 0, function* () { - if (fs4.existsSync(constants_1.GnuTarPathOnWindows)) { + return __awaiter7(this, void 0, void 0, function* () { + if (fs3.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -29882,20 +29882,939 @@ var require_cacheUtils = __commonJS({ } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/pipeline.js -function createEmptyPipeline() { - return HttpPipeline.create(); +// node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs +var tslib_es6_exports = {}; +__export(tslib_es6_exports, { + __addDisposableResource: () => __addDisposableResource, + __assign: () => __assign, + __asyncDelegator: () => __asyncDelegator, + __asyncGenerator: () => __asyncGenerator, + __asyncValues: () => __asyncValues, + __await: () => __await, + __awaiter: () => __awaiter, + __classPrivateFieldGet: () => __classPrivateFieldGet, + __classPrivateFieldIn: () => __classPrivateFieldIn, + __classPrivateFieldSet: () => __classPrivateFieldSet, + __createBinding: () => __createBinding, + __decorate: () => __decorate, + __disposeResources: () => __disposeResources, + __esDecorate: () => __esDecorate, + __exportStar: () => __exportStar, + __extends: () => __extends, + __generator: () => __generator, + __importDefault: () => __importDefault, + __importStar: () => __importStar, + __makeTemplateObject: () => __makeTemplateObject, + __metadata: () => __metadata, + __param: () => __param, + __propKey: () => __propKey, + __read: () => __read, + __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, + __runInitializers: () => __runInitializers, + __setFunctionName: () => __setFunctionName, + __spread: () => __spread, + __spreadArray: () => __spreadArray, + __spreadArrays: () => __spreadArrays, + __values: () => __values2, + default: () => tslib_es6_default +}); +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} +function __rest(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 __decorate(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 __param(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; +} +function __esDecorate(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 context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.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], context); + 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 __runInitializers(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 __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +} +function __setFunctionName(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 __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(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 __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} +function __values2(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 __read(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 __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} +function __spreadArrays() { + 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 __spreadArray(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 __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} +function __asyncGenerator(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 __await ? 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 __asyncDelegator(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: __await(o[n](v)), done: false } : f ? f(v) : v; + } : f; + } +} +function __asyncValues(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 __values2 === "function" ? __values2(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(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); + } } -var ValidPhaseNames, HttpPipeline; -var init_pipeline = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/pipeline.js"() { +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; + } + return cooked; +} +function __importStar(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") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { default: mod }; +} +function __classPrivateFieldGet(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 __classPrivateFieldSet(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 __classPrivateFieldIn(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 __addDisposableResource(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 __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(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(); +} +function __rewriteRelativeImportExtension(path4, preserveJsx) { + if (typeof path4 === "string" && /^\.\.?\//.test(path4)) { + return path4.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 path4; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; +var init_tslib_es6 = __esm({ + "node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs"() { "use strict"; - ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - HttpPipeline = class _HttpPipeline { + extendStatics = function(d, b) { + extendStatics = 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 extendStatics(d, b); + }; + __assign = function() { + __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]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + __createBinding = Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }; + __setModuleDefault = Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : 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; + }; + tslib_es6_default = { + __extends, + __assign, + __rest, + __decorate, + __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values: __values2, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources, + __rewriteRelativeImportExtension + }; + } +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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; + var AbortError2 = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError2; + } +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log2 = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("os"); + var node_util_1 = tslib_1.__importDefault(require("util")); + var process2 = tslib_1.__importStar(require("process")); + function log(message, ...args) { + process2.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } + } +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + 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 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: extend2 + }); + 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 extend2(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; + } +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger2 = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + 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_debug()); + 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(options2) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options2.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options2.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); + } + } + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options2.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 { + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger + }; + } + var context = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context.logger; + function setLogLevel(logLevel) { + context.setLogLevel(logLevel); + } + function getLogLevel() { + return context.getLogLevel(); + } + function createClientLogger(namespace) { + return context.createClientLogger(namespace); + } + } +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js +var require_httpHeaders = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + function normalizeName(name) { + return name.toLowerCase(); + } + function* headerIterator(map) { + for (const entry of map.values()) { + yield [entry.name, entry.value]; + } + } + var HttpHeadersImpl = class { + constructor(rawHeaders) { + this._headersMap = /* @__PURE__ */ new Map(); + if (rawHeaders) { + for (const headerName of Object.keys(rawHeaders)) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param name - The name of the header to set. This value is case-insensitive. + * @param value - The value of the header to set. + */ + set(name, value) { + this._headersMap.set(normalizeName(name), { name, value: String(value).trim() }); + } + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @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; + } + /** + * Get whether or not this header collection contains a header entry for the provided header name. + * @param name - The name of the header to set. This value is case-insensitive. + */ + has(name) { + return this._headersMap.has(normalizeName(name)); + } + /** + * Remove the header with the provided headerName. + * @param name - The name of the header to remove. + */ + delete(name) { + this._headersMap.delete(normalizeName(name)); + } + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJSON(options2 = {}) { + const result = {}; + if (options2.preserveCase) { + for (const entry of this._headersMap.values()) { + result[entry.name] = entry.value; + } + } else { + for (const [normalizedName, entry] of this._headersMap) { + result[normalizedName] = entry.value; + } + } + return result; + } + /** + * Get the string representation of this HTTP header collection. + */ + toString() { + return JSON.stringify(this.toJSON({ preserveCase: true })); + } + /** + * Iterate over tuples of header [name, value] pairs. + */ + [Symbol.iterator]() { + return headerIterator(this._headersMap); + } + }; + function createHttpHeaders(rawHeaders) { + return new HttpHeadersImpl(rawHeaders); + } + } +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID; + var node_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) : node_crypto_1.randomUUID; + function randomUUID() { + return uuidFunction(); + } + } +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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 { + constructor(options2) { + var _a, _b, _c, _d, _e, _f, _g; + this.url = options2.url; + this.body = options2.body; + this.headers = (_a = options2.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = (_b = options2.method) !== null && _b !== void 0 ? _b : "GET"; + this.timeout = (_c = options2.timeout) !== null && _c !== void 0 ? _c : 0; + this.multipartBody = options2.multipartBody; + this.formData = options2.formData; + this.disableKeepAlive = (_d = options2.disableKeepAlive) !== null && _d !== void 0 ? _d : false; + this.proxySettings = options2.proxySettings; + this.streamResponseStatusCodes = options2.streamResponseStatusCodes; + this.withCredentials = (_e = options2.withCredentials) !== null && _e !== void 0 ? _e : false; + this.abortSignal = options2.abortSignal; + this.onUploadProgress = options2.onUploadProgress; + this.onDownloadProgress = options2.onDownloadProgress; + this.requestId = options2.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = (_f = options2.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; + this.enableBrowserStreams = (_g = options2.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; + this.requestOverrides = options2.requestOverrides; + this.authSchemes = options2.authSchemes; + } + }; + function createPipelineRequest(options2) { + return new PipelineRequestImpl(options2); + } + } +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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 { constructor(policies) { - var _a3; + var _a; this._policies = []; - this._policies = (_a3 = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a3 !== void 0 ? _a3 : []; + this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; this._orderedPolicies = void 0; } addPolicy(policy, options2 = {}) { @@ -29927,14 +30846,14 @@ var init_pipeline = __esm({ this._orderedPolicies = void 0; return removedPolicies; } - sendRequest(httpClient, request3) { + 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(request3); + return pipeline(request); } getOrderedPolicies() { if (!this._orderedPolicies) { @@ -30066,434 +30985,62 @@ var init_pipeline = __esm({ return result; } }; - } -}); - -// node_modules/.pnpm/@azure+logger@1.1.4/node_modules/@azure/logger/dist/esm/log.js -function log(message, ...args) { - process2.stderr.write(`${import_node_util.default.format(message, ...args)}${import_node_os2.EOL}`); -} -var import_node_os2, import_node_util, process2; -var init_log = __esm({ - "node_modules/.pnpm/@azure+logger@1.1.4/node_modules/@azure/logger/dist/esm/log.js"() { - "use strict"; - import_node_os2 = require("os"); - import_node_util = __toESM(require("util"), 1); - process2 = __toESM(require("process"), 1); - } -}); - -// node_modules/.pnpm/@azure+logger@1.1.4/node_modules/@azure/logger/dist/esm/debug.js -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: extend2 - }); - 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 extend2(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; -} -var debugEnvVariable, enabledString, enabledNamespaces, skippedNamespaces, debuggers, debugObj, debug_default; -var init_debug = __esm({ - "node_modules/.pnpm/@azure+logger@1.1.4/node_modules/@azure/logger/dist/esm/debug.js"() { - "use strict"; - init_log(); - debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - enabledNamespaces = []; - skippedNamespaces = []; - debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - debug_default = debugObj; - } -}); - -// node_modules/.pnpm/@azure+logger@1.1.4/node_modules/@azure/logger/dist/esm/index.js -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 logger5 of registeredLoggers) { - if (shouldEnable(logger5)) { - enabledNamespaces2.push(logger5.namespace); - } - } - debug_default.enable(enabledNamespaces2.join(",")); -} -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 logger5 = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger5); - if (shouldEnable(logger5)) { - const enabledNamespaces2 = debug_default.disable(); - debug_default.enable(enabledNamespaces2 + "," + logger5.namespace); - } - registeredLoggers.add(logger5); - return logger5; -} -function shouldEnable(logger5) { - return Boolean(azureLogLevel && levelMap[logger5.level] <= levelMap[azureLogLevel]); -} -function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); -} -var registeredLoggers, logLevelFromEnv, azureLogLevel, AzureLogger, AZURE_LOG_LEVELS, levelMap; -var init_esm = __esm({ - "node_modules/.pnpm/@azure+logger@1.1.4/node_modules/@azure/logger/dist/esm/index.js"() { - "use strict"; - init_debug(); - registeredLoggers = /* @__PURE__ */ new Set(); - logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - AzureLogger = debug_default("azure"); - AzureLogger.log = (...args) => { - debug_default.log(...args); - }; - 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 createEmptyPipeline() { + return HttpPipeline.create(); } - levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - } -}); - -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/log.js -var logger; -var init_log2 = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/log.js"() { - "use strict"; - init_esm(); - logger = createClientLogger("core-rest-pipeline"); - } -}); - -// node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/esm/AbortError.js -var AbortError; -var init_AbortError = __esm({ - "node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/esm/AbortError.js"() { - "use strict"; - AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; } }); -// node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/esm/index.js -var init_esm2 = __esm({ - "node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/esm/index.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { "use strict"; - init_AbortError(); - } -}); - -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/createAbortablePromise.js -function createAbortablePromise(buildPromise, options2) { - const { cleanupBeforeAbort, abortSignal: abortSignal2, abortErrorMsg } = options2 !== null && options2 !== void 0 ? options2 : {}; - return new Promise((resolve, reject) => { - function rejectOnAbort() { - reject(new AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal2 === null || abortSignal2 === void 0 ? void 0 : abortSignal2.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal2 === null || abortSignal2 === void 0 ? void 0 : abortSignal2.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); + 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); } - abortSignal2 === null || abortSignal2 === void 0 ? void 0 : abortSignal2.addEventListener("abort", onAbort); - }); -} -var init_createAbortablePromise = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/createAbortablePromise.js"() { - "use strict"; - init_esm2(); - } -}); - -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/random.js -function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; -} -var init_random = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/random.js"() { - "use strict"; - } -}); - -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/delay.js -function delay(timeInMs, options2) { - let token; - const { abortSignal: abortSignal2, abortErrorMsg } = options2 !== null && options2 !== void 0 ? options2 : {}; - return createAbortablePromise((resolve) => { - token = setTimeout(resolve, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal: abortSignal2, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); -} -function calculateRetryDelay(retryAttempt, config2) { - const exponentialDelay = config2.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config2.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + getRandomIntegerInclusive(0, clampedDelay / 2); - return { retryAfterInMs }; -} -var StandardAbortMessage; -var init_delay = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/delay.js"() { - "use strict"; - init_createAbortablePromise(); - init_random(); - StandardAbortMessage = "The delay was aborted."; - } -}); - -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/aborterUtils.js -var init_aborterUtils = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/aborterUtils.js"() { - "use strict"; } }); -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/object.js -function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); -} -var init_object = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/object.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { "use strict"; - } -}); - -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/error.js -function isError(e) { - if (isObject2(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; -} -function getErrorMessage(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); + 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; } - } catch (err) { - stringified = "[unable to stringify input]"; + return false; } - return `Unknown error ${stringified}`; - } -} -var init_error = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/error.js"() { - "use strict"; - init_object(); - } -}); - -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/sha256.js -var init_sha256 = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/sha256.js"() { - "use strict"; - } -}); - -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/typeGuards.js -var init_typeGuards = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/typeGuards.js"() { - "use strict"; - } -}); - -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/uuidUtils.js -function randomUUID() { - return uuidFunction(); -} -var import_crypto2, _a, uuidFunction; -var init_uuidUtils = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/uuidUtils.js"() { - "use strict"; - import_crypto2 = require("crypto"); - 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) : import_crypto2.randomUUID; - } -}); - -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/checkEnvironment.js -var _a2, _b, _c, _d, isBrowser, isWebWorker, isDeno, isBun, isNodeLike, isNode, isReactNative; -var init_checkEnvironment = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/checkEnvironment.js"() { - "use strict"; - isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a2 = self.constructor) === null || _a2 === void 0 ? void 0 : _a2.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"); - isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - isNode = isNodeLike; - isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/bytesEncoding.js -function stringToUint8Array(value, format) { - return Buffer.from(value, format); -} -var init_bytesEncoding = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/bytesEncoding.js"() { - "use strict"; } }); -// node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/index.js -var init_esm3 = __esm({ - "node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/esm/index.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { "use strict"; - init_delay(); - init_aborterUtils(); - init_createAbortablePromise(); - init_random(); - init_object(); - init_error(); - init_sha256(); - init_typeGuards(); - init_uuidUtils(); - init_checkEnvironment(); - init_bytesEncoding(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("util"); + exports2.custom = node_util_1.inspect.custom; } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/sanitizer.js -var RedactedString, defaultAllowedHeaderNames, defaultAllowedQueryParameters, Sanitizer; -var init_sanitizer = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/sanitizer.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { "use strict"; - init_esm3(); - RedactedString = "REDACTED"; - defaultAllowedHeaderNames = [ + 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", @@ -30534,14 +31081,19 @@ var init_sanitizer = __esm({ "User-Agent", "WWW-Authenticate" ]; - defaultAllowedQueryParameters = ["api-version"]; - Sanitizer = class { + 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())); } + /** + * 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) => { @@ -30560,7 +31112,7 @@ var init_sanitizer = __esm({ return void 0; } else if (key === "operationSpec") { return void 0; - } else if (Array.isArray(value) || isObject2(value)) { + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { if (seen.has(value)) { return "[Circular]"; } @@ -30569,20 +31121,25 @@ var init_sanitizer = __esm({ 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) { + const url = new URL(value); + if (!url.search) { return value; } - for (const [key] of url2.searchParams) { + for (const [key] of url.searchParams) { if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url2.searchParams.set(key, RedactedString); + url.searchParams.set(key, RedactedString); } } - return url2.toString(); + return url.toString(); } sanitizeHeaders(obj) { const sanitized = {}; @@ -30610,944 +31167,998 @@ var init_sanitizer = __esm({ return sanitized; } }; + exports2.Sanitizer = Sanitizer; } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/logPolicy.js -function logPolicy(options2 = {}) { - var _a3; - const logger5 = (_a3 = options2.logger) !== null && _a3 !== void 0 ? _a3 : logger.info; - const sanitizer = new Sanitizer({ - additionalAllowedHeaderNames: options2.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options2.additionalAllowedQueryParameters - }); - return { - name: logPolicyName, - async sendRequest(request3, next) { - if (!logger5.enabled) { - return next(request3); - } - logger5(`Request: ${sanitizer.sanitize(request3)}`); - const response = await next(request3); - logger5(`Response status code: ${response.status}`); - logger5(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; -} -var logPolicyName; -var init_logPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/logPolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { "use strict"; - init_log2(); - init_sanitizer(); - logPolicyName = "logPolicy"; + 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 { + constructor(message, options2 = {}) { + super(message); + this.name = "RestError"; + this.code = options2.code; + this.statusCode = options2.statusCode; + Object.defineProperty(this, "request", { value: options2.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options2.response, enumerable: false }); + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + RestError.PARSE_ERROR = "PARSE_ERROR"; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/redirectPolicy.js -function redirectPolicy(options2 = {}) { - const { maxRetries = 20 } = options2; - return { - name: redirectPolicyName, - async sendRequest(request3, next) { - const response = await next(request3); - return handleRedirect(next, response, maxRetries); - } - }; -} -async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - const { request: request3, status, headers } = response; - const locationHeader = headers.get("location"); - if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request3.method) || status === 302 && allowedRedirect.includes(request3.method) || status === 303 && request3.method === "POST" || status === 307) && currentRetries < maxRetries) { - const url2 = new URL(locationHeader, request3.url); - request3.url = url2.toString(); - if (status === 303) { - request3.method = "GET"; - request3.headers.delete("Content-Length"); - delete request3.body; - } - request3.headers.delete("Authorization"); - const res = await next(request3); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; -} -var redirectPolicyName, allowedRedirect; -var init_redirectPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/redirectPolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { "use strict"; - redirectPolicyName = "redirectPolicy"; - allowedRedirect = ["GET", "HEAD"]; + 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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/userAgentPlatform.js -function getHeaderName() { - return "User-Agent"; -} -async function setPlatformSpecificData(map) { - if (process3 && process3.versions) { - const versions2 = process3.versions; - if (versions2.bun) { - map.set("Bun", versions2.bun); - } else if (versions2.deno) { - map.set("Deno", versions2.deno); - } else if (versions2.node) { - map.set("Node", versions2.node); - } - } - map.set("OS", `(${os4.arch()}-${os4.type()}-${os4.release()})`); -} -var os4, process3; -var init_userAgentPlatform = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/userAgentPlatform.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { "use strict"; - os4 = __toESM(require("os"), 1); - process3 = __toESM(require("process"), 1); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger2(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/constants.js -var SDK_VERSION, DEFAULT_RETRY_POLICY_COUNT; -var init_constants = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/constants.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { "use strict"; - SDK_VERSION = "1.19.1"; - DEFAULT_RETRY_POLICY_COUNT = 3; + 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("http")); + var https = tslib_1.__importStar(require("https")); + var zlib = tslib_1.__importStar(require("zlib")); + var node_stream_1 = require("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((resolve) => { + const handler = () => { + resolve(); + 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 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 === 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); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + 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 options2 = Object.assign({ 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((resolve, reject) => { + const req = isInsecure ? http.request(options2, resolve) : https.request(options2, resolve); + 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 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) { + 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((resolve, reject) => { + const buffer = []; + stream.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream.on("end", () => { + resolve(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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/userAgent.js -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 getHeaderName(); -} -async function getUserAgentValue(prefix2) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", SDK_VERSION); - await setPlatformSpecificData(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix2 ? `${prefix2} ${defaultAgent}` : defaultAgent; - return userAgentValue; -} -var init_userAgent = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/userAgent.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; - init_userAgentPlatform(); - init_constants(); + 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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/userAgentPolicy.js -function userAgentPolicy(options2 = {}) { - const userAgentValue = getUserAgentValue(options2.userAgentPrefix); - return { - name: userAgentPolicyName, - async sendRequest(request3, next) { - if (!request3.headers.has(UserAgentHeaderName)) { - request3.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request3); - } - }; -} -var UserAgentHeaderName, userAgentPolicyName; -var init_userAgentPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/userAgentPolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { "use strict"; - init_userAgent(); - UserAgentHeaderName = getUserAgentHeaderName(); - userAgentPolicyName = "userAgentPolicy"; + 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(options2 = {}) { + var _a; + const logger = (_a = options2.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options2.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options2.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/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs -function __rest(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]]; +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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(options2 = {}) { + const { maxRetries = 20 } = options2; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; } - return t; -} -function __values2(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 }; + 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; } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} -function __asyncGenerator(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]); +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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 os6 = tslib_1.__importStar(require("os")); + var process2 = tslib_1.__importStar(require("process")); + function getHeaderName() { + return "User-Agent"; } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); + async function setPlatformSpecificData(map) { + if (process2 && process2.versions) { + const versions = process2.versions; + if (versions.bun) { + map.set("Bun", versions.bun); + } else if (versions.deno) { + map.set("Deno", versions.deno); + } else if (versions.node) { + map.set("Node", versions.node); + } + } + map.set("OS", `(${os6.arch()}-${os6.type()}-${os6.release()})`); } } - function step(r) { - r.value instanceof __await ? 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 __asyncDelegator(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: __await(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues(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 __values2 === "function" ? __values2(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(resolve, reject) { - v = o[n](v), settle(resolve, reject, v.done, v.value); - }); - }; - } - function settle(resolve, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve({ value: v2, done: d }); - }, reject); - } -} -var init_tslib_es6 = __esm({ - "node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs"() { +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants7 = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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.0"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/typeGuards.js -function isBlob(x) { - return typeof x.stream === "function"; -} -var init_typeGuards2 = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/typeGuards.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/file.js -function hasRawContent(x) { - return typeof x[rawContent] === "function"; -} -function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } -} -var rawContent; -var init_file = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/file.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { "use strict"; - init_esm3(); - init_typeGuards2(); - rawContent = Symbol("rawContent"); + 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(options2 = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options2.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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/concat.js -function streamAsyncIterator() { - return __asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield __await(reader.read()); - if (done) { - return yield __await(void 0); +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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); } - yield yield __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 import_node_stream.Readable.fromWeb(stream); - } else { - return stream; - } -} -function toStream(source) { - if (source instanceof Uint8Array) { - return import_node_stream.Readable.from(Buffer.from(source)); - } else if (isBlob(source)) { - return toStream(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 import_node_stream.Readable.from(function() { - return __asyncGenerator(this, arguments, function* () { - var _a3, e_1, _b2, _c2; - for (const stream of streams) { - try { - for (var _d2 = true, stream_1 = (e_1 = void 0, __asyncValues(stream)), stream_1_1; stream_1_1 = yield __await(stream_1.next()), _a3 = stream_1_1.done, !_a3; _d2 = true) { - _c2 = stream_1_1.value; - _d2 = false; - const chunk = _c2; - yield yield __await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d2 && !_a3 && (_b2 = stream_1.return)) yield __await(_b2.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - }()); - }; -} -var import_node_stream; -var init_concat = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/concat.js"() { - "use strict"; - init_tslib_es6(); - import_node_stream = require("stream"); - init_typeGuards2(); - init_file(); } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/multipartPolicy.js -function generateBoundary() { - return `----AzSDKFormBoundary${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 (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(request3, parts, boundary) { - const sources = [ - stringToUint8Array(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - stringToUint8Array("\r\n", "utf-8"), - stringToUint8Array(encodeHeaders(part.headers), "utf-8"), - stringToUint8Array("\r\n", "utf-8"), - part.body, - stringToUint8Array(`\r ---${boundary}`, "utf-8") - ]), - stringToUint8Array("--\r\n\r\n", "utf-8") - ]; - const contentLength2 = getTotalLength(sources); - if (contentLength2) { - request3.headers.set("Content-Length", contentLength2); - } - request3.body = await concat(sources); -} -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: multipartPolicyName, - async sendRequest(request3, next) { - var _a3; - if (!request3.multipartBody) { - return next(request3); - } - if (request3.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request3.multipartBody.boundary; - const contentTypeHeader = (_a3 = request3.headers.get("Content-Type")) !== null && _a3 !== void 0 ? _a3 : "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 [, contentType2, 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(); - } - request3.headers.set("Content-Type", `${contentType2}; boundary=${boundary}`); - await buildRequestBody(request3, request3.multipartBody.parts, boundary); - request3.multipartBody = void 0; - return next(request3); - } - }; -} -var multipartPolicyName, maxBoundaryLength, validBoundaryCharacters; -var init_multipartPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/multipartPolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { "use strict"; - init_esm3(); - init_concat(); - init_typeGuards2(); - multipartPolicyName = "multipartPolicy"; - maxBoundaryLength = 70; - validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + 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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/decompressResponsePolicy.js -function decompressResponsePolicy() { - return { - name: decompressResponsePolicyName, - async sendRequest(request3, next) { - if (request3.method !== "HEAD") { - request3.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request3); - } - }; -} -var decompressResponsePolicyName; -var init_decompressResponsePolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/decompressResponsePolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { "use strict"; - decompressResponsePolicyName = "decompressResponsePolicy"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config2) { + const exponentialDelay = config2.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config2.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/helpers.js -function delay2(delayInMs, value, options2) { - return new Promise((resolve, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new AbortError((options2 === null || options2 === void 0 ? void 0 : options2.abortErrorMsg) ? options2 === null || options2 === void 0 ? void 0 : options2.abortErrorMsg : StandardAbortMessage2)); - }; - const removeListeners = () => { - if ((options2 === null || options2 === void 0 ? void 0 : options2.abortSignal) && onAborted) { - options2.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options2 === null || options2 === void 0 ? void 0 : options2.abortSignal) && options2.abortSignal.aborted) { - return rejectOnAbort(); +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers3 = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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, options2) { + return new Promise((resolve, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError((options2 === null || options2 === void 0 ? void 0 : options2.abortErrorMsg) ? options2 === null || options2 === void 0 ? void 0 : options2.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if ((options2 === null || options2 === void 0 ? void 0 : options2.abortSignal) && onAborted) { + options2.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if ((options2 === null || options2 === void 0 ? void 0 : options2.abortSignal) && options2.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve(value); + }, delayInMs); + if (options2 === null || options2 === void 0 ? void 0 : options2.abortSignal) { + options2.abortSignal.addEventListener("abort", onAborted); + } + }); } - timer = setTimeout(() => { - removeListeners(); - resolve(value); - }, delayInMs); - if (options2 === null || options2 === void 0 ? void 0 : options2.abortSignal) { - options2.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; } - }); -} -function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; -} -var StandardAbortMessage2; -var init_helpers = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/helpers.js"() { - "use strict"; - init_esm2(); - StandardAbortMessage2 = "The operation was aborted."; } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/retryStrategies/throttlingRetryStrategy.js -function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = parseHeaderValueAsNumber(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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_helpers3(); + 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 date3 = Date.parse(retryAfterHeader); + const diff = date3 - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch (_a) { + return void 0; } } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) - return; - const date3 = Date.parse(retryAfterHeader); - const diff = date3 - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a3) { - 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 }; - } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { return { - retryAfterInMs + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } }; } - }; -} -var RetryAfterHeader, AllRetryAfterHeaders; -var init_throttlingRetryStrategy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/retryStrategies/throttlingRetryStrategy.js"() { - "use strict"; - init_helpers(); - RetryAfterHeader = "Retry-After"; - AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/retryStrategies/exponentialRetryStrategy.js -function exponentialRetryStrategy(options2 = {}) { - var _a3, _b2; - const retryInterval = (_a3 = options2.retryDelayInMs) !== null && _a3 !== void 0 ? _a3 : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b2 = options2.maxRetryDelayInMs) !== null && _b2 !== void 0 ? _b2 : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options2.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options2.ignoreHttpStatusCodes; - const unknownResponse = response && (isThrottlingRetryResponse(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - return 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"; -} -var DEFAULT_CLIENT_RETRY_INTERVAL, DEFAULT_CLIENT_MAX_RETRY_INTERVAL; -var init_exponentialRetryStrategy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/retryStrategies/exponentialRetryStrategy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { "use strict"; - init_esm3(); - init_throttlingRetryStrategy(); - DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + 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(options2 = {}) { + var _a, _b; + const retryInterval = (_a = options2.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = (_b = options2.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options2.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options2.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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/retryPolicy.js -function retryPolicy(strategies, options2 = { maxRetries: DEFAULT_RETRY_POLICY_COUNT }) { - const logger5 = options2.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request3, next) { - var _a3, _b2; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger5.info(`Retry ${retryCount}: Attempting to send request`, request3.requestId); - response = await next(request3); - logger5.info(`Retry ${retryCount}: Received a response from request`, request3.requestId); - } catch (e) { - logger5.error(`Retry ${retryCount}: Received an error from request`, request3.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a3 = request3.abortSignal) === null || _a3 === void 0 ? void 0 : _a3.aborted) { - logger5.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new AbortError(); - throw abortError; - } - if (retryCount >= ((_b2 = options2.maxRetries) !== null && _b2 !== void 0 ? _b2 : DEFAULT_RETRY_POLICY_COUNT)) { - logger5.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"); - } - } - logger5.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 delay2(retryAfterInMs, void 0, { abortSignal: request3.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request3.url = redirectTo; - continue retryRequest; +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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_helpers3(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants7(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options2 = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options2.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 AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= ((_b = options2.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 || 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; + } } } - if (responseError) { - logger5.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger5.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } - } + }; } - }; -} -var retryPolicyLogger, retryPolicyName; -var init_retryPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/retryPolicy.js"() { - "use strict"; - init_helpers(); - init_esm(); - init_esm2(); - init_constants(); - retryPolicyLogger = createClientLogger("core-rest-pipeline retryPolicy"); - retryPolicyName = "retryPolicy"; } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/defaultRetryPolicy.js -function defaultRetryPolicy(options2 = {}) { - var _a3; - return { - name: defaultRetryPolicyName, - sendRequest: retryPolicy([throttlingRetryStrategy(), exponentialRetryStrategy(options2)], { - maxRetries: (_a3 = options2.maxRetries) !== null && _a3 !== void 0 ? _a3 : DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; -} -var defaultRetryPolicyName; -var init_defaultRetryPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/defaultRetryPolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { "use strict"; - init_exponentialRetryStrategy(); - init_throttlingRetryStrategy(); - init_retryPolicy(); - init_constants(); - defaultRetryPolicyName = "defaultRetryPolicy"; + 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(options2 = {}) { + var _a; + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options2)], { + maxRetries: (_a = options2.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/httpHeaders.js -function normalizeName(name) { - return name.toLowerCase(); -} -function* headerIterator(map) { - for (const entry of map.values()) { - yield [entry.name, entry.value]; +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + var _a; + var _b; + var _c; + var _d; + 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 === 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.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; } -} -function createHttpHeaders(rawHeaders) { - return new HttpHeadersImpl(rawHeaders); -} -var HttpHeadersImpl; -var init_httpHeaders = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/httpHeaders.js"() { +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; - HttpHeadersImpl = class { - constructor(rawHeaders) { - this._headersMap = /* @__PURE__ */ new Map(); - if (rawHeaders) { - for (const headerName of Object.keys(rawHeaders)) { - this.set(headerName, rawHeaders[headerName]); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + 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].push(value); + } + return formDataMap; + } + function formDataPolicy() { + return { + name: exports2.formDataPolicyName, + async sendRequest(request, next) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + request.formData = formDataToFormDataMap(request.body); + request.body = void 0; + } + if (request.formData) { + const contentType = request.headers.get("Content-Type"); + if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) { + request.body = wwwFormUrlEncode(request.formData); + } else { + await prepareFormData(request.formData, request); + } + request.formData = void 0; } + return next(request); } - } - /** - * Set a header in this collection with the provided name and value. The name is - * case-insensitive. - * @param name - The name of the header to set. This value is case-insensitive. - * @param value - The value of the header to set. - */ - set(name, value) { - this._headersMap.set(normalizeName(name), { name, value: String(value).trim() }); - } - /** - * Get the header value for the provided header name, or undefined if no header exists in this - * collection with the provided name. - * @param name - The name of the header. This value is case-insensitive. - */ - get(name) { - var _a3; - return (_a3 = this._headersMap.get(normalizeName(name))) === null || _a3 === void 0 ? void 0 : _a3.value; - } - /** - * Get whether or not this header collection contains a header entry for the provided header name. - * @param name - The name of the header to set. This value is case-insensitive. - */ - has(name) { - return this._headersMap.has(normalizeName(name)); - } - /** - * Remove the header with the provided headerName. - * @param name - The name of the header to remove. - */ - delete(name) { - this._headersMap.delete(normalizeName(name)); - } - /** - * Get the JSON object representation of this HTTP header collection. - */ - toJSON(options2 = {}) { - const result = {}; - if (options2.preserveCase) { - for (const entry of this._headersMap.values()) { - result[entry.name] = entry.value; - } - } else { - for (const [normalizedName, entry] of this._headersMap) { - result[normalizedName] = entry.value; + }; + } + function wwwFormUrlEncode(formData) { + const urlSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(formData)) { + if (Array.isArray(value)) { + for (const subValue of value) { + urlSearchParams.append(key, subValue.toString()); } - } - return result; - } - /** - * Get the string representation of this HTTP header collection. - */ - toString() { - return JSON.stringify(this.toJSON({ preserveCase: true })); - } - /** - * Iterate over tuples of header [name, value] pairs. - */ - [Symbol.iterator]() { - return headerIterator(this._headersMap); - } - }; - } -}); - -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/formDataPolicy.js -function formDataToFormDataMap(formData) { - var _a3; - const formDataMap = {}; - for (const [key, value] of formData.entries()) { - (_a3 = formDataMap[key]) !== null && _a3 !== void 0 ? _a3 : formDataMap[key] = []; - formDataMap[key].push(value); - } - return formDataMap; -} -function formDataPolicy() { - return { - name: formDataPolicyName, - async sendRequest(request3, next) { - if (isNodeLike && typeof FormData !== "undefined" && request3.body instanceof FormData) { - request3.formData = formDataToFormDataMap(request3.body); - request3.body = void 0; - } - if (request3.formData) { - const contentType2 = request3.headers.get("Content-Type"); - if (contentType2 && contentType2.indexOf("application/x-www-form-urlencoded") !== -1) { - request3.body = wwwFormUrlEncode(request3.formData); } else { - await prepareFormData(request3.formData, request3); + urlSearchParams.append(key, value.toString()); } - request3.formData = void 0; } - return next(request3); + return urlSearchParams.toString(); } - }; -} -function wwwFormUrlEncode(formData) { - const urlSearchParams = new URLSearchParams(); - for (const [key, value] of Object.entries(formData)) { - if (Array.isArray(value)) { - for (const subValue of value) { - urlSearchParams.append(key, subValue.toString()); + async function prepareFormData(formData, request) { + const contentType = request.headers.get("Content-Type"); + if (contentType && !contentType.startsWith("multipart/form-data")) { + return; } - } else { - urlSearchParams.append(key, value.toString()); - } - } - return urlSearchParams.toString(); -} -async function prepareFormData(formData, request3) { - const contentType2 = request3.headers.get("Content-Type"); - if (contentType2 && !contentType2.startsWith("multipart/form-data")) { - return; - } - request3.headers.set("Content-Type", contentType2 !== null && contentType2 !== void 0 ? contentType2 : "multipart/form-data"); - const parts = []; - for (const [fieldName, values] of Object.entries(formData)) { - for (const value of Array.isArray(values) ? values : [values]) { - if (typeof value === "string") { - parts.push({ - headers: createHttpHeaders({ - "Content-Disposition": `form-data; name="${fieldName}"` - }), - body: 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.`); - } else { - const fileName = value.name || "blob"; - const headers = createHttpHeaders(); - headers.set("Content-Disposition", `form-data; name="${fieldName}"; filename="${fileName}"`); - headers.set("Content-Type", value.type || "application/octet-stream"); - parts.push({ - headers, - body: value - }); + request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + const parts = []; + for (const [fieldName, values] of Object.entries(formData)) { + for (const value of Array.isArray(values) ? values : [values]) { + if (typeof value === "string") { + parts.push({ + headers: (0, httpHeaders_js_1.createHttpHeaders)({ + "Content-Disposition": `form-data; name="${fieldName}"` + }), + 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.`); + } else { + const fileName = value.name || "blob"; + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + headers.set("Content-Disposition", `form-data; name="${fieldName}"; filename="${fileName}"`); + headers.set("Content-Type", value.type || "application/octet-stream"); + parts.push({ + headers, + body: value + }); + } + } } + request.multipartBody = { parts }; } } - request3.multipartBody = { parts }; -} -var formDataPolicyName; -var init_formDataPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/formDataPolicy.js"() { - "use strict"; - init_esm3(); - init_httpHeaders(); - formDataPolicyName = "formDataPolicy"; - } }); // node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js @@ -31562,10 +32173,10 @@ var require_ms = __commonJS({ var y = d * 365.25; module2.exports = function(val, options2) { options2 = options2 || {}; - var type2 = typeof val; - if (type2 === "string" && val.length > 0) { + var type = typeof val; + if (type === "string" && val.length > 0) { return parse4(val); - } else if (type2 === "number" && isFinite(val)) { + } else if (type === "number" && isFinite(val)) { return options2.long ? fmtLong(val) : fmtShort(val); } throw new Error( @@ -31584,8 +32195,8 @@ var require_ms = __commonJS({ return; } var n = parseFloat(match[1]); - var type2 = (match[2] || "ms").toLowerCase(); - switch (type2) { + var type = (match[2] || "ms").toLowerCase(); + switch (type) { case "years": case "year": case "yrs": @@ -31675,11 +32286,11 @@ var require_common = __commonJS({ createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; - createDebug.disable = disable2; - createDebug.enable = enable2; - createDebug.enabled = enabled2; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; createDebug.humanize = require_ms(); - createDebug.destroy = destroy2; + createDebug.destroy = destroy; Object.keys(env).forEach((key) => { createDebug[key] = env[key]; }); @@ -31737,7 +32348,7 @@ var require_common = __commonJS({ debug6.namespace = namespace; debug6.useColors = createDebug.useColors(); debug6.color = createDebug.selectColor(namespace); - debug6.extend = extend3; + debug6.extend = extend2; debug6.destroy = createDebug.destroy; Object.defineProperty(debug6, "enabled", { enumerable: true, @@ -31761,12 +32372,12 @@ var require_common = __commonJS({ } return debug6; } - function extend3(namespace, delimiter3) { - const newDebug = createDebug(this.namespace + (typeof delimiter3 === "undefined" ? ":" : delimiter3) + namespace); + function extend2(namespace, delimiter2) { + const newDebug = createDebug(this.namespace + (typeof delimiter2 === "undefined" ? ":" : delimiter2) + namespace); newDebug.log = this.log; return newDebug; } - function enable2(namespaces) { + function enable(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; createDebug.names = []; @@ -31808,7 +32419,7 @@ var require_common = __commonJS({ } return templateIndex === template.length; } - function disable2() { + function disable() { const namespaces = [ ...createDebug.names, ...createDebug.skips.map((namespace) => "-" + namespace) @@ -31816,7 +32427,7 @@ var require_common = __commonJS({ createDebug.enable(""); return namespaces; } - function enabled2(name) { + function enabled(name) { for (const skip of createDebug.skips) { if (matchesTemplate(name, skip)) { return false; @@ -31835,7 +32446,7 @@ var require_common = __commonJS({ } return val; } - function destroy2() { + 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`."); } createDebug.enable(createDebug.load()); @@ -32021,8 +32632,8 @@ var require_has_flag = __commonJS({ "node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports2, module2) { "use strict"; module2.exports = (flag, argv = process.argv) => { - const prefix2 = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const position = argv.indexOf(prefix2 + flag); + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const position = argv.indexOf(prefix + flag); const terminatorPosition = argv.indexOf("--"); return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); }; @@ -32033,7 +32644,7 @@ var require_has_flag = __commonJS({ var require_supports_color = __commonJS({ "node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports2, module2) { "use strict"; - var os7 = require("os"); + var os6 = require("os"); var tty = require("tty"); var hasFlag = require_has_flag(); var { env } = process; @@ -32081,7 +32692,7 @@ var require_supports_color = __commonJS({ return min; } if (process.platform === "win32") { - const osRelease = os7.release().split("."); + const osRelease = os6.release().split("."); if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } @@ -32100,10 +32711,10 @@ var require_supports_color = __commonJS({ return 3; } if ("TERM_PROGRAM" in env) { - const version3 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); switch (env.TERM_PROGRAM) { case "iTerm.app": - return version3 >= 3 ? 3 : 2; + return version2 >= 3 ? 3 : 2; case "Apple_Terminal": return 2; } @@ -32136,14 +32747,14 @@ var require_node = __commonJS({ "node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js"(exports2, module2) { "use strict"; var tty = require("tty"); - var util3 = require("util"); + var util = require("util"); exports2.init = init; - exports2.log = log2; + exports2.log = log; exports2.formatArgs = formatArgs; exports2.save = save; exports2.load = load; exports2.useColors = useColors; - exports2.destroy = util3.deprecate( + exports2.destroy = util.deprecate( () => { }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." @@ -32260,8 +32871,8 @@ var require_node = __commonJS({ if (useColors2) { const c = this.color; const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); - const prefix2 = ` ${colorCode};1m${name} \x1B[0m`; - args[0] = prefix2 + args[0].split("\n").join("\n" + prefix2); + const prefix = ` ${colorCode};1m${name} \x1B[0m`; + args[0] = prefix + args[0].split("\n").join("\n" + prefix); args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); } else { args[0] = getDate() + name + " " + args[0]; @@ -32273,8 +32884,8 @@ var require_node = __commonJS({ } return (/* @__PURE__ */ new Date()).toISOString() + " "; } - function log2(...args) { - return process.stderr.write(util3.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); + function log(...args) { + return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); } function save(namespaces) { if (namespaces) { @@ -32297,11 +32908,11 @@ var require_node = __commonJS({ var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; - return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; - return util3.inspect(v, this.inspectOpts); + return util.inspect(v, this.inspectOpts); }; } }); @@ -32318,11 +32929,11 @@ var require_src = __commonJS({ } }); -// node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js -var require_helpers3 = __commonJS({ - "node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js"(exports2) { +// node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js +var require_helpers4 = __commonJS({ + "node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -32335,24 +32946,24 @@ var require_helpers3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http2 = __importStar(require("http")); - var https2 = __importStar(require("https")); + var http = __importStar2(require("http")); + var https = __importStar2(require("https")); async function toBuffer(stream) { let length = 0; const chunks = []; @@ -32375,9 +32986,9 @@ var require_helpers3 = __commonJS({ } } exports2.json = json; - function req(url2, opts = {}) { - const href = typeof url2 === "string" ? url2 : url2.href; - const req2 = (href.startsWith("https:") ? https2 : http2).request(url2, opts); + function req(url, opts = {}) { + const href = typeof url === "string" ? url : url.href; + const req2 = (href.startsWith("https:") ? https : http).request(url, opts); const promise = new Promise((resolve, reject) => { req2.once("response", resolve).once("error", reject).end(); }); @@ -32388,11 +32999,11 @@ var require_helpers3 = __commonJS({ } }); -// node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/index.js +// node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/index.js var require_dist = __commonJS({ - "node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/index.js"(exports2) { + "node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -32405,31 +33016,31 @@ var require_dist = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(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 = __importStar(require("net")); - var http2 = __importStar(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar(require_helpers3(), exports2); + __exportStar2(require_helpers4(), exports2); var INTERNAL = Symbol("AgentBaseInternalState"); - var Agent3 = class extends http2.Agent { + var Agent = class extends http.Agent { constructor(opts) { super(opts); this[INTERNAL] = {}; @@ -32486,7 +33097,7 @@ var require_dist = __commonJS({ // In order to properly update the socket pool, we need to call `getName()` on // the core `https.Agent` if it is a secureEndpoint. getName(options2) { - const secureEndpoint = typeof options2.secureEndpoint === "boolean" ? options2.secureEndpoint : this.isSecureEndpoint(options2); + const secureEndpoint = this.isSecureEndpoint(options2); if (secureEndpoint) { return https_1.Agent.prototype.getName.call(this, options2); } @@ -32501,7 +33112,7 @@ var require_dist = __commonJS({ const fakeSocket = this.incrementSockets(name); Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => { this.decrementSockets(name, fakeSocket); - if (socket instanceof http2.Agent) { + if (socket instanceof http.Agent) { try { return socket.addRequest(req, connectOpts); } catch (err) { @@ -32540,7 +33151,7 @@ var require_dist = __commonJS({ } } }; - exports2.Agent = Agent3; + exports2.Agent = Agent; } }); @@ -32548,12 +33159,12 @@ var require_dist = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault = 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 = __importDefault(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((resolve, reject) => { @@ -32644,7 +33255,7 @@ var require_parse_proxy_response = __commonJS({ var require_dist2 = __commonJS({ "node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -32657,29 +33268,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault = 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 = __importStar(require("net")); - var tls = __importStar(require("tls")); - var assert_1 = __importDefault(require("assert")); - var debug_1 = __importDefault(require_src()); + 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(); @@ -32693,7 +33304,7 @@ var require_dist2 = __commonJS({ } return options2; }; - var HttpsProxyAgent2 = class extends agent_base_1.Agent { + var HttpsProxyAgent = class extends agent_base_1.Agent { constructor(proxy, opts) { super(opts); this.options = { path: void 0 }; @@ -32772,8 +33383,8 @@ var require_dist2 = __commonJS({ return fakeSocket; } }; - HttpsProxyAgent2.protocols = ["http", "https"]; - exports2.HttpsProxyAgent = HttpsProxyAgent2; + HttpsProxyAgent.protocols = ["http", "https"]; + exports2.HttpsProxyAgent = HttpsProxyAgent; function resume(socket) { socket.resume(); } @@ -32794,7 +33405,7 @@ var require_dist2 = __commonJS({ var require_dist3 = __commonJS({ "node_modules/.pnpm/http-proxy-agent@7.0.2/node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -32807,33 +33418,33 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault = 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 = __importStar(require("net")); - var tls = __importStar(require("tls")); - var debug_1 = __importDefault(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_dist(); var url_1 = require("url"); var debug6 = (0, debug_1.default)("http-proxy-agent"); - var HttpProxyAgent2 = class extends agent_base_1.Agent { + var HttpProxyAgent = class extends agent_base_1.Agent { constructor(proxy, opts) { super(opts); this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy; @@ -32857,11 +33468,11 @@ var require_dist3 = __commonJS({ const protocol = opts.secureEndpoint ? "https:" : "http:"; const hostname2 = req.getHeader("host") || "localhost"; const base = `${protocol}//${hostname2}`; - const url2 = new url_1.URL(req.path, base); + const url = new url_1.URL(req.path, base); if (opts.port !== 80) { - url2.port = String(opts.port); + url.port = String(opts.port); } - req.path = String(url2); + req.path = String(url); const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; @@ -32905,8 +33516,8 @@ var require_dist3 = __commonJS({ return socket; } }; - HttpProxyAgent2.protocols = ["http", "https"]; - exports2.HttpProxyAgent = HttpProxyAgent2; + HttpProxyAgent.protocols = ["http", "https"]; + exports2.HttpProxyAgent = HttpProxyAgent; function omit2(obj, ...keys) { const ret = {}; let key; @@ -32920,5390 +33531,9055 @@ var require_dist3 = __commonJS({ } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/proxyPolicy.js -function getEnvironmentValue(name) { - if (process.env[name]) { - return process.env[name]; - } else if (process.env[name.toLowerCase()]) { - return process.env[name.toLowerCase()]; - } - return void 0; -} -function loadEnvironmentProxyValue() { - if (!process) { - return void 0; - } - const httpsProxy = getEnvironmentValue(HTTPS_PROXY); - const allProxy = getEnvironmentValue(ALL_PROXY); - const httpProxy = getEnvironmentValue(HTTP_PROXY); - return httpsProxy || allProxy || httpProxy; -} -function isBypassed(uri, noProxyList, bypassedMap) { - if (noProxyList.length === 0) { - return false; - } - const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { - return bypassedMap.get(host); - } - let isBypassedFlag = false; - for (const pattern of noProxyList) { - if (pattern[0] === ".") { - if (host.endsWith(pattern)) { - isBypassedFlag = true; - } else { - if (host.length === pattern.length - 1 && host === pattern.slice(1)) { - isBypassedFlag = true; +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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_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"; + var NO_PROXY = "NO_PROXY"; + exports2.proxyPolicyName = "proxyPolicy"; + exports2.globalNoProxyList = []; + var noProxyListLoaded = false; + var globalBypassedMap = /* @__PURE__ */ new Map(); + function getEnvironmentValue(name) { + if (process.env[name]) { + return process.env[name]; + } else if (process.env[name.toLowerCase()]) { + return process.env[name.toLowerCase()]; + } + return void 0; + } + function loadEnvironmentProxyValue() { + if (!process) { + return void 0; + } + const httpsProxy = getEnvironmentValue(HTTPS_PROXY); + const allProxy = getEnvironmentValue(ALL_PROXY); + const httpProxy = getEnvironmentValue(HTTP_PROXY); + return httpsProxy || allProxy || httpProxy; + } + function isBypassed(uri, noProxyList, bypassedMap) { + if (noProxyList.length === 0) { + return false; + } + const host = new URL(uri).hostname; + if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + return bypassedMap.get(host); + } + let isBypassedFlag = false; + for (const pattern of noProxyList) { + if (pattern[0] === ".") { + if (host.endsWith(pattern)) { + isBypassedFlag = true; + } else { + if (host.length === pattern.length - 1 && host === pattern.slice(1)) { + isBypassedFlag = true; + } + } + } else { + if (host === pattern) { + isBypassedFlag = true; + } } } - } else { - if (host === pattern) { - isBypassedFlag = true; + bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + return isBypassedFlag; + } + function loadNoProxy() { + const noProxy = getEnvironmentValue(NO_PROXY); + noProxyListLoaded = true; + if (noProxy) { + return noProxy.split(",").map((item) => item.trim()).filter((item) => item.length); } + return []; } - } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); - return isBypassedFlag; -} -function loadNoProxy() { - const noProxy = getEnvironmentValue(NO_PROXY); - noProxyListLoaded = true; - if (noProxy) { - return noProxy.split(",").map((item) => item.trim()).filter((item) => item.length); - } - return []; -} -function getDefaultProxySettings(proxyUrl) { - if (!proxyUrl) { - proxyUrl = loadEnvironmentProxyValue(); - if (!proxyUrl) { - return void 0; + function getDefaultProxySettings(proxyUrl) { + if (!proxyUrl) { + proxyUrl = loadEnvironmentProxyValue(); + if (!proxyUrl) { + return void 0; + } + } + const parsedUrl = new URL(proxyUrl); + const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; + return { + host: schema + parsedUrl.hostname, + port: Number.parseInt(parsedUrl.port || "80"), + username: parsedUrl.username, + password: parsedUrl.password + }; } - } - const parsedUrl = new URL(proxyUrl); - const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; - return { - host: schema + parsedUrl.hostname, - port: Number.parseInt(parsedUrl.port || "80"), - username: parsedUrl.username, - password: parsedUrl.password - }; -} -function getDefaultProxySettingsInternal() { - const envProxy = loadEnvironmentProxyValue(); - return envProxy ? new URL(envProxy) : void 0; -} -function getUrlFromProxySettings(settings) { - let parsedProxyUrl; - try { - parsedProxyUrl = new URL(settings.host); - } catch (_a3) { - throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); - } - parsedProxyUrl.port = String(settings.port); - if (settings.username) { - parsedProxyUrl.username = settings.username; - } - if (settings.password) { - parsedProxyUrl.password = settings.password; - } - return parsedProxyUrl; -} -function setProxyAgentOnRequest(request3, cachedAgents, proxyUrl) { - if (request3.agent) { - return; - } - const url2 = new URL(request3.url); - const isInsecure = url2.protocol !== "https:"; - if (request3.tlsSettings) { - logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); - } - const headers = request3.headers.toJSON(); - if (isInsecure) { - if (!cachedAgents.httpProxyAgent) { - cachedAgents.httpProxyAgent = new import_http_proxy_agent.HttpProxyAgent(proxyUrl, { headers }); + function getDefaultProxySettingsInternal() { + const envProxy = loadEnvironmentProxyValue(); + return envProxy ? new URL(envProxy) : void 0; } - request3.agent = cachedAgents.httpProxyAgent; - } else { - if (!cachedAgents.httpsProxyAgent) { - cachedAgents.httpsProxyAgent = new import_https_proxy_agent.HttpsProxyAgent(proxyUrl, { headers }); + function getUrlFromProxySettings(settings) { + let parsedProxyUrl; + try { + parsedProxyUrl = new URL(settings.host); + } catch (_a) { + throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); + } + parsedProxyUrl.port = String(settings.port); + if (settings.username) { + parsedProxyUrl.username = settings.username; + } + if (settings.password) { + parsedProxyUrl.password = settings.password; + } + return parsedProxyUrl; } - request3.agent = cachedAgents.httpsProxyAgent; - } -} -function proxyPolicy(proxySettings, options2) { - if (!noProxyListLoaded) { - globalNoProxyList.push(...loadNoProxy()); - } - const defaultProxy = proxySettings ? getUrlFromProxySettings(proxySettings) : getDefaultProxySettingsInternal(); - const cachedAgents = {}; - return { - name: proxyPolicyName, - async sendRequest(request3, next) { - var _a3; - if (!request3.proxySettings && defaultProxy && !isBypassed(request3.url, (_a3 = options2 === null || options2 === void 0 ? void 0 : options2.customNoProxyList) !== null && _a3 !== void 0 ? _a3 : globalNoProxyList, (options2 === null || options2 === void 0 ? void 0 : options2.customNoProxyList) ? void 0 : globalBypassedMap)) { - setProxyAgentOnRequest(request3, cachedAgents, defaultProxy); - } else if (request3.proxySettings) { - setProxyAgentOnRequest(request3, cachedAgents, getUrlFromProxySettings(request3.proxySettings)); + function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { + if (request.agent) { + return; + } + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (request.tlsSettings) { + log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); + } + const headers = request.headers.toJSON(); + if (isInsecure) { + if (!cachedAgents.httpProxyAgent) { + cachedAgents.httpProxyAgent = new http_proxy_agent_1.HttpProxyAgent(proxyUrl, { headers }); + } + request.agent = cachedAgents.httpProxyAgent; + } else { + if (!cachedAgents.httpsProxyAgent) { + cachedAgents.httpsProxyAgent = new https_proxy_agent_1.HttpsProxyAgent(proxyUrl, { headers }); + } + request.agent = cachedAgents.httpsProxyAgent; } - return next(request3); } - }; -} -var import_https_proxy_agent, import_http_proxy_agent, HTTPS_PROXY, HTTP_PROXY, ALL_PROXY, NO_PROXY, proxyPolicyName, globalNoProxyList, noProxyListLoaded, globalBypassedMap; -var init_proxyPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/proxyPolicy.js"() { - "use strict"; - import_https_proxy_agent = __toESM(require_dist2(), 1); - import_http_proxy_agent = __toESM(require_dist3(), 1); - init_log2(); - HTTPS_PROXY = "HTTPS_PROXY"; - HTTP_PROXY = "HTTP_PROXY"; - ALL_PROXY = "ALL_PROXY"; - NO_PROXY = "NO_PROXY"; - proxyPolicyName = "proxyPolicy"; - globalNoProxyList = []; - noProxyListLoaded = false; - globalBypassedMap = /* @__PURE__ */ new Map(); - } -}); - -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/setClientRequestIdPolicy.js -function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id") { - return { - name: setClientRequestIdPolicyName, - async sendRequest(request3, next) { - if (!request3.headers.has(requestIdHeaderName)) { - request3.headers.set(requestIdHeaderName, request3.requestId); + function proxyPolicy(proxySettings, options2) { + if (!noProxyListLoaded) { + exports2.globalNoProxyList.push(...loadNoProxy()); } - return next(request3); + const defaultProxy = proxySettings ? getUrlFromProxySettings(proxySettings) : getDefaultProxySettingsInternal(); + const cachedAgents = {}; + return { + name: exports2.proxyPolicyName, + async sendRequest(request, next) { + var _a; + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options2 === null || options2 === void 0 ? void 0 : options2.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options2 === null || options2 === void 0 ? void 0 : options2.customNoProxyList) ? void 0 : globalBypassedMap)) { + setProxyAgentOnRequest(request, cachedAgents, defaultProxy); + } else if (request.proxySettings) { + setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); + } + return next(request); + } + }; } - }; -} -var setClientRequestIdPolicyName; -var init_setClientRequestIdPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/setClientRequestIdPolicy.js"() { - "use strict"; - setClientRequestIdPolicyName = "setClientRequestIdPolicy"; } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/agentPolicy.js -function agentPolicy(agent) { - return { - name: agentPolicyName, - sendRequest: async (req, next) => { - if (!req.agent) { - req.agent = agent; - } - return next(req); - } - }; -} -var agentPolicyName; -var init_agentPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/agentPolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { "use strict"; - agentPolicyName = "agentPolicy"; + 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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/tlsPolicy.js -function tlsPolicy(tlsSettings) { - return { - name: tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; -} -var tlsPolicyName; -var init_tlsPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/tlsPolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; - tlsPolicyName = "tlsPolicy"; + 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/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/esm/tracingContext.js -function createTracingContext(options2 = {}) { - let context = new TracingContextImpl(options2.parentContext); - if (options2.span) { - context = context.setValue(knownContextKeys.span, options2.span); - } - if (options2.namespace) { - context = context.setValue(knownContextKeys.namespace, options2.namespace); +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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"; + } } - return context; -} -var knownContextKeys, TracingContextImpl; -var init_tracingContext = __esm({ - "node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/esm/tracingContext.js"() { +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { "use strict"; - knownContextKeys = { - span: Symbol.for("@azure/core-tracing span"), - namespace: Symbol.for("@azure/core-tracing namespace") - }; - TracingContextImpl = class _TracingContextImpl { - constructor(initialContext) { - this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + 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); } - setValue(key, value) { - const newContext = new _TracingContextImpl(this); - newContext._contextMap.set(key, value); - return newContext; + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); } - getValue(key) { - return this._contextMap.get(key); + } + function ensureNodeStream(stream) { + if (stream instanceof ReadableStream) { + makeAsyncIterable(stream); + return stream_1.Readable.fromWeb(stream); + } else { + return stream; } - deleteValue(key) { - const newContext = new _TracingContextImpl(this); - newContext._contextMap.delete(key); - return newContext; + } + 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(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_2 = (e_1 = void 0, tslib_1.__asyncValues(stream)), stream_2_1; stream_2_1 = yield tslib_1.__await(stream_2.next()), _a = stream_2_1.done, !_a; _d = true) { + _c = stream_2_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_2.return)) yield tslib_1.__await(_b.call(stream_2)); + } finally { + if (e_1) throw e_1.error; + } + } + } + }); + }()); + }; + } } }); -// node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/state.js -var require_state = __commonJS({ - "node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/commonjs/state.js"(exports2) { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.state = void 0; - exports2.state = { - instrumenterImplementation: void 0 - }; + 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) { + 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/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/esm/state.js -var import_state, state; -var init_state = __esm({ - "node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/esm/state.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; - import_state = __toESM(require_state(), 1); - state = import_state.state; + 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(options2) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options2.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options2.agent)); + } + if (options2.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options2.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options2.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)(options2.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options2.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options2.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options2.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } } }); -// node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/esm/instrumenter.js -function createDefaultTracingSpan() { - return { - end: () => { - }, - isRecording: () => false, - recordException: () => { - }, - setAttribute: () => { - }, - setStatus: () => { - }, - addEvent: () => { - } - }; -} -function createDefaultInstrumenter() { - return { - createRequestHeaders: () => { - return {}; - }, - parseTraceparentHeader: () => { - return void 0; - }, - startSpan: (_name, spanOptions) => { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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(options2) { return { - span: createDefaultTracingSpan(), - tracingContext: createTracingContext({ parentContext: spanOptions.tracingContext }) + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options2.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options2.apiVersion}`; + } + return next(req); + } }; - }, - withContext(_context, callback, ...callbackArgs) { - return callback(...callbackArgs); } - }; -} -function getInstrumenter() { - if (!state.instrumenterImplementation) { - state.instrumenterImplementation = createDefaultInstrumenter(); } - return state.instrumenterImplementation; -} -var init_instrumenter = __esm({ - "node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/esm/instrumenter.js"() { +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { "use strict"; - init_tracingContext(); - init_state(); + 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/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/esm/tracingClient.js -function createTracingClient(options2) { - const { namespace, packageName, packageVersion } = options2; - function startSpan(name, operationOptions, spanOptions) { - var _a3; - const startSpanResult = getInstrumenter().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a3 = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a3 === void 0 ? void 0 : _a3.tracingContext })); - let tracingContext = startSpanResult.tracingContext; - const span = startSpanResult.span; - if (!tracingContext.getValue(knownContextKeys.namespace)) { - tracingContext = tracingContext.setValue(knownContextKeys.namespace, namespace); +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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, options2) { + if (options2.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; + } + } + return false; } - span.setAttribute("az.namespace", tracingContext.getValue(knownContextKeys.namespace)); - const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) - }); - return { - span, - updatedOptions - }; - } - async function withSpan(name, operationOptions, callback, spanOptions) { - const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions); - try { - const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span))); - span.setStatus({ status: "success" }); - return result; - } catch (err) { - span.setStatus({ status: "error", error: err }); - throw err; - } finally { - span.end(); + function emitInsecureConnectionWarning() { + const warning3 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning3); + if (typeof (process === null || process === void 0 ? void 0 : process.emitWarning) === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning3); + } + } + function ensureSecureConnection(request, options2) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options2)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } } } - function withContext(context, callback, ...callbackArgs) { - return getInstrumenter().withContext(context, callback, ...callbackArgs); - } - function parseTraceparentHeader(traceparentHeader) { - return getInstrumenter().parseTraceparentHeader(traceparentHeader); - } - function createRequestHeaders(tracingContext) { - return getInstrumenter().createRequestHeaders(tracingContext); - } - return { - startSpan, - withSpan, - withContext, - parseTraceparentHeader, - createRequestHeaders - }; -} -var init_tracingClient = __esm({ - "node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/esm/tracingClient.js"() { +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { "use strict"; - init_instrumenter(); - init_tracingContext(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options2) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + var _a, _b; + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options2); + const scheme = (_b = (_a = request.authSchemes) !== null && _a !== void 0 ? _a : options2.authSchemes) === null || _b === void 0 ? void 0 : _b.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, options2.credential.key); + return next(request); + } + }; + } } }); -// node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/esm/index.js -var init_esm4 = __esm({ - "node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/esm/index.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { "use strict"; - init_instrumenter(); - init_tracingClient(); + 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(options2) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + var _a, _b; + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options2); + const scheme = (_b = (_a = request.authSchemes) !== null && _a !== void 0 ? _a : options2.authSchemes) === null || _b === void 0 ? void 0 : _b.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options2.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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/inspect.js -var import_node_util2, custom; -var init_inspect = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/inspect.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { "use strict"; - import_node_util2 = require("util"); - custom = import_node_util2.inspect.custom; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options2) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + var _a, _b; + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options2); + const scheme = (_b = (_a = request.authSchemes) !== null && _a !== void 0 ? _a : options2.authSchemes) === null || _b === void 0 ? void 0 : _b.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options2.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/restError.js -function isRestError(e) { - if (e instanceof RestError) { - return true; +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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(options2) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + var _a, _b; + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options2); + const scheme = (_b = (_a = request.authSchemes) !== null && _a !== void 0 ? _a : options2.authSchemes) === null || _b === void 0 ? void 0 : _b.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options2.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } } - return isError(e) && e.name === "RestError"; -} -var errorSanitizer, RestError; -var init_restError = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/restError.js"() { - "use strict"; - init_esm3(); - init_inspect(); - init_sanitizer(); - errorSanitizer = new Sanitizer(); - RestError = class _RestError extends Error { - constructor(message, options2 = {}) { - super(message); - this.name = "RestError"; - this.code = options2.code; - this.statusCode = options2.statusCode; - Object.defineProperty(this, "request", { value: options2.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options2.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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(options2 = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options2); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options2)); + const { credential, authSchemes, allowInsecureConnection } = options2; + 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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/tracingPolicy.js -function tracingPolicy(options2 = {}) { - const userAgentPromise = getUserAgentValue(options2.userAgentPrefix); - const sanitizer = new Sanitizer({ - additionalAllowedQueryParameters: options2.additionalAllowedQueryParameters - }); - const tracingClient2 = tryCreateTracingClient(); - return { - name: tracingPolicyName, - async sendRequest(request3, next) { - var _a3; - if (!tracingClient2) { - return next(request3); - } - const userAgent = await userAgentPromise; - const spanAttributes = { - "http.url": sanitizer.sanitizeUrl(request3.url), - "http.method": request3.method, - "http.user_agent": userAgent, - requestId: request3.requestId - }; - if (userAgent) { - spanAttributes["http.user_agent"] = userAgent; +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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]; + } } - const { span, tracingContext } = (_a3 = tryCreateSpan(tracingClient2, request3, spanAttributes)) !== null && _a3 !== void 0 ? _a3 : {}; - if (!span || !tracingContext) { - return next(request3); + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; } - try { - const response = await tracingClient2.withContext(tracingContext, next, request3); - tryProcessResponse(span, response); - return response; - } catch (err) { - tryProcessError(span, err); - throw err; + 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 tryCreateTracingClient() { - try { - return createTracingClient({ - namespace: "", - packageName: "@azure/core-rest-pipeline", - packageVersion: SDK_VERSION - }); - } catch (e) { - logger.warning(`Error when creating the TracingClient: ${getErrorMessage(e)}`); - return void 0; - } -} -function tryCreateSpan(tracingClient2, request3, spanAttributes) { - try { - const { span, updatedOptions } = tracingClient2.startSpan(`HTTP ${request3.method}`, { tracingOptions: request3.tracingOptions }, { - spanKind: "client", - spanAttributes - }); - if (!span.isRecording()) { - span.end(); - return void 0; - } - const headers = tracingClient2.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); - for (const [key, value] of Object.entries(headers)) { - request3.headers.set(key, value); + function escapeDispositionField(value) { + return JSON.stringify(value); } - return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; - } catch (e) { - logger.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(e)}`); - return void 0; - } -} -function tryProcessError(span, error3) { - try { - span.setStatus({ - status: "error", - error: isError(error3) ? error3 : void 0 - }); - if (isRestError(error3) && error3.statusCode) { - span.setAttribute("http.status_code", error3.statusCode); + function getContentDisposition(descriptor) { + var _a; + 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 = (_a = descriptor.dispositionType) !== null && _a !== void 0 ? _a : "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; } - span.end(); - } catch (e) { - logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`); - } -} -function tryProcessResponse(span, response) { - try { - span.setAttribute("http.status_code", response.status); - const serviceRequestId = response.headers.get("x-ms-request-id"); - if (serviceRequestId) { - span.setAttribute("serviceRequestId", serviceRequestId); - } - if (response.status >= 400) { - span.setStatus({ - status: "error" - }); + 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}`); } - span.end(); - } catch (e) { - logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`); - } -} -var tracingPolicyName; -var init_tracingPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/tracingPolicy.js"() { - "use strict"; - init_esm4(); - init_constants(); - init_userAgent(); - init_log2(); - init_esm3(); - init_restError(); - init_sanitizer(); - tracingPolicyName = "tracingPolicy"; - } -}); - -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/createPipelineFromOptions.js -function createPipelineFromOptions(options2) { - var _a3; - const pipeline = createEmptyPipeline(); - if (isNodeLike) { - if (options2.agent) { - pipeline.addPolicy(agentPolicy(options2.agent)); - } - if (options2.tlsOptions) { - pipeline.addPolicy(tlsPolicy(options2.tlsOptions)); - } - pipeline.addPolicy(proxyPolicy(options2.proxyOptions)); - pipeline.addPolicy(decompressResponsePolicy()); - } - pipeline.addPolicy(formDataPolicy(), { beforePolicies: [multipartPolicyName] }); - pipeline.addPolicy(userAgentPolicy(options2.userAgentOptions)); - pipeline.addPolicy(setClientRequestIdPolicy((_a3 = options2.telemetryOptions) === null || _a3 === void 0 ? void 0 : _a3.clientRequestIdHeaderName)); - pipeline.addPolicy(multipartPolicy(), { afterPhase: "Deserialize" }); - pipeline.addPolicy(defaultRetryPolicy(options2.retryOptions), { phase: "Retry" }); - pipeline.addPolicy(tracingPolicy(Object.assign(Object.assign({}, options2.userAgentOptions), options2.loggingOptions)), { - afterPhase: "Retry" - }); - if (isNodeLike) { - pipeline.addPolicy(redirectPolicy(options2.redirectOptions), { afterPhase: "Retry" }); - } - pipeline.addPolicy(logPolicy(options2.loggingOptions), { afterPhase: "Sign" }); - return pipeline; -} -var init_createPipelineFromOptions = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/createPipelineFromOptions.js"() { - "use strict"; - init_logPolicy(); - init_pipeline(); - init_redirectPolicy(); - init_userAgentPolicy(); - init_multipartPolicy(); - init_decompressResponsePolicy(); - init_defaultRetryPolicy(); - init_formDataPolicy(); - init_esm3(); - init_proxyPolicy(); - init_setClientRequestIdPolicy(); - init_agentPolicy(); - init_tlsPolicy(); - init_tracingPolicy(); - } -}); - -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/nodeHttpClient.js -function isReadableStream(body2) { - return body2 && typeof body2.pipe === "function"; -} -function isStreamComplete(stream) { - if (stream.readable === false) { - return Promise.resolve(); - } - return new Promise((resolve) => { - const handler = () => { - resolve(); - 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(body2) { - return body2 && typeof body2.byteLength === "number"; -} -function getResponseHeaders(res) { - const headers = 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]); + function buildBodyPart(descriptor) { + var _a; + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)((_a = descriptor.headers) !== null && _a !== void 0 ? _a : {}); + if (contentType) { + headers.set("content-type", contentType); } - } else if (value) { - headers.set(header, value); + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; } } - 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((resolve, reject) => { - const buffer2 = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer2.push(chunk); - } else { - buffer2.push(Buffer.from(chunk)); +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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, options2 = {}, customHttpClient) { + var _a; + const httpClient = customHttpClient !== null && customHttpClient !== void 0 ? customHttpClient : (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options2); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream = (_a = response.readableStreamBody) !== null && _a !== void 0 ? _a : response.browserStreamBody; + const parsedBody = options2.responseAsStream || stream !== void 0 ? void 0 : getResponseBody(response); + const body = stream !== null && stream !== void 0 ? stream : parsedBody; + if (options2 === null || options2 === void 0 ? void 0 : options2.onResponse) { + options2.onResponse(Object.assign(Object.assign({}, response), { request, rawHeaders: headers, parsedBody })); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options2.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options2 === null || options2 === void 0 ? void 0 : options2.onResponse(Object.assign(Object.assign({}, response), { request, rawHeaders }), e); + } + throw e; } - }); - stream.on("end", () => { - resolve(Buffer.concat(buffer2).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new RestError(`Error reading response as text: ${e.message}`, { - code: RestError.PARSE_ERROR - })); + } + function getRequestContentType(options2 = {}) { + var _a, _b, _c; + return (_c = (_a = options2.contentType) !== null && _a !== void 0 ? _a : (_b = options2.headers) === null || _b === void 0 ? void 0 : _b["content-type"]) !== null && _c !== void 0 ? _c : getContentType(options2.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; } - }); - }); -} -function getBodyLength(body2) { - if (!body2) { - return 0; - } else if (Buffer.isBuffer(body2)) { - return body2.length; - } else if (isReadableStream(body2)) { - return null; - } else if (isArrayBuffer(body2)) { - return body2.byteLength; - } else if (typeof body2 === "string") { - return Buffer.from(body2).length; - } else { - return null; - } -} -function createNodeHttpClient() { - return new NodeHttpClient(); -} -var http, https, zlib, import_node_stream2, DEFAULT_TLS_SETTINGS, ReportTransform, NodeHttpClient; -var init_nodeHttpClient = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/nodeHttpClient.js"() { - "use strict"; - http = __toESM(require("http"), 1); - https = __toESM(require("https"), 1); - zlib = __toESM(require("zlib"), 1); - import_node_stream2 = require("stream"); - init_esm2(); - init_httpHeaders(); - init_restError(); - init_log2(); - init_sanitizer(); - DEFAULT_TLS_SETTINGS = {}; - ReportTransform = class extends import_node_stream2.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; + if (typeof body === "string") { try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; } } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; + return "application/json"; + } + function buildPipelineRequest(method, url, options2 = {}) { + var _a, _b, _c; + const requestContentType = getRequestContentType(options2); + const { body, multipartBody } = getRequestBody(options2.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)(Object.assign(Object.assign(Object.assign({}, options2.headers ? options2.headers : {}), { accept: (_c = (_a = options2.accept) !== null && _a !== void 0 ? _a : (_b = options2.headers) === null || _b === void 0 ? void 0 : _b.accept) !== null && _c !== void 0 ? _c : "application/json" }), hasContent && requestContentType && { + "content-type": requestContentType + })); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options2.allowInsecureConnection, + abortSignal: options2.abortSignal, + onUploadProgress: options2.onUploadProgress, + onDownloadProgress: options2.onDownloadProgress, + timeout: options2.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options2.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; } - }; - NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request3) { - var _a3, _b2, _c2; - const abortController = new AbortController(); - let abortListener; - if (request3.abortSignal) { - if (request3.abortSignal.aborted) { - throw new AbortError("The operation was aborted. Request has already been canceled."); + 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) }; } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request3.abortSignal.addEventListener("abort", abortListener); + 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) { + var _a, _b; + const contentType = (_a = response.headers.get("content-type")) !== null && _a !== void 0 ? _a : ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = (_b = response.bodyAsText) !== null && _b !== void 0 ? _b : ""; + 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); } - let timeoutId; - if (request3.timeout > 0) { - timeoutId = setTimeout(() => { - const sanitizer = new Sanitizer(); - logger.info(`request to '${sanitizer.sanitizeUrl(request3.url)}' timed out. canceling...`); - abortController.abort(); - }, request3.timeout); + return String(bodyToParse); + } + } + function createParseError(response, err) { + var _a; + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = (_a = err.code) !== null && _a !== void 0 ? _a : restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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, options2 = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options2); + routePath = buildRoutePath(routePath, pathParameters, options2); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options2); + 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 ""; } - const acceptEncoding = request3.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 body2 = typeof request3.body === "function" ? request3.body() : request3.body; - if (body2 && !request3.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body2); - if (bodyLength !== null) { - request3.headers.set("Content-Length", bodyLength); - } + 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, options2 = {}) { + var _a, _b, _c, _d; + if (!options2.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options2.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; } - let responseStream; - try { - if (body2 && request3.onUploadProgress) { - const onUploadProgress = request3.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - logger.error("Error in upload progress", e); - }); - if (isReadableStream(body2)) { - body2.pipe(uploadReportStream); - } else { - uploadReportStream.end(body2); - } - body2 = uploadReportStream; - } - const res = await this.makeRequest(request3, abortController, body2); - if (timeoutId !== void 0) { - clearTimeout(timeoutId); - } - const headers = getResponseHeaders(res); - const status = (_a3 = res.statusCode) !== null && _a3 !== void 0 ? _a3 : 0; - const response = { - status, - headers, - request: request3 - }; - if (request3.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request3.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - 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 - ((_b2 = request3.streamResponseStatusCodes) === null || _b2 === void 0 ? void 0 : _b2.has(Number.POSITIVE_INFINITY)) || ((_c2 = request3.streamResponseStatusCodes) === null || _c2 === void 0 ? void 0 : _c2.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request3.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body2)) { - uploadStreamDone = isStreamComplete(body2); + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? (_a = param.explode) !== null && _a !== void 0 ? _a : 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, (_b = options2.skipUrlEncoding) !== null && _b !== void 0 ? _b : false, style, item)); } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, (_c = options2.skipUrlEncoding) !== null && _c !== void 0 ? _c : false, style, value)); } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a4; - if (abortListener) { - (_a4 = request3.abortSignal) === null || _a4 === void 0 ? void 0 : _a4.removeEventListener("abort", abortListener); - } - }).catch((e) => { - logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); + } else { + throw new Error("explode can only be set to true for objects and arrays"); } + } else { + paramStrings.push(getQueryParamValue(key, (_d = options2.skipUrlEncoding) !== null && _d !== void 0 ? _d : false, style, rawValue)); } } - makeRequest(request3, abortController, body2) { - var _a3; - const url2 = new URL(request3.url); - const isInsecure = url2.protocol !== "https:"; - if (isInsecure && !request3.allowInsecureConnection) { - throw new Error(`Cannot connect to ${request3.url} while allowInsecureConnection is false.`); - } - const agent = (_a3 = request3.agent) !== null && _a3 !== void 0 ? _a3 : this.getOrCreateAgent(request3, isInsecure); - const options2 = { - agent, - hostname: url2.hostname, - path: `${url2.pathname}${url2.search}`, - port: url2.port, - method: request3.method, - headers: request3.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve, reject) => { - const req = isInsecure ? http.request(options2, resolve) : https.request(options2, resolve); - req.once("error", (err) => { - var _a4; - reject(new RestError(err.message, { code: (_a4 = err.code) !== null && _a4 !== void 0 ? _a4 : RestError.REQUEST_SEND_ERROR, request: request3 })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); - req.destroy(abortError); - reject(abortError); - }); - if (body2 && isReadableStream(body2)) { - body2.pipe(req); - } else if (body2) { - if (typeof body2 === "string" || Buffer.isBuffer(body2)) { - req.end(body2); - } else if (isArrayBuffer(body2)) { - req.end(ArrayBuffer.isView(body2) ? Buffer.from(body2.buffer) : Buffer.from(body2)); - } else { - logger.error("Unrecognized body type", body2); - reject(new RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; } - getOrCreateAgent(request3, isInsecure) { - var _a3; - const disableKeepAlive = request3.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options2) { + var _a; + if (!options2.pathParameters) { + return endpoint; + } + const pathParams = options2.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 (!options2.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = (_a = replaceAll(endpoint, `{${key}}`, value)) !== null && _a !== void 0 ? _a : ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options2 = {}) { + var _a; + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && ((_a = pathParam.allowReserved) !== null && _a !== void 0 ? _a : false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options2.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/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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 = {}) { + var _a, _b, _c; + const pipeline = (_a = clientOptions.pipeline) !== null && _a !== void 0 ? _a : (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if ((_b = clientOptions.additionalPolicies) === null || _b === void 0 ? void 0 : _b.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 = (_c = clientOptions.endpoint) !== null && _c !== void 0 ? _c : endpoint; + const client = (path4, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path4, args, Object.assign({ 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 this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request3.tlsSettings) { - return https.globalAgent; + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url, pipeline, options2, allowInsecureConnection, httpClient) { + var _a; + allowInsecureConnection = (_a = options2.allowInsecureConnection) !== null && _a !== void 0 ? _a : allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, Object.assign(Object.assign({}, options2), { 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, Object.assign(Object.assign({}, options2), { allowInsecureConnection, responseAsStream: true }), httpClient); } - const tlsSettings = (_a3 = request3.tlsSettings) !== null && _a3 !== void 0 ? _a3 : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, Object.assign(Object.assign({}, options2), { allowInsecureConnection, responseAsStream: true }), httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); } - 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; } - } - }; + }; + } } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/defaultHttpClient.js -function createDefaultHttpClient() { - return createNodeHttpClient(); -} -var init_defaultHttpClient = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/defaultHttpClient.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { "use strict"; - init_nodeHttpClient(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options2) { + var _a, _b, _c, _d, _e, _f; + return { + allowInsecureConnection: (_a = options2.requestOptions) === null || _a === void 0 ? void 0 : _a.allowInsecureConnection, + timeout: (_b = options2.requestOptions) === null || _b === void 0 ? void 0 : _b.timeout, + skipUrlEncoding: (_c = options2.requestOptions) === null || _c === void 0 ? void 0 : _c.skipUrlEncoding, + abortSignal: options2.abortSignal, + onUploadProgress: (_d = options2.requestOptions) === null || _d === void 0 ? void 0 : _d.onUploadProgress, + onDownloadProgress: (_e = options2.requestOptions) === null || _e === void 0 ? void 0 : _e.onDownloadProgress, + headers: Object.assign({}, (_f = options2.requestOptions) === null || _f === void 0 ? void 0 : _f.headers), + onResponse: options2.onResponse + }; + } } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/pipelineRequest.js -function createPipelineRequest(options2) { - return new PipelineRequestImpl(options2); -} -var PipelineRequestImpl; -var init_pipelineRequest = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/pipelineRequest.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { "use strict"; - init_httpHeaders(); - init_esm3(); - PipelineRequestImpl = class { - constructor(options2) { - var _a3, _b2, _c2, _d2, _e, _f, _g; - this.url = options2.url; - this.body = options2.body; - this.headers = (_a3 = options2.headers) !== null && _a3 !== void 0 ? _a3 : createHttpHeaders(); - this.method = (_b2 = options2.method) !== null && _b2 !== void 0 ? _b2 : "GET"; - this.timeout = (_c2 = options2.timeout) !== null && _c2 !== void 0 ? _c2 : 0; - this.multipartBody = options2.multipartBody; - this.formData = options2.formData; - this.disableKeepAlive = (_d2 = options2.disableKeepAlive) !== null && _d2 !== void 0 ? _d2 : false; - this.proxySettings = options2.proxySettings; - this.streamResponseStatusCodes = options2.streamResponseStatusCodes; - this.withCredentials = (_e = options2.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options2.abortSignal; - this.tracingOptions = options2.tracingOptions; - this.onUploadProgress = options2.onUploadProgress; - this.onDownloadProgress = options2.onDownloadProgress; - this.requestId = options2.requestId || randomUUID(); - this.allowInsecureConnection = (_f = options2.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options2.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - this.agent = options2.agent; - this.tlsSettings = options2.tlsSettings; - } - }; + 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) { + var _a, _b, _c; + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = (_b = (_a = resp.body) === null || _a === void 0 ? void 0 : _a.error) !== null && _b !== void 0 ? _b : resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : (_c = internalError === null || internalError === void 0 ? void 0 : internalError.message) !== null && _c !== void 0 ? _c : `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError === null || internalError === void 0 ? void 0 : internalError.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + var _a; + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: (_a = statusCodeToNumber(response.status)) !== null && _a !== void 0 ? _a : -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/exponentialRetryPolicy.js -var init_exponentialRetryPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/exponentialRetryPolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { "use strict"; - init_exponentialRetryStrategy(); - init_retryPolicy(); - init_constants(); + 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_logger2(); + 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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/systemErrorRetryPolicy.js -var init_systemErrorRetryPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/systemErrorRetryPolicy.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { "use strict"; - init_exponentialRetryStrategy(); - init_retryPolicy(); - init_constants(); + 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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/throttlingRetryPolicy.js -var init_throttlingRetryPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/throttlingRetryPolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { "use strict"; - init_throttlingRetryStrategy(); - init_retryPolicy(); - init_constants(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger2(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/tokenCycler.js -async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { - async function tryGetAccessToken() { - if (Date.now() < refreshTimeout) { - try { - return await getAccessToken(); - } catch (_a3) { - return null; - } - } else { - const finalToken = await getAccessToken(); - if (finalToken === null) { - throw new Error("Failed to refresh access token."); - } - return finalToken; +// node_modules/.pnpm/@azure+logger@1.3.0/node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/.pnpm/@azure+logger@1.3.0/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 context = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context.logger; + function setLogLevel(level) { + context.setLogLevel(level); } - } - let token = await tryGetAccessToken(); - while (token === null) { - await delay2(retryIntervalInMs); - token = await tryGetAccessToken(); - } - return token; -} -function createTokenCycler(credential, tokenCyclerOptions) { - let refreshWorker = null; - let token = null; - let tenantId; - const options2 = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); - const cycler = { - /** - * Produces true if a refresh job is currently in progress. - */ - get isRefreshing() { - return refreshWorker !== null; - }, - /** - * Produces true if the cycler SHOULD refresh (we are within the refresh - * window and not already refreshing) - */ - get shouldRefresh() { - var _a3; - if (cycler.isRefreshing) { - return false; - } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { - return true; - } - return ((_a3 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a3 !== void 0 ? _a3 : 0) - options2.refreshWindowInMs < Date.now(); - }, - /** - * Produces true if the cycler MUST refresh (null or nearly-expired - * token). - */ - get mustRefresh() { - return token === null || token.expiresOnTimestamp - options2.forcedRefreshWindowInMs < Date.now(); + function getLogLevel() { + return context.getLogLevel(); } - }; - function refresh(scopes, getTokenOptions) { - var _a3; - if (!cycler.isRefreshing) { - const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); - refreshWorker = beginRefresh( - tryGetAccessToken, - options2.retryIntervalInMs, - // If we don't have a token, then we should timeout immediately - (_a3 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a3 !== void 0 ? _a3 : Date.now() - ).then((_token) => { - refreshWorker = null; - token = _token; - tenantId = getTokenOptions.tenantId; - return token; - }).catch((reason) => { - refreshWorker = null; - token = null; - tenantId = void 0; - throw reason; - }); + function createClientLogger(namespace) { + return context.createClientLogger(namespace); } - return refreshWorker; } - return async (scopes, tokenOptions) => { - const hasClaimChallenge = Boolean(tokenOptions.claims); - const tenantIdChanged = tenantId !== tokenOptions.tenantId; - if (hasClaimChallenge) { - token = null; - } - const mustRefresh = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh; - if (mustRefresh) { - return refresh(scopes, tokenOptions); - } - if (cycler.shouldRefresh) { - refresh(scopes, tokenOptions); - } - return token; - }; -} -var DEFAULT_CYCLER_OPTIONS; -var init_tokenCycler = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/util/tokenCycler.js"() { +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log4 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { "use strict"; - init_helpers(); - DEFAULT_CYCLER_OPTIONS = { - forcedRefreshWindowInMs: 1e3, - // Force waiting for a refresh 1s before the token expires - retryIntervalInMs: 3e3, - // Allow refresh attempts every 3s - refreshWindowInMs: 1e3 * 60 * 2 - // Start refreshing 2m before expiry - }; + 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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/bearerTokenAuthenticationPolicy.js -async function trySendRequest(request3, next) { - try { - return [await next(request3), void 0]; - } catch (e) { - if (isRestError(e) && e.response) { - return [e.response, e]; - } else { - throw e; - } - } -} -async function defaultAuthorizeRequest(options2) { - const { scopes, getAccessToken, request: request3 } = options2; - const getTokenOptions = { - abortSignal: request3.abortSignal, - tracingOptions: request3.tracingOptions, - enableCae: true - }; - const accessToken = await getAccessToken(scopes, getTokenOptions); - if (accessToken) { - options2.request.headers.set("Authorization", `Bearer ${accessToken.token}`); - } -} -function isChallengeResponse(response) { - return response.status === 401 && response.headers.has("WWW-Authenticate"); -} -async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { - var _a3; - const { scopes } = onChallengeOptions; - const accessToken = await onChallengeOptions.getAccessToken(scopes, { - enableCae: true, - claims: caeClaims - }); - if (!accessToken) { - return false; - } - onChallengeOptions.request.headers.set("Authorization", `${(_a3 = accessToken.tokenType) !== null && _a3 !== void 0 ? _a3 : "Bearer"} ${accessToken.token}`); - return true; -} -function bearerTokenAuthenticationPolicy(options2) { - var _a3, _b2, _c2; - const { credential, scopes, challengeCallbacks } = options2; - const logger5 = options2.logger || logger; - const callbacks = { - authorizeRequest: (_b2 = (_a3 = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) === null || _a3 === void 0 ? void 0 : _a3.bind(challengeCallbacks)) !== null && _b2 !== void 0 ? _b2 : defaultAuthorizeRequest, - authorizeRequestOnChallenge: (_c2 = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge) === null || _c2 === void 0 ? void 0 : _c2.bind(challengeCallbacks) - }; - const getAccessToken = credential ? createTokenCycler( - credential - /* , options */ - ) : () => Promise.resolve(null); - return { - name: bearerTokenAuthenticationPolicyName, - /** - * If there's no challenge parameter: - * - It will try to retrieve the token using the cache, or the credential's getToken. - * - Then it will try the next policy with or without the retrieved token. - * - * It uses the challenge parameters to: - * - Skip a first attempt to get the token from the credential if there's no cached token, - * since it expects the token to be retrievable only after the challenge. - * - Prepare the outgoing request if the `prepareRequest` method has been provided. - * - Send an initial request to receive the challenge if it fails. - * - Process a challenge if the response contains it. - * - Retrieve a token with the challenge information, then re-send the request. - */ - async sendRequest(request3, next) { - if (!request3.url.toLowerCase().startsWith("https://")) { - throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs."); - } - await callbacks.authorizeRequest({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request: request3, - getAccessToken, - logger: logger5 +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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(options2 = {}) { + var _a; + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options2), { ignoreSystemErrors: true })) + ], { + maxRetries: (_a = options2.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT }); - let response; - let error3; - let shouldSendRequest; - [response, error3] = await trySendRequest(request3, next); - if (isChallengeResponse(response)) { - let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); - if (claims) { - let parsedClaim; - try { - parsedClaim = atob(claims); - } catch (e) { - logger5.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: request3, - getAccessToken, - logger: logger5 - }, parsedClaim); - if (shouldSendRequest) { - [response, error3] = await trySendRequest(request3, next); - } - } else if (callbacks.authorizeRequestOnChallenge) { - shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request: request3, - response, - getAccessToken, - logger: logger5 - }); - if (shouldSendRequest) { - [response, error3] = await trySendRequest(request3, next); - } - if (isChallengeResponse(response)) { - claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); - if (claims) { - let parsedClaim; - try { - parsedClaim = atob(claims); - } catch (e) { - logger5.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: request3, - getAccessToken, - logger: logger5 - }, parsedClaim); - if (shouldSendRequest) { - [response, error3] = await trySendRequest(request3, next); - } - } - } - } - } - if (error3) { - throw error3; - } else { - return response; - } } - }; -} -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) { - var _a3; - if (!challenges) { - return; } - const parsedChallenges = parseChallenges(challenges); - return (_a3 = parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")) === null || _a3 === void 0 ? void 0 : _a3.params.claims; -} -var bearerTokenAuthenticationPolicyName; -var init_bearerTokenAuthenticationPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/bearerTokenAuthenticationPolicy.js"() { +}); + +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; - init_tokenCycler(); - init_log2(); - init_restError(); - bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + 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(options2 = {}) { + var _a; + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options2), { ignoreHttpStatusCodes: true })) + ], { + maxRetries: (_a = options2.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/ndJsonPolicy.js -var init_ndJsonPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/ndJsonPolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/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(options2 = {}) { + var _a; + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: (_a = options2.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } } }); -// node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/auxiliaryAuthenticationHeaderPolicy.js -var init_auxiliaryAuthenticationHeaderPolicy = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/policies/auxiliaryAuthenticationHeaderPolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { "use strict"; - init_tokenCycler(); - init_log2(); + 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/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/index.js -var init_esm5 = __esm({ - "node_modules/.pnpm/@azure+core-rest-pipeline@1.19.1/node_modules/@azure/core-rest-pipeline/dist/esm/index.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { "use strict"; - init_pipeline(); - init_createPipelineFromOptions(); - init_defaultHttpClient(); - init_httpHeaders(); - init_pipelineRequest(); - init_restError(); - init_decompressResponsePolicy(); - init_exponentialRetryPolicy(); - init_setClientRequestIdPolicy(); - init_logPolicy(); - init_multipartPolicy(); - init_proxyPolicy(); - init_redirectPolicy(); - init_systemErrorRetryPolicy(); - init_throttlingRetryPolicy(); - init_retryPolicy(); - init_tracingPolicy(); - init_defaultRetryPolicy(); - init_userAgentPolicy(); - init_tlsPolicy(); - init_formDataPolicy(); - init_bearerTokenAuthenticationPolicy(); - init_ndJsonPolicy(); - init_auxiliaryAuthenticationHeaderPolicy(); - init_agentPolicy(); - init_file(); + 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(options2 = {}) { + return (0, policies_1.logPolicy)(Object.assign({ logger: log_js_1.logger.info }, options2)); + } } }); -// node_modules/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/azureKeyCredential.js -var init_azureKeyCredential = __esm({ - "node_modules/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/azureKeyCredential.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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(options2 = {}) { + return (0, policies_1.redirectPolicy)(options2); + } } }); -// node_modules/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/keyCredential.js -var init_keyCredential = __esm({ - "node_modules/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/keyCredential.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { "use strict"; - init_esm3(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var os6 = tslib_1.__importStar(require("os")); + var process2 = tslib_1.__importStar(require("process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map) { + if (process2 && process2.versions) { + const versions = process2.versions; + if (versions.bun) { + map.set("Bun", versions.bun); + } else if (versions.deno) { + map.set("Deno", versions.deno); + } else if (versions.node) { + map.set("Node", versions.node); + } + } + map.set("OS", `(${os6.arch()}-${os6.type()}-${os6.release()})`); + } } }); -// node_modules/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/azureNamedKeyCredential.js -var init_azureNamedKeyCredential = __esm({ - "node_modules/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/azureNamedKeyCredential.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { "use strict"; - init_esm3(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.0"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; } }); -// node_modules/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/azureSASCredential.js -var init_azureSASCredential = __esm({ - "node_modules/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/azureSASCredential.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { "use strict"; - init_esm3(); + 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/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/tokenCredential.js -function isTokenCredential(credential) { - const castCredential = credential; - return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); -} -var init_tokenCredential = __esm({ - "node_modules/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/tokenCredential.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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(options2 = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options2.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/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/index.js -var init_esm6 = __esm({ - "node_modules/.pnpm/@azure+core-auth@1.9.0/node_modules/@azure/core-auth/dist/esm/index.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { "use strict"; - init_azureKeyCredential(); - init_keyCredential(); - init_azureNamedKeyCredential(); - init_azureSASCredential(); - init_tokenCredential(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("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/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/policies/disableKeepAlivePolicy.js -function createDisableKeepAlivePolicy() { - return { - name: disableKeepAlivePolicyName, - async sendRequest(request3, next) { - request3.disableKeepAlive = true; - return next(request3); - } - }; -} -function pipelineContainsDisableKeepAlivePolicy(pipeline) { - return pipeline.getOrderedPolicies().some((policy) => policy.name === disableKeepAlivePolicyName); -} -var disableKeepAlivePolicyName; -var init_disableKeepAlivePolicy = __esm({ - "node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/policies/disableKeepAlivePolicy.js"() { +// node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/.pnpm/@typespec+ts-http-runtime@0.3.0/node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { "use strict"; - disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; + 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/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/base64.js -function encodeByteArray(value) { - const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); - return bufferValue.toString("base64"); -} -function decodeString(value) { - return Buffer.from(value, "base64"); -} -var init_base64 = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/base64.js"() { +// node_modules/.pnpm/@azure+core-util@1.13.0/node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/.pnpm/@azure+core-util@1.13.0/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, options2) { + var _a, _b; + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + (_a = options2 === null || options2 === void 0 ? void 0 : options2.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 = options2 === null || options2 === void 0 ? void 0 : options2.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); + } + } } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/interfaces.js -var XML_ATTRKEY, XML_CHARKEY; -var init_interfaces = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/interfaces.js"() { +// node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { "use strict"; - XML_ATTRKEY = "$"; - XML_CHARKEY = "_"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError2 = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError2; } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/utils.js -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); -} -function isDuration(value) { - return validateISODuration.test(value); -} -function isValidUuid(uuid2) { - return validUuidRegex.test(uuid2); -} -function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, 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; - } -} -function flattenResponse(fullResponse, responseSpec) { - var _a3, _b2; - const parsedHeaders = fullResponse.parsedHeaders; - if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, 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; - if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, 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 = (_a3 = fullResponse.parsedBody) !== null && _a3 !== void 0 ? _a3 : []; - for (const key of Object.keys(modelProperties)) { - if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b2 = fullResponse.parsedBody) === null || _b2 === void 0 ? void 0 : _b2[key]; - } - } - if (parsedHeaders) { - for (const key of Object.keys(parsedHeaders)) { - arrayResponse[key] = parsedHeaders[key]; - } - } - return isNullable && !fullResponse.parsedBody && !parsedHeaders && Object.getOwnPropertyNames(modelProperties).length === 0 ? null : arrayResponse; - } - return handleNullableResponseAndWrappableBody({ - body: fullResponse.parsedBody, - headers: parsedHeaders, - hasNullableType: isNullable, - shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) - }); -} -var validateISODuration, validUuidRegex; -var init_utils = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/utils.js"() { +// node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; - validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; - 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; + 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/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/serializer.js -function createSerializer(modelMappers = {}, isXML = false) { - return new SerializerImpl(modelMappers, isXML); -} -function trimEnd(str, ch) { - let len = str.length; - while (len - 1 >= 0 && str[len - 1] === ch) { - --len; - } - return str.substr(0, len); -} -function bufferToBase64Url(buffer2) { - if (!buffer2) { - return void 0; - } - if (!(buffer2 instanceof Uint8Array)) { - throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); - } - const str = encodeByteArray(buffer2); - return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); -} -function base64UrlToByteArray(str) { - if (!str) { - return void 0; +// node_modules/.pnpm/@azure+core-util@1.13.0/node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/.pnpm/@azure+core-util@1.13.0/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, options2) { + const { cleanupBeforeAbort, abortSignal: abortSignal2, abortErrorMsg } = options2 !== null && options2 !== void 0 ? options2 : {}; + return new Promise((resolve, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); + } + function removeListeners() { + abortSignal2 === null || abortSignal2 === void 0 ? void 0 : abortSignal2.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal2 === null || abortSignal2 === void 0 ? void 0 : abortSignal2.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal2 === null || abortSignal2 === void 0 ? void 0 : abortSignal2.addEventListener("abort", onAbort); + }); + } } - if (str && typeof str.valueOf() !== "string") { - throw new Error("Please provide an input of type string for converting to Uint8Array"); +}); + +// node_modules/.pnpm/@azure+core-util@1.13.0/node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/.pnpm/@azure+core-util@1.13.0/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, options2) { + let token; + const { abortSignal: abortSignal2, abortErrorMsg } = options2 !== null && options2 !== void 0 ? options2 : {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve) => { + token = setTimeout(resolve, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal: abortSignal2, + abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config2) { + const exponentialDelay = config2.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config2.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } } - str = str.replace(/-/g, "+").replace(/_/g, "/"); - return decodeString(str); -} -function splitSerializeName(prop) { - const classes = []; - let partialclass = ""; - if (prop) { - const subwords = prop.split("."); - for (const item of subwords) { - if (item.charAt(item.length - 1) === "\\") { - partialclass += item.substr(0, item.length - 1) + "."; +}); + +// node_modules/.pnpm/@azure+core-util@1.13.0/node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/.pnpm/@azure+core-util@1.13.0/node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage; + var util_1 = require_internal3(); + function getErrorMessage(e) { + if ((0, util_1.isError)(e)) { + return e.message; } else { - partialclass += item; - classes.push(partialclass); - partialclass = ""; + 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}`; } } } - return classes; -} -function dateToUnixTime(d) { - if (!d) { - return void 0; - } - if (typeof d.valueOf() === "string") { - d = new Date(d); - } - return Math.floor(d.getTime() / 1e3); -} -function unixTimeToDate(n) { - if (!n) { - return void 0; - } - return new Date(n * 1e3); -} -function serializeBasicTypes(typeName, objectName, value) { - if (value !== null && value !== void 0) { - if (typeName.match(/^Number$/i) !== null) { - if (typeof value !== "number") { - throw new Error(`${objectName} with value ${value} must be of type number.`); - } - } else if (typeName.match(/^String$/i) !== null) { - if (typeof value.valueOf() !== "string") { - throw new Error(`${objectName} with value "${value}" must be of type string.`); - } - } else if (typeName.match(/^Uuid$/i) !== null) { - if (!(typeof value.valueOf() === "string" && isValidUuid(value))) { - throw new Error(`${objectName} with value "${value}" must be of type string and a valid uuid.`); - } - } else if (typeName.match(/^Boolean$/i) !== null) { - if (typeof value !== "boolean") { - throw new Error(`${objectName} with value ${value} must be of type boolean.`); +}); + +// node_modules/.pnpm/@azure+core-util@1.13.0/node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/.pnpm/@azure+core-util@1.13.0/node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined(thing) || typeof thing !== "object") { + return false; } - } else if (typeName.match(/^Stream$/i) !== null) { - const objectType = typeof value; - if (objectType !== "string" && typeof value.pipe !== "function" && // NodeJS.ReadableStream - typeof value.tee !== "function" && // browser ReadableStream - !(value instanceof ArrayBuffer) && !ArrayBuffer.isView(value) && // File objects count as a type of Blob, so we want to use instanceof explicitly - !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob) && objectType !== "function") { - throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`); + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } } + return true; } - } - return value; -} -function serializeEnumType(objectName, allowedValues, value) { - if (!allowedValues) { - throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`); - } - const isPresent = allowedValues.some((item) => { - if (typeof item.valueOf() === "string") { - return item.toLowerCase() === value.toLowerCase(); + function objectHasProperty(thing, property) { + return isDefined(thing) && typeof thing === "object" && property in thing; } - return item === value; - }); - if (!isPresent) { - throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`); } - return value; -} -function serializeByteArrayType(objectName, value) { - if (value !== void 0 && value !== null) { - if (!(value instanceof Uint8Array)) { - throw new Error(`${objectName} must be of type Uint8Array.`); +}); + +// node_modules/.pnpm/@azure+core-util@1.13.0/node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/.pnpm/@azure+core-util@1.13.0/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, config2) { + return tspRuntime.calculateRetryDelay(retryAttempt, config2); } - value = encodeByteArray(value); - } - return value; -} -function serializeBase64UrlType(objectName, value) { - if (value !== void 0 && value !== null) { - if (!(value instanceof Uint8Array)) { - throw new Error(`${objectName} must be of type Uint8Array.`); + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); } - value = bufferToBase64Url(value); - } - return value; -} -function serializeDateTypes(typeName, value, objectName) { - if (value !== void 0 && value !== null) { - if (typeName.match(/^Date$/i) !== null) { - if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { - throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); - } - value = value instanceof Date ? value.toISOString().substring(0, 10) : new Date(value).toISOString().substring(0, 10); - } else if (typeName.match(/^DateTime$/i) !== null) { - if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { - throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); - } - value = value instanceof Date ? value.toISOString() : new Date(value).toISOString(); - } else if (typeName.match(/^DateTimeRfc1123$/i) !== null) { - if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { - throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`); - } - value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString(); - } else if (typeName.match(/^UnixTime$/i) !== null) { - if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { - throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`); - } - value = dateToUnixTime(value); - } else if (typeName.match(/^TimeSpan$/i) !== null) { - if (!isDuration(value)) { - throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was "${value}".`); - } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); } - } - return value; -} -function serializeSequenceType(serializer, mapper, object, objectName, isXml, options2) { - var _a3; - if (!Array.isArray(object)) { - throw new Error(`${objectName} must be of type Array.`); - } - let elementType = mapper.type.element; - if (!elementType || typeof elementType !== "object") { - 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 = (_a3 = serializer.modelMappers[elementType.type.className]) !== null && _a3 !== void 0 ? _a3 : elementType; - } - const tempArray = []; - for (let i = 0; i < object.length; i++) { - const serializedValue = serializer.serialize(elementType, object[i], objectName, options2); - if (isXml && elementType.xmlNamespace) { - const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; - if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); - tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; - } else { - tempArray[i] = {}; - tempArray[i][options2.xml.xmlCharKey] = serializedValue; - tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; - } - } else { - tempArray[i] = serializedValue; + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); } - } - return tempArray; -} -function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options2) { - if (typeof object !== "object") { - throw new Error(`${objectName} must be of type object.`); - } - const valueType = mapper.type.value; - if (!valueType || typeof valueType !== "object") { - throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${objectName}.`); - } - const tempDictionary = {}; - for (const key of Object.keys(object)) { - const serializedValue = serializer.serialize(valueType, object[key], objectName, options2); - tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options2); - } - if (isXml && mapper.xmlNamespace) { - const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - const result = tempDictionary; - result[XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace }; - return result; - } - return tempDictionary; -} -function resolveAdditionalProperties(serializer, mapper, objectName) { - 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 additionalProperties; -} -function resolveReferencedMapper(serializer, mapper, objectName) { - const className = mapper.type.className; - if (!className) { - throw new Error(`Class name for model "${objectName}" is not provided in the mapper "${JSON.stringify(mapper, void 0, 2)}".`); - } - return serializer.modelMappers[className]; -} -function resolveModelProperties(serializer, mapper, objectName) { - let modelProps = mapper.type.modelProperties; - if (!modelProps) { - const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - if (!modelMapper) { - throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); + function isError(e) { + return tspRuntime.isError(e); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : 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}".`); + 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); } } - return modelProps; -} -function serializeCompositeType(serializer, mapper, object, objectName, isXml, options2) { - if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { - mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); - } - if (object !== void 0 && object !== null) { - const payload = {}; - const modelProps = resolveModelProperties(serializer, mapper, objectName); - for (const key of Object.keys(modelProps)) { - const propertyMapper = modelProps[key]; - if (propertyMapper.readOnly) { - continue; +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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"); } - let propName3; - let parentObject = payload; - if (serializer.isXML) { - if (propertyMapper.xmlIsWrapped) { - propName3 = propertyMapper.xmlName; - } else { - propName3 = propertyMapper.xmlElementName || propertyMapper.xmlName; - } + }; + var rawContent = Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); } else { - const paths = splitSerializeName(propertyMapper.serializedName); - propName3 = paths.pop(); - for (const pathName of paths) { - const childObject = parentObject[pathName]; - if ((childObject === void 0 || childObject === null) && (object[key] !== void 0 && object[key] !== null || propertyMapper.defaultValue !== void 0)) { - parentObject[pathName] = {}; - } - parentObject = parentObject[pathName]; - } - } - if (parentObject !== void 0 && parentObject !== null) { - if (isXml && mapper.xmlNamespace) { - const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); - } - const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; - let toSerialize = object[key]; - const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); - if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && (toSerialize === void 0 || toSerialize === null)) { - toSerialize = mapper.serializedName; - } - const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options2); - if (serializedValue !== void 0 && propName3 !== void 0 && propName3 !== null) { - const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options2); - if (isXml && propertyMapper.xmlIsAttribute) { - parentObject[XML_ATTRKEY] = parentObject[XML_ATTRKEY] || {}; - parentObject[XML_ATTRKEY][propName3] = serializedValue; - } else if (isXml && propertyMapper.xmlIsWrapped) { - parentObject[propName3] = { [propertyMapper.xmlElementName]: value }; - } else { - parentObject[propName3] = value; - } - } + return blob; } } - const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); - if (additionalPropertiesMapper) { - const propNames = Object.keys(modelProps); - for (const clientPropName in object) { - const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName); - if (isAdditionalProperty) { - payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options2); + function createFileFromStream(stream, name, options2 = {}) { + var _a, _b, _c, _d; + return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options2.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options2.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options2.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options2.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { + const s = stream(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); } - } - } - return payload; - } - return object; -} -function getXmlObjectValue(propertyMapper, serializedValue, isXml, options2) { - if (!isXml || !propertyMapper.xmlNamespace) { - return serializedValue; - } - const xmlnsKey = propertyMapper.xmlNamespacePrefix ? `xmlns:${propertyMapper.xmlNamespacePrefix}` : "xmlns"; - const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace }; - if (["Composite"].includes(propertyMapper.type.name)) { - if (serializedValue[XML_ATTRKEY]) { - return serializedValue; - } else { - const result2 = Object.assign({}, serializedValue); - result2[XML_ATTRKEY] = xmlNamespace; - return result2; + return s; + }, [rawContent]: stream }); } - } - const result = {}; - result[options2.xml.xmlCharKey] = serializedValue; - result[XML_ATTRKEY] = xmlNamespace; - return result; -} -function isSpecialXmlProperty(propertyName, options2) { - return [XML_ATTRKEY, options2.xml.xmlCharKey].includes(propertyName); -} -function deserializeCompositeType(serializer, mapper, responseBody, objectName, options2) { - var _a3, _b2; - const xmlCharKey = (_a3 = options2.xml.xmlCharKey) !== null && _a3 !== void 0 ? _a3 : XML_CHARKEY; - if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { - mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); - } - const modelProps = resolveModelProperties(serializer, mapper, objectName); - let instance = {}; - const handledPropertyNames = []; - for (const key of Object.keys(modelProps)) { - const propertyMapper = modelProps[key]; - const paths = splitSerializeName(modelProps[key].serializedName); - handledPropertyNames.push(paths[0]); - const { serializedName, xmlName, xmlElementName } = propertyMapper; - let propertyObjectName = objectName; - if (serializedName !== "" && serializedName !== void 0) { - propertyObjectName = objectName + "." + serializedName; - } - const headerCollectionPrefix = propertyMapper.headerCollectionPrefix; - if (headerCollectionPrefix) { - const dictionary = {}; - for (const headerKey of Object.keys(responseBody)) { - if (headerKey.startsWith(headerCollectionPrefix)) { - dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options2); - } - handledPropertyNames.push(headerKey); - } - instance[key] = dictionary; - } else if (serializer.isXML) { - if (propertyMapper.xmlIsAttribute && responseBody[XML_ATTRKEY]) { - instance[key] = serializer.deserialize(propertyMapper, responseBody[XML_ATTRKEY][xmlName], propertyObjectName, options2); - } else if (propertyMapper.xmlIsMsText) { - if (responseBody[xmlCharKey] !== void 0) { - instance[key] = responseBody[xmlCharKey]; - } else if (typeof responseBody === "string") { - instance[key] = responseBody; - } + function createFile(content, name, options2 = {}) { + var _a, _b, _c; + if (core_util_1.isNodeLike) { + return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options2.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options2.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options2.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); } else { - const propertyName = xmlElementName || xmlName || serializedName; - if (propertyMapper.xmlIsWrapped) { - const wrapped = responseBody[xmlName]; - const elementList = (_b2 = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b2 !== void 0 ? _b2 : []; - instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options2); - handledPropertyNames.push(xmlName); - } else { - const property = responseBody[propertyName]; - instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options2); - handledPropertyNames.push(propertyName); - } - } - } else { - let propertyInstance; - let res = responseBody; - let steps = 0; - for (const item of paths) { - if (!res) - break; - steps++; - res = res[item]; - } - if (res === null && steps < paths.length) { - res = void 0; - } - propertyInstance = res; - const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; - if (polymorphicDiscriminator && key === polymorphicDiscriminator.clientName && (propertyInstance === void 0 || propertyInstance === null)) { - propertyInstance = mapper.serializedName; - } - let serializedValue; - if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { - propertyInstance = responseBody[key]; - const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options2); - for (const [k, v] of Object.entries(instance)) { - if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) { - arrayInstance[k] = v; - } - } - instance = arrayInstance; - } else if (propertyInstance !== void 0 || propertyMapper.defaultValue !== void 0) { - serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options2); - instance[key] = serializedValue; + return new File([content], name, options2); } } } - const additionalPropertiesMapper = mapper.type.additionalProperties; - if (additionalPropertiesMapper) { - const isAdditionalProperty = (responsePropName) => { - for (const clientPropName in modelProps) { - const paths = splitSerializeName(modelProps[clientPropName].serializedName); - if (paths[0] === responsePropName) { - return false; +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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); } - } - return true; - }; - for (const responsePropName in responseBody) { - if (isAdditionalProperty(responsePropName)) { - instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options2); - } - } - } else if (responseBody && !options2.ignoreUnknownProperties) { - for (const key of Object.keys(responseBody)) { - if (instance[key] === void 0 && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key, options2)) { - instance[key] = responseBody[key]; - } + }; } } - return instance; -} -function deserializeDictionaryType(serializer, mapper, responseBody, objectName, options2) { - const value = mapper.type.value; - if (!value || typeof value !== "object") { - throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${objectName}`); - } - if (responseBody) { - const tempDictionary = {}; - for (const key of Object.keys(responseBody)) { - tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options2); +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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)(); } - return tempDictionary; } - return responseBody; -} -function deserializeSequenceType(serializer, mapper, responseBody, objectName, options2) { - var _a3; - 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}`); +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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(options2 = {}) { + return (0, policies_1.defaultRetryPolicy)(options2); + } } - if (responseBody) { - if (!Array.isArray(responseBody)) { - responseBody = [responseBody]; +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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)(); } - if (element.type.name === "Composite" && element.type.className) { - element = (_a3 = serializer.modelMappers[element.type.className]) !== null && _a3 !== void 0 ? _a3 : element; + } +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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); } - const tempArray = []; - for (let i = 0; i < responseBody.length; i++) { - tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options2); + function proxyPolicy(proxySettings, options2) { + return (0, policies_1.proxyPolicy)(proxySettings, options2); } - return tempArray; } - return responseBody; -} -function getIndexDiscriminator(discriminators, discriminatorValue, typeName) { - const typeNamesToCheck = [typeName]; - while (typeNamesToCheck.length) { - const currentName = typeNamesToCheck.shift(); - const indexDiscriminator = discriminatorValue === currentName ? discriminatorValue : currentName + "." + discriminatorValue; - if (Object.prototype.hasOwnProperty.call(discriminators, indexDiscriminator)) { - return discriminators[indexDiscriminator]; - } else { - for (const [name, mapper] of Object.entries(discriminators)) { - if (name.startsWith(currentName + ".") && mapper.type.uberParent === currentName && mapper.type.className) { - typeNamesToCheck.push(mapper.type.className); +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js +var require_setClientRequestIdPolicy = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.setClientRequestIdPolicyName = void 0; + exports2.setClientRequestIdPolicy = setClientRequestIdPolicy; + exports2.setClientRequestIdPolicyName = "setClientRequestIdPolicy"; + function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id") { + return { + name: exports2.setClientRequestIdPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(requestIdHeaderName)) { + request.headers.set(requestIdHeaderName, request.requestId); + } + return next(request); } - } + }; } } - return void 0; -} -function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a3; - const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); - if (polymorphicDiscriminator) { - let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; - if (discriminatorName) { - if (polymorphicPropertyName === "serializedName") { - discriminatorName = discriminatorName.replace(/\\/gi, ""); - } - const discriminatorValue = object[discriminatorName]; - const typeName = (_a3 = mapper.type.uberParent) !== null && _a3 !== void 0 ? _a3 : mapper.type.className; - if (typeof discriminatorValue === "string" && typeName) { - const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); - if (polymorphicMapper) { - mapper = polymorphicMapper; - } - } +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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); } } - return mapper; -} -function getPolymorphicDiscriminatorRecursively(serializer, mapper) { - return mapper.type.polymorphicDiscriminator || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className); -} -function getPolymorphicDiscriminatorSafely(serializer, typeName) { - return typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator; -} -var SerializerImpl, MapperTypeNames; -var init_serializer = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/serializer.js"() { +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; - init_base64(); - init_interfaces(); - init_utils(); - SerializerImpl = class { - constructor(modelMappers = {}, isXML = false) { - this.modelMappers = modelMappers; - this.isXML = isXML; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; + function tlsPolicy(tlsSettings) { + return (0, policies_1.tlsPolicy)(tlsSettings); + } + } +}); + +// node_modules/.pnpm/@azure+core-tracing@1.3.0/node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js +var require_tracingContext = __commonJS({ + "node_modules/.pnpm/@azure+core-tracing@1.3.0/node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; + exports2.knownContextKeys = { + span: Symbol.for("@azure/core-tracing span"), + namespace: Symbol.for("@azure/core-tracing namespace") + }; + function createTracingContext(options2 = {}) { + let context = new TracingContextImpl(options2.parentContext); + if (options2.span) { + context = context.setValue(exports2.knownContextKeys.span, options2.span); } - /** - * @deprecated Removing the constraints validation on client side. - */ - validateConstraints(mapper, value, objectName) { - const failValidation = (constraintName, constraintValue) => { - throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); - }; - if (mapper.constraints && value !== void 0 && value !== null) { - const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems } = mapper.constraints; - if (ExclusiveMaximum !== void 0 && value >= ExclusiveMaximum) { - failValidation("ExclusiveMaximum", ExclusiveMaximum); - } - if (ExclusiveMinimum !== void 0 && value <= ExclusiveMinimum) { - failValidation("ExclusiveMinimum", ExclusiveMinimum); - } - if (InclusiveMaximum !== void 0 && value > InclusiveMaximum) { - failValidation("InclusiveMaximum", InclusiveMaximum); - } - if (InclusiveMinimum !== void 0 && value < InclusiveMinimum) { - failValidation("InclusiveMinimum", InclusiveMinimum); - } - if (MaxItems !== void 0 && value.length > MaxItems) { - failValidation("MaxItems", MaxItems); - } - if (MaxLength !== void 0 && value.length > MaxLength) { - failValidation("MaxLength", MaxLength); - } - if (MinItems !== void 0 && value.length < MinItems) { - failValidation("MinItems", MinItems); - } - if (MinLength !== void 0 && value.length < MinLength) { - failValidation("MinLength", MinLength); - } - if (MultipleOf !== void 0 && value % MultipleOf !== 0) { - failValidation("MultipleOf", MultipleOf); - } - if (Pattern) { - const pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; - if (typeof value !== "string" || value.match(pattern) === null) { - failValidation("Pattern", Pattern); - } - } - if (UniqueItems && value.some((item, i, ar) => ar.indexOf(item) !== i)) { - failValidation("UniqueItems", UniqueItems); - } - } + if (options2.namespace) { + context = context.setValue(exports2.knownContextKeys.namespace, options2.namespace); } - /** - * Serialize the given object based on its metadata defined in the mapper - * - * @param mapper - The mapper which defines the metadata of the serializable object - * - * @param object - A valid Javascript object to be serialized - * - * @param objectName - Name of the serialized object - * - * @param options - additional options to serialization - * - * @returns A valid serialized Javascript object - */ - serialize(mapper, object, objectName, options2 = { xml: {} }) { - var _a3, _b2, _c2; - const updatedOptions = { - xml: { - rootName: (_a3 = options2.xml.rootName) !== null && _a3 !== void 0 ? _a3 : "", - includeRoot: (_b2 = options2.xml.includeRoot) !== null && _b2 !== void 0 ? _b2 : false, - xmlCharKey: (_c2 = options2.xml.xmlCharKey) !== null && _c2 !== void 0 ? _c2 : XML_CHARKEY - } - }; - let payload = {}; - const mapperType = mapper.type.name; - if (!objectName) { - objectName = mapper.serializedName; - } - if (mapperType.match(/^Sequence$/i) !== null) { - payload = []; - } - if (mapper.isConstant) { - object = mapper.defaultValue; - } - const { required: required2, nullable: nullable2 } = mapper; - if (required2 && nullable2 && object === void 0) { - throw new Error(`${objectName} cannot be undefined.`); - } - if (required2 && !nullable2 && (object === void 0 || object === null)) { - throw new Error(`${objectName} cannot be null or undefined.`); - } - if (!required2 && nullable2 === false && object === null) { - throw new Error(`${objectName} cannot be null.`); - } - if (object === void 0 || object === null) { - payload = object; - } else { - if (mapperType.match(/^any$/i) !== null) { - payload = object; - } else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) { - payload = serializeBasicTypes(mapperType, objectName, object); - } else if (mapperType.match(/^Enum$/i) !== null) { - const enumMapper = mapper; - payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); - } else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) { - payload = serializeDateTypes(mapperType, object, objectName); - } else if (mapperType.match(/^ByteArray$/i) !== null) { - payload = serializeByteArrayType(objectName, object); - } else if (mapperType.match(/^Base64Url$/i) !== null) { - payload = serializeBase64UrlType(objectName, object); - } else if (mapperType.match(/^Sequence$/i) !== null) { - payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); - } else if (mapperType.match(/^Dictionary$/i) !== null) { - payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); - } else if (mapperType.match(/^Composite$/i) !== null) { - payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); - } - } - return payload; + return context; + } + var TracingContextImpl = class _TracingContextImpl { + constructor(initialContext) { + this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } - /** - * Deserialize the given object based on its metadata defined in the mapper - * - * @param mapper - The mapper which defines the metadata of the serializable object - * - * @param responseBody - A valid Javascript entity to be deserialized - * - * @param objectName - Name of the deserialized object - * - * @param options - Controls behavior of XML parser and builder. - * - * @returns A valid deserialized Javascript object - */ - deserialize(mapper, responseBody, objectName, options2 = { xml: {} }) { - var _a3, _b2, _c2, _d2; - const updatedOptions = { - xml: { - rootName: (_a3 = options2.xml.rootName) !== null && _a3 !== void 0 ? _a3 : "", - includeRoot: (_b2 = options2.xml.includeRoot) !== null && _b2 !== void 0 ? _b2 : false, - xmlCharKey: (_c2 = options2.xml.xmlCharKey) !== null && _c2 !== void 0 ? _c2 : XML_CHARKEY - }, - ignoreUnknownProperties: (_d2 = options2.ignoreUnknownProperties) !== null && _d2 !== void 0 ? _d2 : false - }; - if (responseBody === void 0 || responseBody === null) { - if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { - responseBody = []; - } - if (mapper.defaultValue !== void 0) { - responseBody = mapper.defaultValue; - } - return responseBody; - } - let payload; - const mapperType = mapper.type.name; - if (!objectName) { - objectName = mapper.serializedName; - } - if (mapperType.match(/^Composite$/i) !== null) { - payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions); - } else { - if (this.isXML) { - const xmlCharKey = updatedOptions.xml.xmlCharKey; - if (responseBody[XML_ATTRKEY] !== void 0 && responseBody[xmlCharKey] !== void 0) { - responseBody = responseBody[xmlCharKey]; - } - } - if (mapperType.match(/^Number$/i) !== null) { - payload = parseFloat(responseBody); - if (isNaN(payload)) { - payload = responseBody; - } - } else if (mapperType.match(/^Boolean$/i) !== null) { - if (responseBody === "true") { - payload = true; - } else if (responseBody === "false") { - payload = false; - } else { - payload = responseBody; - } - } else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) { - payload = responseBody; - } else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) { - payload = new Date(responseBody); - } else if (mapperType.match(/^UnixTime$/i) !== null) { - payload = unixTimeToDate(responseBody); - } else if (mapperType.match(/^ByteArray$/i) !== null) { - payload = decodeString(responseBody); - } else if (mapperType.match(/^Base64Url$/i) !== null) { - payload = base64UrlToByteArray(responseBody); - } else if (mapperType.match(/^Sequence$/i) !== null) { - payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions); - } else if (mapperType.match(/^Dictionary$/i) !== null) { - payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions); - } - } - if (mapper.isConstant) { - payload = mapper.defaultValue; - } - return payload; + setValue(key, value) { + const newContext = new _TracingContextImpl(this); + newContext._contextMap.set(key, value); + return newContext; + } + getValue(key) { + return this._contextMap.get(key); + } + deleteValue(key) { + const newContext = new _TracingContextImpl(this); + newContext._contextMap.delete(key); + return newContext; } }; - MapperTypeNames = { - Base64Url: "Base64Url", - Boolean: "Boolean", - ByteArray: "ByteArray", - Composite: "Composite", - Date: "Date", - DateTime: "DateTime", - DateTimeRfc1123: "DateTimeRfc1123", - Dictionary: "Dictionary", - Enum: "Enum", - Number: "Number", - Object: "Object", - Sequence: "Sequence", - String: "String", - Stream: "Stream", - TimeSpan: "TimeSpan", - UnixTime: "UnixTime" - }; + exports2.TracingContextImpl = TracingContextImpl; } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/commonjs/state.js -var require_state2 = __commonJS({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/commonjs/state.js"(exports2) { +// node_modules/.pnpm/@azure+core-tracing@1.3.0/node_modules/@azure/core-tracing/dist/commonjs/state.js +var require_state = __commonJS({ + "node_modules/.pnpm/@azure+core-tracing@1.3.0/node_modules/@azure/core-tracing/dist/commonjs/state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.state = void 0; exports2.state = { - operationRequestMap: /* @__PURE__ */ new WeakMap() + instrumenterImplementation: void 0 }; } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/state.js -var import_state3, state2; -var init_state2 = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/state.js"() { +// node_modules/.pnpm/@azure+core-tracing@1.3.0/node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js +var require_instrumenter = __commonJS({ + "node_modules/.pnpm/@azure+core-tracing@1.3.0/node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; - import_state3 = __toESM(require_state2(), 1); - state2 = import_state3.state; - } -}); - -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/operationHelpers.js -function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { - let parameterPath = parameter.parameterPath; - const parameterMapper = parameter.mapper; - let value; - if (typeof parameterPath === "string") { - parameterPath = [parameterPath]; - } - if (Array.isArray(parameterPath)) { - if (parameterPath.length > 0) { - if (parameterMapper.isConstant) { - value = parameterMapper.defaultValue; - } else { - let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); - if (!propertySearchResult.propertyFound && fallbackObject) { - propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath); - } - let useDefaultValue = false; - if (!propertySearchResult.propertyFound) { - useDefaultValue = parameterMapper.required || parameterPath[0] === "options" && parameterPath.length === 2; + Object.defineProperty(exports2, "__esModule", { value: true }); + 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() { + return { + end: () => { + }, + isRecording: () => false, + recordException: () => { + }, + setAttribute: () => { + }, + setStatus: () => { + }, + addEvent: () => { } - value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; - } + }; } - } else { - if (parameterMapper.required) { - value = {}; - } - for (const propertyName in parameterPath) { - const propertyMapper = parameterMapper.type.modelProperties[propertyName]; - const propertyPath = parameterPath[propertyName]; - const propertyValue = getOperationArgumentValueFromParameter(operationArguments, { - parameterPath: propertyPath, - mapper: propertyMapper - }, fallbackObject); - if (propertyValue !== void 0) { - if (!value) { - value = {}; + function createDefaultInstrumenter() { + return { + createRequestHeaders: () => { + return {}; + }, + parseTraceparentHeader: () => { + return void 0; + }, + startSpan: (_name, spanOptions) => { + return { + span: createDefaultTracingSpan(), + tracingContext: (0, tracingContext_js_1.createTracingContext)({ parentContext: spanOptions.tracingContext }) + }; + }, + withContext(_context, callback, ...callbackArgs) { + return callback(...callbackArgs); } - value[propertyName] = propertyValue; - } + }; } - } - return value; -} -function getPropertyFromParameterPath(parent, parameterPath) { - const result = { propertyFound: false }; - let i = 0; - for (; i < parameterPath.length; ++i) { - const parameterPathPart = parameterPath[i]; - if (parent && parameterPathPart in parent) { - parent = parent[parameterPathPart]; - } else { - break; + function useInstrumenter(instrumenter) { + state_js_1.state.instrumenterImplementation = instrumenter; + } + function getInstrumenter() { + if (!state_js_1.state.instrumenterImplementation) { + state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); + } + return state_js_1.state.instrumenterImplementation; } - } - if (i === parameterPath.length) { - result.propertyValue = parent; - result.propertyFound = true; - } - return result; -} -function hasOriginalRequest(request3) { - return originalRequestSymbol in request3; -} -function getOperationRequestInfo(request3) { - if (hasOriginalRequest(request3)) { - return getOperationRequestInfo(request3[originalRequestSymbol]); - } - let info5 = state2.operationRequestMap.get(request3); - if (!info5) { - info5 = {}; - state2.operationRequestMap.set(request3, info5); - } - return info5; -} -var originalRequestSymbol; -var init_operationHelpers = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/operationHelpers.js"() { - "use strict"; - init_state2(); - originalRequestSymbol = Symbol.for("@azure/core-client original request"); } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/deserializationPolicy.js -function deserializationPolicy(options2 = {}) { - var _a3, _b2, _c2, _d2, _e, _f, _g; - const jsonContentTypes = (_b2 = (_a3 = options2.expectedContentTypes) === null || _a3 === void 0 ? void 0 : _a3.json) !== null && _b2 !== void 0 ? _b2 : defaultJsonContentTypes; - const xmlContentTypes = (_d2 = (_c2 = options2.expectedContentTypes) === null || _c2 === void 0 ? void 0 : _c2.xml) !== null && _d2 !== void 0 ? _d2 : defaultXmlContentTypes; - const parseXML2 = options2.parseXML; - const serializerOptions = options2.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 : XML_CHARKEY - } - }; - return { - name: deserializationPolicyName, - async sendRequest(request3, next) { - const response = await next(request3); - return deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, updatedOptions, parseXML2); - } - }; -} -function getOperationResponseMap(parsedResponse) { - let result; - const request3 = parsedResponse.request; - const operationInfo = getOperationRequestInfo(request3); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { - result = operationSpec.responses[parsedResponse.status]; - } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); - } - } - return result; -} -function shouldDeserializeResponse(parsedResponse) { - const request3 = parsedResponse.request; - const operationInfo = getOperationRequestInfo(request3); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; - let result; - if (shouldDeserialize === void 0) { - result = true; - } else if (typeof shouldDeserialize === "boolean") { - result = shouldDeserialize; - } else { - result = shouldDeserialize(parsedResponse); - } - return result; -} -async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options2, parseXML2) { - const parsedResponse = await parse3(jsonContentTypes, xmlContentTypes, response, options2, parseXML2); - if (!shouldDeserializeResponse(parsedResponse)) { - return parsedResponse; - } - const operationInfo = getOperationRequestInfo(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - if (!operationSpec || !operationSpec.responses) { - return parsedResponse; - } - const responseSpec = getOperationResponseMap(parsedResponse); - const { error: error3, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options2); - if (error3) { - throw error3; - } else if (shouldReturnResponse) { - return parsedResponse; - } - if (responseSpec) { - if (responseSpec.bodyMapper) { - let valueToDeserialize = parsedResponse.parsedBody; - if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperTypeNames.Sequence) { - valueToDeserialize = typeof valueToDeserialize === "object" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] : []; - } - try { - parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody", options2); - } catch (deserializeError) { - const restError = new RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, { - statusCode: parsedResponse.status, - request: parsedResponse.request, - response: parsedResponse +// node_modules/.pnpm/@azure+core-tracing@1.3.0/node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js +var require_tracingClient = __commonJS({ + "node_modules/.pnpm/@azure+core-tracing@1.3.0/node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createTracingClient = createTracingClient; + var instrumenter_js_1 = require_instrumenter(); + var tracingContext_js_1 = require_tracingContext(); + function createTracingClient(options2) { + const { namespace, packageName, packageVersion } = options2; + 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 })); + let tracingContext = startSpanResult.tracingContext; + const span = startSpanResult.span; + if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { + tracingContext = tracingContext.setValue(tracingContext_js_1.knownContextKeys.namespace, namespace); + } + 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 }) }); - throw restError; - } - } else if (operationSpec.httpMethod === "HEAD") { - parsedResponse.parsedBody = response.status >= 200 && response.status < 300; - } - if (responseSpec.headersMapper) { - parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders", { xml: {}, ignoreUnknownProperties: true }); - } - } - return parsedResponse; -} -function isOperationSpecEmpty(operationSpec) { - const expectedStatusCodes = Object.keys(operationSpec.responses); - return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; -} -function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options2) { - var _a3, _b2, _c2, _d2, _e; - const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; - const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; - if (isExpectedStatusCode) { - if (responseSpec) { - if (!responseSpec.isError) { - return { error: null, shouldReturnResponse: false }; + return { + span, + updatedOptions + }; } - } else { - return { error: null, shouldReturnResponse: false }; - } - } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a3 = parsedResponse.request.streamResponseStatusCodes) === null || _a3 === void 0 ? void 0 : _a3.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; - const error3 = new RestError(initialErrorMessage, { - statusCode: parsedResponse.status, - request: parsedResponse.request, - response: parsedResponse - }); - if (!errorResponseSpec && !(((_c2 = (_b2 = parsedResponse.parsedBody) === null || _b2 === void 0 ? void 0 : _b2.error) === null || _c2 === void 0 ? void 0 : _c2.code) && ((_e = (_d2 = parsedResponse.parsedBody) === null || _d2 === void 0 ? void 0 : _d2.error) === null || _e === void 0 ? void 0 : _e.message))) { - throw error3; - } - const defaultBodyMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.headersMapper; - try { - if (parsedResponse.parsedBody) { - const parsedBody = parsedResponse.parsedBody; - let deserializedError; - if (defaultBodyMapper) { - let valueToDeserialize = parsedBody; - if (operationSpec.isXML && defaultBodyMapper.type.name === MapperTypeNames.Sequence) { - valueToDeserialize = []; - const elementName = defaultBodyMapper.xmlElementName; - if (typeof parsedBody === "object" && elementName) { - valueToDeserialize = parsedBody[elementName]; - } + async function withSpan(name, operationOptions, callback, spanOptions) { + const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions); + try { + const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span))); + span.setStatus({ status: "success" }); + return result; + } catch (err) { + span.setStatus({ status: "error", error: err }); + throw err; + } finally { + span.end(); } - deserializedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, "error.response.parsedBody", options2); } - const internalError = parsedBody.error || deserializedError || parsedBody; - error3.code = internalError.code; - if (internalError.message) { - error3.message = internalError.message; + function withContext(context, callback, ...callbackArgs) { + return (0, instrumenter_js_1.getInstrumenter)().withContext(context, callback, ...callbackArgs); } - if (defaultBodyMapper) { - error3.response.parsedBody = deserializedError; + function parseTraceparentHeader(traceparentHeader) { + return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader); } - } - if (parsedResponse.headers && defaultHeadersMapper) { - error3.response.parsedHeaders = operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders"); - } - } catch (defaultError) { - error3.message = `Error "${defaultError.message}" occurred in deserializing the responseBody - "${parsedResponse.bodyAsText}" for the default response.`; - } - return { error: error3, shouldReturnResponse: false }; -} -async function parse3(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML2) { - var _a3; - if (!((_a3 = operationResponse.request.streamResponseStatusCodes) === null || _a3 === void 0 ? void 0 : _a3.has(operationResponse.status)) && operationResponse.bodyAsText) { - const text = operationResponse.bodyAsText; - const contentType2 = operationResponse.headers.get("Content-Type") || ""; - const contentComponents = !contentType2 ? [] : contentType2.split(";").map((component) => component.toLowerCase()); - try { - if (contentComponents.length === 0 || contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) { - operationResponse.parsedBody = JSON.parse(text); - return operationResponse; - } else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) { - if (!parseXML2) { - throw new Error("Parsing XML not supported."); - } - const body2 = await parseXML2(text, opts.xml); - operationResponse.parsedBody = body2; - return operationResponse; + function createRequestHeaders(tracingContext) { + return (0, instrumenter_js_1.getInstrumenter)().createRequestHeaders(tracingContext); } - } catch (err) { - const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; - const errCode = err.code || RestError.PARSE_ERROR; - const e = new RestError(msg, { - code: errCode, - statusCode: operationResponse.status, - request: operationResponse.request, - response: operationResponse - }); - throw e; + return { + startSpan, + withSpan, + withContext, + parseTraceparentHeader, + createRequestHeaders + }; } } - return operationResponse; -} -var defaultJsonContentTypes, defaultXmlContentTypes, deserializationPolicyName; -var init_deserializationPolicy = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/deserializationPolicy.js"() { +}); + +// node_modules/.pnpm/@azure+core-tracing@1.3.0/node_modules/@azure/core-tracing/dist/commonjs/index.js +var require_commonjs5 = __commonJS({ + "node_modules/.pnpm/@azure+core-tracing@1.3.0/node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; - init_interfaces(); - init_esm5(); - init_serializer(); - init_operationHelpers(); - defaultJsonContentTypes = ["application/json", "text/json"]; - defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; - deserializationPolicyName = "deserializationPolicy"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createTracingClient = exports2.useInstrumenter = void 0; + var instrumenter_js_1 = require_instrumenter(); + Object.defineProperty(exports2, "useInstrumenter", { enumerable: true, get: function() { + return instrumenter_js_1.useInstrumenter; + } }); + var tracingClient_js_1 = require_tracingClient(); + Object.defineProperty(exports2, "createTracingClient", { enumerable: true, get: function() { + return tracingClient_js_1.createTracingClient; + } }); } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/interfaceHelpers.js -function getStreamingResponseStatusCodes(operationSpec) { - const result = /* @__PURE__ */ new Set(); - for (const statusCode in operationSpec.responses) { - const operationResponse = operationSpec.responses[statusCode]; - if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === MapperTypeNames.Stream) { - result.add(Number(statusCode)); - } - } - return result; -} -function getPathStringFromParameter(parameter) { - const { parameterPath, mapper } = parameter; - let result; - if (typeof parameterPath === "string") { - result = parameterPath; - } else if (Array.isArray(parameterPath)) { - result = parameterPath.join("."); - } else { - result = mapper.serializedName; - } - return result; -} -var init_interfaceHelpers = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/interfaceHelpers.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js +var require_restError3 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; - init_serializer(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; + function isRestError(e) { + return (0, ts_http_runtime_1.isRestError)(e); + } } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/serializationPolicy.js -function serializationPolicy(options2 = {}) { - const stringifyXML2 = options2.stringifyXML; - return { - name: serializationPolicyName, - async sendRequest(request3, next) { - const operationInfo = getOperationRequestInfo(request3); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; - if (operationSpec && operationArguments) { - serializeHeaders(request3, operationArguments, operationSpec); - serializeRequestBody(request3, operationArguments, operationSpec, stringifyXML2); - } - return next(request3); - } - }; -} -function serializeHeaders(request3, operationArguments, operationSpec) { - var _a3, _b2; - if (operationSpec.headerParameters) { - for (const headerParameter of operationSpec.headerParameters) { - let headerValue = getOperationArgumentValueFromParameter(operationArguments, headerParameter); - if (headerValue !== null && headerValue !== void 0 || headerParameter.mapper.required) { - headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter)); - const headerCollectionPrefix = headerParameter.mapper.headerCollectionPrefix; - if (headerCollectionPrefix) { - for (const key of Object.keys(headerValue)) { - request3.headers.set(headerCollectionPrefix + key, headerValue[key]); +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tracingPolicy.js +var require_tracingPolicy = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tracingPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingPolicyName = void 0; + exports2.tracingPolicy = tracingPolicy; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants8(); + 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(options2 = {}) { + const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options2.userAgentPrefix); + const sanitizer = new util_1.Sanitizer({ + additionalAllowedQueryParameters: options2.additionalAllowedQueryParameters + }); + const tracingClient = tryCreateTracingClient(); + return { + name: exports2.tracingPolicyName, + async sendRequest(request, next) { + var _a; + if (!tracingClient) { + return next(request); + } + const userAgent = await userAgentPromise; + const spanAttributes = { + "http.url": sanitizer.sanitizeUrl(request.url), + "http.method": request.method, + "http.user_agent": userAgent, + requestId: request.requestId + }; + if (userAgent) { + spanAttributes["http.user_agent"] = userAgent; + } + const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + if (!span || !tracingContext) { + return next(request); + } + try { + const response = await tracingClient.withContext(tracingContext, next, request); + tryProcessResponse(span, response); + return response; + } catch (err) { + tryProcessError(span, err); + throw err; } - } else { - request3.headers.set(headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter), headerValue); } - } + }; } - } - const customHeaders = (_b2 = (_a3 = operationArguments.options) === null || _a3 === void 0 ? void 0 : _a3.requestOptions) === null || _b2 === void 0 ? void 0 : _b2.customHeaders; - if (customHeaders) { - for (const customHeaderName of Object.keys(customHeaders)) { - request3.headers.set(customHeaderName, customHeaders[customHeaderName]); + function tryCreateTracingClient() { + try { + return (0, core_tracing_1.createTracingClient)({ + namespace: "", + packageName: "@azure/core-rest-pipeline", + packageVersion: constants_js_1.SDK_VERSION + }); + } catch (e) { + log_js_1.logger.warning(`Error when creating the TracingClient: ${(0, core_util_1.getErrorMessage)(e)}`); + return void 0; + } } - } -} -function serializeRequestBody(request3, operationArguments, operationSpec, stringifyXML2 = function() { - throw new Error("XML serialization unsupported!"); -}) { - var _a3, _b2, _c2, _d2, _e; - const serializerOptions = (_a3 = operationArguments.options) === null || _a3 === void 0 ? void 0 : _a3.serializerOptions; - const updatedOptions = { - xml: { - rootName: (_b2 = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b2 !== void 0 ? _b2 : "", - includeRoot: (_c2 = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c2 !== void 0 ? _c2 : false, - xmlCharKey: (_d2 = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d2 !== void 0 ? _d2 : XML_CHARKEY + function tryCreateSpan(tracingClient, request, spanAttributes) { + try { + const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, { + spanKind: "client", + spanAttributes + }); + if (!span.isRecording()) { + span.end(); + return void 0; + } + const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); + for (const [key, value] of Object.entries(headers)) { + request.headers.set(key, value); + } + return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; + } catch (e) { + log_js_1.logger.warning(`Skipping creating a tracing span due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); + return void 0; + } } - }; - const xmlCharKey = updatedOptions.xml.xmlCharKey; - if (operationSpec.requestBody && operationSpec.requestBody.mapper) { - request3.body = getOperationArgumentValueFromParameter(operationArguments, operationSpec.requestBody); - const bodyMapper = operationSpec.requestBody.mapper; - const { required: required2, serializedName, xmlName, xmlElementName, xmlNamespace, xmlNamespacePrefix, nullable: nullable2 } = bodyMapper; - const typeName = bodyMapper.type.name; - try { - if (request3.body !== void 0 && request3.body !== null || nullable2 && request3.body === null || required2) { - const requestBodyParameterPathString = getPathStringFromParameter(operationSpec.requestBody); - request3.body = operationSpec.serializer.serialize(bodyMapper, request3.body, requestBodyParameterPathString, updatedOptions); - const isStream = typeName === MapperTypeNames.Stream; - if (operationSpec.isXML) { - const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : "xmlns"; - const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request3.body, updatedOptions); - if (typeName === MapperTypeNames.Sequence) { - request3.body = stringifyXML2(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { rootName: xmlName || serializedName, xmlCharKey }); - } else if (!isStream) { - request3.body = stringifyXML2(value, { - rootName: xmlName || serializedName, - xmlCharKey - }); - } - } else if (typeName === MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { - return; - } else if (!isStream) { - request3.body = JSON.stringify(request3.body); + function tryProcessError(span, error3) { + try { + span.setStatus({ + status: "error", + error: (0, core_util_1.isError)(error3) ? error3 : void 0 + }); + if ((0, restError_js_1.isRestError)(error3) && error3.statusCode) { + span.setAttribute("http.status_code", error3.statusCode); } + span.end(); + } catch (e) { + log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); } - } catch (error3) { - throw new Error(`Error "${error3.message}" occurred in serializing the payload - ${JSON.stringify(serializedName, void 0, " ")}.`); } - } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { - request3.formData = {}; - for (const formDataParameter of operationSpec.formDataParameters) { - const formDataParameterValue = getOperationArgumentValueFromParameter(operationArguments, formDataParameter); - if (formDataParameterValue !== void 0 && formDataParameterValue !== null) { - const formDataParameterPropertyName = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter); - request3.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter), updatedOptions); + function tryProcessResponse(span, response) { + try { + span.setAttribute("http.status_code", response.status); + const serviceRequestId = response.headers.get("x-ms-request-id"); + if (serviceRequestId) { + span.setAttribute("serviceRequestId", serviceRequestId); + } + 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)}`); } } } -} -function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options2) { - if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { - const result = {}; - result[options2.xml.xmlCharKey] = serializedValue; - result[XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace }; - return result; - } - return serializedValue; -} -function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { - if (!Array.isArray(obj)) { - obj = [obj]; - } - if (!xmlNamespaceKey || !xmlNamespace) { - return { [elementName]: obj }; - } - const result = { [elementName]: obj }; - result[XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace }; - return result; -} -var serializationPolicyName; -var init_serializationPolicy = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/serializationPolicy.js"() { - "use strict"; - init_interfaces(); - init_operationHelpers(); - init_serializer(); - init_interfaceHelpers(); - serializationPolicyName = "serializationPolicy"; - } -}); - -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/pipeline.js -function createClientPipeline(options2 = {}) { - const pipeline = createPipelineFromOptions(options2 !== null && options2 !== void 0 ? options2 : {}); - if (options2.credentialOptions) { - pipeline.addPolicy(bearerTokenAuthenticationPolicy({ - credential: options2.credentialOptions.credential, - scopes: options2.credentialOptions.credentialScopes - })); - } - pipeline.addPolicy(serializationPolicy(options2.serializationOptions), { phase: "Serialize" }); - pipeline.addPolicy(deserializationPolicy(options2.deserializationOptions), { - phase: "Deserialize" - }); - return pipeline; -} -var init_pipeline2 = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/pipeline.js"() { - "use strict"; - init_deserializationPolicy(); - init_esm5(); - init_serializationPolicy(); - } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/httpClientCache.js -function getCachedDefaultHttpClient() { - if (!cachedHttpClient) { - cachedHttpClient = createDefaultHttpClient(); - } - return cachedHttpClient; -} -var cachedHttpClient; -var init_httpClientCache = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/httpClientCache.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { "use strict"; - init_esm5(); + 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/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/urlHelpers.js -function getRequestUrl(baseUri, operationSpec, operationArguments, fallbackObject) { - const urlReplacements = calculateUrlReplacements(operationSpec, operationArguments, fallbackObject); - let isAbsolutePath = false; - let requestUrl = replaceAll(baseUri, urlReplacements); - if (operationSpec.path) { - let path4 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path4.startsWith("/")) { - path4 = path4.substring(1); - } - if (isAbsoluteUrl(path4)) { - requestUrl = path4; - isAbsolutePath = true; - } else { - requestUrl = appendPath(requestUrl, path4); +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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: abortSignal2, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal2; + try { + return await next(request); + } finally { + cleanup === null || cleanup === void 0 ? void 0 : cleanup(); + } + } + }; } } - const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); - requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); - return requestUrl; -} -function replaceAll(input, replacements) { - let result = input; - for (const [searchValue, replaceValue] of replacements) { - result = result.split(searchValue).join(replaceValue); - } - return result; -} -function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a3; - const result = /* @__PURE__ */ new Map(); - if ((_a3 = operationSpec.urlParameters) === null || _a3 === void 0 ? void 0 : _a3.length) { - for (const urlParameter of operationSpec.urlParameters) { - let urlParameterValue = getOperationArgumentValueFromParameter(operationArguments, urlParameter, fallbackObject); - const parameterPathString = getPathStringFromParameter(urlParameter); - urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, parameterPathString); - if (!urlParameter.skipEncoding) { - urlParameterValue = encodeURIComponent(urlParameterValue); +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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_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 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(options2) { + var _a; + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (core_util_1.isNodeLike) { + if (options2.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options2.agent)); + } + if (options2.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options2.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options2.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)(options2.userAgentOptions)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options2.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options2.retryOptions), { phase: "Retry" }); + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options2.userAgentOptions), options2.loggingOptions)), { + afterPhase: "Retry" + }); + if (core_util_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options2.redirectOptions), { afterPhase: "Retry" }); } - result.set(`{${urlParameter.mapper.serializedName || parameterPathString}}`, urlParameterValue); - } - } - return result; -} -function isAbsoluteUrl(url2) { - return url2.includes("://"); -} -function appendPath(url2, pathToAppend) { - if (!pathToAppend) { - return url2; - } - const parsedUrl = new URL(url2); - let newPath = parsedUrl.pathname; - if (!newPath.endsWith("/")) { - newPath = `${newPath}/`; - } - if (pathToAppend.startsWith("/")) { - pathToAppend = pathToAppend.substring(1); - } - const searchStart = pathToAppend.indexOf("?"); - if (searchStart !== -1) { - const path4 = pathToAppend.substring(0, searchStart); - const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path4; - if (search) { - parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options2.loggingOptions), { afterPhase: "Sign" }); + return pipeline; } - } else { - newPath = newPath + pathToAppend; } - parsedUrl.pathname = newPath; - return parsedUrl.toString(); -} -function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a3; - const result = /* @__PURE__ */ new Map(); - const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a3 = operationSpec.queryParameters) === null || _a3 === void 0 ? void 0 : _a3.length) { - for (const queryParameter of operationSpec.queryParameters) { - if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { - sequenceParams.add(queryParameter.mapper.serializedName); - } - let queryParameterValue = getOperationArgumentValueFromParameter(operationArguments, queryParameter, fallbackObject); - if (queryParameterValue !== void 0 && queryParameterValue !== null || queryParameter.mapper.required) { - queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter)); - const delimiter3 = queryParameter.collectionFormat ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat] : ""; - if (Array.isArray(queryParameterValue)) { - queryParameterValue = queryParameterValue.map((item) => { - if (item === null || item === void 0) { - return ""; - } - return item; - }); - } - if (queryParameter.collectionFormat === "Multi" && queryParameterValue.length === 0) { - continue; - } else if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "SSV" || queryParameter.collectionFormat === "TSV")) { - queryParameterValue = queryParameterValue.join(delimiter3); - } - if (!queryParameter.skipEncoding) { - if (Array.isArray(queryParameterValue)) { - queryParameterValue = queryParameterValue.map((item) => { - return encodeURIComponent(item); - }); - } else { - queryParameterValue = encodeURIComponent(queryParameterValue); +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + function createDefaultHttpClient() { + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal: abortSignal2, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal2; + return await client.sendRequest(request); + } finally { + cleanup === null || cleanup === void 0 ? void 0 : cleanup(); } } - if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "CSV" || queryParameter.collectionFormat === "Pipes")) { - queryParameterValue = queryParameterValue.join(delimiter3); - } - result.set(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue); - } - } - } - return { - queryParams: result, - sequenceParams - }; -} -function simpleParseQueryParams(queryString) { - const result = /* @__PURE__ */ new Map(); - if (!queryString || queryString[0] !== "?") { - return result; - } - queryString = queryString.slice(1); - const pairs = queryString.split("&"); - for (const pair of pairs) { - const [name, value] = pair.split("=", 2); - const existingValue = result.get(name); - if (existingValue) { - if (Array.isArray(existingValue)) { - existingValue.push(value); - } else { - result.set(name, [existingValue, value]); - } - } else { - result.set(name, value); + }; } } - return result; -} -function appendQueryParams(url2, queryParams, sequenceParams, noOverwrite = false) { - if (queryParams.size === 0) { - return url2; - } - const parsedUrl = new URL(url2); - const combinedParams = simpleParseQueryParams(parsedUrl.search); - for (const [name, value] of queryParams) { - const existingValue = combinedParams.get(name); - if (Array.isArray(existingValue)) { - if (Array.isArray(value)) { - existingValue.push(...value); - const valueSet = new Set(existingValue); - combinedParams.set(name, Array.from(valueSet)); - } else { - existingValue.push(value); - } - } else if (existingValue) { - if (Array.isArray(value)) { - value.unshift(existingValue); - } else if (sequenceParams.has(name)) { - combinedParams.set(name, [existingValue, value]); - } - if (!noOverwrite) { - combinedParams.set(name, value); - } - } else { - combinedParams.set(name, value); +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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); } } - const searchPieces = []; - for (const [name, value] of combinedParams) { - if (typeof value === "string") { - searchPieces.push(`${name}=${value}`); - } else if (Array.isArray(value)) { - for (const subValue of value) { - searchPieces.push(`${name}=${subValue}`); - } - } else { - searchPieces.push(`${name}=${value}`); +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js +var require_pipelineRequest2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var ts_http_runtime_1 = require_commonjs(); + function createPipelineRequest(options2) { + return (0, ts_http_runtime_1.createPipelineRequest)(options2); } } - parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; - return parsedUrl.toString(); -} -var CollectionFormatToDelimiterMap; -var init_urlHelpers = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/urlHelpers.js"() { +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; - init_operationHelpers(); - init_interfaceHelpers(); - CollectionFormatToDelimiterMap = { - CSV: ",", - SSV: " ", - Multi: "Multi", - TSV: " ", - Pipes: "|" - }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; + function exponentialRetryPolicy(options2 = {}) { + return (0, policies_1.exponentialRetryPolicy)(options2); + } } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/log.js -var logger2; -var init_log3 = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/log.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; - init_esm(); - logger2 = createClientLogger("core-client"); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; + function systemErrorRetryPolicy(options2 = {}) { + return (0, policies_1.systemErrorRetryPolicy)(options2); + } } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/serviceClient.js -function createDefaultPipeline(options2) { - const credentialScopes = getCredentialScopes(options2); - const credentialOptions = options2.credential && credentialScopes ? { credentialScopes, credential: options2.credential } : void 0; - return createClientPipeline(Object.assign(Object.assign({}, options2), { credentialOptions })); -} -function getCredentialScopes(options2) { - if (options2.credentialScopes) { - return options2.credentialScopes; - } - if (options2.endpoint) { - return `${options2.endpoint}/.default`; - } - if (options2.baseUri) { - return `${options2.baseUri}/.default`; +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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 policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; + function throttlingRetryPolicy(options2 = {}) { + return (0, policies_1.throttlingRetryPolicy)(options2); + } } - if (options2.credential && !options2.credentialScopes) { - throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`); +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/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_constants8(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options2 = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, Object.assign({ logger: retryPolicyLogger }, options2)); + } } - return void 0; -} -var ServiceClient; -var init_serviceClient = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/serviceClient.js"() { - "use strict"; - init_esm5(); - init_pipeline2(); - init_utils(); - init_httpClientCache(); - init_operationHelpers(); - init_urlHelpers(); - init_interfaceHelpers(); - init_log3(); - ServiceClient = class { - /** - * The ServiceClient constructor - * @param options - The service client options that govern the behavior of the client. - */ - constructor(options2 = {}) { - var _a3, _b2; - this._requestContentType = options2.requestContentType; - this._endpoint = (_a3 = options2.endpoint) !== null && _a3 !== void 0 ? _a3 : options2.baseUri; - if (options2.baseUri) { - logger2.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); - } - this._allowInsecureConnection = options2.allowInsecureConnection; - this._httpClient = options2.httpClient || getCachedDefaultHttpClient(); - this.pipeline = options2.pipeline || createDefaultPipeline(options2); - if ((_b2 = options2.additionalPolicies) === null || _b2 === void 0 ? void 0 : _b2.length) { - for (const { policy, position } of options2.additionalPolicies) { - const afterPhase = position === "perRetry" ? "Sign" : void 0; - this.pipeline.addPolicy(policy, { - afterPhase - }); +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/tokenCycler.js +var require_tokenCycler = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/tokenCycler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_CYCLER_OPTIONS = void 0; + exports2.createTokenCycler = createTokenCycler; + var core_util_1 = require_commonjs4(); + exports2.DEFAULT_CYCLER_OPTIONS = { + forcedRefreshWindowInMs: 1e3, + // Force waiting for a refresh 1s before the token expires + retryIntervalInMs: 3e3, + // Allow refresh attempts every 3s + refreshWindowInMs: 1e3 * 60 * 2 + // Start refreshing 2m before expiry + }; + async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { + async function tryGetAccessToken() { + if (Date.now() < refreshTimeout) { + try { + return await getAccessToken(); + } catch (_a) { + return null; + } + } else { + const finalToken = await getAccessToken(); + if (finalToken === null) { + throw new Error("Failed to refresh access token."); } + return finalToken; } } - /** - * Send the provided httpRequest. - */ - async sendRequest(request3) { - return this.pipeline.sendRequest(this._httpClient, request3); + let token = await tryGetAccessToken(); + while (token === null) { + await (0, core_util_1.delay)(retryIntervalInMs); + token = await tryGetAccessToken(); } - /** - * Send an HTTP request that is populated using the provided OperationSpec. - * @typeParam T - The typed result of the request, based on the OperationSpec. - * @param operationArguments - The arguments that the HTTP request's templated values will be populated from. - * @param operationSpec - The OperationSpec to use to populate the httpRequest. - */ - async sendOperationRequest(operationArguments, operationSpec) { - const endpoint = operationSpec.baseUrl || this._endpoint; - if (!endpoint) { - throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); - } - const url2 = getRequestUrl(endpoint, operationSpec, operationArguments, this); - const request3 = createPipelineRequest({ - url: url2 - }); - request3.method = operationSpec.httpMethod; - const operationInfo = getOperationRequestInfo(request3); - operationInfo.operationSpec = operationSpec; - operationInfo.operationArguments = operationArguments; - const contentType2 = operationSpec.contentType || this._requestContentType; - if (contentType2 && operationSpec.requestBody) { - request3.headers.set("Content-Type", contentType2); - } - const options2 = operationArguments.options; - if (options2) { - const requestOptions = options2.requestOptions; - if (requestOptions) { - if (requestOptions.timeout) { - request3.timeout = requestOptions.timeout; - } - if (requestOptions.onUploadProgress) { - request3.onUploadProgress = requestOptions.onUploadProgress; - } - if (requestOptions.onDownloadProgress) { - request3.onDownloadProgress = requestOptions.onDownloadProgress; - } - if (requestOptions.shouldDeserialize !== void 0) { - operationInfo.shouldDeserialize = requestOptions.shouldDeserialize; - } - if (requestOptions.allowInsecureConnection) { - request3.allowInsecureConnection = true; - } - } - if (options2.abortSignal) { - request3.abortSignal = options2.abortSignal; + return token; + } + function createTokenCycler(credential, tokenCyclerOptions) { + let refreshWorker = null; + let token = null; + let tenantId; + const options2 = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const cycler = { + /** + * Produces true if a refresh job is currently in progress. + */ + get isRefreshing() { + return refreshWorker !== null; + }, + /** + * Produces true if the cycler SHOULD refresh (we are within the refresh + * window and not already refreshing) + */ + get shouldRefresh() { + var _a; + if (cycler.isRefreshing) { + return false; } - if (options2.tracingOptions) { - request3.tracingOptions = options2.tracingOptions; + if ((token === null || token === void 0 ? void 0 : 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) - options2.refreshWindowInMs < Date.now(); + }, + /** + * Produces true if the cycler MUST refresh (null or nearly-expired + * token). + */ + get mustRefresh() { + return token === null || token.expiresOnTimestamp - options2.forcedRefreshWindowInMs < Date.now(); } - if (this._allowInsecureConnection) { - request3.allowInsecureConnection = true; + }; + function refresh(scopes, getTokenOptions) { + var _a; + if (!cycler.isRefreshing) { + const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); + refreshWorker = beginRefresh( + tryGetAccessToken, + options2.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() + ).then((_token) => { + refreshWorker = null; + token = _token; + tenantId = getTokenOptions.tenantId; + return token; + }).catch((reason) => { + refreshWorker = null; + token = null; + tenantId = void 0; + throw reason; + }); + } + return refreshWorker; + } + return async (scopes, tokenOptions) => { + const hasClaimChallenge = Boolean(tokenOptions.claims); + const tenantIdChanged = tenantId !== tokenOptions.tenantId; + if (hasClaimChallenge) { + token = null; } - if (request3.streamResponseStatusCodes === void 0) { - request3.streamResponseStatusCodes = getStreamingResponseStatusCodes(operationSpec); + const mustRefresh = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh; + if (mustRefresh) { + return refresh(scopes, tokenOptions); } - try { - const rawResponse = await this.sendRequest(request3); - const flatResponse = flattenResponse(rawResponse, operationSpec.responses[rawResponse.status]); - if (options2 === null || options2 === void 0 ? void 0 : options2.onResponse) { - options2.onResponse(rawResponse, flatResponse); + if (cycler.shouldRefresh) { + refresh(scopes, tokenOptions); + } + return token; + }; + } + } +}); + +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js +var require_bearerTokenAuthenticationPolicy = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js"(exports2) { + "use strict"; + 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_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(options2) { + const { scopes, getAccessToken, request } = options2; + const getTokenOptions = { + abortSignal: request.abortSignal, + tracingOptions: request.tracingOptions, + enableCae: true + }; + const accessToken = await getAccessToken(scopes, getTokenOptions); + if (accessToken) { + options2.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + } + } + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + var _a; + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; + } + onChallengeOptions.request.headers.set("Authorization", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); + return true; + } + function bearerTokenAuthenticationPolicy(options2) { + var _a, _b, _c; + const { credential, scopes, challengeCallbacks } = options2; + const logger = options2.logger || log_js_1.logger; + const callbacks = { + authorizeRequest: (_b = (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) === null || _a === void 0 ? void 0 : _a.bind(challengeCallbacks)) !== null && _b !== void 0 ? _b : defaultAuthorizeRequest, + authorizeRequestOnChallenge: (_c = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge) === null || _c === void 0 ? void 0 : _c.bind(challengeCallbacks) + }; + const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( + credential + /* , options */ + ) : () => Promise.resolve(null); + return { + name: exports2.bearerTokenAuthenticationPolicyName, + /** + * If there's no challenge parameter: + * - It will try to retrieve the token using the cache, or the credential's getToken. + * - Then it will try the next policy with or without the retrieved token. + * + * It uses the challenge parameters to: + * - Skip a first attempt to get the token from the credential if there's no cached token, + * since it expects the token to be retrievable only after the challenge. + * - Prepare the outgoing request if the `prepareRequest` method has been provided. + * - Send an initial request to receive the challenge if it fails. + * - Process a challenge if the response contains it. + * - Retrieve a token with the challenge information, then re-send the request. + */ + async sendRequest(request, next) { + if (!request.url.toLowerCase().startsWith("https://")) { + throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs."); } - return flatResponse; - } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { - const rawResponse = error3.response; - const flatResponse = flattenResponse(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); - error3.details = flatResponse; - if (options2 === null || options2 === void 0 ? void 0 : options2.onResponse) { - options2.onResponse(rawResponse, flatResponse, error3); + await callbacks.authorizeRequest({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + getAccessToken, + logger + }); + let response; + let error3; + 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); + } + } + } } } - throw error3; + if (error3) { + throw error3; + } else { + return response; + } } + }; + } + 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) { + var _a; + if (!challenges) { + return; } - }; + const parsedChallenges = parseChallenges(challenges); + return (_a = parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")) === null || _a === void 0 ? void 0 : _a.params.claims; + } } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/authorizeRequestOnClaimChallenge.js -var init_authorizeRequestOnClaimChallenge = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/authorizeRequestOnClaimChallenge.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/ndJsonPolicy.js +var require_ndJsonPolicy = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/ndJsonPolicy.js"(exports2) { "use strict"; - init_log3(); - init_base64(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ndJsonPolicyName = void 0; + exports2.ndJsonPolicy = ndJsonPolicy; + exports2.ndJsonPolicyName = "ndJsonPolicy"; + function ndJsonPolicy() { + return { + name: exports2.ndJsonPolicyName, + async sendRequest(request, next) { + if (typeof request.body === "string" && request.body.startsWith("[")) { + const body = JSON.parse(request.body); + if (Array.isArray(body)) { + request.body = body.map((item) => JSON.stringify(item) + "\n").join(""); + } + } + return next(request); + } + }; + } } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/authorizeRequestOnTenantChallenge.js -function isUuid(text) { - return /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(text); -} -function extractTenantId(challengeInfo) { - const parsedAuthUri = new URL(challengeInfo.authorization_uri); - const pathSegments = parsedAuthUri.pathname.split("/"); - const tenantId = pathSegments[1]; - if (tenantId && isUuid(tenantId)) { - return tenantId; - } - return void 0; -} -function buildScopes(challengeOptions, challengeInfo) { - if (!challengeInfo.resource_id) { - return challengeOptions.scopes; - } - const challengeScopes = new URL(challengeInfo.resource_id); - challengeScopes.pathname = Constants.DefaultScope; - let scope = challengeScopes.toString(); - if (scope === "https://disk.azure.com/.default") { - scope = "https://disk.azure.com//.default"; - } - return [scope]; -} -function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; - } - return; -} -function parseChallenge(challenge) { - 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), {}); -} -function requestToOptions(request3) { - return { - abortSignal: request3.abortSignal, - requestOptions: { - timeout: request3.timeout - }, - tracingOptions: request3.tracingOptions - }; -} -var Constants, authorizeRequestOnTenantChallenge; -var init_authorizeRequestOnTenantChallenge = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/authorizeRequestOnTenantChallenge.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/auxiliaryAuthenticationHeaderPolicy.js +var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/auxiliaryAuthenticationHeaderPolicy.js"(exports2) { "use strict"; - Constants = { - DefaultScope: "/.default", - /** - * Defines constants for use with HTTP headers. - */ - HeaderConstants: { - /** - * The Authorization header. - */ - AUTHORIZATION: "authorization" - } - }; - authorizeRequestOnTenantChallenge = async (challengeOptions) => { - var _a3; - const requestOptions = requestToOptions(challengeOptions.request); - const challenge = getChallenge(challengeOptions.response); - if (challenge) { - const challengeInfo = parseChallenge(challenge); - const challengeScopes = buildScopes(challengeOptions, challengeInfo); - const tenantId = extractTenantId(challengeInfo); - if (!tenantId) { - return false; - } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); - if (!accessToken) { - return false; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; + exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; + var tokenCycler_js_1 = require_tokenCycler(); + var log_js_1 = require_log4(); + exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; + var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; + async function sendAuthorizeRequest(options2) { + var _a, _b; + const { scopes, getAccessToken, request } = options2; + 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 : ""; + } + function auxiliaryAuthenticationHeaderPolicy(options2) { + const { credentials, scopes } = options2; + const logger = options2.logger || log_js_1.logger; + const tokenCyclerMap = /* @__PURE__ */ new WeakMap(); + return { + name: exports2.auxiliaryAuthenticationHeaderPolicyName, + async sendRequest(request, next) { + if (!request.url.toLowerCase().startsWith("https://")) { + throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs."); + } + if (!credentials || credentials.length === 0) { + logger.info(`${exports2.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`); + return next(request); + } + const tokenPromises = []; + for (const credential of credentials) { + let getAccessToken = tokenCyclerMap.get(credential); + if (!getAccessToken) { + getAccessToken = (0, tokenCycler_js_1.createTokenCycler)(credential); + tokenCyclerMap.set(credential, getAccessToken); + } + tokenPromises.push(sendAuthorizeRequest({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + getAccessToken, + logger + })); + } + const auxiliaryTokens = (await Promise.all(tokenPromises)).filter((token) => Boolean(token)); + if (auxiliaryTokens.length === 0) { + logger.warning(`None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`); + return next(request); + } + request.headers.set(AUTHORIZATION_AUXILIARY_HEADER, auxiliaryTokens.map((token) => `Bearer ${token}`).join(", ")); + return next(request); } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${(_a3 = accessToken.tokenType) !== null && _a3 !== void 0 ? _a3 : "Bearer"} ${accessToken.token}`); - return true; - } - return false; - }; + }; + } } }); -// node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/index.js -var init_esm7 = __esm({ - "node_modules/.pnpm/@azure+core-client@1.9.3/node_modules/@azure/core-client/dist/esm/index.js"() { +// node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js +var require_commonjs6 = __commonJS({ + "node_modules/.pnpm/@azure+core-rest-pipeline@1.22.0/node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; - init_serializer(); - init_serviceClient(); - init_pipeline2(); - init_interfaces(); - init_deserializationPolicy(); - init_serializationPolicy(); - init_authorizeRequestOnClaimChallenge(); - init_authorizeRequestOnTenantChallenge(); + Object.defineProperty(exports2, "__esModule", { value: true }); + 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_createPipelineFromOptions2(); + Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { + return createPipelineFromOptions_js_1.createPipelineFromOptions; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var httpHeaders_js_1 = require_httpHeaders2(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + var pipelineRequest_js_1 = require_pipelineRequest2(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + 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_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_exponentialRetryPolicy2(); + 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 setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); + Object.defineProperty(exports2, "setClientRequestIdPolicy", { enumerable: true, get: function() { + return setClientRequestIdPolicy_js_1.setClientRequestIdPolicy; + } }); + Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { + return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; + } }); + 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_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_proxyPolicy2(); + 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_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_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_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_retryPolicy2(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var tracingPolicy_js_1 = require_tracingPolicy(); + Object.defineProperty(exports2, "tracingPolicy", { enumerable: true, get: function() { + return tracingPolicy_js_1.tracingPolicy; + } }); + Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { + return tracingPolicy_js_1.tracingPolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + 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_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_formDataPolicy2(); + 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 bearerTokenAuthenticationPolicy_js_1 = require_bearerTokenAuthenticationPolicy(); + Object.defineProperty(exports2, "bearerTokenAuthenticationPolicy", { enumerable: true, get: function() { + return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicy; + } }); + Object.defineProperty(exports2, "bearerTokenAuthenticationPolicyName", { enumerable: true, get: function() { + return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicyName; + } }); + var ndJsonPolicy_js_1 = require_ndJsonPolicy(); + Object.defineProperty(exports2, "ndJsonPolicy", { enumerable: true, get: function() { + return ndJsonPolicy_js_1.ndJsonPolicy; + } }); + Object.defineProperty(exports2, "ndJsonPolicyName", { enumerable: true, get: function() { + return ndJsonPolicy_js_1.ndJsonPolicyName; + } }); + var auxiliaryAuthenticationHeaderPolicy_js_1 = require_auxiliaryAuthenticationHeaderPolicy(); + Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicy", { enumerable: true, get: function() { + return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicy; + } }); + 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; + } }); + Object.defineProperty(exports2, "createFileFromStream", { enumerable: true, get: function() { + return file_js_1.createFileFromStream; + } }); } }); -// node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/util.js -function toPipelineRequest(webResource, options2 = {}) { - const compatWebResource = webResource; - const request3 = compatWebResource[originalRequestSymbol2]; - const headers = createHttpHeaders(webResource.headers.toJson({ preserveCase: true })); - if (request3) { - request3.headers = headers; - return request3; - } else { - const newRequest = createPipelineRequest({ - url: webResource.url, - method: webResource.method, - headers, - withCredentials: webResource.withCredentials, - timeout: webResource.timeout, - requestId: webResource.requestId, - abortSignal: webResource.abortSignal, - body: webResource.body, - formData: webResource.formData, - disableKeepAlive: !!webResource.keepAlive, - onDownloadProgress: webResource.onDownloadProgress, - onUploadProgress: webResource.onUploadProgress, - proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes, - agent: webResource.agent - }); - if (options2.originalRequest) { - newRequest[originalClientRequestSymbol] = options2.originalRequest; - } - return newRequest; - } -} -function toWebResourceLike(request3, options2) { - var _a3; - const originalRequest = (_a3 = options2 === null || options2 === void 0 ? void 0 : options2.originalRequest) !== null && _a3 !== void 0 ? _a3 : request3; - const webResource = { - url: request3.url, - method: request3.method, - headers: toHttpHeadersLike(request3.headers), - withCredentials: request3.withCredentials, - timeout: request3.timeout, - requestId: request3.headers.get("x-ms-client-request-id") || request3.requestId, - abortSignal: request3.abortSignal, - body: request3.body, - formData: request3.formData, - keepAlive: !!request3.disableKeepAlive, - onDownloadProgress: request3.onDownloadProgress, - onUploadProgress: request3.onUploadProgress, - proxySettings: request3.proxySettings, - streamResponseStatusCodes: request3.streamResponseStatusCodes, - agent: request3.agent, - clone() { - throw new Error("Cannot clone a non-proxied WebResourceLike"); - }, - prepare() { - throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat"); - }, - validateRequestProperties() { - } - }; - if (options2 === null || options2 === void 0 ? void 0 : options2.createProxy) { - return new Proxy(webResource, { - get(target, prop, receiver) { - if (prop === originalRequestSymbol2) { - return request3; - } else if (prop === "clone") { - return () => { - return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), { - createProxy: true, - originalRequest - }); - }; - } - return Reflect.get(target, prop, receiver); - }, - set(target, prop, value, receiver) { - if (prop === "keepAlive") { - request3.disableKeepAlive = !value; - } - const passThroughProps = [ - "url", - "method", - "withCredentials", - "timeout", - "requestId", - "abortSignal", - "body", - "formData", - "onDownloadProgress", - "onUploadProgress", - "proxySettings", - "streamResponseStatusCodes", - "agent" - ]; - if (typeof prop === "string" && passThroughProps.includes(prop)) { - request3[prop] = value; - } - return Reflect.set(target, prop, value, receiver); - } - }); - } else { - return webResource; - } -} -function toHttpHeadersLike(headers) { - return new HttpHeaders(headers.toJSON({ preserveCase: true })); -} -function getHeaderKey(headerName) { - return headerName.toLowerCase(); -} -var originalRequestSymbol2, originalClientRequestSymbol, HttpHeaders; -var init_util = __esm({ - "node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/util.js"() { - "use strict"; - init_esm5(); - originalRequestSymbol2 = Symbol("Original PipelineRequest"); - originalClientRequestSymbol = Symbol.for("@azure/core-client original request"); - HttpHeaders = class _HttpHeaders { - constructor(rawHeaders) { - this._headersMap = {}; - if (rawHeaders) { - for (const headerName in rawHeaders) { - this.set(headerName, rawHeaders[headerName]); - } - } - } +// node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js +var require_azureKeyCredential = __commonJS({ + "node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureKeyCredential = void 0; + var AzureKeyCredential = class { /** - * Set a header in this collection with the provided name and value. The name is - * case-insensitive. - * @param headerName - The name of the header to set. This value is case-insensitive. - * @param headerValue - The value of the header to set. + * The value of the key to be used in authentication */ - set(headerName, headerValue) { - this._headersMap[getHeaderKey(headerName)] = { - name: headerName, - value: headerValue.toString() - }; + get key() { + return this._key; } /** - * Get the header value for the provided header name, or undefined if no header exists in this - * collection with the provided name. - * @param headerName - The name of the header. + * Create an instance of an AzureKeyCredential for use + * with a service client. + * + * @param key - The initial value of the key to use in authentication */ - get(headerName) { - const header = this._headersMap[getHeaderKey(headerName)]; - return !header ? void 0 : header.value; + constructor(key) { + if (!key) { + throw new Error("key must be a non-empty string"); + } + this._key = key; } /** - * Get whether or not this header collection contains a header entry for the provided header name. + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newKey - The new key value to be used */ - contains(headerName) { - return !!this._headersMap[getHeaderKey(headerName)]; + update(newKey) { + this._key = newKey; } + }; + exports2.AzureKeyCredential = AzureKeyCredential; + } +}); + +// node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/keyCredential.js +var require_keyCredential = __commonJS({ + "node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/keyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isKeyCredential = isKeyCredential; + var core_util_1 = require_commonjs4(); + function isKeyCredential(credential) { + return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; + } + } +}); + +// node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/azureNamedKeyCredential.js +var require_azureNamedKeyCredential = __commonJS({ + "node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/azureNamedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureNamedKeyCredential = void 0; + exports2.isNamedKeyCredential = isNamedKeyCredential; + var core_util_1 = require_commonjs4(); + var AzureNamedKeyCredential = class { /** - * Remove the header with the provided headerName. Return whether or not the header existed and - * was removed. - * @param headerName - The name of the header to remove. + * The value of the key to be used in authentication. */ - remove(headerName) { - const result = this.contains(headerName); - delete this._headersMap[getHeaderKey(headerName)]; - return result; + get key() { + return this._key; } /** - * Get the headers that are contained this collection as an object. + * The value of the name to be used in authentication. */ - rawHeaders() { - return this.toJson({ preserveCase: true }); + get name() { + return this._name; } /** - * Get the headers that are contained in this collection as an array. + * Create an instance of an AzureNamedKeyCredential for use + * with a service client. + * + * @param name - The initial value of the name to use in authentication. + * @param key - The initial value of the key to use in authentication. */ - headersArray() { - const headers = []; - for (const headerKey in this._headersMap) { - headers.push(this._headersMap[headerKey]); + constructor(name, key) { + if (!name || !key) { + throw new TypeError("name and key must be non-empty strings"); } - return headers; + this._name = name; + this._key = key; } /** - * Get the header names that are contained in this collection. + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newName - The new name value to be used. + * @param newKey - The new key value to be used. */ - headerNames() { - const headerNames = []; - const headers = this.headersArray(); - for (let i = 0; i < headers.length; ++i) { - headerNames.push(headers[i].name); + update(newName, newKey) { + if (!newName || !newKey) { + throw new TypeError("newName and newKey must be non-empty strings"); } - return headerNames; + this._name = newName; + this._key = newKey; } + }; + exports2.AzureNamedKeyCredential = AzureNamedKeyCredential; + function isNamedKeyCredential(credential) { + return (0, core_util_1.isObjectWithProperties)(credential, ["name", "key"]) && typeof credential.key === "string" && typeof credential.name === "string"; + } + } +}); + +// node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/azureSASCredential.js +var require_azureSASCredential = __commonJS({ + "node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/azureSASCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureSASCredential = void 0; + exports2.isSASCredential = isSASCredential; + var core_util_1 = require_commonjs4(); + var AzureSASCredential = class { /** - * Get the header values that are contained in this collection. + * The value of the shared access signature to be used in authentication */ - headerValues() { - const headerValues = []; - const headers = this.headersArray(); - for (let i = 0; i < headers.length; ++i) { - headerValues.push(headers[i].value); - } - return headerValues; + get signature() { + return this._signature; } /** - * Get the JSON object representation of this HTTP header collection. + * Create an instance of an AzureSASCredential for use + * with a service client. + * + * @param signature - The initial value of the shared access signature to use in authentication */ - toJson(options2 = {}) { - const result = {}; - if (options2.preserveCase) { - for (const headerKey in this._headersMap) { - const header = this._headersMap[headerKey]; - result[header.name] = header.value; - } - } else { - for (const headerKey in this._headersMap) { - const header = this._headersMap[headerKey]; - result[getHeaderKey(header.name)] = header.value; - } + constructor(signature) { + if (!signature) { + throw new Error("shared access signature must be a non-empty string"); } - return result; - } - /** - * Get the string representation of this HTTP header collection. - */ - toString() { - return JSON.stringify(this.toJson({ preserveCase: true })); + this._signature = signature; } /** - * Create a deep clone/copy of this HttpHeaders collection. + * Change the value of the signature. + * + * Updates will take effect upon the next request after + * updating the signature value. + * + * @param newSignature - The new shared access signature value to be used */ - clone() { - const resultPreservingCasing = {}; - for (const headerKey in this._headersMap) { - const header = this._headersMap[headerKey]; - resultPreservingCasing[header.name] = header.value; + update(newSignature) { + if (!newSignature) { + throw new Error("shared access signature must be a non-empty string"); } - return new _HttpHeaders(resultPreservingCasing); + this._signature = newSignature; } }; + exports2.AzureSASCredential = AzureSASCredential; + function isSASCredential(credential) { + return (0, core_util_1.isObjectWithProperties)(credential, ["signature"]) && typeof credential.signature === "string"; + } } }); -// node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/response.js -function toCompatResponse(response, options2) { - let request3 = toWebResourceLike(response.request); - let headers = toHttpHeadersLike(response.headers); - if (options2 === null || options2 === void 0 ? void 0 : options2.createProxy) { - return new Proxy(response, { - get(target, prop, receiver) { - if (prop === "headers") { - return headers; - } else if (prop === "request") { - return request3; - } else if (prop === originalResponse) { - return response; - } - return Reflect.get(target, prop, receiver); - }, - set(target, prop, value, receiver) { - if (prop === "headers") { - headers = value; - } else if (prop === "request") { - request3 = value; - } - return Reflect.set(target, prop, value, receiver); - } - }); - } else { - return Object.assign(Object.assign({}, response), { - request: request3, - headers - }); - } -} -function toPipelineResponse(compatResponse) { - const extendedCompatResponse = compatResponse; - const response = extendedCompatResponse[originalResponse]; - const headers = createHttpHeaders(compatResponse.headers.toJson({ preserveCase: true })); - if (response) { - response.headers = headers; - return response; - } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: toPipelineRequest(compatResponse.request) }); - } -} -var originalResponse; -var init_response = __esm({ - "node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/response.js"() { +// node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js +var require_tokenCredential = __commonJS({ + "node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; - init_esm5(); - init_util(); - originalResponse = Symbol("Original FullOperationResponse"); + 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); + } } }); -// node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/extendedClient.js -var ExtendedServiceClient; -var init_extendedClient = __esm({ - "node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/extendedClient.js"() { +// node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/index.js +var require_commonjs7 = __commonJS({ + "node_modules/.pnpm/@azure+core-auth@1.10.0/node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; - init_disableKeepAlivePolicy(); - init_esm5(); - init_esm7(); - init_response(); - ExtendedServiceClient = class extends ServiceClient { - constructor(options2) { - var _a3, _b2; - super(options2); - if (((_a3 = options2.keepAliveOptions) === null || _a3 === void 0 ? void 0 : _a3.enable) === false && !pipelineContainsDisableKeepAlivePolicy(this.pipeline)) { - this.pipeline.addPolicy(createDisableKeepAlivePolicy()); - } - if (((_b2 = options2.redirectOptions) === null || _b2 === void 0 ? void 0 : _b2.handleRedirects) === false) { - this.pipeline.removePolicy({ - name: redirectPolicyName - }); - } - } - /** - * Compatible send operation request function. - * - * @param operationArguments - Operation arguments - * @param operationSpec - Operation Spec - * @returns - */ - async sendOperationRequest(operationArguments, operationSpec) { - var _a3; - const userProvidedCallBack = (_a3 = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a3 === void 0 ? void 0 : _a3.onResponse; - let lastResponse; - function onResponse(rawResponse, flatResponse, error3) { - lastResponse = rawResponse; - if (userProvidedCallBack) { - userProvidedCallBack(rawResponse, flatResponse, error3); - } - } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); - const result = await super.sendOperationRequest(operationArguments, operationSpec); - if (lastResponse) { - Object.defineProperty(result, "_response", { - value: toCompatResponse(lastResponse) - }); - } - return result; - } - }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isTokenCredential = exports2.isSASCredential = exports2.AzureSASCredential = exports2.isNamedKeyCredential = exports2.AzureNamedKeyCredential = exports2.isKeyCredential = exports2.AzureKeyCredential = void 0; + var azureKeyCredential_js_1 = require_azureKeyCredential(); + Object.defineProperty(exports2, "AzureKeyCredential", { enumerable: true, get: function() { + return azureKeyCredential_js_1.AzureKeyCredential; + } }); + var keyCredential_js_1 = require_keyCredential(); + Object.defineProperty(exports2, "isKeyCredential", { enumerable: true, get: function() { + return keyCredential_js_1.isKeyCredential; + } }); + var azureNamedKeyCredential_js_1 = require_azureNamedKeyCredential(); + Object.defineProperty(exports2, "AzureNamedKeyCredential", { enumerable: true, get: function() { + return azureNamedKeyCredential_js_1.AzureNamedKeyCredential; + } }); + Object.defineProperty(exports2, "isNamedKeyCredential", { enumerable: true, get: function() { + return azureNamedKeyCredential_js_1.isNamedKeyCredential; + } }); + var azureSASCredential_js_1 = require_azureSASCredential(); + Object.defineProperty(exports2, "AzureSASCredential", { enumerable: true, get: function() { + return azureSASCredential_js_1.AzureSASCredential; + } }); + Object.defineProperty(exports2, "isSASCredential", { enumerable: true, get: function() { + return azureSASCredential_js_1.isSASCredential; + } }); + var tokenCredential_js_1 = require_tokenCredential(); + Object.defineProperty(exports2, "isTokenCredential", { enumerable: true, get: function() { + return tokenCredential_js_1.isTokenCredential; + } }); } }); -// node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/policies/requestPolicyFactoryPolicy.js -function createRequestPolicyFactoryPolicy(factories) { - const orderedFactories = factories.slice().reverse(); - return { - name: requestPolicyFactoryPolicyName, - async sendRequest(request3, next) { - let httpPipeline = { - async sendRequest(httpRequest) { - const response2 = await next(toPipelineRequest(httpRequest)); - return toCompatResponse(response2, { createProxy: true }); +// node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js +var require_disableKeepAlivePolicy = __commonJS({ + "node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; + exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; + function createDisableKeepAlivePolicy() { + return { + name: exports2.disableKeepAlivePolicyName, + async sendRequest(request, next) { + request.disableKeepAlive = true; + return next(request); } }; - for (const factory of orderedFactories) { - httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions); - } - const webResourceLike = toWebResourceLike(request3, { createProxy: true }); - const response = await httpPipeline.sendRequest(webResourceLike); - return toPipelineResponse(response); } - }; -} -var HttpPipelineLogLevel, mockRequestPolicyOptions, requestPolicyFactoryPolicyName; -var init_requestPolicyFactoryPolicy = __esm({ - "node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/policies/requestPolicyFactoryPolicy.js"() { - "use strict"; - init_util(); - init_response(); - (function(HttpPipelineLogLevel2) { - HttpPipelineLogLevel2[HttpPipelineLogLevel2["ERROR"] = 1] = "ERROR"; - HttpPipelineLogLevel2[HttpPipelineLogLevel2["INFO"] = 3] = "INFO"; - HttpPipelineLogLevel2[HttpPipelineLogLevel2["OFF"] = 0] = "OFF"; - HttpPipelineLogLevel2[HttpPipelineLogLevel2["WARNING"] = 2] = "WARNING"; - })(HttpPipelineLogLevel || (HttpPipelineLogLevel = {})); - mockRequestPolicyOptions = { - log(_logLevel, _message) { - }, - shouldLog(_logLevel) { - return false; - } - }; - requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy"; + function pipelineContainsDisableKeepAlivePolicy(pipeline) { + return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); + } } }); -// node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/httpClientAdapter.js -function convertHttpClient(requestPolicyClient) { - return { - sendRequest: async (request3) => { - const response = await requestPolicyClient.sendRequest(toWebResourceLike(request3, { createProxy: true })); - return toPipelineResponse(response); - } - }; -} -var init_httpClientAdapter = __esm({ - "node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/httpClientAdapter.js"() { +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/base64.js +var require_base642 = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; - init_response(); - init_util(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; + function encodeString(value) { + return Buffer.from(value).toString("base64"); + } + function encodeByteArray(value) { + const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); + return bufferValue.toString("base64"); + } + function decodeString(value) { + return Buffer.from(value, "base64"); + } + function decodeStringToString(value) { + return Buffer.from(value, "base64").toString(); + } } }); -// node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/index.js -var init_esm8 = __esm({ - "node_modules/.pnpm/@azure+core-http-compat@2.2.0/node_modules/@azure/core-http-compat/dist/esm/index.js"() { +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/interfaces.js +var require_interfaces = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/interfaces.js"(exports2) { "use strict"; - init_extendedClient(); - init_requestPolicyFactoryPolicy(); - init_disableKeepAlivePolicy(); - init_httpClientAdapter(); - init_util(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.XML_CHARKEY = exports2.XML_ATTRKEY = void 0; + exports2.XML_ATTRKEY = "$"; + exports2.XML_CHARKEY = "_"; } }); -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/util.js -function getAllMatches(string3, regex) { - const matches = []; - let match = regex.exec(string3); - 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]); +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/utils.js +var require_utils4 = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + 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 === null || mapperTypeName === void 0 ? void 0 : 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); + } + 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(uuid2) { + return validUuidRegex.test(uuid2); + } + function handleNullableResponseAndWrappableBody(responseObject) { + const combinedHeadersAndBody = Object.assign(Object.assign({}, 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; + } } - matches.push(allmatches); - match = regex.exec(string3); - } - return matches; -} -function isExist(v) { - return typeof v !== "undefined"; -} -var nameStartChar, nameChar, nameRegexp, regexName, isName; -var init_util2 = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/util.js"() { - "use strict"; - 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"; - nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - regexName = new RegExp("^" + nameRegexp + "$"); - isName = function(string3) { - const match = regexName.exec(string3); - return !(match === null || typeof match === "undefined"); - }; - } -}); - -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/validator.js -function validate(xmlData, options2) { - options2 = Object.assign({}, defaultOptions, options2); - const tags2 = []; - 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]; + 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 }); + } + 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; + if (expectedBodyTypeName === "Stream") { + return Object.assign(Object.assign({}, 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 : []; + for (const key of Object.keys(modelProperties)) { + if (modelProperties[key].serializedName) { + arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + } } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; + if (parsedHeaders) { + for (const key of Object.keys(parsedHeaders)) { + arrayResponse[key] = parsedHeaders[key]; + } } - 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, options2); - 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 (tags2.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags2.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 (tags2.length == 0) { - reachedRoot = true; + return isNullable && !fullResponse.parsedBody && !parsedHeaders && Object.getOwnPropertyNames(modelProperties).length === 0 ? null : arrayResponse; + } + return handleNullableResponseAndWrappableBody({ + body: fullResponse.parsedBody, + headers: parsedHeaders, + hasNullableType: isNullable, + shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) + }); + } + } +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/serializer.js +var require_serializer = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var base642 = tslib_1.__importStar(require_base642()); + var interfaces_js_1 = require_interfaces(); + var utils_js_1 = require_utils4(); + var SerializerImpl = class { + constructor(modelMappers = {}, isXML = false) { + this.modelMappers = modelMappers; + this.isXML = isXML; + } + /** + * @deprecated Removing the constraints validation on client side. + */ + validateConstraints(mapper, value, objectName) { + const failValidation = (constraintName, constraintValue) => { + throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); + }; + if (mapper.constraints && value !== void 0 && value !== null) { + const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems } = mapper.constraints; + if (ExclusiveMaximum !== void 0 && value >= ExclusiveMaximum) { + failValidation("ExclusiveMaximum", ExclusiveMaximum); + } + if (ExclusiveMinimum !== void 0 && value <= ExclusiveMinimum) { + failValidation("ExclusiveMinimum", ExclusiveMinimum); + } + if (InclusiveMaximum !== void 0 && value > InclusiveMaximum) { + failValidation("InclusiveMaximum", InclusiveMaximum); + } + if (InclusiveMinimum !== void 0 && value < InclusiveMinimum) { + failValidation("InclusiveMinimum", InclusiveMinimum); + } + if (MaxItems !== void 0 && value.length > MaxItems) { + failValidation("MaxItems", MaxItems); + } + if (MaxLength !== void 0 && value.length > MaxLength) { + failValidation("MaxLength", MaxLength); + } + if (MinItems !== void 0 && value.length < MinItems) { + failValidation("MinItems", MinItems); + } + if (MinLength !== void 0 && value.length < MinLength) { + failValidation("MinLength", MinLength); + } + if (MultipleOf !== void 0 && value % MultipleOf !== 0) { + failValidation("MultipleOf", MultipleOf); + } + if (Pattern) { + const pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; + if (typeof value !== "string" || value.match(pattern) === null) { + failValidation("Pattern", Pattern); } } + if (UniqueItems && value.some((item, i, ar) => ar.indexOf(item) !== i)) { + failValidation("UniqueItems", UniqueItems); + } + } + } + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param mapper - The mapper which defines the metadata of the serializable object + * + * @param object - A valid Javascript object to be serialized + * + * @param objectName - Name of the serialized object + * + * @param options - additional options to serialization + * + * @returns A valid serialized Javascript object + */ + serialize(mapper, object, objectName, options2 = { xml: {} }) { + var _a, _b, _c; + const updatedOptions = { + xml: { + rootName: (_a = options2.xml.rootName) !== null && _a !== void 0 ? _a : "", + includeRoot: (_b = options2.xml.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = options2.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + } + }; + let payload = {}; + const mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Sequence$/i) !== null) { + payload = []; + } + if (mapper.isConstant) { + object = mapper.defaultValue; + } + const { required: required2, nullable: nullable2 } = mapper; + if (required2 && nullable2 && object === void 0) { + throw new Error(`${objectName} cannot be undefined.`); + } + if (required2 && !nullable2 && (object === void 0 || object === null)) { + throw new Error(`${objectName} cannot be null or undefined.`); + } + if (!required2 && nullable2 === false && object === null) { + throw new Error(`${objectName} cannot be null.`); + } + if (object === void 0 || object === null) { + payload = object; } else { - const isValid = validateAttributeString(attrStr, options2); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); + if (mapperType.match(/^any$/i) !== null) { + payload = object; + } else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) { + payload = serializeBasicTypes(mapperType, objectName, object); + } else if (mapperType.match(/^Enum$/i) !== null) { + const enumMapper = mapper; + payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); + } else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) { + payload = serializeDateTypes(mapperType, object, objectName); + } else if (mapperType.match(/^ByteArray$/i) !== null) { + payload = serializeByteArrayType(objectName, object); + } else if (mapperType.match(/^Base64Url$/i) !== null) { + payload = serializeBase64UrlType(objectName, object); + } else if (mapperType.match(/^Sequence$/i) !== null) { + payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } else if (mapperType.match(/^Dictionary$/i) !== null) { + payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } else if (mapperType.match(/^Composite$/i) !== null) { + payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options2.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags2.push({ tagName, tagStartPos }); + } + return payload; + } + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param mapper - The mapper which defines the metadata of the serializable object + * + * @param responseBody - A valid Javascript entity to be deserialized + * + * @param objectName - Name of the deserialized object + * + * @param options - Controls behavior of XML parser and builder. + * + * @returns A valid deserialized Javascript object + */ + deserialize(mapper, responseBody, objectName, options2 = { xml: {} }) { + var _a, _b, _c, _d; + const updatedOptions = { + xml: { + rootName: (_a = options2.xml.rootName) !== null && _a !== void 0 ? _a : "", + includeRoot: (_b = options2.xml.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = options2.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + }, + ignoreUnknownProperties: (_d = options2.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + }; + if (responseBody === void 0 || responseBody === null) { + if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { + responseBody = []; } - tagFound = true; + if (mapper.defaultValue !== void 0) { + responseBody = mapper.defaultValue; + } + return responseBody; } - 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; + let payload; + const mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Composite$/i) !== null) { + payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions); + } else { + if (this.isXML) { + const xmlCharKey = updatedOptions.xml.xmlCharKey; + if (responseBody[interfaces_js_1.XML_ATTRKEY] !== void 0 && responseBody[xmlCharKey] !== void 0) { + responseBody = responseBody[xmlCharKey]; } - } 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 (mapperType.match(/^Number$/i) !== null) { + payload = parseFloat(responseBody); + if (isNaN(payload)) { + payload = responseBody; + } + } else if (mapperType.match(/^Boolean$/i) !== null) { + if (responseBody === "true") { + payload = true; + } else if (responseBody === "false") { + payload = false; + } else { + payload = responseBody; } + } else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) { + payload = responseBody; + } else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) { + payload = new Date(responseBody); + } else if (mapperType.match(/^UnixTime$/i) !== null) { + payload = unixTimeToDate(responseBody); + } else if (mapperType.match(/^ByteArray$/i) !== null) { + payload = base642.decodeString(responseBody); + } else if (mapperType.match(/^Base64Url$/i) !== null) { + payload = base64UrlToByteArray(responseBody); + } else if (mapperType.match(/^Sequence$/i) !== null) { + payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions); + } else if (mapperType.match(/^Dictionary$/i) !== null) { + payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions); } } - if (xmlData[i] === "<") { - i--; + if (mapper.isConstant) { + payload = mapper.defaultValue; } + return payload; } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); + }; + function createSerializer(modelMappers = {}, isXML = false) { + return new SerializerImpl(modelMappers, isXML); } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags2.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags2[0].tagName + "'.", getLineNumberForPosition(xmlData, tags2[0].tagStartPos)); - } else if (tags2.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags2.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; + function trimEnd(str, ch) { + let len = str.length; + while (len - 1 >= 0 && str[len - 1] === ch) { + --len; } + return str.substr(0, len); } - } - 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; + function bufferToBase64Url(buffer) { + if (!buffer) { + return void 0; } + if (!(buffer instanceof Uint8Array)) { + throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); + } + const str = base642.encodeByteArray(buffer); + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); } - } 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; - } + function base64UrlToByteArray(str) { + if (!str) { + return void 0; } + if (str && typeof str.valueOf() !== "string") { + throw new Error("Please provide an input of type string for converting to Uint8Array"); + } + str = str.replace(/-/g, "+").replace(/_/g, "/"); + return base642.decodeString(str); } - } 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; + function splitSerializeName(prop) { + const classes = []; + let partialclass = ""; + if (prop) { + const subwords = prop.split("."); + for (const item of subwords) { + if (item.charAt(item.length - 1) === "\\") { + partialclass += item.substr(0, item.length - 1) + "."; + } else { + partialclass += item; + classes.push(partialclass); + partialclass = ""; + } + } } + return classes; } - } - return i; -} -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 = ""; + function dateToUnixTime(d) { + if (!d) { + return void 0; } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; + if (typeof d.valueOf() === "string") { + d = new Date(d); } + return Math.floor(d.getTime() / 1e3); } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; -} -function validateAttributeString(attrStr, options2) { - const matches = 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 && !options2.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 isName(attrName); -} -function validateTagName(tagname) { - return 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; -} -var defaultOptions, doubleQuote, singleQuote, validAttrStrRegxp; -var init_validator = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/validator.js"() { - "use strict"; - init_util2(); - defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - doubleQuote = '"'; - singleQuote = "'"; - validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - } -}); - -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var defaultOptions2, buildOptions; -var init_OptionsBuilder = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"() { - "use strict"; - defaultOptions2 = { - 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, val) { - return val; - }, - attributeValueProcessor: function(attrName, val) { - return val; - }, - 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 - }; - buildOptions = function(options2) { - return Object.assign({}, defaultOptions2, options2); - }; - } -}); - -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var XmlNode; -var init_xmlNode = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"() { - "use strict"; - XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val }); - } - 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 }); - } + function unixTimeToDate(n) { + if (!n) { + return void 0; } - }; - } -}); - -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -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; - let entityName, val; - [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--; + return new Date(n * 1e3); + } + function serializeBasicTypes(typeName, objectName, value) { + if (value !== null && value !== void 0) { + if (typeName.match(/^Number$/i) !== null) { + if (typeof value !== "number") { + throw new Error(`${objectName} with value ${value} must be of type number.`); + } + } else if (typeName.match(/^String$/i) !== null) { + if (typeof value.valueOf() !== "string") { + throw new Error(`${objectName} with value "${value}" must be of type string.`); + } + } else if (typeName.match(/^Uuid$/i) !== null) { + if (!(typeof value.valueOf() === "string" && (0, utils_js_1.isValidUuid)(value))) { + throw new Error(`${objectName} with value "${value}" must be of type string and a valid uuid.`); + } + } else if (typeName.match(/^Boolean$/i) !== null) { + if (typeof value !== "boolean") { + throw new Error(`${objectName} with value ${value} must be of type boolean.`); + } + } else if (typeName.match(/^Stream$/i) !== null) { + const objectType = typeof value; + if (objectType !== "string" && typeof value.pipe !== "function" && // NodeJS.ReadableStream + typeof value.tee !== "function" && // browser ReadableStream + !(value instanceof ArrayBuffer) && !ArrayBuffer.isView(value) && // File objects count as a type of Blob, so we want to use instanceof explicitly + !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob) && objectType !== "function") { + throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`); } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; } + return value; } - 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 entityName = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName += xmlData[i]; - } - entityName = entityName.trim(); - if (entityName.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val += xmlData[i]; - } - return [entityName, val, 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 (isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); -} -var init_DocTypeReader = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"() { - "use strict"; - init_util2(); - } -}); - -// node_modules/.pnpm/strnum@2.0.5/node_modules/strnum/strnum.js -function toNumber(str, options2 = {}) { - options2 = Object.assign({}, consider, options2); - if (!str || typeof str !== "string") return str; - let trimmedStr = str.trim(); - if (options2.skipLike !== void 0 && options2.skipLike.test(trimmedStr)) return str; - else if (str === "0") return 0; - else if (options2.hex && hexRegex.test(trimmedStr)) { - return parse_int(trimmedStr, 16); - } else if (trimmedStr.search(/[eE]/) !== -1) { - const notation = trimmedStr.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/); - if (notation) { - if (options2.leadingZeros) { - trimmedStr = (notation[1] || "") + notation[3]; - } else { - if (notation[2] === "0" && notation[3][0] === ".") { - } else { - return str; + function serializeEnumType(objectName, allowedValues, value) { + if (!allowedValues) { + throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`); + } + const isPresent = allowedValues.some((item) => { + if (typeof item.valueOf() === "string") { + return item.toLowerCase() === value.toLowerCase(); } + return item === value; + }); + if (!isPresent) { + throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`); } - return options2.eNotation ? Number(trimmedStr) : str; - } else { - return str; + return value; } - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - if (!options2.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str; - else if (!options2.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str; - else if (options2.leadingZeros && leadingZeros === str) return 0; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options2.eNotation) return num; - else return str; - } 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 str; - } - if (leadingZeros) { - return numTrimmedByZeros === numStr || sign + numTrimmedByZeros === numStr ? num : str; - } else { - return trimmedStr === numStr || trimmedStr === sign + numStr ? num : str; + function serializeByteArrayType(objectName, value) { + if (value !== void 0 && value !== null) { + if (!(value instanceof Uint8Array)) { + throw new Error(`${objectName} must be of type Uint8Array.`); } + value = base642.encodeByteArray(value); } - } else { - return str; + return value; } - } -} -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; -} -function parse_int(numStr, base) { - if (parseInt) return parseInt(numStr, base); - else if (Number.parseInt) return Number.parseInt(numStr, base); - else if (window && window.parseInt) return window.parseInt(numStr, base); - else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); -} -var hexRegex, numRegex, consider; -var init_strnum = __esm({ - "node_modules/.pnpm/strnum@2.0.5/node_modules/strnum/strnum.js"() { - "use strict"; - hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - numRegex = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/; - consider = { - hex: true, - // oct: false, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - } -}); - -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/ignoreAttributes.js -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; + function serializeBase64UrlType(objectName, value) { + if (value !== void 0 && value !== null) { + if (!(value instanceof Uint8Array)) { + throw new Error(`${objectName} must be of type Uint8Array.`); } + value = bufferToBase64Url(value); } - }; - } - return () => false; -} -var init_ignoreAttributes = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/ignoreAttributes.js"() { - "use strict"; - } -}); - -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -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(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val !== void 0) { - if (this.options.trimValues && !dontTrim) { - val = val.trim(); - } - if (val.length > 0) { - if (!escapeEntities) val = this.replaceEntitiesValue(val); - const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val; - } else if (typeof newval !== typeof val || newval !== val) { - return newval; - } else if (this.options.trimValues) { - return parseValue2(val, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val.trim(); - if (trimmedVal === val) { - return parseValue2(val, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val; + return value; + } + function serializeDateTypes(typeName, value, objectName) { + if (value !== void 0 && value !== null) { + if (typeName.match(/^Date$/i) !== null) { + if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { + throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + } + value = value instanceof Date ? value.toISOString().substring(0, 10) : new Date(value).toISOString().substring(0, 10); + } else if (typeName.match(/^DateTime$/i) !== null) { + if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { + throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + } + value = value instanceof Date ? value.toISOString() : new Date(value).toISOString(); + } else if (typeName.match(/^DateTimeRfc1123$/i) !== null) { + if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { + throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`); + } + value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString(); + } else if (typeName.match(/^UnixTime$/i) !== null) { + if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { + throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`); + } + value = dateToUnixTime(value); + } else if (typeName.match(/^TimeSpan$/i) !== null) { + if (!(0, utils_js_1.isDuration)(value)) { + throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was "${value}".`); + } } } + return value; } - } -} -function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags2 = tagname.split(":"); - const prefix2 = tagname.charAt(0) === "/" ? "/" : ""; - if (tags2[0] === "xmlns") { - return ""; - } - if (tags2.length === 2) { - tagname = prefix2 + tags2[1]; - } - } - return tagname; -} -function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = 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; + function serializeSequenceType(serializer, mapper, object, objectName, isXml, options2) { + var _a; + if (!Array.isArray(object)) { + throw new Error(`${objectName} must be of type Array.`); + } + let elementType = mapper.type.element; + if (!elementType || typeof elementType !== "object") { + 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; + } + const tempArray = []; + for (let i = 0; i < object.length; i++) { + const serializedValue = serializer.serialize(elementType, object[i], objectName, options2); + if (isXml && elementType.xmlNamespace) { + const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; + if (elementType.type.name === "Composite") { + tempArray[i] = Object.assign({}, serializedValue); + tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { - attrs[aName] = parseValue2( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); + tempArray[i] = {}; + tempArray[i][options2.xml.xmlCharKey] = serializedValue; + tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; + } else { + tempArray[i] = serializedValue; } } + return tempArray; } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; + function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options2) { + if (typeof object !== "object") { + throw new Error(`${objectName} must be of type object.`); + } + const valueType = mapper.type.value; + if (!valueType || typeof valueType !== "object") { + throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${objectName}.`); + } + const tempDictionary = {}; + for (const key of Object.keys(object)) { + const serializedValue = serializer.serialize(valueType, object[key], objectName, options2); + tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options2); + } + if (isXml && mapper.xmlNamespace) { + const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; + const result = tempDictionary; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace }; + return result; + } + return tempDictionary; } - return attrs; - } -} -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); - } -} -function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = 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 - }; + function resolveAdditionalProperties(serializer, mapper, objectName) { + 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; } - } else if (ch === " ") { - ch = " "; + return additionalProperties; } - tagExp += ch; - } -} -function findClosingIndex(xmlData, str, i, errMsg) { - const closingIndex = xmlData.indexOf(str, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str.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); + function resolveReferencedMapper(serializer, mapper, objectName) { + const className = mapper.type.className; + if (!className) { + throw new Error(`Class name for model "${objectName}" is not provided in the mapper "${JSON.stringify(mapper, void 0, 2)}".`); + } + return serializer.modelMappers[className]; } - } - 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 - }; - } + function resolveModelProperties(serializer, mapper, objectName) { + let modelProps = mapper.type.modelProperties; + if (!modelProps) { + const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); + if (!modelMapper) { + throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - 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; + modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : 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}".`); } } + return modelProps; } - } -} -function parseValue2(val, shouldParse, options2) { - if (shouldParse && typeof val === "string") { - const newval = val.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber(val, options2); - } else { - if (isExist(val)) { - return val; - } else { - return ""; - } - } -} -var OrderedObjParser, attrsRegx, parseXml, replaceEntitiesValue; -var init_OrderedObjParser = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"() { - "use strict"; - init_util2(); - init_xmlNode(); - init_DocTypeReader(); - init_strnum(); - init_ignoreAttributes(); - OrderedObjParser = class { - constructor(options2) { - this.options = options2; - 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: (_, str) => String.fromCodePoint(Number.parseInt(str, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => String.fromCodePoint(Number.parseInt(str, 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); - } - }; - attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - 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 val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val == void 0) val = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); + function serializeCompositeType(serializer, mapper, object, objectName, isXml, options2) { + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); + } + if (object !== void 0 && object !== null) { + const payload = {}; + const modelProps = resolveModelProperties(serializer, mapper, objectName); + for (const key of Object.keys(modelProps)) { + const propertyMapper = modelProps[key]; + if (propertyMapper.readOnly) { + continue; + } + let propName; + let parentObject = payload; + if (serializer.isXML) { + if (propertyMapper.xmlIsWrapped) { + propName = propertyMapper.xmlName; } else { - currentNode.add(this.options.textNodeName, val); + propName = propertyMapper.xmlElementName || propertyMapper.xmlName; } - 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); + const paths = splitSerializeName(propertyMapper.serializedName); + propName = paths.pop(); + for (const pathName of paths) { + const childObject = parentObject[pathName]; + if ((childObject === void 0 || childObject === null) && (object[key] !== void 0 && object[key] !== null || propertyMapper.defaultValue !== void 0)) { + parentObject[pathName] = {}; } - 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(".")); + parentObject = parentObject[pathName]; + } + } + 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 }); + } + const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; + let toSerialize = object[key]; + const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && (toSerialize === void 0 || toSerialize === null)) { + toSerialize = mapper.serializedName; + } + const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options2); + if (serializedValue !== void 0 && propName !== void 0 && propName !== null) { + const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options2); + if (isXml && propertyMapper.xmlIsAttribute) { + parentObject[interfaces_js_1.XML_ATTRKEY] = parentObject[interfaces_js_1.XML_ATTRKEY] || {}; + parentObject[interfaces_js_1.XML_ATTRKEY][propName] = serializedValue; + } else if (isXml && propertyMapper.xmlIsWrapped) { + parentObject[propName] = { [propertyMapper.xmlElementName]: value }; } 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; + parentObject[propName] = value; } - textData = ""; - i = closeIndex; } } + } + const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); + if (additionalPropertiesMapper) { + const propNames = Object.keys(modelProps); + for (const clientPropName in object) { + const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName); + if (isAdditionalProperty) { + payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options2); + } + } + } + return payload; + } + return object; + } + function getXmlObjectValue(propertyMapper, serializedValue, isXml, options2) { + if (!isXml || !propertyMapper.xmlNamespace) { + return serializedValue; + } + const xmlnsKey = propertyMapper.xmlNamespacePrefix ? `xmlns:${propertyMapper.xmlNamespacePrefix}` : "xmlns"; + const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace }; + if (["Composite"].includes(propertyMapper.type.name)) { + if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { + return serializedValue; } else { - textData += xmlData[i]; + const result2 = Object.assign({}, serializedValue); + result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; + return result2; } } - return xmlObj.child; - }; - replaceEntitiesValue = function(val) { - if (this.options.processEntities) { - for (let entityName in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName]; - val = val.replace(entity.regx, entity.val); + const result = {}; + result[options2.xml.xmlCharKey] = serializedValue; + result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; + return result; + } + function isSpecialXmlProperty(propertyName, options2) { + return [interfaces_js_1.XML_ATTRKEY, options2.xml.xmlCharKey].includes(propertyName); + } + function deserializeCompositeType(serializer, mapper, responseBody, objectName, options2) { + var _a, _b; + const xmlCharKey = (_a = options2.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); + } + const modelProps = resolveModelProperties(serializer, mapper, objectName); + let instance = {}; + const handledPropertyNames = []; + for (const key of Object.keys(modelProps)) { + const propertyMapper = modelProps[key]; + const paths = splitSerializeName(modelProps[key].serializedName); + handledPropertyNames.push(paths[0]); + const { serializedName, xmlName, xmlElementName } = propertyMapper; + let propertyObjectName = objectName; + if (serializedName !== "" && serializedName !== void 0) { + propertyObjectName = objectName + "." + serializedName; + } + const headerCollectionPrefix = propertyMapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + const dictionary = {}; + for (const headerKey of Object.keys(responseBody)) { + if (headerKey.startsWith(headerCollectionPrefix)) { + dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options2); + } + handledPropertyNames.push(headerKey); + } + instance[key] = dictionary; + } else if (serializer.isXML) { + if (propertyMapper.xmlIsAttribute && responseBody[interfaces_js_1.XML_ATTRKEY]) { + instance[key] = serializer.deserialize(propertyMapper, responseBody[interfaces_js_1.XML_ATTRKEY][xmlName], propertyObjectName, options2); + } else if (propertyMapper.xmlIsMsText) { + if (responseBody[xmlCharKey] !== void 0) { + instance[key] = responseBody[xmlCharKey]; + } else if (typeof responseBody === "string") { + instance[key] = responseBody; + } + } else { + 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 : []; + instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options2); + handledPropertyNames.push(xmlName); + } else { + const property = responseBody[propertyName]; + instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options2); + handledPropertyNames.push(propertyName); + } + } + } else { + let propertyInstance; + let res = responseBody; + let steps = 0; + for (const item of paths) { + if (!res) + break; + steps++; + res = res[item]; + } + if (res === null && steps < paths.length) { + res = void 0; + } + propertyInstance = res; + const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; + if (polymorphicDiscriminator && key === polymorphicDiscriminator.clientName && (propertyInstance === void 0 || propertyInstance === null)) { + propertyInstance = mapper.serializedName; + } + let serializedValue; + if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { + propertyInstance = responseBody[key]; + const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options2); + for (const [k, v] of Object.entries(instance)) { + if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) { + arrayInstance[k] = v; + } + } + instance = arrayInstance; + } else if (propertyInstance !== void 0 || propertyMapper.defaultValue !== void 0) { + serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options2); + instance[key] = serializedValue; + } } - for (let entityName in this.lastEntities) { - const entity = this.lastEntities[entityName]; - val = val.replace(entity.regex, entity.val); + } + const additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + const isAdditionalProperty = (responsePropName) => { + for (const clientPropName in modelProps) { + const paths = splitSerializeName(modelProps[clientPropName].serializedName); + if (paths[0] === responsePropName) { + return false; + } + } + return true; + }; + for (const responsePropName in responseBody) { + if (isAdditionalProperty(responsePropName)) { + instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options2); + } } - if (this.options.htmlEntities) { - for (let entityName in this.htmlEntities) { - const entity = this.htmlEntities[entityName]; - val = val.replace(entity.regex, entity.val); + } else if (responseBody && !options2.ignoreUnknownProperties) { + for (const key of Object.keys(responseBody)) { + if (instance[key] === void 0 && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key, options2)) { + instance[key] = responseBody[key]; } } - val = val.replace(this.ampEntity.regex, this.ampEntity.val); } - return val; - }; - } -}); - -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/node2json.js -function prettify(node, options2) { - return compress(node, options2); -} -function compress(arr, options2, 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 === options2.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val = compress(tagObj[property], options2, newJpath); - const isLeaf = isLeafTag(val, options2); - if (tagObj[":@"]) { - assignAttributes(val, tagObj[":@"], newJpath, options2); - } else if (Object.keys(val).length === 1 && val[options2.textNodeName] !== void 0 && !options2.alwaysCreateTextNode) { - val = val[options2.textNodeName]; - } else if (Object.keys(val).length === 0) { - if (options2.alwaysCreateTextNode) val[options2.textNodeName] = ""; - else val = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val); - } else { - if (options2.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val]; - } else { - compressedObj[property] = val; + return instance; + } + function deserializeDictionaryType(serializer, mapper, responseBody, objectName, options2) { + const value = mapper.type.value; + if (!value || typeof value !== "object") { + throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${objectName}`); + } + if (responseBody) { + const tempDictionary = {}; + for (const key of Object.keys(responseBody)) { + tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options2); } + return tempDictionary; } + return responseBody; } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options2.textNodeName] = text; - } else if (text !== void 0) compressedObj[options2.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, options2) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options2.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; + function deserializeSequenceType(serializer, mapper, responseBody, objectName, options2) { + 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}`); } - } - } -} -function isLeafTag(obj, options2) { - const { textNodeName } = options2; - 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; -} -var init_node2json = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/node2json.js"() { - "use strict"; - } -}); - -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var XMLParser; -var init_XMLParser = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"() { - "use strict"; - init_OptionsBuilder(); - init_OrderedObjParser(); - init_node2json(); - init_validator(); - XMLParser = class { - constructor(options2) { - this.externalEntities = {}; - this.options = buildOptions(options2); + if (responseBody) { + if (!Array.isArray(responseBody)) { + responseBody = [responseBody]; + } + if (element.type.name === "Composite" && element.type.className) { + element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + } + const tempArray = []; + for (let i = 0; i < responseBody.length; i++) { + tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options2); + } + return tempArray; } - /** - * 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(); + return responseBody; + } + function getIndexDiscriminator(discriminators, discriminatorValue, typeName) { + const typeNamesToCheck = [typeName]; + while (typeNamesToCheck.length) { + const currentName = typeNamesToCheck.shift(); + const indexDiscriminator = discriminatorValue === currentName ? discriminatorValue : currentName + "." + discriminatorValue; + if (Object.prototype.hasOwnProperty.call(discriminators, indexDiscriminator)) { + return discriminators[indexDiscriminator]; } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); + for (const [name, mapper] of Object.entries(discriminators)) { + if (name.startsWith(currentName + ".") && mapper.type.uberParent === currentName && mapper.type.className) { + typeNamesToCheck.push(mapper.type.className); + } } } - 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; + return void 0; + } + function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { + var _a; + const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator) { + let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; + if (discriminatorName) { + if (polymorphicPropertyName === "serializedName") { + discriminatorName = discriminatorName.replace(/\\/gi, ""); + } + const discriminatorValue = object[discriminatorName]; + const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + if (typeof discriminatorValue === "string" && typeName) { + const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); + if (polymorphicMapper) { + mapper = polymorphicMapper; + } + } } } - }; - } + return mapper; + } + function getPolymorphicDiscriminatorRecursively(serializer, mapper) { + return mapper.type.polymorphicDiscriminator || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className); + } + function getPolymorphicDiscriminatorSafely(serializer, typeName) { + return typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator; + } + exports2.MapperTypeNames = { + Base64Url: "Base64Url", + Boolean: "Boolean", + ByteArray: "ByteArray", + Composite: "Composite", + Date: "Date", + DateTime: "DateTime", + DateTimeRfc1123: "DateTimeRfc1123", + Dictionary: "Dictionary", + Enum: "Enum", + Number: "Number", + Object: "Object", + Sequence: "Sequence", + String: "String", + Stream: "Stream", + TimeSpan: "TimeSpan", + UnixTime: "UnixTime" + }; + } }); -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -function toXml(jArray, options2) { - let indentation = ""; - if (options2.format && options2.indentBy.length > 0) { - indentation = EOL2; +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/state.js +var require_state2 = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/state.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.state = void 0; + exports2.state = { + operationRequestMap: /* @__PURE__ */ new WeakMap() + }; } - return arrToStr(jArray, options2, "", indentation); -} -function arrToStr(arr, options2, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName2(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options2.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options2)) { - tagText = options2.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue2(tagText, options2); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options2.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/operationHelpers.js +var require_operationHelpers = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; + var state_js_1 = require_state2(); + function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { + let parameterPath = parameter.parameterPath; + const parameterMapper = parameter.mapper; + let value; + if (typeof parameterPath === "string") { + parameterPath = [parameterPath]; + } + if (Array.isArray(parameterPath)) { + if (parameterPath.length > 0) { + if (parameterMapper.isConstant) { + value = parameterMapper.defaultValue; + } else { + let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); + if (!propertySearchResult.propertyFound && fallbackObject) { + propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath); + } + let useDefaultValue = false; + if (!propertySearchResult.propertyFound) { + useDefaultValue = parameterMapper.required || parameterPath[0] === "options" && parameterPath.length === 2; + } + value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; + } + } + } else { + if (parameterMapper.required) { + value = {}; + } + for (const propertyName in parameterPath) { + const propertyMapper = parameterMapper.type.modelProperties[propertyName]; + const propertyPath = parameterPath[propertyName]; + const propertyValue = getOperationArgumentValueFromParameter(operationArguments, { + parameterPath: propertyPath, + mapper: propertyMapper + }, fallbackObject); + if (propertyValue !== void 0) { + if (!value) { + value = {}; + } + value[propertyName] = propertyValue; + } + } } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options2.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options2); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options2.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; + return value; } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options2.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options2); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options2, newJPath, newIdentation); - if (options2.unpairedTags.indexOf(tagName) !== -1) { - if (options2.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options2.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; + return result; + } + var originalRequestSymbol = Symbol.for("@azure/core-client original request"); + function hasOriginalRequest(request) { + return originalRequestSymbol in request; + } + function getOperationRequestInfo(request) { + if (hasOriginalRequest(request)) { + return getOperationRequestInfo(request[originalRequestSymbol]); + } + let info5 = state_js_1.state.operationRequestMap.get(request); + if (!info5) { + info5 = {}; + state_js_1.state.operationRequestMap.set(request, info5); + } + return info5; } - isPreviousElementTag = true; } - return xmlStr; -} -function propName2(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; +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js +var require_deserializationPolicy = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; + var interfaces_js_1 = require_interfaces(); + 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(options2 = {}) { + var _a, _b, _c, _d, _e, _f, _g; + const jsonContentTypes = (_b = (_a = options2.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; + const xmlContentTypes = (_d = (_c = options2.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const parseXML = options2.parseXML; + const serializerOptions = options2.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 + } + }; + return { + name: exports2.deserializationPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, updatedOptions, parseXML); + } + }; + } + 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; + if (operationSpec) { + if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + result = operationSpec.responses[parsedResponse.status]; + } else { + result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + } + } + return result; + } + 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; + let result; + if (shouldDeserialize === void 0) { + result = true; + } else if (typeof shouldDeserialize === "boolean") { + result = shouldDeserialize; + } else { + result = shouldDeserialize(parsedResponse); + } + return result; + } + async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options2, parseXML) { + const parsedResponse = await parse4(jsonContentTypes, xmlContentTypes, response, options2, parseXML); + if (!shouldDeserializeResponse(parsedResponse)) { + return parsedResponse; + } + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); + const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + if (!operationSpec || !operationSpec.responses) { + return parsedResponse; + } + const responseSpec = getOperationResponseMap(parsedResponse); + const { error: error3, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options2); + if (error3) { + throw error3; + } else if (shouldReturnResponse) { + return parsedResponse; + } + if (responseSpec) { + if (responseSpec.bodyMapper) { + let valueToDeserialize = parsedResponse.parsedBody; + if (operationSpec.isXML && responseSpec.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { + valueToDeserialize = typeof valueToDeserialize === "object" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] : []; + } + try { + parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody", options2); + } catch (deserializeError) { + const restError = new core_rest_pipeline_1.RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, { + statusCode: parsedResponse.status, + request: parsedResponse.request, + response: parsedResponse + }); + throw restError; + } + } else if (operationSpec.httpMethod === "HEAD") { + parsedResponse.parsedBody = response.status >= 200 && response.status < 300; + } + if (responseSpec.headersMapper) { + parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders", { xml: {}, ignoreUnknownProperties: true }); + } + } + return parsedResponse; + } + function isOperationSpecEmpty(operationSpec) { + const expectedStatusCodes = Object.keys(operationSpec.responses); + return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; + } + function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options2) { + var _a, _b, _c, _d, _e; + const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; + const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; + if (isExpectedStatusCode) { + if (responseSpec) { + if (!responseSpec.isError) { + return { error: null, shouldReturnResponse: false }; + } + } else { + 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 error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { + statusCode: parsedResponse.status, + request: parsedResponse.request, + response: parsedResponse + }); + if (!errorResponseSpec && !(((_c = (_b = parsedResponse.parsedBody) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.code) && ((_e = (_d = parsedResponse.parsedBody) === null || _d === void 0 ? void 0 : _d.error) === null || _e === void 0 ? void 0 : _e.message))) { + throw error3; + } + const defaultBodyMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.bodyMapper; + const defaultHeadersMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.headersMapper; + try { + if (parsedResponse.parsedBody) { + const parsedBody = parsedResponse.parsedBody; + let deserializedError; + if (defaultBodyMapper) { + let valueToDeserialize = parsedBody; + if (operationSpec.isXML && defaultBodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { + valueToDeserialize = []; + const elementName = defaultBodyMapper.xmlElementName; + if (typeof parsedBody === "object" && elementName) { + valueToDeserialize = parsedBody[elementName]; + } + } + deserializedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, "error.response.parsedBody", options2); + } + const internalError = parsedBody.error || deserializedError || parsedBody; + error3.code = internalError.code; + if (internalError.message) { + error3.message = internalError.message; + } + if (defaultBodyMapper) { + error3.response.parsedBody = deserializedError; + } + } + if (parsedResponse.headers && defaultHeadersMapper) { + error3.response.parsedHeaders = operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders"); + } + } catch (defaultError) { + error3.message = `Error "${defaultError.message}" occurred in deserializing the responseBody - "${parsedResponse.bodyAsText}" for the default response.`; + } + return { error: error3, shouldReturnResponse: false }; + } + async function parse4(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { + var _a; + if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.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()); + try { + if (contentComponents.length === 0 || contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) { + operationResponse.parsedBody = JSON.parse(text); + return operationResponse; + } else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) { + if (!parseXML) { + throw new Error("Parsing XML not supported."); + } + const body = await parseXML(text, opts.xml); + operationResponse.parsedBody = body; + return operationResponse; + } + } catch (err) { + const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; + const errCode = err.code || core_rest_pipeline_1.RestError.PARSE_ERROR; + const e = new core_rest_pipeline_1.RestError(msg, { + code: errCode, + statusCode: operationResponse.status, + request: operationResponse.request, + response: operationResponse + }); + throw e; + } + } + return operationResponse; + } } -} -function attr_to_str(attrMap, options2) { - let attrStr = ""; - if (attrMap && !options2.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options2.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue2(attrVal, options2); - if (attrVal === true && options2.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options2.attributeNamePrefix.length)}`; +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js +var require_interfaceHelpers = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; + var serializer_js_1 = require_serializer(); + function getStreamingResponseStatusCodes(operationSpec) { + const result = /* @__PURE__ */ new Set(); + for (const statusCode in operationSpec.responses) { + const operationResponse = operationSpec.responses[statusCode]; + if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Stream) { + result.add(Number(statusCode)); + } + } + return result; + } + function getPathStringFromParameter(parameter) { + const { parameterPath, mapper } = parameter; + let result; + if (typeof parameterPath === "string") { + result = parameterPath; + } else if (Array.isArray(parameterPath)) { + result = parameterPath.join("."); } else { - attrStr += ` ${attr.substr(options2.attributeNamePrefix.length)}="${attrVal}"`; + result = mapper.serializedName; } + return result; } } - return attrStr; -} -function isStopNode(jPath, options2) { - jPath = jPath.substr(0, jPath.length - options2.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options2.stopNodes) { - if (options2.stopNodes[index] === jPath || options2.stopNodes[index] === "*." + tagName) return true; +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js +var require_serializationPolicy = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + 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(); + var interfaceHelpers_js_1 = require_interfaceHelpers(); + exports2.serializationPolicyName = "serializationPolicy"; + function serializationPolicy(options2 = {}) { + const stringifyXML = options2.stringifyXML; + return { + 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; + if (operationSpec && operationArguments) { + serializeHeaders(request, operationArguments, operationSpec); + serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); + } + return next(request); + } + }; + } + 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); + if (headerValue !== null && headerValue !== void 0 || headerParameter.mapper.required) { + headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter)); + const headerCollectionPrefix = headerParameter.mapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + for (const key of Object.keys(headerValue)) { + request.headers.set(headerCollectionPrefix + key, headerValue[key]); + } + } else { + request.headers.set(headerParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter), headerValue); + } + } + } + } + const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + if (customHeaders) { + for (const customHeaderName of Object.keys(customHeaders)) { + request.headers.set(customHeaderName, customHeaders[customHeaderName]); + } + } + } + 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 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 + } + }; + const xmlCharKey = updatedOptions.xml.xmlCharKey; + if (operationSpec.requestBody && operationSpec.requestBody.mapper) { + request.body = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, operationSpec.requestBody); + const bodyMapper = operationSpec.requestBody.mapper; + const { required: required2, serializedName, xmlName, xmlElementName, xmlNamespace, xmlNamespacePrefix, nullable: nullable2 } = bodyMapper; + const typeName = bodyMapper.type.name; + try { + if (request.body !== void 0 && request.body !== null || nullable2 && request.body === null || required2) { + const requestBodyParameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(operationSpec.requestBody); + request.body = operationSpec.serializer.serialize(bodyMapper, request.body, requestBodyParameterPathString, updatedOptions); + const isStream = typeName === serializer_js_1.MapperTypeNames.Stream; + if (operationSpec.isXML) { + const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : "xmlns"; + const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request.body, updatedOptions); + if (typeName === serializer_js_1.MapperTypeNames.Sequence) { + request.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { rootName: xmlName || serializedName, xmlCharKey }); + } else if (!isStream) { + request.body = stringifyXML(value, { + rootName: xmlName || serializedName, + 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")) { + return; + } else if (!isStream) { + request.body = JSON.stringify(request.body); + } + } + } catch (error3) { + throw new Error(`Error "${error3.message}" occurred in serializing the payload - ${JSON.stringify(serializedName, void 0, " ")}.`); + } + } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { + request.formData = {}; + for (const formDataParameter of operationSpec.formDataParameters) { + const formDataParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, formDataParameter); + if (formDataParameterValue !== void 0 && formDataParameterValue !== null) { + const formDataParameterPropertyName = formDataParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter); + request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter), updatedOptions); + } + } + } + } + function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options2) { + if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { + const result = {}; + result[options2.xml.xmlCharKey] = serializedValue; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace }; + return result; + } + return serializedValue; + } + function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { + if (!Array.isArray(obj)) { + obj = [obj]; + } + if (!xmlNamespaceKey || !xmlNamespace) { + return { [elementName]: obj }; + } + const result = { [elementName]: obj }; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace }; + return result; + } } - return false; -} -function replaceEntitiesValue2(textValue, options2) { - if (textValue && textValue.length > 0 && options2.processEntities) { - for (let i = 0; i < options2.entities.length; i++) { - const entity = options2.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/pipeline.js +var require_pipeline3 = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createClientPipeline = createClientPipeline; + var deserializationPolicy_js_1 = require_deserializationPolicy(); + var core_rest_pipeline_1 = require_commonjs6(); + var serializationPolicy_js_1 = require_serializationPolicy(); + function createClientPipeline(options2 = {}) { + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options2 !== null && options2 !== void 0 ? options2 : {}); + if (options2.credentialOptions) { + pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ + credential: options2.credentialOptions.credential, + scopes: options2.credentialOptions.credentialScopes + })); + } + pipeline.addPolicy((0, serializationPolicy_js_1.serializationPolicy)(options2.serializationOptions), { phase: "Serialize" }); + pipeline.addPolicy((0, deserializationPolicy_js_1.deserializationPolicy)(options2.deserializationOptions), { + phase: "Deserialize" + }); + return pipeline; } } - return textValue; -} -var EOL2; -var init_orderedJs2Xml = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"() { +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/httpClientCache.js +var require_httpClientCache = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; - EOL2 = "\n"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); + var cachedHttpClient; + function getCachedDefaultHttpClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } } }); -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -function Builder(options2) { - this.options = Object.assign({}, defaultOptions3, options2); - 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 ""; +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/urlHelpers.js +var require_urlHelpers2 = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; + var operationHelpers_js_1 = require_operationHelpers(); + var interfaceHelpers_js_1 = require_interfaceHelpers(); + var CollectionFormatToDelimiterMap = { + CSV: ",", + SSV: " ", + Multi: "Multi", + TSV: " ", + Pipes: "|" }; - this.tagEndChar = ">"; - this.newLine = ""; - } -} -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); - } -} -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; - } -} -var defaultOptions3; -var init_json2xml = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"() { - "use strict"; - init_orderedJs2Xml(); - init_ignoreAttributes(); - defaultOptions3 = { - 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 - }; - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return toXml(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; + function getRequestUrl(baseUri, operationSpec, operationArguments, fallbackObject) { + const urlReplacements = calculateUrlReplacements(operationSpec, operationArguments, fallbackObject); + let isAbsolutePath = false; + let requestUrl = replaceAll(baseUri, urlReplacements); + if (operationSpec.path) { + let path4 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path4.startsWith("/")) { + path4 = path4.substring(1); + } + if (isAbsoluteUrl(path4)) { + requestUrl = path4; + isAbsolutePath = true; + } else { + requestUrl = appendPath(requestUrl, path4); } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val = ""; - 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)) { - val += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val += ""; - } else if (key === this.options.cdataPropName) { - val += ""; - } else if (key[0] === "?") { - val += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val += 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]); - val += this.replaceEntitiesValue(newval); - } else { - val += 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] === "?") val += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val += 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; + } + const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); + requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); + return requestUrl; + } + function replaceAll(input, replacements) { + let result = input; + for (const [searchValue, replaceValue] of replacements) { + result = result.split(searchValue).join(replaceValue); + } + 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) { + for (const urlParameter of operationSpec.urlParameters) { + let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); + const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); + urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, parameterPathString); + if (!urlParameter.skipEncoding) { + urlParameterValue = encodeURIComponent(urlParameterValue); + } + result.set(`{${urlParameter.mapper.serializedName || parameterPathString}}`, urlParameterValue); + } + } + return result; + } + function isAbsoluteUrl(url) { + return url.includes("://"); + } + function appendPath(url, pathToAppend) { + if (!pathToAppend) { + return url; + } + const parsedUrl = new URL(url); + let newPath = parsedUrl.pathname; + if (!newPath.endsWith("/")) { + newPath = `${newPath}/`; + } + if (pathToAppend.startsWith("/")) { + pathToAppend = pathToAppend.substring(1); + } + const searchStart = pathToAppend.indexOf("?"); + if (searchStart !== -1) { + const path4 = pathToAppend.substring(0, searchStart); + const search = pathToAppend.substring(searchStart + 1); + newPath = newPath + path4; + if (search) { + parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; + } + } else { + newPath = newPath + pathToAppend; + } + parsedUrl.pathname = newPath; + 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) { + for (const queryParameter of operationSpec.queryParameters) { + if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { + sequenceParams.add(queryParameter.mapper.serializedName); + } + let queryParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, queryParameter, fallbackObject); + if (queryParameterValue !== void 0 && queryParameterValue !== null || queryParameter.mapper.required) { + queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter)); + const delimiter2 = queryParameter.collectionFormat ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat] : ""; + if (Array.isArray(queryParameterValue)) { + queryParameterValue = queryParameterValue.map((item) => { + if (item === null || item === void 0) { + return ""; } + return item; + }); + } + if (queryParameter.collectionFormat === "Multi" && queryParameterValue.length === 0) { + continue; + } else if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "SSV" || queryParameter.collectionFormat === "TSV")) { + queryParameterValue = queryParameterValue.join(delimiter2); + } + if (!queryParameter.skipEncoding) { + if (Array.isArray(queryParameterValue)) { + queryParameterValue = queryParameterValue.map((item) => { + return encodeURIComponent(item); + }); } 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); + queryParameterValue = encodeURIComponent(queryParameterValue); } } + if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "CSV" || queryParameter.collectionFormat === "Pipes")) { + queryParameterValue = queryParameterValue.join(delimiter2); + } + result.set(queryParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter), queryParameterValue); + } + } + } + return { + queryParams: result, + sequenceParams + }; + } + function simpleParseQueryParams(queryString) { + const result = /* @__PURE__ */ new Map(); + if (!queryString || queryString[0] !== "?") { + return result; + } + queryString = queryString.slice(1); + const pairs = queryString.split("&"); + for (const pair of pairs) { + const [name, value] = pair.split("=", 2); + const existingValue = result.get(name); + if (existingValue) { + if (Array.isArray(existingValue)) { + existingValue.push(value); + } else { + result.set(name, [existingValue, value]); + } + } else { + result.set(name, value); + } + } + return result; + } + function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + if (queryParams.size === 0) { + return url; + } + const parsedUrl = new URL(url); + const combinedParams = simpleParseQueryParams(parsedUrl.search); + for (const [name, value] of queryParams) { + const existingValue = combinedParams.get(name); + if (Array.isArray(existingValue)) { + if (Array.isArray(value)) { + existingValue.push(...value); + const valueSet = new Set(existingValue); + combinedParams.set(name, Array.from(valueSet)); + } else { + existingValue.push(value); } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); + } else if (existingValue) { + if (Array.isArray(value)) { + value.unshift(existingValue); + } else if (sequenceParams.has(name)) { + combinedParams.set(name, [existingValue, value]); + } + if (!noOverwrite) { + combinedParams.set(name, value); + } + } else { + combinedParams.set(name, value); + } + } + const searchPieces = []; + for (const [name, value] of combinedParams) { + if (typeof value === "string") { + searchPieces.push(`${name}=${value}`); + } else if (Array.isArray(value)) { + for (const subValue of value) { + searchPieces.push(`${name}=${subValue}`); } - val += 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]]); + searchPieces.push(`${name}=${value}`); + } + } + parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return parsedUrl.toString(); + } + } +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/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_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-client"); + } +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/serviceClient.js +var require_serviceClient = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/serviceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils4(); + var httpClientCache_js_1 = require_httpClientCache(); + var operationHelpers_js_1 = require_operationHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); + var interfaceHelpers_js_1 = require_interfaceHelpers(); + var log_js_1 = require_log5(); + var ServiceClient = class { + /** + * The ServiceClient constructor + * @param options - The service client options that govern the behavior of the client. + */ + constructor(options2 = {}) { + var _a, _b; + this._requestContentType = options2.requestContentType; + this._endpoint = (_a = options2.endpoint) !== null && _a !== void 0 ? _a : options2.baseUri; + if (options2.baseUri) { + log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); + } + this._allowInsecureConnection = options2.allowInsecureConnection; + this._httpClient = options2.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); + this.pipeline = options2.pipeline || createDefaultPipeline(options2); + if ((_b = options2.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + for (const { policy, position } of options2.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + this.pipeline.addPolicy(policy, { + afterPhase + }); + } + } + } + /** + * Send the provided httpRequest. + */ + async sendRequest(request) { + return this.pipeline.sendRequest(this._httpClient, request); + } + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @typeParam T - The typed result of the request, based on the OperationSpec. + * @param operationArguments - The arguments that the HTTP request's templated values will be populated from. + * @param operationSpec - The OperationSpec to use to populate the httpRequest. + */ + async sendOperationRequest(operationArguments, operationSpec) { + const endpoint = operationSpec.baseUrl || this._endpoint; + if (!endpoint) { + throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); + } + const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const request = (0, core_rest_pipeline_1.createPipelineRequest)({ + url + }); + request.method = operationSpec.httpMethod; + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + operationInfo.operationSpec = operationSpec; + operationInfo.operationArguments = operationArguments; + const contentType = operationSpec.contentType || this._requestContentType; + if (contentType && operationSpec.requestBody) { + request.headers.set("Content-Type", contentType); + } + const options2 = operationArguments.options; + if (options2) { + const requestOptions = options2.requestOptions; + if (requestOptions) { + if (requestOptions.timeout) { + request.timeout = requestOptions.timeout; + } + if (requestOptions.onUploadProgress) { + request.onUploadProgress = requestOptions.onUploadProgress; + } + if (requestOptions.onDownloadProgress) { + request.onDownloadProgress = requestOptions.onDownloadProgress; + } + if (requestOptions.shouldDeserialize !== void 0) { + operationInfo.shouldDeserialize = requestOptions.shouldDeserialize; + } + if (requestOptions.allowInsecureConnection) { + request.allowInsecureConnection = true; + } + } + if (options2.abortSignal) { + request.abortSignal = options2.abortSignal; + } + if (options2.tracingOptions) { + request.tracingOptions = options2.tracingOptions; + } + } + if (this._allowInsecureConnection) { + request.allowInsecureConnection = true; + } + if (request.streamResponseStatusCodes === void 0) { + request.streamResponseStatusCodes = (0, interfaceHelpers_js_1.getStreamingResponseStatusCodes)(operationSpec); + } + try { + const rawResponse = await this.sendRequest(request); + const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); + if (options2 === null || options2 === void 0 ? void 0 : options2.onResponse) { + options2.onResponse(rawResponse, flatResponse); + } + return flatResponse; + } catch (error3) { + if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : 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 (options2 === null || options2 === void 0 ? void 0 : options2.onResponse) { + options2.onResponse(rawResponse, flatResponse, error3); } - } else { - val += this.processTextOrObjNode(jObj[key], key, level, ajPath); } + throw error3; } } - return { attrStr, val }; }; - Builder.prototype.buildAttrPairStr = function(attrName, val) { - val = this.options.attributeValueProcessor(attrName, "" + val); - val = this.replaceEntitiesValue(val); - if (this.options.suppressBooleanAttributes && val === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val + '"'; + exports2.ServiceClient = ServiceClient; + function createDefaultPipeline(options2) { + const credentialScopes = getCredentialScopes(options2); + const credentialOptions = options2.credential && credentialScopes ? { credentialScopes, credential: options2.credential } : void 0; + return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options2), { credentialOptions })); + } + function getCredentialScopes(options2) { + if (options2.credentialScopes) { + return options2.credentialScopes; + } + if (options2.endpoint) { + return `${options2.endpoint}/.default`; + } + if (options2.baseUri) { + return `${options2.baseUri}/.default`; + } + if (options2.credential && !options2.credentialScopes) { + throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`); + } + return void 0; + } + } +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js +var require_authorizeRequestOnClaimChallenge = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log5(); + 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), {}); + }); + } + async function authorizeRequestOnClaimChallenge(onChallengeOptions) { + var _a; + const { scopes, response } = onChallengeOptions; + const logger = onChallengeOptions.logger || log_js_1.logger; + const challenge = response.headers.get("WWW-Authenticate"); + if (!challenge) { + logger.info(`The WWW-Authenticate header was missing. Failed to perform the Continuous Access Evaluation authentication flow.`); + return false; + } + const challenges = parseCAEChallenge(challenge) || []; + const parsedChallenge = challenges.find((x) => x.claims); + if (!parsedChallenge) { + logger.info(`The WWW-Authenticate header was missing the necessary "claims" to perform the Continuous Access Evaluation authentication flow.`); + return false; + } + const accessToken = await onChallengeOptions.getAccessToken(parsedChallenge.scope ? [parsedChallenge.scope] : scopes, { + claims: (0, base64_js_1.decodeStringToString)(parsedChallenge.claims) + }); + if (!accessToken) { + return false; + } + onChallengeOptions.request.headers.set("Authorization", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); + return true; + } + } +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnTenantChallenge.js +var require_authorizeRequestOnTenantChallenge = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnTenantChallenge.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.authorizeRequestOnTenantChallenge = void 0; + var Constants = { + DefaultScope: "/.default", + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + */ + AUTHORIZATION: "authorization" + } + }; + function isUuid(text) { + return /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(text); + } + var authorizeRequestOnTenantChallenge = async (challengeOptions) => { + var _a; + const requestOptions = requestToOptions(challengeOptions.request); + const challenge = getChallenge(challengeOptions.response); + if (challenge) { + const challengeInfo = parseChallenge(challenge); + const challengeScopes = buildScopes(challengeOptions, challengeInfo); + const tenantId = extractTenantId(challengeInfo); + if (!tenantId) { + return false; + } + const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + if (!accessToken) { + return false; + } + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); + return true; + } + return false; }; - Builder.prototype.buildObjectNode = function(val, key, attrStr, level) { - if (val === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; + exports2.authorizeRequestOnTenantChallenge = authorizeRequestOnTenantChallenge; + function extractTenantId(challengeInfo) { + const parsedAuthUri = new URL(challengeInfo.authorization_uri); + const pathSegments = parsedAuthUri.pathname.split("/"); + const tenantId = pathSegments[1]; + if (tenantId && isUuid(tenantId)) { + return tenantId; + } + return void 0; + } + function buildScopes(challengeOptions, challengeInfo) { + if (!challengeInfo.resource_id) { + return challengeOptions.scopes; + } + const challengeScopes = new URL(challengeInfo.resource_id); + challengeScopes.pathname = Constants.DefaultScope; + let scope = challengeScopes.toString(); + if (scope === "https://disk.azure.com/.default") { + scope = "https://disk.azure.com//.default"; + } + return [scope]; + } + function getChallenge(response) { + const challenge = response.headers.get("WWW-Authenticate"); + if (response.status === 401 && challenge) { + return challenge; + } + return; + } + function parseChallenge(challenge) { + 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), {}); + } + function requestToOptions(request) { + return { + abortSignal: request.abortSignal, + requestOptions: { + timeout: request.timeout + }, + tracingOptions: request.tracingOptions + }; + } + } +}); + +// node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/index.js +var require_commonjs8 = __commonJS({ + "node_modules/.pnpm/@azure+core-client@1.10.0/node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.authorizeRequestOnTenantChallenge = exports2.authorizeRequestOnClaimChallenge = exports2.serializationPolicyName = exports2.serializationPolicy = exports2.deserializationPolicyName = exports2.deserializationPolicy = exports2.XML_CHARKEY = exports2.XML_ATTRKEY = exports2.createClientPipeline = exports2.ServiceClient = exports2.MapperTypeNames = exports2.createSerializer = void 0; + var serializer_js_1 = require_serializer(); + Object.defineProperty(exports2, "createSerializer", { enumerable: true, get: function() { + return serializer_js_1.createSerializer; + } }); + Object.defineProperty(exports2, "MapperTypeNames", { enumerable: true, get: function() { + return serializer_js_1.MapperTypeNames; + } }); + var serviceClient_js_1 = require_serviceClient(); + Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { + return serviceClient_js_1.ServiceClient; + } }); + var pipeline_js_1 = require_pipeline3(); + Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createClientPipeline; + } }); + var interfaces_js_1 = require_interfaces(); + Object.defineProperty(exports2, "XML_ATTRKEY", { enumerable: true, get: function() { + return interfaces_js_1.XML_ATTRKEY; + } }); + Object.defineProperty(exports2, "XML_CHARKEY", { enumerable: true, get: function() { + return interfaces_js_1.XML_CHARKEY; + } }); + var deserializationPolicy_js_1 = require_deserializationPolicy(); + Object.defineProperty(exports2, "deserializationPolicy", { enumerable: true, get: function() { + return deserializationPolicy_js_1.deserializationPolicy; + } }); + Object.defineProperty(exports2, "deserializationPolicyName", { enumerable: true, get: function() { + return deserializationPolicy_js_1.deserializationPolicyName; + } }); + var serializationPolicy_js_1 = require_serializationPolicy(); + Object.defineProperty(exports2, "serializationPolicy", { enumerable: true, get: function() { + return serializationPolicy_js_1.serializationPolicy; + } }); + Object.defineProperty(exports2, "serializationPolicyName", { enumerable: true, get: function() { + return serializationPolicy_js_1.serializationPolicyName; + } }); + var authorizeRequestOnClaimChallenge_js_1 = require_authorizeRequestOnClaimChallenge(); + Object.defineProperty(exports2, "authorizeRequestOnClaimChallenge", { enumerable: true, get: function() { + return authorizeRequestOnClaimChallenge_js_1.authorizeRequestOnClaimChallenge; + } }); + var authorizeRequestOnTenantChallenge_js_1 = require_authorizeRequestOnTenantChallenge(); + Object.defineProperty(exports2, "authorizeRequestOnTenantChallenge", { enumerable: true, get: function() { + return authorizeRequestOnTenantChallenge_js_1.authorizeRequestOnTenantChallenge; + } }); + } +}); + +// node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/util.js +var require_util9 = __commonJS({ + "node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); + var originalRequestSymbol = Symbol("Original PipelineRequest"); + var originalClientRequestSymbol = Symbol.for("@azure/core-client original request"); + function toPipelineRequest(webResource, options2 = {}) { + const compatWebResource = webResource; + const request = compatWebResource[originalRequestSymbol]; + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(webResource.headers.toJson({ preserveCase: true })); + if (request) { + request.headers = headers; + return request; + } else { + const newRequest = (0, core_rest_pipeline_1.createPipelineRequest)({ + url: webResource.url, + method: webResource.method, + headers, + withCredentials: webResource.withCredentials, + timeout: webResource.timeout, + requestId: webResource.requestId, + abortSignal: webResource.abortSignal, + body: webResource.body, + formData: webResource.formData, + disableKeepAlive: !!webResource.keepAlive, + onDownloadProgress: webResource.onDownloadProgress, + onUploadProgress: webResource.onUploadProgress, + proxySettings: webResource.proxySettings, + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides + }); + if (options2.originalRequest) { + newRequest[originalClientRequestSymbol] = options2.originalRequest; + } + return newRequest; + } + } + function toWebResourceLike(request, options2) { + var _a; + const originalRequest = (_a = options2 === null || options2 === void 0 ? void 0 : options2.originalRequest) !== null && _a !== void 0 ? _a : request; + const webResource = { + url: request.url, + method: request.method, + headers: toHttpHeadersLike(request.headers), + withCredentials: request.withCredentials, + timeout: request.timeout, + requestId: request.headers.get("x-ms-client-request-id") || request.requestId, + abortSignal: request.abortSignal, + body: request.body, + formData: request.formData, + keepAlive: !!request.disableKeepAlive, + onDownloadProgress: request.onDownloadProgress, + 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"); + }, + prepare() { + throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat"); + }, + validateRequestProperties() { } + }; + if (options2 === null || options2 === void 0 ? void 0 : options2.createProxy) { + return new Proxy(webResource, { + get(target, prop, receiver) { + if (prop === originalRequestSymbol) { + return request; + } else if (prop === "clone") { + return () => { + return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), { + createProxy: true, + originalRequest + }); + }; + } + return Reflect.get(target, prop, receiver); + }, + set(target, prop, value, receiver) { + if (prop === "keepAlive") { + request.disableKeepAlive = !value; + } + const passThroughProps = [ + "url", + "method", + "withCredentials", + "timeout", + "requestId", + "abortSignal", + "body", + "formData", + "onDownloadProgress", + "onUploadProgress", + "proxySettings", + "streamResponseStatusCodes", + "agent", + "requestOverrides" + ]; + if (typeof prop === "string" && passThroughProps.includes(prop)) { + request[prop] = value; + } + return Reflect.set(target, prop, value, receiver); + } + }); } else { - let tagEndExp = "" + val + 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 + val + this.indentate(level) + tagEndExp; + return webResource; + } + } + function toHttpHeadersLike(headers) { + return new HttpHeaders(headers.toJSON({ preserveCase: true })); + } + function getHeaderKey(headerName) { + return headerName.toLowerCase(); + } + var HttpHeaders = class _HttpHeaders { + constructor(rawHeaders) { + this._headersMap = {}; + if (rawHeaders) { + for (const headerName in rawHeaders) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName - The name of the header to set. This value is case-insensitive. + * @param headerValue - The value of the header to set. + */ + set(headerName, headerValue) { + this._headersMap[getHeaderKey(headerName)] = { + name: headerName, + value: headerValue.toString() + }; + } + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName - The name of the header. + */ + get(headerName) { + const header = this._headersMap[getHeaderKey(headerName)]; + return !header ? void 0 : header.value; + } + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + contains(headerName) { + return !!this._headersMap[getHeaderKey(headerName)]; + } + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName - The name of the header to remove. + */ + remove(headerName) { + const result = this.contains(headerName); + delete this._headersMap[getHeaderKey(headerName)]; + return result; + } + /** + * Get the headers that are contained this collection as an object. + */ + rawHeaders() { + return this.toJson({ preserveCase: true }); + } + /** + * Get the headers that are contained in this collection as an array. + */ + headersArray() { + const headers = []; + for (const headerKey in this._headersMap) { + headers.push(this._headersMap[headerKey]); + } + return headers; + } + /** + * Get the header names that are contained in this collection. + */ + headerNames() { + const headerNames = []; + const headers = this.headersArray(); + for (let i = 0; i < headers.length; ++i) { + headerNames.push(headers[i].name); + } + return headerNames; + } + /** + * Get the header values that are contained in this collection. + */ + headerValues() { + const headerValues = []; + const headers = this.headersArray(); + for (let i = 0; i < headers.length; ++i) { + headerValues.push(headers[i].value); + } + return headerValues; + } + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJson(options2 = {}) { + const result = {}; + if (options2.preserveCase) { + for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + result[header.name] = header.value; + } + } else { + for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + result[getHeaderKey(header.name)] = header.value; + } + } + return result; + } + /** + * Get the string representation of this HTTP header collection. + */ + toString() { + return JSON.stringify(this.toJson({ preserveCase: true })); + } + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + clone() { + const resultPreservingCasing = {}; + for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + resultPreservingCasing[header.name] = header.value; + } + return new _HttpHeaders(resultPreservingCasing); + } + }; + exports2.HttpHeaders = HttpHeaders; + } +}); + +// node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/response.js +var require_response2 = __commonJS({ + "node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var util_js_1 = require_util9(); + var originalResponse = Symbol("Original FullOperationResponse"); + function toCompatResponse(response, options2) { + let request = (0, util_js_1.toWebResourceLike)(response.request); + let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); + if (options2 === null || options2 === void 0 ? void 0 : options2.createProxy) { + return new Proxy(response, { + get(target, prop, receiver) { + if (prop === "headers") { + return headers; + } else if (prop === "request") { + return request; + } else if (prop === originalResponse) { + return response; + } + return Reflect.get(target, prop, receiver); + }, + set(target, prop, value, receiver) { + if (prop === "headers") { + headers = value; + } else if (prop === "request") { + request = value; + } + return Reflect.set(target, prop, value, receiver); + } + }); + } else { + return Object.assign(Object.assign({}, response), { + request, + headers + }); + } + } + function toPipelineResponse(compatResponse) { + const extendedCompatResponse = compatResponse; + const response = extendedCompatResponse[originalResponse]; + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(compatResponse.headers.toJson({ preserveCase: true })); + if (response) { + response.headers = headers; + return response; + } else { + return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + } + } + } +}); + +// node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js +var require_extendedClient = __commonJS({ + "node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExtendedServiceClient = void 0; + var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); + 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(options2) { + var _a, _b; + super(options2); + if (((_a = options2.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); + } + if (((_b = options2.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + this.pipeline.removePolicy({ + name: core_rest_pipeline_1.redirectPolicyName + }); + } + } + /** + * Compatible send operation request function. + * + * @param operationArguments - Operation arguments + * @param operationSpec - Operation Spec + * @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; + let lastResponse; + function onResponse(rawResponse, flatResponse, error3) { + lastResponse = rawResponse; + if (userProvidedCallBack) { + userProvidedCallBack(rawResponse, flatResponse, error3); + } + } + operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + const result = await super.sendOperationRequest(operationArguments, operationSpec); + if (lastResponse) { + Object.defineProperty(result, "_response", { + value: (0, response_js_1.toCompatResponse)(lastResponse) + }); + } + return result; + } + }; + exports2.ExtendedServiceClient = ExtendedServiceClient; + } +}); + +// node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js +var require_requestPolicyFactoryPolicy = __commonJS({ + "node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; + var util_js_1 = require_util9(); + var response_js_1 = require_response2(); + var HttpPipelineLogLevel; + (function(HttpPipelineLogLevel2) { + HttpPipelineLogLevel2[HttpPipelineLogLevel2["ERROR"] = 1] = "ERROR"; + HttpPipelineLogLevel2[HttpPipelineLogLevel2["INFO"] = 3] = "INFO"; + HttpPipelineLogLevel2[HttpPipelineLogLevel2["OFF"] = 0] = "OFF"; + HttpPipelineLogLevel2[HttpPipelineLogLevel2["WARNING"] = 2] = "WARNING"; + })(HttpPipelineLogLevel || (exports2.HttpPipelineLogLevel = HttpPipelineLogLevel = {})); + var mockRequestPolicyOptions = { + log(_logLevel, _message) { + }, + shouldLog(_logLevel) { + return false; + } + }; + exports2.requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy"; + function createRequestPolicyFactoryPolicy(factories) { + const orderedFactories = factories.slice().reverse(); + return { + name: exports2.requestPolicyFactoryPolicyName, + async sendRequest(request, next) { + let httpPipeline = { + async sendRequest(httpRequest) { + const response2 = await next((0, util_js_1.toPipelineRequest)(httpRequest)); + return (0, response_js_1.toCompatResponse)(response2, { createProxy: true }); + } + }; + for (const factory of orderedFactories) { + httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions); + } + const webResourceLike = (0, util_js_1.toWebResourceLike)(request, { createProxy: true }); + const response = await httpPipeline.sendRequest(webResourceLike); + return (0, response_js_1.toPipelineResponse)(response); + } + }; + } + } +}); + +// node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js +var require_httpClientAdapter = __commonJS({ + "node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.convertHttpClient = convertHttpClient; + var response_js_1 = require_response2(); + var util_js_1 = require_util9(); + function convertHttpClient(requestPolicyClient) { + return { + sendRequest: async (request) => { + const response = await requestPolicyClient.sendRequest((0, util_js_1.toWebResourceLike)(request, { createProxy: true })); + return (0, response_js_1.toPipelineResponse)(response); + } + }; + } + } +}); + +// node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/index.js +var require_commonjs9 = __commonJS({ + "node_modules/.pnpm/@azure+core-http-compat@2.3.0/node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toHttpHeadersLike = exports2.convertHttpClient = exports2.disableKeepAlivePolicyName = exports2.HttpPipelineLogLevel = exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.ExtendedServiceClient = void 0; + var extendedClient_js_1 = require_extendedClient(); + Object.defineProperty(exports2, "ExtendedServiceClient", { enumerable: true, get: function() { + return extendedClient_js_1.ExtendedServiceClient; + } }); + var requestPolicyFactoryPolicy_js_1 = require_requestPolicyFactoryPolicy(); + Object.defineProperty(exports2, "requestPolicyFactoryPolicyName", { enumerable: true, get: function() { + return requestPolicyFactoryPolicy_js_1.requestPolicyFactoryPolicyName; + } }); + Object.defineProperty(exports2, "createRequestPolicyFactoryPolicy", { enumerable: true, get: function() { + return requestPolicyFactoryPolicy_js_1.createRequestPolicyFactoryPolicy; + } }); + Object.defineProperty(exports2, "HttpPipelineLogLevel", { enumerable: true, get: function() { + return requestPolicyFactoryPolicy_js_1.HttpPipelineLogLevel; + } }); + var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); + Object.defineProperty(exports2, "disableKeepAlivePolicyName", { enumerable: true, get: function() { + return disableKeepAlivePolicy_js_1.disableKeepAlivePolicyName; + } }); + var httpClientAdapter_js_1 = require_httpClientAdapter(); + Object.defineProperty(exports2, "convertHttpClient", { enumerable: true, get: function() { + return httpClientAdapter_js_1.convertHttpClient; + } }); + var util_js_1 = require_util9(); + Object.defineProperty(exports2, "toHttpHeadersLike", { enumerable: true, get: function() { + return util_js_1.toHttpHeadersLike; + } }); + } +}); + +// node_modules/.pnpm/fast-xml-parser@5.2.5/node_modules/fast-xml-parser/lib/fxp.cjs +var require_fxp = __commonJS({ + "node_modules/.pnpm/fast-xml-parser@5.2.5/node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + "use strict"; + (() => { + "use strict"; + var t = { d: (e2, n2) => { + for (var i2 in n2) t.o(n2, i2) && !t.o(e2, i2) && Object.defineProperty(e2, i2, { enumerable: true, get: n2[i2] }); + }, 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: () => ft, XMLParser: () => st, XMLValidator: () => mt }); + const n = ":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", i = new RegExp("^[" + n + "][" + n + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const n2 = []; + let i2 = e2.exec(t2); + for (; i2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - i2[0].length; + const r2 = i2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(i2[t3]); + n2.push(s2), i2 = e2.exec(t2); + } + return n2; + } + const r = function(t2) { + return !(null == i.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const n2 = []; + let i2 = 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.", N(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let f2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) f2 += t2[o2]; + if (f2 = f2.trim(), "/" === f2[f2.length - 1] && (f2 = f2.substring(0, f2.length - 1), o2--), !r(f2)) { + let e3; + return e3 = 0 === f2.trim().length ? "Invalid space after '<'." : "Tag '" + f2 + "' is an invalid name.", x("InvalidTag", e3, N(t2, o2)); + } + const p2 = c(t2, o2); + if (false === p2) return x("InvalidAttr", "Attributes for '" + f2 + "' have open quote.", N(t2, o2)); + let b2 = p2.value; + if (o2 = p2.index, "/" === b2[b2.length - 1]) { + const n3 = o2 - b2.length; + b2 = b2.substring(0, b2.length - 1); + const s3 = g(b2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, N(t2, n3 + s3.err.line)); + i2 = true; + } else if (d2) { + if (!p2.tagClosed) return x("InvalidTag", "Closing tag '" + f2 + "' doesn't have proper closing.", N(t2, o2)); + if (b2.trim().length > 0) return x("InvalidTag", "Closing tag '" + f2 + "' can't have attributes or invalid starting.", N(t2, a2)); + if (0 === n2.length) return x("InvalidTag", "Closing tag '" + f2 + "' has not been opened.", N(t2, a2)); + { + const e3 = n2.pop(); + if (f2 !== e3.tagName) { + let n3 = N(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + n3.line + ", col " + n3.col + ") instead of closing tag '" + f2 + "'.", N(t2, a2)); + } + 0 == n2.length && (s2 = true); + } + } else { + const r2 = g(b2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, N(t2, o2 - b2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", N(t2, o2)); + -1 !== e2.unpairedTags.indexOf(f2) || n2.push({ tagName: f2, tagStartPos: a2 }), i2 = 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.", N(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", N(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return i2 ? 1 == n2.length ? x("InvalidTag", "Unclosed tag '" + n2[0].tagName + "'.", N(t2, n2[0].tagStartPos)) : !(n2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(n2.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 n2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const i2 = t2.substr(n2, e2 - n2); + if (e2 > 5 && "xml" === i2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", N(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 n2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) n2++; + else if (">" === t2[e2] && (n2--, 0 === n2)) 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 = '"', f = "'"; + function c(t2, e2) { + let n2 = "", i2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === f) "" === i2 ? i2 = t2[e2] : i2 !== t2[e2] || (i2 = ""); + else if (">" === t2[e2] && "" === i2) { + s2 = true; + break; + } + n2 += t2[e2]; + } + return "" === i2 && { value: n2, index: e2, tagClosed: s2 }; + } + const p = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const n2 = s(t2, p), i2 = {}; + for (let t3 = 0; t3 < n2.length; t3++) { + if (0 === n2[t3][1].length) return x("InvalidAttr", "Attribute '" + n2[t3][2] + "' has no space in starting.", E(n2[t3])); + if (void 0 !== n2[t3][3] && void 0 === n2[t3][4]) return x("InvalidAttr", "Attribute '" + n2[t3][2] + "' is without value.", E(n2[t3])); + if (void 0 === n2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + n2[t3][2] + "' is not allowed.", E(n2[t3])); + const s2 = n2[t3][2]; + if (!b(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(n2[t3])); + if (i2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(n2[t3])); + i2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return function(t3, e3) { + let n3 = /\d/; + for ("x" === t3[e3] && (e3++, n3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(n3)) break; + } + return -1; + }(t2, ++e2); + let n2 = 0; + for (; e2 < t2.length; e2++, n2++) if (!(t2[e2].match(/\w/) && n2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, n2) { + return { err: { code: t2, msg: e2, line: n2.line || n2, col: n2.col } }; + } + function b(t2) { + return r(t2); + } + function N(t2, e2) { + const n2 = t2.substring(0, e2).split(/\r?\n/); + return { line: n2.length, col: n2[n2.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, n2) { + return t2; + }, captureMetaData: false }; + let y; + y = "function" != typeof Symbol ? "@@xmlMetadata" : Symbol("XML Node Metadata"); + class T { + 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][y] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return y; + } + } + function w(t2, e2) { + const n2 = {}; + 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 i2 = 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, i2--) : i2--, 0 === i2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && C(t2, "!ENTITY", e2)) { + let i3, s3; + e2 += 7, [i3, s3, e2] = O(t2, e2 + 1), -1 === s3.indexOf("&") && (n2[i3] = { regx: RegExp(`&${i3};`, "g"), val: s3 }); + } else if (s2 && C(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: n3 } = S(t2, e2 + 1); + e2 = n3; + } else if (s2 && C(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && C(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: n3 } = A(t2, e2 + 1); + e2 = n3; + } else { + if (!C(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + i2++, o2 = ""; + } + if (0 !== i2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: n2, i: e2 }; + } + const P = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function O(t2, e2) { + e2 = P(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) n2 += t2[e2], e2++; + if ($(n2), e2 = P(t2, e2), "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 i2 = ""; + return [e2, i2] = I(t2, e2, "entity"), [n2, i2, --e2]; + } + function A(t2, e2) { + e2 = P(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + $(n2), e2 = P(t2, e2); + const i2 = t2.substring(e2, e2 + 6).toUpperCase(); + if ("SYSTEM" !== i2 && "PUBLIC" !== i2) throw new Error(`Expected SYSTEM or PUBLIC, found "${i2}"`); + e2 += i2.length, e2 = P(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === i2) [e2, s2] = I(t2, e2, "publicIdentifier"), '"' !== t2[e2 = P(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = I(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === i2 && ([e2, r2] = I(t2, e2, "systemIdentifier"), !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: n2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + function I(t2, e2, n2) { + let i2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) i2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${n2} value`); + return [++e2, i2]; + } + function S(t2, e2) { + e2 = P(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!$(n2)) throw new Error(`Invalid element name: "${n2}"`); + let i2 = ""; + if ("E" === t2[e2 = P(t2, e2)] && C(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && C(t2, "NY", e2)) e2 += 2; + else { + if ("(" !== t2[e2]) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) i2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } + return { elementName: n2, contentModel: i2.trim(), index: e2 }; + } + function C(t2, e2, n2) { + for (let i2 = 0; i2 < e2.length; i2++) if (e2[i2] !== t2[n2 + i2 + 1]) return false; + return true; + } + function $(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const j = /^[-+]?0x[a-fA-F0-9]+$/, D = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, V = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const M = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function _(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const n2 of t2) { + if ("string" == typeof n2 && e2 === n2) return true; + if (n2 instanceof RegExp && n2.test(e2)) return true; + } + } : () => false; + } + class k { + constructor(t2) { + 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 = F, this.parseXml = X, this.parseTextData = L, this.resolveNameSpace = B, this.buildAttributesMap = G, this.isItStopNode = Z, this.replaceEntitiesValue = R, this.readStopNodeData = J, this.saveTextToParentTag = q, this.addChild = Y, this.ignoreAttributesFn = _(this.options.ignoreAttributes); + } + } + function F(t2) { + const e2 = Object.keys(t2); + for (let n2 = 0; n2 < e2.length; n2++) { + const i2 = e2[n2]; + this.lastEntities[i2] = { regex: new RegExp("&" + i2 + ";", "g"), val: t2[i2] }; + } + } + function L(t2, e2, n2, i2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !i2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const i3 = this.options.tagValueProcessor(e2, t2, n2, s2, r2); + return null == i3 ? t2 : typeof i3 != typeof t2 || i3 !== t2 ? i3 : this.options.trimValues || t2.trim() === t2 ? H(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function B(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), n2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = n2 + e2[1]); + } + return t2; + } + const U = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function G(t2, e2, n2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const n3 = s(t2, U), i2 = n3.length, r2 = {}; + for (let t3 = 0; t3 < i2; t3++) { + const i3 = this.resolveNameSpace(n3[t3][1]); + if (this.ignoreAttributesFn(i3, e2)) continue; + let s2 = n3[t3][4], o2 = this.options.attributeNamePrefix + i3; + if (i3.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(i3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : H(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 X = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new T("!xml"); + let n2 = e2, i2 = "", s2 = ""; + for (let r2 = 0; r2 < t2.length; r2++) if ("<" === t2[r2]) if ("/" === t2[r2 + 1]) { + const e3 = W(t2, ">", r2, "Closing Tag is not closed."); + let o2 = t2.substring(r2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = o2.indexOf(":"); + -1 !== t3 && (o2 = o2.substr(t3 + 1)); + } + this.options.transformTagName && (o2 = this.options.transformTagName(o2)), n2 && (i2 = this.saveTextToParentTag(i2, n2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (o2 && -1 !== this.options.unpairedTags.indexOf(o2)) 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), n2 = this.tagsNodeStack.pop(), i2 = "", r2 = e3; + } else if ("?" === t2[r2 + 1]) { + let e3 = z(t2, r2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (i2 = this.saveTextToParentTag(i2, n2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new T(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2, e3.tagName)), this.addChild(n2, t3, s2, r2); + } + r2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(r2 + 1, 3)) { + const e3 = W(t2, "-->", r2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const o2 = t2.substring(r2 + 4, e3 - 2); + i2 = this.saveTextToParentTag(i2, n2, s2), n2.add(this.options.commentPropName, [{ [this.options.textNodeName]: o2 }]); + } + r2 = e3; + } else if ("!D" === t2.substr(r2 + 1, 2)) { + const e3 = w(t2, r2); + this.docTypeEntities = e3.entities, r2 = e3.i; + } else if ("![" === t2.substr(r2 + 1, 2)) { + const e3 = W(t2, "]]>", r2, "CDATA is not closed.") - 2, o2 = t2.substring(r2 + 9, e3); + i2 = this.saveTextToParentTag(i2, n2, s2); + let a2 = this.parseTextData(o2, n2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? n2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o2 }]) : n2.add(this.options.textNodeName, a2), r2 = e3 + 2; + } else { + let o2 = z(t2, r2, this.options.removeNSPrefix), a2 = o2.tagName; + const l2 = o2.rawTagName; + let u2 = o2.tagExp, h2 = o2.attrExpPresent, d2 = o2.closeIndex; + this.options.transformTagName && (a2 = this.options.transformTagName(a2)), n2 && i2 && "!xml" !== n2.tagname && (i2 = this.saveTextToParentTag(i2, n2, s2, false)); + const f2 = n2; + f2 && -1 !== this.options.unpairedTags.indexOf(f2.tagname) && (n2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const c2 = r2; + if (this.isItStopNode(this.options.stopNodes, 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), r2 = o2.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) r2 = o2.closeIndex; + else { + const n3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!n3) throw new Error(`Unexpected end of ${l2}`); + r2 = n3.i, e3 = n3.tagContent; + } + const i3 = new T(a2); + a2 !== u2 && h2 && (i3[":@"] = this.buildAttributesMap(u2, s2, a2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), i3.add(this.options.textNodeName, e3), this.addChild(n2, i3, s2, c2); + } else { + 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), this.options.transformTagName && (a2 = this.options.transformTagName(a2)); + const t3 = new T(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, c2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new T(a2); + this.tagsNodeStack.push(n2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, c2), n2 = t3; + } + i2 = "", r2 = d2; + } + } + else i2 += t2[r2]; + return e2.child; + }; + function Y(t2, e2, n2, i2) { + this.options.captureMetaData || (i2 = void 0); + const s2 = this.options.updateTag(e2.tagname, n2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, i2)) : t2.addChild(e2, i2)); + } + const R = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const n2 = this.docTypeEntities[e2]; + t2 = t2.replace(n2.regx, n2.val); + } + for (let e2 in this.lastEntities) { + const n2 = this.lastEntities[e2]; + t2 = t2.replace(n2.regex, n2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const n2 = this.htmlEntities[e2]; + t2 = t2.replace(n2.regex, n2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function q(t2, e2, n2, i2) { + return t2 && (void 0 === i2 && (i2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, n2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, i2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Z(t2, e2, n2) { + const i2 = "*." + n2; + for (const n3 in t2) { + const s2 = t2[n3]; + if (i2 === s2 || e2 === s2) return true; + } + return false; + } + function W(t2, e2, n2, i2) { + const s2 = t2.indexOf(e2, n2); + if (-1 === s2) throw new Error(i2); + return s2 + e2.length - 1; + } + function z(t2, e2, n2, i2 = ">") { + const s2 = function(t3, e3, n3 = ">") { + let i3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (i3) e4 === i3 && (i3 = ""); + else if ('"' === e4 || "'" === e4) i3 = e4; + else if (e4 === n3[0]) { + if (!n3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === n3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + }(t2, e2 + 1, i2); + 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 (n2) { + 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 J(t2, e2, n2) { + const i2 = n2; + let s2 = 1; + for (; n2 < t2.length; n2++) if ("<" === t2[n2]) if ("/" === t2[n2 + 1]) { + const r2 = W(t2, ">", n2, `${e2} is not closed`); + if (t2.substring(n2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(i2, n2), i: r2 }; + n2 = r2; + } else if ("?" === t2[n2 + 1]) n2 = W(t2, "?>", n2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(n2 + 1, 3)) n2 = W(t2, "-->", n2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(n2 + 1, 2)) n2 = W(t2, "]]>", n2, "StopNode is not closed.") - 2; + else { + const i3 = z(t2, n2, ">"); + i3 && ((i3 && i3.tagName) === e2 && "/" !== i3.tagExp[i3.tagExp.length - 1] && s2++, n2 = i3.closeIndex); + } + } + function H(t2, e2, n2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && function(t3, e4 = {}) { + if (e4 = Object.assign({}, V, e4), !t3 || "string" != typeof t3) return t3; + let n3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(n3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && j.test(n3)) 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"); + }(n3); + if (-1 !== n3.search(/.+[eE].+/)) return function(t4, e5, n4) { + if (!n4.eNotation) return t4; + const i3 = e5.match(M); + if (i3) { + let s2 = i3[1] || ""; + const r2 = -1 === i3[3].indexOf("e") ? "E" : "e", o2 = i3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !i3[3].startsWith(`.${r2}`) && i3[3][0] !== r2 ? n4.leadingZeros && !a2 ? (e5 = (i3[1] || "") + i3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + }(t3, n3, e4); + { + const s2 = D.exec(n3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (i2 = s2[3]) && -1 !== i2.indexOf(".") ? ("." === (i2 = i2.replace(/0+$/, "")) ? i2 = "0" : "." === i2[0] ? i2 = "0" + i2 : "." === i2[i2.length - 1] && (i2 = i2.substring(0, i2.length - 1)), i2) : i2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const i3 = Number(n3), s3 = String(i3); + if (0 === i3 || -0 === i3) return i3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? i3 : t3; + if (-1 !== n3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? i3 : t3; + let l3 = o2 ? a2 : n3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? i3 : t3 : l3 === s3 || l3 === r2 + s3 ? i3 : t3; + } + } + return t3; + } + var i2; + }(t2, n2); + } + return void 0 !== t2 ? t2 : ""; + } + const K = T.getMetaDataSymbol(); + function Q(t2, e2) { + return tt(t2, e2); + } + function tt(t2, e2, n2) { + let i2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = et(o2); + let l2 = ""; + if (l2 = void 0 === n2 ? a2 : n2 + "." + a2, a2 === e2.textNodeName) void 0 === i2 ? i2 = o2[a2] : i2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = tt(o2[a2], e2, l2); + const n3 = it(t3, e2); + void 0 !== o2[K] && (t3[K] = o2[K]), o2[":@"] ? nt(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, n3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof i2 ? i2.length > 0 && (s2[e2.textNodeName] = i2) : void 0 !== i2 && (s2[e2.textNodeName] = i2), s2; + } + function et(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const n2 = e2[t3]; + if (":@" !== n2) return n2; + } + } + function nt(t2, e2, n2, i2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + i2.isArray(r3, n2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function it(t2, e2) { + const { textNodeName: n2 } = e2, i2 = Object.keys(t2).length; + return 0 === i2 || !(1 !== i2 || !t2[n2] && "boolean" != typeof t2[n2] && 0 !== t2[n2]); + } + class st { + constructor(t2) { + this.externalEntities = {}, this.options = function(t3) { + return Object.assign({}, v, t3); + }(t2); + } + parse(t2, e2) { + if ("string" == typeof t2) ; + else { + if (!t2.toString) throw new Error("XML data is accepted in String or Bytes[] form."); + t2 = t2.toString(); + } + if (e2) { + true === e2 && (e2 = {}); + const n3 = a(t2, e2); + if (true !== n3) throw Error(`${n3.err.msg}:${n3.err.line}:${n3.err.col}`); + } + const n2 = new k(this.options); + n2.addExternalEntities(this.externalEntities); + const i2 = n2.parseXml(t2); + return this.options.preserveOrder || void 0 === i2 ? i2 : Q(i2, 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 T.getMetaDataSymbol(); + } + } + function rt(t2, e2) { + let n2 = ""; + return e2.format && e2.indentBy.length > 0 && (n2 = "\n"), ot(t2, e2, "", n2); + } + function ot(t2, e2, n2, i2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = at(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === n2.length ? l2 : `${n2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + ut(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ht(t3, e2)), r2 && (s2 += i2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += i2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += i2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = lt(a2[":@"], e2), n3 = "?xml" === l2 ? "" : i2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += n3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = i2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = i2 + `<${l2}${lt(a2[":@"], e2)}`, f2 = ot(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : f2 && 0 !== f2.length || !e2.suppressEmptyNode ? f2 && f2.endsWith(">") ? s2 += d2 + `>${f2}${i2}` : (s2 += d2 + ">", f2 && "" !== i2 && (f2.includes("/>") || f2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function at(t2) { + const e2 = Object.keys(t2); + for (let n2 = 0; n2 < e2.length; n2++) { + const i2 = e2[n2]; + if (t2.hasOwnProperty(i2) && ":@" !== i2) return i2; + } + } + function lt(t2, e2) { + let n2 = ""; + if (t2 && !e2.ignoreAttributes) for (let i2 in t2) { + if (!t2.hasOwnProperty(i2)) continue; + let s2 = e2.attributeValueProcessor(i2, t2[i2]); + s2 = ht(s2, e2), true === s2 && e2.suppressBooleanAttributes ? n2 += ` ${i2.substr(e2.attributeNamePrefix.length)}` : n2 += ` ${i2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return n2; + } + function ut(t2, e2) { + let n2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let i2 in e2.stopNodes) if (e2.stopNodes[i2] === t2 || e2.stopNodes[i2] === "*." + n2) return true; + return false; + } + function ht(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let n2 = 0; n2 < e2.entities.length; n2++) { + const i2 = e2.entities[n2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + } + const dt = { 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 ft(t2) { + this.options = Object.assign({}, dt, 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 = gt), this.processTextOrObjNode = ct, this.options.format ? (this.indentate = pt, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ct(t2, e2, n2, i2) { + const s2 = this.j2x(t2, n2 + 1, i2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, n2) : this.buildObjectNode(s2.val, e2, s2.attrStr, n2); + } + function pt(t2) { + return this.options.indentBy.repeat(t2); + } + function gt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + ft.prototype.build = function(t2) { + return this.options.preserveOrder ? rt(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, ft.prototype.j2x = function(t2, e2, n2) { + let i2 = "", s2 = ""; + const r2 = n2.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 n3 = this.isAttribute(o2); + if (n3 && !this.ignoreAttributesFn(n3, r2)) i2 += this.buildAttrPairStr(n3, "" + t2[o2]); + else if (!n3) 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 i3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < i3; l2++) { + const i4 = t2[o2][l2]; + if (void 0 === i4) ; + else if (null === i4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof i4) if (this.options.oneListGroup) { + const t3 = this.j2x(i4, e2 + 1, n2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && i4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(i4, o2, e2, n2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, i4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(i4, 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]), n3 = e3.length; + for (let s3 = 0; s3 < n3; s3++) i2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, n2); + return { attrStr: i2, val: s2 }; + }, ft.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, ft.prototype.buildObjectNode = function(t2, e2, n2, i2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(i2) + "<" + e2 + n2 + "?" + this.tagEndChar : this.indentate(i2) + "<" + e2 + n2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(i2) + "<" + e2 + n2 + r2 + this.tagEndChar + t2 + this.indentate(i2) + s2 : this.indentate(i2) + "<" + e2 + n2 + r2 + ">" + t2 + s2; + } + }, ft.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(i2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(i2) + "<" + e2 + n2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(i2) + "<" + e2 + n2 + this.closeTag(e2) + this.tagEndChar : this.indentate(i2) + "<" + e2 + n2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const n2 = this.options.entities[e2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + }; + const mt = { validate: a }; + module2.exports = e; + })(); + } +}); + +// node_modules/.pnpm/@azure+core-xml@1.5.0/node_modules/@azure/core-xml/dist/commonjs/xml.common.js +var require_xml_common = __commonJS({ + "node_modules/.pnpm/@azure+core-xml@1.5.0/node_modules/@azure/core-xml/dist/commonjs/xml.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.XML_CHARKEY = exports2.XML_ATTRKEY = void 0; + exports2.XML_ATTRKEY = "$"; + exports2.XML_CHARKEY = "_"; + } +}); + +// node_modules/.pnpm/@azure+core-xml@1.5.0/node_modules/@azure/core-xml/dist/commonjs/xml.js +var require_xml = __commonJS({ + "node_modules/.pnpm/@azure+core-xml@1.5.0/node_modules/@azure/core-xml/dist/commonjs/xml.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stringifyXML = stringifyXML; + exports2.parseXML = parseXML; + var fast_xml_parser_1 = require_fxp(); + var xml_common_js_1 = require_xml_common(); + function getCommonOptions(options2) { + var _a; + return { + attributesGroupName: xml_common_js_1.XML_ATTRKEY, + textNodeName: (_a = options2.xmlCharKey) !== null && _a !== void 0 ? _a : xml_common_js_1.XML_CHARKEY, + ignoreAttributes: false, + suppressBooleanAttributes: false + }; + } + function getSerializerOptions(options2 = {}) { + var _a, _b; + return Object.assign(Object.assign({}, getCommonOptions(options2)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options2.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options2.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); + } + function getParserOptions(options2 = {}) { + return Object.assign(Object.assign({}, getCommonOptions(options2)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options2.stopNodes, processEntities: true, trimValues: false }); + } + function stringifyXML(obj, opts = {}) { + const parserOptions = getSerializerOptions(opts); + const j2x = new fast_xml_parser_1.XMLBuilder(parserOptions); + const node = { [parserOptions.rootNodeName]: obj }; + const xmlData = j2x.build(node); + return `${xmlData}`.replace(/\n/g, ""); + } + async function parseXML(str, opts = {}) { + if (!str) { + throw new Error("Document is empty"); + } + const validation = fast_xml_parser_1.XMLValidator.validate(str); + if (validation !== true) { + throw validation; + } + const parser = new fast_xml_parser_1.XMLParser(getParserOptions(opts)); + const parsedXml = parser.parse(str); + if (parsedXml["?xml"]) { + delete parsedXml["?xml"]; + } + if (!opts.includeRoot) { + for (const key of Object.keys(parsedXml)) { + const value = parsedXml[key]; + return typeof value === "object" ? Object.assign({}, value) : value; + } + } + return parsedXml; + } + } +}); + +// node_modules/.pnpm/@azure+core-xml@1.5.0/node_modules/@azure/core-xml/dist/commonjs/index.js +var require_commonjs10 = __commonJS({ + "node_modules/.pnpm/@azure+core-xml@1.5.0/node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.XML_CHARKEY = exports2.XML_ATTRKEY = exports2.parseXML = exports2.stringifyXML = void 0; + var xml_js_1 = require_xml(); + Object.defineProperty(exports2, "stringifyXML", { enumerable: true, get: function() { + return xml_js_1.stringifyXML; + } }); + Object.defineProperty(exports2, "parseXML", { enumerable: true, get: function() { + return xml_js_1.parseXML; + } }); + var xml_common_js_1 = require_xml_common(); + Object.defineProperty(exports2, "XML_ATTRKEY", { enumerable: true, get: function() { + return xml_common_js_1.XML_ATTRKEY; + } }); + Object.defineProperty(exports2, "XML_CHARKEY", { enumerable: true, get: function() { + return xml_common_js_1.XML_CHARKEY; + } }); + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options2) { + __publicField(this, "_nextPolicy"); + __publicField(this, "_options"); + this._nextPolicy = _nextPolicy; + this._options = _options2; + } + /** + * 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/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants9 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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.28.0"; + exports2.SERVICE_VERSION = "2025-07-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", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HTTPURLConnection = { + HTTP_ACCEPTED: 202, + HTTP_CONFLICT: 409, + HTTP_NOT_FOUND: 404, + HTTP_PRECON_FAILED: 412, + HTTP_RANGE_NOT_SATISFIABLE: 416 + }; + 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.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", + "Content-Type", + "Date", + "Request-Id", + "traceparent", + "Transfer-Encoding", + "User-Agent", + "x-ms-client-request-id", + "x-ms-date", + "x-ms-error-code", + "x-ms-request-id", + "x-ms-return-client-request-id", + "x-ms-version", + "Accept-Ranges", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-MD5", + "Content-Range", + "ETag", + "Last-Modified", + "Server", + "Vary", + "x-ms-content-crc64", + "x-ms-copy-action", + "x-ms-copy-completion-time", + "x-ms-copy-id", + "x-ms-copy-progress", + "x-ms-copy-status", + "x-ms-has-immutability-policy", + "x-ms-has-legal-hold", + "x-ms-lease-state", + "x-ms-lease-status", + "x-ms-range", + "x-ms-request-server-encrypted", + "x-ms-server-encrypted", + "x-ms-snapshot", + "x-ms-source-range", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "x-ms-access-tier", + "x-ms-access-tier-change-time", + "x-ms-access-tier-inferred", + "x-ms-account-kind", + "x-ms-archive-status", + "x-ms-blob-append-offset", + "x-ms-blob-cache-control", + "x-ms-blob-committed-block-count", + "x-ms-blob-condition-appendpos", + "x-ms-blob-condition-maxsize", + "x-ms-blob-content-disposition", + "x-ms-blob-content-encoding", + "x-ms-blob-content-language", + "x-ms-blob-content-length", + "x-ms-blob-content-md5", + "x-ms-blob-content-type", + "x-ms-blob-public-access", + "x-ms-blob-sequence-number", + "x-ms-blob-type", + "x-ms-copy-destination-snapshot", + "x-ms-creation-time", + "x-ms-default-encryption-scope", + "x-ms-delete-snapshots", + "x-ms-delete-type-permanent", + "x-ms-deny-encryption-scope-override", + "x-ms-encryption-algorithm", + "x-ms-if-sequence-number-eq", + "x-ms-if-sequence-number-le", + "x-ms-if-sequence-number-lt", + "x-ms-incremental-copy", + "x-ms-lease-action", + "x-ms-lease-break-period", + "x-ms-lease-duration", + "x-ms-lease-id", + "x-ms-lease-time", + "x-ms-page-write", + "x-ms-proposed-lease-id", + "x-ms-range-get-content-md5", + "x-ms-rehydrate-priority", + "x-ms-sequence-number-action", + "x-ms-sku-name", + "x-ms-source-content-md5", + "x-ms-source-if-match", + "x-ms-source-if-modified-since", + "x-ms-source-if-none-match", + "x-ms-source-if-unmodified-since", + "x-ms-tag-count", + "x-ms-encryption-key-sha256", + "x-ms-copy-source-error-code", + "x-ms-copy-source-status-code", + "x-ms-if-tags", + "x-ms-source-if-tags" + ]; + exports2.StorageBlobLoggingAllowedQueryParameters = [ + "comp", + "maxresults", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "se", + "si", + "sip", + "sp", + "spr", + "sr", + "srt", + "ss", + "st", + "sv", + "include", + "marker", + "prefix", + "copyid", + "restype", + "blockid", + "blocklisttype", + "delimiter", + "prevsnapshot", + "ske", + "skoid", + "sks", + "skt", + "sktid", + "skv", + "snapshot" + ]; + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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 = base64encode2; + exports2.base64decode = base64decode2; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart; + 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_constants9(); + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path4 = urlParsed.pathname; + path4 = path4 || "/"; + path4 = escape(path4); + urlParsed.pathname = path4; + return urlParsed.toString(); + } + 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 path4 = urlParsed.pathname; + path4 = path4 ? path4.endsWith("/") ? `${path4}${name}` : `${path4}/${name}` : name; + urlParsed.pathname = path4; + 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(date3, withMilliseconds = true) { + const dateString = date3.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode2(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode2(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 + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode2(res); + } + async function delay2(timeInMs, aborter, abortError) { + return new Promise((resolve, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart(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 toBlobTagsString(tags) { + if (tags === void 0) { + return void 0; + } + const tagPairs = []; + 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(tags) { + if (tags === void 0) { + return void 0; + } + const res = { + blobTagSet: [] + }; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; + res.blobTagSet.push({ + key, + value + }); + } + } + return res; + } + function toTags(tags) { + if (tags === void 0) { + return void 0; + } + const res = {}; + for (const blobTag of tags.blobTagSet) { + res[blobTag.key] = blobTag.value; + } + return res; + } + function toQuerySerialization(textConfiguration) { + if (textConfiguration === void 0) { + return void 0; + } + switch (textConfiguration.kind) { + case "csv": + return { + format: { + type: "delimited", + delimitedTextConfiguration: { + columnSeparator: textConfiguration.columnSeparator || ",", + fieldQuote: textConfiguration.fieldQuote || "", + recordSeparator: textConfiguration.recordSeparator, + escapeChar: textConfiguration.escapeCharacter || "", + headersPresent: textConfiguration.hasHeaders || false + } + } + }; + case "json": + return { + format: { + type: "json", + jsonTextConfiguration: { + recordSeparator: textConfiguration.recordSeparator + } + } + }; + case "arrow": + return { + format: { + type: "arrow", + arrowConfiguration: { + schema: textConfiguration.schema + } + } + }; + case "parquet": + return { + format: { + type: "parquet" + } + }; + default: + throw Error("Invalid BlobQueryTextConfiguration."); + } + } + function parseObjectReplicationRecord(objectReplicationRecord) { + if (!objectReplicationRecord) { + return void 0; + } + if ("policy-id" in objectReplicationRecord) { + return void 0; + } + const orProperties = []; + for (const key in objectReplicationRecord) { + const ids = key.split("_"); + const policyPrefix = "or-"; + if (ids[0].startsWith(policyPrefix)) { + ids[0] = ids[0].substring(policyPrefix.length); + } + const rule = { + ruleId: ids[1], + replicationStatus: objectReplicationRecord[key] + }; + const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); + if (policyIndex > -1) { + orProperties[policyIndex].rules.push(rule); + } else { + orProperties.push({ + policyId: ids[0], + rules: [rule] + }); + } + } + return orProperties; + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function BlobNameToString(name) { + if (name.encoded) { + return decodeURIComponent(name.content); + } else { + return name.content; + } + } + function ConvertInternalResponseOfListBlobFlat(internalResponse) { + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; + } + function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { + 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 = []; + let clearRange = []; + if (getPageRangesSegment.pageRange) + pageRange = getPageRangesSegment.pageRange; + if (getPageRangesSegment.clearRange) + clearRange = getPageRangesSegment.clearRange; + let pageRangeIndex = 0; + let clearRangeIndex = 0; + while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) { + if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) { + yield { + start: pageRange[pageRangeIndex].start, + end: pageRange[pageRangeIndex].end, + isClear: false + }; + ++pageRangeIndex; + } else { + yield { + start: clearRange[clearRangeIndex].start, + end: clearRange[clearRangeIndex].end, + isClear: true + }; + ++clearRangeIndex; + } + } + for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) { + yield { + start: pageRange[pageRangeIndex].start, + end: pageRange[pageRangeIndex].end, + isClear: false + }; + } + for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) { + yield { + start: clearRange[clearRangeIndex].start, + end: clearRange[clearRangeIndex].end, + isClear: true + }; + } + } + 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/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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"; + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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_commonjs3(); + 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_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options2) => { + return new StorageRetryPolicy(nextPolicy, options2, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + 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 { + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options2, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options2); + /** + * RetryOptions. + */ + __publicField(this, "retryOptions"); + 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 (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, abortSignal2) { + 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, abortSignal2, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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 { + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + __publicField(this, "retryOptions"); + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options2) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options2, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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. + * + * @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/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 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/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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 { + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options2, factory) { + super(nextPolicy, options2); + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + __publicField(this, "factory"); + 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/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, array2) => { + if (index > 0 && value.name.toLowerCase() === array2[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 path4 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path4}`; + 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/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options2) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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("crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + /** + * Azure Storage account name; readonly. + */ + __publicField(this, "accountName"); + /** + * Azure Storage account key; readonly. + */ + __publicField(this, "accountKey"); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options2) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options2, 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/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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 - + * @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, options2) { + super(nextPolicy, options2); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options2) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options2); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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("stream"); + var BuffersStream = class extends node_stream_1.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, options2) { + super(options2); + __publicField(this, "buffers"); + __publicField(this, "byteLength"); + /** + * The offset of data to be read in the current buffer. + */ + __publicField(this, "byteOffsetInCurrentBuffer"); + /** + * The index of buffer to be read in the array of buffers. + */ + __publicField(this, "bufferIndex"); + /** + * The total length of data already read. + */ + __publicField(this, "pushedBytesLength"); + 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/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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("buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + constructor(capacity, buffers, totalLength) { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + __publicField(this, "buffers", []); + /** + * The total size of internal buffers. + */ + __publicField(this, "capacity"); + /** + * The total size of data contained in internal buffers. + */ + __publicField(this, "_size"); + 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); + } + } + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + /** + * 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/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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 { + /** + * 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) { + /** + * 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. + */ + __publicField(this, "bufferSize"); + /** + * How many buffers can be created or maintained. + */ + __publicField(this, "maxBuffers"); + /** + * A Node.js Readable stream. + */ + __publicField(this, "readable"); + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + __publicField(this, "outgoingHandler"); + /** + * An internal event emitter. + */ + __publicField(this, "emitter", new events_1.EventEmitter()); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + __publicField(this, "concurrency"); + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + __publicField(this, "offset", 0); + /** + * An internal marker to track whether stream is end. + */ + __publicField(this, "isStreamEnd", false); + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + __publicField(this, "isError", false); + /** + * How many handlers are executing. + */ + __publicField(this, "executingOutgoingHandlers", 0); + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + __publicField(this, "encoding"); + /** + * How many buffers have been allocated. + */ + __publicField(this, "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. + */ + __publicField(this, "unresolvedDataArray", []); + /** + * How much data consisted in unresolvedDataArray. + */ + __publicField(this, "unresolvedLength", 0); + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + __publicField(this, "incoming", []); + /** + * The array (queue) includes all the buffers filled from stream data. + */ + __publicField(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((resolve, 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(resolve).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve(); + } + } + }); + }); + } + /** + * 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; } - }; - 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.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); } - return closeTag; - }; - Builder.prototype.buildTextValNode = function(val, key, attrStr, level) { - if (this.options.cdataPropName !== false && key === this.options.cdataPropName) { - return this.indentate(level) + `` + 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, val); - 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 + " buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); } - }; - Builder.prototype.replaceEntitiesValue = function(textValue) { - if (textValue && textValue.length > 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 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(); } } - return textValue; - }; - } -}); - -// node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/fxp.js -var XMLValidator; -var init_fxp = __esm({ - "node_modules/.pnpm/fast-xml-parser@5.0.9/node_modules/fast-xml-parser/src/fxp.js"() { - "use strict"; - init_validator(); - init_XMLParser(); - init_json2xml(); - XMLValidator = { - validate }; + exports2.BufferScheduler = BufferScheduler; } }); -// node_modules/.pnpm/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/esm/xml.common.js -var XML_ATTRKEY2, XML_CHARKEY2; -var init_xml_common = __esm({ - "node_modules/.pnpm/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/esm/xml.common.js"() { +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { "use strict"; - XML_ATTRKEY2 = "$"; - XML_CHARKEY2 = "_"; - } -}); - -// node_modules/.pnpm/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/esm/xml.js -function getCommonOptions(options2) { - var _a3; - return { - attributesGroupName: XML_ATTRKEY2, - textNodeName: (_a3 = options2.xmlCharKey) !== null && _a3 !== void 0 ? _a3 : XML_CHARKEY2, - ignoreAttributes: false, - suppressBooleanAttributes: false - }; -} -function getSerializerOptions(options2 = {}) { - var _a3, _b2; - return Object.assign(Object.assign({}, getCommonOptions(options2)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a3 = options2.rootName) !== null && _a3 !== void 0 ? _a3 : "root", cdataPropName: (_b2 = options2.cdataPropName) !== null && _b2 !== void 0 ? _b2 : "__cdata" }); -} -function getParserOptions(options2 = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options2)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options2.stopNodes, processEntities: true, trimValues: false }); -} -function stringifyXML(obj, opts = {}) { - const parserOptions = getSerializerOptions(opts); - const j2x = new Builder(parserOptions); - const node = { [parserOptions.rootNodeName]: obj }; - const xmlData = j2x.build(node); - return `${xmlData}`.replace(/\n/g, ""); -} -async function parseXML(str, opts = {}) { - if (!str) { - throw new Error("Document is empty"); - } - const validation = XMLValidator.validate(str); - if (validation !== true) { - throw validation; - } - const parser = new XMLParser(getParserOptions(opts)); - const parsedXml = parser.parse(str); - if (parsedXml["?xml"]) { - delete parsedXml["?xml"]; - } - if (!opts.includeRoot) { - for (const key of Object.keys(parsedXml)) { - const value = parsedXml[key]; - return typeof value === "object" ? Object.assign({}, value) : value; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); + var _defaultHttpClient; + function getCachedDefaultHttpClient() { + if (!_defaultHttpClient) { + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); + } + return _defaultHttpClient; } } - return parsedXml; -} -var init_xml = __esm({ - "node_modules/.pnpm/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/esm/xml.js"() { - "use strict"; - init_fxp(); - init_xml_common(); - } -}); - -// node_modules/.pnpm/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/esm/index.js -var init_esm9 = __esm({ - "node_modules/.pnpm/@azure+core-xml@1.4.5/node_modules/@azure/core-xml/dist/esm/index.js"() { - "use strict"; - init_xml(); - init_xml_common(); - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/log.js -var logger3; -var init_log4 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/log.js"() { - "use strict"; - init_esm(); - logger3 = createClientLogger("storage-blob"); - } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/RequestPolicy.js -var BaseRequestPolicy; -var init_RequestPolicy = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/RequestPolicy.js"() { +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; - BaseRequestPolicy = class { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { /** * The main method to implement that manipulates a request/response. */ constructor(_nextPolicy, _options2) { + __publicField(this, "_nextPolicy"); + __publicField(this, "_options"); this._nextPolicy = _nextPolicy; this._options = _options2; } @@ -38325,25 +42601,18 @@ var init_RequestPolicy = __esm({ this._options.log(logLevel, message); } }; + exports2.BaseRequestPolicy = BaseRequestPolicy; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/constants.js -var SDK_VERSION2, SERVICE_VERSION, BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES, BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES, BLOCK_BLOB_MAX_BLOCKS, DEFAULT_BLOCK_BUFFER_SIZE_BYTES, DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES, DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS, REQUEST_TIMEOUT, StorageOAuthScopes, URLConstants, HTTPURLConnection, HeaderConstants, ETagNone, ETagAny, SIZE_1_MB, BATCH_MAX_REQUEST, BATCH_MAX_PAYLOAD_IN_BYTES, HTTP_LINE_ENDING, HTTP_VERSION_1_1, EncryptionAlgorithmAES25, DevelopmentConnectionString, StorageBlobLoggingAllowedHeaderNames, StorageBlobLoggingAllowedQueryParameters, BlobUsesCustomerSpecifiedEncryptionMsg, BlobDoesNotUseCustomerSpecifiedEncryption, PathStylePorts; -var init_constants2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/constants.js"() { +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { "use strict"; - SDK_VERSION2 = "12.27.0"; - SERVICE_VERSION = "2025-05-05"; - BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - BLOCK_BLOB_MAX_BLOCKS = 5e4; - DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - REQUEST_TIMEOUT = 100 * 1e3; - StorageOAuthScopes = "https://storage.azure.com/.default"; - URLConstants = { + 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", @@ -38352,14 +42621,7 @@ var init_constants2 = __esm({ TIMEOUT: "timeout" } }; - HTTPURLConnection = { - HTTP_ACCEPTED: 202, - HTTP_CONFLICT: 409, - HTTP_NOT_FOUND: 404, - HTTP_PRECON_FAILED: 412, - HTTP_RANGE_NOT_SATISFIABLE: 416 - }; - HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -38385,151 +42647,8 @@ var init_constants2 = __esm({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - ETagNone = ""; - ETagAny = "*"; - SIZE_1_MB = 1 * 1024 * 1024; - BATCH_MAX_REQUEST = 256; - BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - HTTP_LINE_ENDING = "\r\n"; - HTTP_VERSION_1_1 = "HTTP/1.1"; - EncryptionAlgorithmAES25 = "AES256"; - DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - StorageBlobLoggingAllowedHeaderNames = [ - "Access-Control-Allow-Origin", - "Cache-Control", - "Content-Length", - "Content-Type", - "Date", - "Request-Id", - "traceparent", - "Transfer-Encoding", - "User-Agent", - "x-ms-client-request-id", - "x-ms-date", - "x-ms-error-code", - "x-ms-request-id", - "x-ms-return-client-request-id", - "x-ms-version", - "Accept-Ranges", - "Content-Disposition", - "Content-Encoding", - "Content-Language", - "Content-MD5", - "Content-Range", - "ETag", - "Last-Modified", - "Server", - "Vary", - "x-ms-content-crc64", - "x-ms-copy-action", - "x-ms-copy-completion-time", - "x-ms-copy-id", - "x-ms-copy-progress", - "x-ms-copy-status", - "x-ms-has-immutability-policy", - "x-ms-has-legal-hold", - "x-ms-lease-state", - "x-ms-lease-status", - "x-ms-range", - "x-ms-request-server-encrypted", - "x-ms-server-encrypted", - "x-ms-snapshot", - "x-ms-source-range", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "x-ms-access-tier", - "x-ms-access-tier-change-time", - "x-ms-access-tier-inferred", - "x-ms-account-kind", - "x-ms-archive-status", - "x-ms-blob-append-offset", - "x-ms-blob-cache-control", - "x-ms-blob-committed-block-count", - "x-ms-blob-condition-appendpos", - "x-ms-blob-condition-maxsize", - "x-ms-blob-content-disposition", - "x-ms-blob-content-encoding", - "x-ms-blob-content-language", - "x-ms-blob-content-length", - "x-ms-blob-content-md5", - "x-ms-blob-content-type", - "x-ms-blob-public-access", - "x-ms-blob-sequence-number", - "x-ms-blob-type", - "x-ms-copy-destination-snapshot", - "x-ms-creation-time", - "x-ms-default-encryption-scope", - "x-ms-delete-snapshots", - "x-ms-delete-type-permanent", - "x-ms-deny-encryption-scope-override", - "x-ms-encryption-algorithm", - "x-ms-if-sequence-number-eq", - "x-ms-if-sequence-number-le", - "x-ms-if-sequence-number-lt", - "x-ms-incremental-copy", - "x-ms-lease-action", - "x-ms-lease-break-period", - "x-ms-lease-duration", - "x-ms-lease-id", - "x-ms-lease-time", - "x-ms-page-write", - "x-ms-proposed-lease-id", - "x-ms-range-get-content-md5", - "x-ms-rehydrate-priority", - "x-ms-sequence-number-action", - "x-ms-sku-name", - "x-ms-source-content-md5", - "x-ms-source-if-match", - "x-ms-source-if-modified-since", - "x-ms-source-if-none-match", - "x-ms-source-if-unmodified-since", - "x-ms-tag-count", - "x-ms-encryption-key-sha256", - "x-ms-copy-source-error-code", - "x-ms-copy-source-status-code", - "x-ms-if-tags", - "x-ms-source-if-tags" - ]; - StorageBlobLoggingAllowedQueryParameters = [ - "comp", - "maxresults", - "rscc", - "rscd", - "rsce", - "rscl", - "rsct", - "se", - "si", - "sip", - "sp", - "spr", - "sr", - "srt", - "ss", - "st", - "sv", - "include", - "marker", - "prefix", - "copyid", - "restype", - "blockid", - "blocklisttype", - "delimiter", - "prevsnapshot", - "ske", - "skoid", - "sks", - "skt", - "sktid", - "skv", - "snapshot" - ]; - BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - PathStylePorts = [ + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -38554,687 +42673,431 @@ var init_constants2 = __esm({ } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.common.js -function escapeURLPath(url2) { - const urlParsed = new URL(url2); - let path4 = urlParsed.pathname; - path4 = path4 || "/"; - path4 = escape(path4); - urlParsed.pathname = path4; - return urlParsed.toString(); -} -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]; +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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 = base64encode2; + exports2.base64decode = base64decode2; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart; + 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_constants10(); + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path4 = urlParsed.pathname; + path4 = path4 || "/"; + path4 = escape(path4); + urlParsed.pathname = path4; + return urlParsed.toString(); + } + 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 ""; } - } - 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]; + 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 }; + } } - } - return ""; -} -function extractConnectionStringParts(connectionString) { - let proxyUri = ""; - if (connectionString.startsWith("UseDevelopmentStorage=true")) { - proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = 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"); + function escape(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } - return { - kind: "AccountConnString", - url: blobEndpoint, - accountName, - accountKey, - proxyUri - }; - } else { - let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); - let accountName = getValueInConnString(connectionString, "AccountName"); - if (!accountName) { - accountName = getAccountNameFromUrl(blobEndpoint); + function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path4 = urlParsed.pathname; + path4 = path4 ? path4.endsWith("/") ? `${path4}${name}` : `${path4}/${name}` : name; + urlParsed.pathname = path4; + return urlParsed.toString(); } - 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"); + 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(); } - if (accountSas.startsWith("?")) { - accountSas = accountSas.substring(1); + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; } - 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 path4 = urlParsed.pathname; - path4 = path4 ? path4.endsWith("/") ? `${path4}${name}` : `${path4}/${name}` : name; - urlParsed.pathname = path4; - 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); + 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; } } - } - if (encodedValue) { - searchPieces.push(`${encodedName}=${encodedValue}`); - } - urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; - return urlParsed.toString(); -} -function getURLParameter(url2, name) { - var _a3; - const urlParsed = new URL(url2); - return (_a3 = urlParsed.searchParams.get(name)) !== null && _a3 !== void 0 ? _a3 : 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(date3, withMilliseconds = true) { - const dateString = date3.toISOString(); - return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; -} -function base64encode(content) { - return !isNode ? btoa(content) : Buffer.from(content).toString("base64"); -} -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 + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); - return base64encode(res); -} -async function delay3(timeInMs, aborter, abortError) { - return new Promise((resolve, reject) => { - let timeout; - const abortHandler = () => { - if (timeout !== void 0) { - clearTimeout(timeout); + 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; } - reject(abortError); - }; - const resolveHandler = () => { - if (aborter !== void 0) { - aborter.removeEventListener("abort", abortHandler); + } + function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); } - resolve(); - }; - timeout = setTimeout(resolveHandler, timeInMs); - if (aborter !== void 0) { - aborter.addEventListener("abort", abortHandler); + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; } - }); -} -function padStart(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); + 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(); } - return padString.slice(0, targetLength) + currentString; - } -} -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 = ""; + function truncatedISO8061Date(date3, withMilliseconds = true) { + const dateString = date3.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } - 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) && PathStylePorts.includes(parsedUrl.port); -} -function toBlobTagsString(tags2) { - if (tags2 === void 0) { - return void 0; - } - const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; - tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); + function base64encode2(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); } - } - return tagPairs.join("&"); -} -function toBlobTags(tags2) { - if (tags2 === void 0) { - return void 0; - } - const res = { - blobTagSet: [] - }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; - res.blobTagSet.push({ - key, - value - }); + function base64decode2(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } - } - return res; -} -function toTags(tags2) { - if (tags2 === void 0) { - return void 0; - } - const res = {}; - for (const blobTag of tags2.blobTagSet) { - res[blobTag.key] = blobTag.value; - } - return res; -} -function toQuerySerialization(textConfiguration) { - if (textConfiguration === void 0) { - return void 0; - } - switch (textConfiguration.kind) { - case "csv": - return { - format: { - type: "delimited", - delimitedTextConfiguration: { - columnSeparator: textConfiguration.columnSeparator || ",", - fieldQuote: textConfiguration.fieldQuote || "", - recordSeparator: textConfiguration.recordSeparator, - escapeChar: textConfiguration.escapeCharacter || "", - headersPresent: textConfiguration.hasHeaders || false + 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 + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode2(res); + } + async function delay2(timeInMs, aborter, abortError) { + return new Promise((resolve, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); } - } - }; - case "json": - return { - format: { - type: "json", - jsonTextConfiguration: { - recordSeparator: textConfiguration.recordSeparator + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); } + resolve(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); } - }; - case "arrow": - return { - format: { - type: "arrow", - arrowConfiguration: { - schema: textConfiguration.schema - } + }); + } + function padStart(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); } - }; - case "parquet": - return { - format: { - type: "parquet" + 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); } - }; - default: - throw Error("Invalid BlobQueryTextConfiguration."); - } -} -function parseObjectReplicationRecord(objectReplicationRecord) { - if (!objectReplicationRecord) { - return void 0; - } - if ("policy-id" in objectReplicationRecord) { - return void 0; - } - const orProperties = []; - for (const key in objectReplicationRecord) { - const ids = key.split("_"); - const policyPrefix = "or-"; - if (ids[0].startsWith(policyPrefix)) { - ids[0] = ids[0].substring(policyPrefix.length); + } + return headers; } - const rule = { - ruleId: ids[1], - replicationStatus: objectReplicationRecord[key] - }; - const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); - if (policyIndex > -1) { - orProperties[policyIndex].rules.push(rule); - } else { - orProperties.push({ - policyId: ids[0], - rules: [rule] - }); + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - } - return orProperties; -} -function httpAuthorizationToString(httpAuthorization) { - return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; -} -function BlobNameToString(name) { - if (name.encoded) { - return decodeURIComponent(name.content); - } else { - return name.content; - } -} -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; - }) - } }); -} -function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a3; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a3 = internalResponse.segment.blobPrefixes) === null || _a3 === void 0 ? void 0 : _a3.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; - }) - } }); -} -function* ExtractPageRangeInfoItems(getPageRangesSegment) { - let pageRange = []; - let clearRange = []; - if (getPageRangesSegment.pageRange) - pageRange = getPageRangesSegment.pageRange; - if (getPageRangesSegment.clearRange) - clearRange = getPageRangesSegment.clearRange; - let pageRangeIndex = 0; - let clearRangeIndex = 0; - while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) { - if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) { - yield { - start: pageRange[pageRangeIndex].start, - end: pageRange[pageRangeIndex].end, - isClear: false - }; - ++pageRangeIndex; - } else { - yield { - start: clearRange[clearRangeIndex].start, - end: clearRange[clearRangeIndex].end, - isClear: true - }; - ++clearRangeIndex; + 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}`); } } - for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) { - yield { - start: pageRange[pageRangeIndex].start, - end: pageRange[pageRangeIndex].end, - isClear: false - }; - } - for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) { - yield { - start: clearRange[clearRangeIndex].start, - end: clearRange[clearRangeIndex].end, - isClear: true - }; - } -} -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}`); -} -var init_utils_common = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.common.js"() { - "use strict"; - init_esm5(); - init_esm3(); - init_constants2(); - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js -var StorageRetryPolicyType, DEFAULT_RETRY_OPTIONS, RETRY_ABORT_ERROR, StorageRetryPolicy; -var init_StorageRetryPolicy = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js"() { - "use strict"; - init_esm2(); - init_RequestPolicy(); - init_constants2(); - init_utils_common(); - init_log4(); - (function(StorageRetryPolicyType3) { - StorageRetryPolicyType3[StorageRetryPolicyType3["EXPONENTIAL"] = 0] = "EXPONENTIAL"; - StorageRetryPolicyType3[StorageRetryPolicyType3["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); - DEFAULT_RETRY_OPTIONS = { - maxRetryDelayInMs: 120 * 1e3, - maxTries: 4, - retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, - secondaryHost: "", - tryTimeoutInMs: void 0 - // Use server side default timeout strategy - }; - RETRY_ABORT_ERROR = new AbortError("The operation was aborted."); - StorageRetryPolicy = class extends BaseRequestPolicy { +}); + +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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_constants10(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** - * Creates an instance of RetryPolicy. - * + * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - * @param options - - * @param retryOptions - */ - constructor(nextPolicy, options2, retryOptions = DEFAULT_RETRY_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, options2) { super(nextPolicy, options2); - 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(request3) { - return this.attemptSendRequest(request3, false, 1); } /** - * Decide and perform next retry. Won't mutate request parameter. + * Sends out request. * * @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(request3, secondaryHas404, attempt) { - const newRequest = request3.clone(); - const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request3.method === "GET" || request3.method === "HEAD" || request3.method === "OPTIONS") || attempt % 2 === 1; - if (!isPrimaryRetry) { - newRequest.url = 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()); - } - let response; - try { - logger3.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) { - logger3.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); - if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { - throw err; - } - } - await this.delay(isPrimaryRetry, attempt, request3.abortSignal); - return this.attemptSendRequest(request3, 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) { - logger3.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); - return false; - } - const retriableErrors2 = [ - "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 retriableErrors2) { - if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger3.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) { - logger3.info(`RetryPolicy: Secondary access with 404, will retry.`); - return true; - } - if (statusCode === 503 || statusCode === 500) { - logger3.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`))) { - logger3.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); - return true; + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); } - return false; - } - /** - * Delay a calculated time between retries. - * - * @param isPrimaryRetry - - * @param attempt - - * @param abortSignal - - */ - async delay(isPrimaryRetry, attempt, abortSignal2) { - let delayTimeInMs = 0; - if (isPrimaryRetry) { - switch (this.retryOptions.retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: - delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); - break; - case StorageRetryPolicyType.FIXED: - delayTimeInMs = this.retryOptions.retryDelayInMs; - break; - } - } else { - delayTimeInMs = Math.random() * 1e3; + 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()); } - logger3.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay3(delayTimeInMs, abortSignal2, RETRY_ABORT_ERROR); + 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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js -var StorageRetryPolicyFactory; -var init_StorageRetryPolicyFactory = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js"() { +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { "use strict"; - init_StorageRetryPolicy(); - StorageRetryPolicyFactory = class { - /** - * Creates an instance of StorageRetryPolicyFactory. - * @param retryOptions - - */ - constructor(retryOptions) { - this.retryOptions = retryOptions; - } + 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 StorageRetryPolicy object. + * Creates a StorageBrowserPolicyFactory object. * * @param nextPolicy - * @param options - */ create(nextPolicy, options2) { - return new StorageRetryPolicy(nextPolicy, options2, this.retryOptions); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options2); } }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/CredentialPolicy.js -var CredentialPolicy; -var init_CredentialPolicy = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/CredentialPolicy.js"() { +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { "use strict"; - init_RequestPolicy(); - CredentialPolicy = class extends BaseRequestPolicy { + 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(request3) { - return this._nextPolicy.sendRequest(this.signRequest(request3)); + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); } /** * Child classes must implement this method with request signing. This method @@ -39242,52 +43105,88 @@ var init_CredentialPolicy = __esm({ * * @param request - */ - signRequest(request3) { - return request3; + signRequest(request) { + return request; } }; + exports2.CredentialPolicy = CredentialPolicy; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/SharedKeyComparator.js -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; - } +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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, options2) { + super(nextPolicy, options2); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; } - return false; -} -var table_lv0, table_lv2, table_lv4; -var init_SharedKeyComparator = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/SharedKeyComparator.js"() { +}); + +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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, _options2) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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, options2) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options2); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { "use strict"; - table_lv0 = new Uint32Array([ + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ 0, 0, 0, @@ -39417,7 +43316,7 @@ var init_SharedKeyComparator = __esm({ 1872, 0 ]); - table_lv2 = new Uint32Array([ + var table_lv2 = new Uint32Array([ 0, 0, 0, @@ -39547,7 +43446,7 @@ var init_SharedKeyComparator = __esm({ 0, 0 ]); - table_lv4 = new Uint32Array([ + var table_lv4 = new Uint32Array([ 0, 0, 0, @@ -39677,19 +43576,53 @@ var init_SharedKeyComparator = __esm({ 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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js -var StorageSharedKeyCredentialPolicy; -var init_StorageSharedKeyCredentialPolicy = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js"() { +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { "use strict"; - init_constants2(); - init_utils_common(); - init_CredentialPolicy(); - init_SharedKeyComparator(); - StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + 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 { /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -39698,6 +43631,10 @@ var init_StorageSharedKeyCredentialPolicy = __esm({ */ constructor(nextPolicy, options2, factory) { super(nextPolicy, options2); + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + __publicField(this, "factory"); this.factory = factory; } /** @@ -39705,28 +43642,28 @@ var init_StorageSharedKeyCredentialPolicy = __esm({ * * @param request - */ - signRequest(request3) { - request3.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); - if (request3.body && (typeof request3.body === "string" || request3.body !== void 0) && request3.body.length > 0) { - request3.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request3.body)); + 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 = [ - request3.method.toUpperCase(), - this.getHeaderValueToSign(request3, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request3, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request3, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request3, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request3, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request3, HeaderConstants.DATE), - this.getHeaderValueToSign(request3, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request3, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request3, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request3, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request3, HeaderConstants.RANGE) - ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request3) + this.getCanonicalizedResourceString(request3); + 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); - request3.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); - return request3; + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; } /** * Retrieve header value according to shared key sign rules. @@ -39735,12 +43672,12 @@ var init_StorageSharedKeyCredentialPolicy = __esm({ * @param request - * @param headerName - */ - getHeaderValueToSign(request3, headerName) { - const value = request3.headers.get(headerName); + 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; @@ -39758,12 +43695,12 @@ var init_StorageSharedKeyCredentialPolicy = __esm({ * * @param request - */ - getCanonicalizedHeadersString(request3) { - let headersArray = request3.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + 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 compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array2) => { if (index > 0 && value.name.toLowerCase() === array2[index - 1].name.toLowerCase()) { @@ -39783,11 +43720,11 @@ var init_StorageSharedKeyCredentialPolicy = __esm({ * * @param request - */ - getCanonicalizedResourceString(request3) { - const path4 = getURLPath(request3.url) || "/"; + getCanonicalizedResourceString(request) { + const path4 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path4}`; - const queries = getURLQueries(request3.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -39807,37 +43744,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/Credential.js -var Credential; -var init_Credential = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/Credential.js"() { - "use strict"; - Credential = class { - /** - * Creates a RequestPolicy object. - * - * @param _nextPolicy - - * @param _options - - */ - create(_nextPolicy, _options2) { - throw new Error("Method should be implemented in children classes."); - } - }; - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js -var import_crypto3, StorageSharedKeyCredential; -var init_StorageSharedKeyCredential = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js"() { +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { "use strict"; - import_crypto3 = require("crypto"); - init_StorageSharedKeyCredentialPolicy(); - init_Credential(); - StorageSharedKeyCredential = class extends Credential { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -39845,6 +43765,14 @@ var init_StorageSharedKeyCredential = __esm({ */ constructor(accountName, accountKey) { super(); + /** + * Azure Storage account name; readonly. + */ + __publicField(this, "accountName"); + /** + * Azure Storage account key; readonly. + */ + __publicField(this, "accountKey"); this.accountName = accountName; this.accountKey = Buffer.from(accountKey, "base64"); } @@ -39855,7 +43783,7 @@ var init_StorageSharedKeyCredential = __esm({ * @param options - */ create(nextPolicy, options2) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options2, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options2, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -39863,223 +43791,636 @@ var init_StorageSharedKeyCredential = __esm({ * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return (0, import_crypto3.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log7 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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 || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js -var AnonymousCredentialPolicy; -var init_AnonymousCredentialPolicy = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js"() { +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { "use strict"; - init_CredentialPolicy(); - AnonymousCredentialPolicy = class extends CredentialPolicy { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs3(); + 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_log7(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options2) => { + return new StorageRetryPolicy(nextPolicy, options2, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + 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 { /** - * Creates an instance of AnonymousCredentialPolicy. + * Creates an instance of RetryPolicy. + * * @param nextPolicy - * @param options - + * @param retryOptions - */ - // 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, options2) { + constructor(nextPolicy, options2, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options2); + /** + * RetryOptions. + */ + __publicField(this, "retryOptions"); + 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 (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, abortSignal2) { + 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, abortSignal2, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/AnonymousCredential.js -var AnonymousCredential; -var init_AnonymousCredential = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/AnonymousCredential.js"() { +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { "use strict"; - init_AnonymousCredentialPolicy(); - init_Credential(); - AnonymousCredential = class extends Credential { + 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 { /** - * Creates an {@link AnonymousCredentialPolicy} object. + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + __publicField(this, "retryOptions"); + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. * * @param nextPolicy - * @param options - */ create(nextPolicy, options2) { - return new AnonymousCredentialPolicy(nextPolicy, options2); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options2, this.retryOptions); } }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/cache.js -function getCachedDefaultHttpClient2() { - if (!_defaultHttpClient) { - _defaultHttpClient = createDefaultHttpClient(); - } - return _defaultHttpClient; -} -var _defaultHttpClient; -var init_cache = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/cache.js"() { +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { "use strict"; - init_esm5(); + 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_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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js -function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request3, next) { - if (isNode) { - return next(request3); - } - if (request3.method === "GET" || request3.method === "HEAD") { - request3.url = setURLParameter(request3.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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)); + } } - request3.headers.delete(HeaderConstants.COOKIE); - request3.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request3); - } - }; -} -var storageBrowserPolicyName; -var init_StorageBrowserPolicyV2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js"() { - "use strict"; - init_esm3(); - init_constants2(); - init_utils_common(); - storageBrowserPolicyName = "storageBrowserPolicy"; - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js -function storageRetryPolicy(options2 = {}) { - var _a3, _b2, _c2, _d2, _e, _f; - const retryPolicyType = (_a3 = options2.retryPolicyType) !== null && _a3 !== void 0 ? _a3 : DEFAULT_RETRY_OPTIONS2.retryPolicyType; - const maxTries = (_b2 = options2.maxTries) !== null && _b2 !== void 0 ? _b2 : DEFAULT_RETRY_OPTIONS2.maxTries; - const retryDelayInMs = (_c2 = options2.retryDelayInMs) !== null && _c2 !== void 0 ? _c2 : DEFAULT_RETRY_OPTIONS2.retryDelayInMs; - const maxRetryDelayInMs = (_d2 = options2.maxRetryDelayInMs) !== null && _d2 !== void 0 ? _d2 : DEFAULT_RETRY_OPTIONS2.maxRetryDelayInMs; - const secondaryHost = (_e = options2.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS2.secondaryHost; - const tryTimeoutInMs = (_f = options2.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS2.tryTimeoutInMs; - function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a4, _b3; - if (attempt >= maxTries) { - logger3.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); - return false; + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; } - 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) { - logger3.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); - return true; + } +}); + +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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_commonjs3(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + 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_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 + }; + 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(options2 = {}) { + const retryPolicyType = options2.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options2.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options2.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options2.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options2.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options2.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; + } } + return false; } - 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`))) { - logger3.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); - return true; + 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."); + } + }; } - if (response || error3) { - const statusCode = (_b3 = (_a4 = response === null || response === void 0 ? void 0 : response.status) !== null && _a4 !== void 0 ? _a4 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b3 !== void 0 ? _b3 : 0; - if (!isPrimaryRetry && statusCode === 404) { - logger3.info(`RetryPolicy: Secondary access with 404, will retry.`); - return true; + } +}); + +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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("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(options2) { + 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", options2.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options2.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; } - if (statusCode === 503 || statusCode === 500) { - logger3.info(`RetryPolicy: Will retry for status code ${statusCode}.`); - return true; + 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, array2) => { + if (index > 0 && value.name.toLowerCase() === array2[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; } - } - return false; - } - function calculateDelay(isPrimaryRetry, attempt) { - let delayTimeInMs = 0; - if (isPrimaryRetry) { - switch (retryPolicyType) { - case StorageRetryPolicyType2.EXPONENTIAL: - delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); - break; - case StorageRetryPolicyType2.FIXED: - delayTimeInMs = retryDelayInMs; - break; + function getCanonicalizedResourceString(request) { + const path4 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options2.accountName}${path4}`; + 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; } - } else { - delayTimeInMs = Math.random() * 1e3; + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; } - logger3.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delayTimeInMs; } - return { - name: storageRetryPolicyName, - async sendRequest(request3, next) { - if (tryTimeoutInMs) { - request3.url = setURLParameter(request3.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); - } - const primaryUrl = request3.url; - const secondaryUrl = secondaryHost ? setURLHost(request3.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(request3.method) || attempt % 2 === 1; - request3.url = isPrimaryRetry ? primaryUrl : secondaryUrl; - response = void 0; - error3 = void 0; - try { - logger3.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); - response = await next(request3); - secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; - } catch (e) { - if (isRestError(e)) { - logger3.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); - error3 = e; - } else { - logger3.error(`RetryPolicy: Caught error, message: ${getErrorMessage(e)}`); - throw e; +}); + +// node_modules/.pnpm/@azure+storage-common@12.0.0/node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs11 = __commonJS({ + "node_modules/.pnpm/@azure+storage-common@12.0.0/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); + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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_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); } - retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); - if (retryAgain) { - await delay3(calculateDelay(isPrimaryRetry, attempt), request3.abortSignal, RETRY_ABORT_ERROR2); - } - attempt++; - } - if (response) { - return response; - } - throw error3 !== null && error3 !== void 0 ? error3 : new RestError("RetryPolicy failed without known error."); + }; } - }; -} -var storageRetryPolicyName, StorageRetryPolicyType2, DEFAULT_RETRY_OPTIONS2, retriableErrors, RETRY_ABORT_ERROR2; -var init_StorageRetryPolicyV2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js"() { - "use strict"; - init_esm2(); - init_esm5(); - init_esm3(); - init_constants2(); - init_utils_common(); - init_log4(); - storageRetryPolicyName = "storageRetryPolicy"; - (function(StorageRetryPolicyType3) { - StorageRetryPolicyType3[StorageRetryPolicyType3["EXPONENTIAL"] = 0] = "EXPONENTIAL"; - StorageRetryPolicyType3[StorageRetryPolicyType3["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType2 || (StorageRetryPolicyType2 = {})); - DEFAULT_RETRY_OPTIONS2 = { + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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_commonjs3(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + 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_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType2.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - retriableErrors = [ + var retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -40090,120 +44431,221 @@ var init_StorageRetryPolicyV2 = __esm({ "EPIPE", "REQUEST_SEND_ERROR" ]; - RETRY_ABORT_ERROR2 = new AbortError("The operation was aborted."); - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js -function storageSharedKeyCredentialPolicy(options2) { - function signRequest(request3) { - request3.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); - if (request3.body && (typeof request3.body === "string" || Buffer.isBuffer(request3.body)) && request3.body.length > 0) { - request3.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request3.body)); - } - const stringToSign = [ - request3.method.toUpperCase(), - getHeaderValueToSign(request3, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request3, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request3, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request3, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request3, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request3, HeaderConstants.DATE), - getHeaderValueToSign(request3, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request3, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request3, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request3, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request3, HeaderConstants.RANGE) - ].join("\n") + "\n" + getCanonicalizedHeadersString(request3) + getCanonicalizedResourceString(request3); - const signature = (0, import_crypto4.createHmac)("sha256", options2.accountKey).update(stringToSign, "utf8").digest("base64"); - request3.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options2.accountName}:${signature}`); - } - function getHeaderValueToSign(request3, headerName) { - const value = request3.headers.get(headerName); - if (!value) { - return ""; - } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { - return ""; - } - return value; - } - function getCanonicalizedHeadersString(request3) { - let headersArray = []; - for (const [name, value] of request3.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { - headersArray.push({ name, value }); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options2 = {}) { + const retryPolicyType = options2.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options2.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options2.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options2.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options2.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options2.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; + } + } + 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."); + } + }; } - headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); - }); - headersArray = headersArray.filter((value, index, array2) => { - if (index > 0 && value.name.toLowerCase() === array2[index - 1].name.toLowerCase()) { - return false; + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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("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(options2) { + 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", options2.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options2.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; } - return true; - }); - let canonicalizedHeadersStringToSign = ""; - headersArray.forEach((header) => { - canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} + 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, array2) => { + if (index > 0 && value.name.toLowerCase() === array2[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(request3) { - const path4 = getURLPath(request3.url) || "/"; - let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options2.accountName}${path4}`; - const queries = getURLQueries(request3.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 += ` + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path4 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options2.accountName}${path4}`; + 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); + } + }; } - return canonicalizedResourceString; - } - return { - name: storageSharedKeyCredentialPolicyName, - async sendRequest(request3, next) { - signRequest(request3); - return next(request3); - } - }; -} -var import_crypto4, storageSharedKeyCredentialPolicyName; -var init_StorageSharedKeyCredentialPolicyV2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js"() { - "use strict"; - import_crypto4 = require("crypto"); - init_constants2(); - init_utils_common(); - init_SharedKeyComparator(); - storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js -var StorageBrowserPolicy; -var init_StorageBrowserPolicy = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { "use strict"; - init_RequestPolicy(); - init_esm3(); - init_constants2(); - init_utils_common(); - StorageBrowserPolicy = class extends BaseRequestPolicy { + 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_constants9(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -40219,28 +44661,33 @@ var init_StorageBrowserPolicy = __esm({ * * @param request - */ - async sendRequest(request3) { - if (isNode) { - return this._nextPolicy.sendRequest(request3); + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); } - if (request3.method.toUpperCase() === "GET" || request3.method.toUpperCase() === "HEAD") { - request3.url = setURLParameter(request3.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + 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()); } - request3.headers.remove(HeaderConstants.COOKIE); - request3.headers.remove(HeaderConstants.CONTENT_LENGTH); - return this._nextPolicy.sendRequest(request3); + 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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js -var StorageBrowserPolicyFactory; -var init_StorageBrowserPolicyFactory = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { "use strict"; - init_StorageBrowserPolicy(); - StorageBrowserPolicyFactory = class { + 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. * @@ -40248,240 +44695,76 @@ var init_StorageBrowserPolicyFactory = __esm({ * @param options - */ create(nextPolicy, options2) { - return new StorageBrowserPolicy(nextPolicy, options2); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options2); } }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js -function storageCorrectContentLengthPolicy() { - function correctContentLength(request3) { - if (request3.body && (typeof request3.body === "string" || Buffer.isBuffer(request3.body)) && request3.body.length > 0) { - request3.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request3.body)); - } - } - return { - name: storageCorrectContentLengthPolicyName, - async sendRequest(request3, next) { - correctContentLength(request3); - return next(request3); - } - }; -} -var storageCorrectContentLengthPolicyName; -var init_StorageCorrectContentLengthPolicy = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { "use strict"; - init_constants2(); - storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Pipeline.js -function isPipelineLike(pipeline) { - if (!pipeline || typeof pipeline !== "object") { - return false; - } - const castPipeline = pipeline; - return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; -} -function newPipeline(credential, pipelineOptions = {}) { - if (!credential) { - credential = new AnonymousCredential(); - } - const pipeline = new Pipeline([], pipelineOptions); - pipeline._credential = credential; - return pipeline; -} -function processDownlevelPipeline(pipeline) { - const knownFactoryFunctions = [ - isAnonymousCredential, - isStorageSharedKeyCredential, - isCoreHttpBearerTokenFactory, - isStorageBrowserPolicyFactory, - isStorageRetryPolicyFactory, - isStorageTelemetryPolicyFactory, - isCoreHttpPolicyFactory - ]; - if (pipeline.factories.length) { - const novelFactories = pipeline.factories.filter((factory) => { - return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory)); - }); - if (novelFactories.length) { - const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); - return { - wrappedPolicies: createRequestPolicyFactoryPolicy(novelFactories), - afterRetry: hasInjector - }; - } - } - return void 0; -} -function getCoreClientOptions(pipeline) { - var _a3; - const _b2 = pipeline.options, { httpClient: v1Client } = _b2, restOptions = __rest(_b2, ["httpClient"]); - let httpClient = pipeline._coreHttpClient; - if (!httpClient) { - httpClient = v1Client ? convertHttpClient(v1Client) : getCachedDefaultHttpClient2(); - pipeline._coreHttpClient = httpClient; - } - let corePipeline = pipeline._corePipeline; - if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION2}`; - const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger3.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + 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(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } - }, deserializationOptions: { - parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); - corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); - const downlevelResults = processDownlevelPipeline(pipeline); - if (downlevelResults) { - corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); - } - const credential = getCredentialFromPipeline(pipeline); - if (isTokenCredential(credential)) { - corePipeline.addPolicy(bearerTokenAuthenticationPolicy({ - credential, - scopes: (_a3 = restOptions.audience) !== null && _a3 !== void 0 ? _a3 : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: authorizeRequestOnTenantChallenge } - }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ - accountName: credential.accountName, - accountKey: credential.accountKey - }), { phase: "Sign" }); - } - pipeline._corePipeline = corePipeline; - } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); -} -function getCredentialFromPipeline(pipeline) { - if (pipeline._credential) { - return pipeline._credential; - } - let credential = new AnonymousCredential(); - for (const factory of pipeline.factories) { - if (isTokenCredential(factory.credential)) { - credential = factory.credential; - } else if (isStorageSharedKeyCredential(factory)) { - return factory; - } - } - return credential; -} -function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { - return true; - } - return factory.constructor.name === "StorageSharedKeyCredential"; -} -function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { - return true; - } - return factory.constructor.name === "AnonymousCredential"; -} -function isCoreHttpBearerTokenFactory(factory) { - return isTokenCredential(factory.credential); -} -function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { - return true; - } - return factory.constructor.name === "StorageBrowserPolicyFactory"; -} -function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { - return true; - } - return factory.constructor.name === "StorageRetryPolicyFactory"; -} -function isStorageTelemetryPolicyFactory(factory) { - return factory.constructor.name === "TelemetryPolicyFactory"; -} -function isInjectorPolicyFactory(factory) { - return factory.constructor.name === "InjectorPolicyFactory"; -} -function isCoreHttpPolicyFactory(factory) { - const knownPolicies = [ - "GenerateClientRequestIdPolicy", - "TracingPolicy", - "LogPolicy", - "ProxyPolicy", - "DisableResponseDecompressionPolicy", - "KeepAlivePolicy", - "DeserializationPolicy" - ]; - const mockHttpClient = { - sendRequest: async (request3) => { return { - request: request3, - headers: request3.headers.clone(), - status: 500 + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } }; } - }; - const mockRequestPolicyOptions2 = { - log(_logLevel, _message) { - }, - shouldLog(_logLevel) { - return false; + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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_constants9(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs11(); + 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; + } + const castPipeline = pipeline; + return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } - }; - const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions2); - const policyName = policyInstance.constructor.name; - return knownPolicies.some((knownPolicyName) => { - return policyName.startsWith(knownPolicyName); - }); -} -var Pipeline; -var init_Pipeline = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Pipeline.js"() { - "use strict"; - init_tslib_es6(); - init_esm8(); - init_esm5(); - init_esm7(); - init_esm9(); - init_esm6(); - init_log4(); - init_StorageRetryPolicyFactory(); - init_StorageSharedKeyCredential(); - init_AnonymousCredential(); - init_constants2(); - init_cache(); - init_StorageBrowserPolicyV2(); - init_StorageRetryPolicyV2(); - init_StorageSharedKeyCredentialPolicyV2(); - init_StorageBrowserPolicyFactory(); - init_StorageCorrectContentLengthPolicy(); - Pipeline = class { + var Pipeline = class { /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -40489,6 +44772,14 @@ var init_Pipeline = __esm({ * @param options - */ constructor(factories, options2 = {}) { + /** + * A list of chained request policy factories. + */ + __publicField(this, "factories"); + /** + * Configures pipeline logger and HTTP client. + */ + __publicField(this, "options"); this.factories = factories; this.options = options2; } @@ -40505,23 +44796,216 @@ var init_Pipeline = __esm({ }; } }; + exports2.Pipeline = Pipeline; + function newPipeline(credential, pipelineOptions = {}) { + if (!credential) { + credential = new AnonymousCredential_js_1.AnonymousCredential(); + } + const pipeline = new Pipeline([], pipelineOptions); + pipeline._credential = credential; + return pipeline; + } + function processDownlevelPipeline(pipeline) { + const knownFactoryFunctions = [ + isAnonymousCredential, + isStorageSharedKeyCredential, + isCoreHttpBearerTokenFactory, + isStorageBrowserPolicyFactory, + isStorageRetryPolicyFactory, + isStorageTelemetryPolicyFactory, + isCoreHttpPolicyFactory + ]; + if (pipeline.factories.length) { + const novelFactories = pipeline.factories.filter((factory) => { + return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory)); + }); + if (novelFactories.length) { + const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); + return { + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), + afterRetry: hasInjector + }; + } + } + return void 0; + } + function getCoreClientOptions(pipeline) { + const { httpClient: v1Client, ...restOptions } = pipeline.options; + let httpClient = pipeline._coreHttpClient; + if (!httpClient) { + 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/${constants_js_1.SDK_VERSION}`; + const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; + 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: "#" + } + } + } + }); + corePipeline.removePolicy({ phase: "Retry" }); + 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, 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 ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ + credential, + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } + }), { phase: "Sign" }); + } 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 { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; + } + function getCredentialFromPipeline(pipeline) { + if (pipeline._credential) { + return pipeline._credential; + } + let credential = new AnonymousCredential_js_1.AnonymousCredential(); + for (const factory of pipeline.factories) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { + credential = factory.credential; + } else if (isStorageSharedKeyCredential(factory)) { + return factory; + } + } + return credential; + } + function isStorageSharedKeyCredential(factory) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + return true; + } + return factory.constructor.name === "StorageSharedKeyCredential"; + } + function isAnonymousCredential(factory) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { + return true; + } + return factory.constructor.name === "AnonymousCredential"; + } + function isCoreHttpBearerTokenFactory(factory) { + return (0, core_auth_1.isTokenCredential)(factory.credential); + } + function isStorageBrowserPolicyFactory(factory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { + return true; + } + return factory.constructor.name === "StorageBrowserPolicyFactory"; + } + function isStorageRetryPolicyFactory(factory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { + return true; + } + return factory.constructor.name === "StorageRetryPolicyFactory"; + } + function isStorageTelemetryPolicyFactory(factory) { + return factory.constructor.name === "TelemetryPolicyFactory"; + } + function isInjectorPolicyFactory(factory) { + return factory.constructor.name === "InjectorPolicyFactory"; + } + function isCoreHttpPolicyFactory(factory) { + const knownPolicies = [ + "GenerateClientRequestIdPolicy", + "TracingPolicy", + "LogPolicy", + "ProxyPolicy", + "DisableResponseDecompressionPolicy", + "KeepAlivePolicy", + "DeserializationPolicy" + ]; + const mockHttpClient = { + sendRequest: async (request) => { + return { + request, + headers: request.headers.clone(), + status: 500 + }; + } + }; + const mockRequestPolicyOptions = { + log(_logLevel, _message) { + }, + shouldLog(_logLevel) { + return false; + } + }; + const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions); + const policyName = policyInstance.constructor.name; + return knownPolicies.some((knownPolicyName) => { + return policyName.startsWith(knownPolicyName); + }); + } } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/index.js -var KnownEncryptionAlgorithmType, KnownBlobExpiryOptions, KnownStorageErrorCode; -var init_models = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/index.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { "use strict"; - (function(KnownEncryptionAlgorithmType3) { - KnownEncryptionAlgorithmType3["AES256"] = "AES256"; - })(KnownEncryptionAlgorithmType || (KnownEncryptionAlgorithmType = {})); + 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 || (KnownBlobExpiryOptions = {})); + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; (function(KnownStorageErrorCode2) { KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; @@ -40637,198 +45121,20 @@ var init_models = __esm({ KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; - })(KnownStorageErrorCode || (KnownStorageErrorCode = {})); - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/mappers.js -var mappers_exports = {}; -__export(mappers_exports, { - AccessPolicy: () => AccessPolicy, - AppendBlobAppendBlockExceptionHeaders: () => AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders: () => AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders: () => AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders: () => AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders: () => AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders: () => AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders: () => AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders: () => AppendBlobSealHeaders, - ArrowConfiguration: () => ArrowConfiguration, - ArrowField: () => ArrowField, - BlobAbortCopyFromURLExceptionHeaders: () => BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders: () => BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders: () => BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders: () => BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders: () => BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders: () => BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders: () => BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders: () => BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders: () => BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders: () => BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders: () => BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders: () => BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders: () => BlobDeleteExceptionHeaders, - BlobDeleteHeaders: () => BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders: () => BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders: () => BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders: () => BlobDownloadExceptionHeaders, - BlobDownloadHeaders: () => BlobDownloadHeaders, - BlobFlatListSegment: () => BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders: () => BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders: () => BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders: () => BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders: () => BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders: () => BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders: () => BlobGetTagsHeaders, - BlobHierarchyListSegment: () => BlobHierarchyListSegment, - BlobItemInternal: () => BlobItemInternal, - BlobName: () => BlobName, - BlobPrefix: () => BlobPrefix, - BlobPropertiesInternal: () => BlobPropertiesInternal, - BlobQueryExceptionHeaders: () => BlobQueryExceptionHeaders, - BlobQueryHeaders: () => BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders: () => BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders: () => BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders: () => BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders: () => BlobRenewLeaseHeaders, - BlobServiceProperties: () => BlobServiceProperties, - BlobServiceStatistics: () => BlobServiceStatistics, - BlobSetExpiryExceptionHeaders: () => BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders: () => BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders: () => BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders: () => BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders: () => BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders: () => BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders: () => BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders: () => BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders: () => BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders: () => BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders: () => BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders: () => BlobSetTagsHeaders, - BlobSetTierExceptionHeaders: () => BlobSetTierExceptionHeaders, - BlobSetTierHeaders: () => BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders: () => BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders: () => BlobStartCopyFromURLHeaders, - BlobTag: () => BlobTag, - BlobTags: () => BlobTags, - BlobUndeleteExceptionHeaders: () => BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders: () => BlobUndeleteHeaders, - Block: () => Block, - BlockBlobCommitBlockListExceptionHeaders: () => BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders: () => BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders: () => BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders: () => BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders: () => BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders: () => BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders: () => BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders: () => BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders: () => BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders: () => BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders: () => BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders: () => BlockBlobUploadHeaders, - BlockList: () => BlockList, - BlockLookupList: () => BlockLookupList, - ClearRange: () => ClearRange, - ContainerAcquireLeaseExceptionHeaders: () => ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders: () => ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders: () => ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders: () => ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders: () => ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders: () => ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders: () => ContainerCreateExceptionHeaders, - ContainerCreateHeaders: () => ContainerCreateHeaders, - ContainerDeleteExceptionHeaders: () => ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders: () => ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders: () => ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders: () => ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders: () => ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders: () => ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders: () => ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders: () => ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders: () => ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders: () => ContainerGetPropertiesHeaders, - ContainerItem: () => ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders: () => ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders: () => ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders: () => ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders: () => ContainerListBlobHierarchySegmentHeaders, - ContainerProperties: () => ContainerProperties, - ContainerReleaseLeaseExceptionHeaders: () => ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders: () => ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders: () => ContainerRenameExceptionHeaders, - ContainerRenameHeaders: () => ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders: () => ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders: () => ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders: () => ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders: () => ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders: () => ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders: () => ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders: () => ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders: () => ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders: () => ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders: () => ContainerSubmitBatchHeaders, - CorsRule: () => CorsRule, - DelimitedTextConfiguration: () => DelimitedTextConfiguration, - FilterBlobItem: () => FilterBlobItem, - FilterBlobSegment: () => FilterBlobSegment, - GeoReplication: () => GeoReplication, - JsonTextConfiguration: () => JsonTextConfiguration, - KeyInfo: () => KeyInfo, - ListBlobsFlatSegmentResponse: () => ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse: () => ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse: () => ListContainersSegmentResponse, - Logging: () => Logging, - Metrics: () => Metrics, - PageBlobClearPagesExceptionHeaders: () => PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders: () => PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders: () => PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders: () => PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders: () => PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders: () => PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders: () => PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders: () => PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders: () => PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders: () => PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders: () => PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders: () => PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders: () => PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders: () => PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders: () => PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders: () => PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders: () => PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders: () => PageBlobUploadPagesHeaders, - PageList: () => PageList, - PageRange: () => PageRange, - QueryFormat: () => QueryFormat, - QueryRequest: () => QueryRequest, - QuerySerialization: () => QuerySerialization, - RetentionPolicy: () => RetentionPolicy, - ServiceFilterBlobsExceptionHeaders: () => ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders: () => ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders: () => ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders: () => ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders: () => ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders: () => ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders: () => ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders: () => ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders: () => ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders: () => ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders: () => ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders: () => ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders: () => ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders: () => ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders: () => ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders: () => ServiceSubmitBatchHeaders, - SignedIdentifier: () => SignedIdentifier, - StaticWebsite: () => StaticWebsite, - StorageError: () => StorageError, - UserDelegationKey: () => UserDelegationKey -}); -var BlobServiceProperties, Logging, RetentionPolicy, Metrics, CorsRule, StaticWebsite, StorageError, BlobServiceStatistics, GeoReplication, ListContainersSegmentResponse, ContainerItem, ContainerProperties, KeyInfo, UserDelegationKey, FilterBlobSegment, FilterBlobItem, BlobTags, BlobTag, SignedIdentifier, AccessPolicy, ListBlobsFlatSegmentResponse, BlobFlatListSegment, BlobItemInternal, BlobName, BlobPropertiesInternal, ListBlobsHierarchySegmentResponse, BlobHierarchyListSegment, BlobPrefix, BlockLookupList, BlockList, Block, PageList, PageRange, ClearRange, QueryRequest, QuerySerialization, QueryFormat, DelimitedTextConfiguration, JsonTextConfiguration, ArrowConfiguration, ArrowField, ServiceSetPropertiesHeaders, ServiceSetPropertiesExceptionHeaders, ServiceGetPropertiesHeaders, ServiceGetPropertiesExceptionHeaders, ServiceGetStatisticsHeaders, ServiceGetStatisticsExceptionHeaders, ServiceListContainersSegmentHeaders, ServiceListContainersSegmentExceptionHeaders, ServiceGetUserDelegationKeyHeaders, ServiceGetUserDelegationKeyExceptionHeaders, ServiceGetAccountInfoHeaders, ServiceGetAccountInfoExceptionHeaders, ServiceSubmitBatchHeaders, ServiceSubmitBatchExceptionHeaders, ServiceFilterBlobsHeaders, ServiceFilterBlobsExceptionHeaders, ContainerCreateHeaders, ContainerCreateExceptionHeaders, ContainerGetPropertiesHeaders, ContainerGetPropertiesExceptionHeaders, ContainerDeleteHeaders, ContainerDeleteExceptionHeaders, ContainerSetMetadataHeaders, ContainerSetMetadataExceptionHeaders, ContainerGetAccessPolicyHeaders, ContainerGetAccessPolicyExceptionHeaders, ContainerSetAccessPolicyHeaders, ContainerSetAccessPolicyExceptionHeaders, ContainerRestoreHeaders, ContainerRestoreExceptionHeaders, ContainerRenameHeaders, ContainerRenameExceptionHeaders, ContainerSubmitBatchHeaders, ContainerSubmitBatchExceptionHeaders, ContainerFilterBlobsHeaders, ContainerFilterBlobsExceptionHeaders, ContainerAcquireLeaseHeaders, ContainerAcquireLeaseExceptionHeaders, ContainerReleaseLeaseHeaders, ContainerReleaseLeaseExceptionHeaders, ContainerRenewLeaseHeaders, ContainerRenewLeaseExceptionHeaders, ContainerBreakLeaseHeaders, ContainerBreakLeaseExceptionHeaders, ContainerChangeLeaseHeaders, ContainerChangeLeaseExceptionHeaders, ContainerListBlobFlatSegmentHeaders, ContainerListBlobFlatSegmentExceptionHeaders, ContainerListBlobHierarchySegmentHeaders, ContainerListBlobHierarchySegmentExceptionHeaders, ContainerGetAccountInfoHeaders, ContainerGetAccountInfoExceptionHeaders, BlobDownloadHeaders, BlobDownloadExceptionHeaders, BlobGetPropertiesHeaders, BlobGetPropertiesExceptionHeaders, BlobDeleteHeaders, BlobDeleteExceptionHeaders, BlobUndeleteHeaders, BlobUndeleteExceptionHeaders, BlobSetExpiryHeaders, BlobSetExpiryExceptionHeaders, BlobSetHttpHeadersHeaders, BlobSetHttpHeadersExceptionHeaders, BlobSetImmutabilityPolicyHeaders, BlobSetImmutabilityPolicyExceptionHeaders, BlobDeleteImmutabilityPolicyHeaders, BlobDeleteImmutabilityPolicyExceptionHeaders, BlobSetLegalHoldHeaders, BlobSetLegalHoldExceptionHeaders, BlobSetMetadataHeaders, BlobSetMetadataExceptionHeaders, BlobAcquireLeaseHeaders, BlobAcquireLeaseExceptionHeaders, BlobReleaseLeaseHeaders, BlobReleaseLeaseExceptionHeaders, BlobRenewLeaseHeaders, BlobRenewLeaseExceptionHeaders, BlobChangeLeaseHeaders, BlobChangeLeaseExceptionHeaders, BlobBreakLeaseHeaders, BlobBreakLeaseExceptionHeaders, BlobCreateSnapshotHeaders, BlobCreateSnapshotExceptionHeaders, BlobStartCopyFromURLHeaders, BlobStartCopyFromURLExceptionHeaders, BlobCopyFromURLHeaders, BlobCopyFromURLExceptionHeaders, BlobAbortCopyFromURLHeaders, BlobAbortCopyFromURLExceptionHeaders, BlobSetTierHeaders, BlobSetTierExceptionHeaders, BlobGetAccountInfoHeaders, BlobGetAccountInfoExceptionHeaders, BlobQueryHeaders, BlobQueryExceptionHeaders, BlobGetTagsHeaders, BlobGetTagsExceptionHeaders, BlobSetTagsHeaders, BlobSetTagsExceptionHeaders, PageBlobCreateHeaders, PageBlobCreateExceptionHeaders, PageBlobUploadPagesHeaders, PageBlobUploadPagesExceptionHeaders, PageBlobClearPagesHeaders, PageBlobClearPagesExceptionHeaders, PageBlobUploadPagesFromURLHeaders, PageBlobUploadPagesFromURLExceptionHeaders, PageBlobGetPageRangesHeaders, PageBlobGetPageRangesExceptionHeaders, PageBlobGetPageRangesDiffHeaders, PageBlobGetPageRangesDiffExceptionHeaders, PageBlobResizeHeaders, PageBlobResizeExceptionHeaders, PageBlobUpdateSequenceNumberHeaders, PageBlobUpdateSequenceNumberExceptionHeaders, PageBlobCopyIncrementalHeaders, PageBlobCopyIncrementalExceptionHeaders, AppendBlobCreateHeaders, AppendBlobCreateExceptionHeaders, AppendBlobAppendBlockHeaders, AppendBlobAppendBlockExceptionHeaders, AppendBlobAppendBlockFromUrlHeaders, AppendBlobAppendBlockFromUrlExceptionHeaders, AppendBlobSealHeaders, AppendBlobSealExceptionHeaders, BlockBlobUploadHeaders, BlockBlobUploadExceptionHeaders, BlockBlobPutBlobFromUrlHeaders, BlockBlobPutBlobFromUrlExceptionHeaders, BlockBlobStageBlockHeaders, BlockBlobStageBlockExceptionHeaders, BlockBlobStageBlockFromURLHeaders, BlockBlobStageBlockFromURLExceptionHeaders, BlockBlobCommitBlockListHeaders, BlockBlobCommitBlockListExceptionHeaders, BlockBlobGetBlockListHeaders, BlockBlobGetBlockListExceptionHeaders; -var init_mappers = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/mappers.js"() { - "use strict"; - BlobServiceProperties = { + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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: { @@ -40900,7 +45206,7 @@ var init_mappers = __esm({ } } }; - Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -40949,7 +45255,7 @@ var init_mappers = __esm({ } } }; - RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -40976,7 +45282,7 @@ var init_mappers = __esm({ } } }; - Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -41015,7 +45321,7 @@ var init_mappers = __esm({ } } }; - CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -41067,7 +45373,7 @@ var init_mappers = __esm({ } } }; - StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -41105,7 +45411,7 @@ var init_mappers = __esm({ } } }; - StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -41135,7 +45441,7 @@ var init_mappers = __esm({ } } }; - BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -41153,7 +45459,7 @@ var init_mappers = __esm({ } } }; - GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -41179,7 +45485,7 @@ var init_mappers = __esm({ } } }; - ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -41242,7 +45548,7 @@ var init_mappers = __esm({ } } }; - ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -41290,7 +45596,7 @@ var init_mappers = __esm({ } } }; - ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -41402,7 +45708,7 @@ var init_mappers = __esm({ } } }; - KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -41427,7 +45733,7 @@ var init_mappers = __esm({ } } }; - UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -41492,7 +45798,7 @@ var init_mappers = __esm({ } } }; - FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -41542,7 +45848,7 @@ var init_mappers = __esm({ } } }; - FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -41576,7 +45882,7 @@ var init_mappers = __esm({ } } }; - BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -41602,7 +45908,7 @@ var init_mappers = __esm({ } } }; - BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -41628,7 +45934,7 @@ var init_mappers = __esm({ } } }; - SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -41654,7 +45960,7 @@ var init_mappers = __esm({ } } }; - AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -41684,7 +45990,7 @@ var init_mappers = __esm({ } } }; - ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -41748,7 +46054,7 @@ var init_mappers = __esm({ } } }; - BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -41773,7 +46079,7 @@ var init_mappers = __esm({ } } }; - BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -41860,7 +46166,7 @@ var init_mappers = __esm({ } } }; - BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -41885,7 +46191,7 @@ var init_mappers = __esm({ } } }; - BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -42212,7 +46518,7 @@ var init_mappers = __esm({ } } }; - ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -42283,7 +46589,7 @@ var init_mappers = __esm({ } } }; - BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -42322,7 +46628,7 @@ var init_mappers = __esm({ } } }; - BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -42339,7 +46645,7 @@ var init_mappers = __esm({ } } }; - BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -42388,7 +46694,7 @@ var init_mappers = __esm({ } } }; - BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -42427,7 +46733,7 @@ var init_mappers = __esm({ } } }; - Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -42452,7 +46758,7 @@ var init_mappers = __esm({ } } }; - PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -42496,7 +46802,7 @@ var init_mappers = __esm({ } } }; - PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -42522,7 +46828,7 @@ var init_mappers = __esm({ } } }; - ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -42548,7 +46854,7 @@ var init_mappers = __esm({ } } }; - QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -42590,7 +46896,7 @@ var init_mappers = __esm({ } } }; - QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -42607,7 +46913,7 @@ var init_mappers = __esm({ } } }; - QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -42657,7 +46963,7 @@ var init_mappers = __esm({ } } }; - DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -42702,7 +47008,7 @@ var init_mappers = __esm({ } } }; - JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -42719,7 +47025,7 @@ var init_mappers = __esm({ } } }; - ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -42745,7 +47051,7 @@ var init_mappers = __esm({ } } }; - ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -42784,7 +47090,7 @@ var init_mappers = __esm({ } } }; - ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -42821,7 +47127,7 @@ var init_mappers = __esm({ } } }; - ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -42837,7 +47143,7 @@ var init_mappers = __esm({ } } }; - ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -42874,7 +47180,7 @@ var init_mappers = __esm({ } } }; - ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -42890,7 +47196,7 @@ var init_mappers = __esm({ } } }; - ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -42934,7 +47240,7 @@ var init_mappers = __esm({ } } }; - ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -42950,7 +47256,7 @@ var init_mappers = __esm({ } } }; - ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -42987,7 +47293,7 @@ var init_mappers = __esm({ } } }; - ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -43003,7 +47309,7 @@ var init_mappers = __esm({ } } }; - ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -43047,7 +47353,7 @@ var init_mappers = __esm({ } } }; - ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -43063,7 +47369,7 @@ var init_mappers = __esm({ } } }; - ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -43142,7 +47448,7 @@ var init_mappers = __esm({ } } }; - ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -43158,7 +47464,7 @@ var init_mappers = __esm({ } } }; - ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -43202,7 +47508,7 @@ var init_mappers = __esm({ } } }; - ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -43218,7 +47524,7 @@ var init_mappers = __esm({ } } }; - ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -43262,7 +47568,7 @@ var init_mappers = __esm({ } } }; - ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -43278,7 +47584,7 @@ var init_mappers = __esm({ } } }; - ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -43336,7 +47642,7 @@ var init_mappers = __esm({ } } }; - ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -43352,7 +47658,7 @@ var init_mappers = __esm({ } } }; - ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -43492,7 +47798,7 @@ var init_mappers = __esm({ } } }; - ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -43508,7 +47814,7 @@ var init_mappers = __esm({ } } }; - ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -43552,7 +47858,7 @@ var init_mappers = __esm({ } } }; - ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -43568,7 +47874,7 @@ var init_mappers = __esm({ } } }; - ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -43626,7 +47932,7 @@ var init_mappers = __esm({ } } }; - ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -43642,7 +47948,7 @@ var init_mappers = __esm({ } } }; - ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -43708,7 +48014,7 @@ var init_mappers = __esm({ } } }; - ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -43724,7 +48030,7 @@ var init_mappers = __esm({ } } }; - ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -43782,7 +48088,7 @@ var init_mappers = __esm({ } } }; - ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -43798,7 +48104,7 @@ var init_mappers = __esm({ } } }; - ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -43842,7 +48148,7 @@ var init_mappers = __esm({ } } }; - ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -43858,7 +48164,7 @@ var init_mappers = __esm({ } } }; - ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -43902,7 +48208,7 @@ var init_mappers = __esm({ } } }; - ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -43918,7 +48224,7 @@ var init_mappers = __esm({ } } }; - ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -43948,7 +48254,7 @@ var init_mappers = __esm({ } } }; - ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -43964,7 +48270,7 @@ var init_mappers = __esm({ } } }; - ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -44001,7 +48307,7 @@ var init_mappers = __esm({ } } }; - ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -44017,7 +48323,7 @@ var init_mappers = __esm({ } } }; - ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -44075,7 +48381,7 @@ var init_mappers = __esm({ } } }; - ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -44091,7 +48397,7 @@ var init_mappers = __esm({ } } }; - ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -44142,7 +48448,7 @@ var init_mappers = __esm({ } } }; - ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -44158,7 +48464,7 @@ var init_mappers = __esm({ } } }; - ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -44216,7 +48522,7 @@ var init_mappers = __esm({ } } }; - ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -44232,7 +48538,7 @@ var init_mappers = __esm({ } } }; - ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -44290,7 +48596,7 @@ var init_mappers = __esm({ } } }; - ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -44306,7 +48612,7 @@ var init_mappers = __esm({ } } }; - ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -44364,7 +48670,7 @@ var init_mappers = __esm({ } } }; - ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -44380,7 +48686,7 @@ var init_mappers = __esm({ } } }; - ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -44431,7 +48737,7 @@ var init_mappers = __esm({ } } }; - ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -44447,7 +48753,7 @@ var init_mappers = __esm({ } } }; - ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -44498,7 +48804,7 @@ var init_mappers = __esm({ } } }; - ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -44514,7 +48820,7 @@ var init_mappers = __esm({ } } }; - ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -44586,7 +48892,7 @@ var init_mappers = __esm({ } } }; - ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -44602,7 +48908,7 @@ var init_mappers = __esm({ } } }; - BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -44942,7 +49248,7 @@ var init_mappers = __esm({ } } }; - BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -44958,7 +49264,7 @@ var init_mappers = __esm({ } } }; - BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -45334,7 +49640,7 @@ var init_mappers = __esm({ } } }; - BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -45350,7 +49656,7 @@ var init_mappers = __esm({ } } }; - BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -45394,7 +49700,7 @@ var init_mappers = __esm({ } } }; - BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -45410,7 +49716,7 @@ var init_mappers = __esm({ } } }; - BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -45454,7 +49760,7 @@ var init_mappers = __esm({ } } }; - BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -45470,7 +49776,7 @@ var init_mappers = __esm({ } } }; - BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -45521,7 +49827,7 @@ var init_mappers = __esm({ } } }; - BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -45537,7 +49843,7 @@ var init_mappers = __esm({ } } }; - BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -45602,7 +49908,7 @@ var init_mappers = __esm({ } } }; - BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -45618,7 +49924,7 @@ var init_mappers = __esm({ } } }; - BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -45670,7 +49976,7 @@ var init_mappers = __esm({ } } }; - BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -45686,7 +49992,7 @@ var init_mappers = __esm({ } } }; - BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -45723,7 +50029,7 @@ var init_mappers = __esm({ } } }; - BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -45739,7 +50045,7 @@ var init_mappers = __esm({ } } }; - BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -45783,7 +50089,7 @@ var init_mappers = __esm({ } } }; - BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -45799,7 +50105,7 @@ var init_mappers = __esm({ } } }; - BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -45885,7 +50191,7 @@ var init_mappers = __esm({ } } }; - BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -45901,7 +50207,7 @@ var init_mappers = __esm({ } } }; - BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -45959,7 +50265,7 @@ var init_mappers = __esm({ } } }; - BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -45975,7 +50281,7 @@ var init_mappers = __esm({ } } }; - BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -46026,7 +50332,7 @@ var init_mappers = __esm({ } } }; - BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -46042,7 +50348,7 @@ var init_mappers = __esm({ } } }; - BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -46100,7 +50406,7 @@ var init_mappers = __esm({ } } }; - BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -46116,7 +50422,7 @@ var init_mappers = __esm({ } } }; - BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -46174,7 +50480,7 @@ var init_mappers = __esm({ } } }; - BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -46190,7 +50496,7 @@ var init_mappers = __esm({ } } }; - BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -46248,7 +50554,7 @@ var init_mappers = __esm({ } } }; - BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -46264,7 +50570,7 @@ var init_mappers = __esm({ } } }; - BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -46343,7 +50649,7 @@ var init_mappers = __esm({ } } }; - BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -46359,7 +50665,7 @@ var init_mappers = __esm({ } } }; - BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -46439,7 +50745,7 @@ var init_mappers = __esm({ } } }; - BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -46455,7 +50761,7 @@ var init_mappers = __esm({ } } }; - BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -46556,7 +50862,7 @@ var init_mappers = __esm({ } } }; - BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -46572,7 +50878,7 @@ var init_mappers = __esm({ } } }; - BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -46616,7 +50922,7 @@ var init_mappers = __esm({ } } }; - BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -46632,7 +50938,7 @@ var init_mappers = __esm({ } } }; - BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -46669,7 +50975,7 @@ var init_mappers = __esm({ } } }; - BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -46685,7 +50991,7 @@ var init_mappers = __esm({ } } }; - BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -46757,7 +51063,7 @@ var init_mappers = __esm({ } } }; - BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -46773,7 +51079,7 @@ var init_mappers = __esm({ } } }; - BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -47033,7 +51339,7 @@ var init_mappers = __esm({ } } }; - BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -47049,7 +51355,7 @@ var init_mappers = __esm({ } } }; - BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -47093,7 +51399,7 @@ var init_mappers = __esm({ } } }; - BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -47109,7 +51415,7 @@ var init_mappers = __esm({ } } }; - BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -47153,7 +51459,7 @@ var init_mappers = __esm({ } } }; - BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -47169,7 +51475,7 @@ var init_mappers = __esm({ } } }; - PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -47262,7 +51568,7 @@ var init_mappers = __esm({ } } }; - PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -47278,7 +51584,7 @@ var init_mappers = __esm({ } } }; - PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -47378,7 +51684,7 @@ var init_mappers = __esm({ } } }; - PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -47394,7 +51700,7 @@ var init_mappers = __esm({ } } }; - PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -47473,7 +51779,7 @@ var init_mappers = __esm({ } } }; - PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -47489,7 +51795,7 @@ var init_mappers = __esm({ } } }; - PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -47582,7 +51888,7 @@ var init_mappers = __esm({ } } }; - PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -47598,7 +51904,7 @@ var init_mappers = __esm({ } } }; - PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -47663,7 +51969,7 @@ var init_mappers = __esm({ } } }; - PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -47679,7 +51985,7 @@ var init_mappers = __esm({ } } }; - PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -47744,7 +52050,7 @@ var init_mappers = __esm({ } } }; - PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -47760,7 +52066,7 @@ var init_mappers = __esm({ } } }; - PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -47825,7 +52131,7 @@ var init_mappers = __esm({ } } }; - PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -47841,7 +52147,7 @@ var init_mappers = __esm({ } } }; - PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -47906,7 +52212,7 @@ var init_mappers = __esm({ } } }; - PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -47922,7 +52228,7 @@ var init_mappers = __esm({ } } }; - PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -47995,7 +52301,7 @@ var init_mappers = __esm({ } } }; - PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -48011,7 +52317,7 @@ var init_mappers = __esm({ } } }; - AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -48104,7 +52410,7 @@ var init_mappers = __esm({ } } }; - AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -48120,7 +52426,7 @@ var init_mappers = __esm({ } } }; - AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -48227,7 +52533,7 @@ var init_mappers = __esm({ } } }; - AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -48243,7 +52549,7 @@ var init_mappers = __esm({ } } }; - AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -48343,7 +52649,7 @@ var init_mappers = __esm({ } } }; - AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -48359,7 +52665,7 @@ var init_mappers = __esm({ } } }; - AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -48417,7 +52723,7 @@ var init_mappers = __esm({ } } }; - AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -48433,7 +52739,7 @@ var init_mappers = __esm({ } } }; - BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -48526,7 +52832,7 @@ var init_mappers = __esm({ } } }; - BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -48542,7 +52848,7 @@ var init_mappers = __esm({ } } }; - BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -48635,7 +52941,7 @@ var init_mappers = __esm({ } } }; - BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -48651,7 +52957,7 @@ var init_mappers = __esm({ } } }; - BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -48730,7 +53036,7 @@ var init_mappers = __esm({ } } }; - BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -48746,7 +53052,7 @@ var init_mappers = __esm({ } } }; - BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -48825,7 +53131,7 @@ var init_mappers = __esm({ } } }; - BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -48841,7 +53147,7 @@ var init_mappers = __esm({ } } }; - BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -48941,7 +53247,7 @@ var init_mappers = __esm({ } } }; - BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -48957,7 +53263,7 @@ var init_mappers = __esm({ } } }; - BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -49029,7 +53335,7 @@ var init_mappers = __esm({ } } }; - BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -49048,13 +53354,16 @@ var init_mappers = __esm({ } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/parameters.js -var contentType, blobServiceProperties, accept, url, restype, comp, timeoutInSeconds, version2, requestId, accept1, comp1, comp2, prefix, marker, maxPageSize, include, keyInfo, comp3, restype1, body, comp4, contentLength, multipartContentType, comp5, where, restype2, metadata, access, defaultEncryptionScope, preventEncryptionScopeOverride, leaseId, ifModifiedSince, ifUnmodifiedSince, comp6, comp7, containerAcl, comp8, deletedContainerName, deletedContainerVersion, comp9, sourceContainerName, sourceLeaseId, comp10, action, duration3, proposedLeaseId, action1, leaseId1, action2, action3, breakPeriod, action4, proposedLeaseId1, include1, delimiter, snapshot, versionId, range, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifMatch, ifNoneMatch, ifTags, deleteSnapshots, blobDeleteType, comp11, expiryOptions, expiresOn, blobCacheControl, blobContentType, blobContentMD5, blobContentEncoding, blobContentLanguage, blobContentDisposition, comp12, immutabilityPolicyExpiry, immutabilityPolicyMode, comp13, legalHold, encryptionScope, comp14, tier, rehydratePriority, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, copySource, blobTagsString, sealBlob, legalHold1, xMsRequiresSync, sourceContentMD5, copySourceAuthorization, copySourceTags, comp15, copyActionAbortConstant, copyId, comp16, tier1, queryRequest, comp17, comp18, tags, transactionalContentMD5, transactionalContentCrc64, blobType, blobContentLength, blobSequenceNumber, contentType1, body1, accept2, comp19, pageWrite, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, pageWrite1, sourceUrl, sourceRange, sourceContentCrc64, range1, comp20, prevsnapshot, prevSnapshotUrl, sequenceNumberAction, comp21, blobType1, comp22, maxSize, appendPosition, sourceRange1, comp23, blobType2, copySourceBlobProperties, comp24, blockId, blocks, comp25, listType; -var init_parameters = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/parameters.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { "use strict"; - init_mappers(); - contentType = { + 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", @@ -49065,11 +53374,11 @@ var init_parameters = __esm({ } } }; - blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -49080,7 +53389,7 @@ var init_parameters = __esm({ } } }; - url = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -49092,7 +53401,7 @@ var init_parameters = __esm({ }, skipEncoding: true }; - restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -49103,7 +53412,7 @@ var init_parameters = __esm({ } } }; - comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -49114,7 +53423,7 @@ var init_parameters = __esm({ } } }; - timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -49127,10 +53436,10 @@ var init_parameters = __esm({ } } }; - version2 = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2025-05-05", + defaultValue: "2025-07-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -49138,7 +53447,7 @@ var init_parameters = __esm({ } } }; - requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -49148,7 +53457,7 @@ var init_parameters = __esm({ } } }; - accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -49159,7 +53468,7 @@ var init_parameters = __esm({ } } }; - comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -49170,7 +53479,7 @@ var init_parameters = __esm({ } } }; - comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -49181,7 +53490,7 @@ var init_parameters = __esm({ } } }; - prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -49191,7 +53500,7 @@ var init_parameters = __esm({ } } }; - marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -49201,7 +53510,7 @@ var init_parameters = __esm({ } } }; - maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -49214,7 +53523,7 @@ var init_parameters = __esm({ } } }; - include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -49232,11 +53541,11 @@ var init_parameters = __esm({ }, collectionFormat: "CSV" }; - keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -49247,7 +53556,7 @@ var init_parameters = __esm({ } } }; - restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -49258,7 +53567,7 @@ var init_parameters = __esm({ } } }; - body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -49269,7 +53578,7 @@ var init_parameters = __esm({ } } }; - comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -49280,7 +53589,7 @@ var init_parameters = __esm({ } } }; - contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -49291,7 +53600,7 @@ var init_parameters = __esm({ } } }; - multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -49302,7 +53611,7 @@ var init_parameters = __esm({ } } }; - comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -49313,7 +53622,7 @@ var init_parameters = __esm({ } } }; - where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -49323,7 +53632,7 @@ var init_parameters = __esm({ } } }; - restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -49334,7 +53643,7 @@ var init_parameters = __esm({ } } }; - metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -49346,7 +53655,7 @@ var init_parameters = __esm({ } } }; - access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -49357,7 +53666,7 @@ var init_parameters = __esm({ } } }; - defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -49371,7 +53680,7 @@ var init_parameters = __esm({ } } }; - preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -49385,7 +53694,7 @@ var init_parameters = __esm({ } } }; - leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -49395,7 +53704,7 @@ var init_parameters = __esm({ } } }; - ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -49405,7 +53714,7 @@ var init_parameters = __esm({ } } }; - ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -49415,7 +53724,7 @@ var init_parameters = __esm({ } } }; - comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -49426,7 +53735,7 @@ var init_parameters = __esm({ } } }; - comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -49437,7 +53746,7 @@ var init_parameters = __esm({ } } }; - containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -49455,7 +53764,7 @@ var init_parameters = __esm({ } } }; - comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -49466,7 +53775,7 @@ var init_parameters = __esm({ } } }; - deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -49476,7 +53785,7 @@ var init_parameters = __esm({ } } }; - deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -49486,7 +53795,7 @@ var init_parameters = __esm({ } } }; - comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -49497,7 +53806,7 @@ var init_parameters = __esm({ } } }; - sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -49508,7 +53817,7 @@ var init_parameters = __esm({ } } }; - sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -49518,7 +53827,7 @@ var init_parameters = __esm({ } } }; - comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -49529,7 +53838,7 @@ var init_parameters = __esm({ } } }; - action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -49540,7 +53849,7 @@ var init_parameters = __esm({ } } }; - duration3 = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -49550,7 +53859,7 @@ var init_parameters = __esm({ } } }; - proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -49560,7 +53869,7 @@ var init_parameters = __esm({ } } }; - action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -49571,7 +53880,7 @@ var init_parameters = __esm({ } } }; - leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -49582,7 +53891,7 @@ var init_parameters = __esm({ } } }; - action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -49593,7 +53902,7 @@ var init_parameters = __esm({ } } }; - action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -49604,7 +53913,7 @@ var init_parameters = __esm({ } } }; - breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -49614,7 +53923,7 @@ var init_parameters = __esm({ } } }; - action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -49625,7 +53934,7 @@ var init_parameters = __esm({ } } }; - proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -49636,7 +53945,7 @@ var init_parameters = __esm({ } } }; - include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -49665,7 +53974,7 @@ var init_parameters = __esm({ }, collectionFormat: "CSV" }; - delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -49676,7 +53985,7 @@ var init_parameters = __esm({ } } }; - snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -49686,7 +53995,7 @@ var init_parameters = __esm({ } } }; - versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -49696,7 +54005,7 @@ var init_parameters = __esm({ } } }; - range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -49706,7 +54015,7 @@ var init_parameters = __esm({ } } }; - rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -49716,7 +54025,7 @@ var init_parameters = __esm({ } } }; - rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -49726,7 +54035,7 @@ var init_parameters = __esm({ } } }; - encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -49736,7 +54045,7 @@ var init_parameters = __esm({ } } }; - encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -49746,7 +54055,7 @@ var init_parameters = __esm({ } } }; - encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -49756,7 +54065,7 @@ var init_parameters = __esm({ } } }; - ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -49766,7 +54075,7 @@ var init_parameters = __esm({ } } }; - ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -49776,7 +54085,7 @@ var init_parameters = __esm({ } } }; - ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -49786,7 +54095,7 @@ var init_parameters = __esm({ } } }; - deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -49797,7 +54106,7 @@ var init_parameters = __esm({ } } }; - blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -49807,7 +54116,7 @@ var init_parameters = __esm({ } } }; - comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -49818,7 +54127,7 @@ var init_parameters = __esm({ } } }; - expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -49829,7 +54138,7 @@ var init_parameters = __esm({ } } }; - expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -49839,7 +54148,7 @@ var init_parameters = __esm({ } } }; - blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -49849,7 +54158,7 @@ var init_parameters = __esm({ } } }; - blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -49859,7 +54168,7 @@ var init_parameters = __esm({ } } }; - blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -49869,7 +54178,7 @@ var init_parameters = __esm({ } } }; - blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -49879,7 +54188,7 @@ var init_parameters = __esm({ } } }; - blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -49889,7 +54198,7 @@ var init_parameters = __esm({ } } }; - blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -49899,7 +54208,7 @@ var init_parameters = __esm({ } } }; - comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -49910,7 +54219,7 @@ var init_parameters = __esm({ } } }; - immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -49920,7 +54229,7 @@ var init_parameters = __esm({ } } }; - immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -49931,7 +54240,7 @@ var init_parameters = __esm({ } } }; - comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -49942,7 +54251,7 @@ var init_parameters = __esm({ } } }; - legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -49953,7 +54262,7 @@ var init_parameters = __esm({ } } }; - encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -49963,7 +54272,7 @@ var init_parameters = __esm({ } } }; - comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -49974,7 +54283,7 @@ var init_parameters = __esm({ } } }; - tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -50001,7 +54310,7 @@ var init_parameters = __esm({ } } }; - rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -50012,7 +54321,7 @@ var init_parameters = __esm({ } } }; - sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -50026,7 +54335,7 @@ var init_parameters = __esm({ } } }; - sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -50040,7 +54349,7 @@ var init_parameters = __esm({ } } }; - sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -50050,7 +54359,7 @@ var init_parameters = __esm({ } } }; - sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -50064,7 +54373,7 @@ var init_parameters = __esm({ } } }; - sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -50074,7 +54383,7 @@ var init_parameters = __esm({ } } }; - copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -50085,7 +54394,7 @@ var init_parameters = __esm({ } } }; - blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -50095,7 +54404,7 @@ var init_parameters = __esm({ } } }; - sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -50105,7 +54414,7 @@ var init_parameters = __esm({ } } }; - legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -50115,7 +54424,7 @@ var init_parameters = __esm({ } } }; - xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -50126,7 +54435,7 @@ var init_parameters = __esm({ } } }; - sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -50136,7 +54445,7 @@ var init_parameters = __esm({ } } }; - copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -50146,7 +54455,7 @@ var init_parameters = __esm({ } } }; - copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -50157,7 +54466,17 @@ var init_parameters = __esm({ } } }; - 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", @@ -50168,7 +54487,7 @@ var init_parameters = __esm({ } } }; - copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -50179,7 +54498,7 @@ var init_parameters = __esm({ } } }; - copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -50190,7 +54509,7 @@ var init_parameters = __esm({ } } }; - comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -50201,7 +54520,7 @@ var init_parameters = __esm({ } } }; - tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -50229,11 +54548,11 @@ var init_parameters = __esm({ } } }; - queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -50244,7 +54563,7 @@ var init_parameters = __esm({ } } }; - comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -50255,11 +54574,11 @@ var init_parameters = __esm({ } } }; - tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -50269,7 +54588,7 @@ var init_parameters = __esm({ } } }; - transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -50279,7 +54598,7 @@ var init_parameters = __esm({ } } }; - blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -50290,7 +54609,7 @@ var init_parameters = __esm({ } } }; - blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -50301,7 +54620,7 @@ var init_parameters = __esm({ } } }; - blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -50312,7 +54631,7 @@ var init_parameters = __esm({ } } }; - contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -50323,7 +54642,7 @@ var init_parameters = __esm({ } } }; - body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -50334,7 +54653,7 @@ var init_parameters = __esm({ } } }; - accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -50345,7 +54664,7 @@ var init_parameters = __esm({ } } }; - comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -50356,7 +54675,7 @@ var init_parameters = __esm({ } } }; - pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -50367,7 +54686,7 @@ var init_parameters = __esm({ } } }; - ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -50381,7 +54700,7 @@ var init_parameters = __esm({ } } }; - ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -50395,7 +54714,7 @@ var init_parameters = __esm({ } } }; - ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -50409,7 +54728,7 @@ var init_parameters = __esm({ } } }; - pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -50420,7 +54739,7 @@ var init_parameters = __esm({ } } }; - sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -50431,7 +54750,7 @@ var init_parameters = __esm({ } } }; - sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -50442,7 +54761,7 @@ var init_parameters = __esm({ } } }; - sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -50452,7 +54771,7 @@ var init_parameters = __esm({ } } }; - range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -50463,7 +54782,7 @@ var init_parameters = __esm({ } } }; - comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -50474,7 +54793,7 @@ var init_parameters = __esm({ } } }; - prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -50484,7 +54803,7 @@ var init_parameters = __esm({ } } }; - prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -50494,7 +54813,7 @@ var init_parameters = __esm({ } } }; - sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -50506,7 +54825,7 @@ var init_parameters = __esm({ } } }; - comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -50517,7 +54836,7 @@ var init_parameters = __esm({ } } }; - blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -50528,7 +54847,7 @@ var init_parameters = __esm({ } } }; - comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -50539,7 +54858,7 @@ var init_parameters = __esm({ } } }; - maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -50549,7 +54868,7 @@ var init_parameters = __esm({ } } }; - appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -50563,7 +54882,7 @@ var init_parameters = __esm({ } } }; - sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -50573,7 +54892,7 @@ var init_parameters = __esm({ } } }; - comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -50584,7 +54903,7 @@ var init_parameters = __esm({ } } }; - blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -50595,7 +54914,7 @@ var init_parameters = __esm({ } } }; - copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -50605,7 +54924,7 @@ var init_parameters = __esm({ } } }; - comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -50616,7 +54935,7 @@ var init_parameters = __esm({ } } }; - blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -50627,11 +54946,11 @@ var init_parameters = __esm({ } } }; - blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -50642,7 +54961,7 @@ var init_parameters = __esm({ } } }; - listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -50658,20 +54977,23 @@ var init_parameters = __esm({ } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/service.js -var ServiceImpl, xmlSerializer, setPropertiesOperationSpec, getPropertiesOperationSpec, getStatisticsOperationSpec, listContainersSegmentOperationSpec, getUserDelegationKeyOperationSpec, getAccountInfoOperationSpec, submitBatchOperationSpec, filterBlobsOperationSpec; -var init_service = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/service.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { "use strict"; - init_esm7(); - init_mappers(); - init_parameters(); - ServiceImpl = class { + 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 { /** * Initialize a new instance of the class Service class. * @param client Reference to the service client */ constructor(client) { + __publicField(this, "client"); this.client = client; } /** @@ -50680,8 +55002,8 @@ var init_service = __esm({ * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options2) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options: options2 }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options2) { + return this.client.sendOperationRequest({ blobServiceProperties, options: options2 }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -50713,8 +55035,8 @@ var init_service = __esm({ * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options2) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options: options2 }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options2) { + return this.client.sendOperationRequest({ keyInfo, options: options2 }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind @@ -50731,8 +55053,8 @@ var init_service = __esm({ * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options2) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options: options2 }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options2) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options: options2 }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -50744,183 +55066,184 @@ var init_service = __esm({ return this.client.sendOperationRequest({ options: options2 }, filterBlobsOperationSpec); } }; - xmlSerializer = createSerializer( - mappers_exports, + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( + Mappers, /* isXml */ true ); - setPropertiesOperationSpec = { + var setPropertiesOperationSpec = { path: "/", 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, - version2, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", serializer: xmlSerializer }; - getPropertiesOperationSpec = { + 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: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; - getStatisticsOperationSpec = { + 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: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; - listContainersSegmentOperationSpec = { + 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: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; - getUserDelegationKeyOperationSpec = { + 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, - version2, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", serializer: xmlSerializer }; - getAccountInfoOperationSpec = { + 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: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; - submitBatchOperationSpec = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -50929,53 +55252,53 @@ var init_service = __esm({ 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, - version2, - 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 }; - filterBlobsOperationSpec = { + 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: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, serializer: xmlSerializer @@ -50983,20 +55306,23 @@ var init_service = __esm({ } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/container.js -var ContainerImpl, xmlSerializer2, createOperationSpec, getPropertiesOperationSpec2, deleteOperationSpec, setMetadataOperationSpec, getAccessPolicyOperationSpec, setAccessPolicyOperationSpec, restoreOperationSpec, renameOperationSpec, submitBatchOperationSpec2, filterBlobsOperationSpec2, acquireLeaseOperationSpec, releaseLeaseOperationSpec, renewLeaseOperationSpec, breakLeaseOperationSpec, changeLeaseOperationSpec, listBlobFlatSegmentOperationSpec, listBlobHierarchySegmentOperationSpec, getAccountInfoOperationSpec2; -var init_container = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/container.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { "use strict"; - init_esm7(); - init_mappers(); - init_parameters(); - ContainerImpl = class { + 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 { /** * Initialize a new instance of the class Container class. * @param client Reference to the service client */ constructor(client) { + __publicField(this, "client"); this.client = client; } /** @@ -51013,7 +55339,7 @@ var init_container = __esm({ * @param options The options parameters. */ getProperties(options2) { - return this.client.sendOperationRequest({ options: options2 }, getPropertiesOperationSpec2); + return this.client.sendOperationRequest({ options: options2 }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -51058,8 +55384,8 @@ var init_container = __esm({ * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options2) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options: options2 }, renameOperationSpec); + rename(sourceContainerName, options2) { + return this.client.sendOperationRequest({ sourceContainerName, options: options2 }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -51069,8 +55395,8 @@ var init_container = __esm({ * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options2) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options: options2 }, submitBatchOperationSpec2); + submitBatch(contentLength, multipartContentType, body, options2) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options: options2 }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -51078,7 +55404,7 @@ var init_container = __esm({ * @param options The options parameters. */ filterBlobs(options2) { - return this.client.sendOperationRequest({ options: options2 }, filterBlobsOperationSpec2); + return this.client.sendOperationRequest({ options: options2 }, filterBlobsOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -51094,8 +55420,8 @@ var init_container = __esm({ * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options2) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options: options2 }, releaseLeaseOperationSpec); + releaseLease(leaseId, options2) { + return this.client.sendOperationRequest({ leaseId, options: options2 }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -51103,8 +55429,8 @@ var init_container = __esm({ * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options2) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options: options2 }, renewLeaseOperationSpec); + renewLease(leaseId, options2) { + return this.client.sendOperationRequest({ leaseId, options: options2 }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -51123,8 +55449,8 @@ var init_container = __esm({ * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options2) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options: options2 }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options2) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options: options2 }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -51141,126 +55467,127 @@ var init_container = __esm({ * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter3, options2) { - return this.client.sendOperationRequest({ delimiter: delimiter3, options: options2 }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter2, options2) { + return this.client.sendOperationRequest({ delimiter: delimiter2, options: options2 }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options2) { - return this.client.sendOperationRequest({ options: options2 }, getAccountInfoOperationSpec2); + return this.client.sendOperationRequest({ options: options2 }, getAccountInfoOperationSpec); } }; - xmlSerializer2 = createSerializer( - mappers_exports, + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( + Mappers, /* isXml */ true ); - createOperationSpec = { + 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: [ - version2, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - getPropertiesOperationSpec2 = { + 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: [ - version2, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - deleteOperationSpec = { + 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: [ - version2, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - setMetadataOperationSpec = { + 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: [ - version2, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - getAccessPolicyOperationSpec = { + var getAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { @@ -51277,119 +55604,119 @@ var init_container = __esm({ 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: [ - version2, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - setAccessPolicyOperationSpec = { + 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, - version2, - 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: xmlSerializer2 + serializer: xmlSerializer }; - restoreOperationSpec = { + 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: [ - version2, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - renameOperationSpec = { + 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: [ - version2, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - submitBatchOperationSpec2 = { + var submitBatchOperationSpec = { path: "/{containerName}", httpMethod: "POST", responses: { @@ -51398,320 +55725,323 @@ var init_container = __esm({ 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, - version2, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer2 + serializer: xmlSerializer }; - filterBlobsOperationSpec2 = { + 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: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - acquireLeaseOperationSpec = { + 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: [ - version2, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration3, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - releaseLeaseOperationSpec = { + 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: [ - version2, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - renewLeaseOperationSpec = { + 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: [ - version2, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - breakLeaseOperationSpec = { + 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: [ - version2, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - changeLeaseOperationSpec = { + 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: [ - version2, - 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: xmlSerializer2 + serializer: xmlSerializer }; - listBlobFlatSegmentOperationSpec = { + 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: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - listBlobHierarchySegmentOperationSpec = { + 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: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; - getAccountInfoOperationSpec2 = { + 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: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer2 + serializer: xmlSerializer }; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blob.js -var BlobImpl, xmlSerializer3, downloadOperationSpec, getPropertiesOperationSpec3, deleteOperationSpec2, undeleteOperationSpec, setExpiryOperationSpec, setHttpHeadersOperationSpec, setImmutabilityPolicyOperationSpec, deleteImmutabilityPolicyOperationSpec, setLegalHoldOperationSpec, setMetadataOperationSpec2, acquireLeaseOperationSpec2, releaseLeaseOperationSpec2, renewLeaseOperationSpec2, changeLeaseOperationSpec2, breakLeaseOperationSpec2, createSnapshotOperationSpec, startCopyFromURLOperationSpec, copyFromURLOperationSpec, abortCopyFromURLOperationSpec, setTierOperationSpec, getAccountInfoOperationSpec3, queryOperationSpec, getTagsOperationSpec, setTagsOperationSpec; -var init_blob = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blob.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { "use strict"; - init_esm7(); - init_mappers(); - init_parameters(); - BlobImpl = class { + 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 { /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client */ constructor(client) { + __publicField(this, "client"); this.client = client; } /** @@ -51728,7 +56058,7 @@ var init_blob = __esm({ * @param options The options parameters. */ getProperties(options2) { - return this.client.sendOperationRequest({ options: options2 }, getPropertiesOperationSpec3); + return this.client.sendOperationRequest({ options: options2 }, getPropertiesOperationSpec); } /** * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is @@ -51746,7 +56076,7 @@ var init_blob = __esm({ * @param options The options parameters. */ delete(options2) { - return this.client.sendOperationRequest({ options: options2 }, deleteOperationSpec2); + return this.client.sendOperationRequest({ options: options2 }, deleteOperationSpec); } /** * Undelete a blob that was previously soft deleted @@ -51760,8 +56090,8 @@ var init_blob = __esm({ * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options2) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options: options2 }, setExpiryOperationSpec); + setExpiry(expiryOptions, options2) { + return this.client.sendOperationRequest({ expiryOptions, options: options2 }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -51789,8 +56119,8 @@ var init_blob = __esm({ * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options2) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options: options2 }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options2) { + return this.client.sendOperationRequest({ legalHold, options: options2 }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -51798,7 +56128,7 @@ var init_blob = __esm({ * @param options The options parameters. */ setMetadata(options2) { - return this.client.sendOperationRequest({ options: options2 }, setMetadataOperationSpec2); + return this.client.sendOperationRequest({ options: options2 }, setMetadataOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -51806,7 +56136,7 @@ var init_blob = __esm({ * @param options The options parameters. */ acquireLease(options2) { - return this.client.sendOperationRequest({ options: options2 }, acquireLeaseOperationSpec2); + return this.client.sendOperationRequest({ options: options2 }, acquireLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -51814,8 +56144,8 @@ var init_blob = __esm({ * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options2) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options: options2 }, releaseLeaseOperationSpec2); + releaseLease(leaseId, options2) { + return this.client.sendOperationRequest({ leaseId, options: options2 }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -51823,8 +56153,8 @@ var init_blob = __esm({ * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options2) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options: options2 }, renewLeaseOperationSpec2); + renewLease(leaseId, options2) { + return this.client.sendOperationRequest({ leaseId, options: options2 }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -51835,8 +56165,8 @@ var init_blob = __esm({ * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options2) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options: options2 }, changeLeaseOperationSpec2); + changeLease(leaseId, proposedLeaseId, options2) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options: options2 }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -51844,7 +56174,7 @@ var init_blob = __esm({ * @param options The options parameters. */ breakLease(options2) { - return this.client.sendOperationRequest({ options: options2 }, breakLeaseOperationSpec2); + return this.client.sendOperationRequest({ options: options2 }, breakLeaseOperationSpec); } /** * The Create Snapshot operation creates a read-only snapshot of a blob @@ -51861,8 +56191,8 @@ var init_blob = __esm({ * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options2) { - return this.client.sendOperationRequest({ copySource: copySource2, options: options2 }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options2) { + return this.client.sendOperationRequest({ copySource, options: options2 }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -51873,8 +56203,8 @@ var init_blob = __esm({ * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options2) { - return this.client.sendOperationRequest({ copySource: copySource2, options: options2 }, copyFromURLOperationSpec); + copyFromURL(copySource, options2) { + return this.client.sendOperationRequest({ copySource, options: options2 }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -51883,8 +56213,8 @@ var init_blob = __esm({ * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options2) { - return this.client.sendOperationRequest({ copyId: copyId2, options: options2 }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options2) { + return this.client.sendOperationRequest({ copyId, options: options2 }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -51895,15 +56225,15 @@ var init_blob = __esm({ * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options2) { - return this.client.sendOperationRequest({ tier: tier2, options: options2 }, setTierOperationSpec); + setTier(tier, options2) { + return this.client.sendOperationRequest({ tier, options: options2 }, setTierOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options2) { - return this.client.sendOperationRequest({ options: options2 }, getAccountInfoOperationSpec3); + return this.client.sendOperationRequest({ options: options2 }, getAccountInfoOperationSpec); } /** * The Query operation enables users to select/project on blob data by providing simple query @@ -51928,12 +56258,13 @@ var init_blob = __esm({ return this.client.sendOperationRequest({ options: options2 }, setTagsOperationSpec); } }; - xmlSerializer3 = createSerializer( - mappers_exports, + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( + Mappers, /* isXml */ true ); - downloadOperationSpec = { + var downloadOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { @@ -51942,668 +56273,669 @@ var init_blob = __esm({ 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - getPropertiesOperationSpec3 = { + 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - deleteOperationSpec2 = { + 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - undeleteOperationSpec = { + 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: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer3 + serializer: xmlSerializer }; - setExpiryOperationSpec = { + 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: [ - version2, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer3 + serializer: xmlSerializer }; - setHttpHeadersOperationSpec = { + 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - setImmutabilityPolicyOperationSpec = { + 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, - snapshot, - versionId, - comp12 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version2, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer3 + serializer: xmlSerializer }; - deleteImmutabilityPolicyOperationSpec = { + 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, - snapshot, - versionId, - comp12 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer3 + serializer: xmlSerializer }; - setLegalHoldOperationSpec = { + 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, - snapshot, - versionId, - comp13 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version2, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer3 + serializer: xmlSerializer }; - setMetadataOperationSpec2 = { + 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - acquireLeaseOperationSpec2 = { + 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: [ - version2, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration3, - 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: xmlSerializer3 + serializer: xmlSerializer }; - releaseLeaseOperationSpec2 = { + 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - renewLeaseOperationSpec2 = { + 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - changeLeaseOperationSpec2 = { + 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - breakLeaseOperationSpec2 = { + 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - createSnapshotOperationSpec = { + 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - startCopyFromURLOperationSpec = { + 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - copyFromURLOperationSpec = { + 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: [ - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - abortCopyFromURLOperationSpec = { + 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: [ - version2, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer3 + serializer: xmlSerializer }; - setTierOperationSpec = { + 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: [ - version2, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer3 + serializer: xmlSerializer }; - getAccountInfoOperationSpec3 = { + 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: [ - version2, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer3 + serializer: xmlSerializer }; - queryOperationSpec = { + var queryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "POST", responses: { @@ -52612,128 +56944,131 @@ var init_blob = __esm({ 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, - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; - getTagsOperationSpec = { + 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: [ - version2, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer3 + serializer: xmlSerializer }; - setTagsOperationSpec = { + 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, - version2, - 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: xmlSerializer3 + serializer: xmlSerializer }; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js -var PageBlobImpl, xmlSerializer4, createOperationSpec2, uploadPagesOperationSpec, clearPagesOperationSpec, uploadPagesFromURLOperationSpec, getPageRangesOperationSpec, getPageRangesDiffOperationSpec, resizeOperationSpec, updateSequenceNumberOperationSpec, copyIncrementalOperationSpec; -var init_pageBlob = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { "use strict"; - init_esm7(); - init_mappers(); - init_parameters(); - PageBlobImpl = class { + 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 { /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client */ constructor(client) { + __publicField(this, "client"); this.client = client; } /** @@ -52743,8 +57078,8 @@ var init_pageBlob = __esm({ * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options2) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options: options2 }, createOperationSpec2); + create(contentLength, blobContentLength, options2) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options: options2 }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -52752,16 +57087,16 @@ var init_pageBlob = __esm({ * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options2) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options: options2 }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options2) { + return this.client.sendOperationRequest({ contentLength, body, options: options2 }, 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, options2) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options: options2 }, clearPagesOperationSpec); + clearPages(contentLength, options2) { + return this.client.sendOperationRequest({ contentLength, options: options2 }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -52774,8 +57109,8 @@ var init_pageBlob = __esm({ * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options2) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options: options2 }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options2) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options: options2 }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -52799,8 +57134,8 @@ var init_pageBlob = __esm({ * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options2) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options: options2 }, resizeOperationSpec); + resize(blobContentLength, options2) { + return this.client.sendOperationRequest({ blobContentLength, options: options2 }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -52809,8 +57144,8 @@ var init_pageBlob = __esm({ * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options2) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options: options2 }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options2) { + return this.client.sendOperationRequest({ sequenceNumberAction, options: options2 }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -52824,374 +57159,379 @@ var init_pageBlob = __esm({ * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options2) { - return this.client.sendOperationRequest({ copySource: copySource2, options: options2 }, copyIncrementalOperationSpec); + copyIncremental(copySource, options2) { + return this.client.sendOperationRequest({ copySource, options: options2 }, copyIncrementalOperationSpec); } }; - xmlSerializer4 = createSerializer( - mappers_exports, + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( + Mappers, /* isXml */ true ); - createOperationSpec2 = { + 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: [ - version2, - 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: xmlSerializer4 + serializer: xmlSerializer }; - uploadPagesOperationSpec = { + 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: [ - version2, - 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: xmlSerializer4 + serializer: xmlSerializer }; - clearPagesOperationSpec = { + 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: [ - version2, - 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: xmlSerializer4 + serializer: xmlSerializer }; - uploadPagesFromURLOperationSpec = { + 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: [ - version2, - 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: xmlSerializer4 + serializer: xmlSerializer }; - getPageRangesOperationSpec = { + 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: [ - version2, - 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: xmlSerializer4 + serializer: xmlSerializer }; - getPageRangesDiffOperationSpec = { + 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: [ - version2, - 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: xmlSerializer4 + serializer: xmlSerializer }; - resizeOperationSpec = { + 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: [ - version2, - 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: xmlSerializer4 + serializer: xmlSerializer }; - updateSequenceNumberOperationSpec = { + 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: [ - version2, - 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: xmlSerializer4 + serializer: xmlSerializer }; - copyIncrementalOperationSpec = { + 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: [ - version2, - 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: xmlSerializer4 + serializer: xmlSerializer }; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js -var AppendBlobImpl, xmlSerializer5, createOperationSpec3, appendBlockOperationSpec, appendBlockFromUrlOperationSpec, sealOperationSpec; -var init_appendBlob = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { "use strict"; - init_esm7(); - init_mappers(); - init_parameters(); - AppendBlobImpl = class { + 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 { /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client */ constructor(client) { + __publicField(this, "client"); this.client = client; } /** @@ -53199,8 +57539,8 @@ var init_appendBlob = __esm({ * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options2) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options: options2 }, createOperationSpec3); + create(contentLength, options2) { + return this.client.sendOperationRequest({ contentLength, options: options2 }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -53210,8 +57550,8 @@ var init_appendBlob = __esm({ * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options2) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options: options2 }, appendBlockOperationSpec); + appendBlock(contentLength, body, options2) { + return this.client.sendOperationRequest({ contentLength, body, options: options2 }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -53222,8 +57562,8 @@ var init_appendBlob = __esm({ * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options2) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options: options2 }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options2) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options: options2 }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -53234,187 +57574,192 @@ var init_appendBlob = __esm({ return this.client.sendOperationRequest({ options: options2 }, sealOperationSpec); } }; - xmlSerializer5 = createSerializer( - mappers_exports, + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( + Mappers, /* isXml */ true ); - createOperationSpec3 = { + var createOperationSpec = { path: "/{containerName}/{blob}", 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: [ - version2, - 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: xmlSerializer5 + serializer: xmlSerializer }; - appendBlockOperationSpec = { + 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: [ - version2, - 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: xmlSerializer5 + serializer: xmlSerializer }; - appendBlockFromUrlOperationSpec = { + 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: [ - version2, - 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: xmlSerializer5 + serializer: xmlSerializer }; - sealOperationSpec = { + 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: [ - version2, - 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: xmlSerializer5 + serializer: xmlSerializer }; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js -var BlockBlobImpl, xmlSerializer6, uploadOperationSpec, putBlobFromUrlOperationSpec, stageBlockOperationSpec, stageBlockFromURLOperationSpec, commitBlockListOperationSpec, getBlockListOperationSpec; -var init_blockBlob = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { "use strict"; - init_esm7(); - init_mappers(); - init_parameters(); - BlockBlobImpl = class { + 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 { /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client */ constructor(client) { + __publicField(this, "client"); this.client = client; } /** @@ -53426,8 +57771,8 @@ var init_blockBlob = __esm({ * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options2) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options: options2 }, uploadOperationSpec); + upload(contentLength, body, options2) { + return this.client.sendOperationRequest({ contentLength, body, options: options2 }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -53442,8 +57787,8 @@ var init_blockBlob = __esm({ * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options2) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options: options2 }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options2) { + return this.client.sendOperationRequest({ contentLength, copySource, options: options2 }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -53454,8 +57799,8 @@ var init_blockBlob = __esm({ * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options2) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options: options2 }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options2) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options: options2 }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -53467,8 +57812,8 @@ var init_blockBlob = __esm({ * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options2) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options: options2 }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options2) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options: options2 }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -53481,8 +57826,8 @@ var init_blockBlob = __esm({ * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options2) { - return this.client.sendOperationRequest({ blocks: blocks2, options: options2 }, commitBlockListOperationSpec); + commitBlockList(blocks, options2) { + return this.client.sendOperationRequest({ blocks, options: options2 }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -53491,313 +57836,319 @@ var init_blockBlob = __esm({ * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options2) { - return this.client.sendOperationRequest({ listType: listType2, options: options2 }, getBlockListOperationSpec); + getBlockList(listType, options2) { + return this.client.sendOperationRequest({ listType, options: options2 }, getBlockListOperationSpec); } }; - xmlSerializer6 = createSerializer( - mappers_exports, + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( + Mappers, /* isXml */ true ); - uploadOperationSpec = { + var uploadOperationSpec = { path: "/{containerName}/{blob}", 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: [ - version2, - 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", mediaType: "binary", - serializer: xmlSerializer6 + serializer: xmlSerializer }; - putBlobFromUrlOperationSpec = { + var putBlobFromUrlOperationSpec = { path: "/{containerName}/{blob}", 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: [ - version2, - 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: xmlSerializer6 + serializer: xmlSerializer }; - stageBlockOperationSpec = { + var stageBlockOperationSpec = { path: "/{containerName}/{blob}", 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: [ - version2, - 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", mediaType: "binary", - serializer: xmlSerializer6 + serializer: xmlSerializer }; - stageBlockFromURLOperationSpec = { + var stageBlockFromURLOperationSpec = { path: "/{containerName}/{blob}", 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: [ - version2, - 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: xmlSerializer6 + serializer: xmlSerializer }; - commitBlockListOperationSpec = { + var commitBlockListOperationSpec = { path: "/{containerName}/{blob}", 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, - version2, - 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", mediaType: "xml", - serializer: xmlSerializer6 + serializer: xmlSerializer }; - getBlockListOperationSpec = { + var getBlockListOperationSpec = { path: "/{containerName}/{blob}", 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: [ - version2, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer6 + serializer: xmlSerializer }; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/index.js -var init_operations = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/index.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { "use strict"; - init_service(); - init_container(); - init_blob(); - init_pageBlob(); - init_appendBlob(); - init_blockBlob(); + 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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClient.js -var StorageClient; -var init_storageClient = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClient.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { "use strict"; - init_esm8(); - init_operations(); - StorageClient = class extends ExtendedServiceClient { + 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 { /** * 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, options2) { - var _a3, _b2; - if (url2 === void 0) { + constructor(url, options2) { + if (url === void 0) { throw new Error("'url' cannot be null"); } if (!options2) { @@ -53806,169 +58157,259 @@ var init_storageClient = __esm({ const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.27.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.28.0`; const userAgentPrefix = options2.userAgentOptions && options2.userAgentOptions.userAgentPrefix ? `${options2.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options2), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b2 = (_a3 = options2.endpoint) !== null && _a3 !== void 0 ? _a3 : options2.baseUri) !== null && _b2 !== void 0 ? _b2 : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options2, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options2.endpoint ?? options2.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url2; - this.version = options2.version || "2025-05-05"; - 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); - } - }; + __publicField(this, "url"); + __publicField(this, "version"); + __publicField(this, "service"); + __publicField(this, "container"); + __publicField(this, "blob"); + __publicField(this, "pageBlob"); + __publicField(this, "appendBlob"); + __publicField(this, "blockBlob"); + this.url = url; + this.version = options2.version || "2025-07-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); + } + }; + exports2.StorageClient = StorageClient; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js -var init_service2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js -var init_container2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js -var init_blob2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js -var init_pageBlob2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js -var init_appendBlob2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js -var init_blockBlob2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js -var init_operationsInterfaces = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { "use strict"; - init_service2(); - init_container2(); - init_blob2(); - init_pageBlob2(); - init_appendBlob2(); - init_blockBlob2(); + 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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/index.js -var init_src = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/index.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { "use strict"; - init_models(); - init_storageClient(); - init_operationsInterfaces(); + 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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageContextClient.js -var StorageContextClient; -var init_StorageContextClient = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageContextClient.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { "use strict"; - init_src(); - StorageContextClient = class extends StorageClient { + 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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageClient.js -var StorageClient2; -var init_StorageClient = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageClient.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { "use strict"; - init_StorageContextClient(); - init_Pipeline(); - init_utils_common(); - StorageClient2 = class { + 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 { /** * 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) { + /** + * Encoded URL string value. + */ + __publicField(this, "url"); + __publicField(this, "accountName"); + /** + * Request policy pipeline. + * + * @internal + */ + __publicField(this, "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. + */ + __publicField(this, "credential"); + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + __publicField(this, "storageClientContext"); + /** + */ + __publicField(this, "isHttps"); + 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; } }; + exports2.StorageClient = StorageClient; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/tracing.js -var tracingClient; -var init_tracing = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/tracing.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { "use strict"; - init_esm4(); - init_constants2(); - tracingClient = createTracingClient({ + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION2, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASPermissions.js -var BlobSASPermissions; -var init_BlobSASPermissions = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASPermissions.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { "use strict"; - BlobSASPermissions = class _BlobSASPermissions { + 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; + /** + * Specifies Read access granted. + */ + __publicField(this, "read", false); + /** + * Specifies Add access granted. + */ + __publicField(this, "add", false); + /** + * Specifies Create access granted. + */ + __publicField(this, "create", false); + /** + * Specifies Write access granted. + */ + __publicField(this, "write", false); + /** + * Specifies Delete access granted. + */ + __publicField(this, "delete", false); + /** + * Specifies Delete version access granted. + */ + __publicField(this, "deleteVersion", false); + /** + * Specfies Tag access granted. + */ + __publicField(this, "tag", false); + /** + * Specifies Move access granted. + */ + __publicField(this, "move", false); + /** + * Specifies Execute access granted. + */ + __publicField(this, "execute", false); + /** + * Specifies SetImmutabilityPolicy access granted. + */ + __publicField(this, "setImmutabilityPolicy", false); + /** + * Specifies that Permanent Delete is permitted. + */ + __publicField(this, "permanentDelete", false); } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an @@ -54106,29 +58547,70 @@ var init_BlobSASPermissions = __esm({ return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js -var ContainerSASPermissions; -var init_ContainerSASPermissions = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { "use strict"; - ContainerSASPermissions = class _ContainerSASPermissions { + 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; + /** + * Specifies Read access granted. + */ + __publicField(this, "read", false); + /** + * Specifies Add access granted. + */ + __publicField(this, "add", false); + /** + * Specifies Create access granted. + */ + __publicField(this, "create", false); + /** + * Specifies Write access granted. + */ + __publicField(this, "write", false); + /** + * Specifies Delete access granted. + */ + __publicField(this, "delete", false); + /** + * Specifies Delete version access granted. + */ + __publicField(this, "deleteVersion", false); + /** + * Specifies List access granted. + */ + __publicField(this, "list", false); + /** + * Specfies Tag access granted. + */ + __publicField(this, "tag", false); + /** + * Specifies Move access granted. + */ + __publicField(this, "move", false); + /** + * Specifies Execute access granted. + */ + __publicField(this, "execute", false); + /** + * Specifies SetImmutabilityPolicy access granted. + */ + __publicField(this, "setImmutabilityPolicy", false); + /** + * Specifies that Permanent Delete is permitted. + */ + __publicField(this, "permanentDelete", false); + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + __publicField(this, "filterByTags", false); } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an @@ -54239,7 +58721,7 @@ var init_ContainerSASPermissions = __esm({ * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -54286,22 +58768,36 @@ var init_ContainerSASPermissions = __esm({ return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js -var import_crypto5, UserDelegationKeyCredential; -var init_UserDelegationKeyCredential = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { "use strict"; - import_crypto5 = require("crypto"); - UserDelegationKeyCredential = class { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("crypto"); + var UserDelegationKeyCredential = class { /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - * @param userDelegationKey - */ constructor(accountName, userDelegationKey) { + /** + * Azure Storage account name; readonly. + */ + __publicField(this, "accountName"); + /** + * Azure Storage user delegation key; readonly. + */ + __publicField(this, "userDelegationKey"); + /** + * Key value in Buffer type. + */ + __publicField(this, "key"); this.accountName = accountName; this.userDelegationKey = userDelegationKey; this.key = Buffer.from(userDelegationKey.value, "base64"); @@ -54312,50 +58808,158 @@ var init_UserDelegationKeyCredential = __esm({ * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return (0, import_crypto5.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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SasIPRange.js -function ipRangeToString(ipRange) { - return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; -} -var init_SasIPRange = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SasIPRange.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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; + } } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SASQueryParameters.js -var SASProtocol, SASQueryParameters; -var init_SASQueryParameters = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SASQueryParameters.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { "use strict"; - init_SasIPRange(); - init_utils_common(); + 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 || (SASProtocol = {})); - SASQueryParameters = class { - /** - * Optional. IP range allowed for this SAS. - * - * @readonly - */ - get ipRange() { - if (this.ipRangeInner) { - return { - end: this.ipRangeInner.end, - start: this.ipRangeInner.start - }; - } - return void 0; - } - constructor(version3, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version3; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); + var SASQueryParameters = class { + constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + /** + * The storage API version. + */ + __publicField(this, "version"); + /** + * Optional. The allowed HTTP protocol(s). + */ + __publicField(this, "protocol"); + /** + * Optional. The start time for this SAS token. + */ + __publicField(this, "startsOn"); + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + __publicField(this, "expiresOn"); + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + __publicField(this, "permissions"); + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + __publicField(this, "services"); + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + __publicField(this, "resourceTypes"); + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + __publicField(this, "identifier"); + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + __publicField(this, "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 + */ + __publicField(this, "resource"); + /** + * The signature for the SAS token. + */ + __publicField(this, "signature"); + /** + * Value for cache-control header in Blob/File Service SAS. + */ + __publicField(this, "cacheControl"); + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + __publicField(this, "contentDisposition"); + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + __publicField(this, "contentEncoding"); + /** + * Value for content-length header in Blob/File Service SAS. + */ + __publicField(this, "contentLanguage"); + /** + * Value for content-type header in Blob/File Service SAS. + */ + __publicField(this, "contentType"); + /** + * Inner value of getter ipRange. + */ + __publicField(this, "ipRangeInner"); + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + __publicField(this, "signedOid"); + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + __publicField(this, "signedTenantId"); + /** + * The date-time the key is active. + * Property of user delegation key. + */ + __publicField(this, "signedStartsOn"); + /** + * The date-time the key expires. + * Property of user delegation key. + */ + __publicField(this, "signedExpiresOn"); + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + __publicField(this, "signedService"); + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + __publicField(this, "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. + */ + __publicField(this, "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. + */ + __publicField(this, "correlationId"); + this.version = version2; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -54386,19 +58990,19 @@ var init_SASQueryParameters = __esm({ } 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; @@ -54411,6 +59015,20 @@ var init_SASQueryParameters = __esm({ } } } + /** + * Optional. IP range allowed for this SAS. + * + * @readonly + */ + get ipRange() { + if (this.ipRangeInner) { + return { + end: this.ipRangeInner.end, + start: this.ipRangeInner.start + }; + } + return void 0; + } /** * Encodes all SAS query parameters into a string that can be appended to a URL. * @@ -54465,13 +59083,13 @@ var init_SASQueryParameters = __esm({ 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); @@ -54486,10 +59104,10 @@ var init_SASQueryParameters = __esm({ 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); @@ -54549,442 +59167,500 @@ var init_SASQueryParameters = __esm({ } } }; + exports2.SASQueryParameters = SASQueryParameters; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js -function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; -} -function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version3 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; - let userDelegationKeyCredential; - if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); - } - if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { - throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); - } - if (version3 >= "2020-12-06") { - if (sharedKeyCredential !== void 0) { - return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); - } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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 : 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_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 (sharedKeyCredential !== void 0) { + return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); + } else { + if (version2 >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } + } + } + if (version2 >= "2018-11-09") { + if (sharedKeyCredential !== void 0) { + return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); + } else { + if (version2 >= "2020-02-10") { + return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); + } + } + } + if (version2 >= "2015-04-05") { + if (sharedKeyCredential !== void 0) { + return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); + } else { + throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); + } + } + throw new RangeError("'version' must be >= '2015-04-05'."); } - } - if (version3 >= "2018-11-09") { - if (sharedKeyCredential !== void 0) { - return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); - } else { - if (version3 >= "2020-02-10") { - return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); - } else { - return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); + function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + let resource = "c"; + if (blobSASSignatureValues.blobName) { + resource = "b"; } + 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(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + const signature = sharedKeyCredential.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), + stringToSign + }; } - } - if (version3 >= "2015-04-05") { - if (sharedKeyCredential !== void 0) { - return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); - } else { - throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); + function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = 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(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + const signature = sharedKeyCredential.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), + stringToSign + }; + } + function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = 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(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + const signature = sharedKeyCredential.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, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20181109(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 timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = 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.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + 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), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20200210(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 timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = 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, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + 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), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20201206(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 timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = 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, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + 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 + }; + } + 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 timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = 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, + timestamp, + 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 + }; + } + function getCanonicalName(accountName, containerName, blobName) { + const elements = [`/blob/${accountName}/${containerName}`]; + if (blobName) { + elements.push(`/${blobName}`); + } + return elements.join(""); + } + function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { + const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version2 < "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") { + 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") { + throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); + } + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "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") { + throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); + } + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "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)) { + 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) { + throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); + } + if (version2 < "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") { + throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); + } + blobSASSignatureValues.version = version2; + return blobSASSignatureValues; } - } - throw new RangeError("'version' must be >= '2015-04-05'."); -} -function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - } - let resource = "c"; - if (blobSASSignatureValues.blobName) { - resource = "b"; - } - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" - ].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), - stringToSign - }; -} -function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" - ].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), - stringToSign - }; -} -function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.encryptionScope, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" - ].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), - stringToSign - }; -} -function generateBlobSASQueryParametersUDK20181109(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 timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? 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.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType - ].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), - stringToSign - }; -} -function generateBlobSASQueryParametersUDK20200210(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 timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? 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.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.preauthorizedAgentObjectId, - void 0, - // agentObjectId - blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType - ].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), - stringToSign - }; -} -function generateBlobSASQueryParametersUDK20201206(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 timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? 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.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.preauthorizedAgentObjectId, - void 0, - // agentObjectId - blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.encryptionScope, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType - ].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), - stringToSign - }; -} -function getCanonicalName(accountName, containerName, blobName) { - const elements = [`/blob/${accountName}/${containerName}`]; - if (blobName) { - elements.push(`/${blobName}`); - } - return elements.join(""); -} -function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version3 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version3 < "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 && version3 < "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 && version3 < "2020-08-04") { - throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); - } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version3 < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); - } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version3 < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); - } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version3 < "2019-12-12") { - throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); - } - if (version3 < "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 (version3 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { - throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); - } - if (version3 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { - throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); - } - if (blobSASSignatureValues.encryptionScope && version3 < "2020-12-06") { - throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); - } - blobSASSignatureValues.version = version3; - return blobSASSignatureValues; -} -var init_BlobSASSignatureValues = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js"() { - "use strict"; - init_BlobSASPermissions(); - init_ContainerSASPermissions(); - init_StorageSharedKeyCredential(); - init_UserDelegationKeyCredential(); - init_SasIPRange(); - init_SASQueryParameters(); - init_constants2(); - init_utils_common(); } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobLeaseClient.js -var BlobLeaseClient; -var init_BlobLeaseClient = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobLeaseClient.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { "use strict"; - init_esm3(); - init_constants2(); - init_tracing(); - init_utils_common(); - BlobLeaseClient = class { - /** - * Gets the lease Id. - * - * @readonly - */ - get leaseId() { - return this._leaseId; - } - /** - * Gets the url. - * - * @readonly - */ - get url() { - return this._url; - } + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants9(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobLeaseClient = class { /** * Creates an instance of BlobLeaseClient. * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { + __publicField(this, "_leaseId"); + __publicField(this, "_url"); + __publicField(this, "_containerOrBlobOperation"); + __publicField(this, "_isContainer"); const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -54994,34 +59670,51 @@ var init_BlobLeaseClient = __esm({ this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; + } + /** + * Gets the lease Id. + * + * @readonly + */ + get leaseId() { + return this._leaseId; + } + /** + * Gets the url. + * + * @readonly + */ + get url() { + return this._url; } /** * 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://learn.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://learn.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(duration4, options2 = {}) { - var _a3, _b2, _c2, _d2, _e; - if (this._isContainer && (((_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.ifMatch) && ((_b2 = options2.conditions) === null || _b2 === void 0 ? void 0 : _b2.ifMatch) !== ETagNone || ((_c2 = options2.conditions) === null || _c2 === void 0 ? void 0 : _c2.ifNoneMatch) && ((_d2 = options2.conditions) === null || _d2 === void 0 ? void 0 : _d2.ifNoneMatch) !== ETagNone || ((_e = options2.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration3, options2 = {}) { + if (this._isContainer && (options2.conditions?.ifMatch && options2.conditions?.ifMatch !== constants_js_1.ETagNone || options2.conditions?.ifNoneMatch && options2.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options2.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", options2, async (updatedOptions) => { - var _a4; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options2.abortSignal, - duration: duration4, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a4 = options2.conditions) === null || _a4 === void 0 ? void 0 : _a4.tagConditions }), + duration: duration3, + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -55029,73 +59722,76 @@ var init_BlobLeaseClient = __esm({ } /** * To change the ID of the lease. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://learn.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, options2 = {}) { - var _a3, _b2, _c2, _d2, _e; - if (this._isContainer && (((_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.ifMatch) && ((_b2 = options2.conditions) === null || _b2 === void 0 ? void 0 : _b2.ifMatch) !== ETagNone || ((_c2 = options2.conditions) === null || _c2 === void 0 ? void 0 : _c2.ifNoneMatch) && ((_d2 = options2.conditions) === null || _d2 === void 0 ? void 0 : _d2.ifNoneMatch) !== ETagNone || ((_e = options2.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options2 = {}) { + if (this._isContainer && (options2.conditions?.ifMatch && options2.conditions?.ifMatch !== constants_js_1.ETagNone || options2.conditions?.ifNoneMatch && options2.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options2.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", options2, async (updatedOptions) => { - var _a4; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options2, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options2.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a4 = options2.conditions) === null || _a4 === void 0 ? void 0 : _a4.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.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://learn.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://learn.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(options2 = {}) { - var _a3, _b2, _c2, _d2, _e; - if (this._isContainer && (((_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.ifMatch) && ((_b2 = options2.conditions) === null || _b2 === void 0 ? void 0 : _b2.ifMatch) !== ETagNone || ((_c2 = options2.conditions) === null || _c2 === void 0 ? void 0 : _c2.ifNoneMatch) && ((_d2 = options2.conditions) === null || _d2 === void 0 ? void 0 : _d2.ifNoneMatch) !== ETagNone || ((_e = options2.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options2.conditions?.ifMatch && options2.conditions?.ifMatch !== constants_js_1.ETagNone || options2.conditions?.ifNoneMatch && options2.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options2.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", options2, async (updatedOptions) => { - var _a4; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options2.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a4 = options2.conditions) === null || _a4 === void 0 ? void 0 : _a4.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://learn.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(options2 = {}) { - var _a3, _b2, _c2, _d2, _e; - if (this._isContainer && (((_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.ifMatch) && ((_b2 = options2.conditions) === null || _b2 === void 0 ? void 0 : _b2.ifMatch) !== ETagNone || ((_c2 = options2.conditions) === null || _c2 === void 0 ? void 0 : _c2.ifNoneMatch) && ((_d2 = options2.conditions) === null || _d2 === void 0 ? void 0 : _d2.ifNoneMatch) !== ETagNone || ((_e = options2.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options2.conditions?.ifMatch && options2.conditions?.ifMatch !== constants_js_1.ETagNone || options2.conditions?.ifNoneMatch && options2.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options2.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", options2, async (updatedOptions) => { - var _a4; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options2, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options2.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a4 = options2.conditions) === null || _a4 === void 0 ? void 0 : _a4.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -55103,42 +59799,45 @@ var init_BlobLeaseClient = __esm({ /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://learn.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, options2 = {}) { - var _a3, _b2, _c2, _d2, _e; - if (this._isContainer && (((_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.ifMatch) && ((_b2 = options2.conditions) === null || _b2 === void 0 ? void 0 : _b2.ifMatch) !== ETagNone || ((_c2 = options2.conditions) === null || _c2 === void 0 ? void 0 : _c2.ifNoneMatch) && ((_d2 = options2.conditions) === null || _d2 === void 0 ? void 0 : _d2.ifNoneMatch) !== ETagNone || ((_e = options2.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options2 = {}) { + if (this._isContainer && (options2.conditions?.ifMatch && options2.conditions?.ifMatch !== constants_js_1.ETagNone || options2.conditions?.ifNoneMatch && options2.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options2.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", options2, async (updatedOptions) => { - var _a4; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options2, async (updatedOptions) => { const operationOptions = { abortSignal: options2.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a4 = options2.conditions) === null || _a4 === void 0 ? void 0 : _a4.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; + exports2.BlobLeaseClient = BlobLeaseClient; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/RetriableReadableStream.js -var import_stream, RetriableReadableStream; -var init_RetriableReadableStream = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/RetriableReadableStream.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { "use strict"; - init_esm2(); - import_stream = require("stream"); - RetriableReadableStream = class extends import_stream.Readable { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs3(); + var node_stream_1 = require("stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { /** * Creates an instance of RetriableReadableStream. * @@ -55151,8 +59850,16 @@ var init_RetriableReadableStream = __esm({ */ constructor(source, getter, offset, count, options2 = {}) { super({ highWaterMark: options2.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { + __publicField(this, "start"); + __publicField(this, "offset"); + __publicField(this, "end"); + __publicField(this, "getter"); + __publicField(this, "source"); + __publicField(this, "retries", 0); + __publicField(this, "maxRetryRequests"); + __publicField(this, "onProgress"); + __publicField(this, "options"); + __publicField(this, "sourceDataHandler", (data) => { if (this.options.doInjectErrorOnce) { this.options.doInjectErrorOnce = void 0; this.source.pause(); @@ -55167,12 +59874,12 @@ var init_RetriableReadableStream = __esm({ if (!this.push(data)) { this.source.pause(); } - }; - this.sourceAbortedHandler = () => { - const abortError = new AbortError("The operation was aborted."); + }); + __publicField(this, "sourceAbortedHandler", () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { + }); + __publicField(this, "sourceErrorOrEndHandler", (err) => { if (err && err.name === "AbortError") { this.destroy(err); return; @@ -55196,7 +59903,7 @@ var init_RetriableReadableStream = __esm({ } 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; @@ -55228,17 +59935,34 @@ var init_RetriableReadableStream = __esm({ callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.js -var BlobDownloadResponse; -var init_BlobDownloadResponse = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { "use strict"; - init_esm3(); - init_RetriableReadableStream(); - BlobDownloadResponse = class { + 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 { + /** + * Creates an instance of BlobDownloadResponse. + * + * @param originalResponse - + * @param getter - + * @param offset - + * @param count - + * @param options - + */ + constructor(originalResponse, getter, offset, count, options2 = {}) { + __publicField(this, "originalResponse"); + __publicField(this, "blobDownloadStream"); + this.originalResponse = originalResponse; + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options2); + } /** * Indicates that the service supports * requests for partial file content. @@ -55664,7 +60388,7 @@ var init_BlobDownloadResponse = __esm({ * @readonly */ get readableStreamBody() { - return isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -55672,41 +60396,31 @@ var init_BlobDownloadResponse = __esm({ get _response() { return this.originalResponse._response; } - /** - * Creates an instance of BlobDownloadResponse. - * - * @param originalResponse - - * @param getter - - * @param offset - - * @param count - - * @param options - - */ - constructor(originalResponse2, getter, offset, count, options2 = {}) { - this.originalResponse = originalResponse2; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options2); - } }; + exports2.BlobDownloadResponse = BlobDownloadResponse; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroConstants.js -var AVRO_SYNC_MARKER_SIZE, AVRO_INIT_BYTES, AVRO_CODEC_KEY, AVRO_SCHEMA_KEY; -var init_AvroConstants = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroConstants.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { "use strict"; - AVRO_SYNC_MARKER_SIZE = 16; - AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - AVRO_CODEC_KEY = "avro.codec"; - AVRO_SCHEMA_KEY = "avro.schema"; + 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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroParser.js -var AvroParser, AvroComplex, AvroPrimitive, AvroType, AvroPrimitiveType, AvroEnumType, AvroUnionType, AvroMapType, AvroRecordType; -var init_AvroParser = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroParser.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { "use strict"; - AvroParser = class _AvroParser { + 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. * @@ -55832,6 +60546,8 @@ var init_AvroParser = __esm({ return items; } }; + exports2.AvroParser = AvroParser; + var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; AvroComplex2["ENUM"] = "enum"; @@ -55840,6 +60556,7 @@ var init_AvroParser = __esm({ AvroComplex2["UNION"] = "union"; AvroComplex2["FIXED"] = "fixed"; })(AvroComplex || (AvroComplex = {})); + var AvroPrimitive; (function(AvroPrimitive2) { AvroPrimitive2["NULL"] = "null"; AvroPrimitive2["BOOLEAN"] = "boolean"; @@ -55850,7 +60567,7 @@ var init_AvroParser = __esm({ AvroPrimitive2["BYTES"] = "bytes"; AvroPrimitive2["STRING"] = "string"; })(AvroPrimitive || (AvroPrimitive = {})); - AvroType = class _AvroType { + var AvroType = class _AvroType { /** * Determines the AvroType from the Avro Schema. */ @@ -55883,12 +60600,12 @@ var init_AvroParser = __esm({ return new AvroUnionType(schema.map(_AvroType.fromSchema)); } static fromObjectSchema(schema) { - const type2 = schema.type; + const type = schema.type; try { - return _AvroType.fromStringSchema(type2); - } catch (_a3) { + return _AvroType.fromStringSchema(type); + } catch { } - switch (type2) { + switch (type) { case AvroComplex.RECORD: if (schema.aliases) { throw new Error(`aliases currently is not supported, schema: ${schema}`); @@ -55922,13 +60639,15 @@ var init_AvroParser = __esm({ case AvroComplex.FIXED: // Unused today default: - throw new Error(`Unexpected Avro type ${type2} in ${schema}`); + throw new Error(`Unexpected Avro type ${type} in ${schema}`); } } }; - AvroPrimitiveType = class extends AvroType { + exports2.AvroType = AvroType; + var AvroPrimitiveType = class extends AvroType { constructor(primitive) { super(); + __publicField(this, "_primitive"); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types @@ -55955,9 +60674,10 @@ var init_AvroParser = __esm({ } } }; - AvroEnumType = class extends AvroType { + var AvroEnumType = class extends AvroType { constructor(symbols) { super(); + __publicField(this, "_symbols"); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types @@ -55966,9 +60686,10 @@ var init_AvroParser = __esm({ return this._symbols[value]; } }; - AvroUnionType = class extends AvroType { + var AvroUnionType = class extends AvroType { constructor(types) { super(); + __publicField(this, "_types"); this._types = types; } async read(stream, options2 = {}) { @@ -55976,9 +60697,10 @@ var init_AvroParser = __esm({ return this._types[typeIndex].read(stream, options2); } }; - AvroMapType = class extends AvroType { + var AvroMapType = class extends AvroType { constructor(itemType) { super(); + __publicField(this, "_itemType"); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types @@ -55989,9 +60711,11 @@ var init_AvroParser = __esm({ return AvroParser.readMap(stream, readItemMethod, options2); } }; - AvroRecordType = class extends AvroType { + var AvroRecordType = class extends AvroType { constructor(fields, name) { super(); + __publicField(this, "_name"); + __publicField(this, "_fields"); this._fields = fields; this._name = name; } @@ -56010,43 +60734,52 @@ var init_AvroParser = __esm({ } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/utils/utils.common.js -function arraysEqual(a, b) { - if (a === b) - return true; - if (a == null || b == null) - return false; - if (a.length !== b.length) - return false; - for (let i = 0; i < a.length; ++i) { - if (a[i] !== b[i]) - return false; - } - return true; -} -var init_utils_common2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/utils/utils.common.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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; + if (a == null || b == null) + return false; + if (a.length !== b.length) + return false; + for (let i = 0; i < a.length; ++i) { + if (a[i] !== b[i]) + return false; + } + return true; + } } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReader.js -var AvroReader; -var init_AvroReader = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReader.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { "use strict"; - init_tslib_es6(); - init_AvroConstants(); - init_AvroParser(); - init_utils_common2(); - AvroReader = class { - get blockOffset() { - return this._blockOffset; - } - get objectIndex() { - return this._objectIndex; - } + 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 { constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { + __publicField(this, "_dataStream"); + __publicField(this, "_headerStream"); + __publicField(this, "_syncMarker"); + __publicField(this, "_metadata"); + __publicField(this, "_itemType"); + __publicField(this, "_itemsRemainingInBlock"); + // Remembers where we started if partial data stream was provided. + __publicField(this, "_initialBlockOffset"); + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + __publicField(this, "_blockOffset"); + __publicField(this, "_objectIndex"); + __publicField(this, "_initialized"); this._dataStream = dataStream; this._headerStream = headerStream || dataStream; this._initialized = false; @@ -56054,32 +60787,38 @@ var init_AvroReader = __esm({ this._objectIndex = indexWithinCurrentBlock || 0; this._initialBlockOffset = currentBlockOffset || 0; } + get blockOffset() { + return this._blockOffset; + } + get objectIndex() { + return this._objectIndex; + } async initialize(options2 = {}) { - 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: options2.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: options2.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: options2.abortSignal }); - const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema); + const schema = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema); 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: options2.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options2.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options2.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -56091,81 +60830,85 @@ var init_AvroReader = __esm({ hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return __asyncGenerator(this, arguments, function* parseObjects_1(options2 = {}) { - if (!this._initialized) { - yield __await(this.initialize(options2)); - } - while (this.hasNext()) { - const result = yield __await(this._itemType.read(this._dataStream, { + async *parseObjects(options2 = {}) { + if (!this._initialized) { + await this.initialize(options2); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options2.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: options2.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield __await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { + }); + 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: options2.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 __await(AvroParser.readLong(this._dataStream, { - abortSignal: options2.abortSignal - })); - } catch (_a3) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield __await(AvroParser.readLong(this._dataStream, { abortSignal: options2.abortSignal })); - } + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options2.abortSignal }); } - yield yield __await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadable.js -var AvroReadable; -var init_AvroReadable = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadable.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { "use strict"; - AvroReadable = class { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; + var AvroReadable = class { }; + exports2.AvroReadable = AvroReadable; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js -var ABORT_ERROR, AvroReadableFromStream; -var init_AvroReadableFromStream = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { "use strict"; - init_AvroReadable(); - init_esm2(); - ABORT_ERROR = new AbortError("Reading from the avro stream was aborted."); - AvroReadableFromStream = class extends AvroReadable { - toUint8Array(data) { - if (typeof data === "string") { - return Buffer.from(data); - } - return data; - } + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs3(); + 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 { constructor(readable) { super(); + __publicField(this, "_position"); + __publicField(this, "_readable"); this._readable = readable; this._position = 0; } + toUint8Array(data) { + if (typeof data === "string") { + return buffer_1.Buffer.from(data); + } + return data; + } get position() { return this._position; } async read(size, options2 = {}) { - var _a3; - if ((_a3 = options2.abortSignal) === null || _a3 === void 0 ? void 0 : _a3.aborted) { + if (options2.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -56219,26 +60962,40 @@ var init_AvroReadableFromStream = __esm({ } } }; + exports2.AvroReadableFromStream = AvroReadableFromStream; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.js -var init_src2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { "use strict"; - init_AvroReader(); - init_AvroReadableFromStream(); + 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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js -var import_stream2, BlobQuickQueryStream; -var init_BlobQuickQueryStream = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { "use strict"; - import_stream2 = require("stream"); - init_src2(); - BlobQuickQueryStream = class extends import_stream2.Readable { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { /** * Creates an instance of BlobQuickQueryStream. * @@ -56247,11 +61004,16 @@ var init_BlobQuickQueryStream = __esm({ */ constructor(source, options2 = {}) { super(); - this.avroPaused = true; + __publicField(this, "source"); + __publicField(this, "avroReader"); + __publicField(this, "avroIter"); + __publicField(this, "avroPaused", true); + __publicField(this, "onProgress"); + __publicField(this, "onError"); this.source = source; this.onProgress = options2.onProgress; this.onError = options2.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: options2.abortSignal }); } _read() { @@ -56339,17 +61101,31 @@ var init_BlobQuickQueryStream = __esm({ } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.js -var BlobQueryResponse; -var init_BlobQueryResponse = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { "use strict"; - init_esm3(); - init_BlobQuickQueryStream(); - BlobQueryResponse = class { + 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 { + /** + * Creates an instance of BlobQueryResponse. + * + * @param originalResponse - + * @param options - + */ + constructor(originalResponse, options2 = {}) { + __publicField(this, "originalResponse"); + __publicField(this, "blobDownloadStream"); + this.originalResponse = originalResponse; + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options2); + } /** * Indicates that the service supports * requests for partial file content. @@ -56686,7 +61462,7 @@ var init_BlobQueryResponse = __esm({ * @readonly */ get readableStreamBody() { - return isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -56694,49 +61470,29 @@ var init_BlobQueryResponse = __esm({ get _response() { return this.originalResponse._response; } - /** - * Creates an instance of BlobQueryResponse. - * - * @param originalResponse - - * @param options - - */ - constructor(originalResponse2, options2 = {}) { - this.originalResponse = originalResponse2; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options2); - } }; + exports2.BlobQueryResponse = BlobQueryResponse; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/models.js -function toAccessTier(tier2) { - if (tier2 === void 0) { - return void 0; - } - return tier2; -} -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; - } -} -function getBlobServiceAccountAudience(storageAccountName) { - return `https://${storageAccountName}.blob.core.windows.net/.default`; -} -var BlockBlobTier, PremiumPageBlobTier, StorageBlobAudience; -var init_models2 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/models.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { "use strict"; - init_constants2(); + 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 || (BlockBlobTier = {})); + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; (function(PremiumPageBlobTier2) { PremiumPageBlobTier2["P4"] = "P4"; PremiumPageBlobTier2["P6"] = "P6"; @@ -56749,122 +61505,851 @@ var init_models2 = __esm({ PremiumPageBlobTier2["P60"] = "P60"; PremiumPageBlobTier2["P70"] = "P70"; PremiumPageBlobTier2["P80"] = "P80"; - })(PremiumPageBlobTier || (PremiumPageBlobTier = {})); + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { + return void 0; + } + 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 = constants_js_1.EncryptionAlgorithmAES25; + } + } + var StorageBlobAudience; (function(StorageBlobAudience2) { StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(StorageBlobAudience || (StorageBlobAudience = {})); - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/PageBlobRangeResponse.js -function rangeResponseFromModel(response) { - const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ - offset: x.start, - count: x.end - x.start - })); - const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ - offset: x.start, - count: x.end - x.start - })); - return Object.assign(Object.assign({}, response), { - pageRange, - clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) - }); -} -var init_PageBlobRangeResponse = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/PageBlobRangeResponse.js"() { + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); + function getBlobServiceAccountAudience(storageAccountName) { + return `https://${storageAccountName}.blob.core.windows.net/.default`; + } + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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, + count: x.end - x.start + })); + const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ + offset: x.start, + count: x.end - x.start + })); + return { + ...response, + pageRange, + clearRange, + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } } }); -// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/logger.js -var logger4; -var init_logger = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/logger.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger3 = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { "use strict"; - init_esm(); - logger4 = createClientLogger("core-lro"); + 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/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/poller/constants.js -var init_constants3 = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/poller/constants.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants11 = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/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/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/poller/operation.js -var init_operation = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/poller/operation.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { "use strict"; - init_logger(); - init_constants3(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger3(); + 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 config2 = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config2); + const state = stateProxy.initState(config2); + 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: options2 } = inputs; + const response = await poll(operationLocation, options2).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: options2, 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: options2 + }); + 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/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/http/operation.js -var init_operation2 = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/http/operation.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { "use strict"; - init_operation(); - init_logger(); + 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_logger3(); + 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 config2 = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config2 === null || config2 === void 0 ? void 0 : config2.operationLocation, resourceLocation: config2 === null || config2 === void 0 ? void 0 : config2.resourceLocation }, (config2 === null || config2 === void 0 ? void 0 : config2.mode) ? { metadata: { mode: config2.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult + }); + } + 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: options2, 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: options2, + /** + * 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/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/poller/poller.js -var init_poller = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/poller/poller.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { "use strict"; - init_operation(); - init_constants3(); - init_esm3(); + 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_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: (config2) => ({ status: "running", config: config2 }), + 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 }, options2) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options2 || {}; + 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 = 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 abortSignal2 = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal2.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal: abortSignal2 }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal: abortSignal2 }); + await poller.poll({ abortSignal: abortSignal2 }); + } + } + } 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/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/http/poller.js -var init_poller2 = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/http/poller.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { "use strict"; - init_operation2(); - init_poller(); + 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, options2) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options2 || {}; + 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 config2 = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config2 === null || config2 === void 0 ? void 0 : config2.operationLocation, resourceLocation: config2 === null || config2 === void 0 ? void 0 : config2.resourceLocation }, (config2 === null || config2 === void 0 ? void 0 : config2.mode) ? { metadata: { mode: config2.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; } }); -// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/legacy/lroEngine/operation.js -var init_operation3 = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/legacy/lroEngine/operation.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { "use strict"; - init_operation2(); - init_logger(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger3(); + var createStateProxy = () => ({ + initState: (config2) => ({ config: config2, 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(options2) { + 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: options2, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options2 === null || options2 === void 0 ? void 0 : options2.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options2, 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/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/legacy/poller.js -var PollerStoppedError, PollerCancelledError, Poller; -var init_poller3 = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/legacy/poller.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { "use strict"; - PollerStoppedError = class _PollerStoppedError extends Error { + 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); } }; - PollerCancelledError = class _PollerCancelledError extends Error { + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { constructor(message) { super(message); this.name = "PollerCancelledError"; Object.setPrototypeOf(this, _PollerCancelledError.prototype); } }; - Poller = class { + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { /** * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. * @@ -56980,9 +62465,9 @@ var init_poller3 = __esm({ * * @param state - The current operation state. */ - fireProgress(state3) { + fireProgress(state) { for (const callback of this.pollProgressCallbacks) { - callback(state3); + callback(state); } } /** @@ -57055,8 +62540,8 @@ var init_poller3 = __esm({ * Returns true if the poller has finished polling. */ isDone() { - const state3 = this.operation.state; - return Boolean(state3.isCompleted || state3.isCancelled || state3.error); + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); } /** * Stops the poller from continuing to poll. @@ -57150,8 +62635,8 @@ var init_poller3 = __esm({ * depending on the implementation. */ getResult() { - const state3 = this.operation.state; - return state3.result; + const state = this.operation.state; + return state.result; } /** * Returns a serialized version of the poller's operation @@ -57161,784 +62646,524 @@ var init_poller3 = __esm({ return this.operation.toString(); } }; + exports2.Poller = Poller; } }); -// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/legacy/lroEngine/lroEngine.js -var init_lroEngine = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/legacy/lroEngine/lroEngine.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { "use strict"; - init_operation3(); - init_constants3(); - init_poller3(); - init_operation(); + 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, options2) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options2 || {}; + 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((resolve) => setTimeout(() => resolve(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; } }); -// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/legacy/lroEngine/index.js -var init_lroEngine2 = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/legacy/lroEngine/index.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { "use strict"; - init_lroEngine(); + 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/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/legacy/pollOperation.js -var init_pollOperation = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/legacy/pollOperation.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); } }); -// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/index.js -var init_esm10 = __esm({ - "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/esm/index.js"() { +// node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/.pnpm/@azure+core-lro@2.7.2/node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { "use strict"; - init_poller2(); - init_lroEngine2(); - init_poller3(); - init_pollOperation(); + 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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js -function makeBlobBeginCopyFromURLPollOperation(state3) { - return { - state: Object.assign({}, state3), - cancel, - toString, - update - }; -} -var BlobBeginCopyFromUrlPoller, cancel, update, toString; -var init_BlobStartCopyFromUrlPoller = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { "use strict"; - init_esm3(); - init_esm10(); - BlobBeginCopyFromUrlPoller = class extends Poller { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs12(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { constructor(options2) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options2; - let state3; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options2; + let state; if (resumeFrom) { - state3 = JSON.parse(resumeFrom).state; + state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state3), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); + __publicField(this, "intervalInMs"); if (typeof onProgress === "function") { this.onProgress(onProgress); } this.intervalInMs = intervalInMs; } delay() { - return delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; - cancel = async function cancel2(options2 = {}) { - const state3 = this.state; - const { copyId: copyId2 } = state3; - if (state3.isCompleted) { - return makeBlobBeginCopyFromURLPollOperation(state3); + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; + var cancel = async function cancel2(options2 = {}) { + const state = this.state; + const { copyId } = state; + if (state.isCompleted) { + return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { - state3.isCancelled = true; - return makeBlobBeginCopyFromURLPollOperation(state3); + if (!copyId) { + state.isCancelled = true; + return makeBlobBeginCopyFromURLPollOperation(state); } - await state3.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options2.abortSignal }); - state3.isCancelled = true; - return makeBlobBeginCopyFromURLPollOperation(state3); - }; - update = async function update2(options2 = {}) { - const state3 = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state3; - if (!state3.isStarted) { - state3.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); - state3.copyId = result.copyId; + state.isCancelled = true; + return makeBlobBeginCopyFromURLPollOperation(state); + }; + var update = async function update2(options2 = {}) { + const state = this.state; + const { blobClient, copySource, startCopyFromURLOptions } = state; + if (!state.isStarted) { + state.isStarted = true; + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); + state.copyId = result.copyId; if (result.copyStatus === "success") { - state3.result = result; - state3.isCompleted = true; + state.result = result; + state.isCompleted = true; } - } else if (!state3.isCompleted) { + } else if (!state.isCompleted) { try { - const result = await state3.blobClient.getProperties({ abortSignal: options2.abortSignal }); + const result = await state.blobClient.getProperties({ abortSignal: options2.abortSignal }); const { copyStatus, copyProgress } = result; - const prevCopyProgress = state3.copyProgress; + const prevCopyProgress = state.copyProgress; if (copyProgress) { - state3.copyProgress = copyProgress; + state.copyProgress = copyProgress; } if (copyStatus === "pending" && copyProgress !== prevCopyProgress && typeof options2.fireProgress === "function") { - options2.fireProgress(state3); + options2.fireProgress(state); } else if (copyStatus === "success") { - state3.result = result; - state3.isCompleted = true; + state.result = result; + state.isCompleted = true; } else if (copyStatus === "failed") { - state3.error = new Error(`Blob copy failed with reason: "${result.copyStatusDescription || "unknown"}"`); - state3.isCompleted = true; + state.error = new Error(`Blob copy failed with reason: "${result.copyStatusDescription || "unknown"}"`); + state.isCompleted = true; } } catch (err) { - state3.error = err; - state3.isCompleted = true; + state.error = err; + state.isCompleted = true; } } - return makeBlobBeginCopyFromURLPollOperation(state3); + return makeBlobBeginCopyFromURLPollOperation(state); }; - toString = function toString2() { + var toString = function toString2() { return JSON.stringify({ state: this.state }, (key, value) => { if (key === "blobClient") { return void 0; } return value; - }); - }; - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Range.js -function rangeToString(iRange) { - if (iRange.offset < 0) { - throw new RangeError(`Range.offset cannot be smaller than 0.`); - } - if (iRange.count && iRange.count <= 0) { - throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`); - } - return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; -} -var init_Range = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Range.js"() { - "use strict"; - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Batch.js -var import_events, BatchStates, Batch; -var init_Batch = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Batch.js"() { - "use strict"; - import_events = require("events"); - (function(BatchStates2) { - BatchStates2[BatchStates2["Good"] = 0] = "Good"; - BatchStates2[BatchStates2["Error"] = 1] = "Error"; - })(BatchStates || (BatchStates = {})); - Batch = class { - /** - * 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 import_events.EventEmitter(); - } - /** - * Add a operation into queue. - * - * @param operation - - */ - addOperation(operation) { - this.operations.push(async () => { - try { - this.actives++; - await operation(); - this.actives--; - this.completed++; - this.parallelExecute(); - } catch (error3) { - this.emitter.emit("error", error3); - } - }); - } - /** - * Start execute operations in the queue. - * - */ - async do() { - if (this.operations.length === 0) { - return Promise.resolve(); - } - this.parallelExecute(); - return new Promise((resolve, reject) => { - this.emitter.on("finish", resolve); - this.emitter.on("error", (error3) => { - this.state = BatchStates.Error; - reject(error3); - }); - }); - } - /** - * Get next operation to be executed. Return null when reaching ends. - * - */ - nextOperation() { - if (this.offset < this.operations.length) { - return this.operations[this.offset++]; - } - return null; - } - /** - * Start execute operations. One one the most important difference between - * this method with do() is that do() wraps as an sync method. - * - */ - parallelExecute() { - if (this.state === BatchStates.Error) { - return; - } - if (this.completed >= this.operations.length) { - this.emitter.emit("finish"); - return; - } - while (this.actives < this.concurrency) { - const operation = this.nextOperation(); - if (operation) { - operation(); - } else { - return; - } - } - } - }; - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BuffersStream.js -var import_stream3, BuffersStream; -var init_BuffersStream = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BuffersStream.js"() { - "use strict"; - import_stream3 = require("stream"); - BuffersStream = class extends import_stream3.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, options2) { - super(options2); - 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]); - } - } - }; - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-common/src/PooledBuffer.js -var import_buffer, maxBufferLength, PooledBuffer; -var init_PooledBuffer = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-common/src/PooledBuffer.js"() { - "use strict"; - init_BuffersStream(); - import_buffer = __toESM(require("buffer")); - maxBufferLength = import_buffer.default.constants.MAX_LENGTH; - 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); - } + }); + }; + function makeBlobBeginCopyFromURLPollOperation(state) { + return { + state: { ...state }, + cancel, + toString, + update + }; + } + } +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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.`); } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); + if (iRange.count && iRange.count <= 0) { + throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`); } - }; + return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; + } } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.js -var import_events2, BufferScheduler; -var init_BufferScheduler = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { "use strict"; - import_events2 = require("events"); - init_PooledBuffer(); - BufferScheduler = class { + 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 { /** - * 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 + * Creates an instance of Batch. + * @param concurrency - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new import_events2.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}`); + constructor(concurrency = 5) { + /** + * Concurrency. Must be lager than 0. + */ + __publicField(this, "concurrency"); + /** + * Number of active operations under execution. + */ + __publicField(this, "actives", 0); + /** + * Number of completed operations under execution. + */ + __publicField(this, "completed", 0); + /** + * Offset of next operation to be executed. + */ + __publicField(this, "offset", 0); + /** + * Operation array to be executed. + */ + __publicField(this, "operations", []); + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + __publicField(this, "state", BatchStates.Good); + /** + * A private emitter used to pass events inside this class. + */ + __publicField(this, "emitter"); + if (concurrency < 1) { + throw new RangeError("concurrency must be larger than 0"); } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; this.concurrency = concurrency; - this.encoding = encoding; + this.emitter = new events_1.EventEmitter(); } /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. + * Add a operation into queue. * + * @param operation - */ - async do() { - return new Promise((resolve, 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(resolve).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve(); - } - } - }); + addOperation(operation) { + this.operations.push(async () => { + try { + this.actives++; + await operation(); + this.actives--; + this.completed++; + this.parallelExecute(); + } catch (error3) { + this.emitter.emit("error", error3); + } }); } /** - * 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. + * Start execute operations in the queue. * */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); + async do() { + if (this.operations.length === 0) { + return Promise.resolve(); } - this.unresolvedLength -= buffer2.size; - return buffer2; + this.parallelExecute(); + return new Promise((resolve, reject) => { + this.emitter.on("finish", resolve); + this.emitter.on("error", (error3) => { + this.state = BatchStates.Error; + reject(error3); + }); + }); } /** - * 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. + * Get next operation to be executed. Return null when reaching ends. * - * @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(); + nextOperation() { + if (this.offset < this.operations.length) { + return this.operations[this.offset++]; } - 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); + return null; } /** - * Trigger a outgoing handler for a buffer shifted from outgoing. + * Start execute operations. One one the most important difference between + * this method with do() is that do() wraps as an sync method. * - * @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); + parallelExecute() { + if (this.state === BatchStates.Error) { 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(); + if (this.completed >= this.operations.length) { + this.emitter.emit("finish"); + return; + } + while (this.actives < this.concurrency) { + const operation = this.nextOperation(); + if (operation) { + operation(); + } else { + return; + } } } }; + exports2.Batch = Batch; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.js -var init_src3 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils5 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { "use strict"; - init_BufferScheduler(); + 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("fs")); + var node_util_1 = tslib_1.__importDefault(require("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((resolve, reject) => { + 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); + resolve(); + return; + } + let chunk = stream.read(); + if (!chunk) { + return; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + pos += chunkLength; + }); + stream.on("end", () => { + clearTimeout(timeout); + if (pos < count) { + reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); + } + resolve(); + }); + stream.on("error", (msg) => { + clearTimeout(timeout); + reject(msg); + }); + }); + } + async function streamToBuffer2(stream, buffer, encoding) { + let pos = 0; + const bufferSize = buffer.length; + return new Promise((resolve, reject) => { + stream.on("readable", () => { + let chunk = stream.read(); + if (!chunk) { + return; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + if (pos + chunk.length > bufferSize) { + reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); + return; + } + buffer.fill(chunk, pos, pos + chunk.length); + pos += chunk.length; + }); + stream.on("end", () => { + resolve(pos); + }); + stream.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); + }); + } + async function readStreamToLocalFile(rs, file) { + return new Promise((resolve, reject) => { + const ws = node_fs_1.default.createWriteStream(file); + rs.on("error", (err) => { + reject(err); + }); + ws.on("error", (err) => { + reject(err); + }); + ws.on("close", resolve); + rs.pipe(ws); + }); + } + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.node.js -async function streamToBuffer(stream, buffer2, offset, end, encoding) { - let pos = 0; - const count = end - offset; - return new Promise((resolve, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream.on("readable", () => { - if (pos >= count) { - clearTimeout(timeout); - resolve(); - return; - } - let chunk = stream.read(); - if (!chunk) { - return; - } - if (typeof chunk === "string") { - 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); - pos += chunkLength; - }); - stream.on("end", () => { - clearTimeout(timeout); - if (pos < count) { - reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); - } - resolve(); - }); - stream.on("error", (msg) => { - clearTimeout(timeout); - reject(msg); - }); - }); -} -async function streamToBuffer2(stream, buffer2, encoding) { - let pos = 0; - const bufferSize = buffer2.length; - return new Promise((resolve, reject) => { - stream.on("readable", () => { - let chunk = stream.read(); - if (!chunk) { - return; - } - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, encoding); - } - if (pos + chunk.length > bufferSize) { - reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); - return; - } - buffer2.fill(chunk, pos, pos + chunk.length); - pos += chunk.length; - }); - stream.on("end", () => { - resolve(pos); - }); - stream.on("error", reject); - }); -} -async function readStreamToLocalFile(rs, file) { - return new Promise((resolve, reject) => { - const ws = fs.createWriteStream(file); - rs.on("error", (err) => { - reject(err); - }); - ws.on("error", (err) => { - reject(err); - }); - ws.on("close", resolve); - rs.pipe(ws); - }); -} -var fs, util2, fsStat, fsCreateReadStream; -var init_utils_node = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.node.js"() { - "use strict"; - fs = __toESM(require("fs")); - util2 = __toESM(require("util")); - init_constants2(); - fsStat = util2.promisify(fs.stat); - fsCreateReadStream = fs.createReadStream; - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Clients.js -var BlobClient, AppendBlobClient, BlockBlobClient, PageBlobClient; -var init_Clients = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Clients.js"() { - "use strict"; - init_tslib_es6(); - init_esm5(); - init_esm6(); - init_esm3(); - init_esm3(); - init_BlobDownloadResponse(); - init_BlobQueryResponse(); - init_AnonymousCredential(); - init_StorageSharedKeyCredential(); - init_models2(); - init_PageBlobRangeResponse(); - init_Pipeline(); - init_BlobStartCopyFromUrlPoller(); - init_Range(); - init_StorageClient(); - init_Batch(); - init_src3(); - init_constants2(); - init_tracing(); - init_utils_common(); - init_utils_node(); - init_BlobSASSignatureValues(); - init_BlobLeaseClient(); - BlobClient = class _BlobClient extends StorageClient2 { - /** - * The name of the blob. - */ - get name() { - return this._name; - } - /** - * The name of the storage container the blob is associated with. - */ - get containerName() { - return this._containerName; - } +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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_commonjs11(); + 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_utils5(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options2) { options2 = options2 || {}; let pipeline; - let url2; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || 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; options2 = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options2); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options2); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options2 = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options2); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options2); } 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 (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 (!options2.proxyOptions) { - options2.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + options2.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options2); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options2); } 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(), options2); + 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(), options2); } 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); + /** + * blobContext provided by protocol layer. + */ + __publicField(this, "blobContext"); + __publicField(this, "_name"); + __publicField(this, "_containerName"); + __publicField(this, "_versionId"); + __publicField(this, "_snapshot"); ({ 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); + } + /** + * The name of the blob. + */ + get name() { + return this._name; + } + /** + * The name of the storage container the blob is associated with. + */ + get containerName() { + return this._containerName; } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -57947,8 +63172,8 @@ var init_Clients = __esm({ * @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. @@ -57957,8 +63182,8 @@ var init_Clients = __esm({ * @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. @@ -57988,7 +63213,7 @@ var init_Clients = __esm({ * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://learn.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 @@ -57997,76 +63222,106 @@ var init_Clients = __esm({ * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * 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 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(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(typeof data === "string" ? Buffer.from(data) : data); + * 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)); * }); - * readableStream.on("end", () => { + * stream.on("end", () => { * resolve(Buffer.concat(chunks)); * }); - * readableStream.on("error", reject); + * 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, options2 = {}) { options2.conditions = options2.conditions || {}; options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options2, async (updatedOptions) => { - var _a3; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options2, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: isNode ? void 0 : options2.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options2.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: options2.rangeGetContentMD5, rangeGetContentCRC64: options2.rangeGetContentCrc64, snapshot: options2.snapshot, cpkInfo: options2.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!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 (options2.maxRetryRequests === void 0 || options2.maxRetryRequests < 0) { - options2.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options2.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`); @@ -58074,8 +63329,7 @@ var init_Clients = __esm({ if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a4; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options2.conditions, modifiedAccessConditions: { @@ -58083,9 +63337,9 @@ var init_Clients = __esm({ ifModifiedSince: options2.conditions.ifModifiedSince, ifNoneMatch: options2.conditions.ifNoneMatch, ifUnmodifiedSince: options2.conditions.ifUnmodifiedSince, - ifTags: (_a4 = options2.conditions) === null || _a4 === void 0 ? void 0 : _a4.tagConditions + ifTags: options2.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -58094,7 +63348,10 @@ var init_Clients = __esm({ snapshot: options2.snapshot, cpkInfo: options2.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options2.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options2.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options2.maxRetryRequests, onProgress: options2.onProgress @@ -58111,9 +63368,9 @@ var init_Clients = __esm({ * @param options - options to Exists operation. */ async exists(options2 = {}) { - return tracingClient.withSpan("BlobClient-exists", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options2, async (updatedOptions) => { try { - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options2.abortSignal, customerProvidedKey: options2.customerProvidedKey, @@ -58124,7 +63381,7 @@ var init_Clients = __esm({ } 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; @@ -58134,7 +63391,7 @@ var init_Clients = __esm({ /** * 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://learn.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 @@ -58145,17 +63402,25 @@ var init_Clients = __esm({ */ async getProperties(options2 = {}) { options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options2, async (updatedOptions) => { - var _a3; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options2, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, cpkInfo: options2.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) + }; }); } /** @@ -58163,19 +63428,21 @@ var init_Clients = __esm({ * 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://learn.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(options2 = {}) { options2.conditions = options2.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options2.abortSignal, deleteSnapshots: options2.deleteSnapshots, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -58185,19 +63452,27 @@ var init_Clients = __esm({ * 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://learn.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(options2 = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options2, async (updatedOptions) => { - var _a3, _b2; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options2, 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 (((_a3 = e.details) === null || _a3 === void 0 ? void 0 : _a3.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b2 = e.response) === null || _b2 === void 0 ? void 0 : _b2.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -58207,13 +63482,13 @@ var init_Clients = __esm({ * 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://learn.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(options2 = {}) { - return tracingClient.withSpan("BlobClient-undelete", options2, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options2.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -58224,7 +63499,7 @@ var init_Clients = __esm({ * * 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://learn.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 @@ -58236,14 +63511,16 @@ var init_Clients = __esm({ */ async setHTTPHeaders(blobHTTPHeaders, options2 = {}) { options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options2.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.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 })); @@ -58254,22 +63531,24 @@ var init_Clients = __esm({ * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://learn.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, options2 = {}) { + async setMetadata(metadata, options2 = {}) { options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, cpkInfo: options2.customerProvidedKey, encryptionScope: options2.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -58285,15 +63564,17 @@ var init_Clients = __esm({ * @param tags - * @param options - */ - async setTags(tags2, options2 = {}) { - return tracingClient.withSpan("BlobClient-setTags", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -58303,15 +63584,22 @@ var init_Clients = __esm({ * @param options - */ async getTags(options2 = {}) { - return tracingClient.withSpan("BlobClient-getTags", options2, async (updatedOptions) => { - var _a3; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options2, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.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; }); } @@ -58322,24 +63610,26 @@ var init_Clients = __esm({ * @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://learn.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(options2 = {}) { options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, metadata: options2.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, cpkInfo: options2.customerProvidedKey, encryptionScope: options2.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -58360,57 +63650,58 @@ var init_Clients = __esm({ * 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://learn.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(); - * } - * const result = copyPoller.getResult(); - * ``` + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); * - * Example using progress updates: + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); + * } + * const manualResult = manualCopyPoller.getResult(); * - * ```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(); - * ``` - * - * Example using a changing polling interval (default 15 seconds): + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * ```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(); - * ``` - * - * Example using copy cancellation: + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * ```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."); * } * } * ``` @@ -58418,15 +63709,15 @@ var init_Clients = __esm({ * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options2 = {}) { + async beginCopyFromURL(copySource, options2 = {}) { 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: options2.intervalInMs, onProgress: options2.onProgress, resumeFrom: options2.resumeFrom, @@ -58438,14 +63729,14 @@ var init_Clients = __esm({ /** * 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://learn.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, options2 = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options2, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, tracingOptions: updatedOptions.tracingOptions @@ -58455,36 +63746,39 @@ var init_Clients = __esm({ /** * 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://learn.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, options2 = {}) { + async syncCopyFromURL(copySource, options2 = {}) { options2.conditions = options2.conditions || {}; options2.sourceConditions = options2.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options2, async (updatedOptions) => { - var _a3, _b2, _c2, _d2, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options2.abortSignal, metadata: options2.metadata, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b2 = options2.sourceConditions) === null || _b2 === void 0 ? void 0 : _b2.ifMatch, - sourceIfModifiedSince: (_c2 = options2.sourceConditions) === null || _c2 === void 0 ? void 0 : _c2.ifModifiedSince, - sourceIfNoneMatch: (_d2 = options2.sourceConditions) === null || _d2 === void 0 ? void 0 : _d2.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options2.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options2.sourceConditions?.ifMatch, + sourceIfModifiedSince: options2.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options2.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options2.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options2.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options2.sourceAuthorization), - tier: toAccessTier(options2.tier), - blobTagsString: toBlobTagsString(options2.tags), - immutabilityPolicyExpiry: (_f = options2.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options2.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options2.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options2.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options2.tags), + immutabilityPolicyExpiry: options2.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options2.immutabilityPolicy?.policyMode, legalHold: options2.legalHold, encryptionScope: options2.encryptionScope, copySourceTags: options2.copySourceTags, + fileRequestIntent: options2.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -58495,31 +63789,32 @@ var init_Clients = __esm({ * 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://learn.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, options2 = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, rehydratePriority: options2.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a3; - let buffer2; + let buffer; let offset = 0; let count = 0; let options2 = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -58527,12 +63822,12 @@ var init_Clients = __esm({ count = typeof param2 === "number" ? param2 : 0; options2 = param3 || {}; } - let blockSize = (_a3 = options2.blockSize) !== null && _a3 !== void 0 ? _a3 : 0; + let blockSize = options2.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"); @@ -58543,26 +63838,29 @@ var init_Clients = __esm({ if (!options2.conditions) { options2.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options2, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options2), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options2, + 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(options2.concurrency); + const batch = new Batch_js_1.Batch(options2.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -58577,7 +63875,7 @@ var init_Clients = __esm({ tracingOptions: updatedOptions.tracingOptions }); const stream = response.readableStreamBody; - await streamToBuffer(stream, buffer2, off - offset, chunkEnd - offset); + await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options2.onProgress) { options2.onProgress({ loadedBytes: transferProgress }); @@ -58585,7 +63883,7 @@ var init_Clients = __esm({ }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -58605,10 +63903,13 @@ var init_Clients = __esm({ * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options2 = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options2, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options2), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options2, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options2, + 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; @@ -58623,7 +63924,7 @@ var init_Clients = __esm({ 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]; @@ -58651,21 +63952,23 @@ var init_Clients = __esm({ * 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://learn.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, options2 = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options2, async (updatedOptions) => { - var _a3, _b2, _c2; + async startCopyFromURL(copySource, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options2, async (updatedOptions) => { options2.conditions = options2.conditions || {}; options2.sourceConditions = options2.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, metadata: options2.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options2.sourceConditions.ifMatch, sourceIfModifiedSince: options2.sourceConditions.ifModifiedSince, @@ -58673,12 +63976,12 @@ var init_Clients = __esm({ sourceIfUnmodifiedSince: options2.sourceConditions.ifUnmodifiedSince, sourceIfTags: options2.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b2 = options2.immutabilityPolicy) === null || _b2 === void 0 ? void 0 : _b2.expiriesOn, - immutabilityPolicyMode: (_c2 = options2.immutabilityPolicy) === null || _c2 === void 0 ? void 0 : _c2.policyMode, + immutabilityPolicyExpiry: options2.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options2.immutabilityPolicy?.policyMode, legalHold: options2.legalHold, rehydratePriority: options2.rehydratePriority, - tier: toAccessTier(options2.tier), - blobTagsString: toBlobTagsString(options2.tags), + tier: (0, models_js_1.toAccessTier)(options2.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options2.tags), sealBlob: options2.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -58690,18 +63993,24 @@ var init_Clients = __esm({ * 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://learn.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(options2) { return new Promise((resolve) => { - 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 }, options2), this.credential).toString(); - resolve(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options2 + }, this.credential).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -58710,24 +64019,30 @@ var init_Clients = __esm({ * 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://learn.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(options2) { - 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 }, options2), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options2 + }, 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/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. * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` @@ -58735,8 +64050,14 @@ var init_Clients = __esm({ */ generateUserDelegationSasUrl(options2, userDelegationKey) { return new Promise((resolve) => { - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options2), userDelegationKey, this.accountName).toString(); - resolve(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options2 + }, userDelegationKey, this.accountName).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -58745,14 +64066,20 @@ var init_Clients = __esm({ * 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/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. * @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(options2, userDelegationKey) { - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options2), userDelegationKey, this.accountName).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options2 + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -58760,8 +64087,8 @@ var init_Clients = __esm({ * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options2 = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options2, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -58772,8 +64099,8 @@ var init_Clients = __esm({ * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options2 = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options2, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -58786,8 +64113,8 @@ var init_Clients = __esm({ * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options2 = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options2, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -58797,60 +64124,65 @@ var init_Clients = __esm({ * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://learn.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(options2 = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options2, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options2.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; - AppendBlobClient = class _AppendBlobClient extends BlobClient { + exports2.BlobClient = BlobClient; + var AppendBlobClient = class _AppendBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options2) { let pipeline; - let url2; + let url; options2 = options2 || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || 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; options2 = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options2); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options2); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options2); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options2); } 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 (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 (!options2.proxyOptions) { - options2.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + options2.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options2); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options2); } 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(), options2); + 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(), options2); } 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); + /** + * appendBlobsContext provided by protocol layer. + */ + __publicField(this, "appendBlobContext"); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -58861,8 +64193,8 @@ var init_Clients = __esm({ * @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. @@ -58873,28 +64205,43 @@ var init_Clients = __esm({ * * 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(options2 = {}) { options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options2, async (updatedOptions) => { - var _a3, _b2, _c2; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options2.abortSignal, blobHttpHeaders: options2.blobHTTPHeaders, leaseAccessConditions: options2.conditions, metadata: options2.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, cpkInfo: options2.customerProvidedKey, encryptionScope: options2.encryptionScope, - immutabilityPolicyExpiry: (_b2 = options2.immutabilityPolicy) === null || _b2 === void 0 ? void 0 : _b2.expiriesOn, - immutabilityPolicyMode: (_c2 = options2.immutabilityPolicy) === null || _c2 === void 0 ? void 0 : _c2.policyMode, + immutabilityPolicyExpiry: options2.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options2.immutabilityPolicy?.policyMode, legalHold: options2.legalHold, - blobTagsString: toBlobTagsString(options2.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options2.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -58907,15 +64254,26 @@ var init_Clients = __esm({ * @param options - */ async createIfNotExists(options2 = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options2, async (updatedOptions) => { - var _a3, _b2; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options2, 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 (((_a3 = e.details) === null || _a3 === void 0 ? void 0 : _a3.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b2 = e.response) === null || _b2 === void 0 ? void 0 : _b2.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -58928,13 +64286,15 @@ var init_Clients = __esm({ */ async seal(options2 = {}) { options2.conditions = options2.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options2.abortSignal, appendPositionAccessConditions: options2.conditions, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -58950,29 +64310,44 @@ var init_Clients = __esm({ * * 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, options2 = {}) { + async appendBlock(body, contentLength, options2 = {}) { options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options2.abortSignal, appendPositionAccessConditions: options2.conditions, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options2.onProgress }, @@ -58987,7 +64362,7 @@ var init_Clients = __esm({ /** * 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://learn.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 @@ -59001,74 +64376,89 @@ var init_Clients = __esm({ async appendBlockFromURL(sourceURL, sourceOffset, count, options2 = {}) { options2.conditions = options2.conditions || {}; options2.sourceConditions = options2.sourceConditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options2, async (updatedOptions) => { - var _a3, _b2, _c2, _d2, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options2.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options2.sourceContentMD5, sourceContentCrc64: options2.sourceContentCrc64, leaseAccessConditions: options2.conditions, appendPositionAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b2 = options2.sourceConditions) === null || _b2 === void 0 ? void 0 : _b2.ifMatch, - sourceIfModifiedSince: (_c2 = options2.sourceConditions) === null || _c2 === void 0 ? void 0 : _c2.ifModifiedSince, - sourceIfNoneMatch: (_d2 = options2.sourceConditions) === null || _d2 === void 0 ? void 0 : _d2.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options2.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options2.sourceConditions?.ifMatch, + sourceIfModifiedSince: options2.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options2.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options2.sourceConditions?.ifUnmodifiedSince }, - copySourceAuthorization: httpAuthorizationToString(options2.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options2.sourceAuthorization), cpkInfo: options2.customerProvidedKey, encryptionScope: options2.encryptionScope, + fileRequestIntent: options2.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; - BlockBlobClient = class _BlockBlobClient extends BlobClient { + exports2.AppendBlobClient = AppendBlobClient; + var BlockBlobClient = class _BlockBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options2) { let pipeline; - let url2; + let url; options2 = options2 || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || 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; options2 = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options2); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options2); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options2 = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options2); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options2); } 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 (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 (!options2.proxyOptions) { - options2.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + options2.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options2); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options2); } 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(), options2); + 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(), options2); } 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); + /** + * 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. + */ + __publicField(this, "_blobContext"); + /** + * blockBlobContext provided by protocol layer. + */ + __publicField(this, "blockBlobContext"); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -59080,8 +64470,8 @@ var init_Clients = __esm({ * @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. @@ -59090,17 +64480,34 @@ var init_Clients = __esm({ * * Example usage (Node.js): * - * ```js + * ```ts snippet:ClientsQuery + * 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); + * * // 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); + * 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) { + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { - * chunks.push(typeof data === "string" ? Buffer.from(data) : data); + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); * readableStream.on("end", () => { * resolve(Buffer.concat(chunks)); @@ -59114,26 +64521,28 @@ var init_Clients = __esm({ * @param options - */ async query(query, options2 = {}) { - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - if (!isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options2.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", options2, async (updatedOptions) => { - var _a3; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options2, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options2.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options2.inputTextConfiguration), - outputSerialization: toQuerySerialization(options2.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options2.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options2.outputTextConfiguration) }, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, cpkInfo: options2.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options2.abortSignal, onProgress: options2.onProgress, onError: options2.onError @@ -59162,32 +64571,48 @@ var init_Clients = __esm({ * * 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, options2 = {}) { + async upload(body, contentLength, options2 = {}) { options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options2, async (updatedOptions) => { - var _a3, _b2, _c2; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options2.abortSignal, blobHttpHeaders: options2.blobHTTPHeaders, leaseAccessConditions: options2.conditions, metadata: options2.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options2.onProgress }, cpkInfo: options2.customerProvidedKey, encryptionScope: options2.encryptionScope, - immutabilityPolicyExpiry: (_b2 = options2.immutabilityPolicy) === null || _b2 === void 0 ? void 0 : _b2.expiriesOn, - immutabilityPolicyMode: (_c2 = options2.immutabilityPolicy) === null || _c2 === void 0 ? void 0 : _c2.policyMode, + immutabilityPolicyExpiry: options2.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options2.immutabilityPolicy?.policyMode, legalHold: options2.legalHold, - tier: toAccessTier(options2.tier), - blobTagsString: toBlobTagsString(options2.tags), + tier: (0, models_js_1.toAccessTier)(options2.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options2.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -59212,16 +64637,31 @@ var init_Clients = __esm({ */ async syncUploadFromURL(sourceURL, options2 = {}) { options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options2, async (updatedOptions) => { - var _a3, _b2, _c2, _d2, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options2), { blobHttpHeaders: options2.blobHTTPHeaders, leaseAccessConditions: options2.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b2 = options2.sourceConditions) === null || _b2 === void 0 ? void 0 : _b2.ifMatch, - sourceIfModifiedSince: (_c2 = options2.sourceConditions) === null || _c2 === void 0 ? void 0 : _c2.ifModifiedSince, - sourceIfNoneMatch: (_d2 = options2.sourceConditions) === null || _d2 === void 0 ? void 0 : _d2.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options2.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options2.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options2.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options2.sourceAuthorization), tier: toAccessTier(options2.tier), blobTagsString: toBlobTagsString(options2.tags), copySourceTags: options2.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options2, + blobHttpHeaders: options2.blobHTTPHeaders, + leaseAccessConditions: options2.conditions, + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options2.sourceConditions?.ifMatch, + sourceIfModifiedSince: options2.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options2.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options2.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options2.sourceConditions?.tagConditions + }, + cpkInfo: options2.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options2.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options2.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options2.tags), + copySourceTags: options2.copySourceTags, + fileRequestIntent: options2.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -59235,10 +64675,10 @@ var init_Clients = __esm({ * @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, options2 = {}) { - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options2, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options2 = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, requestOptions: { @@ -59256,7 +64696,7 @@ var init_Clients = __esm({ * 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://learn.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 @@ -59273,18 +64713,19 @@ var init_Clients = __esm({ * @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, options2 = {}) { - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options2, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options2 = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, sourceContentMD5: options2.sourceContentMD5, sourceContentCrc64: options2.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options2.customerProvidedKey, encryptionScope: options2.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options2.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options2.sourceAuthorization), + fileRequestIntent: options2.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -59301,24 +64742,26 @@ var init_Clients = __esm({ * @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, options2 = {}) { + async commitBlockList(blocks, options2 = {}) { options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options2, async (updatedOptions) => { - var _a3, _b2, _c2; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options2.abortSignal, blobHttpHeaders: options2.blobHTTPHeaders, leaseAccessConditions: options2.conditions, metadata: options2.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, cpkInfo: options2.customerProvidedKey, encryptionScope: options2.encryptionScope, - immutabilityPolicyExpiry: (_b2 = options2.immutabilityPolicy) === null || _b2 === void 0 ? void 0 : _b2.expiriesOn, - immutabilityPolicyMode: (_c2 = options2.immutabilityPolicy) === null || _c2 === void 0 ? void 0 : _c2.policyMode, + immutabilityPolicyExpiry: options2.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options2.immutabilityPolicy?.policyMode, legalHold: options2.legalHold, - tier: toAccessTier(options2.tier), - blobTagsString: toBlobTagsString(options2.tags), + tier: (0, models_js_1.toAccessTier)(options2.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options2.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -59333,13 +64776,15 @@ var init_Clients = __esm({ * @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, options2 = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options2, async (updatedOptions) => { - var _a3; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options2, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -59368,18 +64813,18 @@ var init_Clients = __esm({ * @param options - */ async uploadData(data, options2 = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options2, async (updatedOptions) => { - if (isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options2, 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); @@ -59406,7 +64851,7 @@ var init_Clients = __esm({ * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options2 = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options2, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -59427,23 +64872,22 @@ var init_Clients = __esm({ * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options2 = {}) { - var _a3, _b2; - let blockSize = (_a3 = options2.blockSize) !== null && _a3 !== void 0 ? _a3 : 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 = options2.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 = (_b2 = options2.maxSingleShotSize) !== null && _b2 !== void 0 ? _b2 : 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 = options2.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; } } } @@ -59453,32 +64897,32 @@ var init_Clients = __esm({ if (!options2.conditions) { options2.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options2, 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 = randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options2.concurrency); + const batch = new Batch_js_1.Batch(options2.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: options2.abortSignal, conditions: options2.conditions, encryptionScope: options2.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options2.onProgress) { options2.onProgress({ loadedBytes: transferProgress @@ -59504,15 +64948,18 @@ var init_Clients = __esm({ * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options2 = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options2, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options2, 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({}, options2), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options2, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -59531,27 +64978,27 @@ var init_Clients = __esm({ * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options2 = {}) { + async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options2 = {}) { if (!options2.blobHTTPHeaders) { options2.blobHTTPHeaders = {}; } if (!options2.conditions) { options2.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options2, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( + 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: options2.customerProvidedKey, conditions: options2.conditions, encryptionScope: options2.encryptionScope, @@ -59569,50 +65016,58 @@ var init_Clients = __esm({ Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options2), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options2, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; - PageBlobClient = class _PageBlobClient extends BlobClient { + exports2.BlockBlobClient = BlockBlobClient; + var PageBlobClient = class _PageBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options2) { let pipeline; - let url2; + let url; options2 = options2 || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || 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; options2 = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options2); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options2); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options2); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options2); } 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 (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 (!options2.proxyOptions) { - options2.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + options2.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options2); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options2); } 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(), options2); + 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(), options2); } 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); + /** + * pageBlobsContext provided by protocol layer. + */ + __publicField(this, "pageBlobContext"); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -59623,8 +65078,8 @@ var init_Clients = __esm({ * @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 @@ -59637,23 +65092,25 @@ var init_Clients = __esm({ */ async create(size, options2 = {}) { options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options2, async (updatedOptions) => { - var _a3, _b2, _c2; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options2.abortSignal, blobHttpHeaders: options2.blobHTTPHeaders, blobSequenceNumber: options2.blobSequenceNumber, leaseAccessConditions: options2.conditions, metadata: options2.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, cpkInfo: options2.customerProvidedKey, encryptionScope: options2.encryptionScope, - immutabilityPolicyExpiry: (_b2 = options2.immutabilityPolicy) === null || _b2 === void 0 ? void 0 : _b2.expiriesOn, - immutabilityPolicyMode: (_c2 = options2.immutabilityPolicy) === null || _c2 === void 0 ? void 0 : _c2.policyMode, + immutabilityPolicyExpiry: options2.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options2.immutabilityPolicy?.policyMode, legalHold: options2.legalHold, - tier: toAccessTier(options2.tier), - blobTagsString: toBlobTagsString(options2.tags), + tier: (0, models_js_1.toAccessTier)(options2.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options2.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -59668,15 +65125,27 @@ var init_Clients = __esm({ * @param options - */ async createIfNotExists(size, options2 = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options2, async (updatedOptions) => { - var _a3, _b2; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options2, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options2), { 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, { + ...options2, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a3 = e.details) === null || _a3 === void 0 ? void 0 : _a3.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b2 = e.response) === null || _b2 === void 0 ? void 0 : _b2.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -59692,19 +65161,21 @@ var init_Clients = __esm({ * @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, options2 = {}) { + async uploadPages(body, offset, count, options2 = {}) { options2.conditions = options2.conditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options2.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options2.conditions, transactionalContentMD5: options2.transactionalContentMD5, transactionalContentCrc64: options2.transactionalContentCrc64, @@ -59717,7 +65188,7 @@ var init_Clients = __esm({ /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://learn.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 @@ -59728,25 +65199,28 @@ var init_Clients = __esm({ async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options2 = {}) { options2.conditions = options2.conditions || {}; options2.sourceConditions = options2.sourceConditions || {}; - ensureCpkIfSpecified(options2.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options2, async (updatedOptions) => { - var _a3, _b2, _c2, _d2, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options2.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options2, 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: options2.abortSignal, sourceContentMD5: options2.sourceContentMD5, sourceContentCrc64: options2.sourceContentCrc64, leaseAccessConditions: options2.conditions, sequenceNumberAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b2 = options2.sourceConditions) === null || _b2 === void 0 ? void 0 : _b2.ifMatch, - sourceIfModifiedSince: (_c2 = options2.sourceConditions) === null || _c2 === void 0 ? void 0 : _c2.ifModifiedSince, - sourceIfNoneMatch: (_d2 = options2.sourceConditions) === null || _d2 === void 0 ? void 0 : _d2.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options2.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options2.sourceConditions?.ifMatch, + sourceIfModifiedSince: options2.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options2.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options2.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options2.customerProvidedKey, encryptionScope: options2.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options2.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options2.sourceAuthorization), + fileRequestIntent: options2.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -59762,13 +65236,15 @@ var init_Clients = __esm({ */ async clearPages(offset = 0, count, options2 = {}) { options2.conditions = options2.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options2.conditions, cpkInfo: options2.customerProvidedKey, encryptionScope: options2.encryptionScope, @@ -59787,16 +65263,18 @@ var init_Clients = __esm({ */ async getPageRanges(offset = 0, count, options2 = {}) { options2.conditions = options2.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options2, async (updatedOptions) => { - var _a3; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options2, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -59811,15 +65289,17 @@ var init_Clients = __esm({ * @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, options2 = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options2.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -59839,17 +65319,15 @@ var init_Clients = __esm({ * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return __asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options2 = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield __await(this.listPageRangesSegment(offset, count, marker2, options2)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield __await(yield __await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options2 = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options2); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -59858,27 +65336,11 @@ var init_Clients = __esm({ * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return __asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options2 = {}) { - var _a3, e_1, _b2, _c2; - let marker2; - try { - for (var _d2 = true, _e = __asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options2)), _f; _f = yield __await(_e.next()), _a3 = _f.done, !_a3; _d2 = true) { - _c2 = _f.value; - _d2 = false; - const getPageRangesSegment = _c2; - yield __await(yield* __asyncDelegator(__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d2 && !_a3 && (_b2 = _e.return)) yield __await(_b2.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options2 = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options2)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. @@ -59886,66 +65348,67 @@ var init_Clients = __esm({ * * .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"; + * + * 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); * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * // 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()`: - * - * ```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 `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}`); * } * } - * ``` - * - * Example using paging with a marker: * - * ```js - * let i = 1; + * // 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 - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * 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 - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * 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. @@ -59971,7 +65434,10 @@ var init_Clients = __esm({ * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options2)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options2 + }); } }; } @@ -59987,17 +65453,19 @@ var init_Clients = __esm({ */ async getPageRangesDiff(offset, count, prevSnapshot, options2 = {}) { options2.conditions = options2.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options2, async (updatedOptions) => { - var _a3; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options2, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.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); }); } /** @@ -60014,20 +65482,22 @@ var init_Clients = __esm({ * @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, options2 = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options2 === null || options2 === void 0 ? void 0 : options2.abortSignal, - leaseAccessConditions: options2 === null || options2 === void 0 ? void 0 : options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2 === null || options2 === void 0 ? void 0 : options2.conditions), { ifTags: (_a3 = options2 === null || options2 === void 0 ? void 0 : options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options2?.abortSignal, + leaseAccessConditions: options2?.conditions, + modifiedAccessConditions: { + ...options2?.conditions, + ifTags: options2?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options2 === null || options2 === void 0 ? void 0 : options2.maxPageSize, + marker, + maxPageSize: options2?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -60048,17 +65518,15 @@ var init_Clients = __esm({ * 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, options2) { - return __asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield __await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options2)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield __await(yield __await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options2) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options2); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -60068,27 +65536,11 @@ var init_Clients = __esm({ * @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, options2) { - return __asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a3, e_2, _b2, _c2; - let marker2; - try { - for (var _d2 = true, _e = __asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options2)), _f; _f = yield __await(_e.next()), _a3 = _f.done, !_a3; _d2 = true) { - _c2 = _f.value; - _d2 = false; - const getPageRangesSegment = _c2; - yield __await(yield* __asyncDelegator(__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d2 && !_a3 && (_b2 = _e.return)) yield __await(_b2.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options2) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options2)) { + 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. @@ -60096,66 +65548,76 @@ var init_Clients = __esm({ * * .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("");` - * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); * - * ```js + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * 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(); + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `byPage()`: + * // 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()); + * } * - * ```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 `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}`); * } * } - * ``` - * - * Example using paging with a marker: * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); + * // 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 - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * 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().byPage({ continuationToken: marker, maxPageSize: 10 }); + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .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}`); + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * 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. @@ -60164,7 +65626,9 @@ var init_Clients = __esm({ */ listPageRangesDiff(offset, count, prevSnapshot, options2 = {}) { options2.conditions = options2.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options2)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options2 + }); return { /** * The next method, part of the iteration protocol @@ -60182,7 +65646,10 @@ var init_Clients = __esm({ * 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 }, options2)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options2 + }); } }; } @@ -60196,19 +65663,21 @@ var init_Clients = __esm({ * @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, options2 = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options2 = {}) { options2.conditions = options2.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options2, async (updatedOptions) => { - var _a3; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options2, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -60221,12 +65690,14 @@ var init_Clients = __esm({ */ async resize(size, options2 = {}) { options2.conditions = options2.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, encryptionScope: options2.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -60234,22 +65705,24 @@ var init_Clients = __esm({ } /** * Sets a page blob's sequence number. - * @see https://learn.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, options2 = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options2 = {}) { options2.conditions = options2.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options2.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options2.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -60260,60 +65733,72 @@ var init_Clients = __esm({ * 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://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://learn.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @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, options2 = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options2, async (updatedOptions) => { - var _a3; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options2.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options2.conditions), { ifTags: (_a3 = options2.conditions) === null || _a3 === void 0 ? void 0 : _a3.tagConditions }), + modifiedAccessConditions: { + ...options2.conditions, + ifTags: options2.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.js -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(); -} -function utf8ByteLength(str) { - return Buffer.byteLength(str); -} -var init_BatchUtils = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { "use strict"; - init_utils_node(); - init_constants2(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils5(); + var constants_js_1 = require_constants9(); + async function getBodyAsText(batchResponse) { + 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(str) { + return Buffer.byteLength(str); + } } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponseParser.js -var HTTP_HEADER_DELIMITER, SPACE_DELIMITER, NOT_FOUND, BatchResponseParser; -var init_BatchResponseParser = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponseParser.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { "use strict"; - init_esm5(); - init_esm8(); - init_constants2(); - init_BatchUtils(); - init_log4(); - HTTP_HEADER_DELIMITER = ": "; - SPACE_DELIMITER = " "; - NOT_FOUND = -1; - BatchResponseParser = class { + 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_constants9(); + 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 { constructor(batchResponse, subRequests) { + __publicField(this, "batchResponse"); + __publicField(this, "responseBatchBoundary"); + __publicField(this, "perResponsePrefix"); + __publicField(this, "batchResponseEnding"); + __publicField(this, "subRequests"); if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); } @@ -60323,15 +65808,15 @@ var init_BatchResponseParser = __esm({ 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://learn.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) { @@ -60343,18 +65828,18 @@ var init_BatchResponseParser = __esm({ for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = toHttpHeadersLike(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]); @@ -60374,7 +65859,7 @@ var init_BatchResponseParser = __esm({ } 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; } @@ -60389,7 +65874,7 @@ var init_BatchResponseParser = __esm({ deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger3.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++; @@ -60404,19 +65889,22 @@ var init_BatchResponseParser = __esm({ }; } }; + exports2.BatchResponseParser = BatchResponseParser; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Mutex.js -var MutexLockStatus, Mutex; -var init_Mutex = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Mutex.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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"; MutexLockStatus2[MutexLockStatus2["UNLOCKED"] = 1] = "UNLOCKED"; })(MutexLockStatus || (MutexLockStatus = {})); - Mutex = class { + var Mutex = class { /** * Lock for a specific key. If the lock has been acquired by another customer, then * will wait until getting the lock. @@ -60466,64 +65954,38 @@ var init_Mutex = __esm({ } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + __publicField(Mutex, "keys", {}); + __publicField(Mutex, "listeners", {}); + exports2.Mutex = Mutex; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatch.js -function batchRequestAssemblePolicy(batchRequest) { - return { - name: "batchRequestAssemblePolicy", - async sendRequest(request3) { - batchRequest.appendSubRequestToBody(request3); - return { - request: request3, - status: 200, - headers: createHttpHeaders() - }; - } - }; -} -function batchHeaderFilterPolicy() { - return { - name: "batchHeaderFilterPolicy", - async sendRequest(request3, next) { - let xMsHeaderName = ""; - for (const [name] of request3.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { - xMsHeaderName = name; - } - } - if (xMsHeaderName !== "") { - request3.headers.delete(xMsHeaderName); - } - return next(request3); - } - }; -} -var BlobBatch, InnerBatchRequest; -var init_BlobBatch = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatch.js"() { - "use strict"; - init_esm3(); - init_esm6(); - init_esm5(); - init_esm3(); - init_AnonymousCredential(); - init_Clients(); - init_Mutex(); - init_Pipeline(); - init_utils_common(); - init_esm9(); - init_constants2(); - init_StorageSharedKeyCredential(); - init_tracing(); - init_esm7(); - init_StorageSharedKeyCredentialPolicyV2(); - BlobBatch = class { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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_constants9(); + 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 { constructor() { - this.batch = "batch"; + __publicField(this, "batchRequest"); + __publicField(this, "batch", "batch"); + __publicField(this, "batchType"); this.batchRequest = new InnerBatchRequest(); } /** @@ -60547,13 +66009,13 @@ var init_BlobBatch = __esm({ 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) { @@ -60565,13 +66027,13 @@ var init_BlobBatch = __esm({ } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options2) { - let url2; + let url; let credential; - if (typeof urlOrBlobClient === "string" && (isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || 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; options2 = credentialOrOptions; } else { @@ -60580,28 +66042,28 @@ var init_BlobBatch = __esm({ if (!options2) { options2 = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options2, 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, options2) { - let url2; + let url; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || 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; options2 = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -60609,24 +66071,32 @@ var init_BlobBatch = __esm({ if (!options2) { options2 = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options2, 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); }); }); } }; - InnerBatchRequest = class { + exports2.BlobBatch = BlobBatch; + var InnerBatchRequest = class { constructor() { + __publicField(this, "operationCount"); + __publicField(this, "body"); + __publicField(this, "subRequests"); + __publicField(this, "boundary"); + __publicField(this, "subRequestPrefix"); + __publicField(this, "multipartContentType"); + __publicField(this, "batchRequestEnding"); this.operationCount = 0; this.body = ""; - const tempGuid = 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(); @@ -60639,9 +66109,9 @@ var init_BlobBatch = __esm({ * @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 = createEmptyPipeline(); - corePipeline.addPolicy(serializationPolicy({ - stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -60650,44 +66120,44 @@ var init_BlobBatch = __esm({ }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (isTokenCredential(credential)) { - corePipeline.addPolicy(bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: 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; } - appendSubRequestToBody(request3) { + appendSubRequestToBody(request) { 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 - `${request3.method.toString()} ${getURLPathAndQuery(request3.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); - for (const [name, value] of request3.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + ].join(constants_js_1.HTTP_LINE_ENDING); + for (const [name, value] of request.headers) { + 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 path4 = getURLPath(subRequest.url); + const path4 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path4 || path4 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -60698,7 +66168,7 @@ var init_BlobBatch = __esm({ } // 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; @@ -60707,34 +66177,66 @@ var init_BlobBatch = __esm({ return this.subRequests; } }; + function batchRequestAssemblePolicy(batchRequest) { + return { + name: "batchRequestAssemblePolicy", + async sendRequest(request) { + batchRequest.appendSubRequestToBody(request); + return { + request, + status: 200, + headers: (0, core_rest_pipeline_1.createHttpHeaders)() + }; + } + }; + } + function batchHeaderFilterPolicy() { + return { + name: "batchHeaderFilterPolicy", + async sendRequest(request, next) { + let xMsHeaderName = ""; + for (const [name] of request.headers) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { + xMsHeaderName = name; + } + } + if (xMsHeaderName !== "") { + request.headers.delete(xMsHeaderName); + } + return next(request); + } + }; + } } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatchClient.js -var BlobBatchClient; -var init_BlobBatchClient = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatchClient.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { "use strict"; - init_BatchResponseParser(); - init_BatchUtils(); - init_BlobBatch(); - init_tracing(); - init_AnonymousCredential(); - init_StorageContextClient(); - init_Pipeline(); - init_utils_common(); - BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options2) { + 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(url, credentialOrPipeline, options2) { + __publicField(this, "serviceOrContainerContext"); let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options2); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options2); } else { - pipeline = newPipeline(credentialOrPipeline, options2); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options2); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path4 = getURLPath(url2); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path4 = (0, utils_common_js_1.getURLPath)(url); if (path4 && path4 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -60746,10 +66248,10 @@ var init_BlobBatchClient = __esm({ * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options2) { - 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, options2); @@ -60760,7 +66262,7 @@ var init_BlobBatchClient = __esm({ return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options2) { - 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, options2); @@ -60778,11 +66280,25 @@ var init_BlobBatchClient = __esm({ * * 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); @@ -60790,17 +66306,32 @@ var init_BlobBatchClient = __esm({ * * 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://learn.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 - @@ -60809,10 +66340,12 @@ var init_BlobBatchClient = __esm({ if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options2, 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, @@ -60829,79 +66362,85 @@ var init_BlobBatchClient = __esm({ }); } }; + exports2.BlobBatchClient = BlobBatchClient; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/ContainerClient.js -var ContainerClient; -var init_ContainerClient = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/ContainerClient.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { "use strict"; - init_tslib_es6(); - init_esm5(); - init_esm3(); - init_esm6(); - init_AnonymousCredential(); - init_StorageSharedKeyCredential(); - init_Pipeline(); - init_StorageClient(); - init_tracing(); - init_utils_common(); - init_BlobSASSignatureValues(); - init_BlobLeaseClient(); - init_Clients(); - init_BlobBatchClient(); - ContainerClient = class extends StorageClient2 { - /** - * The name of the container. - */ - get containerName() { - return this._containerName; - } + 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 { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options2) { let pipeline; - let url2; + let url; options2 = options2 || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options2); + } 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, options2); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options2); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options2); } 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 (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 (!options2.proxyOptions) { - options2.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + options2.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options2); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options2); } 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(), options2); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options2); } 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); + /** + * containerContext provided by protocol layer. + */ + __publicField(this, "containerContext"); + __publicField(this, "_containerName"); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } + /** + * The name of the container. + */ + get containerName() { + return this._containerName; + } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://learn.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. @@ -60909,34 +66448,52 @@ var init_ContainerClient = __esm({ * * 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(options2 = {}) { - return tracingClient.withSpan("ContainerClient-create", options2, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options2, 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://learn.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(options2 = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options2, async (updatedOptions) => { - var _a3, _b2; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options2, 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 (((_a3 = e.details) === null || _a3 === void 0 ? void 0 : _a3.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b2 = e.response) === null || _b2 === void 0 ? void 0 : _b2.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -60953,7 +66510,7 @@ var init_ContainerClient = __esm({ * @param options - */ async exists(options2 = {}) { - return tracingClient.withSpan("ContainerClient-exists", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options2, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options2.abortSignal, @@ -60975,7 +66532,7 @@ var init_ContainerClient = __esm({ * @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} @@ -60983,7 +66540,7 @@ var init_ContainerClient = __esm({ * @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} @@ -60993,15 +66550,27 @@ var init_ContainerClient = __esm({ * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```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 blockBlobClient = containerClient.getBlockBlobClient(""); + * 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} @@ -61009,12 +66578,12 @@ var init_ContainerClient = __esm({ * @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://learn.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 @@ -61027,14 +66596,18 @@ var init_ContainerClient = __esm({ if (!options2.conditions) { options2.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options2, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options2.abortSignal }, options2.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options2.abortSignal, + ...options2.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://learn.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. */ @@ -61042,8 +66615,8 @@ var init_ContainerClient = __esm({ if (!options2.conditions) { options2.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options2, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, modifiedAccessConditions: options2.conditions, @@ -61054,19 +66627,26 @@ var init_ContainerClient = __esm({ /** * 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://learn.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(options2 = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options2, async (updatedOptions) => { - var _a3, _b2; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options2, 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 (((_a3 = e.details) === null || _a3 === void 0 ? void 0 : _a3.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b2 = e.response) === null || _b2 === void 0 ? void 0 : _b2.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -61078,24 +66658,24 @@ var init_ContainerClient = __esm({ * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://learn.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, options2 = {}) { + async setMetadata(metadata, options2 = {}) { if (!options2.conditions) { options2.conditions = {}; } if (options2.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", options2, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options2.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -61108,7 +66688,7 @@ var init_ContainerClient = __esm({ * 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://learn.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. */ @@ -61116,8 +66696,8 @@ var init_ContainerClient = __esm({ if (!options2.conditions) { options2.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options2, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options2, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options2.abortSignal, leaseAccessConditions: options2.conditions, tracingOptions: updatedOptions.tracingOptions @@ -61166,29 +66746,29 @@ var init_ContainerClient = __esm({ * 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://learn.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, options2 = {}) { + async setAccessPolicy(access, containerAcl, options2 = {}) { options2.conditions = options2.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options2, 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: options2.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options2.conditions, modifiedAccessConditions: options2.conditions, @@ -61203,7 +66783,7 @@ var init_ContainerClient = __esm({ * @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. @@ -61227,10 +66807,10 @@ var init_ContainerClient = __esm({ * @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, options2 = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options2, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options2, 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 @@ -61242,14 +66822,14 @@ var init_ContainerClient = __esm({ * 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://learn.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, options2 = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options2, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options2.versionId) { blobClient = blobClient.withVersion(options2.versionId); @@ -61267,13 +66847,33 @@ var init_ContainerClient = __esm({ * @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, options2 = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options2, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options2), { 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, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options2, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options2, + 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; }); } @@ -61288,17 +66888,40 @@ var init_ContainerClient = __esm({ * @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(delimiter3, marker2, options2 = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options2, async (updatedOptions) => { - var _a3; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter3, Object.assign(Object.assign({ marker: marker2 }, options2), { 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: (_a3 = response.segment.blobPrefixes) === null || _a3 === void 0 ? void 0 : _a3.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter2, marker, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options2, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter2, { + marker, + ...options2, + 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; }); } @@ -61314,44 +66937,26 @@ var init_ContainerClient = __esm({ * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return __asyncGenerator(this, arguments, function* listSegments_1(marker2, options2 = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield __await(this.listBlobFlatSegment(marker2, options2)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield __await(yield __await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options2 = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options2); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return __asyncGenerator(this, arguments, function* listItems_1(options2 = {}) { - var _a3, e_1, _b2, _c2; - let marker2; - try { - for (var _d2 = true, _e = __asyncValues(this.listSegments(marker2, options2)), _f; _f = yield __await(_e.next()), _a3 = _f.done, !_a3; _d2 = true) { - _c2 = _f.value; - _d2 = false; - const listBlobsFlatSegmentResponse = _c2; - yield __await(yield* __asyncDelegator(__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d2 && !_a3 && (_b2 = _e.return)) yield __await(_b2.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options2 = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options2)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -61359,64 +66964,63 @@ var init_ContainerClient = __esm({ * * .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("");` - * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * - * ```js + * // Example using `for await` syntax * 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(); + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `byPage()`: + * // 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()); + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { - * for (const blob of response.segment.blobItems) { + * // 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}`); * } * } - * ``` - * - * Example using paging with a marker: * - * ```js - * let i = 1; + * // 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 - * 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}`); + * } * } - * * // 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}`); + * } * } * ``` * @@ -61424,41 +67028,44 @@ var init_ContainerClient = __esm({ * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options2 = {}) { - const include2 = []; + const include = []; if (options2.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options2.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options2.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options2.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options2.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options2.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options2.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options2.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options2.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options2.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options2.prefix === "") { options2.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options2), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options2, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -61477,7 +67084,10 @@ var init_ContainerClient = __esm({ * 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 + }); } }; } @@ -61494,17 +67104,15 @@ var init_ContainerClient = __esm({ * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return __asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter3, marker2, options2 = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield __await(this.listBlobHierarchySegment(delimiter3, marker2, options2)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield __await(yield __await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter2, marker, options2 = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter2, marker, options2); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -61512,35 +67120,22 @@ var init_ContainerClient = __esm({ * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return __asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter3, options2 = {}) { - var _a3, e_2, _b2, _c2; - let marker2; - try { - for (var _d2 = true, _e = __asyncValues(this.listHierarchySegments(delimiter3, marker2, options2)), _f; _f = yield __await(_e.next()), _a3 = _f.done, !_a3; _d2 = true) { - _c2 = _f.value; - _d2 = false; - const listBlobsHierarchySegmentResponse = _c2; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield __await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield __await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d2 && !_a3 && (_b2 = _e.return)) yield __await(_b2.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter2, options2 = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter2, marker, options2)) { + 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. @@ -61548,118 +67143,138 @@ var init_ContainerClient = __esm({ * * .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"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax + * let i = 1; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); * } else { - * console.log(`\tBlobItem: name - ${item.name}`); + * console.log(`\tBlobItem: name - ${blob.name}`); * } * } - * ``` * - * 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}`); + * // 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 - ${item.name}`); + * console.log(`\tBlobItem: name - ${value.name}`); * } - * entity = await iter.next(); + * ({ value, done } = 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; + * // 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 response.segment.blobItems) { + * for (const blob of page.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"); - * - * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; * - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.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(delimiter3, options2 = {}) { - if (delimiter3 === "") { + listBlobsByHierarchy(delimiter2, options2 = {}) { + if (delimiter2 === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options2.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options2.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options2.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options2.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options2.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options2.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options2.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options2.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options2.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options2.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options2.prefix === "") { options2.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options2), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter3, updatedOptions); + const updatedOptions = { + ...options2, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -61677,7 +67292,10 @@ var init_ContainerClient = __esm({ * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter3, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter2, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -61698,23 +67316,27 @@ var init_ContainerClient = __esm({ * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options2 = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options2, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options2, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options2.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options2.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a3; - let tagValue = ""; - if (((_a3 = blob.tags) === null || _a3 === void 0 ? void 0 : _a3.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; }); } @@ -61734,18 +67356,16 @@ var init_ContainerClient = __esm({ * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return __asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options2 = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield __await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options2)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield __await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options2 = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options2); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -61756,27 +67376,11 @@ var init_ContainerClient = __esm({ * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return __asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options2 = {}) { - var _a3, e_3, _b2, _c2; - let marker2; - try { - for (var _d2 = true, _e = __asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options2)), _f; _f = yield __await(_e.next()), _a3 = _f.done, !_a3; _d2 = true) { - _c2 = _f.value; - _d2 = false; - const segment = _c2; - yield __await(yield* __asyncDelegator(__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d2 && !_a3 && (_b2 = _e.return)) yield __await(_b2.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options2 = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options2)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -61786,53 +67390,54 @@ var init_ContainerClient = __esm({ * * 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 @@ -61840,11 +67445,10 @@ var init_ContainerClient = __esm({ * .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}`); * } * } * ``` @@ -61856,7 +67460,9 @@ var init_ContainerClient = __esm({ * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options2 = {}) { - const listSegmentOptions = Object.assign({}, options2); + const listSegmentOptions = { + ...options2 + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -61875,7 +67481,10 @@ var init_ContainerClient = __esm({ * 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 + }); } }; } @@ -61884,14 +67493,14 @@ var init_ContainerClient = __esm({ * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://learn.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(options2 = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options2, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options2, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options2.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -61903,7 +67512,7 @@ var init_ContainerClient = __esm({ 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]; @@ -61923,18 +67532,21 @@ var init_ContainerClient = __esm({ * 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://learn.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(options2) { return new Promise((resolve) => { - 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 }, options2), this.credential).toString(); - resolve(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options2 + }, this.credential).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -61943,23 +67555,26 @@ var init_ContainerClient = __esm({ * 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://learn.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(options2) { - 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 }, options2), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options2 + }, 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/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. * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` @@ -61967,57 +67582,104 @@ var init_ContainerClient = __esm({ */ generateUserDelegationSasUrl(options2, userDelegationKey) { return new Promise((resolve) => { - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options2), userDelegationKey, this.accountName).toString(); - resolve(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options2 + }, userDelegationKey, this.accountName).toString(); + resolve((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/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. * @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(options2, userDelegationKey) { - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options2), userDelegationKey, this.accountName).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options2 + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://learn.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/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASPermissions.js -var AccountSASPermissions; -var init_AccountSASPermissions = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASPermissions.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { "use strict"; - AccountSASPermissions = class _AccountSASPermissions { + 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; + /** + * Permission to read resources and list queues and tables granted. + */ + __publicField(this, "read", false); + /** + * Permission to write resources granted. + */ + __publicField(this, "write", false); + /** + * Permission to delete blobs and files granted. + */ + __publicField(this, "delete", false); + /** + * Permission to delete versions granted. + */ + __publicField(this, "deleteVersion", false); + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + __publicField(this, "list", false); + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + __publicField(this, "add", false); + /** + * Permission to create blobs and files granted. + */ + __publicField(this, "create", false); + /** + * Permissions to update messages and table entities granted. + */ + __publicField(this, "update", false); + /** + * Permission to get and delete messages granted. + */ + __publicField(this, "process", false); + /** + * Specfies Tag access granted. + */ + __publicField(this, "tag", false); + /** + * Permission to filter blobs. + */ + __publicField(this, "filter", false); + /** + * Permission to set immutability policy. + */ + __publicField(this, "setImmutabilityPolicy", false); + /** + * Specifies that Permanent Delete is permitted. + */ + __publicField(this, "permanentDelete", false); } /** * Parse initializes the AccountSASPermissions fields from a string. @@ -62129,7 +67791,7 @@ var init_AccountSASPermissions = __esm({ * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -62176,19 +67838,30 @@ var init_AccountSASPermissions = __esm({ return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js -var AccountSASResourceTypes; -var init_AccountSASResourceTypes = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { "use strict"; - AccountSASResourceTypes = class _AccountSASResourceTypes { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; + var AccountSASResourceTypes = class _AccountSASResourceTypes { constructor() { - this.service = false; - this.container = false; - this.object = false; + /** + * Permission to access service level APIs granted. + */ + __publicField(this, "service", false); + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + __publicField(this, "container", false); + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + __publicField(this, "object", false); } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an @@ -62218,7 +67891,7 @@ var init_AccountSASResourceTypes = __esm({ /** * Converts the given resource types to a string. * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -62235,20 +67908,34 @@ var init_AccountSASResourceTypes = __esm({ return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASServices.js -var AccountSASServices; -var init_AccountSASServices = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASServices.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { "use strict"; - AccountSASServices = class _AccountSASServices { + 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; + /** + * Permission to access blob resources granted. + */ + __publicField(this, "blob", false); + /** + * Permission to access file resources granted. + */ + __publicField(this, "file", false); + /** + * Permission to access queue resources granted. + */ + __publicField(this, "queue", false); + /** + * Permission to access table resources granted. + */ + __publicField(this, "table", false); } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an @@ -62299,108 +67986,128 @@ var init_AccountSASServices = __esm({ return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js -function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { - return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; -} -function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version3 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version3 < "2020-08-04") { - throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); - } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version3 < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); - } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version3 < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); - } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version3 < "2019-12-12") { - throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); - } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version3 < "2019-12-12") { - throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); - } - if (accountSASSignatureValues.encryptionScope && version3 < "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(); - let stringToSign; - if (version3 >= "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.protocol ? accountSASSignatureValues.protocol : "", - version3, - accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", - "" - // Account SAS requires an additional newline character - ].join("\n"); - } else { - stringToSign = [ - sharedKeyCredential.accountName, - parsedPermissions, - parsedServices, - parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", - accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version3, - "" - // Account SAS requires an additional newline character - ].join("\n"); +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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 : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "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") { + throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); + } + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "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") { + throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); + } + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); + } + if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); + } + 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") { + stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + 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, + accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", + "" + // Account SAS requires an additional newline character + ].join("\n"); + } else { + stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + 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, + "" + // Account SAS requires an additional newline character + ].join("\n"); + } + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.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), + stringToSign + }; + } } - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(version3, 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 init_AccountSASSignatureValues = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js"() { - "use strict"; - init_AccountSASPermissions(); - init_AccountSASResourceTypes(); - init_AccountSASServices(); - init_SasIPRange(); - init_SASQueryParameters(); - init_constants2(); - init_utils_common(); - } -}); - -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobServiceClient.js -var BlobServiceClient; -var init_BlobServiceClient = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobServiceClient.js"() { - "use strict"; - init_tslib_es6(); - init_esm6(); - init_esm5(); - init_esm3(); - init_Pipeline(); - init_ContainerClient(); - init_utils_common(); - init_StorageSharedKeyCredential(); - init_AnonymousCredential(); - init_utils_common(); - init_tracing(); - init_BlobBatchClient(); - init_StorageClient(); - init_AccountSASPermissions(); - init_AccountSASSignatureValues(); - init_AccountSASServices(); - BlobServiceClient = class _BlobServiceClient extends StorageClient2 { +}); + +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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 { + constructor(url, credentialOrPipeline, options2) { + let pipeline; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { + pipeline = credentialOrPipeline; + } 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, options2); + } else { + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options2); + } + super(url, pipeline); + /** + * serviceContext provided by protocol layer. + */ + __publicField(this, "serviceContext"); + this.serviceContext = this.storageClientContext.service; + } /** * * Creates an instance of BlobServiceClient from connection string. @@ -62415,37 +68122,25 @@ var init_BlobServiceClient = __esm({ */ static fromConnectionString(connectionString, options2) { options2 = options2 || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (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 (!options2.proxyOptions) { - options2.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + options2.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options2); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options2); 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(), options2); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options2); 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, options2) { - let pipeline; - if (isPipelineLike(credentialOrPipeline)) { - pipeline = credentialOrPipeline; - } else if (isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options2); - } else { - pipeline = newPipeline(new AnonymousCredential(), options2); - } - super(url2, pipeline); - this.serviceContext = this.storageClientContext.service; - } /** * Creates a {@link ContainerClient} object * @@ -62454,22 +68149,31 @@ var init_BlobServiceClient = __esm({ * * 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://learn.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, options2 = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options2, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -62486,7 +68190,7 @@ var init_BlobServiceClient = __esm({ * @returns Container deletion response. */ async deleteContainer(containerName, options2 = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options2, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options2, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -62500,47 +68204,29 @@ var init_BlobServiceClient = __esm({ * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options2 = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options2, async (updatedOptions) => { - const containerClient = this.getContainerClient(options2.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options2, async (updatedOptions) => { + const containerClient = this.getContainerClient(options2.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, options2 = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options2, async (updatedOptions) => { - var _a3; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a3 = options2.sourceCondition) === null || _a3 === void 0 ? void 0 : _a3.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://learn.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(options2 = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options2, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options2, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options2.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -62549,15 +68235,15 @@ var init_BlobServiceClient = __esm({ /** * 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://learn.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, options2 = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options2, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options2, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options2.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -62567,14 +68253,14 @@ var init_BlobServiceClient = __esm({ * 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://learn.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(options2 = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options2, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options2, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options2.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -62585,14 +68271,14 @@ var init_BlobServiceClient = __esm({ * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://learn.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(options2 = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options2, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options2, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options2.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -62600,7 +68286,7 @@ var init_BlobServiceClient = __esm({ } /** * Returns a list of the containers under the specified account. - * @see https://learn.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 @@ -62612,9 +68298,15 @@ var init_BlobServiceClient = __esm({ * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options2 = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options2, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options2.abortSignal, marker: marker2 }, options2), { include: typeof options2.include === "string" ? [options2.include] : options2.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options2, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options2.abortSignal, + marker, + ...options2, + include: typeof options2.include === "string" ? [options2.include] : options2.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -62635,23 +68327,27 @@ var init_BlobServiceClient = __esm({ * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options2 = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options2, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options2, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options2.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options2.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a3; - let tagValue = ""; - if (((_a3 = blob.tags) === null || _a3 === void 0 ? void 0 : _a3.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; }); } @@ -62671,18 +68367,16 @@ var init_BlobServiceClient = __esm({ * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return __asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options2 = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield __await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options2)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield __await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options2 = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options2); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -62693,27 +68387,11 @@ var init_BlobServiceClient = __esm({ * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return __asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options2 = {}) { - var _a3, e_1, _b2, _c2; - let marker2; - try { - for (var _d2 = true, _e = __asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options2)), _f; _f = yield __await(_e.next()), _a3 = _f.done, !_a3; _d2 = true) { - _c2 = _f.value; - _d2 = false; - const segment = _c2; - yield __await(yield* __asyncDelegator(__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d2 && !_a3 && (_b2 = _e.return)) yield __await(_b2.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options2 = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options2)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -62721,57 +68399,53 @@ var init_BlobServiceClient = __esm({ * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://learn.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"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * ```js + * // 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 @@ -62783,7 +68457,7 @@ var init_BlobServiceClient = __esm({ * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -62795,7 +68469,9 @@ var init_BlobServiceClient = __esm({ * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options2 = {}) { - const listSegmentOptions = Object.assign({}, options2); + const listSegmentOptions = { + ...options2 + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -62814,7 +68490,10 @@ var init_BlobServiceClient = __esm({ * 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 + }); } }; } @@ -62830,45 +68509,27 @@ var init_BlobServiceClient = __esm({ * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return __asyncGenerator(this, arguments, function* listSegments_1(marker2, options2 = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield __await(this.listContainersSegment(marker2, options2)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield __await(yield __await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options2 = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options2); + 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 __asyncGenerator(this, arguments, function* listItems_1(options2 = {}) { - var _a3, e_2, _b2, _c2; - let marker2; - try { - for (var _d2 = true, _e = __asyncValues(this.listSegments(marker2, options2)), _f; _f = yield __await(_e.next()), _a3 = _f.done, !_a3; _d2 = true) { - _c2 = _f.value; - _d2 = false; - const segment = _c2; - yield __await(yield* __asyncDelegator(__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d2 && !_a3 && (_b2 = _e.return)) yield __await(_b2.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options2 = {}) { + let marker; + for await (const segment of this.listSegments(marker, options2)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -62876,45 +68537,41 @@ var init_BlobServiceClient = __esm({ * * .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"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * ```js + * // 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; * @@ -62936,7 +68593,7 @@ var init_BlobServiceClient = __esm({ * // 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}`); * } * } * ``` @@ -62948,17 +68605,20 @@ var init_BlobServiceClient = __esm({ if (options2.prefix === "") { options2.prefix = void 0; } - const include2 = []; + const include = []; if (options2.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options2.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options2.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options2), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options2, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -62977,7 +68637,10 @@ var init_BlobServiceClient = __esm({ * 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 + }); } }; } @@ -62987,16 +68650,16 @@ var init_BlobServiceClient = __esm({ * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://learn.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, options2 = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options2, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options2 = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options2, 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: options2.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -63010,19 +68673,27 @@ var init_BlobServiceClient = __esm({ 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://learn.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. @@ -63030,7 +68701,7 @@ var init_BlobServiceClient = __esm({ * 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://learn.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. @@ -63038,21 +68709,22 @@ var init_BlobServiceClient = __esm({ * @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", options2 = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options2 = {}) { + 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() - }, options2), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options2 + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -63060,7 +68732,7 @@ var init_BlobServiceClient = __esm({ * 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://learn.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. @@ -63068,126 +68740,130 @@ var init_BlobServiceClient = __esm({ * @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", options2 = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options2 = {}) { + 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() - }, options2), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options2 + }, this.credential).stringToSign; } }; + exports2.BlobServiceClient = BlobServiceClient; } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponse.js -var init_BatchResponse = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponse.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generatedModels.js -var KnownEncryptionAlgorithmType2; -var init_generatedModels = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generatedModels.js"() { +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { "use strict"; - (function(KnownEncryptionAlgorithmType3) { - KnownEncryptionAlgorithmType3["AES256"] = "AES256"; - })(KnownEncryptionAlgorithmType2 || (KnownEncryptionAlgorithmType2 = {})); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); } }); -// node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.js -var src_exports = {}; -__export(src_exports, { - AccountSASPermissions: () => AccountSASPermissions, - AccountSASResourceTypes: () => AccountSASResourceTypes, - AccountSASServices: () => AccountSASServices, - AnonymousCredential: () => AnonymousCredential, - AnonymousCredentialPolicy: () => AnonymousCredentialPolicy, - AppendBlobClient: () => AppendBlobClient, - BaseRequestPolicy: () => BaseRequestPolicy, - BlobBatch: () => BlobBatch, - BlobBatchClient: () => BlobBatchClient, - BlobClient: () => BlobClient, - BlobLeaseClient: () => BlobLeaseClient, - BlobSASPermissions: () => BlobSASPermissions, - BlobServiceClient: () => BlobServiceClient, - BlockBlobClient: () => BlockBlobClient, - BlockBlobTier: () => BlockBlobTier, - ContainerClient: () => ContainerClient, - ContainerSASPermissions: () => ContainerSASPermissions, - Credential: () => Credential, - CredentialPolicy: () => CredentialPolicy, - KnownEncryptionAlgorithmType: () => KnownEncryptionAlgorithmType2, - PageBlobClient: () => PageBlobClient, - Pipeline: () => Pipeline, - PremiumPageBlobTier: () => PremiumPageBlobTier, - RestError: () => RestError, - SASProtocol: () => SASProtocol, - SASQueryParameters: () => SASQueryParameters, - StorageBlobAudience: () => StorageBlobAudience, - StorageBrowserPolicy: () => StorageBrowserPolicy, - StorageBrowserPolicyFactory: () => StorageBrowserPolicyFactory, - StorageOAuthScopes: () => StorageOAuthScopes, - StorageRetryPolicy: () => StorageRetryPolicy, - StorageRetryPolicyFactory: () => StorageRetryPolicyFactory, - StorageRetryPolicyType: () => StorageRetryPolicyType, - StorageSharedKeyCredential: () => StorageSharedKeyCredential, - StorageSharedKeyCredentialPolicy: () => StorageSharedKeyCredentialPolicy, - generateAccountSASQueryParameters: () => generateAccountSASQueryParameters, - generateBlobSASQueryParameters: () => generateBlobSASQueryParameters, - getBlobServiceAccountAudience: () => getBlobServiceAccountAudience, - isPipelineLike: () => isPipelineLike, - logger: () => logger3, - newPipeline: () => newPipeline -}); -var init_src4 = __esm({ - "node_modules/.pnpm/@azure+storage-blob@12.27.0/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.js"() { - "use strict"; - init_esm5(); - init_BlobServiceClient(); - init_Clients(); - init_ContainerClient(); - init_BlobLeaseClient(); - init_AccountSASPermissions(); - init_AccountSASResourceTypes(); - init_AccountSASServices(); - init_AccountSASSignatureValues(); - init_BlobBatch(); - init_BlobBatchClient(); - init_BatchResponse(); - init_BlobSASPermissions(); - init_BlobSASSignatureValues(); - init_StorageBrowserPolicyFactory(); - init_ContainerSASPermissions(); - init_AnonymousCredential(); - init_Credential(); - init_StorageSharedKeyCredential(); - init_models2(); - init_Pipeline(); - init_RequestPolicy(); - init_AnonymousCredentialPolicy(); - init_CredentialPolicy(); - init_StorageRetryPolicyFactory(); - init_StorageSharedKeyCredentialPolicy(); - init_SASQueryParameters(); - init_generatedModels(); - init_log4(); - } -}); - -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/errors.js +// node_modules/.pnpm/@azure+storage-blob@12.28.0/node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/.pnpm/@azure+storage-blob@12.28.0/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; + } }); + } +}); + +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/shared/errors.js var require_errors2 = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/errors.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/shared/errors.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UsageError = exports2.NetworkError = exports2.GHESNotSupportedError = exports2.CacheNotFoundError = exports2.InvalidResponseError = exports2.FilesNotFoundError = void 0; @@ -63262,11 +68938,11 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/uploadUtils.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/uploadUtils.js var require_uploadUtils = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -63279,21 +68955,21 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -63322,12 +68998,12 @@ var require_uploadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core6 = __importStar(require_core()); - var storage_blob_1 = (init_src4(), __toCommonJS(src_exports)); + var core6 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs13(); var errors_1 = require_errors2(); var UploadProgress = class { - constructor(contentLength2) { - this.contentLength = contentLength2; + constructor(contentLength) { + this.contentLength = contentLength; this.sentBytes = 0; this.displayedComplete = false; this.startTime = Date.now(); @@ -63406,11 +69082,11 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options2) { - var _a3; - return __awaiter6(this, void 0, void 0, function* () { + var _a; + return __awaiter7(this, void 0, void 0, function* () { const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); - const uploadProgress = new UploadProgress((_a3 = options2 === null || options2 === void 0 ? void 0 : options2.archiveSizeBytes) !== null && _a3 !== void 0 ? _a3 : 0); + const uploadProgress = new UploadProgress((_a = options2 === null || options2 === void 0 ? void 0 : options2.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options2 === null || options2 === void 0 ? void 0 : options2.uploadChunkSize, concurrency: options2 === null || options2 === void 0 ? void 0 : options2.uploadConcurrency, @@ -63437,11 +69113,11 @@ var require_uploadUtils = __commonJS({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/requestUtils.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/requestUtils.js var require_requestUtils = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -63454,21 +69130,21 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -63497,7 +69173,7 @@ 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 core6 = __importStar(require_core()); + var core6 = __importStar2(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants6(); function isSuccessStatusCode(statusCode) { @@ -63527,12 +69203,12 @@ var require_requestUtils = __commonJS({ } exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return new Promise((resolve) => setTimeout(resolve, milliseconds)); }); } - function retry(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay5 = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter6(this, void 0, void 0, function* () { + function retry(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { + return __awaiter7(this, void 0, void 0, function* () { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -63563,21 +69239,21 @@ var require_requestUtils = __commonJS({ core6.debug(`${name} - Error is not retryable`); break; } - yield sleep(delay5); + yield sleep(delay2); attempt++; } throw Error(`${name} failed: ${errorMessage}`); }); } exports2.retry = retry; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay5 = constants_1.DefaultRetryDelay) { - return __awaiter6(this, void 0, void 0, function* () { + function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { + return __awaiter7(this, void 0, void 0, function* () { return yield retry( name, method, (response) => response.statusCode, maxAttempts, - delay5, + delay2, // If the error object contains the statusCode property, extract it and return // an TypedResponse so it can be processed by the retry logic. (error3) => { @@ -63596,9 +69272,9 @@ var require_requestUtils = __commonJS({ }); } exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay5 = constants_1.DefaultRetryDelay) { - return __awaiter6(this, void 0, void 0, function* () { - return yield retry(name, method, (response) => response.message.statusCode, maxAttempts, delay5); + function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { + return __awaiter7(this, void 0, void 0, function* () { + return yield retry(name, method, (response) => response.message.statusCode, maxAttempts, delay2); }); } exports2.retryHttpClientResponse = retryHttpClientResponse; @@ -63692,12 +69368,12 @@ var init_AbortSignal = __esm({ }); // node_modules/.pnpm/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js -var AbortError2, AbortController2; +var AbortError, AbortController2; var init_AbortController = __esm({ "node_modules/.pnpm/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js"() { "use strict"; init_AbortSignal(); - AbortError2 = class extends Error { + AbortError = class extends Error { constructor(message) { super(message); this.name = "AbortError"; @@ -63756,13 +69432,13 @@ var init_AbortController = __esm({ }); // node_modules/.pnpm/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist-esm/src/index.js -var src_exports2 = {}; -__export(src_exports2, { +var src_exports = {}; +__export(src_exports, { AbortController: () => AbortController2, - AbortError: () => AbortError2, + AbortError: () => AbortError, AbortSignal: () => AbortSignal2 }); -var init_src5 = __esm({ +var init_src = __esm({ "node_modules/.pnpm/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist-esm/src/index.js"() { "use strict"; init_AbortController(); @@ -63770,11 +69446,11 @@ var init_src5 = __esm({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/downloadUtils.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/downloadUtils.js var require_downloadUtils = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -63787,21 +69463,21 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -63830,26 +69506,26 @@ var require_downloadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core6 = __importStar(require_core()); + var core6 = __importStar2(require_core()); var http_client_1 = require_lib(); - var storage_blob_1 = (init_src4(), __toCommonJS(src_exports)); - var buffer2 = __importStar(require("buffer")); - var fs4 = __importStar(require("fs")); - var stream = __importStar(require("stream")); - var util3 = __importStar(require("util")); - var utils = __importStar(require_cacheUtils()); + var storage_blob_1 = require_commonjs13(); + var buffer = __importStar2(require("buffer")); + var fs3 = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants6(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = (init_src5(), __toCommonJS(src_exports2)); + var abort_controller_1 = (init_src(), __toCommonJS(src_exports)); function pipeResponseToStream(response, output) { - return __awaiter6(this, void 0, void 0, function* () { - const pipeline = util3.promisify(stream.pipeline); + return __awaiter7(this, void 0, void 0, function* () { + const pipeline = util.promisify(stream.pipeline); yield pipeline(response.message, output); }); } var DownloadProgress = class { - constructor(contentLength2) { - this.contentLength = contentLength2; + constructor(contentLength) { + this.contentLength = contentLength; this.segmentIndex = 0; this.segmentSize = 0; this.segmentOffset = 0; @@ -63944,10 +69620,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter6(this, void 0, void 0, function* () { - const writeStream = fs4.createWriteStream(archivePath); + return __awaiter7(this, void 0, void 0, function* () { + const writeStream = fs3.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter6(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter7(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -63969,15 +69645,15 @@ var require_downloadUtils = __commonJS({ } exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options2) { - var _a3; - return __awaiter6(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs4.promises.open(archivePath, "w"); + var _a; + return __awaiter7(this, void 0, void 0, function* () { + const archiveDescriptor = yield fs3.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options2.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter6(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter7(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -63994,7 +69670,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter6(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter7(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -64007,7 +69683,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter6(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter7(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--; @@ -64018,7 +69694,7 @@ var require_downloadUtils = __commonJS({ while (nextDownload = downloads.pop()) { activeDownloads[nextDownload.offset] = nextDownload.promiseGetter(); actives++; - if (actives >= ((_a3 = options2.downloadConcurrency) !== null && _a3 !== void 0 ? _a3 : 10)) { + if (actives >= ((_a = options2.downloadConcurrency) !== null && _a !== void 0 ? _a : 10)) { yield waitAndWrite(); } } @@ -64033,7 +69709,7 @@ var require_downloadUtils = __commonJS({ } exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -64054,8 +69730,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter6(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter7(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -64071,8 +69747,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options2) { - var _a3; - return __awaiter6(this, void 0, void 0, function* () { + var _a; + return __awaiter7(this, void 0, void 0, function* () { const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -64081,21 +69757,21 @@ var require_downloadUtils = __commonJS({ } }); const properties = yield client.getProperties(); - const contentLength2 = (_a3 = properties.contentLength) !== null && _a3 !== void 0 ? _a3 : -1; - if (contentLength2 < 0) { + const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; + if (contentLength < 0) { core6.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { - const maxSegmentSize = Math.min(134217728, buffer2.constants.MAX_LENGTH); - const downloadProgress = new DownloadProgress(contentLength2); - const fd = fs4.openSync(archivePath, "w"); + const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); + const downloadProgress = new DownloadProgress(contentLength); + const fd = fs3.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); const abortSignal2 = controller.signal; while (!downloadProgress.isDone()) { const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; - const segmentSize = Math.min(maxSegmentSize, contentLength2 - segmentStart); + const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart); downloadProgress.nextSegment(segmentSize); const result = yield promiseWithTimeout(options2.segmentTimeoutInMs || 36e5, client.downloadToBuffer(segmentStart, segmentSize, { abortSignal: abortSignal2, @@ -64106,18 +69782,18 @@ var require_downloadUtils = __commonJS({ controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { - fs4.writeFileSync(fd, result); + fs3.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs4.closeSync(fd); + fs3.closeSync(fd); } } }); } exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter6(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter7(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve) => { timeoutHandle = setTimeout(() => resolve("timeout"), timeoutMs); @@ -64130,11 +69806,11 @@ var require_downloadUtils = __commonJS({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/options.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/options.js var require_options2 = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/options.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -64147,23 +69823,23 @@ var require_options2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core6 = __importStar(require_core()); + var core6 = __importStar2(require_core()); function getUploadOptions(copy2) { const result = { useAzureSdk: false, @@ -64234,9 +69910,9 @@ var require_options2 = __commonJS({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/config.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/config.js var require_config = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/config.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/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; @@ -64256,26 +69932,26 @@ var require_config = __commonJS({ } exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { - const version3 = getCacheServiceVersion(); - switch (version3) { + const version2 = getCacheServiceVersion(); + switch (version2) { case "v1": return process.env["ACTIONS_CACHE_URL"] || process.env["ACTIONS_RESULTS_URL"] || ""; case "v2": return process.env["ACTIONS_RESULTS_URL"] || ""; default: - throw new Error(`Unsupported cache service version: ${version3}`); + throw new Error(`Unsupported cache service version: ${version2}`); } } exports2.getCacheServiceURL = getCacheServiceURL; } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/package.json +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/package.json var require_package = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/package.json"(exports2, module2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.0.3", + version: "4.0.5", preview: true, description: "Actions cache lib", keywords: [ @@ -64315,42 +69991,43 @@ var require_package = __commonJS({ "@actions/core": "^1.11.1", "@actions/exec": "^1.0.1", "@actions/glob": "^0.1.0", + "@protobuf-ts/runtime-rpc": "^2.11.1", "@actions/http-client": "^2.1.1", "@actions/io": "^1.0.1", "@azure/abort-controller": "^1.1.0", "@azure/ms-rest-js": "^2.6.0", "@azure/storage-blob": "^12.13.0", - "@protobuf-ts/plugin": "^2.9.4", semver: "^6.3.1" }, devDependencies: { "@types/node": "^22.13.9", "@types/semver": "^6.0.0", + "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" } }; } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/user-agent.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/shared/user-agent.js var require_user_agent = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = void 0; var packageJson = require_package(); - function getUserAgentString2() { + function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString2; + exports2.getUserAgentString = getUserAgentString; } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheHttpClient.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/cacheHttpClient.js var require_cacheHttpClient = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -64363,21 +70040,21 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -64406,12 +70083,12 @@ var require_cacheHttpClient = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core6 = __importStar(require_core()); + var core6 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs4 = __importStar(require("fs")); + var fs3 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options2(); @@ -64423,12 +70100,12 @@ var require_cacheHttpClient = __commonJS({ if (!baseUrl) { throw new Error("Cache Service Url not found, unable to restore cache."); } - const url2 = `${baseUrl}_apis/artifactcache/${resource}`; - core6.debug(`Resource Url: ${url2}`); - return url2; + const url = `${baseUrl}_apis/artifactcache/${resource}`; + core6.debug(`Resource Url: ${url}`); + return url; } - function createAcceptHeader(type2, apiVersion) { - return `${type2};api-version=${apiVersion}`; + function createAcceptHeader(type, apiVersion) { + return `${type};api-version=${apiVersion}`; } function getRequestOptions() { const requestOptions = { @@ -64444,16 +70121,16 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options2) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const httpClient = createHttpClient(); - const version3 = utils.getCacheVersion(paths, options2 === null || options2 === void 0 ? void 0 : options2.compressionMethod, options2 === null || options2 === void 0 ? void 0 : options2.enableCrossOsArchive); - const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version3}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter6(this, void 0, void 0, function* () { + const version2 = utils.getCacheVersion(paths, options2 === null || options2 === void 0 ? void 0 : options2.compressionMethod, options2 === null || options2 === void 0 ? void 0 : options2.enableCrossOsArchive); + const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version2}`; + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter7(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { if (core6.isDebug()) { - yield printCachesListForDiagnostics(keys[0], httpClient, version3); + yield printCachesListForDiagnostics(keys[0], httpClient, version2); } return null; } @@ -64472,17 +70149,17 @@ var require_cacheHttpClient = __commonJS({ }); } exports2.getCacheEntry = getCacheEntry; - function printCachesListForDiagnostics(key, httpClient, version3) { - return __awaiter6(this, void 0, void 0, function* () { + function printCachesListForDiagnostics(key, httpClient, version2) { + return __awaiter7(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter6(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter7(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core6.debug(`No matching cache found for cache key '${key}', version '${version3} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core6.debug(`No matching cache found for cache key '${key}', version '${version2} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { core6.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); @@ -64492,7 +70169,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options2) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options2); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -64510,15 +70187,15 @@ Other caches with similar key:`); } exports2.downloadCache = downloadCache; function reserveCache(key, paths, options2) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const httpClient = createHttpClient(); - const version3 = utils.getCacheVersion(paths, options2 === null || options2 === void 0 ? void 0 : options2.compressionMethod, options2 === null || options2 === void 0 ? void 0 : options2.enableCrossOsArchive); + const version2 = utils.getCacheVersion(paths, options2 === null || options2 === void 0 ? void 0 : options2.compressionMethod, options2 === null || options2 === void 0 ? void 0 : options2.enableCrossOsArchive); const reserveCacheRequest = { key, - version: version3, + version: version2, cacheSize: options2 === null || options2 === void 0 ? void 0 : options2.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter6(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter7(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; @@ -64529,13 +70206,13 @@ Other caches with similar key:`); return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { core6.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})`, () => __awaiter6(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter7(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -64544,10 +70221,10 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options2) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); - const fd = fs4.openSync(archivePath, "r"); + const fd = fs3.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options2); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -64555,13 +70232,13 @@ Other caches with similar key:`); core6.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter6(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter7(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs4.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs3.createReadStream(archivePath, { fd, start, end, @@ -64572,21 +70249,21 @@ Other caches with similar key:`); } }))); } finally { - fs4.closeSync(fd); + fs3.closeSync(fd); } return; }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter6(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter7(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache3(cacheId, archivePath, signedUploadURL, options2) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options2); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -64612,7 +70289,7 @@ Other caches with similar key:`); } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/json-typings.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/json-typings.js function typeofJsonValue(value) { let t = typeof value; if (t == "object") { @@ -64627,12 +70304,12 @@ function isJsonObject(value) { return value !== null && typeof value == "object" && !Array.isArray(value); } var init_json_typings = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/json-typings.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/json-typings.js"() { "use strict"; } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/base64.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/base64.js function base64decode(base64Str) { let es = base64Str.length * 3 / 4; if (base64Str[base64Str.length - 2] == "=") @@ -64682,7 +70359,7 @@ function base64decode(base64Str) { throw Error(`invalid base64 string.`); return bytes.subarray(0, bytePos); } -function base64encode2(bytes) { +function base64encode(bytes) { let base642 = "", groupPos = 0, b, p = 0; for (let i = 0; i < bytes.length; i++) { b = bytes[i]; @@ -64713,8 +70390,8 @@ function base64encode2(bytes) { return base642; } var encTable, decTable; -var init_base642 = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/base64.js"() { +var init_base64 = __esm({ + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/base64.js"() { "use strict"; encTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); decTable = []; @@ -64725,7 +70402,7 @@ var init_base642 = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/protobufjs-utf8.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/protobufjs-utf8.js function utf8read(bytes) { if (bytes.length < 1) return ""; @@ -64757,19 +70434,19 @@ function utf8read(bytes) { } var fromCharCodes; var init_protobufjs_utf8 = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/protobufjs-utf8.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/protobufjs-utf8.js"() { "use strict"; fromCharCodes = (chunk) => String.fromCharCode.apply(String, chunk); } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/binary-format-contract.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/binary-format-contract.js function mergeBinaryOptions(a, b) { return Object.assign(Object.assign({}, a), b); } var UnknownFieldHandler, WireType; var init_binary_format_contract = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/binary-format-contract.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/binary-format-contract.js"() { "use strict"; (function(UnknownFieldHandler2) { UnknownFieldHandler2.symbol = Symbol.for("protobuf-ts/unknown"); @@ -64802,7 +70479,7 @@ var init_binary_format_contract = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/goog-varint.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/goog-varint.js function varint64read() { let lowBits = 0; let highBits = 0; @@ -64973,13 +70650,13 @@ function varint32read() { } var TWO_PWR_32_DBL; var init_goog_varint = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/goog-varint.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/goog-varint.js"() { "use strict"; TWO_PWR_32_DBL = (1 << 16) * (1 << 16); } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/pb-long.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/pb-long.js function detectBi() { const dv = new DataView(new ArrayBuffer(8)); const ok = globalThis.BigInt !== void 0 && typeof dv.getBigInt64 === "function" && typeof dv.getBigUint64 === "function" && typeof dv.setBigInt64 === "function" && typeof dv.setBigUint64 === "function"; @@ -64998,7 +70675,7 @@ function assertBi(bi) { } var BI, RE_DECIMAL_STR, TWO_PWR_32_DBL2, HALF_2_PWR_32, SharedPbLong, PbULong, PbLong; var init_pb_long = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/pb-long.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/pb-long.js"() { "use strict"; init_goog_varint(); detectBi(); @@ -65192,13 +70869,13 @@ var init_pb_long = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/binary-reader.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/binary-reader.js function binaryReadOptions(options2) { return options2 ? Object.assign(Object.assign({}, defaultsRead), options2) : defaultsRead; } var defaultsRead, BinaryReader; var init_binary_reader = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/binary-reader.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/binary-reader.js"() { "use strict"; init_binary_format_contract(); init_pb_long(); @@ -65366,7 +71043,7 @@ var init_binary_reader = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/assert.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/assert.js function assert2(condition, msg) { if (!condition) { throw new Error(msg); @@ -65397,7 +71074,7 @@ function assertFloat32(arg) { } var FLOAT32_MAX, FLOAT32_MIN, UINT32_MAX, INT32_MAX, INT32_MIN; var init_assert = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/assert.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/assert.js"() { "use strict"; FLOAT32_MAX = 34028234663852886e22; FLOAT32_MIN = -34028234663852886e22; @@ -65407,13 +71084,13 @@ var init_assert = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/binary-writer.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/binary-writer.js function binaryWriteOptions(options2) { return options2 ? Object.assign(Object.assign({}, defaultsWrite), options2) : defaultsWrite; } var defaultsWrite, BinaryWriter; var init_binary_writer = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/binary-writer.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/binary-writer.js"() { "use strict"; init_pb_long(); init_goog_varint(); @@ -65479,8 +71156,8 @@ var init_binary_writer = __esm({ * * Generated code should compute the tag ahead of time and call `uint32()`. */ - tag(fieldNo, type2) { - return this.uint32((fieldNo << 3 | type2) >>> 0); + tag(fieldNo, type) { + return this.uint32((fieldNo << 3 | type) >>> 0); } /** * Write a chunk of raw bytes. @@ -65629,7 +71306,7 @@ var init_binary_writer = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/json-format-contract.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/json-format-contract.js function jsonReadOptions(options2) { return options2 ? Object.assign(Object.assign({}, defaultsRead2), options2) : defaultsRead2; } @@ -65637,14 +71314,14 @@ function jsonWriteOptions(options2) { return options2 ? Object.assign(Object.assign({}, defaultsWrite2), options2) : defaultsWrite2; } function mergeJsonOptions(a, b) { - var _a3, _b2; + var _a, _b; let c = Object.assign(Object.assign({}, a), b); - c.typeRegistry = [...(_a3 = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a3 !== void 0 ? _a3 : [], ...(_b2 = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b2 !== void 0 ? _b2 : []]; + c.typeRegistry = [...(_a = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a !== void 0 ? _a : [], ...(_b = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b !== void 0 ? _b : []]; return c; } var defaultsWrite2, defaultsRead2; var init_json_format_contract = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/json-format-contract.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/json-format-contract.js"() { "use strict"; defaultsWrite2 = { emitDefaultValues: false, @@ -65658,16 +71335,16 @@ var init_json_format_contract = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/message-type-contract.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/message-type-contract.js var MESSAGE_TYPE; var init_message_type_contract = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/message-type-contract.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/message-type-contract.js"() { "use strict"; MESSAGE_TYPE = Symbol.for("protobuf-ts/message-type"); } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/lower-camel-case.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/lower-camel-case.js function lowerCamelCase(snakeCase) { let capNext = false; const sb = []; @@ -65690,28 +71367,28 @@ function lowerCamelCase(snakeCase) { return sb.join(""); } var init_lower_camel_case = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/lower-camel-case.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/lower-camel-case.js"() { "use strict"; } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-info.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-info.js function normalizeFieldInfo(field) { - var _a3, _b2, _c2, _d2; - field.localName = (_a3 = field.localName) !== null && _a3 !== void 0 ? _a3 : lowerCamelCase(field.name); - field.jsonName = (_b2 = field.jsonName) !== null && _b2 !== void 0 ? _b2 : lowerCamelCase(field.name); - field.repeat = (_c2 = field.repeat) !== null && _c2 !== void 0 ? _c2 : RepeatType.NO; - field.opt = (_d2 = field.opt) !== null && _d2 !== void 0 ? _d2 : field.repeat ? false : field.oneof ? false : field.kind == "message"; + var _a, _b, _c, _d; + field.localName = (_a = field.localName) !== null && _a !== void 0 ? _a : lowerCamelCase(field.name); + field.jsonName = (_b = field.jsonName) !== null && _b !== void 0 ? _b : lowerCamelCase(field.name); + field.repeat = (_c = field.repeat) !== null && _c !== void 0 ? _c : RepeatType.NO; + field.opt = (_d = field.opt) !== null && _d !== void 0 ? _d : field.repeat ? false : field.oneof ? false : field.kind == "message"; return field; } function readFieldOptions(messageType, fieldName, extensionName, extensionType) { - var _a3; - const options2 = (_a3 = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a3 === void 0 ? void 0 : _a3.options; + var _a; + const options2 = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options; return options2 && options2[extensionName] ? extensionType.fromJson(options2[extensionName]) : void 0; } function readFieldOption(messageType, fieldName, extensionName, extensionType) { - var _a3; - const options2 = (_a3 = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a3 === void 0 ? void 0 : _a3.options; + var _a; + const options2 = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options; if (!options2) { return void 0; } @@ -65731,7 +71408,7 @@ function readMessageOption(messageType, extensionName, extensionType) { } var ScalarType, LongType, RepeatType; var init_reflection_info = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-info.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-info.js"() { "use strict"; init_lower_camel_case(); (function(ScalarType2) { @@ -65764,7 +71441,7 @@ var init_reflection_info = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/oneof.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/oneof.js function isOneofGroup(any) { if (typeof any != "object" || any === null || !any.hasOwnProperty("oneofKind")) { return false; @@ -65805,22 +71482,22 @@ function getSelectedOneofValue(oneof) { return oneof[oneof.oneofKind]; } var init_oneof = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/oneof.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/oneof.js"() { "use strict"; } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-type-check.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-type-check.js var ReflectionTypeCheck; var init_reflection_type_check = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-type-check.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-type-check.js"() { "use strict"; init_reflection_info(); init_oneof(); ReflectionTypeCheck = class { constructor(info5) { - var _a3; - this.fields = (_a3 = info5.fields) !== null && _a3 !== void 0 ? _a3 : []; + var _a; + this.fields = (_a = info5.fields) !== null && _a !== void 0 ? _a : []; } prepare() { if (this.data) @@ -65949,31 +71626,31 @@ var init_reflection_type_check = __esm({ } return true; } - message(arg, type2, allowExcessProperties, depth) { + message(arg, type, allowExcessProperties, depth) { if (allowExcessProperties) { - return type2.isAssignable(arg, depth); + return type.isAssignable(arg, depth); } - return type2.is(arg, depth); + return type.is(arg, depth); } - messages(arg, type2, allowExcessProperties, depth) { + messages(arg, type, allowExcessProperties, depth) { if (!Array.isArray(arg)) return false; if (depth < 2) return true; if (allowExcessProperties) { for (let i = 0; i < arg.length && i < depth; i++) - if (!type2.isAssignable(arg[i], depth - 1)) + if (!type.isAssignable(arg[i], depth - 1)) return false; } else { for (let i = 0; i < arg.length && i < depth; i++) - if (!type2.is(arg[i], depth - 1)) + if (!type.is(arg[i], depth - 1)) return false; } return true; } - scalar(arg, type2, longType) { + scalar(arg, type, longType) { let argType = typeof arg; - switch (type2) { + switch (type) { case ScalarType.UINT64: case ScalarType.FIXED64: case ScalarType.INT64: @@ -66000,40 +71677,40 @@ var init_reflection_type_check = __esm({ return argType == "number" && Number.isInteger(arg); } } - scalars(arg, type2, depth, longType) { + scalars(arg, type, depth, longType) { if (!Array.isArray(arg)) return false; if (depth < 2) return true; if (Array.isArray(arg)) { for (let i = 0; i < arg.length && i < depth; i++) - if (!this.scalar(arg[i], type2, longType)) + if (!this.scalar(arg[i], type, longType)) return false; } return true; } - mapKeys(map, type2, depth) { + mapKeys(map, type, depth) { let keys = Object.keys(map); - switch (type2) { + switch (type) { case ScalarType.INT32: case ScalarType.FIXED32: case ScalarType.SFIXED32: case ScalarType.SINT32: case ScalarType.UINT32: - return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type2, depth); + return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type, depth); case ScalarType.BOOL: - return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type2, depth); + return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type, depth); default: - return this.scalars(keys, type2, depth, LongType.STRING); + return this.scalars(keys, type, depth, LongType.STRING); } } }; } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-long-convert.js -function reflectionLongConvert(long, type2) { - switch (type2) { +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-long-convert.js +function reflectionLongConvert(long, type) { + switch (type) { case LongType.BIGINT: return long.toBigInt(); case LongType.NUMBER: @@ -66043,19 +71720,19 @@ function reflectionLongConvert(long, type2) { } } var init_reflection_long_convert = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-long-convert.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-long-convert.js"() { "use strict"; init_reflection_info(); } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-json-reader.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-json-reader.js var ReflectionJsonReader; var init_reflection_json_reader = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-json-reader.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-json-reader.js"() { "use strict"; init_json_typings(); - init_base642(); + init_base64(); init_reflection_info(); init_pb_long(); init_assert(); @@ -66065,10 +71742,10 @@ var init_reflection_json_reader = __esm({ this.info = info5; } prepare() { - var _a3; + var _a; if (this.fMap === void 0) { this.fMap = {}; - const fieldsInput = (_a3 = this.info.fields) !== null && _a3 !== void 0 ? _a3 : []; + const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : []; for (const field of fieldsInput) { this.fMap[field.name] = field; this.fMap[field.jsonName] = field; @@ -66203,9 +71880,9 @@ var init_reflection_json_reader = __esm({ * * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`). */ - enum(type2, json, fieldName, ignoreUnknownFields) { - if (type2[0] == "google.protobuf.NullValue") - assert2(json === null || json === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type2[0]} only accepts null.`); + enum(type, json, fieldName, ignoreUnknownFields) { + if (type[0] == "google.protobuf.NullValue") + assert2(json === null || json === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} only accepts null.`); if (json === null) return 0; switch (typeof json) { @@ -66214,21 +71891,21 @@ var init_reflection_json_reader = __esm({ return json; case "string": let localEnumName = json; - if (type2[2] && json.substring(0, type2[2].length) === type2[2]) - localEnumName = json.substring(type2[2].length); - let enumNumber = type2[1][localEnumName]; + if (type[2] && json.substring(0, type[2].length) === type[2]) + localEnumName = json.substring(type[2].length); + let enumNumber = type[1][localEnumName]; if (typeof enumNumber === "undefined" && ignoreUnknownFields) { return false; } - assert2(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type2[0]} has no value for "${json}".`); + assert2(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} has no value for "${json}".`); return enumNumber; } assert2(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json}".`); } - scalar(json, type2, longType, fieldName) { + scalar(json, type, longType, fieldName) { let e; try { - switch (type2) { + switch (type) { // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity". // Either numbers or strings are accepted. Exponent notation is also accepted. case ScalarType.DOUBLE: @@ -66261,7 +71938,7 @@ var init_reflection_json_reader = __esm({ e = "too large or small"; break; } - if (type2 == ScalarType.FLOAT) + if (type == ScalarType.FLOAT) assertFloat32(float); return float; // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted. @@ -66285,7 +71962,7 @@ var init_reflection_json_reader = __esm({ } if (int32 === void 0) break; - if (type2 == ScalarType.UINT32) + if (type == ScalarType.UINT32) assertUInt32(int32); else assertInt32(int32); @@ -66346,19 +72023,19 @@ var init_reflection_json_reader = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-json-writer.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-json-writer.js var ReflectionJsonWriter; var init_reflection_json_writer = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-json-writer.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-json-writer.js"() { "use strict"; - init_base642(); + init_base64(); init_pb_long(); init_reflection_info(); init_assert(); ReflectionJsonWriter = class { constructor(info5) { - var _a3; - this.fields = (_a3 = info5.fields) !== null && _a3 !== void 0 ? _a3 : []; + var _a; + this.fields = (_a = info5.fields) !== null && _a !== void 0 ? _a : []; } /** * Converts the message to a JSON object, based on the field descriptors. @@ -66464,8 +72141,8 @@ var init_reflection_json_writer = __esm({ /** * Returns `null` as the default for google.protobuf.NullValue. */ - enum(type2, value, fieldName, optional2, emitDefaultValues, enumAsInteger) { - if (type2[0] == "google.protobuf.NullValue") + enum(type, value, fieldName, optional2, emitDefaultValues, enumAsInteger) { + if (type[0] == "google.protobuf.NullValue") return !emitDefaultValues && !optional2 ? void 0 : null; if (value === void 0) { assert2(optional2); @@ -66475,24 +72152,24 @@ var init_reflection_json_writer = __esm({ return void 0; assert2(typeof value == "number"); assert2(Number.isInteger(value)); - if (enumAsInteger || !type2[1].hasOwnProperty(value)) + if (enumAsInteger || !type[1].hasOwnProperty(value)) return value; - if (type2[2]) - return type2[2] + type2[1][value]; - return type2[1][value]; + if (type[2]) + return type[2] + type[1][value]; + return type[1][value]; } - message(type2, value, fieldName, options2) { + message(type, value, fieldName, options2) { if (value === void 0) return options2.emitDefaultValues ? null : void 0; - return type2.internalJsonWrite(value, options2); + return type.internalJsonWrite(value, options2); } - scalar(type2, value, fieldName, optional2, emitDefaultValues) { + scalar(type, value, fieldName, optional2, emitDefaultValues) { if (value === void 0) { assert2(optional2); return void 0; } const ed = emitDefaultValues || optional2; - switch (type2) { + switch (type) { // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted. case ScalarType.INT32: case ScalarType.SFIXED32: @@ -66557,16 +72234,16 @@ var init_reflection_json_writer = __esm({ assert2(value instanceof Uint8Array); if (!value.byteLength) return ed ? "" : void 0; - return base64encode2(value); + return base64encode(value); } } }; } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-scalar-default.js -function reflectionScalarDefault(type2, longType = LongType.STRING) { - switch (type2) { +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-scalar-default.js +function reflectionScalarDefault(type, longType = LongType.STRING) { + switch (type) { case ScalarType.BOOL: return false; case ScalarType.UINT64: @@ -66588,7 +72265,7 @@ function reflectionScalarDefault(type2, longType = LongType.STRING) { } } var init_reflection_scalar_default = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-scalar-default.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-scalar-default.js"() { "use strict"; init_reflection_info(); init_reflection_long_convert(); @@ -66596,10 +72273,10 @@ var init_reflection_scalar_default = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-binary-reader.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-binary-reader.js var ReflectionBinaryReader; var init_reflection_binary_reader = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-binary-reader.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-binary-reader.js"() { "use strict"; init_binary_format_contract(); init_reflection_info(); @@ -66610,9 +72287,9 @@ var init_reflection_binary_reader = __esm({ this.info = info5; } prepare() { - var _a3; + var _a; if (!this.fieldNoToField) { - const fieldsInput = (_a3 = this.info.fields) !== null && _a3 !== void 0 ? _a3 : []; + const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : []; this.fieldNoToField = new Map(fieldsInput.map((field) => [field.no, field])); } } @@ -66730,8 +72407,8 @@ var init_reflection_binary_reader = __esm({ } return [key, val]; } - scalar(reader, type2, longType) { - switch (type2) { + scalar(reader, type, longType) { + switch (type) { case ScalarType.INT32: return reader.int32(); case ScalarType.STRING: @@ -66768,10 +72445,10 @@ var init_reflection_binary_reader = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-binary-writer.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-binary-writer.js var ReflectionBinaryWriter; var init_reflection_binary_writer = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-binary-writer.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-binary-writer.js"() { "use strict"; init_binary_format_contract(); init_reflection_info(); @@ -66880,8 +72557,8 @@ var init_reflection_binary_writer = __esm({ /** * Write a single scalar value. */ - scalar(writer, type2, fieldNo, value, emitDefault) { - let [wireType, method, isDefault] = this.scalarInfo(type2, value); + scalar(writer, type, fieldNo, value, emitDefault) { + let [wireType, method, isDefault] = this.scalarInfo(type, value); if (!isDefault || emitDefault) { writer.tag(fieldNo, wireType); writer[method](value); @@ -66890,13 +72567,13 @@ var init_reflection_binary_writer = __esm({ /** * Write an array of scalar values in packed format. */ - packed(writer, type2, fieldNo, value) { + packed(writer, type, fieldNo, value) { if (!value.length) return; - assert2(type2 !== ScalarType.BYTES && type2 !== ScalarType.STRING); + assert2(type !== ScalarType.BYTES && type !== ScalarType.STRING); writer.tag(fieldNo, WireType.LengthDelimited); writer.fork(); - let [, method] = this.scalarInfo(type2); + let [, method] = this.scalarInfo(type); for (let i = 0; i < value.length; i++) writer[method](value[i]); writer.join(); @@ -66911,12 +72588,12 @@ var init_reflection_binary_writer = __esm({ * * If argument `value` is omitted, [2] is always false. */ - scalarInfo(type2, value) { + scalarInfo(type, value) { let t = WireType.Varint; let m; let i = value === void 0; let d = value === 0; - switch (type2) { + switch (type) { case ScalarType.INT32: m = "int32"; break; @@ -66985,10 +72662,10 @@ var init_reflection_binary_writer = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-create.js -function reflectionCreate(type2) { - const msg = type2.messagePrototype ? Object.create(type2.messagePrototype) : Object.defineProperty({}, MESSAGE_TYPE, { value: type2 }); - for (let field of type2.fields) { +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-create.js +function reflectionCreate(type) { + const msg = type.messagePrototype ? Object.create(type.messagePrototype) : Object.defineProperty({}, MESSAGE_TYPE, { value: type }); + for (let field of type.fields) { let name = field.localName; if (field.opt) continue; @@ -67012,14 +72689,14 @@ function reflectionCreate(type2) { return msg; } var init_reflection_create = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-create.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-create.js"() { "use strict"; init_reflection_scalar_default(); init_message_type_contract(); } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-merge-partial.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-merge-partial.js function reflectionMergePartial(info5, target, source) { let fieldValue, input = source, output; for (let field of info5.fields) { @@ -67081,12 +72758,12 @@ function reflectionMergePartial(info5, target, source) { } } var init_reflection_merge_partial = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-merge-partial.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-merge-partial.js"() { "use strict"; } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-equals.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-equals.js function reflectionEquals(info5, a, b) { if (a === b) return true; @@ -67116,10 +72793,10 @@ function reflectionEquals(info5, a, b) { } return true; } -function primitiveEq(type2, a, b) { +function primitiveEq(type, a, b) { if (a === b) return true; - if (type2 !== ScalarType.BYTES) + if (type !== ScalarType.BYTES) return false; let ba = a; let bb = b; @@ -67130,35 +72807,35 @@ function primitiveEq(type2, a, b) { return false; return true; } -function repeatedPrimitiveEq(type2, a, b) { +function repeatedPrimitiveEq(type, a, b) { if (a.length !== b.length) return false; for (let i = 0; i < a.length; i++) - if (!primitiveEq(type2, a[i], b[i])) + if (!primitiveEq(type, a[i], b[i])) return false; return true; } -function repeatedMsgEq(type2, a, b) { +function repeatedMsgEq(type, a, b) { if (a.length !== b.length) return false; for (let i = 0; i < a.length; i++) - if (!type2.equals(a[i], b[i])) + if (!type.equals(a[i], b[i])) return false; return true; } var objectValues; var init_reflection_equals = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-equals.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-equals.js"() { "use strict"; init_reflection_info(); objectValues = Object.values; } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/message-type.js -var baseDescriptors, MessageType; +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/message-type.js +var baseDescriptors, messageTypeDescriptor, MessageType; var init_message_type = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/message-type.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/message-type.js"() { "use strict"; init_message_type_contract(); init_reflection_info(); @@ -67175,13 +72852,15 @@ var init_message_type = __esm({ init_binary_writer(); init_binary_reader(); baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})); + messageTypeDescriptor = baseDescriptors[MESSAGE_TYPE] = {}; MessageType = class { constructor(name, fields, options2) { this.defaultCheckDepth = 16; this.typeName = name; this.fields = fields.map(normalizeFieldInfo); this.options = options2 !== null && options2 !== void 0 ? options2 : {}; - this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, baseDescriptors), { [MESSAGE_TYPE]: { value: this } })); + messageTypeDescriptor.value = this; + this.messagePrototype = Object.create(null, baseDescriptors); this.refTypeCheck = new ReflectionTypeCheck(this); this.refJsonReader = new ReflectionJsonReader(this); this.refJsonWriter = new ReflectionJsonWriter(this); @@ -67266,9 +72945,9 @@ var init_message_type = __esm({ * This is equivalent to `JSON.stringify(T.toJson(t))` */ toJsonString(message, options2) { - var _a3; + var _a; let value = this.toJson(message, options2); - return JSON.stringify(value, null, (_a3 = options2 === null || options2 === void 0 ? void 0 : options2.prettySpaces) !== null && _a3 !== void 0 ? _a3 : 0); + return JSON.stringify(value, null, (_a = options2 === null || options2 === void 0 ? void 0 : options2.prettySpaces) !== null && _a !== void 0 ? _a : 0); } /** * Write the message to binary format. @@ -67330,18 +73009,18 @@ var init_message_type = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-contains-message-type.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-contains-message-type.js function containsMessageType(msg) { return msg[MESSAGE_TYPE] != null; } var init_reflection_contains_message_type = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/reflection-contains-message-type.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/reflection-contains-message-type.js"() { "use strict"; init_message_type_contract(); } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/enum-object.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/enum-object.js function isEnumObject(arg) { if (typeof arg != "object" || arg === null) { return false; @@ -67385,12 +73064,12 @@ function listEnumNumbers(enumObject) { return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } var init_enum_object = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/enum-object.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/enum-object.js"() { "use strict"; } }); -// node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/index.js +// node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/index.js var es2015_exports = {}; __export(es2015_exports, { BinaryReader: () => BinaryReader, @@ -67415,7 +73094,7 @@ __export(es2015_exports, { assertNever: () => assertNever2, assertUInt32: () => assertUInt32, base64decode: () => base64decode, - base64encode: () => base64encode2, + base64encode: () => base64encode, binaryReadOptions: () => binaryReadOptions, binaryWriteOptions: () => binaryWriteOptions, clearOneofValue: () => clearOneofValue, @@ -67446,10 +73125,10 @@ __export(es2015_exports, { utf8read: () => utf8read }); var init_es2015 = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime@2.9.6/node_modules/@protobuf-ts/runtime/build/es2015/index.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/es2015/index.js"() { "use strict"; init_json_typings(); - init_base642(); + init_base64(); init_protobufjs_utf8(); init_binary_format_contract(); init_binary_reader(); @@ -67476,26 +73155,26 @@ var init_es2015 = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/reflection-info.js +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/reflection-info.js function normalizeMethodInfo(method, service) { - var _a3, _b2, _c2; + var _a, _b, _c; let m = method; m.service = service; - m.localName = (_a3 = m.localName) !== null && _a3 !== void 0 ? _a3 : lowerCamelCase(m.name); + m.localName = (_a = m.localName) !== null && _a !== void 0 ? _a : lowerCamelCase(m.name); m.serverStreaming = !!m.serverStreaming; m.clientStreaming = !!m.clientStreaming; - m.options = (_b2 = m.options) !== null && _b2 !== void 0 ? _b2 : {}; - m.idempotency = (_c2 = m.idempotency) !== null && _c2 !== void 0 ? _c2 : void 0; + m.options = (_b = m.options) !== null && _b !== void 0 ? _b : {}; + m.idempotency = (_c = m.idempotency) !== null && _c !== void 0 ? _c : void 0; return m; } function readMethodOptions(service, methodName, extensionName, extensionType) { - var _a3; - const options2 = (_a3 = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a3 === void 0 ? void 0 : _a3.options; + var _a; + const options2 = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options; return options2 && options2[extensionName] ? extensionType.fromJson(options2[extensionName]) : void 0; } function readMethodOption(service, methodName, extensionName, extensionType) { - var _a3; - const options2 = (_a3 = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a3 === void 0 ? void 0 : _a3.options; + var _a; + const options2 = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options; if (!options2) { return void 0; } @@ -67517,16 +73196,16 @@ function readServiceOption(service, extensionName, extensionType) { return extensionType ? extensionType.fromJson(optionVal) : optionVal; } var init_reflection_info2 = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/reflection-info.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/reflection-info.js"() { "use strict"; init_es2015(); } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/service-type.js +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/service-type.js var ServiceType; var init_service_type = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/service-type.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/service-type.js"() { "use strict"; init_reflection_info2(); ServiceType = class { @@ -67539,10 +73218,10 @@ var init_service_type = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-error.js +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-error.js var RpcError; var init_rpc_error = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-error.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-error.js"() { "use strict"; RpcError = class extends Error { constructor(message, code = "UNKNOWN", meta) { @@ -67575,7 +73254,7 @@ var init_rpc_error = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-options.js +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-options.js function mergeRpcOptions(defaults, options2) { if (!options2) return defaults; @@ -67617,16 +73296,16 @@ function copy(a, into) { } } var init_rpc_options = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-options.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-options.js"() { "use strict"; init_es2015(); } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/deferred.js +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/deferred.js var DeferredState, Deferred; var init_deferred = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/deferred.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/deferred.js"() { "use strict"; (function(DeferredState2) { DeferredState2[DeferredState2["PENDING"] = 0] = "PENDING"; @@ -67705,10 +73384,10 @@ var init_deferred = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-output-stream.js +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-output-stream.js var RpcOutputStreamController; var init_rpc_output_stream = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-output-stream.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-output-stream.js"() { "use strict"; init_deferred(); init_es2015(); @@ -67721,6 +73400,7 @@ var init_rpc_output_stream = __esm({ cmp: [] }; this._closed = false; + this._itState = { q: [] }; } // --- RpcOutputStream callback API onNext(callback) { @@ -67820,51 +73500,46 @@ var init_rpc_output_stream = __esm({ * messages are queued. */ [Symbol.asyncIterator]() { - if (!this._itState) { - this._itState = { q: [] }; - } if (this._closed === true) this.pushIt({ value: null, done: true }); else if (this._closed !== false) this.pushIt(this._closed); return { next: () => { - let state3 = this._itState; - assert2(state3, "bad state"); - assert2(!state3.p, "iterator contract broken"); - let first = state3.q.shift(); + let state = this._itState; + assert2(state, "bad state"); + assert2(!state.p, "iterator contract broken"); + let first = state.q.shift(); if (first) return "value" in first ? Promise.resolve(first) : Promise.reject(first); - state3.p = new Deferred(); - return state3.p.promise; + state.p = new Deferred(); + return state.p.promise; } }; } // "push" a new iterator result. // this either resolves a pending promise, or enqueues the result. pushIt(result) { - let state3 = this._itState; - if (!state3) - return; - if (state3.p) { - const p = state3.p; + let state = this._itState; + if (state.p) { + const p = state.p; assert2(p.state == DeferredState.PENDING, "iterator contract broken"); "value" in result ? p.resolve(result) : p.reject(result); - delete state3.p; + delete state.p; } else { - state3.q.push(result); + state.q.push(result); } } }; } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/unary-call.js -var __awaiter, UnaryCall; +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/unary-call.js +var __awaiter2, UnaryCall; var init_unary_call = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/unary-call.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/unary-call.js"() { "use strict"; - __awaiter = function(thisArg, _arguments, P, generator) { + __awaiter2 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -67892,10 +73567,10 @@ var init_unary_call = __esm({ }); }; UnaryCall = class { - constructor(method, requestHeaders, request3, headers, response, status, trailers) { + constructor(method, requestHeaders, request, headers, response, status, trailers) { this.method = method; this.requestHeaders = requestHeaders; - this.request = request3; + this.request = request; this.headers = headers; this.response = response; this.status = status; @@ -67909,7 +73584,7 @@ var init_unary_call = __esm({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter(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, @@ -67926,12 +73601,12 @@ var init_unary_call = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/server-streaming-call.js -var __awaiter2, ServerStreamingCall; +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/server-streaming-call.js +var __awaiter3, ServerStreamingCall; var init_server_streaming_call = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/server-streaming-call.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/server-streaming-call.js"() { "use strict"; - __awaiter2 = function(thisArg, _arguments, P, generator) { + __awaiter3 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -67959,10 +73634,10 @@ var init_server_streaming_call = __esm({ }); }; ServerStreamingCall = class { - constructor(method, requestHeaders, request3, headers, response, status, trailers) { + constructor(method, requestHeaders, request, headers, response, status, trailers) { this.method = method; this.requestHeaders = requestHeaders; - this.request = request3; + this.request = request; this.headers = headers; this.responses = response; this.status = status; @@ -67978,7 +73653,7 @@ var init_server_streaming_call = __esm({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter2(this, void 0, void 0, function* () { + return __awaiter3(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -67994,12 +73669,12 @@ var init_server_streaming_call = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/client-streaming-call.js -var __awaiter3, ClientStreamingCall; +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/client-streaming-call.js +var __awaiter4, ClientStreamingCall; var init_client_streaming_call = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/client-streaming-call.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/client-streaming-call.js"() { "use strict"; - __awaiter3 = function(thisArg, _arguments, P, generator) { + __awaiter4 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -68027,10 +73702,10 @@ var init_client_streaming_call = __esm({ }); }; ClientStreamingCall = class { - constructor(method, requestHeaders, request3, headers, response, status, trailers) { + constructor(method, requestHeaders, request, headers, response, status, trailers) { this.method = method; this.requestHeaders = requestHeaders; - this.requests = request3; + this.requests = request; this.headers = headers; this.response = response; this.status = status; @@ -68045,7 +73720,7 @@ var init_client_streaming_call = __esm({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter3(this, void 0, void 0, function* () { + return __awaiter4(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, @@ -68061,12 +73736,12 @@ var init_client_streaming_call = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/duplex-streaming-call.js -var __awaiter4, DuplexStreamingCall; +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/duplex-streaming-call.js +var __awaiter5, DuplexStreamingCall; var init_duplex_streaming_call = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/duplex-streaming-call.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/duplex-streaming-call.js"() { "use strict"; - __awaiter4 = function(thisArg, _arguments, P, generator) { + __awaiter5 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -68094,10 +73769,10 @@ var init_duplex_streaming_call = __esm({ }); }; DuplexStreamingCall = class { - constructor(method, requestHeaders, request3, headers, response, status, trailers) { + constructor(method, requestHeaders, request, headers, response, status, trailers) { this.method = method; this.requestHeaders = requestHeaders; - this.requests = request3; + this.requests = request; this.headers = headers; this.responses = response; this.status = status; @@ -68112,7 +73787,7 @@ var init_duplex_streaming_call = __esm({ 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 __awaiter5(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -68127,8 +73802,8 @@ var init_duplex_streaming_call = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/test-transport.js -function delay4(ms, abort) { +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/test-transport.js +function delay(ms, abort) { return (v) => new Promise((resolve, reject) => { if (abort === null || abort === void 0 ? void 0 : abort.aborted) { reject(new RpcError("user cancel", "CANCELLED")); @@ -68143,9 +73818,9 @@ function delay4(ms, abort) { } }); } -var __awaiter5, TestTransport, TestInputStream; +var __awaiter6, TestTransport, TestInputStream; var init_test_transport = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/test-transport.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/test-transport.js"() { "use strict"; init_rpc_error(); init_es2015(); @@ -68155,7 +73830,7 @@ var init_test_transport = __esm({ init_server_streaming_call(); init_client_streaming_call(); init_duplex_streaming_call(); - __awaiter5 = function(thisArg, _arguments, P, generator) { + __awaiter6 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -68218,8 +73893,8 @@ var init_test_transport = __esm({ } // Creates a promise for response headers from the mock data. promiseHeaders() { - var _a3; - const headers = (_a3 = this.data.headers) !== null && _a3 !== void 0 ? _a3 : _TestTransport.defaultHeaders; + var _a; + const headers = (_a = this.data.headers) !== null && _a !== void 0 ? _a : _TestTransport.defaultHeaders; return headers instanceof RpcError ? Promise.reject(headers) : Promise.resolve(headers); } // Creates a promise for a single, valid, message from the mock data. @@ -68249,7 +73924,7 @@ var init_test_transport = __esm({ * not reject. If it does, code is broken. */ streamResponses(method, stream, abort) { - return __awaiter5(this, void 0, void 0, function* () { + return __awaiter6(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -68263,7 +73938,7 @@ var init_test_transport = __esm({ messages.push(this.data.response); } try { - yield delay4(this.responseDelay, abort)(void 0); + yield delay(this.responseDelay, abort)(void 0); } catch (error3) { stream.notifyError(error3); return; @@ -68275,7 +73950,7 @@ var init_test_transport = __esm({ for (let msg of messages) { stream.notifyMessage(msg); try { - yield delay4(this.betweenResponseDelay, abort)(void 0); + yield delay(this.betweenResponseDelay, abort)(void 0); } catch (error3) { stream.notifyError(error3); return; @@ -68294,14 +73969,14 @@ var init_test_transport = __esm({ } // Creates a promise for response status from the mock data. promiseStatus() { - var _a3; - const status = (_a3 = this.data.status) !== null && _a3 !== void 0 ? _a3 : _TestTransport.defaultStatus; + var _a; + const status = (_a = this.data.status) !== null && _a !== void 0 ? _a : _TestTransport.defaultStatus; return status instanceof RpcError ? Promise.reject(status) : Promise.resolve(status); } // Creates a promise for response trailers from the mock data. promiseTrailers() { - var _a3; - const trailers = (_a3 = this.data.trailers) !== null && _a3 !== void 0 ? _a3 : _TestTransport.defaultTrailers; + var _a; + const trailers = (_a = this.data.trailers) !== null && _a !== void 0 ? _a : _TestTransport.defaultTrailers; return trailers instanceof RpcError ? Promise.reject(trailers) : Promise.resolve(trailers); } maybeSuppressUncaught(...promise) { @@ -68316,37 +73991,37 @@ var init_test_transport = __esm({ return mergeRpcOptions({}, options2); } unary(method, input, options2) { - var _a3; - const requestHeaders = (_a3 = options2.meta) !== null && _a3 !== void 0 ? _a3 : {}, headersPromise = this.promiseHeaders().then(delay4(this.headerDelay, options2.abort)), responsePromise = headersPromise.catch((_) => { - }).then(delay4(this.responseDelay, options2.abort)).then((_) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_) => { - }).then(delay4(this.afterResponseDelay, options2.abort)).then((_) => this.promiseStatus()), trailersPromise = responsePromise.catch((_) => { - }).then(delay4(this.afterResponseDelay, options2.abort)).then((_) => this.promiseTrailers()); + var _a; + const requestHeaders = (_a = options2.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options2.abort)), responsePromise = headersPromise.catch((_) => { + }).then(delay(this.responseDelay, options2.abort)).then((_) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_) => { + }).then(delay(this.afterResponseDelay, options2.abort)).then((_) => this.promiseStatus()), trailersPromise = responsePromise.catch((_) => { + }).then(delay(this.afterResponseDelay, options2.abort)).then((_) => this.promiseTrailers()); this.maybeSuppressUncaught(statusPromise, trailersPromise); this.lastInput = { single: input }; return new UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise); } serverStreaming(method, input, options2) { - var _a3; - const requestHeaders = (_a3 = options2.meta) !== null && _a3 !== void 0 ? _a3 : {}, headersPromise = this.promiseHeaders().then(delay4(this.headerDelay, options2.abort)), outputStream = new RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay4(this.responseDelay, options2.abort)).catch(() => { - }).then(() => this.streamResponses(method, outputStream, options2.abort)).then(delay4(this.afterResponseDelay, options2.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); + var _a; + const requestHeaders = (_a = options2.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options2.abort)), outputStream = new RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options2.abort)).catch(() => { + }).then(() => this.streamResponses(method, outputStream, options2.abort)).then(delay(this.afterResponseDelay, options2.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); this.maybeSuppressUncaught(statusPromise, trailersPromise); this.lastInput = { single: input }; return new ServerStreamingCall(method, requestHeaders, input, headersPromise, outputStream, statusPromise, trailersPromise); } clientStreaming(method, options2) { - var _a3; - const requestHeaders = (_a3 = options2.meta) !== null && _a3 !== void 0 ? _a3 : {}, headersPromise = this.promiseHeaders().then(delay4(this.headerDelay, options2.abort)), responsePromise = headersPromise.catch((_) => { - }).then(delay4(this.responseDelay, options2.abort)).then((_) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_) => { - }).then(delay4(this.afterResponseDelay, options2.abort)).then((_) => this.promiseStatus()), trailersPromise = responsePromise.catch((_) => { - }).then(delay4(this.afterResponseDelay, options2.abort)).then((_) => this.promiseTrailers()); + var _a; + const requestHeaders = (_a = options2.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options2.abort)), responsePromise = headersPromise.catch((_) => { + }).then(delay(this.responseDelay, options2.abort)).then((_) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_) => { + }).then(delay(this.afterResponseDelay, options2.abort)).then((_) => this.promiseStatus()), trailersPromise = responsePromise.catch((_) => { + }).then(delay(this.afterResponseDelay, options2.abort)).then((_) => this.promiseTrailers()); this.maybeSuppressUncaught(statusPromise, trailersPromise); this.lastInput = new TestInputStream(this.data, options2.abort); return new ClientStreamingCall(method, requestHeaders, this.lastInput, headersPromise, responsePromise, statusPromise, trailersPromise); } duplex(method, options2) { - var _a3; - const requestHeaders = (_a3 = options2.meta) !== null && _a3 !== void 0 ? _a3 : {}, headersPromise = this.promiseHeaders().then(delay4(this.headerDelay, options2.abort)), outputStream = new RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay4(this.responseDelay, options2.abort)).catch(() => { - }).then(() => this.streamResponses(method, outputStream, options2.abort)).then(delay4(this.afterResponseDelay, options2.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); + var _a; + const requestHeaders = (_a = options2.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options2.abort)), outputStream = new RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options2.abort)).catch(() => { + }).then(() => this.streamResponses(method, outputStream, options2.abort)).then(delay(this.afterResponseDelay, options2.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); this.maybeSuppressUncaught(statusPromise, trailersPromise); this.lastInput = new TestInputStream(this.data, options2.abort); return new DuplexStreamingCall(method, requestHeaders, this.lastInput, headersPromise, outputStream, statusPromise, trailersPromise); @@ -68382,7 +74057,7 @@ var init_test_transport = __esm({ const delayMs = this.data.inputMessage === void 0 ? 10 : this.data.inputMessage; return Promise.resolve(void 0).then(() => { this._sent.push(message); - }).then(delay4(delayMs, this.abort)); + }).then(delay(delayMs, this.abort)); } complete() { if (this.data.inputComplete instanceof RpcError) { @@ -68391,18 +74066,18 @@ var init_test_transport = __esm({ const delayMs = this.data.inputComplete === void 0 ? 10 : this.data.inputComplete; return Promise.resolve(void 0).then(() => { this._completed = true; - }).then(delay4(delayMs, this.abort)); + }).then(delay(delayMs, this.abort)); } }; } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-interceptor.js +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-interceptor.js function stackIntercept(kind, transport, method, options2, input) { - var _a3, _b2, _c2, _d2; + var _a, _b, _c, _d; if (kind == "unary") { let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt); - for (const curr of ((_a3 = options2.interceptors) !== null && _a3 !== void 0 ? _a3 : []).filter((i) => i.interceptUnary).reverse()) { + for (const curr of ((_a = options2.interceptors) !== null && _a !== void 0 ? _a : []).filter((i) => i.interceptUnary).reverse()) { const next = tail; tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt); } @@ -68410,7 +74085,7 @@ function stackIntercept(kind, transport, method, options2, input) { } if (kind == "serverStreaming") { let tail = (mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt); - for (const curr of ((_b2 = options2.interceptors) !== null && _b2 !== void 0 ? _b2 : []).filter((i) => i.interceptServerStreaming).reverse()) { + for (const curr of ((_b = options2.interceptors) !== null && _b !== void 0 ? _b : []).filter((i) => i.interceptServerStreaming).reverse()) { const next = tail; tail = (mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt); } @@ -68418,7 +74093,7 @@ function stackIntercept(kind, transport, method, options2, input) { } if (kind == "clientStreaming") { let tail = (mtd, opt) => transport.clientStreaming(mtd, opt); - for (const curr of ((_c2 = options2.interceptors) !== null && _c2 !== void 0 ? _c2 : []).filter((i) => i.interceptClientStreaming).reverse()) { + for (const curr of ((_c = options2.interceptors) !== null && _c !== void 0 ? _c : []).filter((i) => i.interceptClientStreaming).reverse()) { const next = tail; tail = (mtd, opt) => curr.interceptClientStreaming(next, mtd, opt); } @@ -68426,7 +74101,7 @@ function stackIntercept(kind, transport, method, options2, input) { } if (kind == "duplex") { let tail = (mtd, opt) => transport.duplex(mtd, opt); - for (const curr of ((_d2 = options2.interceptors) !== null && _d2 !== void 0 ? _d2 : []).filter((i) => i.interceptDuplex).reverse()) { + for (const curr of ((_d = options2.interceptors) !== null && _d !== void 0 ? _d : []).filter((i) => i.interceptDuplex).reverse()) { const next = tail; tail = (mtd, opt) => curr.interceptDuplex(next, mtd, opt); } @@ -68447,16 +74122,16 @@ function stackDuplexStreamingInterceptors(transport, method, options2) { return stackIntercept("duplex", transport, method, options2); } var init_rpc_interceptor = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-interceptor.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-interceptor.js"() { "use strict"; init_es2015(); } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/server-call-context.js +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/server-call-context.js var ServerCallContextController; var init_server_call_context = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/server-call-context.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/server-call-context.js"() { "use strict"; ServerCallContextController = class { constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { code: "OK", detail: "" }) { @@ -68517,7 +74192,7 @@ var init_server_call_context = __esm({ } }); -// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/index.js +// node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/index.js var es2015_exports2 = {}; __export(es2015_exports2, { ClientStreamingCall: () => ClientStreamingCall, @@ -68542,7 +74217,7 @@ __export(es2015_exports2, { stackUnaryInterceptors: () => stackUnaryInterceptors }); var init_es20152 = __esm({ - "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.9.6/node_modules/@protobuf-ts/runtime-rpc/build/es2015/index.js"() { + "node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/es2015/index.js"() { "use strict"; init_service_type(); init_reflection_info2(); @@ -68560,9 +74235,9 @@ var init_es20152 = __esm({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachescope.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/generated/results/entities/v1/cachescope.js var require_cachescope = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachescope.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/generated/results/entities/v1/cachescope.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; @@ -68636,9 +74311,9 @@ var require_cachescope = __commonJS({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachemetadata.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/generated/results/entities/v1/cachemetadata.js var require_cachemetadata = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/entities/v1/cachemetadata.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/generated/results/entities/v1/cachemetadata.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; @@ -68707,9 +74382,9 @@ var require_cachemetadata = __commonJS({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/generated/results/api/v1/cache.js +var require_cache3 = __commonJS({ + "node_modules/.pnpm/@actions+cache@4.0.5/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; @@ -69161,13 +74836,13 @@ var require_cache2 = __commonJS({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp-client.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp-client.js var require_cache_twirp_client = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp-client.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp-client.js"(exports2) { "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; @@ -69175,8 +74850,8 @@ var require_cache_twirp_client = __commonJS({ this.FinalizeCacheEntryUpload.bind(this); this.GetCacheEntryDownloadURL.bind(this); } - CreateCacheEntry(request3) { - const data = cache_1.CreateCacheEntryRequest.toJson(request3, { + CreateCacheEntry(request) { + const data = cache_1.CreateCacheEntryRequest.toJson(request, { useProtoFieldName: true, emitDefaultValues: false }); @@ -69185,8 +74860,8 @@ var require_cache_twirp_client = __commonJS({ ignoreUnknownFields: true })); } - FinalizeCacheEntryUpload(request3) { - const data = cache_1.FinalizeCacheEntryUploadRequest.toJson(request3, { + FinalizeCacheEntryUpload(request) { + const data = cache_1.FinalizeCacheEntryUploadRequest.toJson(request, { useProtoFieldName: true, emitDefaultValues: false }); @@ -69195,8 +74870,8 @@ var require_cache_twirp_client = __commonJS({ ignoreUnknownFields: true })); } - GetCacheEntryDownloadURL(request3) { - const data = cache_1.GetCacheEntryDownloadURLRequest.toJson(request3, { + GetCacheEntryDownloadURL(request) { + const data = cache_1.GetCacheEntryDownloadURLRequest.toJson(request, { useProtoFieldName: true, emitDefaultValues: false }); @@ -69214,18 +74889,18 @@ var require_cache_twirp_client = __commonJS({ this.FinalizeCacheEntryUpload.bind(this); this.GetCacheEntryDownloadURL.bind(this); } - CreateCacheEntry(request3) { - const data = cache_1.CreateCacheEntryRequest.toBinary(request3); + CreateCacheEntry(request) { + const data = cache_1.CreateCacheEntryRequest.toBinary(request); const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/protobuf", data); return promise.then((data2) => cache_1.CreateCacheEntryResponse.fromBinary(data2)); } - FinalizeCacheEntryUpload(request3) { - const data = cache_1.FinalizeCacheEntryUploadRequest.toBinary(request3); + FinalizeCacheEntryUpload(request) { + const data = cache_1.FinalizeCacheEntryUploadRequest.toBinary(request); const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/protobuf", data); return promise.then((data2) => cache_1.FinalizeCacheEntryUploadResponse.fromBinary(data2)); } - GetCacheEntryDownloadURL(request3) { - const data = cache_1.GetCacheEntryDownloadURLRequest.toBinary(request3); + GetCacheEntryDownloadURL(request) { + const data = cache_1.GetCacheEntryDownloadURLRequest.toBinary(request); const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/protobuf", data); return promise.then((data2) => cache_1.GetCacheEntryDownloadURLResponse.fromBinary(data2)); } @@ -69234,49 +74909,49 @@ var require_cache_twirp_client = __commonJS({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/util.js -var require_util9 = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/shared/util.js +var require_util10 = __commonJS({ + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.maskSecretUrls = exports2.maskSigUrl = void 0; var core_1 = require_core(); - function maskSigUrl(url2) { - if (!url2) + function maskSigUrl(url) { + if (!url) return; try { - const parsedUrl = new URL(url2); + const parsedUrl = new URL(url); const signature = parsedUrl.searchParams.get("sig"); if (signature) { (0, core_1.setSecret)(signature); (0, core_1.setSecret)(encodeURIComponent(signature)); } } catch (error3) { - (0, core_1.debug)(`Failed to parse URL: ${url2} ${error3 instanceof Error ? error3.message : String(error3)}`); + (0, core_1.debug)(`Failed to parse URL: ${url} ${error3 instanceof Error ? error3.message : String(error3)}`); } } exports2.maskSigUrl = maskSigUrl; - function maskSecretUrls(body2) { - if (typeof body2 !== "object" || body2 === null) { + function maskSecretUrls(body) { + if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); return; } - if ("signed_upload_url" in body2 && typeof body2.signed_upload_url === "string") { - maskSigUrl(body2.signed_upload_url); + if ("signed_upload_url" in body && typeof body.signed_upload_url === "string") { + maskSigUrl(body.signed_upload_url); } - if ("signed_download_url" in body2 && typeof body2.signed_download_url === "string") { - maskSigUrl(body2.signed_download_url); + if ("signed_download_url" in body && typeof body.signed_download_url === "string") { + maskSigUrl(body.signed_download_url); } } exports2.maskSecretUrls = maskSecretUrls; } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js var require_cacheTwirpClient = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -69313,7 +74988,7 @@ var require_cacheTwirpClient = __commonJS({ var auth_1 = require_auth(); var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util9(); + var util_1 = require_util10(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -69336,25 +75011,25 @@ var require_cacheTwirpClient = __commonJS({ } // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. - request(service, method, contentType2, data) { - return __awaiter6(this, void 0, void 0, function* () { - const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url2}`); + request(service, method, contentType, data) { + return __awaiter7(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": contentType2 + "Content-Type": contentType }; try { - const { body: body2 } = yield this.retryableRequest(() => __awaiter6(this, void 0, void 0, function* () { - return this.httpClient.post(url2, JSON.stringify(data), headers); + const { body } = yield this.retryableRequest(() => __awaiter7(this, void 0, void 0, function* () { + return this.httpClient.post(url, JSON.stringify(data), headers); })); - return body2; + return body; } catch (error3) { throw new Error(`Failed to ${method}: ${error3.message}`); } }); } retryableRequest(operation) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -69366,19 +75041,19 @@ var require_cacheTwirpClient = __commonJS({ rawBody = yield response.readBody(); (0, core_1.debug)(`[Response] - ${response.message.statusCode}`); (0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`); - const body2 = JSON.parse(rawBody); - (0, util_1.maskSecretUrls)(body2); - (0, core_1.debug)(`Body: ${JSON.stringify(body2, null, 2)}`); + const body = JSON.parse(rawBody); + (0, util_1.maskSecretUrls)(body); + (0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`); if (this.isSuccessStatusCode(statusCode)) { - return { response, body: body2 }; + return { response, body }; } isRetryable = this.isRetryableHttpStatusCode(statusCode); errorMessage = `Failed request: (${statusCode}) ${response.message.statusMessage}`; - if (body2.msg) { - if (errors_1.UsageError.isUsageErrorMessage(body2.msg)) { + if (body.msg) { + if (errors_1.UsageError.isUsageErrorMessage(body.msg)) { throw new errors_1.UsageError(); } - errorMessage = `${errorMessage}: ${body2.msg}`; + errorMessage = `${errorMessage}: ${body.msg}`; } } catch (error3) { if (error3 instanceof SyntaxError) { @@ -69425,7 +75100,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return new Promise((resolve) => setTimeout(resolve, milliseconds)); }); } @@ -69449,11 +75124,11 @@ var require_cacheTwirpClient = __commonJS({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/tar.js +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/tar.js var require_tar = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/tar.js"(exports2) { + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -69466,21 +75141,21 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -69510,14 +75185,14 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io = __importStar(require_io()); + var io = __importStar2(require_io()); var fs_1 = require("fs"); - var path4 = __importStar(require("path")); - var utils = __importStar(require_cacheUtils()); + var path4 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants6(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -69549,14 +75224,14 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter6(this, void 0, void 0, function* () { + function getTarArgs(tarPath, compressionMethod, type, archivePath = "") { + return __awaiter7(this, void 0, void 0, function* () { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; const workingDirectory = getWorkingDirectory(); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; - switch (type2) { + switch (type) { case "create": args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path4.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path4.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path4.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; @@ -69580,14 +75255,14 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter6(this, void 0, void 0, function* () { + function getCommands(compressionMethod, type, archivePath = "") { + return __awaiter7(this, void 0, void 0, function* () { let args; const tarPath = yield getTarPath(); - const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); - const compressionArgs = type2 !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : yield getCompressionProgram(tarPath, compressionMethod); + const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath); + const compressionArgs = type !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : yield getCompressionProgram(tarPath, compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; - if (BSD_TAR_ZSTD && type2 !== "create") { + if (BSD_TAR_ZSTD && type !== "create") { args = [[...compressionArgs].join(" "), [...tarArgs].join(" ")]; } else { args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; @@ -69599,11 +75274,11 @@ var require_tar = __commonJS({ }); } function getWorkingDirectory() { - var _a3; - return (_a3 = process.env["GITHUB_WORKSPACE"]) !== null && _a3 !== void 0 ? _a3 : process.cwd(); + var _a; + return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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: @@ -69627,7 +75302,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(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) { @@ -69652,7 +75327,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -69666,14 +75341,14 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } exports2.listTar = listTar; function extractTar(archivePath, compressionMethod) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); @@ -69682,7 +75357,7 @@ var require_tar = __commonJS({ } exports2.extractTar = extractTar; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path4.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); @@ -69692,11 +75367,11 @@ var require_tar = __commonJS({ } }); -// node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ - "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/cache.js"(exports2) { +// node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/cache.js +var require_cache4 = __commonJS({ + "node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -69709,21 +75384,21 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = 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)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter6 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -69752,14 +75427,15 @@ var require_cache3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core6 = __importStar(require_core()); - var path4 = __importStar(require("path")); - var utils = __importStar(require_cacheUtils()); - var cacheHttpClient = __importStar(require_cacheHttpClient()); - var cacheTwirpClient = __importStar(require_cacheTwirpClient()); + var core6 = __importStar2(require_core()); + var path4 = __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 constants_1 = require_constants6(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -69791,11 +75467,18 @@ var require_cache3 = __commonJS({ } } function isFeatureAvailable() { - return !!process.env["ACTIONS_CACHE_URL"]; + const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); + switch (cacheServiceVersion) { + case "v2": + return !!process.env["ACTIONS_RESULTS_URL"]; + case "v1": + default: + return !!process.env["ACTIONS_CACHE_URL"]; + } } exports2.isFeatureAvailable = isFeatureAvailable; function restoreCache2(paths, primaryKey, restoreKeys, options2, enableCrossOsArchive = false) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core6.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -69810,7 +75493,7 @@ var require_cache3 = __commonJS({ } exports2.restoreCache = restoreCache2; function restoreCacheV1(paths, primaryKey, restoreKeys, options2, enableCrossOsArchive = false) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core6.debug("Resolved Keys:"); @@ -69851,7 +75534,11 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error3; } else { - core6.warning(`Failed to restore: ${error3.message}`); + if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { + core6.error(`Failed to restore: ${error3.message}`); + } else { + core6.warning(`Failed to restore: ${error3.message}`); + } } } finally { try { @@ -69864,7 +75551,7 @@ var require_cache3 = __commonJS({ }); } function restoreCacheV2(paths, primaryKey, restoreKeys, options2, enableCrossOsArchive = false) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { options2 = Object.assign(Object.assign({}, options2), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -69880,17 +75567,22 @@ var require_cache3 = __commonJS({ try { const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); const compressionMethod = yield utils.getCompressionMethod(); - const request3 = { + const request = { key: primaryKey, restoreKeys, version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive) }; - const response = yield twirpClient.GetCacheEntryDownloadURL(request3); + const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core6.debug(`Cache not found for version ${request3.version} of keys: ${keys.join(", ")}`); + core6.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); return void 0; } - core6.info(`Cache hit for: ${request3.key}`); + const isRestoreKeyMatch = request.key !== response.matchedKey; + if (isRestoreKeyMatch) { + core6.info(`Cache hit for restore-key: ${response.matchedKey}`); + } else { + core6.info(`Cache hit for: ${response.matchedKey}`); + } if (options2 === null || options2 === void 0 ? void 0 : options2.lookupOnly) { core6.info("Lookup only - skipping download"); return response.matchedKey; @@ -69912,7 +75604,11 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error3; } else { - core6.warning(`Failed to restore: ${error3.message}`); + if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { + core6.error(`Failed to restore: ${error3.message}`); + } else { + core6.warning(`Failed to restore: ${error3.message}`); + } } } finally { try { @@ -69927,7 +75623,7 @@ var require_cache3 = __commonJS({ }); } function saveCache3(paths, key, options2, enableCrossOsArchive = false) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core6.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -69943,8 +75639,8 @@ var require_cache3 = __commonJS({ } exports2.saveCache = saveCache3; function saveCacheV1(paths, key, options2, enableCrossOsArchive = false) { - var _a3, _b2, _c2, _d2, _e; - return __awaiter6(this, void 0, void 0, function* () { + var _a, _b, _c, _d, _e; + return __awaiter7(this, void 0, void 0, function* () { const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -69973,10 +75669,10 @@ var require_cache3 = __commonJS({ enableCrossOsArchive, cacheSize: archiveFileSize }); - if ((_a3 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a3 === void 0 ? void 0 : _a3.cacheId) { - cacheId = (_b2 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b2 === void 0 ? void 0 : _b2.cacheId; + if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.cacheId) { + cacheId = (_b = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b === void 0 ? void 0 : _b.cacheId; } else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) { - throw new Error((_d2 = (_c2 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c2 === void 0 ? void 0 : _c2.message) !== null && _d2 !== void 0 ? _d2 : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`); + throw new Error((_d = (_c = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`); } else { throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } @@ -69989,7 +75685,11 @@ var require_cache3 = __commonJS({ } else if (typedError.name === ReserveCacheError.name) { core6.info(`Failed to save: ${typedError.message}`); } else { - core6.warning(`Failed to save: ${typedError.message}`); + if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { + core6.error(`Failed to save: ${typedError.message}`); + } else { + core6.warning(`Failed to save: ${typedError.message}`); + } } } finally { try { @@ -70002,7 +75702,7 @@ var require_cache3 = __commonJS({ }); } function saveCacheV2(paths, key, options2, enableCrossOsArchive = false) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { options2 = Object.assign(Object.assign({}, options2), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -70028,14 +75728,14 @@ var require_cache3 = __commonJS({ } options2.archiveSizeBytes = archiveFileSize; core6.debug("Reserving Cache"); - const version3 = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); - const request3 = { + const version2 = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); + const request = { key, - version: version3 + version: version2 }; let signedUploadUrl; try { - const response = yield twirpClient.CreateCacheEntry(request3); + const response = yield twirpClient.CreateCacheEntry(request); if (!response.ok) { throw new Error("Response was not ok"); } @@ -70048,7 +75748,7 @@ var require_cache3 = __commonJS({ yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options2); const finalizeRequest = { key, - version: version3, + version: version2, sizeBytes: `${archiveFileSize}` }; const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); @@ -70064,7 +75764,11 @@ var require_cache3 = __commonJS({ } else if (typedError.name === ReserveCacheError.name) { core6.info(`Failed to save: ${typedError.message}`); } else { - core6.warning(`Failed to save: ${typedError.message}`); + if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { + core6.error(`Failed to save: ${typedError.message}`); + } else { + core6.warning(`Failed to save: ${typedError.message}`); + } } } finally { try { @@ -70094,19 +75798,19 @@ var import_process = require("process"); var import_fs = require("fs"); var core2 = __toESM(require_core()); -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/core.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/core.js var NEVER = Object.freeze({ status: "aborted" }); // @__NO_SIDE_EFFECTS__ function $constructor(name, initializer3, params) { function init(inst, def) { - var _a3; + var _a; Object.defineProperty(inst, "_zod", { value: inst._zod ?? {}, enumerable: false }); - (_a3 = inst._zod).traits ?? (_a3.traits = /* @__PURE__ */ new Set()); + (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set()); inst._zod.traits.add(name); initializer3(inst, def); for (const k in _.prototype) { @@ -70121,10 +75825,10 @@ function $constructor(name, initializer3, params) { } Object.defineProperty(Definition, "name", { value: name }); function _(def) { - var _a3; + var _a; const inst = params?.Parent ? new Definition() : this; init(inst, def); - (_a3 = inst._zod).deferred ?? (_a3.deferred = []); + (_a = inst._zod).deferred ?? (_a.deferred = []); for (const fn of inst._zod.deferred) { fn(); } @@ -70147,6 +75851,12 @@ var $ZodAsyncError = class extends Error { super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); } }; +var $ZodEncodeError = class extends Error { + constructor(name) { + super(`Encountered unidirectional transform during encode: ${name}`); + this.name = "ZodEncodeError"; + } +}; var globalConfig = {}; function config(newConfig) { if (newConfig) @@ -70154,7 +75864,7 @@ function config(newConfig) { return globalConfig; } -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/util.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/util.js var util_exports = {}; __export(util_exports, { BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, @@ -70168,6 +75878,8 @@ __export(util_exports, { assertNever: () => assertNever, assertNotEqual: () => assertNotEqual, assignProp: () => assignProp, + base64ToUint8Array: () => base64ToUint8Array, + base64urlToUint8Array: () => base64urlToUint8Array, cached: () => cached, captureStackTrace: () => captureStackTrace, cleanEnum: () => cleanEnum, @@ -70186,6 +75898,7 @@ __export(util_exports, { getLengthableOrigin: () => getLengthableOrigin, getParsedType: () => getParsedType, getSizableOrigin: () => getSizableOrigin, + hexToUint8Array: () => hexToUint8Array, isObject: () => isObject, isPlainObject: () => isPlainObject, issue: () => issue, @@ -70196,6 +75909,7 @@ __export(util_exports, { normalizeParams: () => normalizeParams, nullish: () => nullish, numKeys: () => numKeys, + objectClone: () => objectClone, omit: () => omit, optionalKeys: () => optionalKeys, partial: () => partial, @@ -70206,7 +75920,12 @@ __export(util_exports, { propertyKeyTypes: () => propertyKeyTypes, randomString: () => randomString, required: () => required, + safeExtend: () => safeExtend, + shallowClone: () => shallowClone, stringifyPrimitive: () => stringifyPrimitive, + uint8ArrayToBase64: () => uint8ArrayToBase64, + uint8ArrayToBase64url: () => uint8ArrayToBase64url, + uint8ArrayToHex: () => uint8ArrayToHex, unwrapMessage: () => unwrapMessage }); function assertEqual(val) { @@ -70294,6 +76013,9 @@ function defineLazy(object, key, getter) { configurable: true }); } +function objectClone(obj) { + return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); +} function assignProp(target, prop, value) { Object.defineProperty(target, prop, { value, @@ -70371,6 +76093,11 @@ function isPlainObject(o) { } return true; } +function shallowClone(o) { + if (isPlainObject(o)) + return { ...o }; + return o; +} function numKeys(data) { let keyCount = 0; for (const key in data) { @@ -70551,6 +76278,11 @@ function extend(schema, shape) { if (!isPlainObject(shape)) { throw new Error("Invalid input to extend: expected a plain object"); } + const checks = schema._zod.def.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead."); + } const def = mergeDefs(schema._zod.def, { get shape() { const _shape = { ...schema._zod.def.shape, ...shape }; @@ -70561,6 +76293,21 @@ function extend(schema, shape) { }); return clone(schema, def); } +function safeExtend(schema, shape) { + if (!isPlainObject(shape)) { + throw new Error("Invalid input to safeExtend: expected a plain object"); + } + const def = { + ...schema._zod.def, + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + checks: schema._zod.def.checks + }; + return clone(schema, def); +} function merge(a, b) { const def = mergeDefs(a._zod.def, { get shape() { @@ -70641,6 +76388,8 @@ function required(Class2, schema, mask) { return clone(schema, def); } function aborted(x, startIndex = 0) { + if (x.aborted === true) + return true; for (let i = startIndex; i < x.issues.length; i++) { if (x.issues[i]?.continue !== true) { return true; @@ -70650,8 +76399,8 @@ function aborted(x, startIndex = 0) { } function prefixIssues(path4, issues) { return issues.map((iss) => { - var _a3; - (_a3 = iss).path ?? (_a3.path = []); + var _a; + (_a = iss).path ?? (_a.path = []); iss.path.unshift(path4); return iss; }); @@ -70705,12 +76454,49 @@ function cleanEnum(obj) { return Number.isNaN(Number.parseInt(k, 10)); }).map((el) => el[1]); } +function base64ToUint8Array(base642) { + const binaryString = atob(base642); + const bytes = new Uint8Array(binaryString.length); + for (let i = 0; i < binaryString.length; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + return bytes; +} +function uint8ArrayToBase64(bytes) { + let binaryString = ""; + for (let i = 0; i < bytes.length; i++) { + binaryString += String.fromCharCode(bytes[i]); + } + return btoa(binaryString); +} +function base64urlToUint8Array(base64url2) { + const base642 = base64url2.replace(/-/g, "+").replace(/_/g, "/"); + const padding = "=".repeat((4 - base642.length % 4) % 4); + return base64ToUint8Array(base642 + padding); +} +function uint8ArrayToBase64url(bytes) { + return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +} +function hexToUint8Array(hex) { + const cleanHex = hex.replace(/^0x/, ""); + if (cleanHex.length % 2 !== 0) { + throw new Error("Invalid hex string length"); + } + const bytes = new Uint8Array(cleanHex.length / 2); + for (let i = 0; i < cleanHex.length; i += 2) { + bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16); + } + return bytes; +} +function uint8ArrayToHex(bytes) { + return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join(""); +} var Class = class { constructor(..._args) { } }; -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/errors.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/errors.js var initializer = (inst, def) => { inst.name = "$ZodError"; Object.defineProperty(inst, "_zod", { @@ -70779,7 +76565,7 @@ function formatError(error3, _mapper) { return fieldErrors; } -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/parse.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/parse.js var _parse = (_Err) => (schema, value, _ctx, _params) => { const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; const result = schema._zod.run({ value, issues: [] }, ctx); @@ -70828,8 +76614,36 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => { } : { success: true, data: result.value }; }; var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); +var _encode = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parse(_Err)(schema, value, ctx); +}; +var _decode = (_Err) => (schema, value, _ctx) => { + return _parse(_Err)(schema, value, _ctx); +}; +var _encodeAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parseAsync(_Err)(schema, value, ctx); +}; +var _decodeAsync = (_Err) => async (schema, value, _ctx) => { + return _parseAsync(_Err)(schema, value, _ctx); +}; +var _safeEncode = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParse(_Err)(schema, value, ctx); +}; +var _safeDecode = (_Err) => (schema, value, _ctx) => { + return _safeParse(_Err)(schema, value, _ctx); +}; +var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParseAsync(_Err)(schema, value, ctx); +}; +var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => { + return _safeParseAsync(_Err)(schema, value, _ctx); +}; -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/regexes.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/regexes.js var cuid = /^[cC][^\s-]{8,}$/; var cuid2 = /^[0-9a-z]+$/; var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; @@ -70838,10 +76652,10 @@ var ksuid = /^[A-Za-z0-9]{27}$/; var nanoid = /^[a-zA-Z0-9_-]{21}$/; var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; var guid = /^([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})$/; -var uuid = (version3) => { - if (!version3) - return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/; - return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version3}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); +var uuid = (version2) => { + if (!version2) + return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); }; var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; @@ -70884,17 +76698,17 @@ var boolean = /true|false/i; var lowercase = /^[^A-Z]*$/; var uppercase = /^[^a-z]*$/; -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/checks.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/checks.js var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { - var _a3; + var _a; inst._zod ?? (inst._zod = {}); inst._zod.def = def; - (_a3 = inst._zod).onattach ?? (_a3.onattach = []); + (_a = inst._zod).onattach ?? (_a.onattach = []); }); var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => { - var _a3; + var _a; $ZodCheck.init(inst, def); - (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => { + (_a = inst._zod.def).when ?? (_a.when = (payload) => { const val = payload.value; return !nullish(val) && val.length !== void 0; }); @@ -70921,9 +76735,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins }; }); var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => { - var _a3; + var _a; $ZodCheck.init(inst, def); - (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => { + (_a = inst._zod.def).when ?? (_a.when = (payload) => { const val = payload.value; return !nullish(val) && val.length !== void 0; }); @@ -70950,9 +76764,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins }; }); var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => { - var _a3; + var _a; $ZodCheck.init(inst, def); - (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => { + (_a = inst._zod.def).when ?? (_a.when = (payload) => { const val = payload.value; return !nullish(val) && val.length !== void 0; }); @@ -70981,7 +76795,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals" }; }); var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => { - var _a3, _b2; + var _a, _b; $ZodCheck.init(inst, def); inst._zod.onattach.push((inst2) => { const bag = inst2._zod.bag; @@ -70992,7 +76806,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat" } }); if (def.pattern) - (_a3 = inst._zod).check ?? (_a3.check = (payload) => { + (_a = inst._zod).check ?? (_a.check = (payload) => { def.pattern.lastIndex = 0; if (def.pattern.test(payload.value)) return; @@ -71007,7 +76821,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat" }); }); else - (_b2 = inst._zod).check ?? (_b2.check = () => { + (_b = inst._zod).check ?? (_b.check = () => { }); }); var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => { @@ -71112,16 +76926,16 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins }; }); -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/versions.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/versions.js var version = { major: 4, - minor: 0, - patch: 14 + minor: 1, + patch: 5 }; -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/schemas.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/schemas.js var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { - var _a3; + var _a; inst ?? (inst = {}); inst._zod.def = def; inst._zod.bag = inst._zod.bag || {}; @@ -71136,7 +76950,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { } } if (checks.length === 0) { - (_a3 = inst._zod).deferred ?? (_a3.deferred = []); + (_a = inst._zod).deferred ?? (_a.deferred = []); inst._zod.deferred?.push(() => { inst._zod.run = inst._zod.parse; }); @@ -71181,7 +76995,32 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { } return payload; }; + const handleCanaryResult = (canary, payload, ctx) => { + if (aborted(canary)) { + canary.aborted = true; + return canary; + } + const checkResult = runChecks(payload, checks, ctx); + if (checkResult instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); + } + return inst._zod.parse(checkResult, ctx); + }; inst._zod.run = (payload, ctx) => { + if (ctx.skipChecks) { + return inst._zod.parse(payload, ctx); + } + if (ctx.direction === "backward") { + const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); + if (canary instanceof Promise) { + return canary.then((canary2) => { + return handleCanaryResult(canary2, payload, ctx); + }); + } + return handleCanaryResult(canary, payload, ctx); + } const result = inst._zod.parse(payload, ctx); if (result instanceof Promise) { if (ctx.async === false) @@ -71261,10 +77100,10 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { inst._zod.check = (payload) => { try { const trimmed = payload.value.trim(); - const url2 = new URL(trimmed); + const url = new URL(trimmed); if (def.hostname) { def.hostname.lastIndex = 0; - if (!def.hostname.test(url2.hostname)) { + if (!def.hostname.test(url.hostname)) { payload.issues.push({ code: "invalid_format", format: "url", @@ -71278,7 +77117,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { } if (def.protocol) { def.protocol.lastIndex = 0; - if (!def.protocol.test(url2.protocol.endsWith(":") ? url2.protocol.slice(0, -1) : url2.protocol)) { + if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) { payload.issues.push({ code: "invalid_format", format: "url", @@ -71291,7 +77130,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { } } if (def.normalize) { - payload.value = url2.href; + payload.value = url.href; } else { payload.value = trimmed; } @@ -71388,12 +77227,12 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => { def.pattern ?? (def.pattern = cidrv6); $ZodStringFormat.init(inst, def); inst._zod.check = (payload) => { - const [address, prefix2] = payload.value.split("/"); + const [address, prefix] = payload.value.split("/"); try { - if (!prefix2) + if (!prefix) throw new Error(); - const prefixNum = Number(prefix2); - if (`${prefixNum}` !== prefix2) + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) throw new Error(); if (prefixNum < 0 || prefixNum > 128) throw new Error(); @@ -71839,9 +77678,12 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { }); var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } const _out = def.transform(payload.value, payload); - if (_ctx.async) { + if (ctx.async) { const output = _out instanceof Promise ? _out : Promise.resolve(_out); return output.then((output2) => { payload.value = output2; @@ -71907,6 +77749,9 @@ var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { inst._zod.optin = "optional"; defineLazy(inst._zod, "values", () => def.innerType._zod.values); inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } if (payload.value === void 0) { payload.value = def.defaultValue; return payload; @@ -71929,6 +77774,9 @@ var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { inst._zod.optin = "optional"; defineLazy(inst._zod, "values", () => def.innerType._zod.values); inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } if (payload.value === void 0) { payload.value = def.defaultValue; } @@ -71966,6 +77814,9 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); defineLazy(inst._zod, "values", () => def.innerType._zod.values); inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } const result = def.innerType._zod.run(payload, ctx); if (result instanceof Promise) { return result.then((result2) => { @@ -72004,18 +77855,26 @@ var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { defineLazy(inst._zod, "optout", () => def.out._zod.optout); defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handlePipeResult(right2, def.in, ctx)); + } + return handlePipeResult(right, def.in, ctx); + } const left = def.in._zod.run(payload, ctx); if (left instanceof Promise) { - return left.then((left2) => handlePipeResult(left2, def, ctx)); + return left.then((left2) => handlePipeResult(left2, def.out, ctx)); } - return handlePipeResult(left, def, ctx); + return handlePipeResult(left, def.out, ctx); }; }); -function handlePipeResult(left, def, ctx) { +function handlePipeResult(left, next, ctx) { if (left.issues.length) { + left.aborted = true; return left; } - return def.out._zod.run({ value: left.value, issues: left.issues }, ctx); + return next._zod.run({ value: left.value, issues: left.issues }, ctx); } var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { $ZodType.init(inst, def); @@ -72024,6 +77883,9 @@ var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } const result = def.innerType._zod.run(payload, ctx); if (result instanceof Promise) { return result.then(handleReadonlyResult); @@ -72069,7 +77931,7 @@ function handleRefineResult(result, payload, input, inst) { } } -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/registries.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/registries.js var $output = Symbol("ZodOutput"); var $input = Symbol("ZodInput"); var $ZodRegistry = class { @@ -72120,7 +77982,7 @@ function registry() { } var globalRegistry = /* @__PURE__ */ registry(); -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/api.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/api.js function _string(Class2, params) { return new Class2({ type: "string", @@ -72422,12 +78284,12 @@ function _includes(includes, params) { includes }); } -function _startsWith(prefix2, params) { +function _startsWith(prefix, params) { return new $ZodCheckStartsWith({ check: "string_format", format: "starts_with", ...normalizeParams(params), - prefix: prefix2 + prefix }); } function _endsWith(suffix, params) { @@ -72504,7 +78366,7 @@ function _check(fn, params) { return ch; } -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/classic/iso.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/classic/iso.js var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => { $ZodISODateTime.init(inst, def); ZodStringFormat.init(inst, def); @@ -72534,7 +78396,7 @@ function duration2(params) { return _isoDuration(ZodISODuration, params); } -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/classic/errors.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/classic/errors.js var initializer2 = (inst, issues) => { $ZodError.init(inst, issues); inst.name = "ZodError"; @@ -72574,16 +78436,25 @@ var ZodRealError = $constructor("ZodError", initializer2, { Parent: Error }); -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/classic/parse.js -var parse = /* @__PURE__ */ _parse(ZodRealError); -var parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError); +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/classic/parse.js +var parse2 = /* @__PURE__ */ _parse(ZodRealError); +var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError); var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError); +var encode = /* @__PURE__ */ _encode(ZodRealError); +var decode = /* @__PURE__ */ _decode(ZodRealError); +var encodeAsync = /* @__PURE__ */ _encodeAsync(ZodRealError); +var decodeAsync = /* @__PURE__ */ _decodeAsync(ZodRealError); +var safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError); +var safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError); +var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); +var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/classic/schemas.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/classic/schemas.js var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { $ZodType.init(inst, def); inst.def = def; + inst.type = def.type; Object.defineProperty(inst, "_def", { value: def }); inst.check = (...checks) => { return inst.clone( @@ -72603,11 +78474,19 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { reg.add(inst, meta); return inst; }; - inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse }); + inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse }); inst.safeParse = (data, params) => safeParse2(inst, data, params); - inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync }); + inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params); inst.spa = inst.safeParseAsync; + inst.encode = (data, params) => encode(inst, data, params); + inst.decode = (data, params) => decode(inst, data, params); + inst.encodeAsync = async (data, params) => encodeAsync(inst, data, params); + inst.decodeAsync = async (data, params) => decodeAsync(inst, data, params); + inst.safeEncode = (data, params) => safeEncode(inst, data, params); + inst.safeDecode = (data, params) => safeDecode(inst, data, params); + inst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params); + inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params); inst.refine = (check, params) => inst.check(refine(check, params)); inst.superRefine = (refinement) => inst.check(superRefine(refinement)); inst.overwrite = (fn) => inst.check(_overwrite(fn)); @@ -72909,6 +78788,9 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { $ZodTransform.init(inst, def); ZodType.init(inst, def); inst._zod.parse = (payload, _ctx) => { + if (_ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } payload.addIssue = (issue2) => { if (typeof issue2 === "string") { payload.issues.push(util_exports.issue(issue2, payload.value, def)); @@ -72972,7 +78854,7 @@ function _default(innerType, defaultValue) { type: "default", innerType, get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : defaultValue; + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); } }); } @@ -72986,7 +78868,7 @@ function prefault(innerType, defaultValue) { type: "prefault", innerType, get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : defaultValue; + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); } }); } @@ -73061,7 +78943,7 @@ function untildify(pathWithTilde) { return homeDirectory ? pathWithTilde.replace(/^~(?=$|\/|\\)/, homeDirectory) : pathWithTilde; } -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/error.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/error.js function getLineColFromPtr(string3, ptr) { let lines = string3.slice(0, ptr).split(/\r\n|\n|\r/g); return [lines.length, lines.pop().length + 1]; @@ -73101,7 +78983,13 @@ ${codeblock}`, options2); } }; -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/util.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/util.js +function isEscaped(str, ptr) { + let i = 0; + while (str[ptr - ++i] === "\\") + ; + return --i && i % 2; +} function indexOfNewline(str, start = 0, end = str.length) { let idx = str.indexOf("\n", start); if (str[idx - 1] === "\r") @@ -73156,7 +79044,7 @@ function getStringEnd(str, seek) { seek += target.length - 1; do seek = str.indexOf(target, ++seek); - while (seek > -1 && first !== "'" && str[seek - 1] === "\\" && (str[seek - 2] !== "\\" || str[seek - 3] === "\\")); + while (seek > -1 && first !== "'" && isEscaped(str, seek)); if (seek > -1) { seek += target.length; if (target.length > 1) { @@ -73169,7 +79057,7 @@ function getStringEnd(str, seek) { return seek; } -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/date.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/date.js var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i; var _hasDate, _hasTime, _offset; var _TomlDate = class _TomlDate extends Date { @@ -73266,7 +79154,7 @@ _hasTime = new WeakMap(); _offset = new WeakMap(); var TomlDate = _TomlDate; -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/primitive.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/primitive.js var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/; var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/; var LEADING_ZERO = /^[+-]?0[0-9_]/; @@ -73404,7 +79292,7 @@ function parseValue(value, toml, ptr, integersAsBigInt) { return date3; } -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/extract.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/extract.js function sliceAndTrimEndOf(str, startPtr, endPtr, allowNewLines) { let value = str.slice(startPtr, endPtr); let commentIdx = value.indexOf("#"); @@ -73480,7 +79368,7 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) { ]; } -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/struct.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/struct.js var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/; function parseKey(str, ptr, end = "=") { let dot = ptr - 1; @@ -73636,21 +79524,21 @@ function parseArray(str, ptr, depth, integersAsBigInt) { return [res, ptr]; } -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/parse.js -function peekTable(key, table, meta, type2) { +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/parse.js +function peekTable(key, table, meta, type) { let t = table; let m = meta; let k; let hasOwn = false; - let state3; + let state; for (let i = 0; i < key.length; i++) { if (i) { t = hasOwn ? t[k] : t[k] = {}; - m = (state3 = m[k]).c; - if (type2 === 0 && (state3.t === 1 || state3.t === 2)) { + m = (state = m[k]).c; + if (type === 0 && (state.t === 1 || state.t === 2)) { return null; } - if (state3.t === 2) { + if (state.t === 2) { let l = t.length - 1; t = t[l]; m = m[l].c; @@ -73666,37 +79554,37 @@ function peekTable(key, table, meta, type2) { Object.defineProperty(m, k, { enumerable: true, configurable: true, writable: true }); } m[k] = { - t: i < key.length - 1 && type2 === 2 ? 3 : type2, + t: i < key.length - 1 && type === 2 ? 3 : type, d: false, i: 0, c: {} }; } } - state3 = m[k]; - if (state3.t !== type2 && !(type2 === 1 && state3.t === 3)) { + state = m[k]; + if (state.t !== type && !(type === 1 && state.t === 3)) { return null; } - if (type2 === 2) { - if (!state3.d) { - state3.d = true; + if (type === 2) { + if (!state.d) { + state.d = true; t[k] = []; } t[k].push(t = {}); - state3.c[state3.i++] = state3 = { t: 1, d: false, i: 0, c: {} }; + state.c[state.i++] = state = { t: 1, d: false, i: 0, c: {} }; } - if (state3.d) { + if (state.d) { return null; } - state3.d = true; - if (type2 === 1) { + state.d = true; + if (type === 1) { t = hasOwn ? t[k] : t[k] = {}; - } else if (type2 === 0 && hasOwn) { + } else if (type === 0 && hasOwn) { return null; } - return [k, t, state3.c]; + return [k, t, state.c]; } -function parse2(toml, { maxDepth = 1e3, integersAsBigInt } = {}) { +function parse3(toml, { maxDepth = 1e3, integersAsBigInt } = {}) { let res = {}; let meta = {}; let tbl = res; @@ -73785,11 +79673,11 @@ var getCondaArch = () => { "win32-x64": "win-64", "win32-arm64": "win-arm64" }; - const arch2 = archDict[`${import_os.default.platform()}-${import_os.default.arch()}`]; - if (!arch2) { + const arch = archDict[`${import_os.default.platform()}-${import_os.default.arch()}`]; + if (!arch) { throw new Error(`Unsupported platform: ${import_os.default.platform()}-${import_os.default.arch()}`); } - return arch2; + return arch; }; var getPlatform = () => { const platform = import_os.default.platform(); @@ -73805,24 +79693,24 @@ var getPlatform = () => { } }; var getArch = () => { - const arch2 = import_os.default.arch(); - switch (arch2) { + const arch = import_os.default.arch(); + switch (arch) { case "x64": return "x86_64"; case "arm64": return "aarch64"; default: - throw new Error(`Unsupported architecture: ${arch2}`); + throw new Error(`Unsupported architecture: ${arch}`); } }; -var renderPixiUrl = (urlTemplate, version3) => { - const latest = version3 == "latest"; - const arch2 = getArch(); +var renderPixiUrl = (urlTemplate, version2) => { + const latest = version2 == "latest"; + const arch = getArch(); const platform = getPlatform(); - const pixiFile = `pixi-${arch2}-${platform}${platform === "pc-windows-msvc" ? ".exe" : ""}`; + const pixiFile = `pixi-${arch}-${platform}${platform === "pc-windows-msvc" ? ".exe" : ""}`; const template = import_handlebars.default.compile(urlTemplate); return template({ - version: version3, + version: version2, latest, pixiFile }); @@ -74016,7 +79904,7 @@ var inferOptions = (inputs) => { } else if ((0, import_fs.existsSync)(pyprojectPath)) { try { const fileContent = (0, import_fs.readFileSync)(pyprojectPath, "utf-8"); - const parsedContent = parse2(fileContent); + const parsedContent = parse3(fileContent); if (parsedContent.tool && typeof parsedContent.tool === "object" && "pixi" in parsedContent.tool) { core2.debug(`The tool.pixi table found, using ${pyprojectPath} as manifest file.`); manifestPath = pyprojectPath; @@ -74150,7 +80038,7 @@ var options = _options; var import_promises = __toESM(require("fs/promises")); var import_path2 = __toESM(require("path")); var core3 = __toESM(require_core()); -var cache = __toESM(require_cache3()); +var cache = __toESM(require_cache4()); var generateCacheKey = async (cacheKeyPrefix) => Promise.all([import_promises.default.readFile(options.pixiLockFile), import_promises.default.readFile(options.pixiBinPath)]).then(([lockfileContent, pixiBinary]) => { const lockfileSha = sha256(lockfileContent); core3.debug(`lockfileSha: ${lockfileSha}`); @@ -74270,12 +80158,12 @@ var activateEnvironment = async (environment) => { // src/main.ts var downloadPixi = (source) => { - const url2 = renderPixiUrl(source.urlTemplate, source.version); + const url = renderPixiUrl(source.urlTemplate, source.version); return core5.group("Downloading Pixi", () => { core5.debug("Installing pixi"); - core5.debug(`Downloading pixi from ${url2}`); + core5.debug(`Downloading pixi from ${url}`); core5.debug(`Using headers: ${JSON.stringify(source.headers)}`); - return import_promises2.default.mkdir(import_path3.default.dirname(options.pixiBinPath), { recursive: true }).then(() => (0, import_tool_cache.downloadTool)(url2, options.pixiBinPath, void 0, source.headers)).then((_downloadPath) => import_promises2.default.chmod(options.pixiBinPath, 493)).then(() => { + return import_promises2.default.mkdir(import_path3.default.dirname(options.pixiBinPath), { recursive: true }).then(() => (0, import_tool_cache.downloadTool)(url, options.pixiBinPath, void 0, source.headers)).then((_downloadPath) => import_promises2.default.chmod(options.pixiBinPath, 493)).then(() => { core5.info(`Pixi installed to ${options.pixiBinPath}`); }); }); diff --git a/dist/post.js b/dist/post.js index 5c795fe..29db7bb 100644 --- a/dist/post.js +++ b/dist/post.js @@ -14393,7 +14393,7 @@ var require_util4 = __commonJS({ var { serializeAMimeType, parseMIMEType } = require_dataURL(); var { types } = require("util"); var { StringDecoder } = require("string_decoder"); - var { btoa } = require("buffer"); + var { btoa: btoa2 } = require("buffer"); var staticPropertyDescriptors = { enumerable: true, writable: false, @@ -14485,9 +14485,9 @@ var require_util4 = __commonJS({ dataURL += ";base64,"; const decoder = new StringDecoder("latin1"); for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)); + dataURL += btoa2(decoder.write(chunk)); } - dataURL += btoa(decoder.end()); + dataURL += btoa2(decoder.end()); return dataURL; } case "Text": { @@ -14504,7 +14504,7 @@ var require_util4 = __commonJS({ if (encoding === "failure") { encoding = "UTF-8"; } - return decode(bytes, encoding); + return decode2(bytes, encoding); } case "ArrayBuffer": { const sequence = combineByteSequences(bytes); @@ -14521,7 +14521,7 @@ var require_util4 = __commonJS({ } } } - function decode(ioQueue, encoding) { + function decode2(ioQueue, encoding) { const bytes = combineByteSequences(ioQueue); const BOMEncoding = BOMSniffing(bytes); let slice = 0; @@ -21554,7 +21554,7 @@ var require_parser = __commonJS({ parseError: function parseError(str, hash) { throw new Error(str); }, - parse: function parse3(input) { + parse: function parse4(input) { var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; this.lexer.setInput(input); this.lexer.yy = this.yy; @@ -22467,7 +22467,7 @@ var require_base2 = __commonJS({ "use strict"; exports2.__esModule = true; exports2.parseWithoutProcessing = parseWithoutProcessing; - exports2.parse = parse3; + exports2.parse = parse4; function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; @@ -22506,7 +22506,7 @@ var require_base2 = __commonJS({ var ast = _parser2["default"].parse(input); return ast; } - function parse3(input, options2) { + function parse4(input, options2) { var ast = parseWithoutProcessing(input, options2); var strip = new _whitespaceControl2["default"](options2); return strip.accept(ast); @@ -25975,7 +25975,7 @@ var import_process = require("process"); var import_fs = require("fs"); var core2 = __toESM(require_core()); -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/core.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/core.js var NEVER = Object.freeze({ status: "aborted" }); @@ -26028,6 +26028,12 @@ var $ZodAsyncError = class extends Error { super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); } }; +var $ZodEncodeError = class extends Error { + constructor(name) { + super(`Encountered unidirectional transform during encode: ${name}`); + this.name = "ZodEncodeError"; + } +}; var globalConfig = {}; function config(newConfig) { if (newConfig) @@ -26035,7 +26041,7 @@ function config(newConfig) { return globalConfig; } -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/util.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/util.js var util_exports = {}; __export(util_exports, { BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, @@ -26049,6 +26055,8 @@ __export(util_exports, { assertNever: () => assertNever, assertNotEqual: () => assertNotEqual, assignProp: () => assignProp, + base64ToUint8Array: () => base64ToUint8Array, + base64urlToUint8Array: () => base64urlToUint8Array, cached: () => cached, captureStackTrace: () => captureStackTrace, cleanEnum: () => cleanEnum, @@ -26067,6 +26075,7 @@ __export(util_exports, { getLengthableOrigin: () => getLengthableOrigin, getParsedType: () => getParsedType, getSizableOrigin: () => getSizableOrigin, + hexToUint8Array: () => hexToUint8Array, isObject: () => isObject, isPlainObject: () => isPlainObject, issue: () => issue, @@ -26077,6 +26086,7 @@ __export(util_exports, { normalizeParams: () => normalizeParams, nullish: () => nullish, numKeys: () => numKeys, + objectClone: () => objectClone, omit: () => omit, optionalKeys: () => optionalKeys, partial: () => partial, @@ -26087,7 +26097,12 @@ __export(util_exports, { propertyKeyTypes: () => propertyKeyTypes, randomString: () => randomString, required: () => required, + safeExtend: () => safeExtend, + shallowClone: () => shallowClone, stringifyPrimitive: () => stringifyPrimitive, + uint8ArrayToBase64: () => uint8ArrayToBase64, + uint8ArrayToBase64url: () => uint8ArrayToBase64url, + uint8ArrayToHex: () => uint8ArrayToHex, unwrapMessage: () => unwrapMessage }); function assertEqual(val) { @@ -26175,6 +26190,9 @@ function defineLazy(object, key, getter) { configurable: true }); } +function objectClone(obj) { + return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); +} function assignProp(target, prop, value) { Object.defineProperty(target, prop, { value, @@ -26252,6 +26270,11 @@ function isPlainObject(o) { } return true; } +function shallowClone(o) { + if (isPlainObject(o)) + return { ...o }; + return o; +} function numKeys(data) { let keyCount = 0; for (const key in data) { @@ -26432,6 +26455,11 @@ function extend(schema, shape) { if (!isPlainObject(shape)) { throw new Error("Invalid input to extend: expected a plain object"); } + const checks = schema._zod.def.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead."); + } const def = mergeDefs(schema._zod.def, { get shape() { const _shape = { ...schema._zod.def.shape, ...shape }; @@ -26442,6 +26470,21 @@ function extend(schema, shape) { }); return clone(schema, def); } +function safeExtend(schema, shape) { + if (!isPlainObject(shape)) { + throw new Error("Invalid input to safeExtend: expected a plain object"); + } + const def = { + ...schema._zod.def, + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + checks: schema._zod.def.checks + }; + return clone(schema, def); +} function merge(a, b) { const def = mergeDefs(a._zod.def, { get shape() { @@ -26522,6 +26565,8 @@ function required(Class2, schema, mask) { return clone(schema, def); } function aborted(x, startIndex = 0) { + if (x.aborted === true) + return true; for (let i = startIndex; i < x.issues.length; i++) { if (x.issues[i]?.continue !== true) { return true; @@ -26586,12 +26631,49 @@ function cleanEnum(obj) { return Number.isNaN(Number.parseInt(k, 10)); }).map((el) => el[1]); } +function base64ToUint8Array(base642) { + const binaryString = atob(base642); + const bytes = new Uint8Array(binaryString.length); + for (let i = 0; i < binaryString.length; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + return bytes; +} +function uint8ArrayToBase64(bytes) { + let binaryString = ""; + for (let i = 0; i < bytes.length; i++) { + binaryString += String.fromCharCode(bytes[i]); + } + return btoa(binaryString); +} +function base64urlToUint8Array(base64url2) { + const base642 = base64url2.replace(/-/g, "+").replace(/_/g, "/"); + const padding = "=".repeat((4 - base642.length % 4) % 4); + return base64ToUint8Array(base642 + padding); +} +function uint8ArrayToBase64url(bytes) { + return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +} +function hexToUint8Array(hex) { + const cleanHex = hex.replace(/^0x/, ""); + if (cleanHex.length % 2 !== 0) { + throw new Error("Invalid hex string length"); + } + const bytes = new Uint8Array(cleanHex.length / 2); + for (let i = 0; i < cleanHex.length; i += 2) { + bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16); + } + return bytes; +} +function uint8ArrayToHex(bytes) { + return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join(""); +} var Class = class { constructor(..._args) { } }; -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/errors.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/errors.js var initializer = (inst, def) => { inst.name = "$ZodError"; Object.defineProperty(inst, "_zod", { @@ -26660,7 +26742,7 @@ function formatError(error2, _mapper) { return fieldErrors; } -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/parse.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/parse.js var _parse = (_Err) => (schema, value, _ctx, _params) => { const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; const result = schema._zod.run({ value, issues: [] }, ctx); @@ -26709,8 +26791,36 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => { } : { success: true, data: result.value }; }; var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); +var _encode = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parse(_Err)(schema, value, ctx); +}; +var _decode = (_Err) => (schema, value, _ctx) => { + return _parse(_Err)(schema, value, _ctx); +}; +var _encodeAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parseAsync(_Err)(schema, value, ctx); +}; +var _decodeAsync = (_Err) => async (schema, value, _ctx) => { + return _parseAsync(_Err)(schema, value, _ctx); +}; +var _safeEncode = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParse(_Err)(schema, value, ctx); +}; +var _safeDecode = (_Err) => (schema, value, _ctx) => { + return _safeParse(_Err)(schema, value, _ctx); +}; +var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParseAsync(_Err)(schema, value, ctx); +}; +var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => { + return _safeParseAsync(_Err)(schema, value, _ctx); +}; -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/regexes.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/regexes.js var cuid = /^[cC][^\s-]{8,}$/; var cuid2 = /^[0-9a-z]+$/; var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; @@ -26721,7 +26831,7 @@ var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H) var guid = /^([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})$/; var uuid = (version2) => { if (!version2) - return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/; + return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); }; var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; @@ -26765,7 +26875,7 @@ var boolean = /true|false/i; var lowercase = /^[^A-Z]*$/; var uppercase = /^[^a-z]*$/; -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/checks.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/checks.js var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { var _a; inst._zod ?? (inst._zod = {}); @@ -26993,14 +27103,14 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins }; }); -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/versions.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/versions.js var version = { major: 4, - minor: 0, - patch: 14 + minor: 1, + patch: 5 }; -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/schemas.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/schemas.js var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { var _a; inst ?? (inst = {}); @@ -27062,7 +27172,32 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { } return payload; }; + const handleCanaryResult = (canary, payload, ctx) => { + if (aborted(canary)) { + canary.aborted = true; + return canary; + } + const checkResult = runChecks(payload, checks, ctx); + if (checkResult instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); + } + return inst._zod.parse(checkResult, ctx); + }; inst._zod.run = (payload, ctx) => { + if (ctx.skipChecks) { + return inst._zod.parse(payload, ctx); + } + if (ctx.direction === "backward") { + const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); + if (canary instanceof Promise) { + return canary.then((canary2) => { + return handleCanaryResult(canary2, payload, ctx); + }); + } + return handleCanaryResult(canary, payload, ctx); + } const result = inst._zod.parse(payload, ctx); if (result instanceof Promise) { if (ctx.async === false) @@ -27720,9 +27855,12 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { }); var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } const _out = def.transform(payload.value, payload); - if (_ctx.async) { + if (ctx.async) { const output = _out instanceof Promise ? _out : Promise.resolve(_out); return output.then((output2) => { payload.value = output2; @@ -27788,6 +27926,9 @@ var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { inst._zod.optin = "optional"; defineLazy(inst._zod, "values", () => def.innerType._zod.values); inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } if (payload.value === void 0) { payload.value = def.defaultValue; return payload; @@ -27810,6 +27951,9 @@ var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { inst._zod.optin = "optional"; defineLazy(inst._zod, "values", () => def.innerType._zod.values); inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } if (payload.value === void 0) { payload.value = def.defaultValue; } @@ -27847,6 +27991,9 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); defineLazy(inst._zod, "values", () => def.innerType._zod.values); inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } const result = def.innerType._zod.run(payload, ctx); if (result instanceof Promise) { return result.then((result2) => { @@ -27885,18 +28032,26 @@ var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { defineLazy(inst._zod, "optout", () => def.out._zod.optout); defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handlePipeResult(right2, def.in, ctx)); + } + return handlePipeResult(right, def.in, ctx); + } const left = def.in._zod.run(payload, ctx); if (left instanceof Promise) { - return left.then((left2) => handlePipeResult(left2, def, ctx)); + return left.then((left2) => handlePipeResult(left2, def.out, ctx)); } - return handlePipeResult(left, def, ctx); + return handlePipeResult(left, def.out, ctx); }; }); -function handlePipeResult(left, def, ctx) { +function handlePipeResult(left, next, ctx) { if (left.issues.length) { + left.aborted = true; return left; } - return def.out._zod.run({ value: left.value, issues: left.issues }, ctx); + return next._zod.run({ value: left.value, issues: left.issues }, ctx); } var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { $ZodType.init(inst, def); @@ -27905,6 +28060,9 @@ var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } const result = def.innerType._zod.run(payload, ctx); if (result instanceof Promise) { return result.then(handleReadonlyResult); @@ -27950,7 +28108,7 @@ function handleRefineResult(result, payload, input, inst) { } } -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/registries.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/registries.js var $output = Symbol("ZodOutput"); var $input = Symbol("ZodInput"); var $ZodRegistry = class { @@ -28001,7 +28159,7 @@ function registry() { } var globalRegistry = /* @__PURE__ */ registry(); -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/api.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/core/api.js function _string(Class2, params) { return new Class2({ type: "string", @@ -28385,7 +28543,7 @@ function _check(fn, params) { return ch; } -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/classic/iso.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/classic/iso.js var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => { $ZodISODateTime.init(inst, def); ZodStringFormat.init(inst, def); @@ -28415,7 +28573,7 @@ function duration2(params) { return _isoDuration(ZodISODuration, params); } -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/classic/errors.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/classic/errors.js var initializer2 = (inst, issues) => { $ZodError.init(inst, issues); inst.name = "ZodError"; @@ -28455,16 +28613,25 @@ var ZodRealError = $constructor("ZodError", initializer2, { Parent: Error }); -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/classic/parse.js -var parse = /* @__PURE__ */ _parse(ZodRealError); -var parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError); +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/classic/parse.js +var parse2 = /* @__PURE__ */ _parse(ZodRealError); +var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError); var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError); +var encode = /* @__PURE__ */ _encode(ZodRealError); +var decode = /* @__PURE__ */ _decode(ZodRealError); +var encodeAsync = /* @__PURE__ */ _encodeAsync(ZodRealError); +var decodeAsync = /* @__PURE__ */ _decodeAsync(ZodRealError); +var safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError); +var safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError); +var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); +var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); -// node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/classic/schemas.js +// node_modules/.pnpm/zod@4.1.5/node_modules/zod/v4/classic/schemas.js var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { $ZodType.init(inst, def); inst.def = def; + inst.type = def.type; Object.defineProperty(inst, "_def", { value: def }); inst.check = (...checks) => { return inst.clone( @@ -28484,11 +28651,19 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { reg.add(inst, meta); return inst; }; - inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse }); + inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse }); inst.safeParse = (data, params) => safeParse2(inst, data, params); - inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync }); + inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params); inst.spa = inst.safeParseAsync; + inst.encode = (data, params) => encode(inst, data, params); + inst.decode = (data, params) => decode(inst, data, params); + inst.encodeAsync = async (data, params) => encodeAsync(inst, data, params); + inst.decodeAsync = async (data, params) => decodeAsync(inst, data, params); + inst.safeEncode = (data, params) => safeEncode(inst, data, params); + inst.safeDecode = (data, params) => safeDecode(inst, data, params); + inst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params); + inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params); inst.refine = (check, params) => inst.check(refine(check, params)); inst.superRefine = (refinement) => inst.check(superRefine(refinement)); inst.overwrite = (fn) => inst.check(_overwrite(fn)); @@ -28790,6 +28965,9 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { $ZodTransform.init(inst, def); ZodType.init(inst, def); inst._zod.parse = (payload, _ctx) => { + if (_ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } payload.addIssue = (issue2) => { if (typeof issue2 === "string") { payload.issues.push(util_exports.issue(issue2, payload.value, def)); @@ -28853,7 +29031,7 @@ function _default(innerType, defaultValue) { type: "default", innerType, get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : defaultValue; + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); } }); } @@ -28867,7 +29045,7 @@ function prefault(innerType, defaultValue) { type: "prefault", innerType, get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : defaultValue; + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); } }); } @@ -28942,7 +29120,7 @@ function untildify(pathWithTilde) { return homeDirectory ? pathWithTilde.replace(/^~(?=$|\/|\\)/, homeDirectory) : pathWithTilde; } -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/error.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/error.js function getLineColFromPtr(string3, ptr) { let lines = string3.slice(0, ptr).split(/\r\n|\n|\r/g); return [lines.length, lines.pop().length + 1]; @@ -28982,7 +29160,13 @@ ${codeblock}`, options2); } }; -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/util.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/util.js +function isEscaped(str, ptr) { + let i = 0; + while (str[ptr - ++i] === "\\") + ; + return --i && i % 2; +} function indexOfNewline(str, start = 0, end = str.length) { let idx = str.indexOf("\n", start); if (str[idx - 1] === "\r") @@ -29037,7 +29221,7 @@ function getStringEnd(str, seek) { seek += target.length - 1; do seek = str.indexOf(target, ++seek); - while (seek > -1 && first !== "'" && str[seek - 1] === "\\" && (str[seek - 2] !== "\\" || str[seek - 3] === "\\")); + while (seek > -1 && first !== "'" && isEscaped(str, seek)); if (seek > -1) { seek += target.length; if (target.length > 1) { @@ -29050,7 +29234,7 @@ function getStringEnd(str, seek) { return seek; } -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/date.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/date.js var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i; var _hasDate, _hasTime, _offset; var _TomlDate = class _TomlDate extends Date { @@ -29147,7 +29331,7 @@ _hasTime = new WeakMap(); _offset = new WeakMap(); var TomlDate = _TomlDate; -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/primitive.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/primitive.js var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/; var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/; var LEADING_ZERO = /^[+-]?0[0-9_]/; @@ -29285,7 +29469,7 @@ function parseValue(value, toml, ptr, integersAsBigInt) { return date3; } -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/extract.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/extract.js function sliceAndTrimEndOf(str, startPtr, endPtr, allowNewLines) { let value = str.slice(startPtr, endPtr); let commentIdx = value.indexOf("#"); @@ -29361,7 +29545,7 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) { ]; } -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/struct.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/struct.js var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/; function parseKey(str, ptr, end = "=") { let dot = ptr - 1; @@ -29517,7 +29701,7 @@ function parseArray(str, ptr, depth, integersAsBigInt) { return [res, ptr]; } -// node_modules/.pnpm/smol-toml@1.4.1/node_modules/smol-toml/dist/parse.js +// node_modules/.pnpm/smol-toml@1.4.2/node_modules/smol-toml/dist/parse.js function peekTable(key, table, meta, type) { let t = table; let m = meta; @@ -29577,7 +29761,7 @@ function peekTable(key, table, meta, type) { } return [k, t, state.c]; } -function parse2(toml, { maxDepth = 1e3, integersAsBigInt } = {}) { +function parse3(toml, { maxDepth = 1e3, integersAsBigInt } = {}) { let res = {}; let meta = {}; let tbl = res; @@ -29808,7 +29992,7 @@ var inferOptions = (inputs) => { } else if ((0, import_fs.existsSync)(pyprojectPath)) { try { const fileContent = (0, import_fs.readFileSync)(pyprojectPath, "utf-8"); - const parsedContent = parse2(fileContent); + const parsedContent = parse3(fileContent); if (parsedContent.tool && typeof parsedContent.tool === "object" && "pixi" in parsedContent.tool) { core2.debug(`The tool.pixi table found, using ${pyprojectPath} as manifest file.`); manifestPath = pyprojectPath; diff --git a/package.json b/package.json index aa99d3e..503a589 100644 --- a/package.json +++ b/package.json @@ -22,25 +22,25 @@ "author": "Pavel Zwerschke ", "license": "BSD-3-Clause", "dependencies": { - "@actions/cache": "^4.0.3", + "@actions/cache": "^4.0.5", "@actions/core": "^1.11.1", "@actions/exec": "^1.1.1", "@actions/io": "^1.1.3", "@actions/tool-cache": "^2.0.2", "handlebars": "^4.7.8", - "smol-toml": "^1.4.1", + "smol-toml": "^1.4.2", "untildify": "^5.0.0", "which": "^5.0.0", - "zod": "^4.0.14" + "zod": "^4.1.5" }, "devDependencies": { - "@eslint/js": "^9.32.0", - "@types/node": "^24.1.0", + "@eslint/js": "^9.34.0", + "@types/node": "^24.3.0", "@types/which": "^3.0.4", - "eslint": "^9.32.0", + "eslint": "^9.34.0", "prettier": "^3.6.2", "tsup": "^8.4.0", "typescript": "^5.9.2", - "typescript-eslint": "^8.38.0" + "typescript-eslint": "^8.41.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 60afe06..863e67f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@actions/cache': - specifier: ^4.0.3 - version: 4.0.3 + specifier: ^4.0.5 + version: 4.0.5 '@actions/core': specifier: ^1.11.1 version: 1.11.1 @@ -27,8 +27,8 @@ importers: specifier: ^4.7.8 version: 4.7.8 smol-toml: - specifier: ^1.4.1 - version: 1.4.1 + specifier: ^1.4.2 + version: 1.4.2 untildify: specifier: ^5.0.0 version: 5.0.0 @@ -36,21 +36,21 @@ importers: specifier: ^5.0.0 version: 5.0.0 zod: - specifier: ^4.0.14 - version: 4.0.14 + specifier: ^4.1.5 + version: 4.1.5 devDependencies: '@eslint/js': - specifier: ^9.32.0 - version: 9.32.0 + specifier: ^9.34.0 + version: 9.34.0 '@types/node': - specifier: ^24.1.0 - version: 24.1.0 + specifier: ^24.3.0 + version: 24.3.0 '@types/which': specifier: ^3.0.4 version: 3.0.4 eslint: - specifier: ^9.32.0 - version: 9.32.0 + specifier: ^9.34.0 + version: 9.34.0 prettier: specifier: ^3.6.2 version: 3.6.2 @@ -61,13 +61,13 @@ importers: specifier: ^5.9.2 version: 5.9.2 typescript-eslint: - specifier: ^8.38.0 - version: 8.38.0(eslint@9.32.0)(typescript@5.9.2) + specifier: ^8.41.0 + version: 8.41.0(eslint@9.34.0)(typescript@5.9.2) packages: - '@actions/cache@4.0.3': - resolution: {integrity: sha512-SvrqFtYJ7I48A/uXNkoJrnukx5weQv1fGquhs3+4nkByZThBH109KTIqj5x/cGV7JGNvb8dLPVywUOqX1fjiXg==} + '@actions/cache@4.0.5': + resolution: {integrity: sha512-RjLz1/vvntOfp3FpkY3wB0MjVRbLq7bfQEuQG9UUTKwdtcYmFrKVmuD+9B6ADbzbkSfHM+dM4sMjdr3R4XIkFg==} '@actions/core@1.11.1': resolution: {integrity: sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==} @@ -95,16 +95,16 @@ packages: resolution: {integrity: sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==} engines: {node: '>=18.0.0'} - '@azure/core-auth@1.9.0': - resolution: {integrity: sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==} - engines: {node: '>=18.0.0'} + '@azure/core-auth@1.10.0': + resolution: {integrity: sha512-88Djs5vBvGbHQHf5ZZcaoNHo6Y8BKZkt3cw2iuJIQzLEgH4Ox6Tm4hjFhbqOxyYsgIG/eJbFEHpxRIfEEWv5Ow==} + engines: {node: '>=20.0.0'} - '@azure/core-client@1.9.3': - resolution: {integrity: sha512-/wGw8fJ4mdpJ1Cum7s1S+VQyXt1ihwKLzfabS1O/RDADnmzVc01dHn44qD0BvGH6KlZNzOMW95tEpKqhkCChPA==} - engines: {node: '>=18.0.0'} + '@azure/core-client@1.10.0': + resolution: {integrity: sha512-O4aP3CLFNodg8eTHXECaH3B3CjicfzkxVtnrfLkOq0XNP7TIECGfHpK/C6vADZkWP75wzmdBnsIA8ksuJMk18g==} + engines: {node: '>=20.0.0'} - '@azure/core-http-compat@2.2.0': - resolution: {integrity: sha512-1kW8ZhN0CfbNOG6C688z5uh2yrzALE7dDXHiR9dY4vt+EbhGZQSbjDa5bQd2rf3X2pdWMsXbqbArxUyeNdvtmg==} + '@azure/core-http-compat@2.3.0': + resolution: {integrity: sha512-qLQujmUypBBG0gxHd0j6/Jdmul6ttl24c8WGiLXIk7IHXdBlfoBqW27hyz3Xn6xbfdyVSarl1Ttbk0AwnZBYCw==} engines: {node: '>=18.0.0'} '@azure/core-lro@2.7.2': @@ -115,32 +115,36 @@ packages: resolution: {integrity: sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==} engines: {node: '>=18.0.0'} - '@azure/core-rest-pipeline@1.19.1': - resolution: {integrity: sha512-zHeoI3NCs53lLBbWNzQycjnYKsA1CVKlnzSNuSFcUDwBp8HHVObePxrM7HaX+Ha5Ks639H7chNC9HOaIhNS03w==} - engines: {node: '>=18.0.0'} + '@azure/core-rest-pipeline@1.22.0': + resolution: {integrity: sha512-OKHmb3/Kpm06HypvB3g6Q3zJuvyXcpxDpCS1PnU8OV6AJgSFaee/covXBcPbWc6XDDxtEPlbi3EMQ6nUiPaQtw==} + engines: {node: '>=20.0.0'} - '@azure/core-tracing@1.2.0': - resolution: {integrity: sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==} - engines: {node: '>=18.0.0'} + '@azure/core-tracing@1.3.0': + resolution: {integrity: sha512-+XvmZLLWPe67WXNZo9Oc9CrPj/Tm8QnHR92fFAFdnbzwNdCH1h+7UdpaQgRSBsMY+oW1kHXNUZQLdZ1gHX3ROw==} + engines: {node: '>=20.0.0'} - '@azure/core-util@1.11.0': - resolution: {integrity: sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==} - engines: {node: '>=18.0.0'} + '@azure/core-util@1.13.0': + resolution: {integrity: sha512-o0psW8QWQ58fq3i24Q1K2XfS/jYTxr7O1HRcyUE9bV9NttLU+kYOH82Ixj8DGlMTOWgxm1Sss2QAfKK5UkSPxw==} + engines: {node: '>=20.0.0'} - '@azure/core-xml@1.4.5': - resolution: {integrity: sha512-gT4H8mTaSXRz7eGTuQyq1aIJnJqeXzpOe9Ay7Z3FrCouer14CbV3VzjnJrNrQfbBpGBLO9oy8BmrY75A0p53cA==} - engines: {node: '>=18.0.0'} + '@azure/core-xml@1.5.0': + resolution: {integrity: sha512-D/sdlJBMJfx7gqoj66PKVmhDDaU6TKA49ptcolxdas29X7AfvLTmfAGLjAcIMBK7UZ2o4lygHIqVckOlQU3xWw==} + engines: {node: '>=20.0.0'} - '@azure/logger@1.1.4': - resolution: {integrity: sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==} - engines: {node: '>=18.0.0'} + '@azure/logger@1.3.0': + resolution: {integrity: sha512-fCqPIfOcLE+CGqGPd66c8bZpwAji98tZ4JI9i/mlTNTlsIWslCfpg48s/ypyLxZTump5sypjrKn2/kY7q8oAbA==} + engines: {node: '>=20.0.0'} '@azure/ms-rest-js@2.7.0': resolution: {integrity: sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==} - '@azure/storage-blob@12.27.0': - resolution: {integrity: sha512-IQjj9RIzAKatmNca3D6bT0qJ+Pkox1WZGOg2esJF2YLHb45pQKOwGPIAV+w3rfgkj7zV3RMxpn/c6iftzSOZJQ==} - engines: {node: '>=18.0.0'} + '@azure/storage-blob@12.28.0': + resolution: {integrity: sha512-VhQHITXXO03SURhDiGuHhvc/k/sD2WvJUS7hqhiVNbErVCuQoLtWql7r97fleBlIRKHJaa9R7DpBjfE0pfLYcA==} + engines: {node: '>=20.0.0'} + + '@azure/storage-common@12.0.0': + resolution: {integrity: sha512-QyEWXgi4kdRo0wc1rHum9/KnaWZKCdQGZK1BjU4fFL6Jtedp7KLbQihgTTVxldFy1z1ZPtuDPx8mQ5l3huPPbA==} + engines: {node: '>=20.0.0'} '@esbuild/aix-ppc64@0.25.0': resolution: {integrity: sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==} @@ -306,28 +310,28 @@ packages: resolution: {integrity: sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/config-helpers@0.3.0': - resolution: {integrity: sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==} + '@eslint/config-helpers@0.3.1': + resolution: {integrity: sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.15.1': - resolution: {integrity: sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==} + '@eslint/core@0.15.2': + resolution: {integrity: sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@3.3.1': resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.32.0': - resolution: {integrity: sha512-BBpRFZK3eX6uMLKz8WxFOBIFFcGFJ/g8XuwjTHCqHROSIsopI+ddn/d5Cfh36+7+e5edVS8dbSHnBNhrLEX0zg==} + '@eslint/js@9.34.0': + resolution: {integrity: sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.6': resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.3.4': - resolution: {integrity: sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==} + '@eslint/plugin-kit@0.3.5': + resolution: {integrity: sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@fastify/busboy@2.1.1': @@ -392,22 +396,11 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@protobuf-ts/plugin-framework@2.9.6': - resolution: {integrity: sha512-w7A1RXrDCiVzcaRE6YJP7FCARuAFe/Vc4SNQnHAi4CF0V6mEtyjAYEIC5BNYgIRaJEqB26zzsBQjIem3R02SCA==} - - '@protobuf-ts/plugin@2.9.6': - resolution: {integrity: sha512-Wpv5rkXeu6E5Y4r0TjWE0bzRGddiTYl/RM+tLgVlS0r8CqOBqNAmlWv+s8ltf/F75rVrahUal0cpyhFwha9GRA==} - hasBin: true - - '@protobuf-ts/protoc@2.9.6': - resolution: {integrity: sha512-c0XvAPDIBAovH9HxV8gBv8gzOTreQIqibcusrB1+DxvFiSvy+2V1tjbUmG5gJEbjk3aAOaoj0a3+QuE+P28xUw==} - hasBin: true + '@protobuf-ts/runtime-rpc@2.11.1': + resolution: {integrity: sha512-4CqqUmNA+/uMz00+d3CYKgElXO9VrEbucjnBFEjqI4GuDrEQ32MaI3q+9qPBvIGOlL4PmHXrzM32vBPWRhQKWQ==} - '@protobuf-ts/runtime-rpc@2.9.6': - resolution: {integrity: sha512-0UeqDRzNxgsh08lY5eWzFJNfD3gZ8Xf+WG1HzbIAbVAigzigwjwsYNNhTeas5H3gco1U5owTzCg177aambKOOw==} - - '@protobuf-ts/runtime@2.9.6': - resolution: {integrity: sha512-C0CfpKx4n4LBbUrajOdRj2BTbd3qBoK0SiKWLq7RgCoU6xiN4wesBMFHUOBp3fFzKeZwgU8Q2KtzaqzIvPLRXg==} + '@protobuf-ts/runtime@2.11.1': + resolution: {integrity: sha512-KuDaT1IfHkugM2pyz+FwiY80ejWrkH1pAtOBOZFuR6SXEFTsnb/jiQWQ1rCIrcKx2BtyxnxW6BWwsVSA/Ie+WQ==} '@rollup/rollup-android-arm-eabi@4.34.8': resolution: {integrity: sha512-q217OSE8DTp8AFHuNHXo0Y86e1wtlfVrXiAlwkIvGRQv9zbc6mE3sjIVfwI8sYUyNxwOg0j/Vm1RKM04JcWLJw==} @@ -513,71 +506,75 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/node@24.1.0': - resolution: {integrity: sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==} + '@types/node@24.3.0': + resolution: {integrity: sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==} '@types/which@3.0.4': resolution: {integrity: sha512-liyfuo/106JdlgSchJzXEQCVArk0CvevqPote8F8HgWgJ3dRCcTHgJIsLDuee0kxk/mhbInzIZk3QWSZJ8R+2w==} - '@typescript-eslint/eslint-plugin@8.38.0': - resolution: {integrity: sha512-CPoznzpuAnIOl4nhj4tRr4gIPj5AfKgkiJmGQDaq+fQnRJTYlcBjbX3wbciGmpoPf8DREufuPRe1tNMZnGdanA==} + '@typescript-eslint/eslint-plugin@8.41.0': + resolution: {integrity: sha512-8fz6oa6wEKZrhXWro/S3n2eRJqlRcIa6SlDh59FXJ5Wp5XRZ8B9ixpJDcjadHq47hMx0u+HW6SNa6LjJQ6NLtw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.38.0 + '@typescript-eslint/parser': ^8.41.0 eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.9.0' + typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/parser@8.38.0': - resolution: {integrity: sha512-Zhy8HCvBUEfBECzIl1PKqF4p11+d0aUJS1GeUiuqK9WmOug8YCmC4h4bjyBvMyAMI9sbRczmrYL5lKg/YMbrcQ==} + '@typescript-eslint/parser@8.41.0': + resolution: {integrity: sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.9.0' + typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.38.0': - resolution: {integrity: sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg==} + '@typescript-eslint/project-service@8.41.0': + resolution: {integrity: sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '>=4.8.4 <5.9.0' + typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/scope-manager@8.38.0': - resolution: {integrity: sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ==} + '@typescript-eslint/scope-manager@8.41.0': + resolution: {integrity: sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.38.0': - resolution: {integrity: sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ==} + '@typescript-eslint/tsconfig-utils@8.41.0': + resolution: {integrity: sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '>=4.8.4 <5.9.0' + typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/type-utils@8.38.0': - resolution: {integrity: sha512-c7jAvGEZVf0ao2z+nnz8BUaHZD09Agbh+DY7qvBQqLiz8uJzRgVPj5YvOh8I8uEiH8oIUGIfHzMwUcGVco/SJg==} + '@typescript-eslint/type-utils@8.41.0': + resolution: {integrity: sha512-63qt1h91vg3KsjVVonFJWjgSK7pZHSQFKH6uwqxAH9bBrsyRhO6ONoKyXxyVBzG1lJnFAJcKAcxLS54N1ee1OQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.9.0' + typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/types@8.38.0': - resolution: {integrity: sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw==} + '@typescript-eslint/types@8.41.0': + resolution: {integrity: sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.38.0': - resolution: {integrity: sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ==} + '@typescript-eslint/typescript-estree@8.41.0': + resolution: {integrity: sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '>=4.8.4 <5.9.0' + typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/utils@8.38.0': - resolution: {integrity: sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg==} + '@typescript-eslint/utils@8.41.0': + resolution: {integrity: sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.9.0' + typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/visitor-keys@8.38.0': - resolution: {integrity: sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g==} + '@typescript-eslint/visitor-keys@8.41.0': + resolution: {integrity: sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typespec/ts-http-runtime@0.3.0': + resolution: {integrity: sha512-sOx1PKSuFwnIl7z4RN0Ls7N9AQawmR9r66eI5rFCzLDIs8HTIYrIpH9QjYWoX0lkgGrkLxXhi4QnK7MizPRrIg==} + engines: {node: '>=20.0.0'} + abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -592,8 +589,8 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - agent-base@7.1.3: - resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} + agent-base@7.1.4: + resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} engines: {node: '>= 14'} ajv@6.12.6: @@ -767,8 +764,8 @@ packages: resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.32.0: - resolution: {integrity: sha512-LSehfdpgMeWcTZkWZVIJl+tkZ2nuSkyyB9C27MZqFWXuph7DvaowgcTvKqxvpLW1JZIk8PN7hFY3Rj9LQ7m7lg==} + eslint@9.34.0: + resolution: {integrity: sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -818,8 +815,8 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-xml-parser@5.0.9: - resolution: {integrity: sha512-2mBwCiuW3ycKQQ6SOesSB8WeF+fIGb6I/GG5vU5/XEptwFFhp9PE8b9O7fbs2dpq9fXn4ULR3UsfydNUCntf5A==} + fast-xml-parser@5.2.5: + resolution: {integrity: sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ==} hasBin: true fastq@1.19.1: @@ -859,8 +856,8 @@ packages: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} - form-data@2.5.3: - resolution: {integrity: sha512-XHIrMD0NpDrNM/Ckf7XJiBbLl57KEhT3+i3yY+eWm+cqYZJQTZrKo8Y8AWKnuV5GT4scfuUGt9LzNoIx3dU1nQ==} + form-data@2.5.5: + resolution: {integrity: sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==} engines: {node: '>= 0.12'} fsevents@2.3.3: @@ -1223,8 +1220,8 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} - smol-toml@1.4.1: - resolution: {integrity: sha512-CxdwHXyYTONGHThDbq5XdwbFsuY4wlClRGejfE2NtwUtiHYsP1QtNsHb/hnj31jKYSchztJsaA8pSQoVzkfCFg==} + smol-toml@1.4.2: + resolution: {integrity: sha512-rInDH6lCNiEyn3+hH8KVGFdbjc099j47+OSgbMrfDYX1CmXLfdKd7qi6IfcWj2wFxvSVkuI46M+wPGYfEOEj6g==} engines: {node: '>= 18'} source-map@0.6.1: @@ -1256,8 +1253,8 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strnum@2.0.5: - resolution: {integrity: sha512-YAT3K/sgpCUxhxNMrrdhtod3jckkpYwH6JAuwmUdXZsmzH1wUyzTMrrK2wYCEEqlKwrWDd35NeuUkbBy/1iK+Q==} + strnum@2.1.1: + resolution: {integrity: sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==} sucrase@3.35.0: resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} @@ -1338,17 +1335,12 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - typescript-eslint@8.38.0: - resolution: {integrity: sha512-FsZlrYK6bPDGoLeZRuvx2v6qrM03I0U0SnfCLPs/XCCPCFD80xU9Pg09H/K+XFa68uJuZo7l/Xhs+eDRg2l3hg==} + typescript-eslint@8.41.0: + resolution: {integrity: sha512-n66rzs5OBXW3SFSnZHr2T685q1i4ODm2nulFJhMZBotaTavsS8TrI3d7bDlRSs9yWo7HmyWrN9qDu14Qv7Y0Dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.9.0' - - typescript@3.9.10: - resolution: {integrity: sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==} - engines: {node: '>=4.2.0'} - hasBin: true + typescript: '>=4.8.4 <6.0.0' typescript@5.9.2: resolution: {integrity: sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==} @@ -1363,8 +1355,8 @@ packages: engines: {node: '>=0.8.0'} hasBin: true - undici-types@7.8.0: - resolution: {integrity: sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==} + undici-types@7.10.0: + resolution: {integrity: sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==} undici@5.29.0: resolution: {integrity: sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==} @@ -1430,12 +1422,12 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - zod@4.0.14: - resolution: {integrity: sha512-nGFJTnJN6cM2v9kXL+SOBq3AtjQby3Mv5ySGFof5UGRHrRioSJ5iG680cYNjE/yWk671nROcpPj4hAS8nyLhSw==} + zod@4.1.5: + resolution: {integrity: sha512-rcUUZqlLJgBC33IT3PNMgsCq6TzLQEG/Ei/KTCU0PedSWRMAXoOUN+4t/0H+Q8bdnLPdqUYnvboJT0bn/229qg==} snapshots: - '@actions/cache@4.0.3': + '@actions/cache@4.0.5': dependencies: '@actions/core': 1.11.1 '@actions/exec': 1.1.1 @@ -1444,8 +1436,8 @@ snapshots: '@actions/io': 1.1.3 '@azure/abort-controller': 1.1.0 '@azure/ms-rest-js': 2.7.0 - '@azure/storage-blob': 12.27.0 - '@protobuf-ts/plugin': 2.9.6 + '@azure/storage-blob': 12.28.0 + '@protobuf-ts/runtime-rpc': 2.11.1 semver: 6.3.1 transitivePeerDependencies: - encoding @@ -1488,79 +1480,88 @@ snapshots: dependencies: tslib: 2.8.1 - '@azure/core-auth@1.9.0': + '@azure/core-auth@1.10.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-util': 1.11.0 + '@azure/core-util': 1.13.0 tslib: 2.8.1 + transitivePeerDependencies: + - supports-color - '@azure/core-client@1.9.3': + '@azure/core-client@1.10.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.9.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 + '@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.8.1 transitivePeerDependencies: - supports-color - '@azure/core-http-compat@2.2.0': + '@azure/core-http-compat@2.3.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-client': 1.9.3 - '@azure/core-rest-pipeline': 1.19.1 + '@azure/core-client': 1.10.0 + '@azure/core-rest-pipeline': 1.22.0 transitivePeerDependencies: - supports-color '@azure/core-lro@2.7.2': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-util': 1.11.0 - '@azure/logger': 1.1.4 + '@azure/core-util': 1.13.0 + '@azure/logger': 1.3.0 tslib: 2.8.1 + transitivePeerDependencies: + - supports-color '@azure/core-paging@1.6.2': dependencies: tslib: 2.8.1 - '@azure/core-rest-pipeline@1.19.1': + '@azure/core-rest-pipeline@1.22.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.9.0 - '@azure/core-tracing': 1.2.0 - '@azure/core-util': 1.11.0 - '@azure/logger': 1.1.4 - http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.6 + '@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.8.1 transitivePeerDependencies: - supports-color - '@azure/core-tracing@1.2.0': + '@azure/core-tracing@1.3.0': dependencies: tslib: 2.8.1 - '@azure/core-util@1.11.0': + '@azure/core-util@1.13.0': dependencies: '@azure/abort-controller': 2.1.2 + '@typespec/ts-http-runtime': 0.3.0 tslib: 2.8.1 + transitivePeerDependencies: + - supports-color - '@azure/core-xml@1.4.5': + '@azure/core-xml@1.5.0': dependencies: - fast-xml-parser: 5.0.9 + fast-xml-parser: 5.2.5 tslib: 2.8.1 - '@azure/logger@1.1.4': + '@azure/logger@1.3.0': dependencies: + '@typespec/ts-http-runtime': 0.3.0 tslib: 2.8.1 + transitivePeerDependencies: + - supports-color '@azure/ms-rest-js@2.7.0': dependencies: - '@azure/core-auth': 1.9.0 + '@azure/core-auth': 1.10.0 abort-controller: 3.0.0 - form-data: 2.5.3 + form-data: 2.5.5 node-fetch: 2.7.0 tslib: 1.14.1 tunnel: 0.0.6 @@ -1568,20 +1569,36 @@ snapshots: xml2js: 0.5.0 transitivePeerDependencies: - encoding + - supports-color - '@azure/storage-blob@12.27.0': + '@azure/storage-blob@12.28.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.9.0 - '@azure/core-client': 1.9.3 - '@azure/core-http-compat': 2.2.0 + '@azure/core-auth': 1.10.0 + '@azure/core-client': 1.10.0 + '@azure/core-http-compat': 2.3.0 '@azure/core-lro': 2.7.2 '@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/core-rest-pipeline': 1.22.0 + '@azure/core-tracing': 1.3.0 + '@azure/core-util': 1.13.0 + '@azure/core-xml': 1.5.0 + '@azure/logger': 1.3.0 + '@azure/storage-common': 12.0.0 + events: 3.3.0 + tslib: 2.8.1 + transitivePeerDependencies: + - supports-color + + '@azure/storage-common@12.0.0': + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.10.0 + '@azure/core-http-compat': 2.3.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 events: 3.3.0 tslib: 2.8.1 transitivePeerDependencies: @@ -1662,9 +1679,9 @@ snapshots: '@esbuild/win32-x64@0.25.0': optional: true - '@eslint-community/eslint-utils@4.7.0(eslint@9.32.0)': + '@eslint-community/eslint-utils@4.7.0(eslint@9.34.0)': dependencies: - eslint: 9.32.0 + eslint: 9.34.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -1677,9 +1694,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.3.0': {} + '@eslint/config-helpers@0.3.1': {} - '@eslint/core@0.15.1': + '@eslint/core@0.15.2': dependencies: '@types/json-schema': 7.0.15 @@ -1697,13 +1714,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.32.0': {} + '@eslint/js@9.34.0': {} '@eslint/object-schema@2.1.6': {} - '@eslint/plugin-kit@0.3.4': + '@eslint/plugin-kit@0.3.5': dependencies: - '@eslint/core': 0.15.1 + '@eslint/core': 0.15.2 levn: 0.4.1 '@fastify/busboy@2.1.1': {} @@ -1762,26 +1779,11 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@protobuf-ts/plugin-framework@2.9.6': - dependencies: - '@protobuf-ts/runtime': 2.9.6 - typescript: 3.9.10 - - '@protobuf-ts/plugin@2.9.6': + '@protobuf-ts/runtime-rpc@2.11.1': dependencies: - '@protobuf-ts/plugin-framework': 2.9.6 - '@protobuf-ts/protoc': 2.9.6 - '@protobuf-ts/runtime': 2.9.6 - '@protobuf-ts/runtime-rpc': 2.9.6 - typescript: 3.9.10 + '@protobuf-ts/runtime': 2.11.1 - '@protobuf-ts/protoc@2.9.6': {} - - '@protobuf-ts/runtime-rpc@2.9.6': - dependencies: - '@protobuf-ts/runtime': 2.9.6 - - '@protobuf-ts/runtime@2.9.6': {} + '@protobuf-ts/runtime@2.11.1': {} '@rollup/rollup-android-arm-eabi@4.34.8': optional: true @@ -1846,21 +1848,21 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/node@24.1.0': + '@types/node@24.3.0': dependencies: - undici-types: 7.8.0 + undici-types: 7.10.0 '@types/which@3.0.4': {} - '@typescript-eslint/eslint-plugin@8.38.0(@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.9.2))(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/eslint-plugin@8.41.0(@typescript-eslint/parser@8.41.0(eslint@9.34.0)(typescript@5.9.2))(eslint@9.34.0)(typescript@5.9.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.38.0(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/scope-manager': 8.38.0 - '@typescript-eslint/type-utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/visitor-keys': 8.38.0 - eslint: 9.32.0 + '@typescript-eslint/parser': 8.41.0(eslint@9.34.0)(typescript@5.9.2) + '@typescript-eslint/scope-manager': 8.41.0 + '@typescript-eslint/type-utils': 8.41.0(eslint@9.34.0)(typescript@5.9.2) + '@typescript-eslint/utils': 8.41.0(eslint@9.34.0)(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.41.0 + eslint: 9.34.0 graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 @@ -1869,56 +1871,56 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/parser@8.41.0(eslint@9.34.0)(typescript@5.9.2)': dependencies: - '@typescript-eslint/scope-manager': 8.38.0 - '@typescript-eslint/types': 8.38.0 - '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) - '@typescript-eslint/visitor-keys': 8.38.0 + '@typescript-eslint/scope-manager': 8.41.0 + '@typescript-eslint/types': 8.41.0 + '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.41.0 debug: 4.4.1 - eslint: 9.32.0 + eslint: 9.34.0 typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.38.0(typescript@5.9.2)': + '@typescript-eslint/project-service@8.41.0(typescript@5.9.2)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.38.0(typescript@5.9.2) - '@typescript-eslint/types': 8.38.0 + '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.9.2) + '@typescript-eslint/types': 8.41.0 debug: 4.4.1 typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.38.0': + '@typescript-eslint/scope-manager@8.41.0': dependencies: - '@typescript-eslint/types': 8.38.0 - '@typescript-eslint/visitor-keys': 8.38.0 + '@typescript-eslint/types': 8.41.0 + '@typescript-eslint/visitor-keys': 8.41.0 - '@typescript-eslint/tsconfig-utils@8.38.0(typescript@5.9.2)': + '@typescript-eslint/tsconfig-utils@8.41.0(typescript@5.9.2)': dependencies: typescript: 5.9.2 - '@typescript-eslint/type-utils@8.38.0(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/type-utils@8.41.0(eslint@9.34.0)(typescript@5.9.2)': dependencies: - '@typescript-eslint/types': 8.38.0 - '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) - '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) + '@typescript-eslint/types': 8.41.0 + '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.9.2) + '@typescript-eslint/utils': 8.41.0(eslint@9.34.0)(typescript@5.9.2) debug: 4.4.1 - eslint: 9.32.0 + eslint: 9.34.0 ts-api-utils: 2.1.0(typescript@5.9.2) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.38.0': {} + '@typescript-eslint/types@8.41.0': {} - '@typescript-eslint/typescript-estree@8.38.0(typescript@5.9.2)': + '@typescript-eslint/typescript-estree@8.41.0(typescript@5.9.2)': dependencies: - '@typescript-eslint/project-service': 8.38.0(typescript@5.9.2) - '@typescript-eslint/tsconfig-utils': 8.38.0(typescript@5.9.2) - '@typescript-eslint/types': 8.38.0 - '@typescript-eslint/visitor-keys': 8.38.0 + '@typescript-eslint/project-service': 8.41.0(typescript@5.9.2) + '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.9.2) + '@typescript-eslint/types': 8.41.0 + '@typescript-eslint/visitor-keys': 8.41.0 debug: 4.4.1 fast-glob: 3.3.3 is-glob: 4.0.3 @@ -1929,22 +1931,30 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.38.0(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/utils@8.41.0(eslint@9.34.0)(typescript@5.9.2)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.32.0) - '@typescript-eslint/scope-manager': 8.38.0 - '@typescript-eslint/types': 8.38.0 - '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) - eslint: 9.32.0 + '@eslint-community/eslint-utils': 4.7.0(eslint@9.34.0) + '@typescript-eslint/scope-manager': 8.41.0 + '@typescript-eslint/types': 8.41.0 + '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.9.2) + eslint: 9.34.0 typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.38.0': + '@typescript-eslint/visitor-keys@8.41.0': dependencies: - '@typescript-eslint/types': 8.38.0 + '@typescript-eslint/types': 8.41.0 eslint-visitor-keys: 4.2.1 + '@typespec/ts-http-runtime@0.3.0': + dependencies: + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + tslib: 2.8.1 + transitivePeerDependencies: + - supports-color + abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 @@ -1955,7 +1965,7 @@ snapshots: acorn@8.15.0: {} - agent-base@7.1.3: {} + agent-base@7.1.4: {} ajv@6.12.6: dependencies: @@ -2120,16 +2130,16 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.32.0: + eslint@9.34.0: dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.32.0) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.34.0) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.21.0 - '@eslint/config-helpers': 0.3.0 - '@eslint/core': 0.15.1 + '@eslint/config-helpers': 0.3.1 + '@eslint/core': 0.15.2 '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.32.0 - '@eslint/plugin-kit': 0.3.4 + '@eslint/js': 9.34.0 + '@eslint/plugin-kit': 0.3.5 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.3 @@ -2196,9 +2206,9 @@ snapshots: fast-levenshtein@2.0.6: {} - fast-xml-parser@5.0.9: + fast-xml-parser@5.2.5: dependencies: - strnum: 2.0.5 + strnum: 2.1.1 fastq@1.19.1: dependencies: @@ -2239,11 +2249,12 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - form-data@2.5.3: + form-data@2.5.5: 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 @@ -2316,14 +2327,14 @@ snapshots: http-proxy-agent@7.0.2: dependencies: - agent-base: 7.1.3 + agent-base: 7.1.4 debug: 4.4.1 transitivePeerDependencies: - supports-color https-proxy-agent@7.0.6: dependencies: - agent-base: 7.1.3 + agent-base: 7.1.4 debug: 4.4.1 transitivePeerDependencies: - supports-color @@ -2565,7 +2576,7 @@ snapshots: signal-exit@4.1.0: {} - smol-toml@1.4.1: {} + smol-toml@1.4.2: {} source-map@0.6.1: {} @@ -2595,7 +2606,7 @@ snapshots: strip-json-comments@3.1.1: {} - strnum@2.0.5: {} + strnum@2.1.1: {} sucrase@3.35.0: dependencies: @@ -2681,19 +2692,17 @@ snapshots: dependencies: prelude-ls: 1.2.1 - typescript-eslint@8.38.0(eslint@9.32.0)(typescript@5.9.2): + typescript-eslint@8.41.0(eslint@9.34.0)(typescript@5.9.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.38.0(@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.9.2))(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/parser': 8.38.0(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) - '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) - eslint: 9.32.0 + '@typescript-eslint/eslint-plugin': 8.41.0(@typescript-eslint/parser@8.41.0(eslint@9.34.0)(typescript@5.9.2))(eslint@9.34.0)(typescript@5.9.2) + '@typescript-eslint/parser': 8.41.0(eslint@9.34.0)(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.9.2) + '@typescript-eslint/utils': 8.41.0(eslint@9.34.0)(typescript@5.9.2) + eslint: 9.34.0 typescript: 5.9.2 transitivePeerDependencies: - supports-color - typescript@3.9.10: {} - typescript@5.9.2: {} ufo@1.6.1: {} @@ -2701,7 +2710,7 @@ snapshots: uglify-js@3.19.3: optional: true - undici-types@7.8.0: {} + undici-types@7.10.0: {} undici@5.29.0: dependencies: @@ -2763,4 +2772,4 @@ snapshots: yocto-queue@0.1.0: {} - zod@4.0.14: {} + zod@4.1.5: {}