diff --git a/dist/index.js b/dist/index.js index ca2ca0b..1ba8725 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,7 +1,7 @@ import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module"; /******/ var __webpack_modules__ = ({ -/***/ 31866: +/***/ 63002: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -38,14 +38,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.FinalizeCacheError = exports.ReserveCacheError = exports.ValidationError = void 0; +exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.ReserveCacheError = exports.ValidationError = void 0; const core = __importStar(__nccwpck_require__(16966)); const path = __importStar(__nccwpck_require__(16928)); -const utils = __importStar(__nccwpck_require__(72197)); -const cacheHttpClient = __importStar(__nccwpck_require__(86485)); -const cacheTwirpClient = __importStar(__nccwpck_require__(82513)); -const config_1 = __nccwpck_require__(61936); -const tar_1 = __nccwpck_require__(89135); +const utils = __importStar(__nccwpck_require__(89925)); +const cacheHttpClient = __importStar(__nccwpck_require__(14933)); +const cacheTwirpClient = __importStar(__nccwpck_require__(39601)); +const config_1 = __nccwpck_require__(63440); +const tar_1 = __nccwpck_require__(65679); +const constants_1 = __nccwpck_require__(86385); const http_client_1 = __nccwpck_require__(21966); class ValidationError extends Error { constructor(message) { @@ -63,14 +64,6 @@ class ReserveCacheError extends Error { } } exports.ReserveCacheError = ReserveCacheError; -class FinalizeCacheError extends Error { - constructor(message) { - super(message); - this.name = 'FinalizeCacheError'; - Object.setPrototypeOf(this, FinalizeCacheError.prototype); - } -} -exports.FinalizeCacheError = FinalizeCacheError; function checkPaths(paths) { if (!paths || paths.length === 0) { throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); @@ -447,6 +440,10 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); core.debug(`File Size: ${archiveFileSize}`); + // For GHES, this check will take place in ReserveCache API with enterprise file size limit + if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { + throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); + } // Set the archive size in the options, will be used to display the upload progress options.archiveSizeBytes = archiveFileSize; core.debug('Reserving Cache'); @@ -459,10 +456,7 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { try { const response = yield twirpClient.CreateCacheEntry(request); if (!response.ok) { - if (response.message) { - core.warning(`Cache reservation failed: ${response.message}`); - } - throw new Error(response.message || 'Response was not ok'); + throw new Error('Response was not ok'); } signedUploadUrl = response.signedUploadUrl; } @@ -480,9 +474,6 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); core.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); if (!finalizeResponse.ok) { - if (finalizeResponse.message) { - throw new FinalizeCacheError(finalizeResponse.message); - } throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); } cacheId = parseInt(finalizeResponse.entryId); @@ -495,9 +486,6 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { else if (typedError.name === ReserveCacheError.name) { core.info(`Failed to save: ${typedError.message}`); } - else if (typedError.name === FinalizeCacheError.name) { - core.warning(typedError.message); - } else { // Log server errors (5xx) as errors, all other errors as warnings if (typedError instanceof http_client_1.HttpClientError && @@ -526,7 +514,7 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { /***/ }), -/***/ 26394: +/***/ 78330: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -541,7 +529,7 @@ const runtime_2 = __nccwpck_require__(68140); const runtime_3 = __nccwpck_require__(68140); const runtime_4 = __nccwpck_require__(68140); const runtime_5 = __nccwpck_require__(68140); -const cachemetadata_1 = __nccwpck_require__(81574); +const cachemetadata_1 = __nccwpck_require__(78662); // @generated message type with reflection information, may provide speed optimized methods class CreateCacheEntryRequest$Type extends runtime_5.MessageType { constructor() { @@ -608,12 +596,11 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType { constructor() { super("github.actions.results.api.v1.CreateCacheEntryResponse", [ { no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + { no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value) { - const message = { ok: false, signedUploadUrl: "", message: "" }; + const message = { ok: false, signedUploadUrl: "" }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== undefined) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -630,9 +617,6 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType { case /* string signed_upload_url */ 2: message.signedUploadUrl = reader.string(); break; - case /* string message */ 3: - message.message = reader.string(); - break; default: let u = options.readUnknownField; if (u === "throw") @@ -651,9 +635,6 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType { /* string signed_upload_url = 2; */ if (message.signedUploadUrl !== "") writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl); - /* string message = 3; */ - if (message.message !== "") - writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -737,12 +718,11 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType { constructor() { super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [ { no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, - { no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + { no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ } ]); } create(value) { - const message = { ok: false, entryId: "0", message: "" }; + const message = { ok: false, entryId: "0" }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== undefined) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -759,9 +739,6 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType { case /* int64 entry_id */ 2: message.entryId = reader.int64().toString(); break; - case /* string message */ 3: - message.message = reader.string(); - break; default: let u = options.readUnknownField; if (u === "throw") @@ -780,9 +757,6 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType { /* int64 entry_id = 2; */ if (message.entryId !== "0") writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); - /* string message = 3; */ - if (message.message !== "") - writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -934,13 +908,13 @@ exports.CacheService = new runtime_rpc_1.ServiceType("github.actions.results.api /***/ }), -/***/ 35172: +/***/ 79332: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CacheServiceClientProtobuf = exports.CacheServiceClientJSON = void 0; -const cache_1 = __nccwpck_require__(26394); +const cache_1 = __nccwpck_require__(78330); class CacheServiceClientJSON { constructor(rpc) { this.rpc = rpc; @@ -1008,7 +982,7 @@ exports.CacheServiceClientProtobuf = CacheServiceClientProtobuf; /***/ }), -/***/ 81574: +/***/ 78662: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -1019,7 +993,7 @@ const runtime_2 = __nccwpck_require__(68140); const runtime_3 = __nccwpck_require__(68140); const runtime_4 = __nccwpck_require__(68140); const runtime_5 = __nccwpck_require__(68140); -const cachescope_1 = __nccwpck_require__(35403); +const cachescope_1 = __nccwpck_require__(54347); // @generated message type with reflection information, may provide speed optimized methods class CacheMetadata$Type extends runtime_5.MessageType { constructor() { @@ -1078,7 +1052,7 @@ exports.CacheMetadata = new CacheMetadata$Type(); /***/ }), -/***/ 35403: +/***/ 54347: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -1147,7 +1121,7 @@ exports.CacheScope = new CacheScope$Type(); /***/ }), -/***/ 86485: +/***/ 14933: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -1190,13 +1164,13 @@ const http_client_1 = __nccwpck_require__(21966); const auth_1 = __nccwpck_require__(19418); const fs = __importStar(__nccwpck_require__(79896)); const url_1 = __nccwpck_require__(87016); -const utils = __importStar(__nccwpck_require__(72197)); -const uploadUtils_1 = __nccwpck_require__(72718); -const downloadUtils_1 = __nccwpck_require__(10209); -const options_1 = __nccwpck_require__(62922); -const requestUtils_1 = __nccwpck_require__(95400); -const config_1 = __nccwpck_require__(61936); -const user_agent_1 = __nccwpck_require__(23681); +const utils = __importStar(__nccwpck_require__(89925)); +const uploadUtils_1 = __nccwpck_require__(5614); +const downloadUtils_1 = __nccwpck_require__(91873); +const options_1 = __nccwpck_require__(44650); +const requestUtils_1 = __nccwpck_require__(48360); +const config_1 = __nccwpck_require__(63440); +const user_agent_1 = __nccwpck_require__(31649); function getCacheApiUrl(resource) { const baseUrl = (0, config_1.getCacheServiceURL)(); if (!baseUrl) { @@ -1409,7 +1383,7 @@ exports.saveCache = saveCache; /***/ }), -/***/ 72197: +/***/ 89925: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -1463,7 +1437,7 @@ const fs = __importStar(__nccwpck_require__(79896)); const path = __importStar(__nccwpck_require__(16928)); const semver = __importStar(__nccwpck_require__(92131)); const util = __importStar(__nccwpck_require__(39023)); -const constants_1 = __nccwpck_require__(26641); +const constants_1 = __nccwpck_require__(86385); const versionSalt = '1.0'; // From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23 function createTempDirectory() { @@ -1631,7 +1605,7 @@ exports.getRuntimeToken = getRuntimeToken; /***/ }), -/***/ 61936: +/***/ 63440: /***/ ((__unused_webpack_module, exports) => { @@ -1674,7 +1648,7 @@ exports.getCacheServiceURL = getCacheServiceURL; /***/ }), -/***/ 26641: +/***/ 86385: /***/ ((__unused_webpack_module, exports) => { @@ -1717,7 +1691,7 @@ exports.CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository /***/ }), -/***/ 10209: +/***/ 91873: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -1757,14 +1731,14 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.downloadCacheStorageSDK = exports.downloadCacheHttpClientConcurrent = exports.downloadCacheHttpClient = exports.DownloadProgress = void 0; const core = __importStar(__nccwpck_require__(16966)); const http_client_1 = __nccwpck_require__(21966); -const storage_blob_1 = __nccwpck_require__(32917); +const storage_blob_1 = __nccwpck_require__(46465); const buffer = __importStar(__nccwpck_require__(20181)); const fs = __importStar(__nccwpck_require__(79896)); const stream = __importStar(__nccwpck_require__(2203)); const util = __importStar(__nccwpck_require__(39023)); -const utils = __importStar(__nccwpck_require__(72197)); -const constants_1 = __nccwpck_require__(26641); -const requestUtils_1 = __nccwpck_require__(95400); +const utils = __importStar(__nccwpck_require__(89925)); +const constants_1 = __nccwpck_require__(86385); +const requestUtils_1 = __nccwpck_require__(48360); const abort_controller_1 = __nccwpck_require__(4334); /** * Pipes the body of a HTTP response to a stream @@ -2101,7 +2075,7 @@ const promiseWithTimeout = (timeoutMs, promise) => __awaiter(void 0, void 0, voi /***/ }), -/***/ 95400: +/***/ 48360: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -2141,7 +2115,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.retryHttpClientResponse = exports.retryTypedResponse = exports.retry = exports.isRetryableStatusCode = exports.isServerErrorStatusCode = exports.isSuccessStatusCode = void 0; const core = __importStar(__nccwpck_require__(16966)); const http_client_1 = __nccwpck_require__(21966); -const constants_1 = __nccwpck_require__(26641); +const constants_1 = __nccwpck_require__(86385); function isSuccessStatusCode(statusCode) { if (!statusCode) { return false; @@ -2244,7 +2218,7 @@ exports.retryHttpClientResponse = retryHttpClientResponse; /***/ }), -/***/ 82513: +/***/ 39601: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -2260,14 +2234,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", ({ value: true })); exports.internalCacheTwirpClient = void 0; const core_1 = __nccwpck_require__(16966); -const user_agent_1 = __nccwpck_require__(23681); -const errors_1 = __nccwpck_require__(16209); -const config_1 = __nccwpck_require__(61936); -const cacheUtils_1 = __nccwpck_require__(72197); +const user_agent_1 = __nccwpck_require__(31649); +const errors_1 = __nccwpck_require__(17457); +const config_1 = __nccwpck_require__(63440); +const cacheUtils_1 = __nccwpck_require__(89925); const auth_1 = __nccwpck_require__(19418); const http_client_1 = __nccwpck_require__(21966); -const cache_twirp_client_1 = __nccwpck_require__(35172); -const util_1 = __nccwpck_require__(5450); +const cache_twirp_client_1 = __nccwpck_require__(79332); +const util_1 = __nccwpck_require__(24106); /** * This class is a wrapper around the CacheServiceClientJSON class generated by Twirp. * @@ -2412,7 +2386,7 @@ exports.internalCacheTwirpClient = internalCacheTwirpClient; /***/ }), -/***/ 16209: +/***/ 17457: /***/ ((__unused_webpack_module, exports) => { @@ -2488,14 +2462,14 @@ UsageError.isUsageErrorMessage = (msg) => { /***/ }), -/***/ 23681: +/***/ 31649: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getUserAgentString = void 0; // eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports -const packageJson = __nccwpck_require__(44917); +const packageJson = __nccwpck_require__(93965); /** * Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package */ @@ -2507,7 +2481,7 @@ exports.getUserAgentString = getUserAgentString; /***/ }), -/***/ 5450: +/***/ 24106: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -2587,7 +2561,7 @@ exports.maskSecretUrls = maskSecretUrls; /***/ }), -/***/ 89135: +/***/ 65679: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -2629,8 +2603,8 @@ const exec_1 = __nccwpck_require__(92851); const io = __importStar(__nccwpck_require__(60378)); const fs_1 = __nccwpck_require__(79896); const path = __importStar(__nccwpck_require__(16928)); -const utils = __importStar(__nccwpck_require__(72197)); -const constants_1 = __nccwpck_require__(26641); +const utils = __importStar(__nccwpck_require__(89925)); +const constants_1 = __nccwpck_require__(86385); const IS_WINDOWS = process.platform === 'win32'; // Returns tar path and type: BSD or GNU function getTarPath() { @@ -2865,7 +2839,7 @@ exports.createTar = createTar; /***/ }), -/***/ 72718: +/***/ 5614: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -2904,8 +2878,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", ({ value: true })); exports.uploadCacheArchiveSDK = exports.UploadProgress = void 0; const core = __importStar(__nccwpck_require__(16966)); -const storage_blob_1 = __nccwpck_require__(32917); -const errors_1 = __nccwpck_require__(16209); +const storage_blob_1 = __nccwpck_require__(46465); +const errors_1 = __nccwpck_require__(17457); /** * Class for tracking the upload state and displaying stats. */ @@ -3038,7 +3012,7 @@ exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK; /***/ }), -/***/ 62922: +/***/ 44650: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -13089,7 +13063,7 @@ var isArray = Array.isArray || function (xs) { /***/ }), -/***/ 57451: +/***/ 50641: /***/ ((module, exports, __nccwpck_require__) => { /* eslint-env browser */ @@ -13349,7 +13323,7 @@ function localstorage() { } } -module.exports = __nccwpck_require__(63350)(exports); +module.exports = __nccwpck_require__(11128)(exports); const {formatters} = module.exports; @@ -13368,7 +13342,7 @@ formatters.j = function (v) { /***/ }), -/***/ 63350: +/***/ 11128: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { @@ -13667,7 +13641,7 @@ module.exports = setup; /***/ }), -/***/ 18263: +/***/ 46369: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /** @@ -13676,15 +13650,15 @@ module.exports = setup; */ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = __nccwpck_require__(57451); + module.exports = __nccwpck_require__(50641); } else { - module.exports = __nccwpck_require__(76423); + module.exports = __nccwpck_require__(24777); } /***/ }), -/***/ 76423: +/***/ 24777: /***/ ((module, exports, __nccwpck_require__) => { /** @@ -13926,7 +13900,7 @@ function init(debug) { } } -module.exports = __nccwpck_require__(63350)(exports); +module.exports = __nccwpck_require__(11128)(exports); const {formatters} = module.exports; @@ -13952,6 +13926,71 @@ formatters.O = function (v) { }; +/***/ }), + +/***/ 35459: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +const {Transform, PassThrough} = __nccwpck_require__(2203); +const zlib = __nccwpck_require__(43106); +const mimicResponse = __nccwpck_require__(73897); + +module.exports = response => { + const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase(); + + if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) { + return response; + } + + // TODO: Remove this when targeting Node.js 12. + const isBrotli = contentEncoding === 'br'; + if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') { + response.destroy(new Error('Brotli is not supported on Node.js < 12')); + return response; + } + + let isEmpty = true; + + const checker = new Transform({ + transform(data, _encoding, callback) { + isEmpty = false; + + callback(null, data); + }, + + flush(callback) { + callback(); + } + }); + + const finalStream = new PassThrough({ + autoDestroy: false, + destroy(error, callback) { + response.destroy(); + + callback(error); + } + }); + + const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip(); + + decompressStream.once('error', error => { + if (isEmpty && !response.readable) { + finalStream.end(); + return; + } + + finalStream.destroy(error); + }); + + mimicResponse(response, finalStream); + response.pipe(checker).pipe(decompressStream).pipe(finalStream); + + return finalStream; +}; + + /***/ }), /***/ 46181: @@ -14992,7 +15031,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.HttpProxyAgent = void 0; const net = __importStar(__nccwpck_require__(69278)); const tls = __importStar(__nccwpck_require__(64756)); -const debug_1 = __importDefault(__nccwpck_require__(18263)); +const debug_1 = __importDefault(__nccwpck_require__(46369)); const events_1 = __nccwpck_require__(24434); const agent_base_1 = __nccwpck_require__(10646); const url_1 = __nccwpck_require__(87016); @@ -17558,7 +17597,7 @@ exports.HttpsProxyAgent = void 0; const net = __importStar(__nccwpck_require__(69278)); const tls = __importStar(__nccwpck_require__(64756)); const assert_1 = __importDefault(__nccwpck_require__(42613)); -const debug_1 = __importDefault(__nccwpck_require__(18263)); +const debug_1 = __importDefault(__nccwpck_require__(46369)); const agent_base_1 = __nccwpck_require__(10646); const url_1 = __nccwpck_require__(87016); const parse_proxy_response_1 = __nccwpck_require__(20625); @@ -17718,7 +17757,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.parseProxyResponse = void 0; -const debug_1 = __importDefault(__nccwpck_require__(18263)); +const debug_1 = __importDefault(__nccwpck_require__(46369)); const debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response'); function parseProxyResponse(socket) { return new Promise((resolve, reject) => { @@ -17814,6 +17853,421 @@ function parseProxyResponse(socket) { exports.parseProxyResponse = parseProxyResponse; //# sourceMappingURL=parse-proxy-response.js.map +/***/ }), + +/***/ 8339: +/***/ ((__unused_webpack_module, exports) => { + +//TODO: handle reviver/dehydrate function like normal +//and handle indentation, like normal. +//if anyone needs this... please send pull request. + +exports.stringify = function stringify (o) { + if('undefined' == typeof o) return o + + if(o && Buffer.isBuffer(o)) + return JSON.stringify(':base64:' + o.toString('base64')) + + if(o && o.toJSON) + o = o.toJSON() + + if(o && 'object' === typeof o) { + var s = '' + var array = Array.isArray(o) + s = array ? '[' : '{' + var first = true + + for(var k in o) { + var ignore = 'function' == typeof o[k] || (!array && 'undefined' === typeof o[k]) + if(Object.hasOwnProperty.call(o, k) && !ignore) { + if(!first) + s += ',' + first = false + if (array) { + if(o[k] == undefined) + s += 'null' + else + s += stringify(o[k]) + } else if (o[k] !== void(0)) { + s += stringify(k) + ':' + stringify(o[k]) + } + } + } + + s += array ? ']' : '}' + + return s + } else if ('string' === typeof o) { + return JSON.stringify(/^:/.test(o) ? ':' + o : o) + } else if ('undefined' === typeof o) { + return 'null'; + } else + return JSON.stringify(o) +} + +exports.parse = function (s) { + return JSON.parse(s, function (key, value) { + if('string' === typeof value) { + if(/^:base64:/.test(value)) + return Buffer.from(value.substring(8), 'base64') + else + return /^:/.test(value) ? value.substring(1) : value + } + return value + }) +} + + +/***/ }), + +/***/ 75277: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const EventEmitter = __nccwpck_require__(24434); +const JSONB = __nccwpck_require__(8339); + +const loadStore = options => { + const adapters = { + redis: '@keyv/redis', + rediss: '@keyv/redis', + mongodb: '@keyv/mongo', + mongo: '@keyv/mongo', + sqlite: '@keyv/sqlite', + postgresql: '@keyv/postgres', + postgres: '@keyv/postgres', + mysql: '@keyv/mysql', + etcd: '@keyv/etcd', + offline: '@keyv/offline', + tiered: '@keyv/tiered', + }; + if (options.adapter || options.uri) { + const adapter = options.adapter || /^[^:+]*/.exec(options.uri)[0]; + return new (__WEBPACK_EXTERNAL_createRequire(import.meta.url)(adapters[adapter]))(options); + } + + return new Map(); +}; + +const iterableAdapters = [ + 'sqlite', + 'postgres', + 'mysql', + 'mongo', + 'redis', + 'tiered', +]; + +class Keyv extends EventEmitter { + constructor(uri, {emitErrors = true, ...options} = {}) { + super(); + this.opts = { + namespace: 'keyv', + serialize: JSONB.stringify, + deserialize: JSONB.parse, + ...((typeof uri === 'string') ? {uri} : uri), + ...options, + }; + + if (!this.opts.store) { + const adapterOptions = {...this.opts}; + this.opts.store = loadStore(adapterOptions); + } + + if (this.opts.compression) { + const compression = this.opts.compression; + this.opts.serialize = compression.serialize.bind(compression); + this.opts.deserialize = compression.deserialize.bind(compression); + } + + if (typeof this.opts.store.on === 'function' && emitErrors) { + this.opts.store.on('error', error => this.emit('error', error)); + } + + this.opts.store.namespace = this.opts.namespace; + + const generateIterator = iterator => async function * () { + for await (const [key, raw] of typeof iterator === 'function' + ? iterator(this.opts.store.namespace) + : iterator) { + const data = await this.opts.deserialize(raw); + if (this.opts.store.namespace && !key.includes(this.opts.store.namespace)) { + continue; + } + + if (typeof data.expires === 'number' && Date.now() > data.expires) { + this.delete(key); + continue; + } + + yield [this._getKeyUnprefix(key), data.value]; + } + }; + + // Attach iterators + if (typeof this.opts.store[Symbol.iterator] === 'function' && this.opts.store instanceof Map) { + this.iterator = generateIterator(this.opts.store); + } else if (typeof this.opts.store.iterator === 'function' && this.opts.store.opts + && this._checkIterableAdaptar()) { + this.iterator = generateIterator(this.opts.store.iterator.bind(this.opts.store)); + } + } + + _checkIterableAdaptar() { + return iterableAdapters.includes(this.opts.store.opts.dialect) + || iterableAdapters.findIndex(element => this.opts.store.opts.url.includes(element)) >= 0; + } + + _getKeyPrefix(key) { + return `${this.opts.namespace}:${key}`; + } + + _getKeyPrefixArray(keys) { + return keys.map(key => `${this.opts.namespace}:${key}`); + } + + _getKeyUnprefix(key) { + return key + .split(':') + .splice(1) + .join(':'); + } + + get(key, options) { + const {store} = this.opts; + const isArray = Array.isArray(key); + const keyPrefixed = isArray ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key); + if (isArray && store.getMany === undefined) { + const promises = []; + for (const key of keyPrefixed) { + promises.push(Promise.resolve() + .then(() => store.get(key)) + .then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data)) + .then(data => { + if (data === undefined || data === null) { + return undefined; + } + + if (typeof data.expires === 'number' && Date.now() > data.expires) { + return this.delete(key).then(() => undefined); + } + + return (options && options.raw) ? data : data.value; + }), + ); + } + + return Promise.allSettled(promises) + .then(values => { + const data = []; + for (const value of values) { + data.push(value.value); + } + + return data; + }); + } + + return Promise.resolve() + .then(() => isArray ? store.getMany(keyPrefixed) : store.get(keyPrefixed)) + .then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data)) + .then(data => { + if (data === undefined || data === null) { + return undefined; + } + + if (isArray) { + return data.map((row, index) => { + if ((typeof row === 'string')) { + row = this.opts.deserialize(row); + } + + if (row === undefined || row === null) { + return undefined; + } + + if (typeof row.expires === 'number' && Date.now() > row.expires) { + this.delete(key[index]).then(() => undefined); + return undefined; + } + + return (options && options.raw) ? row : row.value; + }); + } + + if (typeof data.expires === 'number' && Date.now() > data.expires) { + return this.delete(key).then(() => undefined); + } + + return (options && options.raw) ? data : data.value; + }); + } + + set(key, value, ttl) { + const keyPrefixed = this._getKeyPrefix(key); + if (typeof ttl === 'undefined') { + ttl = this.opts.ttl; + } + + if (ttl === 0) { + ttl = undefined; + } + + const {store} = this.opts; + + return Promise.resolve() + .then(() => { + const expires = (typeof ttl === 'number') ? (Date.now() + ttl) : null; + if (typeof value === 'symbol') { + this.emit('error', 'symbol cannot be serialized'); + } + + value = {value, expires}; + return this.opts.serialize(value); + }) + .then(value => store.set(keyPrefixed, value, ttl)) + .then(() => true); + } + + delete(key) { + const {store} = this.opts; + if (Array.isArray(key)) { + const keyPrefixed = this._getKeyPrefixArray(key); + if (store.deleteMany === undefined) { + const promises = []; + for (const key of keyPrefixed) { + promises.push(store.delete(key)); + } + + return Promise.allSettled(promises) + .then(values => values.every(x => x.value === true)); + } + + return Promise.resolve() + .then(() => store.deleteMany(keyPrefixed)); + } + + const keyPrefixed = this._getKeyPrefix(key); + return Promise.resolve() + .then(() => store.delete(keyPrefixed)); + } + + clear() { + const {store} = this.opts; + return Promise.resolve() + .then(() => store.clear()); + } + + has(key) { + const keyPrefixed = this._getKeyPrefix(key); + const {store} = this.opts; + return Promise.resolve() + .then(async () => { + if (typeof store.has === 'function') { + return store.has(keyPrefixed); + } + + const value = await store.get(keyPrefixed); + return value !== undefined; + }); + } + + disconnect() { + const {store} = this.opts; + if (typeof store.disconnect === 'function') { + return store.disconnect(); + } + } +} + +module.exports = Keyv; + + +/***/ }), + +/***/ 73897: +/***/ ((module) => { + + + +// We define these manually to ensure they're always copied +// even if they would move up the prototype chain +// https://nodejs.org/api/http.html#http_class_http_incomingmessage +const knownProperties = [ + 'aborted', + 'complete', + 'headers', + 'httpVersion', + 'httpVersionMinor', + 'httpVersionMajor', + 'method', + 'rawHeaders', + 'rawTrailers', + 'setTimeout', + 'socket', + 'statusCode', + 'statusMessage', + 'trailers', + 'url' +]; + +module.exports = (fromStream, toStream) => { + if (toStream._readableState.autoDestroy) { + throw new Error('The second stream must have the `autoDestroy` option set to `false`'); + } + + const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties)); + + const properties = {}; + + for (const property of fromProperties) { + // Don't overwrite existing properties. + if (property in toStream) { + continue; + } + + properties[property] = { + get() { + const value = fromStream[property]; + const isFunction = typeof value === 'function'; + + return isFunction ? value.bind(fromStream) : value; + }, + set(value) { + fromStream[property] = value; + }, + enumerable: true, + configurable: false + }; + } + + Object.defineProperties(toStream, properties); + + fromStream.once('aborted', () => { + toStream.destroy(); + + toStream.emit('aborted'); + }); + + fromStream.once('close', () => { + if (fromStream.complete) { + if (toStream.readable) { + toStream.once('end', () => { + toStream.emit('close'); + }); + } else { + toStream.emit('close'); + } + } else { + toStream.emit('close'); + } + }); + + return toStream; +}; + + /***/ }), /***/ 26039: @@ -44068,7 +44522,7 @@ Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function /***/ }), -/***/ 34630: +/***/ 29007: /***/ ((__unused_webpack_module, exports) => { @@ -44081,7 +44535,6 @@ exports.AzureKeyCredential = void 0; * the underlying key value. */ class AzureKeyCredential { - _key; /** * The value of the key to be used in authentication */ @@ -44117,7 +44570,7 @@ exports.AzureKeyCredential = AzureKeyCredential; /***/ }), -/***/ 77887: +/***/ 12508: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44126,14 +44579,12 @@ exports.AzureKeyCredential = AzureKeyCredential; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AzureNamedKeyCredential = void 0; exports.isNamedKeyCredential = isNamedKeyCredential; -const core_util_1 = __nccwpck_require__(33000); +const core_util_1 = __nccwpck_require__(83519); /** * A static name/key-based credential that supports updating * the underlying name and key values. */ class AzureNamedKeyCredential { - _key; - _name; /** * The value of the key to be used in authentication. */ @@ -44192,7 +44643,7 @@ function isNamedKeyCredential(credential) { /***/ }), -/***/ 85648: +/***/ 1581: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44201,13 +44652,12 @@ function isNamedKeyCredential(credential) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AzureSASCredential = void 0; exports.isSASCredential = isSASCredential; -const core_util_1 = __nccwpck_require__(33000); +const core_util_1 = __nccwpck_require__(83519); /** * A static-signature-based credential that supports updating * the underlying signature value. */ class AzureSASCredential { - _signature; /** * The value of the shared access signature to be used in authentication */ @@ -44254,29 +44704,29 @@ function isSASCredential(credential) { /***/ }), -/***/ 38401: +/***/ 43246: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isTokenCredential = exports.isSASCredential = exports.AzureSASCredential = exports.isNamedKeyCredential = exports.AzureNamedKeyCredential = exports.isKeyCredential = exports.AzureKeyCredential = void 0; -var azureKeyCredential_js_1 = __nccwpck_require__(34630); +var azureKeyCredential_js_1 = __nccwpck_require__(29007); Object.defineProperty(exports, "AzureKeyCredential", ({ enumerable: true, get: function () { return azureKeyCredential_js_1.AzureKeyCredential; } })); -var keyCredential_js_1 = __nccwpck_require__(55075); +var keyCredential_js_1 = __nccwpck_require__(56640); Object.defineProperty(exports, "isKeyCredential", ({ enumerable: true, get: function () { return keyCredential_js_1.isKeyCredential; } })); -var azureNamedKeyCredential_js_1 = __nccwpck_require__(77887); +var azureNamedKeyCredential_js_1 = __nccwpck_require__(12508); Object.defineProperty(exports, "AzureNamedKeyCredential", ({ enumerable: true, get: function () { return azureNamedKeyCredential_js_1.AzureNamedKeyCredential; } })); Object.defineProperty(exports, "isNamedKeyCredential", ({ enumerable: true, get: function () { return azureNamedKeyCredential_js_1.isNamedKeyCredential; } })); -var azureSASCredential_js_1 = __nccwpck_require__(85648); +var azureSASCredential_js_1 = __nccwpck_require__(1581); Object.defineProperty(exports, "AzureSASCredential", ({ enumerable: true, get: function () { return azureSASCredential_js_1.AzureSASCredential; } })); Object.defineProperty(exports, "isSASCredential", ({ enumerable: true, get: function () { return azureSASCredential_js_1.isSASCredential; } })); -var tokenCredential_js_1 = __nccwpck_require__(3313); +var tokenCredential_js_1 = __nccwpck_require__(70054); Object.defineProperty(exports, "isTokenCredential", ({ enumerable: true, get: function () { return tokenCredential_js_1.isTokenCredential; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 55075: +/***/ 56640: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44284,7 +44734,7 @@ Object.defineProperty(exports, "isTokenCredential", ({ enumerable: true, get: fu // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isKeyCredential = isKeyCredential; -const core_util_1 = __nccwpck_require__(33000); +const core_util_1 = __nccwpck_require__(83519); /** * Tests an object to determine whether it implements KeyCredential. * @@ -44297,7 +44747,7 @@ function isKeyCredential(credential) { /***/ }), -/***/ 3313: +/***/ 70054: /***/ ((__unused_webpack_module, exports) => { @@ -44343,7 +44793,7 @@ function isTokenCredential(credential) { /***/ }), -/***/ 32975: +/***/ 23558: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44352,8 +44802,8 @@ function isTokenCredential(credential) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.parseCAEChallenge = parseCAEChallenge; exports.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; -const log_js_1 = __nccwpck_require__(45469); -const base64_js_1 = __nccwpck_require__(65652); +const log_js_1 = __nccwpck_require__(82974); +const base64_js_1 = __nccwpck_require__(6785); /** * Converts: `Bearer a="b", c="d", Bearer d="e", f="g"`. * Into: `[ { a: 'b', c: 'd' }, { d: 'e', f: 'g' } ]`. @@ -44366,7 +44816,7 @@ function parseCAEChallenge(challenges) { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); // Key-value pairs to plain object: - return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); + return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {}); }); } /** @@ -44399,6 +44849,7 @@ function parseCAEChallenge(challenges) { * ``` */ 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"); @@ -44418,14 +44869,14 @@ async function authorizeRequestOnClaimChallenge(onChallengeOptions) { if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); return true; } //# sourceMappingURL=authorizeRequestOnClaimChallenge.js.map /***/ }), -/***/ 37993: +/***/ 21218: /***/ ((__unused_webpack_module, exports) => { @@ -44457,6 +44908,7 @@ function isUuid(text) { * Handling has specific features for storage that departs to the general AAD challenge docs. **/ const authorizeRequestOnTenantChallenge = async (challengeOptions) => { + var _a; const requestOptions = requestToOptions(challengeOptions.request); const challenge = getChallenge(challengeOptions.response); if (challenge) { @@ -44466,14 +44918,11 @@ const authorizeRequestOnTenantChallenge = async (challengeOptions) => { if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, { - ...requestOptions, - tenantId, - }); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); return true; } return false; @@ -44533,7 +44982,7 @@ function parseChallenge(challenge) { const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); // Key-value pairs to plain object: - return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); + return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {}); } /** * Extracts the options form a Pipeline Request for later re-use @@ -44551,7 +45000,7 @@ function requestToOptions(request) { /***/ }), -/***/ 65652: +/***/ 6785: /***/ ((__unused_webpack_module, exports) => { @@ -44599,7 +45048,7 @@ function decodeStringToString(value) { /***/ }), -/***/ 68548: +/***/ 47987: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44608,10 +45057,10 @@ function decodeStringToString(value) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.deserializationPolicyName = void 0; exports.deserializationPolicy = deserializationPolicy; -const interfaces_js_1 = __nccwpck_require__(43791); -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const serializer_js_1 = __nccwpck_require__(43315); -const operationHelpers_js_1 = __nccwpck_require__(56225); +const interfaces_js_1 = __nccwpck_require__(86326); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const serializer_js_1 = __nccwpck_require__(49542); +const operationHelpers_js_1 = __nccwpck_require__(87708); const defaultJsonContentTypes = ["application/json", "text/json"]; const defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; /** @@ -44622,15 +45071,16 @@ exports.deserializationPolicyName = "deserializationPolicy"; * This policy handles parsing out responses according to OperationSpecs on the request. */ function deserializationPolicy(options = {}) { - const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; - const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; + var _a, _b, _c, _d, _e, _f, _g; + const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; + const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: serializerOptions?.xml.rootName ?? "", - includeRoot: serializerOptions?.xml.includeRoot ?? false, - xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + 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 { @@ -44645,13 +45095,13 @@ function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo?.operationSpec; + const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; if (operationSpec) { - if (!operationInfo?.operationResponseGetter) { + if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -44659,7 +45109,7 @@ function getOperationResponseMap(parsedResponse) { function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo?.shouldDeserialize; + const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; let result; if (shouldDeserialize === undefined) { result = true; @@ -44678,7 +45128,7 @@ async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, respon return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo?.operationSpec; + const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -44729,6 +45179,7 @@ function isOperationSpecEmpty(operationSpec) { (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default")); } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { + var _a, _b, _c, _d, _e; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus @@ -44743,8 +45194,8 @@ function handleErrorResponse(parsedResponse, operationSpec, responseSpec, option return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec ?? operationSpec.responses.default; - const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) + 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 error = new core_rest_pipeline_1.RestError(initialErrorMessage, { @@ -44756,11 +45207,11 @@ function handleErrorResponse(parsedResponse, operationSpec, responseSpec, option // and the parsed body doesn't look like an error object, // we should fail so we just throw the parsed response if (!errorResponseSpec && - !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { + !(((_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 error; } - const defaultBodyMapper = errorResponseSpec?.bodyMapper; - const defaultHeadersMapper = errorResponseSpec?.headersMapper; + const defaultBodyMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.bodyMapper; + const defaultHeadersMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.headersMapper; try { // If error response has a body, try to deserialize it using default body mapper. // Then try to extract error code & message from it @@ -44799,7 +45250,8 @@ function handleErrorResponse(parsedResponse, operationSpec, responseSpec, option return { error, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && + 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") || ""; @@ -44839,7 +45291,7 @@ async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, /***/ }), -/***/ 39664: +/***/ 39431: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44847,7 +45299,7 @@ async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient; -const core_rest_pipeline_1 = __nccwpck_require__(81591); +const core_rest_pipeline_1 = __nccwpck_require__(95397); let cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -44859,7 +45311,7 @@ function getCachedDefaultHttpClient() { /***/ }), -/***/ 99307: +/***/ 66212: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44867,31 +45319,31 @@ function getCachedDefaultHttpClient() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.authorizeRequestOnTenantChallenge = exports.authorizeRequestOnClaimChallenge = exports.serializationPolicyName = exports.serializationPolicy = exports.deserializationPolicyName = exports.deserializationPolicy = exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.createClientPipeline = exports.ServiceClient = exports.MapperTypeNames = exports.createSerializer = void 0; -var serializer_js_1 = __nccwpck_require__(43315); +var serializer_js_1 = __nccwpck_require__(49542); Object.defineProperty(exports, "createSerializer", ({ enumerable: true, get: function () { return serializer_js_1.createSerializer; } })); Object.defineProperty(exports, "MapperTypeNames", ({ enumerable: true, get: function () { return serializer_js_1.MapperTypeNames; } })); -var serviceClient_js_1 = __nccwpck_require__(19299); +var serviceClient_js_1 = __nccwpck_require__(14044); Object.defineProperty(exports, "ServiceClient", ({ enumerable: true, get: function () { return serviceClient_js_1.ServiceClient; } })); -var pipeline_js_1 = __nccwpck_require__(18913); +var pipeline_js_1 = __nccwpck_require__(14460); Object.defineProperty(exports, "createClientPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createClientPipeline; } })); -var interfaces_js_1 = __nccwpck_require__(43791); +var interfaces_js_1 = __nccwpck_require__(86326); Object.defineProperty(exports, "XML_ATTRKEY", ({ enumerable: true, get: function () { return interfaces_js_1.XML_ATTRKEY; } })); Object.defineProperty(exports, "XML_CHARKEY", ({ enumerable: true, get: function () { return interfaces_js_1.XML_CHARKEY; } })); -var deserializationPolicy_js_1 = __nccwpck_require__(68548); +var deserializationPolicy_js_1 = __nccwpck_require__(47987); Object.defineProperty(exports, "deserializationPolicy", ({ enumerable: true, get: function () { return deserializationPolicy_js_1.deserializationPolicy; } })); Object.defineProperty(exports, "deserializationPolicyName", ({ enumerable: true, get: function () { return deserializationPolicy_js_1.deserializationPolicyName; } })); -var serializationPolicy_js_1 = __nccwpck_require__(22153); +var serializationPolicy_js_1 = __nccwpck_require__(35582); Object.defineProperty(exports, "serializationPolicy", ({ enumerable: true, get: function () { return serializationPolicy_js_1.serializationPolicy; } })); Object.defineProperty(exports, "serializationPolicyName", ({ enumerable: true, get: function () { return serializationPolicy_js_1.serializationPolicyName; } })); -var authorizeRequestOnClaimChallenge_js_1 = __nccwpck_require__(32975); +var authorizeRequestOnClaimChallenge_js_1 = __nccwpck_require__(23558); Object.defineProperty(exports, "authorizeRequestOnClaimChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnClaimChallenge_js_1.authorizeRequestOnClaimChallenge; } })); -var authorizeRequestOnTenantChallenge_js_1 = __nccwpck_require__(37993); +var authorizeRequestOnTenantChallenge_js_1 = __nccwpck_require__(21218); Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnTenantChallenge_js_1.authorizeRequestOnTenantChallenge; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 68299: +/***/ 65670: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44900,7 +45352,7 @@ Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", ({ enumerabl Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; exports.getPathStringFromParameter = getPathStringFromParameter; -const serializer_js_1 = __nccwpck_require__(43315); +const serializer_js_1 = __nccwpck_require__(49542); /** * Gets the list of status codes for streaming responses. * @internal @@ -44940,7 +45392,7 @@ function getPathStringFromParameter(parameter) { /***/ }), -/***/ 43791: +/***/ 86326: /***/ ((__unused_webpack_module, exports) => { @@ -44960,7 +45412,7 @@ exports.XML_CHARKEY = "_"; /***/ }), -/***/ 45469: +/***/ 82974: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44974,7 +45426,7 @@ exports.logger = (0, logger_1.createClientLogger)("core-client"); /***/ }), -/***/ 56225: +/***/ 87708: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44983,7 +45435,7 @@ exports.logger = (0, logger_1.createClientLogger)("core-client"); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; exports.getOperationRequestInfo = getOperationRequestInfo; -const state_js_1 = __nccwpck_require__(29582); +const state_js_1 = __nccwpck_require__(18837); /** * @internal * Retrieves the value to use for a given operation argument @@ -45078,7 +45530,7 @@ function getOperationRequestInfo(request) { /***/ }), -/***/ 18913: +/***/ 14460: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45086,9 +45538,9 @@ function getOperationRequestInfo(request) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createClientPipeline = createClientPipeline; -const deserializationPolicy_js_1 = __nccwpck_require__(68548); -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const serializationPolicy_js_1 = __nccwpck_require__(22153); +const deserializationPolicy_js_1 = __nccwpck_require__(47987); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const serializationPolicy_js_1 = __nccwpck_require__(35582); /** * Creates a new Pipeline for use with a Service Client. * Adds in deserializationPolicy by default. @@ -45096,7 +45548,7 @@ const serializationPolicy_js_1 = __nccwpck_require__(22153); * @param options - Options to customize the created pipeline. */ function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -45113,7 +45565,7 @@ function createClientPipeline(options = {}) { /***/ }), -/***/ 22153: +/***/ 35582: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45124,10 +45576,10 @@ exports.serializationPolicyName = void 0; exports.serializationPolicy = serializationPolicy; exports.serializeHeaders = serializeHeaders; exports.serializeRequestBody = serializeRequestBody; -const interfaces_js_1 = __nccwpck_require__(43791); -const operationHelpers_js_1 = __nccwpck_require__(56225); -const serializer_js_1 = __nccwpck_require__(43315); -const interfaceHelpers_js_1 = __nccwpck_require__(68299); +const interfaces_js_1 = __nccwpck_require__(86326); +const operationHelpers_js_1 = __nccwpck_require__(87708); +const serializer_js_1 = __nccwpck_require__(49542); +const interfaceHelpers_js_1 = __nccwpck_require__(65670); /** * The programmatic identifier of the serializationPolicy. */ @@ -45142,8 +45594,8 @@ function serializationPolicy(options = {}) { name: exports.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo?.operationSpec; - const operationArguments = operationInfo?.operationArguments; + 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); @@ -45156,6 +45608,7 @@ function serializationPolicy(options = {}) { * @internal */ 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); @@ -45174,7 +45627,7 @@ function serializeHeaders(request, operationArguments, operationSpec) { } } } - const customHeaders = operationArguments.options?.requestOptions?.customHeaders; + 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]); @@ -45187,12 +45640,13 @@ function serializeHeaders(request, operationArguments, operationSpec) { function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function () { throw new Error("XML serialization unsupported!"); }) { - const serializerOptions = operationArguments.options?.serializerOptions; + var _a, _b, _c, _d, _e; + const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; const updatedOptions = { xml: { - rootName: serializerOptions?.xml.rootName ?? "", - includeRoot: serializerOptions?.xml.includeRoot ?? false, - xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + 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; @@ -45222,7 +45676,7 @@ function serializeRequestBody(request, operationArguments, operationSpec, string } } else if (typeName === serializer_js_1.MapperTypeNames.String && - (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { + (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { // the String serializer has validated that request body is a string // so just send the string. return; @@ -45276,7 +45730,7 @@ function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { /***/ }), -/***/ 43315: +/***/ 49542: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45286,12 +45740,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MapperTypeNames = void 0; exports.createSerializer = createSerializer; const tslib_1 = __nccwpck_require__(67892); -const base64 = tslib_1.__importStar(__nccwpck_require__(65652)); -const interfaces_js_1 = __nccwpck_require__(43791); -const utils_js_1 = __nccwpck_require__(76758); +const base64 = tslib_1.__importStar(__nccwpck_require__(6785)); +const interfaces_js_1 = __nccwpck_require__(86326); +const utils_js_1 = __nccwpck_require__(8493); class SerializerImpl { - modelMappers; - isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -45358,11 +45810,12 @@ class SerializerImpl { * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { + var _a, _b, _c; const updatedOptions = { xml: { - rootName: options.xml.rootName ?? "", - includeRoot: options.xml.includeRoot ?? false, - xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", + includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY, }, }; let payload = {}; @@ -45444,13 +45897,14 @@ class SerializerImpl { * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { + var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: options.xml.rootName ?? "", - includeRoot: options.xml.includeRoot ?? false, - xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", + includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY, }, - ignoreUnknownProperties: options.ignoreUnknownProperties ?? false, + ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false, }; if (responseBody === undefined || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -45716,6 +46170,7 @@ function serializeDateTypes(typeName, value, objectName) { return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { + var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -45728,7 +46183,7 @@ function serializeSequenceType(serializer, mapper, object, objectName, isXml, op // not have *all* properties declared (like uberParent), // so let's try to look up the full definition by name. if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = serializer.modelMappers[elementType.type.className] ?? elementType; + elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -45738,7 +46193,7 @@ function serializeSequenceType(serializer, mapper, object, objectName, isXml, op ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = { ...serializedValue }; + tempArray[i] = Object.assign({}, serializedValue); tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { @@ -45787,7 +46242,7 @@ function resolveAdditionalProperties(serializer, mapper, objectName) { const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper?.type.additionalProperties; + return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; } return additionalProperties; } @@ -45816,7 +46271,7 @@ function resolveModelProperties(serializer, mapper, objectName) { if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper?.type.modelProperties; + 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}".`); @@ -45864,10 +46319,7 @@ function serializeCompositeType(serializer, mapper, object, objectName, isXml, o const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = { - ...parentObject[interfaces_js_1.XML_ATTRKEY], - [xmlnsKey]: mapper.xmlNamespace, - }; + 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 @@ -45925,7 +46377,7 @@ function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { return serializedValue; } else { - const result = { ...serializedValue }; + const result = Object.assign({}, serializedValue); result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result; } @@ -45939,7 +46391,8 @@ function isSpecialXmlProperty(propertyName, options) { return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; + var _a, _b; + const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -45998,7 +46451,7 @@ function deserializeCompositeType(serializer, mapper, responseBody, objectName, xmlName is "Cors" and xmlElementName is"CorsRule". */ const wrapped = responseBody[xmlName]; - const elementList = wrapped?.[xmlElementName] ?? []; + const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } @@ -46106,6 +46559,7 @@ function deserializeDictionaryType(serializer, mapper, responseBody, objectName, return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { + var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the ` + @@ -46120,7 +46574,7 @@ function deserializeSequenceType(serializer, mapper, responseBody, objectName, o // not have *all* properties declared (like uberParent), // so let's try to look up the full definition by name. if (element.type.name === "Composite" && element.type.className) { - element = serializer.modelMappers[element.type.className] ?? element; + element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -46153,6 +46607,7 @@ function getIndexDiscriminator(discriminators, discriminatorValue, typeName) { return undefined; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { + var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -46162,7 +46617,7 @@ function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyNam discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = mapper.type.uberParent ?? mapper.type.className; + 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) { @@ -46208,7 +46663,7 @@ exports.MapperTypeNames = { /***/ }), -/***/ 19299: +/***/ 14044: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -46216,54 +46671,33 @@ exports.MapperTypeNames = { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ServiceClient = void 0; -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const pipeline_js_1 = __nccwpck_require__(18913); -const utils_js_1 = __nccwpck_require__(76758); -const httpClientCache_js_1 = __nccwpck_require__(39664); -const operationHelpers_js_1 = __nccwpck_require__(56225); -const urlHelpers_js_1 = __nccwpck_require__(56353); -const interfaceHelpers_js_1 = __nccwpck_require__(68299); -const log_js_1 = __nccwpck_require__(45469); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const pipeline_js_1 = __nccwpck_require__(14460); +const utils_js_1 = __nccwpck_require__(8493); +const httpClientCache_js_1 = __nccwpck_require__(39431); +const operationHelpers_js_1 = __nccwpck_require__(87708); +const urlHelpers_js_1 = __nccwpck_require__(96500); +const interfaceHelpers_js_1 = __nccwpck_require__(65670); +const log_js_1 = __nccwpck_require__(82974); /** * Initializes a new instance of the ServiceClient. */ class ServiceClient { - /** - * If specified, this is the base URI that requests will be made against for this ServiceClient. - * If it is not specified, then all OperationSpecs must contain a baseUrl property. - */ - _endpoint; - /** - * The default request content type for the service. - * Used if no requestContentType is present on an OperationSpec. - */ - _requestContentType; - /** - * Set to true if the request is sent over HTTP instead of HTTPS - */ - _allowInsecureConnection; - /** - * The HTTP client that will be used to send requests. - */ - _httpClient; - /** - * The pipeline used by this client to make requests - */ - pipeline; /** * The ServiceClient constructor * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { + var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = options.endpoint ?? options.baseUri; + this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if (options.additionalPolicies?.length) { + if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { for (const { policy, position } of options.additionalPolicies) { // Sign happens after Retry and is commonly needed to occur // before policies that intercept post-retry. @@ -46342,17 +46776,17 @@ class ServiceClient { try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options?.onResponse) { + if (options === null || options === void 0 ? void 0 : options.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error) { - if (typeof error === "object" && error?.response) { + if (typeof error === "object" && (error === null || error === void 0 ? void 0 : error.response)) { const rawResponse = error.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error.statusCode] || operationSpec.responses["default"]); error.details = flatResponse; - if (options?.onResponse) { + if (options === null || options === void 0 ? void 0 : options.onResponse) { options.onResponse(rawResponse, flatResponse, error); } } @@ -46366,10 +46800,7 @@ function createDefaultPipeline(options) { const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : undefined; - return (0, pipeline_js_1.createClientPipeline)({ - ...options, - credentialOptions, - }); + return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -46390,7 +46821,7 @@ function getCredentialScopes(options) { /***/ }), -/***/ 29582: +/***/ 18837: /***/ ((__unused_webpack_module, exports) => { @@ -46408,7 +46839,7 @@ exports.state = { /***/ }), -/***/ 56353: +/***/ 96500: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -46417,8 +46848,8 @@ exports.state = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRequestUrl = getRequestUrl; exports.appendQueryParams = appendQueryParams; -const operationHelpers_js_1 = __nccwpck_require__(56225); -const interfaceHelpers_js_1 = __nccwpck_require__(68299); +const operationHelpers_js_1 = __nccwpck_require__(87708); +const interfaceHelpers_js_1 = __nccwpck_require__(65670); const CollectionFormatToDelimiterMap = { CSV: ",", SSV: " ", @@ -46467,8 +46898,9 @@ function replaceAll(input, replacements) { return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { + var _a; const result = new Map(); - if (operationSpec.urlParameters?.length) { + 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); @@ -46512,9 +46944,10 @@ function appendPath(url, pathToAppend) { return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { + var _a; const result = new Map(); const sequenceParams = new Set(); - if (operationSpec.queryParameters?.length) { + 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); @@ -46651,7 +47084,7 @@ function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false /***/ }), -/***/ 76758: +/***/ 8493: /***/ ((__unused_webpack_module, exports) => { @@ -46674,7 +47107,7 @@ function isPrimitiveBody(value, mapperTypeName) { (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || - mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== + (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === undefined || value === null)); @@ -46711,21 +47144,14 @@ function isValidUuid(uuid) { * @internal */ function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = { - ...responseObject.headers, - ...responseObject.body, - }; + 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 - ? { - ...responseObject.headers, - body: responseObject.body, - } - : combinedHeadersAndBody; + ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; } } /** @@ -46737,35 +47163,29 @@ function handleNullableResponseAndWrappableBody(responseObject) { * @internal */ function flattenResponse(fullResponse, responseSpec) { + var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; // head methods never have a body, but we return a boolean set to body property // to indicate presence/absence of the resource if (fullResponse.request.method === "HEAD") { - return { - ...parsedHeaders, - body: fullResponse.parsedBody, - }; + return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper?.nullable); - const expectedBodyTypeName = bodyMapper?.type.name; + 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 the body is asked for, we look at the expected body type to handle it */ if (expectedBodyTypeName === "Stream") { - return { - ...parsedHeaders, - blobBody: fullResponse.blobBody, - readableStreamBody: fullResponse.readableStreamBody, - }; + 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 = fullResponse.parsedBody ?? []; + const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = fullResponse.parsedBody?.[key]; + arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; } } if (parsedHeaders) { @@ -46791,7 +47211,7 @@ function flattenResponse(fullResponse, responseSpec) { /***/ }), -/***/ 91364: +/***/ 61839: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -46799,21 +47219,22 @@ function flattenResponse(fullResponse, responseSpec) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ExtendedServiceClient = void 0; -const disableKeepAlivePolicy_js_1 = __nccwpck_require__(49855); -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const core_client_1 = __nccwpck_require__(99307); -const response_js_1 = __nccwpck_require__(52809); +const disableKeepAlivePolicy_js_1 = __nccwpck_require__(53414); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const core_client_1 = __nccwpck_require__(66212); +const response_js_1 = __nccwpck_require__(7662); /** * Client to provide compatability between core V1 & V2. */ class ExtendedServiceClient extends core_client_1.ServiceClient { constructor(options) { + var _a, _b; super(options); - if (options.keepAliveOptions?.enable === false && + if (((_a = options.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 (options.redirectOptions?.handleRedirects === false) { + if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName, }); @@ -46827,7 +47248,8 @@ class ExtendedServiceClient extends core_client_1.ServiceClient { * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - const userProvidedCallBack = operationArguments?.options?.onResponse; + 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, error) { lastResponse = rawResponse; @@ -46835,10 +47257,7 @@ class ExtendedServiceClient extends core_client_1.ServiceClient { userProvidedCallBack(rawResponse, flatResponse, error); } } - operationArguments.options = { - ...operationArguments.options, - onResponse, - }; + operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -46853,7 +47272,7 @@ exports.ExtendedServiceClient = ExtendedServiceClient; /***/ }), -/***/ 52510: +/***/ 25183: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -46861,8 +47280,8 @@ exports.ExtendedServiceClient = ExtendedServiceClient; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.convertHttpClient = convertHttpClient; -const response_js_1 = __nccwpck_require__(52809); -const util_js_1 = __nccwpck_require__(93722); +const response_js_1 = __nccwpck_require__(7662); +const util_js_1 = __nccwpck_require__(30849); /** * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient. * @param requestPolicyClient - A HttpClient compatible with core-http @@ -46880,7 +47299,7 @@ function convertHttpClient(requestPolicyClient) { /***/ }), -/***/ 80976: +/***/ 10585: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -46893,23 +47312,23 @@ exports.toHttpHeadersLike = exports.convertHttpClient = exports.disableKeepAlive * * @packageDocumentation */ -var extendedClient_js_1 = __nccwpck_require__(91364); +var extendedClient_js_1 = __nccwpck_require__(61839); Object.defineProperty(exports, "ExtendedServiceClient", ({ enumerable: true, get: function () { return extendedClient_js_1.ExtendedServiceClient; } })); -var requestPolicyFactoryPolicy_js_1 = __nccwpck_require__(96522); +var requestPolicyFactoryPolicy_js_1 = __nccwpck_require__(12795); Object.defineProperty(exports, "requestPolicyFactoryPolicyName", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.requestPolicyFactoryPolicyName; } })); Object.defineProperty(exports, "createRequestPolicyFactoryPolicy", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.createRequestPolicyFactoryPolicy; } })); Object.defineProperty(exports, "HttpPipelineLogLevel", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.HttpPipelineLogLevel; } })); -var disableKeepAlivePolicy_js_1 = __nccwpck_require__(49855); +var disableKeepAlivePolicy_js_1 = __nccwpck_require__(53414); Object.defineProperty(exports, "disableKeepAlivePolicyName", ({ enumerable: true, get: function () { return disableKeepAlivePolicy_js_1.disableKeepAlivePolicyName; } })); -var httpClientAdapter_js_1 = __nccwpck_require__(52510); +var httpClientAdapter_js_1 = __nccwpck_require__(25183); Object.defineProperty(exports, "convertHttpClient", ({ enumerable: true, get: function () { return httpClientAdapter_js_1.convertHttpClient; } })); -var util_js_1 = __nccwpck_require__(93722); +var util_js_1 = __nccwpck_require__(30849); Object.defineProperty(exports, "toHttpHeadersLike", ({ enumerable: true, get: function () { return util_js_1.toHttpHeadersLike; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 49855: +/***/ 53414: /***/ ((__unused_webpack_module, exports) => { @@ -46939,7 +47358,7 @@ function pipelineContainsDisableKeepAlivePolicy(pipeline) { /***/ }), -/***/ 96522: +/***/ 12795: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -46948,8 +47367,8 @@ function pipelineContainsDisableKeepAlivePolicy(pipeline) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.requestPolicyFactoryPolicyName = exports.HttpPipelineLogLevel = void 0; exports.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; -const util_js_1 = __nccwpck_require__(93722); -const response_js_1 = __nccwpck_require__(52809); +const util_js_1 = __nccwpck_require__(30849); +const response_js_1 = __nccwpck_require__(7662); /** * An enum for compatibility with RequestPolicy */ @@ -47000,7 +47419,7 @@ function createRequestPolicyFactoryPolicy(factories) { /***/ }), -/***/ 52809: +/***/ 7662: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -47009,8 +47428,8 @@ function createRequestPolicyFactoryPolicy(factories) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toCompatResponse = toCompatResponse; exports.toPipelineResponse = toPipelineResponse; -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const util_js_1 = __nccwpck_require__(93722); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const util_js_1 = __nccwpck_require__(30849); const originalResponse = Symbol("Original FullOperationResponse"); /** * A helper to convert response objects from the new pipeline back to the old one. @@ -47020,7 +47439,7 @@ const originalResponse = Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options?.createProxy) { + if (options === null || options === void 0 ? void 0 : options.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -47046,11 +47465,8 @@ function toCompatResponse(response, options) { }); } else { - return { - ...response, - request, - headers, - }; + return Object.assign(Object.assign({}, response), { request, + headers }); } } /** @@ -47066,18 +47482,14 @@ function toPipelineResponse(compatResponse) { return response; } else { - return { - ...compatResponse, - headers, - request: (0, util_js_1.toPipelineRequest)(compatResponse.request), - }; + return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); } } //# sourceMappingURL=response.js.map /***/ }), -/***/ 93722: +/***/ 30849: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -47088,7 +47500,7 @@ exports.HttpHeaders = void 0; exports.toPipelineRequest = toPipelineRequest; exports.toWebResourceLike = toWebResourceLike; exports.toHttpHeadersLike = toHttpHeadersLike; -const core_rest_pipeline_1 = __nccwpck_require__(81591); +const core_rest_pipeline_1 = __nccwpck_require__(95397); // We use a custom symbol to cache a reference to the original request without // exposing it on the public interface. const originalRequestSymbol = Symbol("Original PipelineRequest"); @@ -47132,7 +47544,8 @@ function toPipelineRequest(webResource, options = {}) { } } function toWebResourceLike(request, options) { - const originalRequest = options?.originalRequest ?? request; + var _a; + const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; const webResource = { url: request.url, method: request.method, @@ -47160,7 +47573,7 @@ function toWebResourceLike(request, options) { /** do nothing */ }, }; - if (options?.createProxy) { + if (options === null || options === void 0 ? void 0 : options.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -47226,7 +47639,6 @@ function getHeaderKey(headerName) { * A collection of HTTP header key/value pairs. */ class HttpHeaders { - _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -48530,7 +48942,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.buildCreatePoller = void 0; const operation_js_1 = __nccwpck_require__(60459); const constants_js_1 = __nccwpck_require__(8831); -const core_util_1 = __nccwpck_require__(33000); +const core_util_1 = __nccwpck_require__(83519); const createStateProxy = () => ({ /** * The state at this point is created to be of type OperationState. @@ -48700,7 +49112,7 @@ exports.buildCreatePoller = buildCreatePoller; /***/ }), -/***/ 4154: +/***/ 93948: /***/ ((__unused_webpack_module, exports) => { @@ -48708,13 +49120,13 @@ exports.buildCreatePoller = buildCreatePoller; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; -exports.SDK_VERSION = "1.22.2"; +exports.SDK_VERSION = "1.22.0"; exports.DEFAULT_RETRY_POLICY_COUNT = 3; //# sourceMappingURL=constants.js.map /***/ }), -/***/ 45179: +/***/ 8589: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -48722,26 +49134,27 @@ exports.DEFAULT_RETRY_POLICY_COUNT = 3; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createPipelineFromOptions = createPipelineFromOptions; -const logPolicy_js_1 = __nccwpck_require__(37454); -const pipeline_js_1 = __nccwpck_require__(23357); -const redirectPolicy_js_1 = __nccwpck_require__(34126); -const userAgentPolicy_js_1 = __nccwpck_require__(69184); -const multipartPolicy_js_1 = __nccwpck_require__(23560); -const decompressResponsePolicy_js_1 = __nccwpck_require__(62926); -const defaultRetryPolicy_js_1 = __nccwpck_require__(7671); -const formDataPolicy_js_1 = __nccwpck_require__(52768); -const core_util_1 = __nccwpck_require__(33000); -const proxyPolicy_js_1 = __nccwpck_require__(11164); -const setClientRequestIdPolicy_js_1 = __nccwpck_require__(59155); -const agentPolicy_js_1 = __nccwpck_require__(24429); -const tlsPolicy_js_1 = __nccwpck_require__(64581); -const tracingPolicy_js_1 = __nccwpck_require__(83438); -const wrapAbortSignalLikePolicy_js_1 = __nccwpck_require__(11193); +const logPolicy_js_1 = __nccwpck_require__(37964); +const pipeline_js_1 = __nccwpck_require__(25271); +const redirectPolicy_js_1 = __nccwpck_require__(70252); +const userAgentPolicy_js_1 = __nccwpck_require__(37822); +const multipartPolicy_js_1 = __nccwpck_require__(46818); +const decompressResponsePolicy_js_1 = __nccwpck_require__(59288); +const defaultRetryPolicy_js_1 = __nccwpck_require__(35285); +const formDataPolicy_js_1 = __nccwpck_require__(4934); +const core_util_1 = __nccwpck_require__(83519); +const proxyPolicy_js_1 = __nccwpck_require__(62058); +const setClientRequestIdPolicy_js_1 = __nccwpck_require__(38865); +const agentPolicy_js_1 = __nccwpck_require__(41955); +const tlsPolicy_js_1 = __nccwpck_require__(9919); +const tracingPolicy_js_1 = __nccwpck_require__(14612); +const wrapAbortSignalLikePolicy_js_1 = __nccwpck_require__(98707); /** * Create a new pipeline with a default set of customizable policies. * @param options - Options to configure a custom pipeline. */ function createPipelineFromOptions(options) { + var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { if (options.agent) { @@ -48756,13 +49169,13 @@ function createPipelineFromOptions(options) { pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); // The multipart policy is added after policies with no phase, so that // policies can be added between it and formDataPolicy to modify // properties (e.g., making the boundary constant in recorded tests). pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { afterPhase: "Retry", }); if (core_util_1.isNodeLike) { @@ -48777,7 +49190,7 @@ function createPipelineFromOptions(options) { /***/ }), -/***/ 96469: +/***/ 93891: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -48785,8 +49198,8 @@ function createPipelineFromOptions(options) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createDefaultHttpClient = createDefaultHttpClient; -const ts_http_runtime_1 = __nccwpck_require__(60957); -const wrapAbortSignal_js_1 = __nccwpck_require__(17310); +const ts_http_runtime_1 = __nccwpck_require__(50939); +const wrapAbortSignal_js_1 = __nccwpck_require__(60752); /** * Create the correct HttpClient for the current environment. */ @@ -48800,11 +49213,12 @@ function createDefaultHttpClient() { ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; try { + // eslint-disable-next-line no-param-reassign request.abortSignal = abortSignal; return await client.sendRequest(request); } finally { - cleanup?.(); + cleanup === null || cleanup === void 0 ? void 0 : cleanup(); } }, }; @@ -48813,7 +49227,7 @@ function createDefaultHttpClient() { /***/ }), -/***/ 59033: +/***/ 41059: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -48821,7 +49235,7 @@ function createDefaultHttpClient() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createHttpHeaders = createHttpHeaders; -const ts_http_runtime_1 = __nccwpck_require__(60957); +const ts_http_runtime_1 = __nccwpck_require__(50939); /** * Creates an object that satisfies the `HttpHeaders` interface. * @param rawHeaders - A simple object representing initial headers @@ -48833,7 +49247,7 @@ function createHttpHeaders(rawHeaders) { /***/ }), -/***/ 81591: +/***/ 95397: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -48841,83 +49255,83 @@ function createHttpHeaders(rawHeaders) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createFileFromStream = exports.createFile = exports.agentPolicyName = exports.agentPolicy = exports.auxiliaryAuthenticationHeaderPolicyName = exports.auxiliaryAuthenticationHeaderPolicy = exports.ndJsonPolicyName = exports.ndJsonPolicy = exports.bearerTokenAuthenticationPolicyName = exports.bearerTokenAuthenticationPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.userAgentPolicyName = exports.userAgentPolicy = exports.defaultRetryPolicy = exports.tracingPolicyName = exports.tracingPolicy = exports.retryPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.setClientRequestIdPolicyName = exports.setClientRequestIdPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.isRestError = exports.RestError = exports.createPipelineRequest = exports.createHttpHeaders = exports.createDefaultHttpClient = exports.createPipelineFromOptions = exports.createEmptyPipeline = void 0; -var pipeline_js_1 = __nccwpck_require__(23357); +var pipeline_js_1 = __nccwpck_require__(25271); Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); -var createPipelineFromOptions_js_1 = __nccwpck_require__(45179); +var createPipelineFromOptions_js_1 = __nccwpck_require__(8589); Object.defineProperty(exports, "createPipelineFromOptions", ({ enumerable: true, get: function () { return createPipelineFromOptions_js_1.createPipelineFromOptions; } })); -var defaultHttpClient_js_1 = __nccwpck_require__(96469); +var defaultHttpClient_js_1 = __nccwpck_require__(93891); Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); -var httpHeaders_js_1 = __nccwpck_require__(59033); +var httpHeaders_js_1 = __nccwpck_require__(41059); Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); -var pipelineRequest_js_1 = __nccwpck_require__(14444); +var pipelineRequest_js_1 = __nccwpck_require__(4970); Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); -var restError_js_1 = __nccwpck_require__(36155); +var restError_js_1 = __nccwpck_require__(75381); Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return restError_js_1.RestError; } })); Object.defineProperty(exports, "isRestError", ({ enumerable: true, get: function () { return restError_js_1.isRestError; } })); -var decompressResponsePolicy_js_1 = __nccwpck_require__(62926); +var decompressResponsePolicy_js_1 = __nccwpck_require__(59288); Object.defineProperty(exports, "decompressResponsePolicy", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicy; } })); Object.defineProperty(exports, "decompressResponsePolicyName", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } })); -var exponentialRetryPolicy_js_1 = __nccwpck_require__(5745); +var exponentialRetryPolicy_js_1 = __nccwpck_require__(53695); Object.defineProperty(exports, "exponentialRetryPolicy", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } })); Object.defineProperty(exports, "exponentialRetryPolicyName", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; } })); -var setClientRequestIdPolicy_js_1 = __nccwpck_require__(59155); +var setClientRequestIdPolicy_js_1 = __nccwpck_require__(38865); Object.defineProperty(exports, "setClientRequestIdPolicy", ({ enumerable: true, get: function () { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicy; } })); Object.defineProperty(exports, "setClientRequestIdPolicyName", ({ enumerable: true, get: function () { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } })); -var logPolicy_js_1 = __nccwpck_require__(37454); +var logPolicy_js_1 = __nccwpck_require__(37964); Object.defineProperty(exports, "logPolicy", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicy; } })); Object.defineProperty(exports, "logPolicyName", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicyName; } })); -var multipartPolicy_js_1 = __nccwpck_require__(23560); +var multipartPolicy_js_1 = __nccwpck_require__(46818); Object.defineProperty(exports, "multipartPolicy", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicy; } })); Object.defineProperty(exports, "multipartPolicyName", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicyName; } })); -var proxyPolicy_js_1 = __nccwpck_require__(11164); +var proxyPolicy_js_1 = __nccwpck_require__(62058); Object.defineProperty(exports, "proxyPolicy", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicy; } })); Object.defineProperty(exports, "proxyPolicyName", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicyName; } })); Object.defineProperty(exports, "getDefaultProxySettings", ({ enumerable: true, get: function () { return proxyPolicy_js_1.getDefaultProxySettings; } })); -var redirectPolicy_js_1 = __nccwpck_require__(34126); +var redirectPolicy_js_1 = __nccwpck_require__(70252); Object.defineProperty(exports, "redirectPolicy", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicy; } })); Object.defineProperty(exports, "redirectPolicyName", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicyName; } })); -var systemErrorRetryPolicy_js_1 = __nccwpck_require__(1431); +var systemErrorRetryPolicy_js_1 = __nccwpck_require__(65201); Object.defineProperty(exports, "systemErrorRetryPolicy", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } })); Object.defineProperty(exports, "systemErrorRetryPolicyName", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } })); -var throttlingRetryPolicy_js_1 = __nccwpck_require__(66495); +var throttlingRetryPolicy_js_1 = __nccwpck_require__(67693); Object.defineProperty(exports, "throttlingRetryPolicy", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } })); Object.defineProperty(exports, "throttlingRetryPolicyName", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } })); -var retryPolicy_js_1 = __nccwpck_require__(58126); +var retryPolicy_js_1 = __nccwpck_require__(22452); Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); -var tracingPolicy_js_1 = __nccwpck_require__(83438); +var tracingPolicy_js_1 = __nccwpck_require__(14612); Object.defineProperty(exports, "tracingPolicy", ({ enumerable: true, get: function () { return tracingPolicy_js_1.tracingPolicy; } })); Object.defineProperty(exports, "tracingPolicyName", ({ enumerable: true, get: function () { return tracingPolicy_js_1.tracingPolicyName; } })); -var defaultRetryPolicy_js_1 = __nccwpck_require__(7671); +var defaultRetryPolicy_js_1 = __nccwpck_require__(35285); Object.defineProperty(exports, "defaultRetryPolicy", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicy; } })); -var userAgentPolicy_js_1 = __nccwpck_require__(69184); +var userAgentPolicy_js_1 = __nccwpck_require__(37822); Object.defineProperty(exports, "userAgentPolicy", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicy; } })); Object.defineProperty(exports, "userAgentPolicyName", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicyName; } })); -var tlsPolicy_js_1 = __nccwpck_require__(64581); +var tlsPolicy_js_1 = __nccwpck_require__(9919); Object.defineProperty(exports, "tlsPolicy", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicy; } })); Object.defineProperty(exports, "tlsPolicyName", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicyName; } })); -var formDataPolicy_js_1 = __nccwpck_require__(52768); +var formDataPolicy_js_1 = __nccwpck_require__(4934); Object.defineProperty(exports, "formDataPolicy", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicy; } })); Object.defineProperty(exports, "formDataPolicyName", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicyName; } })); -var bearerTokenAuthenticationPolicy_js_1 = __nccwpck_require__(25558); +var bearerTokenAuthenticationPolicy_js_1 = __nccwpck_require__(15068); Object.defineProperty(exports, "bearerTokenAuthenticationPolicy", ({ enumerable: true, get: function () { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicy; } })); Object.defineProperty(exports, "bearerTokenAuthenticationPolicyName", ({ enumerable: true, get: function () { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicyName; } })); -var ndJsonPolicy_js_1 = __nccwpck_require__(52234); +var ndJsonPolicy_js_1 = __nccwpck_require__(44496); Object.defineProperty(exports, "ndJsonPolicy", ({ enumerable: true, get: function () { return ndJsonPolicy_js_1.ndJsonPolicy; } })); Object.defineProperty(exports, "ndJsonPolicyName", ({ enumerable: true, get: function () { return ndJsonPolicy_js_1.ndJsonPolicyName; } })); -var auxiliaryAuthenticationHeaderPolicy_js_1 = __nccwpck_require__(22029); +var auxiliaryAuthenticationHeaderPolicy_js_1 = __nccwpck_require__(38339); Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicy", ({ enumerable: true, get: function () { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicy; } })); Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicyName", ({ enumerable: true, get: function () { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } })); -var agentPolicy_js_1 = __nccwpck_require__(24429); +var agentPolicy_js_1 = __nccwpck_require__(41955); Object.defineProperty(exports, "agentPolicy", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicy; } })); Object.defineProperty(exports, "agentPolicyName", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicyName; } })); -var file_js_1 = __nccwpck_require__(69056); +var file_js_1 = __nccwpck_require__(23658); Object.defineProperty(exports, "createFile", ({ enumerable: true, get: function () { return file_js_1.createFile; } })); Object.defineProperty(exports, "createFileFromStream", ({ enumerable: true, get: function () { return file_js_1.createFileFromStream; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 87305: +/***/ 56811: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -48931,7 +49345,7 @@ exports.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); /***/ }), -/***/ 23357: +/***/ 25271: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -48939,7 +49353,7 @@ exports.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createEmptyPipeline = createEmptyPipeline; -const ts_http_runtime_1 = __nccwpck_require__(60957); +const ts_http_runtime_1 = __nccwpck_require__(50939); /** * Creates a totally empty pipeline. * Useful for testing or creating a custom one. @@ -48951,7 +49365,7 @@ function createEmptyPipeline() { /***/ }), -/***/ 14444: +/***/ 4970: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -48959,7 +49373,7 @@ function createEmptyPipeline() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createPipelineRequest = createPipelineRequest; -const ts_http_runtime_1 = __nccwpck_require__(60957); +const ts_http_runtime_1 = __nccwpck_require__(50939); /** * Creates a new pipeline request with the given options. * This method is to allow for the easy setting of default values and not required. @@ -48975,7 +49389,7 @@ function createPipelineRequest(options) { /***/ }), -/***/ 24429: +/***/ 41955: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -48984,7 +49398,7 @@ function createPipelineRequest(options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.agentPolicyName = void 0; exports.agentPolicy = agentPolicy; -const policies_1 = __nccwpck_require__(43507); +const policies_1 = __nccwpck_require__(14025); /** * Name of the Agent Policy */ @@ -48999,7 +49413,7 @@ function agentPolicy(agent) { /***/ }), -/***/ 22029: +/***/ 38339: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49008,20 +49422,21 @@ function agentPolicy(agent) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.auxiliaryAuthenticationHeaderPolicyName = void 0; exports.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; -const tokenCycler_js_1 = __nccwpck_require__(31493); -const log_js_1 = __nccwpck_require__(87305); +const tokenCycler_js_1 = __nccwpck_require__(53815); +const log_js_1 = __nccwpck_require__(56811); /** * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. */ exports.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; const AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { + var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions, }; - return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; + return (_b = (_a = (await getAccessToken(scopes, getTokenOptions))) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; } /** * A policy for external tokens to `x-ms-authorization-auxiliary` header. @@ -49071,7 +49486,7 @@ function auxiliaryAuthenticationHeaderPolicy(options) { /***/ }), -/***/ 25558: +/***/ 15068: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49081,9 +49496,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.bearerTokenAuthenticationPolicyName = void 0; exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; exports.parseChallenges = parseChallenges; -const tokenCycler_js_1 = __nccwpck_require__(31493); -const log_js_1 = __nccwpck_require__(87305); -const restError_js_1 = __nccwpck_require__(36155); +const tokenCycler_js_1 = __nccwpck_require__(53815); +const log_js_1 = __nccwpck_require__(56811); +const restError_js_1 = __nccwpck_require__(75381); /** * The programmatic identifier of the bearerTokenAuthenticationPolicy. */ @@ -49139,6 +49554,7 @@ function isChallengeResponse(response) { * If this method returns true, the underlying request will be sent once again. */ async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + var _a; const { scopes } = onChallengeOptions; const accessToken = await onChallengeOptions.getAccessToken(scopes, { enableCae: true, @@ -49147,7 +49563,7 @@ async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); return true; } /** @@ -49155,11 +49571,12 @@ async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { * then apply it to the Authorization header of a request as a Bearer token. */ function bearerTokenAuthenticationPolicy(options) { + var _a, _b, _c; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; const callbacks = { - authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, - authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks), + 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), }; // This function encapsulates the entire process of reliably retrieving the token // The options are left out of the public API until there's demand to configure this. @@ -49306,18 +49723,19 @@ function parseChallenges(challenges) { * @internal */ function getCaeChallengeClaims(challenges) { + var _a; if (!challenges) { return; } // Find all challenges present in the header const parsedChallenges = parseChallenges(challenges); - return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + 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; } //# sourceMappingURL=bearerTokenAuthenticationPolicy.js.map /***/ }), -/***/ 62926: +/***/ 59288: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49326,7 +49744,7 @@ function getCaeChallengeClaims(challenges) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.decompressResponsePolicyName = void 0; exports.decompressResponsePolicy = decompressResponsePolicy; -const policies_1 = __nccwpck_require__(43507); +const policies_1 = __nccwpck_require__(14025); /** * The programmatic identifier of the decompressResponsePolicy. */ @@ -49342,7 +49760,7 @@ function decompressResponsePolicy() { /***/ }), -/***/ 7671: +/***/ 35285: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49351,7 +49769,7 @@ function decompressResponsePolicy() { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultRetryPolicyName = void 0; exports.defaultRetryPolicy = defaultRetryPolicy; -const policies_1 = __nccwpck_require__(43507); +const policies_1 = __nccwpck_require__(14025); /** * Name of the {@link defaultRetryPolicy} */ @@ -49369,7 +49787,7 @@ function defaultRetryPolicy(options = {}) { /***/ }), -/***/ 5745: +/***/ 53695: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49378,7 +49796,7 @@ function defaultRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.exponentialRetryPolicyName = void 0; exports.exponentialRetryPolicy = exponentialRetryPolicy; -const policies_1 = __nccwpck_require__(43507); +const policies_1 = __nccwpck_require__(14025); /** * The programmatic identifier of the exponentialRetryPolicy. */ @@ -49394,7 +49812,7 @@ function exponentialRetryPolicy(options = {}) { /***/ }), -/***/ 52768: +/***/ 4934: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49403,7 +49821,7 @@ function exponentialRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.formDataPolicyName = void 0; exports.formDataPolicy = formDataPolicy; -const policies_1 = __nccwpck_require__(43507); +const policies_1 = __nccwpck_require__(14025); /** * The programmatic identifier of the formDataPolicy. */ @@ -49418,7 +49836,7 @@ function formDataPolicy() { /***/ }), -/***/ 37454: +/***/ 37964: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49427,8 +49845,8 @@ function formDataPolicy() { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.logPolicyName = void 0; exports.logPolicy = logPolicy; -const log_js_1 = __nccwpck_require__(87305); -const policies_1 = __nccwpck_require__(43507); +const log_js_1 = __nccwpck_require__(56811); +const policies_1 = __nccwpck_require__(14025); /** * The programmatic identifier of the logPolicy. */ @@ -49438,16 +49856,13 @@ exports.logPolicyName = policies_1.logPolicyName; * @param options - Options to configure logPolicy. */ function logPolicy(options = {}) { - return (0, policies_1.logPolicy)({ - logger: log_js_1.logger.info, - ...options, - }); + return (0, policies_1.logPolicy)(Object.assign({ logger: log_js_1.logger.info }, options)); } //# sourceMappingURL=logPolicy.js.map /***/ }), -/***/ 23560: +/***/ 46818: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49456,8 +49871,8 @@ function logPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.multipartPolicyName = void 0; exports.multipartPolicy = multipartPolicy; -const policies_1 = __nccwpck_require__(43507); -const file_js_1 = __nccwpck_require__(69056); +const policies_1 = __nccwpck_require__(14025); +const file_js_1 = __nccwpck_require__(23658); /** * Name of multipart policy */ @@ -49485,7 +49900,7 @@ function multipartPolicy() { /***/ }), -/***/ 52234: +/***/ 44496: /***/ ((__unused_webpack_module, exports) => { @@ -49520,7 +49935,7 @@ function ndJsonPolicy() { /***/ }), -/***/ 11164: +/***/ 62058: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49530,7 +49945,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.proxyPolicyName = void 0; exports.getDefaultProxySettings = getDefaultProxySettings; exports.proxyPolicy = proxyPolicy; -const policies_1 = __nccwpck_require__(43507); +const policies_1 = __nccwpck_require__(14025); /** * The programmatic identifier of the proxyPolicy. */ @@ -49559,7 +49974,7 @@ function proxyPolicy(proxySettings, options) { /***/ }), -/***/ 34126: +/***/ 70252: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49568,7 +49983,7 @@ function proxyPolicy(proxySettings, options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.redirectPolicyName = void 0; exports.redirectPolicy = redirectPolicy; -const policies_1 = __nccwpck_require__(43507); +const policies_1 = __nccwpck_require__(14025); /** * The programmatic identifier of the redirectPolicy. */ @@ -49586,7 +50001,7 @@ function redirectPolicy(options = {}) { /***/ }), -/***/ 58126: +/***/ 22452: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49595,8 +50010,8 @@ function redirectPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.retryPolicy = retryPolicy; const logger_1 = __nccwpck_require__(2764); -const constants_js_1 = __nccwpck_require__(4154); -const policies_1 = __nccwpck_require__(43507); +const constants_js_1 = __nccwpck_require__(93948); +const policies_1 = __nccwpck_require__(14025); const retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); /** * retryPolicy is a generic policy to enable retrying requests when certain conditions are met @@ -49605,16 +50020,13 @@ function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_ // Cast is required since the TSP runtime retry strategy type is slightly different // very deep down (using real AbortSignal vs. AbortSignalLike in RestError). // In practice the difference doesn't actually matter. - return (0, policies_1.retryPolicy)(strategies, { - logger: retryPolicyLogger, - ...options, - }); + return (0, policies_1.retryPolicy)(strategies, Object.assign({ logger: retryPolicyLogger }, options)); } //# sourceMappingURL=retryPolicy.js.map /***/ }), -/***/ 59155: +/***/ 38865: /***/ ((__unused_webpack_module, exports) => { @@ -49648,7 +50060,7 @@ function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id" /***/ }), -/***/ 1431: +/***/ 65201: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49657,7 +50069,7 @@ function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id" Object.defineProperty(exports, "__esModule", ({ value: true })); exports.systemErrorRetryPolicyName = void 0; exports.systemErrorRetryPolicy = systemErrorRetryPolicy; -const policies_1 = __nccwpck_require__(43507); +const policies_1 = __nccwpck_require__(14025); /** * Name of the {@link systemErrorRetryPolicy} */ @@ -49675,7 +50087,7 @@ function systemErrorRetryPolicy(options = {}) { /***/ }), -/***/ 66495: +/***/ 67693: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49684,7 +50096,7 @@ function systemErrorRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.throttlingRetryPolicyName = void 0; exports.throttlingRetryPolicy = throttlingRetryPolicy; -const policies_1 = __nccwpck_require__(43507); +const policies_1 = __nccwpck_require__(14025); /** * Name of the {@link throttlingRetryPolicy} */ @@ -49706,7 +50118,7 @@ function throttlingRetryPolicy(options = {}) { /***/ }), -/***/ 64581: +/***/ 9919: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49715,7 +50127,7 @@ function throttlingRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.tlsPolicyName = void 0; exports.tlsPolicy = tlsPolicy; -const policies_1 = __nccwpck_require__(43507); +const policies_1 = __nccwpck_require__(14025); /** * Name of the TLS Policy */ @@ -49730,7 +50142,7 @@ function tlsPolicy(tlsSettings) { /***/ }), -/***/ 83438: +/***/ 14612: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49739,13 +50151,13 @@ function tlsPolicy(tlsSettings) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.tracingPolicyName = void 0; exports.tracingPolicy = tracingPolicy; -const core_tracing_1 = __nccwpck_require__(26637); -const constants_js_1 = __nccwpck_require__(4154); -const userAgent_js_1 = __nccwpck_require__(57356); -const log_js_1 = __nccwpck_require__(87305); -const core_util_1 = __nccwpck_require__(33000); -const restError_js_1 = __nccwpck_require__(36155); -const util_1 = __nccwpck_require__(38233); +const core_tracing_1 = __nccwpck_require__(3312); +const constants_js_1 = __nccwpck_require__(93948); +const userAgent_js_1 = __nccwpck_require__(50054); +const log_js_1 = __nccwpck_require__(56811); +const core_util_1 = __nccwpck_require__(83519); +const restError_js_1 = __nccwpck_require__(75381); +const util_1 = __nccwpck_require__(51515); /** * The programmatic identifier of the tracingPolicy. */ @@ -49765,6 +50177,7 @@ function tracingPolicy(options = {}) { return { name: exports.tracingPolicyName, async sendRequest(request, next) { + var _a; if (!tracingClient) { return next(request); } @@ -49778,7 +50191,7 @@ function tracingPolicy(options = {}) { if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; + const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; if (!span || !tracingContext) { return next(request); } @@ -49871,7 +50284,7 @@ function tryProcessResponse(span, response) { /***/ }), -/***/ 69184: +/***/ 37822: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49880,7 +50293,7 @@ function tryProcessResponse(span, response) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.userAgentPolicyName = void 0; exports.userAgentPolicy = userAgentPolicy; -const userAgent_js_1 = __nccwpck_require__(57356); +const userAgent_js_1 = __nccwpck_require__(50054); const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); /** * The programmatic identifier of the userAgentPolicy. @@ -49907,7 +50320,7 @@ function userAgentPolicy(options = {}) { /***/ }), -/***/ 11193: +/***/ 98707: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49916,7 +50329,7 @@ function userAgentPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.wrapAbortSignalLikePolicyName = void 0; exports.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; -const wrapAbortSignal_js_1 = __nccwpck_require__(17310); +const wrapAbortSignal_js_1 = __nccwpck_require__(60752); exports.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; /** * Policy that ensure that any AbortSignalLike is wrapped in a native AbortSignal for processing by the pipeline. @@ -49932,12 +50345,13 @@ function wrapAbortSignalLikePolicy() { return next(request); } const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + // eslint-disable-next-line no-param-reassign request.abortSignal = abortSignal; try { return await next(request); } finally { - cleanup?.(); + cleanup === null || cleanup === void 0 ? void 0 : cleanup(); } }, }; @@ -49946,7 +50360,7 @@ function wrapAbortSignalLikePolicy() { /***/ }), -/***/ 36155: +/***/ 75381: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49955,7 +50369,7 @@ function wrapAbortSignalLikePolicy() { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RestError = void 0; exports.isRestError = isRestError; -const ts_http_runtime_1 = __nccwpck_require__(60957); +const ts_http_runtime_1 = __nccwpck_require__(50939); /** * A custom error type for failed pipeline requests. */ @@ -49972,7 +50386,7 @@ function isRestError(e) { /***/ }), -/***/ 69056: +/***/ 23658: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49983,7 +50397,7 @@ exports.hasRawContent = hasRawContent; exports.getRawContent = getRawContent; exports.createFileFromStream = createFileFromStream; exports.createFile = createFile; -const core_util_1 = __nccwpck_require__(33000); +const core_util_1 = __nccwpck_require__(83519); function isNodeReadableStream(x) { return Boolean(x && typeof x["pipe"] === "function"); } @@ -50055,22 +50469,14 @@ function getRawContent(blob) { * @param options - optional metadata about the file, e.g. file name, file size, MIME type. */ function createFileFromStream(stream, name, options = {}) { - return { - ...unimplementedMethods, - type: options.type ?? "", - lastModified: options.lastModified ?? new Date().getTime(), - webkitRelativePath: options.webkitRelativePath ?? "", - size: options.size ?? -1, - name, - stream: () => { + var _a, _b, _c, _d; + return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { const s = stream(); if (isNodeReadableStream(s)) { throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); } return s; - }, - [rawContent]: stream, - }; + }, [rawContent]: stream }); } /** * Create an object that implements the File interface. This object is intended to be @@ -50084,36 +50490,19 @@ function createFileFromStream(stream, name, options = {}) { * @param options - optional metadata about the file, e.g. file name, file size, MIME type. */ function createFile(content, name, options = {}) { + var _a, _b, _c; if (core_util_1.isNodeLike) { - return { - ...unimplementedMethods, - type: options.type ?? "", - lastModified: options.lastModified ?? new Date().getTime(), - webkitRelativePath: options.webkitRelativePath ?? "", - size: content.byteLength, - name, - arrayBuffer: async () => content.buffer, - stream: () => new Blob([toArrayBuffer(content)]).stream(), - [rawContent]: () => content, - }; + return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); } else { - return new File([toArrayBuffer(content)], name, options); + return new File([content], name, options); } } -function toArrayBuffer(source) { - if ("resize" in source.buffer) { - // ArrayBuffer - return source; - } - // SharedArrayBuffer - return source.map((x) => x); -} //# sourceMappingURL=file.js.map /***/ }), -/***/ 31493: +/***/ 53815: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50122,7 +50511,7 @@ function toArrayBuffer(source) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DEFAULT_CYCLER_OPTIONS = void 0; exports.createTokenCycler = createTokenCycler; -const core_util_1 = __nccwpck_require__(33000); +const core_util_1 = __nccwpck_require__(83519); // Default options for the cycler if none are provided exports.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1000, // Force waiting for a refresh 1s before the token expires @@ -50147,7 +50536,7 @@ async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { try { return await getAccessToken(); } - catch { + catch (_a) { return null; } } @@ -50185,10 +50574,7 @@ function createTokenCycler(credential, tokenCyclerOptions) { let refreshWorker = null; let token = null; let tenantId; - const options = { - ...exports.DEFAULT_CYCLER_OPTIONS, - ...tokenCyclerOptions, - }; + const options = Object.assign(Object.assign({}, exports.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); /** * This little holder defines several predicates that we use to construct * the rules of refreshing the token. @@ -50205,13 +50591,14 @@ function createTokenCycler(credential, tokenCyclerOptions) { * window and not already refreshing) */ get shouldRefresh() { + var _a; if (cycler.isRefreshing) { return false; } - if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { + if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { return true; } - return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); + return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -50226,6 +50613,7 @@ function createTokenCycler(credential, tokenCyclerOptions) { * running. */ function refresh(scopes, getTokenOptions) { + var _a; if (!cycler.isRefreshing) { // We bind `scopes` here to avoid passing it around a lot const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); @@ -50233,7 +50621,7 @@ function createTokenCycler(credential, tokenCyclerOptions) { // before the refresh can be considered done. refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - token?.expiresOnTimestamp ?? Date.now()) + (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now()) .then((_token) => { refreshWorker = null; token = _token; @@ -50286,7 +50674,7 @@ function createTokenCycler(credential, tokenCyclerOptions) { /***/ }), -/***/ 57356: +/***/ 50054: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50295,8 +50683,8 @@ function createTokenCycler(credential, tokenCyclerOptions) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getUserAgentHeaderName = getUserAgentHeaderName; exports.getUserAgentValue = getUserAgentValue; -const userAgentPlatform_js_1 = __nccwpck_require__(82599); -const constants_js_1 = __nccwpck_require__(4154); +const userAgentPlatform_js_1 = __nccwpck_require__(33789); +const constants_js_1 = __nccwpck_require__(93948); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { @@ -50326,7 +50714,7 @@ async function getUserAgentValue(prefix) { /***/ }), -/***/ 82599: +/***/ 33789: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50336,8 +50724,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getHeaderName = getHeaderName; exports.setPlatformSpecificData = setPlatformSpecificData; const tslib_1 = __nccwpck_require__(67892); -const node_os_1 = tslib_1.__importDefault(__nccwpck_require__(48161)); -const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(1708)); +const os = tslib_1.__importStar(__nccwpck_require__(48161)); +const process = tslib_1.__importStar(__nccwpck_require__(1708)); /** * @internal */ @@ -50348,25 +50736,25 @@ function getHeaderName() { * @internal */ async function setPlatformSpecificData(map) { - if (node_process_1.default && node_process_1.default.versions) { - const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; - const versions = node_process_1.default.versions; + if (process && process.versions) { + const versions = process.versions; if (versions.bun) { - map.set("Bun", `${versions.bun} (${osInfo})`); + map.set("Bun", versions.bun); } else if (versions.deno) { - map.set("Deno", `${versions.deno} (${osInfo})`); + map.set("Deno", versions.deno); } else if (versions.node) { - map.set("Node", `${versions.node} (${osInfo})`); + map.set("Node", versions.node); } } + map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); } //# sourceMappingURL=userAgentPlatform.js.map /***/ }), -/***/ 17310: +/***/ 60752: /***/ ((__unused_webpack_module, exports) => { @@ -50406,7 +50794,7 @@ function wrapAbortSignalLike(abortSignalLike) { /***/ }), -/***/ 26637: +/***/ 3312: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50414,15 +50802,15 @@ function wrapAbortSignalLike(abortSignalLike) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createTracingClient = exports.useInstrumenter = void 0; -var instrumenter_js_1 = __nccwpck_require__(60771); +var instrumenter_js_1 = __nccwpck_require__(70340); Object.defineProperty(exports, "useInstrumenter", ({ enumerable: true, get: function () { return instrumenter_js_1.useInstrumenter; } })); -var tracingClient_js_1 = __nccwpck_require__(55216); +var tracingClient_js_1 = __nccwpck_require__(71669); Object.defineProperty(exports, "createTracingClient", ({ enumerable: true, get: function () { return tracingClient_js_1.createTracingClient; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 60771: +/***/ 70340: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50433,8 +50821,8 @@ exports.createDefaultTracingSpan = createDefaultTracingSpan; exports.createDefaultInstrumenter = createDefaultInstrumenter; exports.useInstrumenter = useInstrumenter; exports.getInstrumenter = getInstrumenter; -const tracingContext_js_1 = __nccwpck_require__(40156); -const state_js_1 = __nccwpck_require__(74480); +const tracingContext_js_1 = __nccwpck_require__(96847); +const state_js_1 = __nccwpck_require__(83313); function createDefaultTracingSpan() { return { end: () => { @@ -50497,7 +50885,7 @@ function getInstrumenter() { /***/ }), -/***/ 74480: +/***/ 83313: /***/ ((__unused_webpack_module, exports) => { @@ -50517,7 +50905,7 @@ exports.state = { /***/ }), -/***/ 55216: +/***/ 71669: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50525,8 +50913,8 @@ exports.state = { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createTracingClient = createTracingClient; -const instrumenter_js_1 = __nccwpck_require__(60771); -const tracingContext_js_1 = __nccwpck_require__(40156); +const instrumenter_js_1 = __nccwpck_require__(70340); +const tracingContext_js_1 = __nccwpck_require__(96847); /** * Creates a new tracing client. * @@ -50536,12 +50924,8 @@ const tracingContext_js_1 = __nccwpck_require__(40156); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { - ...spanOptions, - packageName: packageName, - packageVersion: packageVersion, - tracingContext: operationOptions?.tracingOptions?.tracingContext, - }); + var _a; + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName: packageName, packageVersion: 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)) { @@ -50549,7 +50933,7 @@ function createTracingClient(options) { } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: { ...operationOptions?.tracingOptions, tracingContext }, + tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }), }); return { span, @@ -50604,7 +50988,7 @@ function createTracingClient(options) { /***/ }), -/***/ 40156: +/***/ 96847: /***/ ((__unused_webpack_module, exports) => { @@ -50637,7 +51021,6 @@ function createTracingContext(options = {}) { } /** @internal */ class TracingContextImpl { - _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof TracingContextImpl @@ -50663,7 +51046,7 @@ exports.TracingContextImpl = TracingContextImpl; /***/ }), -/***/ 35428: +/***/ 82085: /***/ ((__unused_webpack_module, exports) => { @@ -50675,24 +51058,25 @@ exports.cancelablePromiseRace = cancelablePromiseRace; * promise.race() wrapper that aborts rest of promises as soon as the first promise settles. */ async function cancelablePromiseRace(abortablePromiseBuilders, options) { + var _a, _b; const aborter = new AbortController(); function abortHandler() { aborter.abort(); } - options?.abortSignal?.addEventListener("abort", abortHandler); + (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); try { return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); } finally { aborter.abort(); - options?.abortSignal?.removeEventListener("abort", abortHandler); + (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); } } //# sourceMappingURL=aborterUtils.js.map /***/ }), -/***/ 61969: +/***/ 5764: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50708,20 +51092,20 @@ const abort_controller_1 = __nccwpck_require__(49797); * @returns A promise that can be aborted. */ function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; return new Promise((resolve, reject) => { function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); } function removeListeners() { - abortSignal?.removeEventListener("abort", onAbort); + abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); } function onAbort() { - cleanupBeforeAbort?.(); + cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); removeListeners(); rejectOnAbort(); } - if (abortSignal?.aborted) { + if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { return rejectOnAbort(); } try { @@ -50736,14 +51120,14 @@ function createAbortablePromise(buildPromise, options) { catch (err) { reject(err); } - abortSignal?.addEventListener("abort", onAbort); + abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); }); } //# sourceMappingURL=createAbortablePromise.js.map /***/ }), -/***/ 85311: +/***/ 68136: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50752,8 +51136,8 @@ function createAbortablePromise(buildPromise, options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.delay = delay; exports.calculateRetryDelay = calculateRetryDelay; -const createAbortablePromise_js_1 = __nccwpck_require__(61969); -const util_1 = __nccwpck_require__(38233); +const createAbortablePromise_js_1 = __nccwpck_require__(5764); +const util_1 = __nccwpck_require__(51515); const StandardAbortMessage = "The delay was aborted."; /** * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. @@ -50763,13 +51147,13 @@ const StandardAbortMessage = "The delay was aborted."; */ function delay(timeInMs, options) { let token; - const { abortSignal, abortErrorMsg } = options ?? {}; + const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve) => { token = setTimeout(resolve, timeInMs); }, { cleanupBeforeAbort: () => clearTimeout(token), abortSignal, - abortErrorMsg: abortErrorMsg ?? StandardAbortMessage, + abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage, }); } /** @@ -50792,7 +51176,7 @@ function calculateRetryDelay(retryAttempt, config) { /***/ }), -/***/ 74778: +/***/ 9581: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50800,7 +51184,7 @@ function calculateRetryDelay(retryAttempt, config) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getErrorMessage = getErrorMessage; -const util_1 = __nccwpck_require__(38233); +const util_1 = __nccwpck_require__(51515); /** * Given what is thought to be an error object, return the message if possible. * If the message is missing, returns a stringified version of the input. @@ -50831,7 +51215,7 @@ function getErrorMessage(e) { /***/ }), -/***/ 33000: +/***/ 83519: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50849,16 +51233,16 @@ exports.randomUUID = randomUUID; exports.uint8ArrayToString = uint8ArrayToString; exports.stringToUint8Array = stringToUint8Array; const tslib_1 = __nccwpck_require__(67892); -const tspRuntime = tslib_1.__importStar(__nccwpck_require__(38233)); -var aborterUtils_js_1 = __nccwpck_require__(35428); +const tspRuntime = tslib_1.__importStar(__nccwpck_require__(51515)); +var aborterUtils_js_1 = __nccwpck_require__(82085); Object.defineProperty(exports, "cancelablePromiseRace", ({ enumerable: true, get: function () { return aborterUtils_js_1.cancelablePromiseRace; } })); -var createAbortablePromise_js_1 = __nccwpck_require__(61969); +var createAbortablePromise_js_1 = __nccwpck_require__(5764); Object.defineProperty(exports, "createAbortablePromise", ({ enumerable: true, get: function () { return createAbortablePromise_js_1.createAbortablePromise; } })); -var delay_js_1 = __nccwpck_require__(85311); +var delay_js_1 = __nccwpck_require__(68136); Object.defineProperty(exports, "delay", ({ enumerable: true, get: function () { return delay_js_1.delay; } })); -var error_js_1 = __nccwpck_require__(74778); +var error_js_1 = __nccwpck_require__(9581); Object.defineProperty(exports, "getErrorMessage", ({ enumerable: true, get: function () { return error_js_1.getErrorMessage; } })); -var typeGuards_js_1 = __nccwpck_require__(21004); +var typeGuards_js_1 = __nccwpck_require__(13897); Object.defineProperty(exports, "isDefined", ({ enumerable: true, get: function () { return typeGuards_js_1.isDefined; } })); Object.defineProperty(exports, "isObjectWithProperties", ({ enumerable: true, get: function () { return typeGuards_js_1.isObjectWithProperties; } })); Object.defineProperty(exports, "objectHasProperty", ({ enumerable: true, get: function () { return typeGuards_js_1.objectHasProperty; } })); @@ -50988,7 +51372,7 @@ function stringToUint8Array(value, format) { /***/ }), -/***/ 21004: +/***/ 13897: /***/ ((__unused_webpack_module, exports) => { @@ -51080,7 +51464,7 @@ exports.XML_CHARKEY = "_"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.stringifyXML = stringifyXML; exports.parseXML = parseXML; -const fast_xml_parser_1 = __nccwpck_require__(62209); +const fast_xml_parser_1 = __nccwpck_require__(61142); const xml_common_js_1 = __nccwpck_require__(3610); function getCommonOptions(options) { var _a; @@ -51155,7 +51539,7 @@ exports.AzureLogger = void 0; exports.setLogLevel = setLogLevel; exports.getLogLevel = getLogLevel; exports.createClientLogger = createClientLogger; -const logger_1 = __nccwpck_require__(32033); +const logger_1 = __nccwpck_require__(44147); const context = (0, logger_1.createLoggerContext)({ logLevelEnvVarName: "AZURE_LOG_LEVEL", namespace: "azure", @@ -51196,7 +51580,7 @@ function createClientLogger(namespace) { /***/ }), -/***/ 4766: +/***/ 18618: /***/ ((__unused_webpack_module, exports) => { @@ -51207,7 +51591,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 20285: +/***/ 71985: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -51215,11 +51599,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BatchResponseParser = void 0; -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const core_http_compat_1 = __nccwpck_require__(80976); -const constants_js_1 = __nccwpck_require__(9386); -const BatchUtils_js_1 = __nccwpck_require__(66948); -const log_js_1 = __nccwpck_require__(32763); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const core_http_compat_1 = __nccwpck_require__(10585); +const constants_js_1 = __nccwpck_require__(64710); +const BatchUtils_js_1 = __nccwpck_require__(81504); +const log_js_1 = __nccwpck_require__(65175); const HTTP_HEADER_DELIMITER = ": "; const SPACE_DELIMITER = " "; const NOT_FOUND = -1; @@ -51359,7 +51743,7 @@ exports.BatchResponseParser = BatchResponseParser; /***/ }), -/***/ 66948: +/***/ 81504: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -51368,8 +51752,8 @@ exports.BatchResponseParser = BatchResponseParser; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getBodyAsText = getBodyAsText; exports.utf8ByteLength = utf8ByteLength; -const utils_js_1 = __nccwpck_require__(73170); -const constants_js_1 = __nccwpck_require__(9386); +const utils_js_1 = __nccwpck_require__(46814); +const constants_js_1 = __nccwpck_require__(64710); 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); @@ -51384,7 +51768,7 @@ function utf8ByteLength(str) { /***/ }), -/***/ 27776: +/***/ 68556: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -51392,21 +51776,21 @@ function utf8ByteLength(str) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobBatch = void 0; -const core_util_1 = __nccwpck_require__(33000); -const core_auth_1 = __nccwpck_require__(38401); -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const core_util_2 = __nccwpck_require__(33000); -const AnonymousCredential_js_1 = __nccwpck_require__(13360); -const Clients_js_1 = __nccwpck_require__(59813); -const Mutex_js_1 = __nccwpck_require__(39948); -const Pipeline_js_1 = __nccwpck_require__(33543); -const utils_common_js_1 = __nccwpck_require__(98915); +const core_util_1 = __nccwpck_require__(83519); +const core_auth_1 = __nccwpck_require__(43246); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const core_util_2 = __nccwpck_require__(83519); +const AnonymousCredential_js_1 = __nccwpck_require__(66188); +const Clients_js_1 = __nccwpck_require__(17065); +const Mutex_js_1 = __nccwpck_require__(35488); +const Pipeline_js_1 = __nccwpck_require__(77907); +const utils_common_js_1 = __nccwpck_require__(80023); const core_xml_1 = __nccwpck_require__(64928); -const constants_js_1 = __nccwpck_require__(9386); -const StorageSharedKeyCredential_js_1 = __nccwpck_require__(64220); -const tracing_js_1 = __nccwpck_require__(67985); -const core_client_1 = __nccwpck_require__(99307); -const StorageSharedKeyCredentialPolicyV2_js_1 = __nccwpck_require__(61154); +const constants_js_1 = __nccwpck_require__(64710); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(37016); +const tracing_js_1 = __nccwpck_require__(78365); +const core_client_1 = __nccwpck_require__(66212); +const StorageSharedKeyCredentialPolicyV2_js_1 = __nccwpck_require__(5286); /** * A BlobBatch represents an aggregated set of operations on blobs. * Currently, only `delete` and `setAccessTier` are supported. @@ -51670,7 +52054,7 @@ function batchHeaderFilterPolicy() { /***/ }), -/***/ 37683: +/***/ 98175: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -51678,14 +52062,14 @@ function batchHeaderFilterPolicy() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobBatchClient = void 0; -const BatchResponseParser_js_1 = __nccwpck_require__(20285); -const BatchUtils_js_1 = __nccwpck_require__(66948); -const BlobBatch_js_1 = __nccwpck_require__(27776); -const tracing_js_1 = __nccwpck_require__(67985); -const AnonymousCredential_js_1 = __nccwpck_require__(13360); -const StorageContextClient_js_1 = __nccwpck_require__(64754); -const Pipeline_js_1 = __nccwpck_require__(33543); -const utils_common_js_1 = __nccwpck_require__(98915); +const BatchResponseParser_js_1 = __nccwpck_require__(71985); +const BatchUtils_js_1 = __nccwpck_require__(81504); +const BlobBatch_js_1 = __nccwpck_require__(68556); +const tracing_js_1 = __nccwpck_require__(78365); +const AnonymousCredential_js_1 = __nccwpck_require__(66188); +const StorageContextClient_js_1 = __nccwpck_require__(77558); +const Pipeline_js_1 = __nccwpck_require__(77907); +const utils_common_js_1 = __nccwpck_require__(80023); /** * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. * @@ -51852,7 +52236,7 @@ exports.BlobBatchClient = BlobBatchClient; /***/ }), -/***/ 83341: +/***/ 72065: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -51860,8 +52244,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobDownloadResponse = void 0; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -const core_util_1 = __nccwpck_require__(33000); -const RetriableReadableStream_js_1 = __nccwpck_require__(81473); +const core_util_1 = __nccwpck_require__(83519); +const RetriableReadableStream_js_1 = __nccwpck_require__(66157); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * @@ -52327,7 +52711,7 @@ exports.BlobDownloadResponse = BlobDownloadResponse; /***/ }), -/***/ 51029: +/***/ 22321: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -52335,10 +52719,10 @@ exports.BlobDownloadResponse = BlobDownloadResponse; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobLeaseClient = void 0; -const core_util_1 = __nccwpck_require__(33000); -const constants_js_1 = __nccwpck_require__(9386); -const tracing_js_1 = __nccwpck_require__(67985); -const utils_common_js_1 = __nccwpck_require__(98915); +const core_util_1 = __nccwpck_require__(83519); +const constants_js_1 = __nccwpck_require__(64710); +const tracing_js_1 = __nccwpck_require__(78365); +const utils_common_js_1 = __nccwpck_require__(80023); /** * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. */ @@ -52538,7 +52922,7 @@ exports.BlobLeaseClient = BlobLeaseClient; /***/ }), -/***/ 54183: +/***/ 25883: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -52546,8 +52930,8 @@ exports.BlobLeaseClient = BlobLeaseClient; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobQueryResponse = void 0; -const core_util_1 = __nccwpck_require__(33000); -const BlobQuickQueryStream_js_1 = __nccwpck_require__(17097); +const core_util_1 = __nccwpck_require__(83519); +const BlobQuickQueryStream_js_1 = __nccwpck_require__(58661); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * @@ -52917,27 +53301,27 @@ exports.BlobQueryResponse = BlobQueryResponse; /***/ }), -/***/ 91352: +/***/ 36228: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobServiceClient = void 0; -const core_auth_1 = __nccwpck_require__(38401); -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const core_util_1 = __nccwpck_require__(33000); -const Pipeline_js_1 = __nccwpck_require__(33543); -const ContainerClient_js_1 = __nccwpck_require__(83745); -const utils_common_js_1 = __nccwpck_require__(98915); -const StorageSharedKeyCredential_js_1 = __nccwpck_require__(64220); -const AnonymousCredential_js_1 = __nccwpck_require__(13360); -const utils_common_js_2 = __nccwpck_require__(98915); -const tracing_js_1 = __nccwpck_require__(67985); -const BlobBatchClient_js_1 = __nccwpck_require__(37683); -const StorageClient_js_1 = __nccwpck_require__(84827); -const AccountSASPermissions_js_1 = __nccwpck_require__(56139); -const AccountSASSignatureValues_js_1 = __nccwpck_require__(10319); -const AccountSASServices_js_1 = __nccwpck_require__(89159); +const core_auth_1 = __nccwpck_require__(43246); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const core_util_1 = __nccwpck_require__(83519); +const Pipeline_js_1 = __nccwpck_require__(77907); +const ContainerClient_js_1 = __nccwpck_require__(31421); +const utils_common_js_1 = __nccwpck_require__(80023); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(37016); +const AnonymousCredential_js_1 = __nccwpck_require__(66188); +const utils_common_js_2 = __nccwpck_require__(80023); +const tracing_js_1 = __nccwpck_require__(78365); +const BlobBatchClient_js_1 = __nccwpck_require__(98175); +const StorageClient_js_1 = __nccwpck_require__(57167); +const AccountSASPermissions_js_1 = __nccwpck_require__(24007); +const AccountSASSignatureValues_js_1 = __nccwpck_require__(23315); +const AccountSASServices_js_1 = __nccwpck_require__(39011); /** * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you * to manipulate blob containers. @@ -53630,7 +54014,7 @@ exports.BlobServiceClient = BlobServiceClient; /***/ }), -/***/ 59813: +/***/ 17065: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -53638,28 +54022,28 @@ exports.BlobServiceClient = BlobServiceClient; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PageBlobClient = exports.BlockBlobClient = exports.AppendBlobClient = exports.BlobClient = void 0; -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const core_auth_1 = __nccwpck_require__(38401); -const core_util_1 = __nccwpck_require__(33000); -const core_util_2 = __nccwpck_require__(33000); -const BlobDownloadResponse_js_1 = __nccwpck_require__(83341); -const BlobQueryResponse_js_1 = __nccwpck_require__(54183); -const AnonymousCredential_js_1 = __nccwpck_require__(13360); -const StorageSharedKeyCredential_js_1 = __nccwpck_require__(64220); -const models_js_1 = __nccwpck_require__(37647); -const PageBlobRangeResponse_js_1 = __nccwpck_require__(50507); -const Pipeline_js_1 = __nccwpck_require__(33543); -const BlobStartCopyFromUrlPoller_js_1 = __nccwpck_require__(22958); -const Range_js_1 = __nccwpck_require__(19456); -const StorageClient_js_1 = __nccwpck_require__(84827); -const Batch_js_1 = __nccwpck_require__(14539); -const storage_common_1 = __nccwpck_require__(13507); -const constants_js_1 = __nccwpck_require__(9386); -const tracing_js_1 = __nccwpck_require__(67985); -const utils_common_js_1 = __nccwpck_require__(98915); -const utils_js_1 = __nccwpck_require__(73170); -const BlobSASSignatureValues_js_1 = __nccwpck_require__(38147); -const BlobLeaseClient_js_1 = __nccwpck_require__(51029); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const core_auth_1 = __nccwpck_require__(43246); +const core_util_1 = __nccwpck_require__(83519); +const core_util_2 = __nccwpck_require__(83519); +const BlobDownloadResponse_js_1 = __nccwpck_require__(72065); +const BlobQueryResponse_js_1 = __nccwpck_require__(25883); +const AnonymousCredential_js_1 = __nccwpck_require__(66188); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(37016); +const models_js_1 = __nccwpck_require__(41107); +const PageBlobRangeResponse_js_1 = __nccwpck_require__(85703); +const Pipeline_js_1 = __nccwpck_require__(77907); +const BlobStartCopyFromUrlPoller_js_1 = __nccwpck_require__(14914); +const Range_js_1 = __nccwpck_require__(13116); +const StorageClient_js_1 = __nccwpck_require__(57167); +const Batch_js_1 = __nccwpck_require__(51975); +const storage_common_1 = __nccwpck_require__(80135); +const constants_js_1 = __nccwpck_require__(64710); +const tracing_js_1 = __nccwpck_require__(78365); +const utils_common_js_1 = __nccwpck_require__(80023); +const utils_js_1 = __nccwpck_require__(46814); +const BlobSASSignatureValues_js_1 = __nccwpck_require__(70895); +const BlobLeaseClient_js_1 = __nccwpck_require__(22321); /** * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, * append blob, or page blob. @@ -56487,25 +56871,25 @@ exports.PageBlobClient = PageBlobClient; /***/ }), -/***/ 83745: +/***/ 31421: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ContainerClient = void 0; -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const core_util_1 = __nccwpck_require__(33000); -const core_auth_1 = __nccwpck_require__(38401); -const AnonymousCredential_js_1 = __nccwpck_require__(13360); -const StorageSharedKeyCredential_js_1 = __nccwpck_require__(64220); -const Pipeline_js_1 = __nccwpck_require__(33543); -const StorageClient_js_1 = __nccwpck_require__(84827); -const tracing_js_1 = __nccwpck_require__(67985); -const utils_common_js_1 = __nccwpck_require__(98915); -const BlobSASSignatureValues_js_1 = __nccwpck_require__(38147); -const BlobLeaseClient_js_1 = __nccwpck_require__(51029); -const Clients_js_1 = __nccwpck_require__(59813); -const BlobBatchClient_js_1 = __nccwpck_require__(37683); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const core_util_1 = __nccwpck_require__(83519); +const core_auth_1 = __nccwpck_require__(43246); +const AnonymousCredential_js_1 = __nccwpck_require__(66188); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(37016); +const Pipeline_js_1 = __nccwpck_require__(77907); +const StorageClient_js_1 = __nccwpck_require__(57167); +const tracing_js_1 = __nccwpck_require__(78365); +const utils_common_js_1 = __nccwpck_require__(80023); +const BlobSASSignatureValues_js_1 = __nccwpck_require__(70895); +const BlobLeaseClient_js_1 = __nccwpck_require__(22321); +const Clients_js_1 = __nccwpck_require__(17065); +const BlobBatchClient_js_1 = __nccwpck_require__(98175); /** * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. */ @@ -57791,7 +58175,7 @@ exports.ContainerClient = ContainerClient; /***/ }), -/***/ 50507: +/***/ 85703: /***/ ((__unused_webpack_module, exports) => { @@ -57831,7 +58215,7 @@ function rangeResponseFromModel(response) { /***/ }), -/***/ 33543: +/***/ 77907: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -57843,23 +58227,23 @@ exports.isPipelineLike = isPipelineLike; exports.newPipeline = newPipeline; exports.getCoreClientOptions = getCoreClientOptions; exports.getCredentialFromPipeline = getCredentialFromPipeline; -const core_http_compat_1 = __nccwpck_require__(80976); -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const core_client_1 = __nccwpck_require__(99307); +const core_http_compat_1 = __nccwpck_require__(10585); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const core_client_1 = __nccwpck_require__(66212); const core_xml_1 = __nccwpck_require__(64928); -const core_auth_1 = __nccwpck_require__(38401); -const log_js_1 = __nccwpck_require__(32763); -const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(64574); -const StorageSharedKeyCredential_js_1 = __nccwpck_require__(64220); -const AnonymousCredential_js_1 = __nccwpck_require__(13360); -const constants_js_1 = __nccwpck_require__(9386); +const core_auth_1 = __nccwpck_require__(43246); +const log_js_1 = __nccwpck_require__(65175); +const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(85706); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(37016); +const AnonymousCredential_js_1 = __nccwpck_require__(66188); +const constants_js_1 = __nccwpck_require__(64710); Object.defineProperty(exports, "StorageOAuthScopes", ({ enumerable: true, get: function () { return constants_js_1.StorageOAuthScopes; } })); -const storage_common_1 = __nccwpck_require__(13507); -const StorageBrowserPolicyV2_js_1 = __nccwpck_require__(12391); -const StorageRetryPolicyV2_js_1 = __nccwpck_require__(46221); -const StorageSharedKeyCredentialPolicyV2_js_1 = __nccwpck_require__(61154); -const StorageBrowserPolicyFactory_js_1 = __nccwpck_require__(92156); -const StorageCorrectContentLengthPolicy_js_1 = __nccwpck_require__(77348); +const storage_common_1 = __nccwpck_require__(80135); +const StorageBrowserPolicyV2_js_1 = __nccwpck_require__(24651); +const StorageRetryPolicyV2_js_1 = __nccwpck_require__(36393); +const StorageSharedKeyCredentialPolicyV2_js_1 = __nccwpck_require__(5286); +const StorageBrowserPolicyFactory_js_1 = __nccwpck_require__(79488); +const StorageCorrectContentLengthPolicy_js_1 = __nccwpck_require__(76608); /** * A helper to decide if a given argument satisfies the Pipeline contract * @param pipeline - An argument that may be a Pipeline @@ -58003,7 +58387,6 @@ function getCoreClientOptions(pipeline) { corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { @@ -58122,7 +58505,7 @@ function isCoreHttpPolicyFactory(factory) { /***/ }), -/***/ 19456: +/***/ 13116: /***/ ((__unused_webpack_module, exports) => { @@ -58152,7 +58535,7 @@ function rangeToString(iRange) { /***/ }), -/***/ 92156: +/***/ 79488: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -58160,7 +58543,7 @@ function rangeToString(iRange) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageBrowserPolicyFactory = exports.StorageBrowserPolicy = void 0; -const StorageBrowserPolicy_js_1 = __nccwpck_require__(66687); +const StorageBrowserPolicy_js_1 = __nccwpck_require__(9851); Object.defineProperty(exports, "StorageBrowserPolicy", ({ enumerable: true, get: function () { return StorageBrowserPolicy_js_1.StorageBrowserPolicy; } })); /** * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. @@ -58181,7 +58564,7 @@ exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; /***/ }), -/***/ 84827: +/***/ 57167: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -58189,9 +58572,9 @@ exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageClient = void 0; -const StorageContextClient_js_1 = __nccwpck_require__(64754); -const Pipeline_js_1 = __nccwpck_require__(33543); -const utils_common_js_1 = __nccwpck_require__(98915); +const StorageContextClient_js_1 = __nccwpck_require__(77558); +const Pipeline_js_1 = __nccwpck_require__(77907); +const utils_common_js_1 = __nccwpck_require__(80023); /** * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} * and etc. @@ -58243,7 +58626,7 @@ exports.StorageClient = StorageClient; /***/ }), -/***/ 64754: +/***/ 77558: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -58251,7 +58634,7 @@ exports.StorageClient = StorageClient; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageContextClient = void 0; -const index_js_1 = __nccwpck_require__(76546); +const index_js_1 = __nccwpck_require__(38982); /** * @internal */ @@ -58270,7 +58653,7 @@ exports.StorageContextClient = StorageContextClient; /***/ }), -/***/ 64574: +/***/ 85706: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -58278,9 +58661,9 @@ exports.StorageContextClient = StorageContextClient; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageRetryPolicyFactory = exports.StorageRetryPolicy = exports.StorageRetryPolicyType = void 0; -const StorageRetryPolicy_js_1 = __nccwpck_require__(21613); +const StorageRetryPolicy_js_1 = __nccwpck_require__(93377); Object.defineProperty(exports, "StorageRetryPolicy", ({ enumerable: true, get: function () { return StorageRetryPolicy_js_1.StorageRetryPolicy; } })); -const StorageRetryPolicyType_js_1 = __nccwpck_require__(26941); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(59825); Object.defineProperty(exports, "StorageRetryPolicyType", ({ enumerable: true, get: function () { return StorageRetryPolicyType_js_1.StorageRetryPolicyType; } })); /** * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. @@ -58309,7 +58692,7 @@ exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; /***/ }), -/***/ 13360: +/***/ 66188: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -58317,8 +58700,8 @@ exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AnonymousCredential = void 0; -const AnonymousCredentialPolicy_js_1 = __nccwpck_require__(74090); -const Credential_js_1 = __nccwpck_require__(44175); +const AnonymousCredentialPolicy_js_1 = __nccwpck_require__(96438); +const Credential_js_1 = __nccwpck_require__(36531); /** * AnonymousCredential provides a credentialPolicyCreator member used to create * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with @@ -58341,7 +58724,7 @@ exports.AnonymousCredential = AnonymousCredential; /***/ }), -/***/ 44175: +/***/ 36531: /***/ ((__unused_webpack_module, exports) => { @@ -58369,7 +58752,7 @@ exports.Credential = Credential; /***/ }), -/***/ 64220: +/***/ 37016: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -58378,8 +58761,8 @@ exports.Credential = Credential; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageSharedKeyCredential = void 0; const node_crypto_1 = __nccwpck_require__(77598); -const StorageSharedKeyCredentialPolicy_js_1 = __nccwpck_require__(47318); -const Credential_js_1 = __nccwpck_require__(44175); +const StorageSharedKeyCredentialPolicy_js_1 = __nccwpck_require__(33618); +const Credential_js_1 = __nccwpck_require__(36531); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * @@ -58427,7 +58810,7 @@ exports.StorageSharedKeyCredential = StorageSharedKeyCredential; /***/ }), -/***/ 20061: +/***/ 85185: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -58480,7 +58863,7 @@ exports.UserDelegationKeyCredential = UserDelegationKeyCredential; /***/ }), -/***/ 76546: +/***/ 38982: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -58494,15 +58877,15 @@ exports.UserDelegationKeyCredential = UserDelegationKeyCredential; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageClient = void 0; const tslib_1 = __nccwpck_require__(67892); -tslib_1.__exportStar(__nccwpck_require__(93433), exports); -var storageClient_js_1 = __nccwpck_require__(36244); +tslib_1.__exportStar(__nccwpck_require__(13365), exports); +var storageClient_js_1 = __nccwpck_require__(56992); Object.defineProperty(exports, "StorageClient", ({ enumerable: true, get: function () { return storageClient_js_1.StorageClient; } })); -tslib_1.__exportStar(__nccwpck_require__(52597), exports); +tslib_1.__exportStar(__nccwpck_require__(19881), exports); //# sourceMappingURL=index.js.map /***/ }), -/***/ 93433: +/***/ 13365: /***/ ((__unused_webpack_module, exports) => { @@ -58775,7 +59158,7 @@ var KnownStorageErrorCode; /***/ }), -/***/ 41423: +/***/ 79987: /***/ ((__unused_webpack_module, exports) => { @@ -59081,27 +59464,6 @@ exports.StorageError = { name: "String", }, }, - copySourceStatusCode: { - serializedName: "CopySourceStatusCode", - xmlName: "CopySourceStatusCode", - type: { - name: "Number", - }, - }, - copySourceErrorCode: { - serializedName: "CopySourceErrorCode", - xmlName: "CopySourceErrorCode", - type: { - name: "String", - }, - }, - copySourceErrorMessage: { - serializedName: "CopySourceErrorMessage", - xmlName: "CopySourceErrorMessage", - type: { - name: "String", - }, - }, code: { serializedName: "Code", xmlName: "Code", @@ -64436,20 +64798,6 @@ exports.BlobStartCopyFromURLExceptionHeaders = { name: "String", }, }, - copySourceErrorCode: { - serializedName: "x-ms-copy-source-error-code", - xmlName: "x-ms-copy-source-error-code", - type: { - name: "String", - }, - }, - copySourceStatusCode: { - serializedName: "x-ms-copy-source-status-code", - xmlName: "x-ms-copy-source-status-code", - type: { - name: "Number", - }, - }, }, }, }; @@ -64567,20 +64915,6 @@ exports.BlobCopyFromURLExceptionHeaders = { name: "String", }, }, - copySourceErrorCode: { - serializedName: "x-ms-copy-source-error-code", - xmlName: "x-ms-copy-source-error-code", - type: { - name: "String", - }, - }, - copySourceStatusCode: { - serializedName: "x-ms-copy-source-status-code", - xmlName: "x-ms-copy-source-status-code", - type: { - name: "Number", - }, - }, }, }, }; @@ -65607,20 +65941,6 @@ exports.PageBlobUploadPagesFromURLExceptionHeaders = { name: "String", }, }, - copySourceErrorCode: { - serializedName: "x-ms-copy-source-error-code", - xmlName: "x-ms-copy-source-error-code", - type: { - name: "String", - }, - }, - copySourceStatusCode: { - serializedName: "x-ms-copy-source-status-code", - xmlName: "x-ms-copy-source-status-code", - type: { - name: "Number", - }, - }, }, }, }; @@ -66382,20 +66702,6 @@ exports.AppendBlobAppendBlockFromUrlExceptionHeaders = { name: "String", }, }, - copySourceErrorCode: { - serializedName: "x-ms-copy-source-error-code", - xmlName: "x-ms-copy-source-error-code", - type: { - name: "String", - }, - }, - copySourceStatusCode: { - serializedName: "x-ms-copy-source-status-code", - xmlName: "x-ms-copy-source-status-code", - type: { - name: "Number", - }, - }, }, }, }; @@ -66688,20 +66994,6 @@ exports.BlockBlobPutBlobFromUrlExceptionHeaders = { name: "String", }, }, - copySourceErrorCode: { - serializedName: "x-ms-copy-source-error-code", - xmlName: "x-ms-copy-source-error-code", - type: { - name: "String", - }, - }, - copySourceStatusCode: { - serializedName: "x-ms-copy-source-status-code", - xmlName: "x-ms-copy-source-status-code", - type: { - name: "Number", - }, - }, }, }, }; @@ -66892,20 +67184,6 @@ exports.BlockBlobStageBlockFromURLExceptionHeaders = { name: "String", }, }, - copySourceErrorCode: { - serializedName: "x-ms-copy-source-error-code", - xmlName: "x-ms-copy-source-error-code", - type: { - name: "String", - }, - }, - copySourceStatusCode: { - serializedName: "x-ms-copy-source-status-code", - xmlName: "x-ms-copy-source-status-code", - type: { - name: "Number", - }, - }, }, }, }; @@ -67117,7 +67395,7 @@ exports.BlockBlobGetBlockListExceptionHeaders = { /***/ }), -/***/ 23469: +/***/ 37977: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -67132,7 +67410,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.action3 = exports.action2 = exports.leaseId1 = exports.action1 = exports.proposedLeaseId = exports.duration = exports.action = exports.comp10 = exports.sourceLeaseId = exports.sourceContainerName = exports.comp9 = exports.deletedContainerVersion = exports.deletedContainerName = exports.comp8 = exports.containerAcl = exports.comp7 = exports.comp6 = exports.ifUnmodifiedSince = exports.ifModifiedSince = exports.leaseId = exports.preventEncryptionScopeOverride = exports.defaultEncryptionScope = exports.access = exports.metadata = exports.restype2 = exports.where = exports.comp5 = exports.multipartContentType = exports.contentLength = exports.comp4 = exports.body = exports.restype1 = exports.comp3 = exports.keyInfo = exports.include = exports.maxPageSize = exports.marker = exports.prefix = exports.comp2 = exports.comp1 = exports.accept1 = exports.requestId = exports.version = exports.timeoutInSeconds = exports.comp = exports.restype = exports.url = exports.accept = exports.blobServiceProperties = exports.contentType = void 0; exports.fileRequestIntent = exports.copySourceTags = exports.copySourceAuthorization = exports.sourceContentMD5 = exports.xMsRequiresSync = exports.legalHold1 = exports.sealBlob = exports.blobTagsString = exports.copySource = exports.sourceIfTags = exports.sourceIfNoneMatch = exports.sourceIfMatch = exports.sourceIfUnmodifiedSince = exports.sourceIfModifiedSince = exports.rehydratePriority = exports.tier = exports.comp14 = exports.encryptionScope = exports.legalHold = exports.comp13 = exports.immutabilityPolicyMode = exports.immutabilityPolicyExpiry = exports.comp12 = exports.blobContentDisposition = exports.blobContentLanguage = exports.blobContentEncoding = exports.blobContentMD5 = exports.blobContentType = exports.blobCacheControl = exports.expiresOn = exports.expiryOptions = exports.comp11 = exports.blobDeleteType = exports.deleteSnapshots = exports.ifTags = exports.ifNoneMatch = exports.ifMatch = exports.encryptionAlgorithm = exports.encryptionKeySha256 = exports.encryptionKey = exports.rangeGetContentCRC64 = exports.rangeGetContentMD5 = exports.range = exports.versionId = exports.snapshot = exports.delimiter = exports.include1 = exports.proposedLeaseId1 = exports.action4 = exports.breakPeriod = void 0; exports.listType = exports.comp25 = exports.blocks = exports.blockId = exports.comp24 = exports.copySourceBlobProperties = exports.blobType2 = exports.comp23 = exports.sourceRange1 = exports.appendPosition = exports.maxSize = exports.comp22 = exports.blobType1 = exports.comp21 = exports.sequenceNumberAction = exports.prevSnapshotUrl = exports.prevsnapshot = exports.comp20 = exports.range1 = exports.sourceContentCrc64 = exports.sourceRange = exports.sourceUrl = exports.pageWrite1 = exports.ifSequenceNumberEqualTo = exports.ifSequenceNumberLessThan = exports.ifSequenceNumberLessThanOrEqualTo = exports.pageWrite = exports.comp19 = exports.accept2 = exports.body1 = exports.contentType1 = exports.blobSequenceNumber = exports.blobContentLength = exports.blobType = exports.transactionalContentCrc64 = exports.transactionalContentMD5 = exports.tags = exports.comp18 = exports.comp17 = exports.queryRequest = exports.tier1 = exports.comp16 = exports.copyId = exports.copyActionAbortConstant = exports.comp15 = void 0; -const mappers_js_1 = __nccwpck_require__(41423); +const mappers_js_1 = __nccwpck_require__(79987); exports.contentType = { parameterPath: ["options", "contentType"], mapper: { @@ -67209,7 +67487,7 @@ exports.timeoutInSeconds = { exports.version = { parameterPath: "version", mapper: { - defaultValue: "2025-11-05", + defaultValue: "2025-07-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -68748,7 +69026,7 @@ exports.listType = { /***/ }), -/***/ 74910: +/***/ 92098: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -68762,9 +69040,9 @@ exports.listType = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AppendBlobImpl = void 0; const tslib_1 = __nccwpck_require__(67892); -const coreClient = tslib_1.__importStar(__nccwpck_require__(99307)); -const Mappers = tslib_1.__importStar(__nccwpck_require__(41423)); -const Parameters = tslib_1.__importStar(__nccwpck_require__(23469)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(66212)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(79987)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(37977)); /** Class containing AppendBlob operations. */ class AppendBlobImpl { client; @@ -68982,7 +69260,7 @@ const sealOperationSpec = { /***/ }), -/***/ 83354: +/***/ 63590: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -68996,9 +69274,9 @@ const sealOperationSpec = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobImpl = void 0; const tslib_1 = __nccwpck_require__(67892); -const coreClient = tslib_1.__importStar(__nccwpck_require__(99307)); -const Mappers = tslib_1.__importStar(__nccwpck_require__(41423)); -const Parameters = tslib_1.__importStar(__nccwpck_require__(23469)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(66212)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(79987)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(37977)); /** Class containing Blob operations. */ class BlobImpl { client; @@ -70015,7 +70293,7 @@ const setTagsOperationSpec = { /***/ }), -/***/ 99231: +/***/ 84643: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -70029,9 +70307,9 @@ const setTagsOperationSpec = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlockBlobImpl = void 0; const tslib_1 = __nccwpck_require__(67892); -const coreClient = tslib_1.__importStar(__nccwpck_require__(99307)); -const Mappers = tslib_1.__importStar(__nccwpck_require__(41423)); -const Parameters = tslib_1.__importStar(__nccwpck_require__(23469)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(66212)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(79987)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(37977)); /** Class containing BlockBlob operations. */ class BlockBlobImpl { client; @@ -70394,7 +70672,7 @@ const getBlockListOperationSpec = { /***/ }), -/***/ 80402: +/***/ 63950: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -70408,9 +70686,9 @@ const getBlockListOperationSpec = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ContainerImpl = void 0; const tslib_1 = __nccwpck_require__(67892); -const coreClient = tslib_1.__importStar(__nccwpck_require__(99307)); -const Mappers = tslib_1.__importStar(__nccwpck_require__(41423)); -const Parameters = tslib_1.__importStar(__nccwpck_require__(23469)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(66212)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(79987)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(37977)); /** Class containing Container operations. */ class ContainerImpl { client; @@ -71119,7 +71397,7 @@ const getAccountInfoOperationSpec = { /***/ }), -/***/ 21305: +/***/ 54277: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -71132,17 +71410,17 @@ const getAccountInfoOperationSpec = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); const tslib_1 = __nccwpck_require__(67892); -tslib_1.__exportStar(__nccwpck_require__(94570), exports); -tslib_1.__exportStar(__nccwpck_require__(80402), exports); -tslib_1.__exportStar(__nccwpck_require__(83354), exports); -tslib_1.__exportStar(__nccwpck_require__(2721), exports); -tslib_1.__exportStar(__nccwpck_require__(74910), exports); -tslib_1.__exportStar(__nccwpck_require__(99231), exports); +tslib_1.__exportStar(__nccwpck_require__(70182), exports); +tslib_1.__exportStar(__nccwpck_require__(63950), exports); +tslib_1.__exportStar(__nccwpck_require__(63590), exports); +tslib_1.__exportStar(__nccwpck_require__(25021), exports); +tslib_1.__exportStar(__nccwpck_require__(92098), exports); +tslib_1.__exportStar(__nccwpck_require__(84643), exports); //# sourceMappingURL=index.js.map /***/ }), -/***/ 2721: +/***/ 25021: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -71156,9 +71434,9 @@ tslib_1.__exportStar(__nccwpck_require__(99231), exports); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PageBlobImpl = void 0; const tslib_1 = __nccwpck_require__(67892); -const coreClient = tslib_1.__importStar(__nccwpck_require__(99307)); -const Mappers = tslib_1.__importStar(__nccwpck_require__(41423)); -const Parameters = tslib_1.__importStar(__nccwpck_require__(23469)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(66212)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(79987)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(37977)); /** Class containing PageBlob operations. */ class PageBlobImpl { client; @@ -71611,7 +71889,7 @@ const copyIncrementalOperationSpec = { /***/ }), -/***/ 94570: +/***/ 70182: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -71625,9 +71903,9 @@ const copyIncrementalOperationSpec = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ServiceImpl = void 0; const tslib_1 = __nccwpck_require__(67892); -const coreClient = tslib_1.__importStar(__nccwpck_require__(99307)); -const Mappers = tslib_1.__importStar(__nccwpck_require__(41423)); -const Parameters = tslib_1.__importStar(__nccwpck_require__(23469)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(66212)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(79987)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(37977)); /** Class containing Service operations. */ class ServiceImpl { client; @@ -71946,7 +72224,7 @@ const filterBlobsOperationSpec = { /***/ }), -/***/ 36242: +/***/ 55118: /***/ ((__unused_webpack_module, exports) => { @@ -71962,7 +72240,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 42294: +/***/ 43626: /***/ ((__unused_webpack_module, exports) => { @@ -71978,7 +72256,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 26003: +/***/ 3375: /***/ ((__unused_webpack_module, exports) => { @@ -71994,7 +72272,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 2718: +/***/ 77794: /***/ ((__unused_webpack_module, exports) => { @@ -72010,7 +72288,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 52597: +/***/ 19881: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72023,17 +72301,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); */ Object.defineProperty(exports, "__esModule", ({ value: true })); const tslib_1 = __nccwpck_require__(67892); -tslib_1.__exportStar(__nccwpck_require__(87126), exports); -tslib_1.__exportStar(__nccwpck_require__(2718), exports); -tslib_1.__exportStar(__nccwpck_require__(42294), exports); -tslib_1.__exportStar(__nccwpck_require__(85517), exports); -tslib_1.__exportStar(__nccwpck_require__(36242), exports); -tslib_1.__exportStar(__nccwpck_require__(26003), exports); +tslib_1.__exportStar(__nccwpck_require__(33370), exports); +tslib_1.__exportStar(__nccwpck_require__(77794), exports); +tslib_1.__exportStar(__nccwpck_require__(43626), exports); +tslib_1.__exportStar(__nccwpck_require__(77937), exports); +tslib_1.__exportStar(__nccwpck_require__(55118), exports); +tslib_1.__exportStar(__nccwpck_require__(3375), exports); //# sourceMappingURL=index.js.map /***/ }), -/***/ 85517: +/***/ 77937: /***/ ((__unused_webpack_module, exports) => { @@ -72049,7 +72327,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 87126: +/***/ 33370: /***/ ((__unused_webpack_module, exports) => { @@ -72065,7 +72343,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 36244: +/***/ 56992: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72079,8 +72357,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageClient = void 0; const tslib_1 = __nccwpck_require__(67892); -const coreHttpCompat = tslib_1.__importStar(__nccwpck_require__(80976)); -const index_js_1 = __nccwpck_require__(21305); +const coreHttpCompat = tslib_1.__importStar(__nccwpck_require__(10585)); +const index_js_1 = __nccwpck_require__(54277); class StorageClient extends coreHttpCompat.ExtendedServiceClient { url; version; @@ -72101,7 +72379,7 @@ class StorageClient extends coreHttpCompat.ExtendedServiceClient { const defaults = { requestContentType: "application/json; charset=utf-8", }; - const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; + const packageDetails = `azsdk-js-azure-storage-blob/12.28.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; @@ -72117,7 +72395,7 @@ class StorageClient extends coreHttpCompat.ExtendedServiceClient { // Parameter assignments this.url = url; // Assigning values to Constant parameters - this.version = options.version || "2025-11-05"; + this.version = options.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); @@ -72137,7 +72415,7 @@ exports.StorageClient = StorageClient; /***/ }), -/***/ 13430: +/***/ 35514: /***/ ((__unused_webpack_module, exports) => { @@ -72154,7 +72432,7 @@ var KnownEncryptionAlgorithmType; /***/ }), -/***/ 32917: +/***/ 46465: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72163,54 +72441,54 @@ var KnownEncryptionAlgorithmType; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.logger = exports.RestError = exports.BaseRequestPolicy = exports.StorageOAuthScopes = exports.newPipeline = exports.isPipelineLike = exports.Pipeline = exports.getBlobServiceAccountAudience = exports.StorageBlobAudience = exports.PremiumPageBlobTier = exports.BlockBlobTier = exports.generateBlobSASQueryParameters = exports.generateAccountSASQueryParameters = void 0; const tslib_1 = __nccwpck_require__(67892); -const core_rest_pipeline_1 = __nccwpck_require__(81591); +const core_rest_pipeline_1 = __nccwpck_require__(95397); Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return core_rest_pipeline_1.RestError; } })); -tslib_1.__exportStar(__nccwpck_require__(91352), exports); -tslib_1.__exportStar(__nccwpck_require__(59813), exports); -tslib_1.__exportStar(__nccwpck_require__(83745), exports); -tslib_1.__exportStar(__nccwpck_require__(51029), exports); -tslib_1.__exportStar(__nccwpck_require__(56139), exports); -tslib_1.__exportStar(__nccwpck_require__(49286), exports); -tslib_1.__exportStar(__nccwpck_require__(89159), exports); -var AccountSASSignatureValues_js_1 = __nccwpck_require__(10319); +tslib_1.__exportStar(__nccwpck_require__(36228), exports); +tslib_1.__exportStar(__nccwpck_require__(17065), exports); +tslib_1.__exportStar(__nccwpck_require__(31421), exports); +tslib_1.__exportStar(__nccwpck_require__(22321), exports); +tslib_1.__exportStar(__nccwpck_require__(24007), exports); +tslib_1.__exportStar(__nccwpck_require__(67250), exports); +tslib_1.__exportStar(__nccwpck_require__(39011), exports); +var AccountSASSignatureValues_js_1 = __nccwpck_require__(23315); Object.defineProperty(exports, "generateAccountSASQueryParameters", ({ enumerable: true, get: function () { return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; } })); -tslib_1.__exportStar(__nccwpck_require__(27776), exports); -tslib_1.__exportStar(__nccwpck_require__(37683), exports); -tslib_1.__exportStar(__nccwpck_require__(4766), exports); -tslib_1.__exportStar(__nccwpck_require__(7831), exports); -var BlobSASSignatureValues_js_1 = __nccwpck_require__(38147); +tslib_1.__exportStar(__nccwpck_require__(68556), exports); +tslib_1.__exportStar(__nccwpck_require__(98175), exports); +tslib_1.__exportStar(__nccwpck_require__(18618), exports); +tslib_1.__exportStar(__nccwpck_require__(8907), exports); +var BlobSASSignatureValues_js_1 = __nccwpck_require__(70895); Object.defineProperty(exports, "generateBlobSASQueryParameters", ({ enumerable: true, get: function () { return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; } })); -tslib_1.__exportStar(__nccwpck_require__(92156), exports); -tslib_1.__exportStar(__nccwpck_require__(32739), exports); -tslib_1.__exportStar(__nccwpck_require__(13360), exports); -tslib_1.__exportStar(__nccwpck_require__(44175), exports); -tslib_1.__exportStar(__nccwpck_require__(64220), exports); -var models_js_1 = __nccwpck_require__(37647); +tslib_1.__exportStar(__nccwpck_require__(79488), exports); +tslib_1.__exportStar(__nccwpck_require__(12263), exports); +tslib_1.__exportStar(__nccwpck_require__(66188), exports); +tslib_1.__exportStar(__nccwpck_require__(36531), exports); +tslib_1.__exportStar(__nccwpck_require__(37016), exports); +var models_js_1 = __nccwpck_require__(41107); Object.defineProperty(exports, "BlockBlobTier", ({ enumerable: true, get: function () { return models_js_1.BlockBlobTier; } })); Object.defineProperty(exports, "PremiumPageBlobTier", ({ enumerable: true, get: function () { return models_js_1.PremiumPageBlobTier; } })); Object.defineProperty(exports, "StorageBlobAudience", ({ enumerable: true, get: function () { return models_js_1.StorageBlobAudience; } })); Object.defineProperty(exports, "getBlobServiceAccountAudience", ({ enumerable: true, get: function () { return models_js_1.getBlobServiceAccountAudience; } })); -var Pipeline_js_1 = __nccwpck_require__(33543); +var Pipeline_js_1 = __nccwpck_require__(77907); Object.defineProperty(exports, "Pipeline", ({ enumerable: true, get: function () { return Pipeline_js_1.Pipeline; } })); Object.defineProperty(exports, "isPipelineLike", ({ enumerable: true, get: function () { return Pipeline_js_1.isPipelineLike; } })); Object.defineProperty(exports, "newPipeline", ({ enumerable: true, get: function () { return Pipeline_js_1.newPipeline; } })); Object.defineProperty(exports, "StorageOAuthScopes", ({ enumerable: true, get: function () { return Pipeline_js_1.StorageOAuthScopes; } })); -tslib_1.__exportStar(__nccwpck_require__(64574), exports); -var RequestPolicy_js_1 = __nccwpck_require__(30679); +tslib_1.__exportStar(__nccwpck_require__(85706), exports); +var RequestPolicy_js_1 = __nccwpck_require__(98723); Object.defineProperty(exports, "BaseRequestPolicy", ({ enumerable: true, get: function () { return RequestPolicy_js_1.BaseRequestPolicy; } })); -tslib_1.__exportStar(__nccwpck_require__(74090), exports); -tslib_1.__exportStar(__nccwpck_require__(39809), exports); -tslib_1.__exportStar(__nccwpck_require__(64574), exports); -tslib_1.__exportStar(__nccwpck_require__(47318), exports); -tslib_1.__exportStar(__nccwpck_require__(65424), exports); -tslib_1.__exportStar(__nccwpck_require__(13430), exports); -var log_js_1 = __nccwpck_require__(32763); +tslib_1.__exportStar(__nccwpck_require__(96438), exports); +tslib_1.__exportStar(__nccwpck_require__(46741), exports); +tslib_1.__exportStar(__nccwpck_require__(85706), exports); +tslib_1.__exportStar(__nccwpck_require__(33618), exports); +tslib_1.__exportStar(__nccwpck_require__(92532), exports); +tslib_1.__exportStar(__nccwpck_require__(35514), exports); +var log_js_1 = __nccwpck_require__(65175); Object.defineProperty(exports, "logger", ({ enumerable: true, get: function () { return log_js_1.logger; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 58691: +/***/ 44871: /***/ ((__unused_webpack_module, exports) => { @@ -72226,7 +72504,7 @@ exports.AVRO_SCHEMA_KEY = "avro.schema"; /***/ }), -/***/ 53355: +/***/ 25143: /***/ ((__unused_webpack_module, exports) => { @@ -72560,7 +72838,7 @@ class AvroRecordType extends AvroType { /***/ }), -/***/ 92616: +/***/ 60572: /***/ ((__unused_webpack_module, exports) => { @@ -72575,7 +72853,7 @@ exports.AvroReadable = AvroReadable; /***/ }), -/***/ 40092: +/***/ 40432: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72583,7 +72861,7 @@ exports.AvroReadable = AvroReadable; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AvroReadableFromStream = void 0; -const AvroReadable_js_1 = __nccwpck_require__(92616); +const AvroReadable_js_1 = __nccwpck_require__(60572); const abort_controller_1 = __nccwpck_require__(49797); const buffer_1 = __nccwpck_require__(20181); const ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); @@ -72671,7 +72949,7 @@ exports.AvroReadableFromStream = AvroReadableFromStream; /***/ }), -/***/ 94875: +/***/ 12599: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72681,9 +72959,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AvroReader = void 0; // TODO: Do a review of non-interfaces /* eslint-disable @azure/azure-sdk/ts-use-interface-parameters */ -const AvroConstants_js_1 = __nccwpck_require__(58691); -const AvroParser_js_1 = __nccwpck_require__(53355); -const utils_common_js_1 = __nccwpck_require__(1142); +const AvroConstants_js_1 = __nccwpck_require__(44871); +const AvroParser_js_1 = __nccwpck_require__(25143); +const utils_common_js_1 = __nccwpck_require__(35154); class AvroReader { _dataStream; _headerStream; @@ -72797,7 +73075,7 @@ exports.AvroReader = AvroReader; /***/ }), -/***/ 71338: +/***/ 66126: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72805,17 +73083,17 @@ exports.AvroReader = AvroReader; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AvroReadableFromStream = exports.AvroReadable = exports.AvroReader = void 0; -var AvroReader_js_1 = __nccwpck_require__(94875); +var AvroReader_js_1 = __nccwpck_require__(12599); Object.defineProperty(exports, "AvroReader", ({ enumerable: true, get: function () { return AvroReader_js_1.AvroReader; } })); -var AvroReadable_js_1 = __nccwpck_require__(92616); +var AvroReadable_js_1 = __nccwpck_require__(60572); Object.defineProperty(exports, "AvroReadable", ({ enumerable: true, get: function () { return AvroReadable_js_1.AvroReadable; } })); -var AvroReadableFromStream_js_1 = __nccwpck_require__(40092); +var AvroReadableFromStream_js_1 = __nccwpck_require__(40432); Object.defineProperty(exports, "AvroReadableFromStream", ({ enumerable: true, get: function () { return AvroReadableFromStream_js_1.AvroReadableFromStream; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 1142: +/***/ 35154: /***/ ((__unused_webpack_module, exports) => { @@ -72840,7 +73118,7 @@ function arraysEqual(a, b) { /***/ }), -/***/ 32763: +/***/ 65175: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72857,7 +73135,7 @@ exports.logger = (0, logger_1.createClientLogger)("storage-blob"); /***/ }), -/***/ 37647: +/***/ 41107: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72868,7 +73146,7 @@ exports.StorageBlobAudience = exports.PremiumPageBlobTier = exports.BlockBlobTie exports.toAccessTier = toAccessTier; exports.ensureCpkIfSpecified = ensureCpkIfSpecified; exports.getBlobServiceAccountAudience = getBlobServiceAccountAudience; -const constants_js_1 = __nccwpck_require__(9386); +const constants_js_1 = __nccwpck_require__(64710); /** * Represents the access tier on a blob. * For detailed information about block blob level tiering see {@link https://learn.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.} @@ -72984,7 +73262,7 @@ function getBlobServiceAccountAudience(storageAccountName) { /***/ }), -/***/ 74090: +/***/ 96438: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72992,7 +73270,7 @@ function getBlobServiceAccountAudience(storageAccountName) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AnonymousCredentialPolicy = void 0; -const CredentialPolicy_js_1 = __nccwpck_require__(39809); +const CredentialPolicy_js_1 = __nccwpck_require__(46741); /** * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources * or for use with Shared Access Signatures (SAS). @@ -73014,7 +73292,7 @@ exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; /***/ }), -/***/ 39809: +/***/ 46741: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73022,7 +73300,7 @@ exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CredentialPolicy = void 0; -const RequestPolicy_js_1 = __nccwpck_require__(30679); +const RequestPolicy_js_1 = __nccwpck_require__(98723); /** * Credential policy used to sign HTTP(S) requests before sending. This is an * abstract class. @@ -73053,7 +73331,7 @@ exports.CredentialPolicy = CredentialPolicy; /***/ }), -/***/ 30679: +/***/ 98723: /***/ ((__unused_webpack_module, exports) => { @@ -73105,7 +73383,7 @@ exports.BaseRequestPolicy = BaseRequestPolicy; /***/ }), -/***/ 66687: +/***/ 9851: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73113,10 +73391,10 @@ exports.BaseRequestPolicy = BaseRequestPolicy; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageBrowserPolicy = void 0; -const RequestPolicy_js_1 = __nccwpck_require__(30679); -const core_util_1 = __nccwpck_require__(33000); -const constants_js_1 = __nccwpck_require__(9386); -const utils_common_js_1 = __nccwpck_require__(98915); +const RequestPolicy_js_1 = __nccwpck_require__(98723); +const core_util_1 = __nccwpck_require__(83519); +const constants_js_1 = __nccwpck_require__(64710); +const utils_common_js_1 = __nccwpck_require__(80023); /** * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: * @@ -73162,7 +73440,7 @@ exports.StorageBrowserPolicy = StorageBrowserPolicy; /***/ }), -/***/ 12391: +/***/ 24651: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73171,9 +73449,9 @@ exports.StorageBrowserPolicy = StorageBrowserPolicy; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageBrowserPolicyName = void 0; exports.storageBrowserPolicy = storageBrowserPolicy; -const core_util_1 = __nccwpck_require__(33000); -const constants_js_1 = __nccwpck_require__(9386); -const utils_common_js_1 = __nccwpck_require__(98915); +const core_util_1 = __nccwpck_require__(83519); +const constants_js_1 = __nccwpck_require__(64710); +const utils_common_js_1 = __nccwpck_require__(80023); /** * The programmatic identifier of the StorageBrowserPolicy. */ @@ -73203,7 +73481,7 @@ function storageBrowserPolicy() { /***/ }), -/***/ 77348: +/***/ 76608: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73212,7 +73490,7 @@ function storageBrowserPolicy() { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageCorrectContentLengthPolicyName = void 0; exports.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; -const constants_js_1 = __nccwpck_require__(9386); +const constants_js_1 = __nccwpck_require__(64710); /** * The programmatic identifier of the storageCorrectContentLengthPolicy. */ @@ -73240,7 +73518,7 @@ function storageCorrectContentLengthPolicy() { /***/ }), -/***/ 21613: +/***/ 93377: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73250,11 +73528,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageRetryPolicy = void 0; exports.NewRetryPolicyFactory = NewRetryPolicyFactory; const abort_controller_1 = __nccwpck_require__(49797); -const RequestPolicy_js_1 = __nccwpck_require__(30679); -const constants_js_1 = __nccwpck_require__(9386); -const utils_common_js_1 = __nccwpck_require__(98915); -const log_js_1 = __nccwpck_require__(32763); -const StorageRetryPolicyType_js_1 = __nccwpck_require__(26941); +const RequestPolicy_js_1 = __nccwpck_require__(98723); +const constants_js_1 = __nccwpck_require__(64710); +const utils_common_js_1 = __nccwpck_require__(80023); +const log_js_1 = __nccwpck_require__(65175); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(59825); /** * A factory method used to generated a RetryPolicy factory. * @@ -73419,20 +73697,21 @@ class StorageRetryPolicy extends RequestPolicy_js_1.BaseRequestPolicy { return true; } } - if (response) { - // Retry select Copy Source Error Codes. - if (response?.status >= 400) { - const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); - if (copySourceError !== undefined) { - switch (copySourceError) { - case "InternalError": - case "OperationTimedOut": - case "ServerBusy": - return true; - } - } - } - } + // [Copy source error code] Feature is pending on service side, skip retry on copy source error for now. + // if (response) { + // // Retry select Copy Source Error Codes. + // if (response?.status >= 400) { + // const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode); + // if (copySourceError !== undefined) { + // switch (copySourceError) { + // case "InternalError": + // case "OperationTimedOut": + // case "ServerBusy": + // return true; + // } + // } + // } + // } if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; @@ -73470,7 +73749,7 @@ exports.StorageRetryPolicy = StorageRetryPolicy; /***/ }), -/***/ 26941: +/***/ 59825: /***/ ((__unused_webpack_module, exports) => { @@ -73496,7 +73775,7 @@ var StorageRetryPolicyType; /***/ }), -/***/ 46221: +/***/ 36393: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73506,12 +73785,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageRetryPolicyName = void 0; exports.storageRetryPolicy = storageRetryPolicy; const abort_controller_1 = __nccwpck_require__(49797); -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const core_util_1 = __nccwpck_require__(33000); -const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(64574); -const constants_js_1 = __nccwpck_require__(9386); -const utils_common_js_1 = __nccwpck_require__(98915); -const log_js_1 = __nccwpck_require__(32763); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const core_util_1 = __nccwpck_require__(83519); +const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(85706); +const constants_js_1 = __nccwpck_require__(64710); +const utils_common_js_1 = __nccwpck_require__(80023); +const log_js_1 = __nccwpck_require__(65175); /** * Name of the {@link storageRetryPolicy} */ @@ -73582,20 +73861,21 @@ function storageRetryPolicy(options = {}) { return true; } } - if (response) { - // Retry select Copy Source Error Codes. - if (response?.status >= 400) { - const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); - if (copySourceError !== undefined) { - switch (copySourceError) { - case "InternalError": - case "OperationTimedOut": - case "ServerBusy": - return true; - } - } - } - } + // [Copy source error code] Feature is pending on service side, skip retry on copy source error for now. + // if (response) { + // // Retry select Copy Source Error Codes. + // if (response?.status >= 400) { + // const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode); + // if (copySourceError !== undefined) { + // switch (copySourceError) { + // case "InternalError": + // case "OperationTimedOut": + // case "ServerBusy": + // return true; + // } + // } + // } + // } return false; } function calculateDelay(isPrimaryRetry, attempt) { @@ -73670,7 +73950,7 @@ function storageRetryPolicy(options = {}) { /***/ }), -/***/ 47318: +/***/ 33618: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73678,10 +73958,10 @@ function storageRetryPolicy(options = {}) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageSharedKeyCredentialPolicy = void 0; -const constants_js_1 = __nccwpck_require__(9386); -const utils_common_js_1 = __nccwpck_require__(98915); -const CredentialPolicy_js_1 = __nccwpck_require__(39809); -const SharedKeyComparator_js_1 = __nccwpck_require__(81179); +const constants_js_1 = __nccwpck_require__(64710); +const utils_common_js_1 = __nccwpck_require__(80023); +const CredentialPolicy_js_1 = __nccwpck_require__(46741); +const SharedKeyComparator_js_1 = __nccwpck_require__(87127); /** * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. */ @@ -73825,7 +74105,7 @@ exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; /***/ }), -/***/ 61154: +/***/ 5286: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73835,9 +74115,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageSharedKeyCredentialPolicyName = void 0; exports.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; const node_crypto_1 = __nccwpck_require__(77598); -const constants_js_1 = __nccwpck_require__(9386); -const utils_common_js_1 = __nccwpck_require__(98915); -const SharedKeyComparator_js_1 = __nccwpck_require__(81179); +const constants_js_1 = __nccwpck_require__(64710); +const utils_common_js_1 = __nccwpck_require__(80023); +const SharedKeyComparator_js_1 = __nccwpck_require__(87127); /** * The programmatic identifier of the storageSharedKeyCredentialPolicy. */ @@ -73967,7 +74247,7 @@ function storageSharedKeyCredentialPolicy(options) { /***/ }), -/***/ 22958: +/***/ 14914: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73975,7 +74255,7 @@ function storageSharedKeyCredentialPolicy(options) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobBeginCopyFromUrlPoller = void 0; -const core_util_1 = __nccwpck_require__(33000); +const core_util_1 = __nccwpck_require__(83519); const core_lro_1 = __nccwpck_require__(61311); /** * This is the poller returned by {@link BlobClient.beginCopyFromURL}. @@ -74111,7 +74391,7 @@ function makeBlobBeginCopyFromURLPollOperation(state) { /***/ }), -/***/ 56139: +/***/ 24007: /***/ ((__unused_webpack_module, exports) => { @@ -74346,7 +74626,7 @@ exports.AccountSASPermissions = AccountSASPermissions; /***/ }), -/***/ 49286: +/***/ 67250: /***/ ((__unused_webpack_module, exports) => { @@ -74426,7 +74706,7 @@ exports.AccountSASResourceTypes = AccountSASResourceTypes; /***/ }), -/***/ 89159: +/***/ 39011: /***/ ((__unused_webpack_module, exports) => { @@ -74514,7 +74794,7 @@ exports.AccountSASServices = AccountSASServices; /***/ }), -/***/ 10319: +/***/ 23315: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -74523,13 +74803,13 @@ exports.AccountSASServices = AccountSASServices; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.generateAccountSASQueryParameters = generateAccountSASQueryParameters; exports.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; -const AccountSASPermissions_js_1 = __nccwpck_require__(56139); -const AccountSASResourceTypes_js_1 = __nccwpck_require__(49286); -const AccountSASServices_js_1 = __nccwpck_require__(89159); -const SasIPRange_js_1 = __nccwpck_require__(98562); -const SASQueryParameters_js_1 = __nccwpck_require__(65424); -const constants_js_1 = __nccwpck_require__(9386); -const utils_common_js_1 = __nccwpck_require__(98915); +const AccountSASPermissions_js_1 = __nccwpck_require__(24007); +const AccountSASResourceTypes_js_1 = __nccwpck_require__(67250); +const AccountSASServices_js_1 = __nccwpck_require__(39011); +const SasIPRange_js_1 = __nccwpck_require__(28926); +const SASQueryParameters_js_1 = __nccwpck_require__(92532); +const constants_js_1 = __nccwpck_require__(64710); +const utils_common_js_1 = __nccwpck_require__(80023); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * @@ -74624,7 +74904,7 @@ function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sh /***/ }), -/***/ 7831: +/***/ 8907: /***/ ((__unused_webpack_module, exports) => { @@ -74827,7 +75107,7 @@ exports.BlobSASPermissions = BlobSASPermissions; /***/ }), -/***/ 38147: +/***/ 70895: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -74836,14 +75116,14 @@ exports.generateBlobSASQueryParameters = generateBlobSASQueryParameters; exports.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -const BlobSASPermissions_js_1 = __nccwpck_require__(7831); -const ContainerSASPermissions_js_1 = __nccwpck_require__(32739); -const StorageSharedKeyCredential_js_1 = __nccwpck_require__(64220); -const UserDelegationKeyCredential_js_1 = __nccwpck_require__(20061); -const SasIPRange_js_1 = __nccwpck_require__(98562); -const SASQueryParameters_js_1 = __nccwpck_require__(65424); -const constants_js_1 = __nccwpck_require__(9386); -const utils_common_js_1 = __nccwpck_require__(98915); +const BlobSASPermissions_js_1 = __nccwpck_require__(8907); +const ContainerSASPermissions_js_1 = __nccwpck_require__(12263); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(37016); +const UserDelegationKeyCredential_js_1 = __nccwpck_require__(85185); +const SasIPRange_js_1 = __nccwpck_require__(28926); +const SASQueryParameters_js_1 = __nccwpck_require__(92532); +const constants_js_1 = __nccwpck_require__(64710); +const utils_common_js_1 = __nccwpck_require__(80023); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } @@ -75503,7 +75783,7 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { /***/ }), -/***/ 32739: +/***/ 12263: /***/ ((__unused_webpack_module, exports) => { @@ -75732,7 +76012,7 @@ exports.ContainerSASPermissions = ContainerSASPermissions; /***/ }), -/***/ 65424: +/***/ 92532: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -75740,8 +76020,8 @@ exports.ContainerSASPermissions = ContainerSASPermissions; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SASQueryParameters = exports.SASProtocol = void 0; -const SasIPRange_js_1 = __nccwpck_require__(98562); -const utils_common_js_1 = __nccwpck_require__(98915); +const SasIPRange_js_1 = __nccwpck_require__(28926); +const utils_common_js_1 = __nccwpck_require__(80023); /** * Protocols for generated SAS. */ @@ -76093,7 +76373,7 @@ exports.SASQueryParameters = SASQueryParameters; /***/ }), -/***/ 98562: +/***/ 28926: /***/ ((__unused_webpack_module, exports) => { @@ -76115,7 +76395,7 @@ function ipRangeToString(ipRange) { /***/ }), -/***/ 14539: +/***/ 51975: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -76255,7 +76535,7 @@ exports.Batch = Batch; /***/ }), -/***/ 17097: +/***/ 58661: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -76264,7 +76544,7 @@ exports.Batch = Batch; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobQuickQueryStream = void 0; const node_stream_1 = __nccwpck_require__(57075); -const index_js_1 = __nccwpck_require__(71338); +const index_js_1 = __nccwpck_require__(66126); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * @@ -76381,7 +76661,7 @@ exports.BlobQuickQueryStream = BlobQuickQueryStream; /***/ }), -/***/ 39948: +/***/ 35488: /***/ ((__unused_webpack_module, exports) => { @@ -76456,7 +76736,7 @@ exports.Mutex = Mutex; /***/ }), -/***/ 81473: +/***/ 66157: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -76593,7 +76873,7 @@ exports.RetriableReadableStream = RetriableReadableStream; /***/ }), -/***/ 81179: +/***/ 87127: /***/ ((__unused_webpack_module, exports) => { @@ -76675,7 +76955,7 @@ function isLessThan(lhs, rhs) { /***/ }), -/***/ 9386: +/***/ 64710: /***/ ((__unused_webpack_module, exports) => { @@ -76683,8 +76963,8 @@ function isLessThan(lhs, rhs) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PathStylePorts = exports.BlobDoesNotUseCustomerSpecifiedEncryption = exports.BlobUsesCustomerSpecifiedEncryptionMsg = exports.StorageBlobLoggingAllowedQueryParameters = exports.StorageBlobLoggingAllowedHeaderNames = exports.DevelopmentConnectionString = exports.EncryptionAlgorithmAES25 = exports.HTTP_VERSION_1_1 = exports.HTTP_LINE_ENDING = exports.BATCH_MAX_PAYLOAD_IN_BYTES = exports.BATCH_MAX_REQUEST = exports.SIZE_1_MB = exports.ETagAny = exports.ETagNone = exports.HeaderConstants = exports.HTTPURLConnection = exports.URLConstants = exports.StorageOAuthScopes = exports.REQUEST_TIMEOUT = exports.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports.BLOCK_BLOB_MAX_BLOCKS = exports.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports.SERVICE_VERSION = exports.SDK_VERSION = void 0; -exports.SDK_VERSION = "12.29.1"; -exports.SERVICE_VERSION = "2025-11-05"; +exports.SDK_VERSION = "12.28.0"; +exports.SERVICE_VERSION = "2025-07-05"; exports.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB exports.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB exports.BLOCK_BLOB_MAX_BLOCKS = 50000; @@ -76910,7 +77190,7 @@ exports.PathStylePorts = [ /***/ }), -/***/ 67985: +/***/ 78365: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -76918,8 +77198,8 @@ exports.PathStylePorts = [ // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.tracingClient = void 0; -const core_tracing_1 = __nccwpck_require__(26637); -const constants_js_1 = __nccwpck_require__(9386); +const core_tracing_1 = __nccwpck_require__(3312); +const constants_js_1 = __nccwpck_require__(64710); /** * Creates a span using the global tracer. * @internal @@ -76933,7 +77213,7 @@ exports.tracingClient = (0, core_tracing_1.createTracingClient)({ /***/ }), -/***/ 98915: +/***/ 80023: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -76976,9 +77256,9 @@ exports.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfLi exports.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; exports.EscapePath = EscapePath; exports.assertResponse = assertResponse; -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const core_util_1 = __nccwpck_require__(33000); -const constants_js_1 = __nccwpck_require__(9386); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const core_util_1 = __nccwpck_require__(83519); +const constants_js_1 = __nccwpck_require__(64710); /** * Reserved URL characters must be properly escaped for Storage services like Blob or File. * @@ -77746,7 +78026,7 @@ function assertResponse(response) { /***/ }), -/***/ 73170: +/***/ 46814: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -77761,7 +78041,7 @@ exports.readStreamToLocalFile = readStreamToLocalFile; const tslib_1 = __nccwpck_require__(67892); const node_fs_1 = tslib_1.__importDefault(__nccwpck_require__(73024)); const node_util_1 = tslib_1.__importDefault(__nccwpck_require__(57975)); -const constants_js_1 = __nccwpck_require__(9386); +const constants_js_1 = __nccwpck_require__(64710); /** * Reads a readable stream into buffer. Fill the buffer from offset to end. * @@ -77892,7 +78172,7 @@ exports.fsCreateReadStream = node_fs_1.default.createReadStream; /***/ }), -/***/ 3092: +/***/ 80840: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -77901,7 +78181,7 @@ exports.fsCreateReadStream = node_fs_1.default.createReadStream; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BufferScheduler = void 0; const events_1 = __nccwpck_require__(24434); -const PooledBuffer_js_1 = __nccwpck_require__(88126); +const PooledBuffer_js_1 = __nccwpck_require__(1098); /** * This class accepts a Node.js Readable stream as input, and keeps reading data * from the stream into the internal buffer structure, until it reaches maxBuffers. @@ -78180,7 +78460,7 @@ exports.BufferScheduler = BufferScheduler; /***/ }), -/***/ 14712: +/***/ 41340: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78287,7 +78567,7 @@ exports.BuffersStream = BuffersStream; /***/ }), -/***/ 88126: +/***/ 1098: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78296,7 +78576,7 @@ exports.BuffersStream = BuffersStream; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PooledBuffer = void 0; const tslib_1 = __nccwpck_require__(67892); -const BuffersStream_js_1 = __nccwpck_require__(14712); +const BuffersStream_js_1 = __nccwpck_require__(41340); const node_buffer_1 = tslib_1.__importDefault(__nccwpck_require__(4573)); /** * maxBufferLength is max size of each buffer in the pooled buffers. @@ -78393,7 +78673,7 @@ exports.PooledBuffer = PooledBuffer; /***/ }), -/***/ 30782: +/***/ 99018: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78401,7 +78681,7 @@ exports.PooledBuffer = PooledBuffer; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageBrowserPolicyFactory = exports.StorageBrowserPolicy = void 0; -const StorageBrowserPolicy_js_1 = __nccwpck_require__(65473); +const StorageBrowserPolicy_js_1 = __nccwpck_require__(61397); Object.defineProperty(exports, "StorageBrowserPolicy", ({ enumerable: true, get: function () { return StorageBrowserPolicy_js_1.StorageBrowserPolicy; } })); /** * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. @@ -78422,7 +78702,7 @@ exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; /***/ }), -/***/ 87848: +/***/ 24748: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78430,9 +78710,9 @@ exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageRetryPolicyFactory = exports.StorageRetryPolicy = exports.StorageRetryPolicyType = void 0; -const StorageRetryPolicy_js_1 = __nccwpck_require__(65975); +const StorageRetryPolicy_js_1 = __nccwpck_require__(5571); Object.defineProperty(exports, "StorageRetryPolicy", ({ enumerable: true, get: function () { return StorageRetryPolicy_js_1.StorageRetryPolicy; } })); -const StorageRetryPolicyType_js_1 = __nccwpck_require__(73087); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(94171); Object.defineProperty(exports, "StorageRetryPolicyType", ({ enumerable: true, get: function () { return StorageRetryPolicyType_js_1.StorageRetryPolicyType; } })); /** * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. @@ -78461,7 +78741,7 @@ exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; /***/ }), -/***/ 16125: +/***/ 54593: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78469,7 +78749,7 @@ exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient; -const core_rest_pipeline_1 = __nccwpck_require__(81591); +const core_rest_pipeline_1 = __nccwpck_require__(95397); let _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { @@ -78481,7 +78761,7 @@ function getCachedDefaultHttpClient() { /***/ }), -/***/ 3422: +/***/ 34946: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78489,8 +78769,8 @@ function getCachedDefaultHttpClient() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AnonymousCredential = void 0; -const AnonymousCredentialPolicy_js_1 = __nccwpck_require__(36936); -const Credential_js_1 = __nccwpck_require__(7069); +const AnonymousCredentialPolicy_js_1 = __nccwpck_require__(67212); +const Credential_js_1 = __nccwpck_require__(34665); /** * AnonymousCredential provides a credentialPolicyCreator member used to create * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with @@ -78513,7 +78793,7 @@ exports.AnonymousCredential = AnonymousCredential; /***/ }), -/***/ 7069: +/***/ 34665: /***/ ((__unused_webpack_module, exports) => { @@ -78541,7 +78821,7 @@ exports.Credential = Credential; /***/ }), -/***/ 76590: +/***/ 47202: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78550,8 +78830,8 @@ exports.Credential = Credential; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageSharedKeyCredential = void 0; const node_crypto_1 = __nccwpck_require__(77598); -const StorageSharedKeyCredentialPolicy_js_1 = __nccwpck_require__(9640); -const Credential_js_1 = __nccwpck_require__(7069); +const StorageSharedKeyCredentialPolicy_js_1 = __nccwpck_require__(76300); +const Credential_js_1 = __nccwpck_require__(34665); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * @@ -78599,7 +78879,7 @@ exports.StorageSharedKeyCredential = StorageSharedKeyCredential; /***/ }), -/***/ 13507: +/***/ 80135: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78608,33 +78888,32 @@ exports.StorageSharedKeyCredential = StorageSharedKeyCredential; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BaseRequestPolicy = exports.getCachedDefaultHttpClient = void 0; const tslib_1 = __nccwpck_require__(67892); -tslib_1.__exportStar(__nccwpck_require__(3092), exports); -var cache_js_1 = __nccwpck_require__(16125); +tslib_1.__exportStar(__nccwpck_require__(80840), exports); +var cache_js_1 = __nccwpck_require__(54593); Object.defineProperty(exports, "getCachedDefaultHttpClient", ({ enumerable: true, get: function () { return cache_js_1.getCachedDefaultHttpClient; } })); -tslib_1.__exportStar(__nccwpck_require__(30782), exports); -tslib_1.__exportStar(__nccwpck_require__(3422), exports); -tslib_1.__exportStar(__nccwpck_require__(7069), exports); -tslib_1.__exportStar(__nccwpck_require__(76590), exports); -tslib_1.__exportStar(__nccwpck_require__(87848), exports); -var RequestPolicy_js_1 = __nccwpck_require__(3165); +tslib_1.__exportStar(__nccwpck_require__(99018), exports); +tslib_1.__exportStar(__nccwpck_require__(34946), exports); +tslib_1.__exportStar(__nccwpck_require__(34665), exports); +tslib_1.__exportStar(__nccwpck_require__(47202), exports); +tslib_1.__exportStar(__nccwpck_require__(24748), exports); +var RequestPolicy_js_1 = __nccwpck_require__(89937); Object.defineProperty(exports, "BaseRequestPolicy", ({ enumerable: true, get: function () { return RequestPolicy_js_1.BaseRequestPolicy; } })); -tslib_1.__exportStar(__nccwpck_require__(36936), exports); -tslib_1.__exportStar(__nccwpck_require__(21503), exports); -tslib_1.__exportStar(__nccwpck_require__(65473), exports); -tslib_1.__exportStar(__nccwpck_require__(57641), exports); -tslib_1.__exportStar(__nccwpck_require__(30134), exports); -tslib_1.__exportStar(__nccwpck_require__(73087), exports); -tslib_1.__exportStar(__nccwpck_require__(65975), exports); -tslib_1.__exportStar(__nccwpck_require__(67135), exports); -tslib_1.__exportStar(__nccwpck_require__(9640), exports); -tslib_1.__exportStar(__nccwpck_require__(30332), exports); -tslib_1.__exportStar(__nccwpck_require__(87848), exports); -tslib_1.__exportStar(__nccwpck_require__(14047), exports); +tslib_1.__exportStar(__nccwpck_require__(67212), exports); +tslib_1.__exportStar(__nccwpck_require__(10923), exports); +tslib_1.__exportStar(__nccwpck_require__(61397), exports); +tslib_1.__exportStar(__nccwpck_require__(68469), exports); +tslib_1.__exportStar(__nccwpck_require__(90), exports); +tslib_1.__exportStar(__nccwpck_require__(94171), exports); +tslib_1.__exportStar(__nccwpck_require__(5571), exports); +tslib_1.__exportStar(__nccwpck_require__(92531), exports); +tslib_1.__exportStar(__nccwpck_require__(76300), exports); +tslib_1.__exportStar(__nccwpck_require__(1048), exports); +tslib_1.__exportStar(__nccwpck_require__(24748), exports); //# sourceMappingURL=index.js.map /***/ }), -/***/ 85541: +/***/ 78393: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78651,7 +78930,7 @@ exports.logger = (0, logger_1.createClientLogger)("storage-common"); /***/ }), -/***/ 36936: +/***/ 67212: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78659,7 +78938,7 @@ exports.logger = (0, logger_1.createClientLogger)("storage-common"); // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AnonymousCredentialPolicy = void 0; -const CredentialPolicy_js_1 = __nccwpck_require__(21503); +const CredentialPolicy_js_1 = __nccwpck_require__(10923); /** * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources * or for use with Shared Access Signatures (SAS). @@ -78681,7 +78960,7 @@ exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; /***/ }), -/***/ 21503: +/***/ 10923: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78689,7 +78968,7 @@ exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CredentialPolicy = void 0; -const RequestPolicy_js_1 = __nccwpck_require__(3165); +const RequestPolicy_js_1 = __nccwpck_require__(89937); /** * Credential policy used to sign HTTP(S) requests before sending. This is an * abstract class. @@ -78720,7 +78999,7 @@ exports.CredentialPolicy = CredentialPolicy; /***/ }), -/***/ 3165: +/***/ 89937: /***/ ((__unused_webpack_module, exports) => { @@ -78772,7 +79051,7 @@ exports.BaseRequestPolicy = BaseRequestPolicy; /***/ }), -/***/ 65473: +/***/ 61397: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78780,10 +79059,10 @@ exports.BaseRequestPolicy = BaseRequestPolicy; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageBrowserPolicy = void 0; -const RequestPolicy_js_1 = __nccwpck_require__(3165); -const core_util_1 = __nccwpck_require__(33000); -const constants_js_1 = __nccwpck_require__(8484); -const utils_common_js_1 = __nccwpck_require__(60481); +const RequestPolicy_js_1 = __nccwpck_require__(89937); +const core_util_1 = __nccwpck_require__(83519); +const constants_js_1 = __nccwpck_require__(41912); +const utils_common_js_1 = __nccwpck_require__(63789); /** * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: * @@ -78829,7 +79108,7 @@ exports.StorageBrowserPolicy = StorageBrowserPolicy; /***/ }), -/***/ 57641: +/***/ 68469: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78838,9 +79117,9 @@ exports.StorageBrowserPolicy = StorageBrowserPolicy; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageBrowserPolicyName = void 0; exports.storageBrowserPolicy = storageBrowserPolicy; -const core_util_1 = __nccwpck_require__(33000); -const constants_js_1 = __nccwpck_require__(8484); -const utils_common_js_1 = __nccwpck_require__(60481); +const core_util_1 = __nccwpck_require__(83519); +const constants_js_1 = __nccwpck_require__(41912); +const utils_common_js_1 = __nccwpck_require__(63789); /** * The programmatic identifier of the StorageBrowserPolicy. */ @@ -78870,7 +79149,7 @@ function storageBrowserPolicy() { /***/ }), -/***/ 30134: +/***/ 90: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78879,7 +79158,7 @@ function storageBrowserPolicy() { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageCorrectContentLengthPolicyName = void 0; exports.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; -const constants_js_1 = __nccwpck_require__(8484); +const constants_js_1 = __nccwpck_require__(41912); /** * The programmatic identifier of the storageCorrectContentLengthPolicy. */ @@ -78907,51 +79186,7 @@ function storageCorrectContentLengthPolicy() { /***/ }), -/***/ 14047: -/***/ ((__unused_webpack_module, exports) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.storageRequestFailureDetailsParserPolicyName = void 0; -exports.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; -/** - * The programmatic identifier of the StorageRequestFailureDetailsParserPolicy. - */ -exports.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; -/** - * StorageRequestFailureDetailsParserPolicy - */ -function storageRequestFailureDetailsParserPolicy() { - return { - name: exports.storageRequestFailureDetailsParserPolicyName, - async sendRequest(request, next) { - try { - const response = await next(request); - return response; - } - catch (err) { - if (typeof err === "object" && - err !== null && - err.response && - err.response.parsedBody) { - if (err.response.parsedBody.code === "InvalidHeaderValue" && - err.response.parsedBody.HeaderName === "x-ms-version") { - err.message = - "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; - } - } - throw err; - } - }, - }; -} -//# sourceMappingURL=StorageRequestFailureDetailsParserPolicy.js.map - -/***/ }), - -/***/ 65975: +/***/ 5571: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -78961,11 +79196,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageRetryPolicy = void 0; exports.NewRetryPolicyFactory = NewRetryPolicyFactory; const abort_controller_1 = __nccwpck_require__(49797); -const RequestPolicy_js_1 = __nccwpck_require__(3165); -const constants_js_1 = __nccwpck_require__(8484); -const utils_common_js_1 = __nccwpck_require__(60481); -const log_js_1 = __nccwpck_require__(85541); -const StorageRetryPolicyType_js_1 = __nccwpck_require__(73087); +const RequestPolicy_js_1 = __nccwpck_require__(89937); +const constants_js_1 = __nccwpck_require__(41912); +const utils_common_js_1 = __nccwpck_require__(63789); +const log_js_1 = __nccwpck_require__(78393); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(94171); /** * A factory method used to generated a RetryPolicy factory. * @@ -79130,20 +79365,21 @@ class StorageRetryPolicy extends RequestPolicy_js_1.BaseRequestPolicy { return true; } } - if (response) { - // Retry select Copy Source Error Codes. - if (response?.status >= 400) { - const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); - if (copySourceError !== undefined) { - switch (copySourceError) { - case "InternalError": - case "OperationTimedOut": - case "ServerBusy": - return true; - } - } - } - } + // [Copy source error code] Feature is pending on service side, skip retry on copy source error for now. + // if (response) { + // // Retry select Copy Source Error Codes. + // if (response?.status >= 400) { + // const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode); + // if (copySourceError !== undefined) { + // switch (copySourceError) { + // case "InternalError": + // case "OperationTimedOut": + // case "ServerBusy": + // return true; + // } + // } + // } + // } if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; @@ -79181,7 +79417,7 @@ exports.StorageRetryPolicy = StorageRetryPolicy; /***/ }), -/***/ 73087: +/***/ 94171: /***/ ((__unused_webpack_module, exports) => { @@ -79207,7 +79443,7 @@ var StorageRetryPolicyType; /***/ }), -/***/ 67135: +/***/ 92531: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -79217,12 +79453,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageRetryPolicyName = void 0; exports.storageRetryPolicy = storageRetryPolicy; const abort_controller_1 = __nccwpck_require__(49797); -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const core_util_1 = __nccwpck_require__(33000); -const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(87848); -const constants_js_1 = __nccwpck_require__(8484); -const utils_common_js_1 = __nccwpck_require__(60481); -const log_js_1 = __nccwpck_require__(85541); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const core_util_1 = __nccwpck_require__(83519); +const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(24748); +const constants_js_1 = __nccwpck_require__(41912); +const utils_common_js_1 = __nccwpck_require__(63789); +const log_js_1 = __nccwpck_require__(78393); /** * Name of the {@link storageRetryPolicy} */ @@ -79293,20 +79529,21 @@ function storageRetryPolicy(options = {}) { return true; } } - if (response) { - // Retry select Copy Source Error Codes. - if (response?.status >= 400) { - const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); - if (copySourceError !== undefined) { - switch (copySourceError) { - case "InternalError": - case "OperationTimedOut": - case "ServerBusy": - return true; - } - } - } - } + // [Copy source error code] Feature is pending on service side, skip retry on copy source error for now. + // if (response) { + // // Retry select Copy Source Error Codes. + // if (response?.status >= 400) { + // const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode); + // if (copySourceError !== undefined) { + // switch (copySourceError) { + // case "InternalError": + // case "OperationTimedOut": + // case "ServerBusy": + // return true; + // } + // } + // } + // } return false; } function calculateDelay(isPrimaryRetry, attempt) { @@ -79381,7 +79618,7 @@ function storageRetryPolicy(options = {}) { /***/ }), -/***/ 9640: +/***/ 76300: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -79389,10 +79626,10 @@ function storageRetryPolicy(options = {}) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageSharedKeyCredentialPolicy = void 0; -const constants_js_1 = __nccwpck_require__(8484); -const utils_common_js_1 = __nccwpck_require__(60481); -const CredentialPolicy_js_1 = __nccwpck_require__(21503); -const SharedKeyComparator_js_1 = __nccwpck_require__(41349); +const constants_js_1 = __nccwpck_require__(41912); +const utils_common_js_1 = __nccwpck_require__(63789); +const CredentialPolicy_js_1 = __nccwpck_require__(10923); +const SharedKeyComparator_js_1 = __nccwpck_require__(43977); /** * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. */ @@ -79536,7 +79773,7 @@ exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; /***/ }), -/***/ 30332: +/***/ 1048: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -79546,9 +79783,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageSharedKeyCredentialPolicyName = void 0; exports.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; const node_crypto_1 = __nccwpck_require__(77598); -const constants_js_1 = __nccwpck_require__(8484); -const utils_common_js_1 = __nccwpck_require__(60481); -const SharedKeyComparator_js_1 = __nccwpck_require__(41349); +const constants_js_1 = __nccwpck_require__(41912); +const utils_common_js_1 = __nccwpck_require__(63789); +const SharedKeyComparator_js_1 = __nccwpck_require__(43977); /** * The programmatic identifier of the storageSharedKeyCredentialPolicy. */ @@ -79678,7 +79915,7 @@ function storageSharedKeyCredentialPolicy(options) { /***/ }), -/***/ 41349: +/***/ 43977: /***/ ((__unused_webpack_module, exports) => { @@ -79760,7 +79997,7 @@ function isLessThan(lhs, rhs) { /***/ }), -/***/ 8484: +/***/ 41912: /***/ ((__unused_webpack_module, exports) => { @@ -79833,7 +80070,7 @@ exports.PathStylePorts = [ /***/ }), -/***/ 60481: +/***/ 63789: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -79867,9 +80104,9 @@ exports.attachCredential = attachCredential; exports.httpAuthorizationToString = httpAuthorizationToString; exports.EscapePath = EscapePath; exports.assertResponse = assertResponse; -const core_rest_pipeline_1 = __nccwpck_require__(81591); -const core_util_1 = __nccwpck_require__(33000); -const constants_js_1 = __nccwpck_require__(8484); +const core_rest_pipeline_1 = __nccwpck_require__(95397); +const core_util_1 = __nccwpck_require__(83519); +const constants_js_1 = __nccwpck_require__(41912); /** * Reserved URL characters must be properly escaped for Storage services like Blob or File. * @@ -82025,7 +82262,7 @@ module.exports = parseParams /***/ }), -/***/ 37455: +/***/ 30685: /***/ ((__unused_webpack_module, exports) => { @@ -82073,7 +82310,7 @@ exports.AbortError = AbortError; /***/ }), -/***/ 48006: +/***/ 57824: /***/ ((__unused_webpack_module, exports) => { @@ -82112,7 +82349,7 @@ function isApiKeyCredential(credential) { /***/ }), -/***/ 37248: +/***/ 25074: /***/ ((__unused_webpack_module, exports) => { @@ -82123,7 +82360,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 30196: +/***/ 1122: /***/ ((__unused_webpack_module, exports) => { @@ -82134,7 +82371,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 86247: +/***/ 2681: /***/ ((__unused_webpack_module, exports) => { @@ -82167,7 +82404,7 @@ function apiVersionPolicy(options) { /***/ }), -/***/ 78005: +/***/ 76543: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82176,14 +82413,14 @@ function apiVersionPolicy(options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createDefaultPipeline = createDefaultPipeline; exports.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; -const defaultHttpClient_js_1 = __nccwpck_require__(80475); -const createPipelineFromOptions_js_1 = __nccwpck_require__(97589); -const apiVersionPolicy_js_1 = __nccwpck_require__(86247); -const credentials_js_1 = __nccwpck_require__(48006); -const apiKeyAuthenticationPolicy_js_1 = __nccwpck_require__(97274); -const basicAuthenticationPolicy_js_1 = __nccwpck_require__(22535); -const bearerAuthenticationPolicy_js_1 = __nccwpck_require__(82368); -const oauth2AuthenticationPolicy_js_1 = __nccwpck_require__(50842); +const defaultHttpClient_js_1 = __nccwpck_require__(35521); +const createPipelineFromOptions_js_1 = __nccwpck_require__(7959); +const apiVersionPolicy_js_1 = __nccwpck_require__(2681); +const credentials_js_1 = __nccwpck_require__(57824); +const apiKeyAuthenticationPolicy_js_1 = __nccwpck_require__(25456); +const basicAuthenticationPolicy_js_1 = __nccwpck_require__(43641); +const bearerAuthenticationPolicy_js_1 = __nccwpck_require__(27686); +const oauth2AuthenticationPolicy_js_1 = __nccwpck_require__(94052); let cachedHttpClient; /** * Creates a default rest pipeline to re-use accross Rest Level Clients @@ -82218,7 +82455,7 @@ function getCachedDefaultHttpsClient() { /***/ }), -/***/ 2338: +/***/ 36008: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82226,10 +82463,10 @@ function getCachedDefaultHttpsClient() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getClient = getClient; -const clientHelpers_js_1 = __nccwpck_require__(78005); -const sendRequest_js_1 = __nccwpck_require__(42526); -const urlHelpers_js_1 = __nccwpck_require__(45263); -const checkEnvironment_js_1 = __nccwpck_require__(15777); +const clientHelpers_js_1 = __nccwpck_require__(76543); +const sendRequest_js_1 = __nccwpck_require__(91440); +const urlHelpers_js_1 = __nccwpck_require__(97441); +const checkEnvironment_js_1 = __nccwpck_require__(71227); /** * Creates a client with a default pipeline * @param endpoint - Base endpoint for the client @@ -82237,8 +82474,9 @@ const checkEnvironment_js_1 = __nccwpck_require__(15777); * @param options - Client options */ function getClient(endpoint, clientOptions = {}) { - const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); - if (clientOptions.additionalPolicies?.length) { + 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) { // Sign happens after Retry and is commonly needed to occur // before policies that intercept post-retry. @@ -82249,9 +82487,9 @@ function getClient(endpoint, clientOptions = {}) { } } const { allowInsecureConnection, httpClient } = clientOptions; - const endpointUrl = clientOptions.endpoint ?? endpoint; + const endpointUrl = (_c = clientOptions.endpoint) !== null && _c !== void 0 ? _c : endpoint; const client = (path, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path, args, { allowInsecureConnection, ...requestOptions }); + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path, args, Object.assign({ allowInsecureConnection }, requestOptions)); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -82286,22 +82524,23 @@ function getClient(endpoint, clientOptions = {}) { }; } function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { - allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + var _a; + allowInsecureConnection = (_a = options.allowInsecureConnection) !== null && _a !== void 0 ? _a : allowInsecureConnection; return { then: function (onFulfilled, onrejected) { - return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection }), httpClient).then(onFulfilled, onrejected); }, async asBrowserStream() { if (checkEnvironment_js_1.isNodeLike) { throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); } else { - return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection, responseAsStream: true }), httpClient); } }, async asNodeStream() { if (checkEnvironment_js_1.isNodeLike) { - return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection, responseAsStream: true }), httpClient); } else { throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); @@ -82313,7 +82552,7 @@ function buildOperation(method, url, pipeline, options, allowInsecureConnection, /***/ }), -/***/ 44093: +/***/ 55475: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82322,10 +82561,10 @@ function buildOperation(method, url, pipeline, options, allowInsecureConnection, Object.defineProperty(exports, "__esModule", ({ value: true })); exports.buildBodyPart = buildBodyPart; exports.buildMultipartBody = buildMultipartBody; -const restError_js_1 = __nccwpck_require__(39885); -const httpHeaders_js_1 = __nccwpck_require__(38411); -const bytesEncoding_js_1 = __nccwpck_require__(62408); -const typeGuards_js_1 = __nccwpck_require__(86974); +const restError_js_1 = __nccwpck_require__(34935); +const httpHeaders_js_1 = __nccwpck_require__(45725); +const bytesEncoding_js_1 = __nccwpck_require__(78550); +const typeGuards_js_1 = __nccwpck_require__(42744); /** * Get value of a header in the part descriptor ignoring case */ @@ -82373,6 +82612,7 @@ function escapeDispositionField(value) { return JSON.stringify(value); } function getContentDisposition(descriptor) { + var _a; const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); if (contentDispositionHeader) { return contentDispositionHeader; @@ -82382,7 +82622,7 @@ function getContentDisposition(descriptor) { descriptor.filename === undefined) { return undefined; } - const dispositionType = descriptor.dispositionType ?? "form-data"; + const dispositionType = (_a = descriptor.dispositionType) !== null && _a !== void 0 ? _a : "form-data"; let disposition = dispositionType; if (descriptor.name) { disposition += `; name=${escapeDispositionField(descriptor.name)}`; @@ -82421,9 +82661,10 @@ function normalizeBody(body, contentType) { throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); } function buildBodyPart(descriptor) { + var _a; const contentType = getPartContentType(descriptor); const contentDisposition = getContentDisposition(descriptor); - const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + const headers = (0, httpHeaders_js_1.createHttpHeaders)((_a = descriptor.headers) !== null && _a !== void 0 ? _a : {}); if (contentType) { headers.set("content-type", contentType); } @@ -82443,7 +82684,7 @@ function buildMultipartBody(parts) { /***/ }), -/***/ 89440: +/***/ 78130: /***/ ((__unused_webpack_module, exports) => { @@ -82457,14 +82698,15 @@ exports.operationOptionsToRequestParameters = operationOptionsToRequestParameter * @returns the result of the conversion in RequestParameters of RLC layer */ function operationOptionsToRequestParameters(options) { + var _a, _b, _c, _d, _e, _f; return { - allowInsecureConnection: options.requestOptions?.allowInsecureConnection, - timeout: options.requestOptions?.timeout, - skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + allowInsecureConnection: (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.allowInsecureConnection, + timeout: (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.timeout, + skipUrlEncoding: (_c = options.requestOptions) === null || _c === void 0 ? void 0 : _c.skipUrlEncoding, abortSignal: options.abortSignal, - onUploadProgress: options.requestOptions?.onUploadProgress, - onDownloadProgress: options.requestOptions?.onDownloadProgress, - headers: { ...options.requestOptions?.headers }, + onUploadProgress: (_d = options.requestOptions) === null || _d === void 0 ? void 0 : _d.onUploadProgress, + onDownloadProgress: (_e = options.requestOptions) === null || _e === void 0 ? void 0 : _e.onDownloadProgress, + headers: Object.assign({}, (_f = options.requestOptions) === null || _f === void 0 ? void 0 : _f.headers), onResponse: options.onResponse, }; } @@ -82472,7 +82714,7 @@ function operationOptionsToRequestParameters(options) { /***/ }), -/***/ 71365: +/***/ 90471: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82480,26 +82722,28 @@ function operationOptionsToRequestParameters(options) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createRestError = createRestError; -const restError_js_1 = __nccwpck_require__(39885); -const httpHeaders_js_1 = __nccwpck_require__(38411); +const restError_js_1 = __nccwpck_require__(34935); +const httpHeaders_js_1 = __nccwpck_require__(45725); function createRestError(messageOrResponse, response) { + var _a, _b, _c; const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; - const internalError = resp.body?.error ?? resp.body; + 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 - : (internalError?.message ?? `Unexpected status code: ${resp.status}`); + : ((_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?.code, + 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: statusCodeToNumber(response.status) ?? -1, + status: (_a = statusCodeToNumber(response.status)) !== null && _a !== void 0 ? _a : -1, }; } function statusCodeToNumber(statusCode) { @@ -82510,7 +82754,7 @@ function statusCodeToNumber(statusCode) { /***/ }), -/***/ 42526: +/***/ 91440: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82518,12 +82762,12 @@ function statusCodeToNumber(statusCode) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.sendRequest = sendRequest; -const restError_js_1 = __nccwpck_require__(39885); -const httpHeaders_js_1 = __nccwpck_require__(38411); -const pipelineRequest_js_1 = __nccwpck_require__(90738); -const clientHelpers_js_1 = __nccwpck_require__(78005); -const typeGuards_js_1 = __nccwpck_require__(86974); -const multipart_js_1 = __nccwpck_require__(44093); +const restError_js_1 = __nccwpck_require__(34935); +const httpHeaders_js_1 = __nccwpck_require__(45725); +const pipelineRequest_js_1 = __nccwpck_require__(82264); +const clientHelpers_js_1 = __nccwpck_require__(76543); +const typeGuards_js_1 = __nccwpck_require__(42744); +const multipart_js_1 = __nccwpck_require__(55475); /** * Helper function to send request used by the client * @param method - method to use to send the request @@ -82534,16 +82778,17 @@ const multipart_js_1 = __nccwpck_require__(44093); * @returns returns and HttpResponse */ async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { - const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + var _a; + const httpClient = customHttpClient !== null && customHttpClient !== void 0 ? customHttpClient : (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); const request = buildPipelineRequest(method, url, options); try { const response = await pipeline.sendRequest(httpClient, request); const headers = response.headers.toJSON(); - const stream = response.readableStreamBody ?? response.browserStreamBody; + const stream = (_a = response.readableStreamBody) !== null && _a !== void 0 ? _a : response.browserStreamBody; const parsedBody = options.responseAsStream || stream !== undefined ? undefined : getResponseBody(response); - const body = stream ?? parsedBody; - if (options?.onResponse) { - options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + const body = stream !== null && stream !== void 0 ? stream : parsedBody; + if (options === null || options === void 0 ? void 0 : options.onResponse) { + options.onResponse(Object.assign(Object.assign({}, response), { request, rawHeaders: headers, parsedBody })); } return { request, @@ -82557,7 +82802,7 @@ async function sendRequest(method, url, pipeline, options = {}, customHttpClient const { response } = e; const rawHeaders = response.headers.toJSON(); // UNBRANDED DIFFERENCE: onResponse callback does not have a second __legacyError property - options?.onResponse({ ...response, request, rawHeaders }, e); + options === null || options === void 0 ? void 0 : options.onResponse(Object.assign(Object.assign({}, response), { request, rawHeaders }), e); } throw e; } @@ -82568,9 +82813,8 @@ async function sendRequest(method, url, pipeline, options = {}, customHttpClient * @returns returns the content-type */ function getRequestContentType(options = {}) { - return (options.contentType ?? - options.headers?.["content-type"] ?? - getContentType(options.body)); + var _a, _b, _c; + return ((_c = (_a = options.contentType) !== null && _a !== void 0 ? _a : (_b = options.headers) === null || _b === void 0 ? void 0 : _b["content-type"]) !== null && _c !== void 0 ? _c : getContentType(options.body)); } /** * Function to determine the content-type of a body @@ -82596,17 +82840,14 @@ function getContentType(body) { return "application/json"; } function buildPipelineRequest(method, url, options = {}) { + var _a, _b, _c; const requestContentType = getRequestContentType(options); const { body, multipartBody } = getRequestBody(options.body, requestContentType); const hasContent = body !== undefined || multipartBody !== undefined; - const headers = (0, httpHeaders_js_1.createHttpHeaders)({ - ...(options.headers ? options.headers : {}), - accept: options.accept ?? options.headers?.accept ?? "application/json", - ...(hasContent && - requestContentType && { - "content-type": requestContentType, - }), - }); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(Object.assign(Object.assign(Object.assign({}, (options.headers ? options.headers : {})), { accept: (_c = (_a = options.accept) !== null && _a !== void 0 ? _a : (_b = options.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, @@ -82662,10 +82903,11 @@ function getRequestBody(body, contentType = "") { * Prepares the response body */ function getResponseBody(response) { + var _a, _b; // Set the default response type - const contentType = response.headers.get("content-type") ?? ""; + const contentType = (_a = response.headers.get("content-type")) !== null && _a !== void 0 ? _a : ""; const firstType = contentType.split(";")[0]; - const bodyToParse = response.bodyAsText ?? ""; + const bodyToParse = (_b = response.bodyAsText) !== null && _b !== void 0 ? _b : ""; if (firstType === "text/plain") { return String(bodyToParse); } @@ -82685,8 +82927,9 @@ function getResponseBody(response) { } } function createParseError(response, err) { + var _a; const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; - const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + 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, @@ -82698,7 +82941,7 @@ function createParseError(response, err) { /***/ }), -/***/ 45263: +/***/ 97441: /***/ ((__unused_webpack_module, exports) => { @@ -82771,6 +83014,7 @@ function getQueryParamValue(key, allowReserved, style, param) { return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; } function appendQueryParams(url, options = {}) { + var _a, _b, _c, _d; if (!options.queryParameters) { return url; } @@ -82784,18 +83028,18 @@ function appendQueryParams(url, options = {}) { } const hasMetadata = isQueryParameterWithOptions(param); const rawValue = hasMetadata ? param.value : param; - const explode = hasMetadata ? (param.explode ?? false) : false; + 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, options.skipUrlEncoding ?? false, style, item)); + paramStrings.push(getQueryParamValue(key, (_b = options.skipUrlEncoding) !== null && _b !== void 0 ? _b : false, style, item)); } } else if (typeof rawValue === "object") { // For object explode, the name of the query parameter is ignored and we use the object key instead for (const [actualKey, value] of Object.entries(rawValue)) { - paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + paramStrings.push(getQueryParamValue(actualKey, (_c = options.skipUrlEncoding) !== null && _c !== void 0 ? _c : false, style, value)); } } else { @@ -82804,7 +83048,7 @@ function appendQueryParams(url, options = {}) { } } else { - paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + paramStrings.push(getQueryParamValue(key, (_d = options.skipUrlEncoding) !== null && _d !== void 0 ? _d : false, style, rawValue)); } } if (parsedUrl.search !== "") { @@ -82814,6 +83058,7 @@ function appendQueryParams(url, options = {}) { return parsedUrl.toString(); } function buildBaseUrl(endpoint, options) { + var _a; if (!options.pathParameters) { return endpoint; } @@ -82829,13 +83074,14 @@ function buildBaseUrl(endpoint, options) { if (!options.skipUrlEncoding) { value = encodeURIComponent(param); } - endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + endpoint = (_a = replaceAll(endpoint, `{${key}}`, value)) !== null && _a !== void 0 ? _a : ""; } return endpoint; } function buildRoutePath(routePath, pathParameters, options = {}) { + var _a; for (const pathParam of pathParameters) { - const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + const allowReserved = typeof pathParam === "object" && ((_a = pathParam.allowReserved) !== null && _a !== void 0 ? _a : false); let value = typeof pathParam === "object" ? pathParam.value : pathParam; if (!options.skipUrlEncoding && !allowReserved) { value = encodeURIComponent(value); @@ -82858,7 +83104,7 @@ function replaceAll(value, searchValue, replaceValue) { /***/ }), -/***/ 35124: +/***/ 55134: /***/ ((__unused_webpack_module, exports) => { @@ -82866,13 +83112,13 @@ function replaceAll(value, searchValue, replaceValue) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; -exports.SDK_VERSION = "0.3.2"; +exports.SDK_VERSION = "0.3.0"; exports.DEFAULT_RETRY_POLICY_COUNT = 3; //# sourceMappingURL=constants.js.map /***/ }), -/***/ 97589: +/***/ 7959: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82880,18 +83126,18 @@ exports.DEFAULT_RETRY_POLICY_COUNT = 3; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createPipelineFromOptions = createPipelineFromOptions; -const logPolicy_js_1 = __nccwpck_require__(45108); -const pipeline_js_1 = __nccwpck_require__(46415); -const redirectPolicy_js_1 = __nccwpck_require__(8884); -const userAgentPolicy_js_1 = __nccwpck_require__(49046); -const decompressResponsePolicy_js_1 = __nccwpck_require__(82576); -const defaultRetryPolicy_js_1 = __nccwpck_require__(46893); -const formDataPolicy_js_1 = __nccwpck_require__(94910); -const checkEnvironment_js_1 = __nccwpck_require__(15777); -const proxyPolicy_js_1 = __nccwpck_require__(67010); -const agentPolicy_js_1 = __nccwpck_require__(66683); -const tlsPolicy_js_1 = __nccwpck_require__(40023); -const multipartPolicy_js_1 = __nccwpck_require__(72858); +const logPolicy_js_1 = __nccwpck_require__(41226); +const pipeline_js_1 = __nccwpck_require__(82353); +const redirectPolicy_js_1 = __nccwpck_require__(62554); +const userAgentPolicy_js_1 = __nccwpck_require__(42724); +const decompressResponsePolicy_js_1 = __nccwpck_require__(45874); +const defaultRetryPolicy_js_1 = __nccwpck_require__(11203); +const formDataPolicy_js_1 = __nccwpck_require__(72964); +const checkEnvironment_js_1 = __nccwpck_require__(71227); +const proxyPolicy_js_1 = __nccwpck_require__(84520); +const agentPolicy_js_1 = __nccwpck_require__(91121); +const tlsPolicy_js_1 = __nccwpck_require__(80089); +const multipartPolicy_js_1 = __nccwpck_require__(80196); /** * Create a new pipeline with a default set of customizable policies. * @param options - Options to configure a custom pipeline. @@ -82927,7 +83173,7 @@ function createPipelineFromOptions(options) { /***/ }), -/***/ 80475: +/***/ 35521: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82935,7 +83181,7 @@ function createPipelineFromOptions(options) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createDefaultHttpClient = createDefaultHttpClient; -const nodeHttpClient_js_1 = __nccwpck_require__(67170); +const nodeHttpClient_js_1 = __nccwpck_require__(76568); /** * Create the correct HttpClient for the current environment. */ @@ -82946,7 +83192,7 @@ function createDefaultHttpClient() { /***/ }), -/***/ 38411: +/***/ 45725: /***/ ((__unused_webpack_module, exports) => { @@ -82963,7 +83209,6 @@ function* headerIterator(map) { } } class HttpHeadersImpl { - _headersMap; constructor(rawHeaders) { this._headersMap = new Map(); if (rawHeaders) { @@ -82987,7 +83232,8 @@ class HttpHeadersImpl { * @param name - The name of the header. This value is case-insensitive. */ get(name) { - return this._headersMap.get(normalizeName(name))?.value; + 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. @@ -83044,7 +83290,7 @@ function createHttpHeaders(rawHeaders) { /***/ }), -/***/ 60957: +/***/ 50939: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83053,40 +83299,40 @@ function createHttpHeaders(rawHeaders) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createRestError = exports.operationOptionsToRequestParameters = exports.getClient = exports.createDefaultHttpClient = exports.uint8ArrayToString = exports.stringToUint8Array = exports.isRestError = exports.RestError = exports.createEmptyPipeline = exports.createPipelineRequest = exports.createHttpHeaders = exports.TypeSpecRuntimeLogger = exports.setLogLevel = exports.getLogLevel = exports.createClientLogger = exports.AbortError = void 0; const tslib_1 = __nccwpck_require__(67892); -var AbortError_js_1 = __nccwpck_require__(37455); +var AbortError_js_1 = __nccwpck_require__(30685); Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); -var logger_js_1 = __nccwpck_require__(87516); +var logger_js_1 = __nccwpck_require__(88922); Object.defineProperty(exports, "createClientLogger", ({ enumerable: true, get: function () { return logger_js_1.createClientLogger; } })); Object.defineProperty(exports, "getLogLevel", ({ enumerable: true, get: function () { return logger_js_1.getLogLevel; } })); Object.defineProperty(exports, "setLogLevel", ({ enumerable: true, get: function () { return logger_js_1.setLogLevel; } })); Object.defineProperty(exports, "TypeSpecRuntimeLogger", ({ enumerable: true, get: function () { return logger_js_1.TypeSpecRuntimeLogger; } })); -var httpHeaders_js_1 = __nccwpck_require__(38411); +var httpHeaders_js_1 = __nccwpck_require__(45725); Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); -tslib_1.__exportStar(__nccwpck_require__(30196), exports); -tslib_1.__exportStar(__nccwpck_require__(37248), exports); -var pipelineRequest_js_1 = __nccwpck_require__(90738); +tslib_1.__exportStar(__nccwpck_require__(1122), exports); +tslib_1.__exportStar(__nccwpck_require__(25074), exports); +var pipelineRequest_js_1 = __nccwpck_require__(82264); Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); -var pipeline_js_1 = __nccwpck_require__(46415); +var pipeline_js_1 = __nccwpck_require__(82353); Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); -var restError_js_1 = __nccwpck_require__(39885); +var restError_js_1 = __nccwpck_require__(34935); Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return restError_js_1.RestError; } })); Object.defineProperty(exports, "isRestError", ({ enumerable: true, get: function () { return restError_js_1.isRestError; } })); -var bytesEncoding_js_1 = __nccwpck_require__(62408); +var bytesEncoding_js_1 = __nccwpck_require__(78550); Object.defineProperty(exports, "stringToUint8Array", ({ enumerable: true, get: function () { return bytesEncoding_js_1.stringToUint8Array; } })); Object.defineProperty(exports, "uint8ArrayToString", ({ enumerable: true, get: function () { return bytesEncoding_js_1.uint8ArrayToString; } })); -var defaultHttpClient_js_1 = __nccwpck_require__(80475); +var defaultHttpClient_js_1 = __nccwpck_require__(35521); Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); -var getClient_js_1 = __nccwpck_require__(2338); +var getClient_js_1 = __nccwpck_require__(36008); Object.defineProperty(exports, "getClient", ({ enumerable: true, get: function () { return getClient_js_1.getClient; } })); -var operationOptionHelpers_js_1 = __nccwpck_require__(89440); +var operationOptionHelpers_js_1 = __nccwpck_require__(78130); Object.defineProperty(exports, "operationOptionsToRequestParameters", ({ enumerable: true, get: function () { return operationOptionHelpers_js_1.operationOptionsToRequestParameters; } })); -var restError_js_2 = __nccwpck_require__(71365); +var restError_js_2 = __nccwpck_require__(90471); Object.defineProperty(exports, "createRestError", ({ enumerable: true, get: function () { return restError_js_2.createRestError; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 83155: +/***/ 89133: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83094,20 +83340,20 @@ Object.defineProperty(exports, "createRestError", ({ enumerable: true, get: func // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.logger = void 0; -const logger_js_1 = __nccwpck_require__(87516); +const logger_js_1 = __nccwpck_require__(88922); exports.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); //# sourceMappingURL=log.js.map /***/ }), -/***/ 47801: +/***/ 75515: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -const log_js_1 = __nccwpck_require__(98340); +const log_js_1 = __nccwpck_require__(97566); const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; let enabledString; let enabledNamespaces = []; @@ -83128,13 +83374,14 @@ function enable(namespaces) { enabledString = namespaces; enabledNamespaces = []; skippedNamespaces = []; - const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + const wildcard = /\*/g; + const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); for (const ns of namespaceList) { if (ns.startsWith("-")) { - skippedNamespaces.push(ns.substring(1)); + skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); } else { - enabledNamespaces.push(ns); + enabledNamespaces.push(new RegExp(`^${ns}$`)); } } for (const instance of debuggers) { @@ -83146,110 +83393,17 @@ function enabled(namespace) { return true; } for (const skipped of skippedNamespaces) { - if (namespaceMatches(namespace, skipped)) { + if (skipped.test(namespace)) { return false; } } for (const enabledNamespace of enabledNamespaces) { - if (namespaceMatches(namespace, enabledNamespace)) { + if (enabledNamespace.test(namespace)) { return true; } } return false; } -/** - * Given a namespace, check if it matches a pattern. - * Patterns only have a single wildcard character which is *. - * The behavior of * is that it matches zero or more other characters. - */ -function namespaceMatches(namespace, patternToMatch) { - // simple case, no pattern matching required - if (patternToMatch.indexOf("*") === -1) { - return namespace === patternToMatch; - } - let pattern = patternToMatch; - // normalize successive * if needed - if (patternToMatch.indexOf("**") !== -1) { - const patternParts = []; - let lastCharacter = ""; - for (const character of patternToMatch) { - if (character === "*" && lastCharacter === "*") { - continue; - } - else { - lastCharacter = character; - patternParts.push(character); - } - } - pattern = patternParts.join(""); - } - let namespaceIndex = 0; - let patternIndex = 0; - const patternLength = pattern.length; - const namespaceLength = namespace.length; - let lastWildcard = -1; - let lastWildcardNamespace = -1; - while (namespaceIndex < namespaceLength && patternIndex < patternLength) { - if (pattern[patternIndex] === "*") { - lastWildcard = patternIndex; - patternIndex++; - if (patternIndex === patternLength) { - // if wildcard is the last character, it will match the remaining namespace string - return true; - } - // now we let the wildcard eat characters until we match the next literal in the pattern - while (namespace[namespaceIndex] !== pattern[patternIndex]) { - namespaceIndex++; - // reached the end of the namespace without a match - if (namespaceIndex === namespaceLength) { - return false; - } - } - // now that we have a match, let's try to continue on - // however, it's possible we could find a later match - // so keep a reference in case we have to backtrack - lastWildcardNamespace = namespaceIndex; - namespaceIndex++; - patternIndex++; - continue; - } - else if (pattern[patternIndex] === namespace[namespaceIndex]) { - // simple case: literal pattern matches so keep going - patternIndex++; - namespaceIndex++; - } - else if (lastWildcard >= 0) { - // special case: we don't have a literal match, but there is a previous wildcard - // which we can backtrack to and try having the wildcard eat the match instead - patternIndex = lastWildcard + 1; - namespaceIndex = lastWildcardNamespace + 1; - // we've reached the end of the namespace without a match - if (namespaceIndex === namespaceLength) { - return false; - } - // similar to the previous logic, let's keep going until we find the next literal match - while (namespace[namespaceIndex] !== pattern[patternIndex]) { - namespaceIndex++; - if (namespaceIndex === namespaceLength) { - return false; - } - } - lastWildcardNamespace = namespaceIndex; - namespaceIndex++; - patternIndex++; - continue; - } - else { - return false; - } - } - const namespaceDone = namespaceIndex === namespace.length; - const patternDone = patternIndex === pattern.length; - // this is to detect the case of an unneeded final wildcard - // e.g. the pattern `ab*` should match the string `ab` - const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; - return namespaceDone && (patternDone || trailingWildCard); -} function disable() { const result = enabledString || ""; enable(""); @@ -83293,7 +83447,7 @@ exports["default"] = debugObj; /***/ }), -/***/ 32033: +/***/ 44147: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83301,13 +83455,13 @@ exports["default"] = debugObj; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createLoggerContext = void 0; -var logger_js_1 = __nccwpck_require__(87516); +var logger_js_1 = __nccwpck_require__(88922); Object.defineProperty(exports, "createLoggerContext", ({ enumerable: true, get: function () { return logger_js_1.createLoggerContext; } })); //# sourceMappingURL=internal.js.map /***/ }), -/***/ 98340: +/***/ 97566: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83318,15 +83472,15 @@ exports.log = log; const tslib_1 = __nccwpck_require__(67892); const node_os_1 = __nccwpck_require__(48161); const node_util_1 = tslib_1.__importDefault(__nccwpck_require__(57975)); -const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(1708)); +const process = tslib_1.__importStar(__nccwpck_require__(1708)); function log(message, ...args) { - node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + process.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); } //# sourceMappingURL=log.js.map /***/ }), -/***/ 87516: +/***/ 88922: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83339,7 +83493,7 @@ exports.setLogLevel = setLogLevel; exports.getLogLevel = getLogLevel; exports.createClientLogger = createClientLogger; const tslib_1 = __nccwpck_require__(67892); -const debug_js_1 = tslib_1.__importDefault(__nccwpck_require__(47801)); +const debug_js_1 = tslib_1.__importDefault(__nccwpck_require__(75515)); const TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; const levelMap = { verbose: 400, @@ -83465,7 +83619,7 @@ function createClientLogger(namespace) { /***/ }), -/***/ 67170: +/***/ 76568: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83475,15 +83629,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getBodyLength = getBodyLength; exports.createNodeHttpClient = createNodeHttpClient; const tslib_1 = __nccwpck_require__(67892); -const node_http_1 = tslib_1.__importDefault(__nccwpck_require__(37067)); -const node_https_1 = tslib_1.__importDefault(__nccwpck_require__(44708)); -const node_zlib_1 = tslib_1.__importDefault(__nccwpck_require__(38522)); +const http = tslib_1.__importStar(__nccwpck_require__(37067)); +const https = tslib_1.__importStar(__nccwpck_require__(44708)); +const zlib = tslib_1.__importStar(__nccwpck_require__(38522)); const node_stream_1 = __nccwpck_require__(57075); -const AbortError_js_1 = __nccwpck_require__(37455); -const httpHeaders_js_1 = __nccwpck_require__(38411); -const restError_js_1 = __nccwpck_require__(39885); -const log_js_1 = __nccwpck_require__(83155); -const sanitizer_js_1 = __nccwpck_require__(87017); +const AbortError_js_1 = __nccwpck_require__(30685); +const httpHeaders_js_1 = __nccwpck_require__(45725); +const restError_js_1 = __nccwpck_require__(34935); +const log_js_1 = __nccwpck_require__(89133); +const sanitizer_js_1 = __nccwpck_require__(2843); const DEFAULT_TLS_SETTINGS = {}; function isReadableStream(body) { return body && typeof body.pipe === "function"; @@ -83508,8 +83662,6 @@ function isArrayBuffer(body) { return body && typeof body.byteLength === "number"; } class ReportTransform extends node_stream_1.Transform { - loadedBytes = 0; - progressCallback; // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type _transform(chunk, _encoding, callback) { this.push(chunk); @@ -83524,6 +83676,7 @@ class ReportTransform extends node_stream_1.Transform { } constructor(progressCallback) { super(); + this.loadedBytes = 0; this.progressCallback = progressCallback; } } @@ -83532,13 +83685,15 @@ class ReportTransform extends node_stream_1.Transform { * @internal */ class NodeHttpClient { - cachedHttpAgent; - cachedHttpsAgents = new WeakMap(); + constructor() { + this.cachedHttpsAgents = 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) { @@ -83561,7 +83716,7 @@ class NodeHttpClient { }, request.timeout); } const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + 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); @@ -83590,7 +83745,7 @@ class NodeHttpClient { clearTimeout(timeoutId); } const headers = getResponseHeaders(res); - const status = res.statusCode ?? 0; + const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; const response = { status, headers, @@ -83616,8 +83771,8 @@ class NodeHttpClient { } if ( // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || - request.streamResponseStatusCodes?.has(response.status)) { + ((_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 { @@ -83638,9 +83793,10 @@ class NodeHttpClient { } Promise.all([uploadStreamDone, downloadStreamDone]) .then(() => { + var _a; // eslint-disable-next-line promise/always-return if (abortListener) { - request.abortSignal?.removeEventListener("abort", abortListener); + (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener("abort", abortListener); } }) .catch((e) => { @@ -83650,25 +83806,19 @@ class NodeHttpClient { } } 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 = request.agent ?? this.getOrCreateAgent(request, isInsecure); - const options = { - agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }), - ...request.requestOverrides, - }; + const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); + const options = 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 ? node_http_1.default.request(options, resolve) : node_https_1.default.request(options, resolve); + const req = isInsecure ? http.request(options, resolve) : https.request(options, resolve); req.once("error", (err) => { - reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + var _a; + reject(new restError_js_1.RestError(err.message, { code: (_a = err.code) !== null && _a !== void 0 ? _a : 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."); @@ -83697,16 +83847,17 @@ class NodeHttpClient { }); } getOrCreateAgent(request, isInsecure) { + var _a; const disableKeepAlive = request.disableKeepAlive; // Handle Insecure requests first if (isInsecure) { if (disableKeepAlive) { // keepAlive:false is the default so we don't need a custom Agent - return node_http_1.default.globalAgent; + return http.globalAgent; } if (!this.cachedHttpAgent) { // If there is no cached agent create a new one and cache it. - this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + this.cachedHttpAgent = new http.Agent({ keepAlive: true }); } return this.cachedHttpAgent; } @@ -83714,10 +83865,10 @@ class NodeHttpClient { if (disableKeepAlive && !request.tlsSettings) { // When there are no tlsSettings and keepAlive is false // we don't need a custom agent - return node_https_1.default.globalAgent; + return https.globalAgent; } // We use the tlsSettings to index cached clients - const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; // Get the cached agent or create a new one with the // provided values for keepAlive and tlsSettings let agent = this.cachedHttpsAgents.get(tlsSettings); @@ -83725,12 +83876,9 @@ class NodeHttpClient { return agent; } log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new node_https_1.default.Agent({ + agent = new https.Agent(Object.assign({ // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive, - // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. - ...tlsSettings, - }); + keepAlive: !disableKeepAlive }, tlsSettings)); this.cachedHttpsAgents.set(tlsSettings, agent); return agent; } @@ -83754,12 +83902,12 @@ function getResponseHeaders(res) { function getDecodedResponseStream(stream, headers) { const contentEncoding = headers.get("Content-Encoding"); if (contentEncoding === "gzip") { - const unzip = node_zlib_1.default.createGunzip(); + const unzip = zlib.createGunzip(); stream.pipe(unzip); return unzip; } else if (contentEncoding === "deflate") { - const inflate = node_zlib_1.default.createInflate(); + const inflate = zlib.createInflate(); stream.pipe(inflate); return inflate; } @@ -83780,7 +83928,7 @@ function streamToText(stream) { resolve(Buffer.concat(buffer).toString("utf8")); }); stream.on("error", (e) => { - if (e && e?.name === "AbortError") { + if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { reject(e); } else { @@ -83823,7 +83971,7 @@ function createNodeHttpClient() { /***/ }), -/***/ 46415: +/***/ 82353: /***/ ((__unused_webpack_module, exports) => { @@ -83838,10 +83986,10 @@ const ValidPhaseNames = new Set(["Deserialize", "Serialize", "Retry", "Sign"]); * @internal */ class HttpPipeline { - _policies = []; - _orderedPolicies; constructor(policies) { - this._policies = policies?.slice(0) ?? []; + var _a; + this._policies = []; + this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; this._orderedPolicies = undefined; } addPolicy(policy, options = {}) { @@ -84094,7 +84242,7 @@ function createEmptyPipeline() { /***/ }), -/***/ 90738: +/***/ 82264: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84102,46 +84250,28 @@ function createEmptyPipeline() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createPipelineRequest = createPipelineRequest; -const httpHeaders_js_1 = __nccwpck_require__(38411); -const uuidUtils_js_1 = __nccwpck_require__(58066); +const httpHeaders_js_1 = __nccwpck_require__(45725); +const uuidUtils_js_1 = __nccwpck_require__(27272); class PipelineRequestImpl { - url; - method; - headers; - timeout; - withCredentials; - body; - multipartBody; - formData; - streamResponseStatusCodes; - enableBrowserStreams; - proxySettings; - disableKeepAlive; - abortSignal; - requestId; - allowInsecureConnection; - onUploadProgress; - onDownloadProgress; - requestOverrides; - authSchemes; constructor(options) { + var _a, _b, _c, _d, _e, _f, _g; this.url = options.url; this.body = options.body; - this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = options.method ?? "GET"; - this.timeout = options.timeout ?? 0; + this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; + this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; this.multipartBody = options.multipartBody; this.formData = options.formData; - this.disableKeepAlive = options.disableKeepAlive ?? false; + this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; this.proxySettings = options.proxySettings; this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = options.withCredentials ?? false; + this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; this.abortSignal = options.abortSignal; this.onUploadProgress = options.onUploadProgress; this.onDownloadProgress = options.onDownloadProgress; this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); - this.allowInsecureConnection = options.allowInsecureConnection ?? false; - this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; + this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; this.requestOverrides = options.requestOverrides; this.authSchemes = options.authSchemes; } @@ -84158,7 +84288,7 @@ function createPipelineRequest(options) { /***/ }), -/***/ 66683: +/***/ 91121: /***/ ((__unused_webpack_module, exports) => { @@ -84190,7 +84320,7 @@ function agentPolicy(agent) { /***/ }), -/***/ 97274: +/***/ 25456: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84199,7 +84329,7 @@ function agentPolicy(agent) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.apiKeyAuthenticationPolicyName = void 0; exports.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; -const checkInsecureConnection_js_1 = __nccwpck_require__(3153); +const checkInsecureConnection_js_1 = __nccwpck_require__(24247); /** * Name of the API Key Authentication Policy */ @@ -84211,9 +84341,10 @@ function apiKeyAuthenticationPolicy(options) { return { name: exports.apiKeyAuthenticationPolicyName, async sendRequest(request, next) { + var _a, _b; // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); - const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + const scheme = (_b = ((_a = request.authSchemes) !== null && _a !== void 0 ? _a : options.authSchemes)) === null || _b === void 0 ? void 0 : _b.find((x) => x.kind === "apiKey"); // Skip adding authentication header if no API key authentication scheme is found if (!scheme) { return next(request); @@ -84230,7 +84361,7 @@ function apiKeyAuthenticationPolicy(options) { /***/ }), -/***/ 22535: +/***/ 43641: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84239,8 +84370,8 @@ function apiKeyAuthenticationPolicy(options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.basicAuthenticationPolicyName = void 0; exports.basicAuthenticationPolicy = basicAuthenticationPolicy; -const bytesEncoding_js_1 = __nccwpck_require__(62408); -const checkInsecureConnection_js_1 = __nccwpck_require__(3153); +const bytesEncoding_js_1 = __nccwpck_require__(78550); +const checkInsecureConnection_js_1 = __nccwpck_require__(24247); /** * Name of the Basic Authentication Policy */ @@ -84252,9 +84383,10 @@ function basicAuthenticationPolicy(options) { return { name: exports.basicAuthenticationPolicyName, async sendRequest(request, next) { + var _a, _b; // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); - const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + const scheme = (_b = ((_a = request.authSchemes) !== null && _a !== void 0 ? _a : options.authSchemes)) === null || _b === void 0 ? void 0 : _b.find((x) => x.kind === "http" && x.scheme === "basic"); // Skip adding authentication header if no basic authentication scheme is found if (!scheme) { return next(request); @@ -84270,7 +84402,7 @@ function basicAuthenticationPolicy(options) { /***/ }), -/***/ 82368: +/***/ 27686: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84279,7 +84411,7 @@ function basicAuthenticationPolicy(options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.bearerAuthenticationPolicyName = void 0; exports.bearerAuthenticationPolicy = bearerAuthenticationPolicy; -const checkInsecureConnection_js_1 = __nccwpck_require__(3153); +const checkInsecureConnection_js_1 = __nccwpck_require__(24247); /** * Name of the Bearer Authentication Policy */ @@ -84291,9 +84423,10 @@ function bearerAuthenticationPolicy(options) { return { name: exports.bearerAuthenticationPolicyName, async sendRequest(request, next) { + var _a, _b; // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); - const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + const scheme = (_b = ((_a = request.authSchemes) !== null && _a !== void 0 ? _a : options.authSchemes)) === null || _b === void 0 ? void 0 : _b.find((x) => x.kind === "http" && x.scheme === "bearer"); // Skip adding authentication header if no bearer authentication scheme is found if (!scheme) { return next(request); @@ -84310,7 +84443,7 @@ function bearerAuthenticationPolicy(options) { /***/ }), -/***/ 3153: +/***/ 24247: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84318,7 +84451,7 @@ function bearerAuthenticationPolicy(options) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ensureSecureConnection = ensureSecureConnection; -const log_js_1 = __nccwpck_require__(83155); +const log_js_1 = __nccwpck_require__(89133); // Ensure the warining is only emitted once let insecureConnectionWarningEmmitted = false; /** @@ -84346,7 +84479,7 @@ function allowInsecureConnection(request, options) { function emitInsecureConnectionWarning() { const warning = "Sending token over insecure transport. Assume any token issued is compromised."; log_js_1.logger.warning(warning); - if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + if (typeof (process === null || process === void 0 ? void 0 : process.emitWarning) === "function" && !insecureConnectionWarningEmmitted) { insecureConnectionWarningEmmitted = true; process.emitWarning(warning); } @@ -84369,7 +84502,7 @@ function ensureSecureConnection(request, options) { /***/ }), -/***/ 50842: +/***/ 94052: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84378,7 +84511,7 @@ function ensureSecureConnection(request, options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.oauth2AuthenticationPolicyName = void 0; exports.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; -const checkInsecureConnection_js_1 = __nccwpck_require__(3153); +const checkInsecureConnection_js_1 = __nccwpck_require__(24247); /** * Name of the OAuth2 Authentication Policy */ @@ -84390,9 +84523,10 @@ function oauth2AuthenticationPolicy(options) { return { name: exports.oauth2AuthenticationPolicyName, async sendRequest(request, next) { + var _a, _b; // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); - const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + const scheme = (_b = ((_a = request.authSchemes) !== null && _a !== void 0 ? _a : options.authSchemes)) === null || _b === void 0 ? void 0 : _b.find((x) => x.kind === "oauth2"); // Skip adding authentication header if no OAuth2 authentication scheme is found if (!scheme) { return next(request); @@ -84409,7 +84543,7 @@ function oauth2AuthenticationPolicy(options) { /***/ }), -/***/ 82576: +/***/ 45874: /***/ ((__unused_webpack_module, exports) => { @@ -84442,7 +84576,7 @@ function decompressResponsePolicy() { /***/ }), -/***/ 46893: +/***/ 11203: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84451,10 +84585,10 @@ function decompressResponsePolicy() { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultRetryPolicyName = void 0; exports.defaultRetryPolicy = defaultRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(25687); -const throttlingRetryStrategy_js_1 = __nccwpck_require__(79199); -const retryPolicy_js_1 = __nccwpck_require__(87180); -const constants_js_1 = __nccwpck_require__(35124); +const exponentialRetryStrategy_js_1 = __nccwpck_require__(30665); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(39321); +const retryPolicy_js_1 = __nccwpck_require__(29298); +const constants_js_1 = __nccwpck_require__(55134); /** * Name of the {@link defaultRetryPolicy} */ @@ -84466,10 +84600,11 @@ exports.defaultRetryPolicyName = "defaultRetryPolicy"; * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. */ function defaultRetryPolicy(options = {}) { + var _a; return { name: exports.defaultRetryPolicyName, sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, }).sendRequest, }; } @@ -84477,7 +84612,7 @@ function defaultRetryPolicy(options = {}) { /***/ }), -/***/ 60519: +/***/ 93221: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84486,9 +84621,9 @@ function defaultRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.exponentialRetryPolicyName = void 0; exports.exponentialRetryPolicy = exponentialRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(25687); -const retryPolicy_js_1 = __nccwpck_require__(87180); -const constants_js_1 = __nccwpck_require__(35124); +const exponentialRetryStrategy_js_1 = __nccwpck_require__(30665); +const retryPolicy_js_1 = __nccwpck_require__(29298); +const constants_js_1 = __nccwpck_require__(55134); /** * The programmatic identifier of the exponentialRetryPolicy. */ @@ -84498,20 +84633,18 @@ exports.exponentialRetryPolicyName = "exponentialRetryPolicy"; * @param options - Options that configure retry logic. */ function exponentialRetryPolicy(options = {}) { + var _a; return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ - ...options, - ignoreSystemErrors: true, - }), + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })), ], { - maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, }); } //# sourceMappingURL=exponentialRetryPolicy.js.map /***/ }), -/***/ 94910: +/***/ 72964: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84520,17 +84653,18 @@ function exponentialRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.formDataPolicyName = void 0; exports.formDataPolicy = formDataPolicy; -const bytesEncoding_js_1 = __nccwpck_require__(62408); -const checkEnvironment_js_1 = __nccwpck_require__(15777); -const httpHeaders_js_1 = __nccwpck_require__(38411); +const bytesEncoding_js_1 = __nccwpck_require__(78550); +const checkEnvironment_js_1 = __nccwpck_require__(71227); +const httpHeaders_js_1 = __nccwpck_require__(45725); /** * The programmatic identifier of the formDataPolicy. */ exports.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { + var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - formDataMap[key] ??= []; + (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : (formDataMap[key] = []); formDataMap[key].push(value); } return formDataMap; @@ -84581,7 +84715,7 @@ async function prepareFormData(formData, request) { // content type is specified and is not multipart/form-data. Exit. return; } - request.headers.set("Content-Type", contentType ?? "multipart/form-data"); + request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); // set body to MultipartRequestBody using content from FormDataMap const parts = []; for (const [fieldName, values] of Object.entries(formData)) { @@ -84617,7 +84751,7 @@ async function prepareFormData(formData, request) { /***/ }), -/***/ 43507: +/***/ 14025: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84625,53 +84759,53 @@ async function prepareFormData(formData, request) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.userAgentPolicyName = exports.userAgentPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.retryPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.defaultRetryPolicyName = exports.defaultRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.agentPolicyName = exports.agentPolicy = void 0; -var agentPolicy_js_1 = __nccwpck_require__(66683); +var agentPolicy_js_1 = __nccwpck_require__(91121); Object.defineProperty(exports, "agentPolicy", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicy; } })); Object.defineProperty(exports, "agentPolicyName", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicyName; } })); -var decompressResponsePolicy_js_1 = __nccwpck_require__(82576); +var decompressResponsePolicy_js_1 = __nccwpck_require__(45874); Object.defineProperty(exports, "decompressResponsePolicy", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicy; } })); Object.defineProperty(exports, "decompressResponsePolicyName", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } })); -var defaultRetryPolicy_js_1 = __nccwpck_require__(46893); +var defaultRetryPolicy_js_1 = __nccwpck_require__(11203); Object.defineProperty(exports, "defaultRetryPolicy", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicy; } })); Object.defineProperty(exports, "defaultRetryPolicyName", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicyName; } })); -var exponentialRetryPolicy_js_1 = __nccwpck_require__(60519); +var exponentialRetryPolicy_js_1 = __nccwpck_require__(93221); Object.defineProperty(exports, "exponentialRetryPolicy", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } })); Object.defineProperty(exports, "exponentialRetryPolicyName", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; } })); -var retryPolicy_js_1 = __nccwpck_require__(87180); +var retryPolicy_js_1 = __nccwpck_require__(29298); Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); -var systemErrorRetryPolicy_js_1 = __nccwpck_require__(87849); +var systemErrorRetryPolicy_js_1 = __nccwpck_require__(3099); Object.defineProperty(exports, "systemErrorRetryPolicy", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } })); Object.defineProperty(exports, "systemErrorRetryPolicyName", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } })); -var throttlingRetryPolicy_js_1 = __nccwpck_require__(34197); +var throttlingRetryPolicy_js_1 = __nccwpck_require__(34843); Object.defineProperty(exports, "throttlingRetryPolicy", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } })); Object.defineProperty(exports, "throttlingRetryPolicyName", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } })); -var formDataPolicy_js_1 = __nccwpck_require__(94910); +var formDataPolicy_js_1 = __nccwpck_require__(72964); Object.defineProperty(exports, "formDataPolicy", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicy; } })); Object.defineProperty(exports, "formDataPolicyName", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicyName; } })); -var logPolicy_js_1 = __nccwpck_require__(45108); +var logPolicy_js_1 = __nccwpck_require__(41226); Object.defineProperty(exports, "logPolicy", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicy; } })); Object.defineProperty(exports, "logPolicyName", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicyName; } })); -var multipartPolicy_js_1 = __nccwpck_require__(72858); +var multipartPolicy_js_1 = __nccwpck_require__(80196); Object.defineProperty(exports, "multipartPolicy", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicy; } })); Object.defineProperty(exports, "multipartPolicyName", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicyName; } })); -var proxyPolicy_js_1 = __nccwpck_require__(67010); +var proxyPolicy_js_1 = __nccwpck_require__(84520); Object.defineProperty(exports, "proxyPolicy", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicy; } })); Object.defineProperty(exports, "proxyPolicyName", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicyName; } })); Object.defineProperty(exports, "getDefaultProxySettings", ({ enumerable: true, get: function () { return proxyPolicy_js_1.getDefaultProxySettings; } })); -var redirectPolicy_js_1 = __nccwpck_require__(8884); +var redirectPolicy_js_1 = __nccwpck_require__(62554); Object.defineProperty(exports, "redirectPolicy", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicy; } })); Object.defineProperty(exports, "redirectPolicyName", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicyName; } })); -var tlsPolicy_js_1 = __nccwpck_require__(40023); +var tlsPolicy_js_1 = __nccwpck_require__(80089); Object.defineProperty(exports, "tlsPolicy", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicy; } })); Object.defineProperty(exports, "tlsPolicyName", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicyName; } })); -var userAgentPolicy_js_1 = __nccwpck_require__(49046); +var userAgentPolicy_js_1 = __nccwpck_require__(42724); Object.defineProperty(exports, "userAgentPolicy", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicy; } })); Object.defineProperty(exports, "userAgentPolicyName", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicyName; } })); //# sourceMappingURL=internal.js.map /***/ }), -/***/ 45108: +/***/ 41226: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84680,8 +84814,8 @@ Object.defineProperty(exports, "userAgentPolicyName", ({ enumerable: true, get: Object.defineProperty(exports, "__esModule", ({ value: true })); exports.logPolicyName = void 0; exports.logPolicy = logPolicy; -const log_js_1 = __nccwpck_require__(83155); -const sanitizer_js_1 = __nccwpck_require__(87017); +const log_js_1 = __nccwpck_require__(89133); +const sanitizer_js_1 = __nccwpck_require__(2843); /** * The programmatic identifier of the logPolicy. */ @@ -84691,7 +84825,8 @@ exports.logPolicyName = "logPolicy"; * @param options - Options to configure logPolicy. */ function logPolicy(options = {}) { - const logger = options.logger ?? log_js_1.logger.info; + var _a; + const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; const sanitizer = new sanitizer_js_1.Sanitizer({ additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, @@ -84714,7 +84849,7 @@ function logPolicy(options = {}) { /***/ }), -/***/ 72858: +/***/ 80196: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84723,10 +84858,10 @@ function logPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.multipartPolicyName = void 0; exports.multipartPolicy = multipartPolicy; -const bytesEncoding_js_1 = __nccwpck_require__(62408); -const typeGuards_js_1 = __nccwpck_require__(86974); -const uuidUtils_js_1 = __nccwpck_require__(58066); -const concat_js_1 = __nccwpck_require__(12820); +const bytesEncoding_js_1 = __nccwpck_require__(78550); +const typeGuards_js_1 = __nccwpck_require__(42744); +const uuidUtils_js_1 = __nccwpck_require__(27272); +const concat_js_1 = __nccwpck_require__(9002); function generateBoundary() { return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; } @@ -84801,6 +84936,7 @@ function multipartPolicy() { return { name: exports.multipartPolicyName, async sendRequest(request, next) { + var _a; if (!request.multipartBody) { return next(request); } @@ -84808,7 +84944,7 @@ function multipartPolicy() { throw new Error("multipartBody and regular body cannot be set at the same time"); } let boundary = request.multipartBody.boundary; - const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const 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}`); @@ -84817,7 +84953,7 @@ function multipartPolicy() { if (parsedBoundary && boundary && parsedBoundary !== boundary) { throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); } - boundary ??= parsedBoundary; + boundary !== null && boundary !== void 0 ? boundary : (boundary = parsedBoundary); if (boundary) { assertValidBoundary(boundary); } @@ -84835,7 +84971,7 @@ function multipartPolicy() { /***/ }), -/***/ 67010: +/***/ 84520: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84848,7 +84984,7 @@ exports.getDefaultProxySettings = getDefaultProxySettings; exports.proxyPolicy = proxyPolicy; const https_proxy_agent_1 = __nccwpck_require__(31475); const http_proxy_agent_1 = __nccwpck_require__(74249); -const log_js_1 = __nccwpck_require__(83155); +const log_js_1 = __nccwpck_require__(89133); const HTTPS_PROXY = "HTTPS_PROXY"; const HTTP_PROXY = "HTTP_PROXY"; const ALL_PROXY = "ALL_PROXY"; @@ -84893,7 +85029,7 @@ function isBypassed(uri, noProxyList, bypassedMap) { return false; } const host = new URL(uri).hostname; - if (bypassedMap?.has(host)) { + if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -84916,7 +85052,7 @@ function isBypassed(uri, noProxyList, bypassedMap) { } } } - bypassedMap?.set(host, isBypassedFlag); + bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -84966,7 +85102,7 @@ function getUrlFromProxySettings(settings) { try { parsedProxyUrl = new URL(settings.host); } - catch { + catch (_a) { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -85021,9 +85157,10 @@ function proxyPolicy(proxySettings, options) { return { name: exports.proxyPolicyName, async sendRequest(request, next) { + var _a; if (!request.proxySettings && defaultProxy && - !isBypassed(request.url, options?.customNoProxyList ?? exports.globalNoProxyList, options?.customNoProxyList ? undefined : globalBypassedMap)) { + !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? undefined : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { @@ -85037,7 +85174,7 @@ function proxyPolicy(proxySettings, options) { /***/ }), -/***/ 8884: +/***/ 62554: /***/ ((__unused_webpack_module, exports) => { @@ -85099,7 +85236,7 @@ async function handleRedirect(next, response, maxRetries, currentRetries = 0) { /***/ }), -/***/ 87180: +/***/ 29298: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85107,10 +85244,10 @@ async function handleRedirect(next, response, maxRetries, currentRetries = 0) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.retryPolicy = retryPolicy; -const helpers_js_1 = __nccwpck_require__(67943); -const AbortError_js_1 = __nccwpck_require__(37455); -const logger_js_1 = __nccwpck_require__(87516); -const constants_js_1 = __nccwpck_require__(35124); +const helpers_js_1 = __nccwpck_require__(82633); +const AbortError_js_1 = __nccwpck_require__(30685); +const logger_js_1 = __nccwpck_require__(88922); +const constants_js_1 = __nccwpck_require__(55134); const retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); /** * The programmatic identifier of the retryPolicy. @@ -85124,6 +85261,7 @@ function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_ return { name: retryPolicyName, async sendRequest(request, next) { + var _a, _b; let response; let responseError; let retryCount = -1; @@ -85147,12 +85285,12 @@ function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_ } response = responseError.response; } - if (request.abortSignal?.aborted) { + 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 >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); if (responseError) { throw responseError; @@ -85212,7 +85350,7 @@ function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_ /***/ }), -/***/ 87849: +/***/ 3099: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85221,9 +85359,9 @@ function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.systemErrorRetryPolicyName = void 0; exports.systemErrorRetryPolicy = systemErrorRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(25687); -const retryPolicy_js_1 = __nccwpck_require__(87180); -const constants_js_1 = __nccwpck_require__(35124); +const exponentialRetryStrategy_js_1 = __nccwpck_require__(30665); +const retryPolicy_js_1 = __nccwpck_require__(29298); +const constants_js_1 = __nccwpck_require__(55134); /** * Name of the {@link systemErrorRetryPolicy} */ @@ -85235,15 +85373,13 @@ exports.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; * @param options - Options that customize the policy. */ function systemErrorRetryPolicy(options = {}) { + var _a; return { name: exports.systemErrorRetryPolicyName, sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ - ...options, - ignoreHttpStatusCodes: true, - }), + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })), ], { - maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, }).sendRequest, }; } @@ -85251,7 +85387,7 @@ function systemErrorRetryPolicy(options = {}) { /***/ }), -/***/ 34197: +/***/ 34843: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85260,9 +85396,9 @@ function systemErrorRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.throttlingRetryPolicyName = void 0; exports.throttlingRetryPolicy = throttlingRetryPolicy; -const throttlingRetryStrategy_js_1 = __nccwpck_require__(79199); -const retryPolicy_js_1 = __nccwpck_require__(87180); -const constants_js_1 = __nccwpck_require__(35124); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(39321); +const retryPolicy_js_1 = __nccwpck_require__(29298); +const constants_js_1 = __nccwpck_require__(55134); /** * Name of the {@link throttlingRetryPolicy} */ @@ -85278,10 +85414,11 @@ exports.throttlingRetryPolicyName = "throttlingRetryPolicy"; * @param options - Options that configure retry logic. */ function throttlingRetryPolicy(options = {}) { + var _a; return { name: exports.throttlingRetryPolicyName, sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, }).sendRequest, }; } @@ -85289,7 +85426,7 @@ function throttlingRetryPolicy(options = {}) { /***/ }), -/***/ 40023: +/***/ 80089: /***/ ((__unused_webpack_module, exports) => { @@ -85321,7 +85458,7 @@ function tlsPolicy(tlsSettings) { /***/ }), -/***/ 49046: +/***/ 42724: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85330,7 +85467,7 @@ function tlsPolicy(tlsSettings) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.userAgentPolicyName = void 0; exports.userAgentPolicy = userAgentPolicy; -const userAgent_js_1 = __nccwpck_require__(53918); +const userAgent_js_1 = __nccwpck_require__(70224); const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); /** * The programmatic identifier of the userAgentPolicy. @@ -85357,7 +85494,7 @@ function userAgentPolicy(options = {}) { /***/ }), -/***/ 39885: +/***/ 34935: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85366,47 +85503,14 @@ function userAgentPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RestError = void 0; exports.isRestError = isRestError; -const error_js_1 = __nccwpck_require__(16356); -const inspect_js_1 = __nccwpck_require__(1122); -const sanitizer_js_1 = __nccwpck_require__(87017); +const error_js_1 = __nccwpck_require__(5782); +const inspect_js_1 = __nccwpck_require__(31456); +const sanitizer_js_1 = __nccwpck_require__(2843); const errorSanitizer = new sanitizer_js_1.Sanitizer(); /** * A custom error type for failed pipeline requests. */ class RestError extends Error { - /** - * Something went wrong when making the request. - * This means the actual request failed for some reason, - * such as a DNS issue or the connection being lost. - */ - static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - /** - * This means that parsing the response from the server failed. - * It may have been malformed. - */ - static PARSE_ERROR = "PARSE_ERROR"; - /** - * The code of the error itself (use statics on RestError if possible.) - */ - code; - /** - * The HTTP status code of the request (if applicable.) - */ - statusCode; - /** - * The request that was made. - * This property is non-enumerable. - */ - request; - /** - * The response received (if any.) - * This property is non-enumerable. - */ - response; - /** - * Bonus property set by the throw site. - */ - details; constructor(message, options = {}) { super(message); this.name = "RestError"; @@ -85418,24 +85522,12 @@ class RestError extends Error { // JSON.stringify and console.log. Object.defineProperty(this, "request", { value: options.request, enumerable: false }); Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - // Only include useful agent information in the request for logging, as the full agent object - // may contain large binary data. - const agent = this.request?.agent - ? { - maxFreeSockets: this.request.agent.maxFreeSockets, - maxSockets: this.request.agent.maxSockets, - } - : undefined; // Logging method for util.inspect in Node Object.defineProperty(this, inspect_js_1.custom, { value: () => { // Extract non-enumerable properties and add them back. This is OK since in this output the request and // response get sanitized. - return `RestError: ${this.message} \n ${errorSanitizer.sanitize({ - ...this, - request: { ...this.request, agent }, - response: this.response, - })}`; + return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; }, enumerable: false, }); @@ -85443,6 +85535,17 @@ class RestError extends Error { } } exports.RestError = RestError; +/** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ +RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; +/** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ +RestError.PARSE_ERROR = "PARSE_ERROR"; /** * Typeguard for RestError * @param e - Something caught by a catch clause. @@ -85457,7 +85560,7 @@ function isRestError(e) { /***/ }), -/***/ 25687: +/***/ 30665: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85467,8 +85570,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.exponentialRetryStrategy = exponentialRetryStrategy; exports.isExponentialRetryResponse = isExponentialRetryResponse; exports.isSystemError = isSystemError; -const delay_js_1 = __nccwpck_require__(63721); -const throttlingRetryStrategy_js_1 = __nccwpck_require__(79199); +const delay_js_1 = __nccwpck_require__(53171); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(39321); // intervals are in milliseconds const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; @@ -85478,8 +85581,9 @@ const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505). */ function exponentialRetryStrategy(options = {}) { - const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + var _a, _b; + const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; return { name: "exponentialRetryStrategy", retry({ retryCount, response, responseError }) { @@ -85531,7 +85635,7 @@ function isSystemError(err) { /***/ }), -/***/ 79199: +/***/ 39321: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85540,7 +85644,7 @@ function isSystemError(err) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isThrottlingRetryResponse = isThrottlingRetryResponse; exports.throttlingRetryStrategy = throttlingRetryStrategy; -const helpers_js_1 = __nccwpck_require__(67943); +const helpers_js_1 = __nccwpck_require__(82633); /** * The header that comes back from services representing * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry). @@ -85586,7 +85690,7 @@ function getRetryAfterInMs(response) { // negative diff would mean a date in the past, so retry asap with 0 milliseconds return Number.isFinite(diff) ? Math.max(0, diff) : undefined; } - catch { + catch (_a) { return undefined; } } @@ -85615,7 +85719,7 @@ function throttlingRetryStrategy() { /***/ }), -/***/ 62408: +/***/ 78550: /***/ ((__unused_webpack_module, exports) => { @@ -85646,12 +85750,13 @@ function stringToUint8Array(value, format) { /***/ }), -/***/ 15777: +/***/ 71227: /***/ ((__unused_webpack_module, exports) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +var _a, _b, _c, _d; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isReactNative = exports.isNodeRuntime = exports.isNodeLike = exports.isBun = exports.isDeno = exports.isWebWorker = exports.isBrowser = void 0; /** @@ -85663,10 +85768,10 @@ exports.isBrowser = typeof window !== "undefined" && typeof window.document !== * A constant that indicates whether the environment the code is running is a Web Worker. */ exports.isWebWorker = typeof self === "object" && - typeof self?.importScripts === "function" && - (self.constructor?.name === "DedicatedWorkerGlobalScope" || - self.constructor?.name === "ServiceWorkerGlobalScope" || - self.constructor?.name === "SharedWorkerGlobalScope"); + 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"); /** * A constant that indicates whether the environment the code is running is Deno. */ @@ -85682,7 +85787,7 @@ exports.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined" */ exports.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && - Boolean(globalThis.process.versions?.node); + Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); /** * A constant that indicates whether the environment the code is running is Node.JS. */ @@ -85691,12 +85796,12 @@ exports.isNodeRuntime = exports.isNodeLike && !exports.isBun && !exports.isDeno; * A constant that indicates whether the environment the code is running is in React-Native. */ // https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js -exports.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; +exports.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; //# sourceMappingURL=checkEnvironment.js.map /***/ }), -/***/ 12820: +/***/ 9002: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85704,22 +85809,25 @@ exports.isReactNative = typeof navigator !== "undefined" && navigator?.product = // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.concat = concat; +const tslib_1 = __nccwpck_require__(67892); const stream_1 = __nccwpck_require__(2203); -const typeGuards_js_1 = __nccwpck_require__(86974); -async function* streamAsyncIterator() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = await reader.read(); - if (done) { - return; +const typeGuards_js_1 = __nccwpck_require__(42744); +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); } - yield value; } - } - finally { - reader.releaseLock(); - } + finally { + reader.releaseLock(); + } + }); } function makeAsyncIterable(webStream) { if (!webStream[Symbol.asyncIterator]) { @@ -85761,12 +85869,27 @@ function toStream(source) { async function concat(sources) { return function () { const streams = sources.map((x) => (typeof x === "function" ? x() : x)).map(toStream); - return stream_1.Readable.from((async function* () { - for (const stream of streams) { - for await (const chunk of stream) { - yield chunk; + 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; } + } } - } + }); })()); }; } @@ -85774,7 +85897,7 @@ async function concat(sources) { /***/ }), -/***/ 63721: +/***/ 53171: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85782,7 +85905,7 @@ async function concat(sources) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.calculateRetryDelay = calculateRetryDelay; -const random_js_1 = __nccwpck_require__(93503); +const random_js_1 = __nccwpck_require__(76529); /** * Calculates the delay interval for retry attempts using exponential delay with jitter. * @param retryAttempt - The current retry attempt number. @@ -85803,7 +85926,7 @@ function calculateRetryDelay(retryAttempt, config) { /***/ }), -/***/ 16356: +/***/ 5782: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85811,7 +85934,7 @@ function calculateRetryDelay(retryAttempt, config) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isError = isError; -const object_js_1 = __nccwpck_require__(33419); +const object_js_1 = __nccwpck_require__(82153); /** * Typeguard for an error object shape (has name and message) * @param e - Something caught by a catch clause. @@ -85828,7 +85951,7 @@ function isError(e) { /***/ }), -/***/ 67943: +/***/ 82633: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85837,7 +85960,7 @@ function isError(e) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.delay = delay; exports.parseHeaderValueAsNumber = parseHeaderValueAsNumber; -const AbortError_js_1 = __nccwpck_require__(37455); +const AbortError_js_1 = __nccwpck_require__(30685); const StandardAbortMessage = "The operation was aborted."; /** * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. @@ -85853,10 +85976,10 @@ function delay(delayInMs, value, options) { let timer = undefined; let onAborted = undefined; const rejectOnAbort = () => { - return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + return reject(new AbortError_js_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); }; const removeListeners = () => { - if (options?.abortSignal && onAborted) { + if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { options.abortSignal.removeEventListener("abort", onAborted); } }; @@ -85867,14 +85990,14 @@ function delay(delayInMs, value, options) { removeListeners(); return rejectOnAbort(); }; - if (options?.abortSignal && options.abortSignal.aborted) { + if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { return rejectOnAbort(); } timer = setTimeout(() => { removeListeners(); resolve(value); }, delayInMs); - if (options?.abortSignal) { + if (options === null || options === void 0 ? void 0 : options.abortSignal) { options.abortSignal.addEventListener("abort", onAborted); } }); @@ -85896,7 +86019,7 @@ function parseHeaderValueAsNumber(response, headerName) { /***/ }), -/***/ 1122: +/***/ 31456: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85910,7 +86033,7 @@ exports.custom = node_util_1.inspect.custom; /***/ }), -/***/ 38233: +/***/ 51515: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85918,20 +86041,20 @@ exports.custom = node_util_1.inspect.custom; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Sanitizer = exports.uint8ArrayToString = exports.stringToUint8Array = exports.isWebWorker = exports.isReactNative = exports.isDeno = exports.isNodeRuntime = exports.isNodeLike = exports.isBun = exports.isBrowser = exports.randomUUID = exports.computeSha256Hmac = exports.computeSha256Hash = exports.isError = exports.isObject = exports.getRandomIntegerInclusive = exports.calculateRetryDelay = void 0; -var delay_js_1 = __nccwpck_require__(63721); +var delay_js_1 = __nccwpck_require__(53171); Object.defineProperty(exports, "calculateRetryDelay", ({ enumerable: true, get: function () { return delay_js_1.calculateRetryDelay; } })); -var random_js_1 = __nccwpck_require__(93503); +var random_js_1 = __nccwpck_require__(76529); Object.defineProperty(exports, "getRandomIntegerInclusive", ({ enumerable: true, get: function () { return random_js_1.getRandomIntegerInclusive; } })); -var object_js_1 = __nccwpck_require__(33419); +var object_js_1 = __nccwpck_require__(82153); Object.defineProperty(exports, "isObject", ({ enumerable: true, get: function () { return object_js_1.isObject; } })); -var error_js_1 = __nccwpck_require__(16356); +var error_js_1 = __nccwpck_require__(5782); Object.defineProperty(exports, "isError", ({ enumerable: true, get: function () { return error_js_1.isError; } })); -var sha256_js_1 = __nccwpck_require__(73775); +var sha256_js_1 = __nccwpck_require__(28553); Object.defineProperty(exports, "computeSha256Hash", ({ enumerable: true, get: function () { return sha256_js_1.computeSha256Hash; } })); Object.defineProperty(exports, "computeSha256Hmac", ({ enumerable: true, get: function () { return sha256_js_1.computeSha256Hmac; } })); -var uuidUtils_js_1 = __nccwpck_require__(58066); +var uuidUtils_js_1 = __nccwpck_require__(27272); Object.defineProperty(exports, "randomUUID", ({ enumerable: true, get: function () { return uuidUtils_js_1.randomUUID; } })); -var checkEnvironment_js_1 = __nccwpck_require__(15777); +var checkEnvironment_js_1 = __nccwpck_require__(71227); Object.defineProperty(exports, "isBrowser", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isBrowser; } })); Object.defineProperty(exports, "isBun", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isBun; } })); Object.defineProperty(exports, "isNodeLike", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeLike; } })); @@ -85939,16 +86062,16 @@ Object.defineProperty(exports, "isNodeRuntime", ({ enumerable: true, get: functi Object.defineProperty(exports, "isDeno", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isDeno; } })); Object.defineProperty(exports, "isReactNative", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isReactNative; } })); Object.defineProperty(exports, "isWebWorker", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isWebWorker; } })); -var bytesEncoding_js_1 = __nccwpck_require__(62408); +var bytesEncoding_js_1 = __nccwpck_require__(78550); Object.defineProperty(exports, "stringToUint8Array", ({ enumerable: true, get: function () { return bytesEncoding_js_1.stringToUint8Array; } })); Object.defineProperty(exports, "uint8ArrayToString", ({ enumerable: true, get: function () { return bytesEncoding_js_1.uint8ArrayToString; } })); -var sanitizer_js_1 = __nccwpck_require__(87017); +var sanitizer_js_1 = __nccwpck_require__(2843); Object.defineProperty(exports, "Sanitizer", ({ enumerable: true, get: function () { return sanitizer_js_1.Sanitizer; } })); //# sourceMappingURL=internal.js.map /***/ }), -/***/ 33419: +/***/ 82153: /***/ ((__unused_webpack_module, exports) => { @@ -85971,7 +86094,7 @@ function isObject(input) { /***/ }), -/***/ 93503: +/***/ 76529: /***/ ((__unused_webpack_module, exports) => { @@ -86001,7 +86124,7 @@ function getRandomIntegerInclusive(min, max) { /***/ }), -/***/ 87017: +/***/ 2843: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -86009,7 +86132,7 @@ function getRandomIntegerInclusive(min, max) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Sanitizer = void 0; -const object_js_1 = __nccwpck_require__(33419); +const object_js_1 = __nccwpck_require__(82153); const RedactedString = "REDACTED"; // Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts const defaultAllowedHeaderNames = [ @@ -86058,8 +86181,6 @@ const defaultAllowedQueryParameters = ["api-version"]; * A utility class to sanitize objects for logging. */ class Sanitizer { - allowedHeaderNames; - allowedQueryParameters; constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [], } = {}) { allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); @@ -86076,11 +86197,7 @@ class Sanitizer { return JSON.stringify(obj, (key, value) => { // Ensure Errors include their interesting non-enumerable members if (value instanceof Error) { - return { - ...value, - name: value.name, - message: value.message, - }; + return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); } if (key === "headers") { return this.sanitizeHeaders(value); @@ -86166,7 +86283,7 @@ exports.Sanitizer = Sanitizer; /***/ }), -/***/ 73775: +/***/ 28553: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -86198,7 +86315,7 @@ async function computeSha256Hash(content, encoding) { /***/ }), -/***/ 86974: +/***/ 42744: /***/ ((__unused_webpack_module, exports) => { @@ -86235,7 +86352,7 @@ function isBlob(x) { /***/ }), -/***/ 53918: +/***/ 70224: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -86244,8 +86361,8 @@ function isBlob(x) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getUserAgentHeaderName = getUserAgentHeaderName; exports.getUserAgentValue = getUserAgentValue; -const userAgentPlatform_js_1 = __nccwpck_require__(68562); -const constants_js_1 = __nccwpck_require__(35124); +const userAgentPlatform_js_1 = __nccwpck_require__(70163); +const constants_js_1 = __nccwpck_require__(55134); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { @@ -86275,7 +86392,7 @@ async function getUserAgentValue(prefix) { /***/ }), -/***/ 68562: +/***/ 70163: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -86285,8 +86402,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getHeaderName = getHeaderName; exports.setPlatformSpecificData = setPlatformSpecificData; const tslib_1 = __nccwpck_require__(67892); -const node_os_1 = tslib_1.__importDefault(__nccwpck_require__(48161)); -const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(1708)); +const os = tslib_1.__importStar(__nccwpck_require__(48161)); +const process = tslib_1.__importStar(__nccwpck_require__(1708)); /** * @internal */ @@ -86297,55 +86414,61 @@ function getHeaderName() { * @internal */ async function setPlatformSpecificData(map) { - if (node_process_1.default && node_process_1.default.versions) { - const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; - const versions = node_process_1.default.versions; + if (process && process.versions) { + const versions = process.versions; if (versions.bun) { - map.set("Bun", `${versions.bun} (${osInfo})`); + map.set("Bun", versions.bun); } else if (versions.deno) { - map.set("Deno", `${versions.deno} (${osInfo})`); + map.set("Deno", versions.deno); } else if (versions.node) { - map.set("Node", `${versions.node} (${osInfo})`); + map.set("Node", versions.node); } } + map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); } //# sourceMappingURL=userAgentPlatform.js.map /***/ }), -/***/ 58066: -/***/ ((__unused_webpack_module, exports) => { +/***/ 27272: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.randomUUID = randomUUID; +const node_crypto_1 = __nccwpck_require__(77598); +// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+. +const 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; /** * Generated Universally Unique Identifier * * @returns RFC4122 v4 UUID. */ function randomUUID() { - return crypto.randomUUID(); + return uuidFunction(); } //# sourceMappingURL=uuidUtils.js.map /***/ }), -/***/ 62209: +/***/ 61142: /***/ ((module) => { -(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>lt,XMLParser:()=>tt,XMLValidator:()=>pt});const i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("^["+i+"]["+i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function s(t,e){const i=[];let n=e.exec(t);for(;n;){const s=[];s.startIndex=e.lastIndex-n[0].length;const r=n.length;for(let t=0;t"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)p+=t[o];if(p=p.trim(),"/"===p[p.length-1]&&(p=p.substring(0,p.length-1),o--),!r(p)){let e;return e=0===p.trim().length?"Invalid space after '<'.":"Tag '"+p+"' is an invalid name.",x("InvalidTag",e,b(t,o))}const c=f(t,o);if(!1===c)return x("InvalidAttr","Attributes for '"+p+"' have open quote.",b(t,o));let N=c.value;if(o=c.index,"/"===N[N.length-1]){const i=o-N.length;N=N.substring(0,N.length-1);const s=g(N,e);if(!0!==s)return x(s.err.code,s.err.msg,b(t,i+s.err.line));n=!0}else if(d){if(!c.tagClosed)return x("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",b(t,o));if(N.trim().length>0)return x("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",b(t,a));if(0===i.length)return x("InvalidTag","Closing tag '"+p+"' has not been opened.",b(t,a));{const e=i.pop();if(p!==e.tagName){let i=b(t,e.tagStartPos);return x("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+i.line+", col "+i.col+") instead of closing tag '"+p+"'.",b(t,a))}0==i.length&&(s=!0)}}else{const r=g(N,e);if(!0!==r)return x(r.err.code,r.err.msg,b(t,o-N.length+r.err.line));if(!0===s)return x("InvalidXml","Multiple possible root nodes found.",b(t,o));-1!==e.unpairedTags.indexOf(p)||i.push({tagName:p,tagStartPos:a}),n=!0}for(o++;o0)||x("InvalidXml","Invalid '"+JSON.stringify(i.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):x("InvalidXml","Start tag expected.",1)}function l(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function u(t,e){const i=e;for(;e5&&"xml"===n)return x("InvalidXml","XML declaration allowed only at the start of the document.",b(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function h(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let i=1;for(e+=8;e"===t[e]&&(i--,0===i))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}const d='"',p="'";function f(t,e){let i="",n="",s=!1;for(;e"===t[e]&&""===n){s=!0;break}i+=t[e]}return""===n&&{value:i,index:e,tagClosed:s}}const c=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function g(t,e){const i=s(t,c),n={};for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,i){return t},captureMetaData:!1};let T;T="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class y{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][T]={startIndex:e})}static getMetaDataSymbol(){return T}}class w{constructor(t){this.suppressValidationErr=!t}readDocType(t,e){const i={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let n=1,s=!1,r=!1,o="";for(;e"===t[e]){if(r?"-"===t[e-1]&&"-"===t[e-2]&&(r=!1,n--):n--,0===n)break}else"["===t[e]?s=!0:o+=t[e];else{if(s&&P(t,"!ENTITY",e)){let n,s;e+=7,[n,s,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),-1===s.indexOf("&")&&(i[n]={regx:RegExp(`&${n};`,"g"),val:s})}else if(s&&P(t,"!ELEMENT",e)){e+=8;const{index:i}=this.readElementExp(t,e+1);e=i}else if(s&&P(t,"!ATTLIST",e))e+=8;else if(s&&P(t,"!NOTATION",e)){e+=9;const{index:i}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=i}else{if(!P(t,"!--",e))throw new Error("Invalid DOCTYPE");r=!0}n++,o=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:e}}readEntityExp(t,e){e=I(t,e);let i="";for(;e{for(;e{for(const i of t){if("string"==typeof i&&e===i)return!0;if(i instanceof RegExp&&i.test(e))return!0}}:()=>!1}class D{constructor(t){if(this.options=t,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:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,16))}},this.addExternalEntities=j,this.parseXml=L,this.parseTextData=M,this.resolveNameSpace=F,this.buildAttributesMap=k,this.isItStopNode=Y,this.replaceEntitiesValue=B,this.readStopNodeData=W,this.saveTextToParentTag=R,this.addChild=U,this.ignoreAttributesFn=$(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let t=0;t0)){o||(t=this.replaceEntitiesValue(t));const n=this.options.tagValueProcessor(e,t,i,s,r);return null==n?t:typeof n!=typeof t||n!==t?n:this.options.trimValues||t.trim()===t?q(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function F(t){if(this.options.removeNSPrefix){const e=t.split(":"),i="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=i+e[1])}return t}const _=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function k(t,e,i){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const i=s(t,_),n=i.length,r={};for(let t=0;t",o,"Closing Tag is not closed.");let r=t.substring(o+2,e).trim();if(this.options.removeNSPrefix){const t=r.indexOf(":");-1!==t&&(r=r.substr(t+1))}this.options.transformTagName&&(r=this.options.transformTagName(r)),i&&(n=this.saveTextToParentTag(n,i,s));const a=s.substring(s.lastIndexOf(".")+1);if(r&&-1!==this.options.unpairedTags.indexOf(r))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),i=this.tagsNodeStack.pop(),n="",o=e}else if("?"===t[o+1]){let e=X(t,o,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,s),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new y(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,s,e.tagName)),this.addChild(i,t,s,o)}o=e.closeIndex+1}else if("!--"===t.substr(o+1,3)){const e=G(t,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const r=t.substring(o+4,e-2);n=this.saveTextToParentTag(n,i,s),i.add(this.options.commentPropName,[{[this.options.textNodeName]:r}])}o=e}else if("!D"===t.substr(o+1,2)){const e=r.readDocType(t,o);this.docTypeEntities=e.entities,o=e.i}else if("!["===t.substr(o+1,2)){const e=G(t,"]]>",o,"CDATA is not closed.")-2,r=t.substring(o+9,e);n=this.saveTextToParentTag(n,i,s);let a=this.parseTextData(r,i.tagname,s,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?i.add(this.options.cdataPropName,[{[this.options.textNodeName]:r}]):i.add(this.options.textNodeName,a),o=e+2}else{let r=X(t,o,this.options.removeNSPrefix),a=r.tagName;const l=r.rawTagName;let u=r.tagExp,h=r.attrExpPresent,d=r.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),i&&n&&"!xml"!==i.tagname&&(n=this.saveTextToParentTag(n,i,s,!1));const p=i;p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(i=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==e.tagname&&(s+=s?"."+a:a);const f=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,s,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),o=r.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))o=r.closeIndex;else{const i=this.readStopNodeData(t,l,d+1);if(!i)throw new Error(`Unexpected end of ${l}`);o=i.i,e=i.tagContent}const n=new y(a);a!==u&&h&&(n[":@"]=this.buildAttributesMap(u,s,a)),e&&(e=this.parseTextData(e,a,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),n.add(this.options.textNodeName,e),this.addChild(i,n,s,f)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new y(a);a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(i,t,s,f),s=s.substr(0,s.lastIndexOf("."))}else{const t=new y(a);this.tagsNodeStack.push(i),a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(i,t,s,f),i=t}n="",o=d}}else n+=t[o];return e.child};function U(t,e,i,n){this.options.captureMetaData||(n=void 0);const s=this.options.updateTag(e.tagname,i,e[":@"]);!1===s||("string"==typeof s?(e.tagname=s,t.addChild(e,n)):t.addChild(e,n))}const B=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const i=this.docTypeEntities[e];t=t.replace(i.regx,i.val)}for(let e in this.lastEntities){const i=this.lastEntities[e];t=t.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const i=this.htmlEntities[e];t=t.replace(i.regex,i.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function R(t,e,i,n){return t&&(void 0===n&&(n=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,i,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Y(t,e,i,n){return!(!e||!e.has(n))||!(!t||!t.has(i))}function G(t,e,i,n){const s=t.indexOf(e,i);if(-1===s)throw new Error(n);return s+e.length-1}function X(t,e,i,n=">"){const s=function(t,e,i=">"){let n,s="";for(let r=e;r",i,`${e} is not closed`);if(t.substring(i+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(n,i),i:r};i=r}else if("?"===t[i+1])i=G(t,"?>",i+1,"StopNode is not closed.");else if("!--"===t.substr(i+1,3))i=G(t,"--\x3e",i+3,"StopNode is not closed.");else if("!["===t.substr(i+1,2))i=G(t,"]]>",i,"StopNode is not closed.")-2;else{const n=X(t,i,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&s++,i=n.closeIndex)}}function q(t,e,i){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t,e={}){if(e=Object.assign({},C,e),!t||"string"!=typeof t)return t;let i=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(i))return t;if("0"===t)return 0;if(e.hex&&A.test(i))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(i);if(-1!==i.search(/.+[eE].+/))return function(t,e,i){if(!i.eNotation)return t;const n=e.match(V);if(n){let s=n[1]||"";const r=-1===n[3].indexOf("e")?"E":"e",o=n[2],a=s?t[o.length+1]===r:t[o.length]===r;return o.length>1&&a?t:1!==o.length||!n[3].startsWith(`.${r}`)&&n[3][0]!==r?i.leadingZeros&&!a?(e=(n[1]||"")+n[3],Number(e)):t:Number(e)}return t}(t,i,e);{const s=S.exec(i);if(s){const r=s[1]||"",o=s[2];let a=(n=s[3])&&-1!==n.indexOf(".")?("."===(n=n.replace(/0+$/,""))?n="0":"."===n[0]?n="0"+n:"."===n[n.length-1]&&(n=n.substring(0,n.length-1)),n):n;const l=r?"."===t[o.length+1]:"."===t[o.length];if(!e.leadingZeros&&(o.length>1||1===o.length&&!l))return t;{const n=Number(i),s=String(n);if(0===n||-0===n)return n;if(-1!==s.search(/[eE]/))return e.eNotation?n:t;if(-1!==i.indexOf("."))return"0"===s||s===a||s===`${r}${a}`?n:t;let l=o?a:i;return o?l===s||r+l===s?n:t:l===s||l===r+s?n:t}}return t}var n}(t,i)}return void 0!==t?t:""}const Z=y.getMetaDataSymbol();function K(t,e){return Q(t,e)}function Q(t,e,i){let n;const s={};for(let r=0;r0&&(s[e.textNodeName]=n):void 0!==n&&(s[e.textNodeName]=n),s}function z(t){const e=Object.keys(t);for(let t=0;t0&&(i="\n"),it(t,e,"",i)}function it(t,e,i,n){let s="",r=!1;for(let o=0;o`,r=!1;continue}if(l===e.commentPropName){s+=n+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,r=!0;continue}if("?"===l[0]){const t=st(a[":@"],e),i="?xml"===l?"":n;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",s+=i+`<${l}${o}${t}?>`,r=!0;continue}let h=n;""!==h&&(h+=e.indentBy);const d=n+`<${l}${st(a[":@"],e)}`,p=it(a[l],e,u,h);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?s+=d+">":s+=d+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?s+=d+`>${p}${n}`:(s+=d+">",p&&""!==n&&(p.includes("/>")||p.includes("`):s+=d+"/>",r=!0}return s}function nt(t){const e=Object.keys(t);for(let i=0;i0&&e.processEntities)for(let i=0;i","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function lt(t){this.options=Object.assign({},at,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=$(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=dt),this.processTextOrObjNode=ut,this.options.format?(this.indentate=ht,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function ut(t,e,i,n){const s=this.j2x(t,i+1,n.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,s.attrStr,i):this.buildObjectNode(s.val,e,s.attrStr,i)}function ht(t){return this.options.indentBy.repeat(t)}function dt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}lt.prototype.build=function(t){return this.options.preserveOrder?et(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},lt.prototype.j2x=function(t,e,i){let n="",s="";const r=i.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(s+="");else if(null===t[o])this.isAttribute(o)||o===this.options.cdataPropName?s+="":"?"===o[0]?s+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)s+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const i=this.isAttribute(o);if(i&&!this.ignoreAttributesFn(i,r))n+=this.buildAttrPairStr(i,""+t[o]);else if(!i)if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);s+=this.replaceEntitiesValue(e)}else s+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const n=t[o].length;let r="",a="";for(let l=0;l"+t+s}},lt.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+s+"0&&this.options.processEntities)for(let e=0;e{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},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(t,e){const n=[];let i=e.exec(t);for(;i;){const s=[];s.startIndex=e.lastIndex-i[0].length;const r=i.length;for(let t=0;t"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)f+=t[o];if(f=f.trim(),"/"===f[f.length-1]&&(f=f.substring(0,f.length-1),o--),!r(f)){let e;return e=0===f.trim().length?"Invalid space after '<'.":"Tag '"+f+"' is an invalid name.",x("InvalidTag",e,N(t,o))}const p=c(t,o);if(!1===p)return x("InvalidAttr","Attributes for '"+f+"' have open quote.",N(t,o));let b=p.value;if(o=p.index,"/"===b[b.length-1]){const n=o-b.length;b=b.substring(0,b.length-1);const s=g(b,e);if(!0!==s)return x(s.err.code,s.err.msg,N(t,n+s.err.line));i=!0}else if(d){if(!p.tagClosed)return x("InvalidTag","Closing tag '"+f+"' doesn't have proper closing.",N(t,o));if(b.trim().length>0)return x("InvalidTag","Closing tag '"+f+"' can't have attributes or invalid starting.",N(t,a));if(0===n.length)return x("InvalidTag","Closing tag '"+f+"' has not been opened.",N(t,a));{const e=n.pop();if(f!==e.tagName){let n=N(t,e.tagStartPos);return x("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+f+"'.",N(t,a))}0==n.length&&(s=!0)}}else{const r=g(b,e);if(!0!==r)return x(r.err.code,r.err.msg,N(t,o-b.length+r.err.line));if(!0===s)return x("InvalidXml","Multiple possible root nodes found.",N(t,o));-1!==e.unpairedTags.indexOf(f)||n.push({tagName:f,tagStartPos:a}),i=!0}for(o++;o0)||x("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):x("InvalidXml","Start tag expected.",1)}function l(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function u(t,e){const n=e;for(;e5&&"xml"===i)return x("InvalidXml","XML declaration allowed only at the start of the document.",N(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function h(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}const d='"',f="'";function c(t,e){let n="",i="",s=!1;for(;e"===t[e]&&""===i){s=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:s}}const p=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function g(t,e){const n=s(t,p),i={};for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t},captureMetaData:!1};let y;y="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class T{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][y]={startIndex:e})}static getMetaDataSymbol(){return y}}function w(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,s=!1,r=!1,o="";for(;e"===t[e]){if(r?"-"===t[e-1]&&"-"===t[e-2]&&(r=!1,i--):i--,0===i)break}else"["===t[e]?s=!0:o+=t[e];else{if(s&&C(t,"!ENTITY",e)){let i,s;e+=7,[i,s,e]=O(t,e+1),-1===s.indexOf("&")&&(n[i]={regx:RegExp(`&${i};`,"g"),val:s})}else if(s&&C(t,"!ELEMENT",e)){e+=8;const{index:n}=S(t,e+1);e=n}else if(s&&C(t,"!ATTLIST",e))e+=8;else if(s&&C(t,"!NOTATION",e)){e+=9;const{index:n}=A(t,e+1);e=n}else{if(!C(t,"!--",e))throw new Error("Invalid DOCTYPE");r=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}const P=(t,e)=>{for(;e{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}class k{constructor(t){this.options=t,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:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,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(t){const e=Object.keys(t);for(let n=0;n0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,s,r);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?H(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function B(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const U=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function G(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=s(t,U),i=n.length,r={};for(let t=0;t",r,"Closing Tag is not closed.");let o=t.substring(r+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,s));const a=s.substring(s.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),n=this.tagsNodeStack.pop(),i="",r=e}else if("?"===t[r+1]){let e=z(t,r,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,s),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new T(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,s,e.tagName)),this.addChild(n,t,s,r)}r=e.closeIndex+1}else if("!--"===t.substr(r+1,3)){const e=W(t,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(r+4,e-2);i=this.saveTextToParentTag(i,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}r=e}else if("!D"===t.substr(r+1,2)){const e=w(t,r);this.docTypeEntities=e.entities,r=e.i}else if("!["===t.substr(r+1,2)){const e=W(t,"]]>",r,"CDATA is not closed.")-2,o=t.substring(r+9,e);i=this.saveTextToParentTag(i,n,s);let a=this.parseTextData(o,n.tagname,s,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,a),r=e+2}else{let o=z(t,r,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,h=o.attrExpPresent,d=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,s,!1));const f=n;f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==e.tagname&&(s+=s?"."+a:a);const c=r;if(this.isItStopNode(this.options.stopNodes,s,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),r=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))r=o.closeIndex;else{const n=this.readStopNodeData(t,l,d+1);if(!n)throw new Error(`Unexpected end of ${l}`);r=n.i,e=n.tagContent}const i=new T(a);a!==u&&h&&(i[":@"]=this.buildAttributesMap(u,s,a)),e&&(e=this.parseTextData(e,a,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,s,c)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new T(a);a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,c),s=s.substr(0,s.lastIndexOf("."))}else{const t=new T(a);this.tagsNodeStack.push(n),a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,c),n=t}i="",r=d}}else i+=t[r];return e.child};function Y(t,e,n,i){this.options.captureMetaData||(i=void 0);const s=this.options.updateTag(e.tagname,n,e[":@"]);!1===s||("string"==typeof s?(e.tagname=s,t.addChild(e,i)):t.addChild(e,i))}const R=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function q(t,e,n,i){return t&&(void 0===i&&(i=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Z(t,e,n){const i="*."+n;for(const n in t){const s=t[n];if(i===s||e===s)return!0}return!1}function W(t,e,n,i){const s=t.indexOf(e,n);if(-1===s)throw new Error(i);return s+e.length-1}function z(t,e,n,i=">"){const s=function(t,e,n=">"){let i,s="";for(let r=e;r",n,`${e} is not closed`);if(t.substring(n+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(i,n),i:r};n=r}else if("?"===t[n+1])n=W(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=W(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=W(t,"]]>",n,"StopNode is not closed.")-2;else{const i=z(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&s++,n=i.closeIndex)}}function H(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t,e={}){if(e=Object.assign({},V,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if("0"===t)return 0;if(e.hex&&j.test(n))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n);if(-1!==n.search(/.+[eE].+/))return function(t,e,n){if(!n.eNotation)return t;const i=e.match(M);if(i){let s=i[1]||"";const r=-1===i[3].indexOf("e")?"E":"e",o=i[2],a=s?t[o.length+1]===r:t[o.length]===r;return o.length>1&&a?t:1!==o.length||!i[3].startsWith(`.${r}`)&&i[3][0]!==r?n.leadingZeros&&!a?(e=(i[1]||"")+i[3],Number(e)):t:Number(e)}return t}(t,n,e);{const s=D.exec(n);if(s){const r=s[1]||"",o=s[2];let a=(i=s[3])&&-1!==i.indexOf(".")?("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substring(0,i.length-1)),i):i;const l=r?"."===t[o.length+1]:"."===t[o.length];if(!e.leadingZeros&&(o.length>1||1===o.length&&!l))return t;{const i=Number(n),s=String(i);if(0===i||-0===i)return i;if(-1!==s.search(/[eE]/))return e.eNotation?i:t;if(-1!==n.indexOf("."))return"0"===s||s===a||s===`${r}${a}`?i:t;let l=o?a:n;return o?l===s||r+l===s?i:t:l===s||l===r+s?i:t}}return t}var i}(t,n)}return void 0!==t?t:""}const K=T.getMetaDataSymbol();function Q(t,e){return tt(t,e)}function tt(t,e,n){let i;const s={};for(let r=0;r0&&(s[e.textNodeName]=i):void 0!==i&&(s[e.textNodeName]=i),s}function et(t){const e=Object.keys(t);for(let t=0;t0&&(n="\n"),ot(t,e,"",n)}function ot(t,e,n,i){let s="",r=!1;for(let o=0;o`,r=!1;continue}if(l===e.commentPropName){s+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,r=!0;continue}if("?"===l[0]){const t=lt(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",s+=n+`<${l}${o}${t}?>`,r=!0;continue}let h=i;""!==h&&(h+=e.indentBy);const d=i+`<${l}${lt(a[":@"],e)}`,f=ot(a[l],e,u,h);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?s+=d+">":s+=d+"/>":f&&0!==f.length||!e.suppressEmptyNode?f&&f.endsWith(">")?s+=d+`>${f}${i}`:(s+=d+">",f&&""!==i&&(f.includes("/>")||f.includes("`):s+=d+"/>",r=!0}return s}function at(t){const e=Object.keys(t);for(let n=0;n0&&e.processEntities)for(let n=0;n","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ft(t){this.options=Object.assign({},dt,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(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(t,e,n,i){const s=this.j2x(t,n+1,i.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,s.attrStr,n):this.buildObjectNode(s.val,e,s.attrStr,n)}function pt(t){return this.options.indentBy.repeat(t)}function gt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}ft.prototype.build=function(t){return this.options.preserveOrder?rt(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},ft.prototype.j2x=function(t,e,n){let i="",s="";const r=n.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(s+="");else if(null===t[o])this.isAttribute(o)||o===this.options.cdataPropName?s+="":"?"===o[0]?s+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)s+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,r))i+=this.buildAttrPairStr(n,""+t[o]);else if(!n)if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);s+=this.replaceEntitiesValue(e)}else s+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const i=t[o].length;let r="",a="";for(let l=0;l"+t+s}},ft.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+s+"0&&this.options.processEntities)for(let e=0;e { -module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.1.0","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@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","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"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.5","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@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","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"}}'); /***/ }) @@ -86393,43 +86516,21 @@ var __webpack_exports__ = {}; var core = __nccwpck_require__(16966); // EXTERNAL MODULE: ./node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js var exec = __nccwpck_require__(92851); -;// CONCATENATED MODULE: ./node_modules/.pnpm/detsys-ts@https+++codeload.github.com+DeterminateSystems+detsys-ts+tar.gz+cb28f5861548d_4d7cb91a8bb951e8650e0a4f49003168/node_modules/detsys-ts/dist/chunk-Bp6m_JJh.js -//#region rolldown:runtime -var __defProp = Object.defineProperty; -var __export = (all) => { - let target = {}; - for (var name in all) __defProp(target, name, { - get: all[name], - enumerable: true - }); - return target; -}; - -//#endregion - -// EXTERNAL MODULE: external "node:fs" -var external_node_fs_ = __nccwpck_require__(73024); -// EXTERNAL MODULE: external "node:os" -var external_node_os_ = __nccwpck_require__(48161); -// EXTERNAL MODULE: external "node:util" -var external_node_util_ = __nccwpck_require__(57975); +// EXTERNAL MODULE: external "fs" +var external_fs_ = __nccwpck_require__(79896); // EXTERNAL MODULE: external "os" var external_os_ = __nccwpck_require__(70857); -;// CONCATENATED MODULE: external "node:fs/promises" -const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises"); -// EXTERNAL MODULE: external "node:zlib" -var external_node_zlib_ = __nccwpck_require__(38522); -// EXTERNAL MODULE: external "node:crypto" -var external_node_crypto_ = __nccwpck_require__(77598); +// EXTERNAL MODULE: external "util" +var external_util_ = __nccwpck_require__(39023); +;// CONCATENATED MODULE: external "fs/promises" +const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs/promises"); +// EXTERNAL MODULE: external "zlib" +var external_zlib_ = __nccwpck_require__(43106); +// EXTERNAL MODULE: external "crypto" +var external_crypto_ = __nccwpck_require__(76982); ;// CONCATENATED MODULE: external "node:timers/promises" const external_node_timers_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:timers/promises"); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@sindresorhus+is@7.1.1/node_modules/@sindresorhus/is/distribution/utilities.js -function keysOf(value) { - return Object.keys(value); -} - -;// CONCATENATED MODULE: ./node_modules/.pnpm/@sindresorhus+is@7.1.1/node_modules/@sindresorhus/is/distribution/index.js - +;// CONCATENATED MODULE: ./node_modules/.pnpm/@sindresorhus+is@7.0.2/node_modules/@sindresorhus/is/distribution/index.js const typedArrayTypeNames = [ 'Int8Array', 'Uint8Array', @@ -86586,12 +86687,9 @@ function detect(value) { return 'Buffer'; } const tagType = getObjectType(value); - if (tagType && tagType !== 'Object') { + if (tagType) { return tagType; } - if (hasPromiseApi(value)) { - return 'Promise'; - } if (value instanceof String || value instanceof Boolean || value instanceof Number) { throw new TypeError('Please don\'t use object wrappers for primitive types'); } @@ -86686,7 +86784,6 @@ const is = Object.assign(detect, { urlInstance: isUrlInstance, urlSearchParams: isUrlSearchParams, urlString: isUrlString, - optional: isOptional, validDate: isValidDate, validLength: isValidLength, weakMap: isWeakMap, @@ -86704,9 +86801,6 @@ function isAny(predicate, ...values) { const predicates = isArray(predicate) ? predicate : [predicate]; return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values)); } -function isOptional(value, predicate) { - return isUndefined(value) || predicate(value); -} function isArray(value, assertion) { if (!Array.isArray(value)) { return false; @@ -86762,7 +86856,7 @@ function isBuffer(value) { return value?.constructor?.isBuffer?.(value) ?? false; } function isClass(value) { - return isFunction(value) && /^class(\s+|{)/.test(value.toString()); + return isFunction(value) && value.toString().startsWith('class '); } function isDataView(value) { return getObjectType(value) === 'DataView'; @@ -87080,7 +87174,6 @@ function typeErrorMessageMultipleValues(expectedType, values) { const assert = { all: assertAll, any: assertAny, - optional: assertOptional, array: assertArray, arrayBuffer: assertArrayBuffer, arrayLike: assertArrayLike, @@ -87260,6 +87353,9 @@ const methodTypeMap = { isWeakSet: 'WeakSet', isWhitespaceString: 'whitespace string', }; +function keysOf(value) { + return Object.keys(value); +} const isMethodNames = keysOf(methodTypeMap); function isIsMethodName(value) { return isMethodNames.includes(value); @@ -87277,11 +87373,6 @@ function assertAny(predicate, ...values) { throw new TypeError(typeErrorMessageMultipleValues(expectedTypes, values)); } } -function assertOptional(value, assertion, message) { - if (!isUndefined(value)) { - assertion(value, message); - } -} function assertArray(value, assertion, message) { if (!isArray(value)) { throw new TypeError(message ?? typeErrorMessage('Array', value)); @@ -87866,7 +87957,7 @@ class PCancelable { Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/errors.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/errors.js // A hacky check to prevent circular references. function isRequest(x) { @@ -87877,9 +87968,8 @@ An error to be thrown when a request fails. Contains a `code` property with error class code, like `ECONNREFUSED`. */ class RequestError extends Error { - name = 'RequestError'; - code = 'ERR_GOT_REQUEST_ERROR'; input; + code; stack; response; request; @@ -87887,9 +87977,8 @@ class RequestError extends Error { constructor(message, error, self) { super(message, { cause: error }); Error.captureStackTrace(this, this.constructor); - if (error.code) { - this.code = error.code; - } + this.name = 'RequestError'; + this.code = error.code ?? 'ERR_GOT_REQUEST_ERROR'; this.input = error.input; if (isRequest(self)) { Object.defineProperty(this, 'request', { @@ -87924,10 +88013,10 @@ An error to be thrown when the server redirects you more than ten times. Includes a `response` property. */ class MaxRedirectsError extends RequestError { - name = 'MaxRedirectsError'; - code = 'ERR_TOO_MANY_REDIRECTS'; constructor(request) { super(`Redirected ${request.options.maxRedirects} times. Aborting.`, {}, request); + this.name = 'MaxRedirectsError'; + this.code = 'ERR_TOO_MANY_REDIRECTS'; } } /** @@ -87937,10 +88026,10 @@ Includes a `response` property. // TODO: Change `HTTPError` to `HTTPError` in the next major version to enforce type usage. // eslint-disable-next-line @typescript-eslint/naming-convention class HTTPError extends RequestError { - name = 'HTTPError'; - code = 'ERR_NON_2XX_3XX_RESPONSE'; constructor(response) { - super(`Request failed with status code ${response.statusCode} (${response.statusMessage}): ${response.request.options.method} ${response.request.options.url.toString()}`, {}, response.request); + super(`Response code ${response.statusCode} (${response.statusMessage})`, {}, response.request); + this.name = 'HTTPError'; + this.code = 'ERR_NON_2XX_3XX_RESPONSE'; } } /** @@ -87948,24 +88037,20 @@ An error to be thrown when a cache method fails. For example, if the database goes down or there's a filesystem error. */ class CacheError extends RequestError { - name = 'CacheError'; constructor(error, request) { super(error.message, error, request); - if (this.code === 'ERR_GOT_REQUEST_ERROR') { - this.code = 'ERR_CACHE_ACCESS'; - } + this.name = 'CacheError'; + this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_CACHE_ACCESS' : this.code; } } /** An error to be thrown when the request body is a stream and an error occurs while reading from that stream. */ class UploadError extends RequestError { - name = 'UploadError'; constructor(error, request) { super(error.message, error, request); - if (this.code === 'ERR_GOT_REQUEST_ERROR') { - this.code = 'ERR_UPLOAD'; - } + this.name = 'UploadError'; + this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_UPLOAD' : this.code; } } /** @@ -87973,11 +88058,11 @@ An error to be thrown when the request is aborted due to a timeout. Includes an `event` and `timings` property. */ class TimeoutError extends RequestError { - name = 'TimeoutError'; timings; event; constructor(error, timings, request) { super(error.message, error, request); + this.name = 'TimeoutError'; this.event = error.event; this.timings = timings; } @@ -87986,32 +88071,30 @@ class TimeoutError extends RequestError { An error to be thrown when reading from response stream fails. */ class ReadError extends RequestError { - name = 'ReadError'; constructor(error, request) { super(error.message, error, request); - if (this.code === 'ERR_GOT_REQUEST_ERROR') { - this.code = 'ERR_READING_RESPONSE_STREAM'; - } + this.name = 'ReadError'; + this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_READING_RESPONSE_STREAM' : this.code; } } /** An error which always triggers a new retry when thrown. */ class RetryError extends RequestError { - name = 'RetryError'; - code = 'ERR_RETRYING'; constructor(request) { super('Retrying', {}, request); + this.name = 'RetryError'; + this.code = 'ERR_RETRYING'; } } /** An error to be thrown when the request is aborted by AbortController. */ class AbortError extends RequestError { - name = 'AbortError'; - code = 'ERR_ABORTED'; constructor(request) { super('This operation was aborted.', {}, request); + this.code = 'ERR_ABORTED'; + this.name = 'AbortError'; } } @@ -88023,25 +88106,8 @@ var external_node_buffer_ = __nccwpck_require__(4573); var external_node_stream_ = __nccwpck_require__(57075); // EXTERNAL MODULE: external "node:http" var external_node_http_ = __nccwpck_require__(37067); -;// CONCATENATED MODULE: ./node_modules/.pnpm/byte-counter@0.1.0/node_modules/byte-counter/utilities.js -const textEncoder = new TextEncoder(); - -function byteLength(data) { - if (typeof data === 'string') { - return textEncoder.encode(data).byteLength; - } - - if (ArrayBuffer.isView(data) || data instanceof ArrayBuffer || data instanceof SharedArrayBuffer) { - return data.byteLength; - } - - return 0; -} - // EXTERNAL MODULE: external "events" var external_events_ = __nccwpck_require__(24434); -// EXTERNAL MODULE: external "util" -var external_util_ = __nccwpck_require__(39023); // EXTERNAL MODULE: ./node_modules/.pnpm/defer-to-connect@2.0.1/node_modules/defer-to-connect/dist/source/index.js var source = __nccwpck_require__(46181); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@szmarczak+http-timer@5.0.1/node_modules/@szmarczak/http-timer/dist/source/index.js @@ -88154,6 +88220,295 @@ const timer = (request) => { ;// CONCATENATED MODULE: external "node:url" const external_node_url_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:url"); +// EXTERNAL MODULE: external "node:crypto" +var external_node_crypto_ = __nccwpck_require__(77598); +;// CONCATENATED MODULE: ./node_modules/.pnpm/normalize-url@8.0.2/node_modules/normalize-url/index.js +// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs +const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain'; +const DATA_URL_DEFAULT_CHARSET = 'us-ascii'; + +const testParameter = (name, filters) => filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name); + +const supportedProtocols = new Set([ + 'https:', + 'http:', + 'file:', +]); + +const hasCustomProtocol = urlString => { + try { + const {protocol} = new URL(urlString); + + return protocol.endsWith(':') + && !protocol.includes('.') + && !supportedProtocols.has(protocol); + } catch { + return false; + } +}; + +const normalizeDataURL = (urlString, {stripHash}) => { + const match = /^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(urlString); + + if (!match) { + throw new Error(`Invalid URL: ${urlString}`); + } + + let {type, data, hash} = match.groups; + const mediaType = type.split(';'); + hash = stripHash ? '' : hash; + + let isBase64 = false; + if (mediaType[mediaType.length - 1] === 'base64') { + mediaType.pop(); + isBase64 = true; + } + + // Lowercase MIME type + const mimeType = mediaType.shift()?.toLowerCase() ?? ''; + const attributes = mediaType + .map(attribute => { + let [key, value = ''] = attribute.split('=').map(string => string.trim()); + + // Lowercase `charset` + if (key === 'charset') { + value = value.toLowerCase(); + + if (value === DATA_URL_DEFAULT_CHARSET) { + return ''; + } + } + + return `${key}${value ? `=${value}` : ''}`; + }) + .filter(Boolean); + + const normalizedMediaType = [ + ...attributes, + ]; + + if (isBase64) { + normalizedMediaType.push('base64'); + } + + if (normalizedMediaType.length > 0 || (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)) { + normalizedMediaType.unshift(mimeType); + } + + return `data:${normalizedMediaType.join(';')},${isBase64 ? data.trim() : data}${hash ? `#${hash}` : ''}`; +}; + +function normalizeUrl(urlString, options) { + options = { + defaultProtocol: 'http', + normalizeProtocol: true, + forceHttp: false, + forceHttps: false, + stripAuthentication: true, + stripHash: false, + stripTextFragment: true, + stripWWW: true, + removeQueryParameters: [/^utm_\w+/i], + removeTrailingSlash: true, + removeSingleSlash: true, + removeDirectoryIndex: false, + removeExplicitPort: false, + sortQueryParameters: true, + ...options, + }; + + // Legacy: Append `:` to the protocol if missing. + if (typeof options.defaultProtocol === 'string' && !options.defaultProtocol.endsWith(':')) { + options.defaultProtocol = `${options.defaultProtocol}:`; + } + + urlString = urlString.trim(); + + // Data URL + if (/^data:/i.test(urlString)) { + return normalizeDataURL(urlString, options); + } + + if (hasCustomProtocol(urlString)) { + return urlString; + } + + const hasRelativeProtocol = urlString.startsWith('//'); + const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); + + // Prepend protocol + if (!isRelativeUrl) { + urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol); + } + + const urlObject = new URL(urlString); + + if (options.forceHttp && options.forceHttps) { + throw new Error('The `forceHttp` and `forceHttps` options cannot be used together'); + } + + if (options.forceHttp && urlObject.protocol === 'https:') { + urlObject.protocol = 'http:'; + } + + if (options.forceHttps && urlObject.protocol === 'http:') { + urlObject.protocol = 'https:'; + } + + // Remove auth + if (options.stripAuthentication) { + urlObject.username = ''; + urlObject.password = ''; + } + + // Remove hash + if (options.stripHash) { + urlObject.hash = ''; + } else if (options.stripTextFragment) { + urlObject.hash = urlObject.hash.replace(/#?:~:text.*?$/i, ''); + } + + // Remove duplicate slashes if not preceded by a protocol + // NOTE: This could be implemented using a single negative lookbehind + // regex, but we avoid that to maintain compatibility with older js engines + // which do not have support for that feature. + if (urlObject.pathname) { + // TODO: Replace everything below with `urlObject.pathname = urlObject.pathname.replace(/(? 0) { + let pathComponents = urlObject.pathname.split('/'); + const lastComponent = pathComponents[pathComponents.length - 1]; + + if (testParameter(lastComponent, options.removeDirectoryIndex)) { + pathComponents = pathComponents.slice(0, -1); + urlObject.pathname = pathComponents.slice(1).join('/') + '/'; + } + } + + if (urlObject.hostname) { + // Remove trailing dot + urlObject.hostname = urlObject.hostname.replace(/\.$/, ''); + + // Remove `www.` + if (options.stripWWW && /^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(urlObject.hostname)) { + // Each label should be max 63 at length (min: 1). + // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names + // Each TLD should be up to 63 characters long (min: 2). + // It is technically possible to have a single character TLD, but none currently exist. + urlObject.hostname = urlObject.hostname.replace(/^www\./, ''); + } + } + + // Remove query unwanted parameters + if (Array.isArray(options.removeQueryParameters)) { + // eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy. + for (const key of [...urlObject.searchParams.keys()]) { + if (testParameter(key, options.removeQueryParameters)) { + urlObject.searchParams.delete(key); + } + } + } + + if (!Array.isArray(options.keepQueryParameters) && options.removeQueryParameters === true) { + urlObject.search = ''; + } + + // Keep wanted query parameters + if (Array.isArray(options.keepQueryParameters) && options.keepQueryParameters.length > 0) { + // eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy. + for (const key of [...urlObject.searchParams.keys()]) { + if (!testParameter(key, options.keepQueryParameters)) { + urlObject.searchParams.delete(key); + } + } + } + + // Sort query parameters + if (options.sortQueryParameters) { + urlObject.searchParams.sort(); + + // Calling `.sort()` encodes the search parameters, so we need to decode them again. + try { + urlObject.search = decodeURIComponent(urlObject.search); + } catch {} + } + + if (options.removeTrailingSlash) { + urlObject.pathname = urlObject.pathname.replace(/\/$/, ''); + } + + // Remove an explicit port number, excluding a default port number, if applicable + if (options.removeExplicitPort && urlObject.port) { + urlObject.port = ''; + } + + const oldUrlString = urlString; + + // Take advantage of many of the Node `url` normalizations + urlString = urlObject.toString(); + + if (!options.removeSingleSlash && urlObject.pathname === '/' && !oldUrlString.endsWith('/') && urlObject.hash === '') { + urlString = urlString.replace(/\/$/, ''); + } + + // Remove ending `/` unless removeSingleSlash is false + if ((options.removeTrailingSlash || urlObject.pathname === '/') && urlObject.hash === '' && options.removeSingleSlash) { + urlString = urlString.replace(/\/$/, ''); + } + + // Restore relative protocol, if applicable + if (hasRelativeProtocol && !options.normalizeProtocol) { + urlString = urlString.replace(/^http:\/\//, '//'); + } + + // Remove http/https + if (options.stripProtocol) { + urlString = urlString.replace(/^(?:https?:)?\/\//, ''); + } + + return urlString; +} + ;// CONCATENATED MODULE: ./node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.js function isStream(stream, {checkOpen = true} = {}) { return stream !== null @@ -88500,8 +88855,8 @@ async function getStreamAsArrayBuffer(stream, options) { const initArrayBuffer = () => ({contents: new ArrayBuffer(0)}); -const useTextEncoder = chunk => array_buffer_textEncoder.encode(chunk); -const array_buffer_textEncoder = new TextEncoder(); +const useTextEncoder = chunk => textEncoder.encode(chunk); +const textEncoder = new TextEncoder(); const useUint8Array = chunk => new Uint8Array(chunk); @@ -88599,1007 +88954,54 @@ const arrayBufferToNodeBuffer = arrayBuffer => globalThis.Buffer.from(arrayBuffe // EXTERNAL MODULE: ./node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js var http_cache_semantics = __nccwpck_require__(94625); -// EXTERNAL MODULE: external "buffer" -var external_buffer_ = __nccwpck_require__(20181); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@keyv+serialize@1.1.1/node_modules/@keyv/serialize/dist/index.js -// src/index.ts +;// CONCATENATED MODULE: ./node_modules/.pnpm/lowercase-keys@3.0.0/node_modules/lowercase-keys/index.js +function lowercaseKeys(object) { + return Object.fromEntries(Object.entries(object).map(([key, value]) => [key.toLowerCase(), value])); +} -var _serialize = (data, escapeColonStrings = true) => { - if (data === void 0 || data === null) { - return "null"; - } - if (typeof data === "string") { - return JSON.stringify( - escapeColonStrings && data.startsWith(":") ? `:${data}` : data - ); - } - if (external_buffer_.Buffer.isBuffer(data)) { - return JSON.stringify(`:base64:${data.toString("base64")}`); - } - if (data?.toJSON) { - data = data.toJSON(); - } - if (typeof data === "object") { - let s = ""; - const array = Array.isArray(data); - s = array ? "[" : "{"; - let first = true; - for (const k in data) { - const ignore = typeof data[k] === "function" || !array && data[k] === void 0; - if (!Object.hasOwn(data, k) || ignore) { - continue; - } - if (!first) { - s += ","; - } - first = false; - if (array) { - s += _serialize(data[k], escapeColonStrings); - } else if (data[k] !== void 0) { - s += `${_serialize(k, false)}:${_serialize(data[k], escapeColonStrings)}`; - } - } - s += array ? "]" : "}"; - return s; - } - return JSON.stringify(data); -}; -var defaultSerialize = (data) => { - return _serialize(data, true); -}; -var defaultDeserialize = (data) => JSON.parse(data, (_, value) => { - if (typeof value === "string") { - if (value.startsWith(":base64:")) { - return external_buffer_.Buffer.from(value.slice(8), "base64"); - } - return value.startsWith(":") ? value.slice(1) : value; - } - return value; -}); +;// CONCATENATED MODULE: ./node_modules/.pnpm/responselike@3.0.0/node_modules/responselike/index.js -;// CONCATENATED MODULE: ./node_modules/.pnpm/keyv@5.5.3/node_modules/keyv/dist/index.js -// src/index.ts +class Response extends external_node_stream_.Readable { + statusCode; + headers; + body; + url; -// src/event-manager.ts -var EventManager = class { - _eventListeners; - _maxListeners; - constructor() { - this._eventListeners = /* @__PURE__ */ new Map(); - this._maxListeners = 100; - } - maxListeners() { - return this._maxListeners; - } - // Add an event listener - addListener(event, listener) { - this.on(event, listener); - } - on(event, listener) { - if (!this._eventListeners.has(event)) { - this._eventListeners.set(event, []); - } - const listeners = this._eventListeners.get(event); - if (listeners) { - if (listeners.length >= this._maxListeners) { - console.warn( - `MaxListenersExceededWarning: Possible event memory leak detected. ${listeners.length + 1} ${event} listeners added. Use setMaxListeners() to increase limit.` - ); - } - listeners.push(listener); - } - return this; - } - // Remove an event listener - removeListener(event, listener) { - this.off(event, listener); - } - off(event, listener) { - const listeners = this._eventListeners.get(event) ?? []; - const index = listeners.indexOf(listener); - if (index !== -1) { - listeners.splice(index, 1); - } - if (listeners.length === 0) { - this._eventListeners.delete(event); - } - } - once(event, listener) { - const onceListener = (...arguments_) => { - listener(...arguments_); - this.off(event, onceListener); - }; - this.on(event, onceListener); - } - // Emit an event - // biome-ignore lint/suspicious/noExplicitAny: type format - emit(event, ...arguments_) { - const listeners = this._eventListeners.get(event); - if (listeners && listeners.length > 0) { - for (const listener of listeners) { - listener(...arguments_); - } - } - } - // Get all listeners for a specific event - listeners(event) { - return this._eventListeners.get(event) ?? []; - } - // Remove all listeners for a specific event - removeAllListeners(event) { - if (event) { - this._eventListeners.delete(event); - } else { - this._eventListeners.clear(); - } - } - // Set the maximum number of listeners for a single event - setMaxListeners(n) { - this._maxListeners = n; - } -}; -var event_manager_default = EventManager; + constructor({statusCode, headers, body, url}) { + if (typeof statusCode !== 'number') { + throw new TypeError('Argument `statusCode` should be a number'); + } -// src/hooks-manager.ts -var HooksManager = class extends event_manager_default { - _hookHandlers; - constructor() { - super(); - this._hookHandlers = /* @__PURE__ */ new Map(); - } - // Adds a handler function for a specific event - addHandler(event, handler) { - const eventHandlers = this._hookHandlers.get(event); - if (eventHandlers) { - eventHandlers.push(handler); - } else { - this._hookHandlers.set(event, [handler]); - } - } - // Removes a specific handler function for a specific event - removeHandler(event, handler) { - const eventHandlers = this._hookHandlers.get(event); - if (eventHandlers) { - const index = eventHandlers.indexOf(handler); - if (index !== -1) { - eventHandlers.splice(index, 1); - } - } - } - // Triggers all handlers for a specific event with provided data - // biome-ignore lint/suspicious/noExplicitAny: type format - trigger(event, data) { - const eventHandlers = this._hookHandlers.get(event); - if (eventHandlers) { - for (const handler of eventHandlers) { - try { - handler(data); - } catch (error) { - this.emit( - "error", - new Error( - `Error in hook handler for event "${event}": ${error.message}` - ) - ); - } - } - } - } - // Provides read-only access to the current handlers - get handlers() { - return new Map(this._hookHandlers); - } -}; -var hooks_manager_default = HooksManager; + if (typeof headers !== 'object') { + throw new TypeError('Argument `headers` should be an object'); + } -// src/stats-manager.ts -var StatsManager = class extends event_manager_default { - enabled = true; - hits = 0; - misses = 0; - sets = 0; - deletes = 0; - errors = 0; - constructor(enabled) { - super(); - if (enabled !== void 0) { - this.enabled = enabled; - } - this.reset(); - } - hit() { - if (this.enabled) { - this.hits++; - } - } - miss() { - if (this.enabled) { - this.misses++; - } - } - set() { - if (this.enabled) { - this.sets++; - } - } - delete() { - if (this.enabled) { - this.deletes++; - } - } - hitsOrMisses(array) { - for (const item of array) { - if (item === void 0) { - this.miss(); - } else { - this.hit(); - } - } - } - reset() { - this.hits = 0; - this.misses = 0; - this.sets = 0; - this.deletes = 0; - this.errors = 0; - } -}; -var stats_manager_default = StatsManager; + if (!(body instanceof Uint8Array)) { + throw new TypeError('Argument `body` should be a buffer'); + } -// src/index.ts -var KeyvHooks = /* @__PURE__ */ ((KeyvHooks2) => { - KeyvHooks2["PRE_SET"] = "preSet"; - KeyvHooks2["POST_SET"] = "postSet"; - KeyvHooks2["PRE_GET"] = "preGet"; - KeyvHooks2["POST_GET"] = "postGet"; - KeyvHooks2["PRE_GET_MANY"] = "preGetMany"; - KeyvHooks2["POST_GET_MANY"] = "postGetMany"; - KeyvHooks2["PRE_GET_RAW"] = "preGetRaw"; - KeyvHooks2["POST_GET_RAW"] = "postGetRaw"; - KeyvHooks2["PRE_GET_MANY_RAW"] = "preGetManyRaw"; - KeyvHooks2["POST_GET_MANY_RAW"] = "postGetManyRaw"; - KeyvHooks2["PRE_DELETE"] = "preDelete"; - KeyvHooks2["POST_DELETE"] = "postDelete"; - return KeyvHooks2; -})(KeyvHooks || {}); -var iterableAdapters = [ - "sqlite", - "postgres", - "mysql", - "mongo", - "redis", - "valkey", - "etcd" -]; -var Keyv = class extends event_manager_default { - opts; - iterator; - hooks = new hooks_manager_default(); - stats = new stats_manager_default(false); - /** - * Time to live in milliseconds - */ - _ttl; - /** - * Namespace - */ - _namespace; - /** - * Store - */ - // biome-ignore lint/suspicious/noExplicitAny: type format - _store = /* @__PURE__ */ new Map(); - _serialize = defaultSerialize; - _deserialize = defaultDeserialize; - _compression; - _useKeyPrefix = true; - _throwOnErrors = false; - /** - * Keyv Constructor - * @param {KeyvStoreAdapter | KeyvOptions} store - * @param {Omit} [options] if you provide the store you can then provide the Keyv Options - */ - constructor(store, options) { - super(); - options ??= {}; - store ??= {}; - this.opts = { - namespace: "keyv", - serialize: defaultSerialize, - deserialize: defaultDeserialize, - emitErrors: true, - // @ts-expect-error - Map is not a KeyvStoreAdapter - store: /* @__PURE__ */ new Map(), - ...options - }; - if (store && store.get) { - this.opts.store = store; - } else { - this.opts = { - ...this.opts, - ...store - }; - } - this._store = this.opts.store ?? /* @__PURE__ */ new Map(); - this._compression = this.opts.compression; - this._serialize = this.opts.serialize; - this._deserialize = this.opts.deserialize; - if (this.opts.namespace) { - this._namespace = this.opts.namespace; - } - if (this._store) { - if (!this._isValidStorageAdapter(this._store)) { - throw new Error("Invalid storage adapter"); - } - if (typeof this._store.on === "function") { - this._store.on("error", (error) => this.emit("error", error)); - } - this._store.namespace = this._namespace; - if (typeof this._store[Symbol.iterator] === "function" && this._store instanceof Map) { - this.iterator = this.generateIterator( - this._store - ); - } else if ("iterator" in this._store && this._store.opts && this._checkIterableAdapter()) { - this.iterator = this.generateIterator( - // biome-ignore lint/style/noNonNullAssertion: need to fix - this._store.iterator.bind(this._store) - ); - } - } - if (this.opts.stats) { - this.stats.enabled = this.opts.stats; - } - if (this.opts.ttl) { - this._ttl = this.opts.ttl; - } - if (this.opts.useKeyPrefix !== void 0) { - this._useKeyPrefix = this.opts.useKeyPrefix; - } - if (this.opts.throwOnErrors !== void 0) { - this._throwOnErrors = this.opts.throwOnErrors; - } - } - /** - * Get the current store - */ - // biome-ignore lint/suspicious/noExplicitAny: type format - get store() { - return this._store; - } - /** - * Set the current store. This will also set the namespace, event error handler, and generate the iterator. If the store is not valid it will throw an error. - * @param {KeyvStoreAdapter | Map | any} store the store to set - */ - // biome-ignore lint/suspicious/noExplicitAny: type format - set store(store) { - if (this._isValidStorageAdapter(store)) { - this._store = store; - this.opts.store = store; - if (typeof store.on === "function") { - store.on("error", (error) => this.emit("error", error)); - } - if (this._namespace) { - this._store.namespace = this._namespace; - } - if (typeof store[Symbol.iterator] === "function" && store instanceof Map) { - this.iterator = this.generateIterator( - store - ); - } else if ("iterator" in store && store.opts && this._checkIterableAdapter()) { - this.iterator = this.generateIterator(store.iterator?.bind(store)); - } - } else { - throw new Error("Invalid storage adapter"); - } - } - /** - * Get the current compression function - * @returns {CompressionAdapter} The current compression function - */ - get compression() { - return this._compression; - } - /** - * Set the current compression function - * @param {CompressionAdapter} compress The compression function to set - */ - set compression(compress) { - this._compression = compress; - } - /** - * Get the current namespace. - * @returns {string | undefined} The current namespace. - */ - get namespace() { - return this._namespace; - } - /** - * Set the current namespace. - * @param {string | undefined} namespace The namespace to set. - */ - set namespace(namespace) { - this._namespace = namespace; - this.opts.namespace = namespace; - this._store.namespace = namespace; - if (this.opts.store) { - this.opts.store.namespace = namespace; - } - } - /** - * Get the current TTL. - * @returns {number} The current TTL. - */ - get ttl() { - return this._ttl; - } - /** - * Set the current TTL. - * @param {number} ttl The TTL to set. - */ - set ttl(ttl) { - this.opts.ttl = ttl; - this._ttl = ttl; - } - /** - * Get the current serialize function. - * @returns {Serialize} The current serialize function. - */ - get serialize() { - return this._serialize; - } - /** - * Set the current serialize function. - * @param {Serialize} serialize The serialize function to set. - */ - set serialize(serialize) { - this.opts.serialize = serialize; - this._serialize = serialize; - } - /** - * Get the current deserialize function. - * @returns {Deserialize} The current deserialize function. - */ - get deserialize() { - return this._deserialize; - } - /** - * Set the current deserialize function. - * @param {Deserialize} deserialize The deserialize function to set. - */ - set deserialize(deserialize) { - this.opts.deserialize = deserialize; - this._deserialize = deserialize; - } - /** - * Get the current useKeyPrefix value. This will enable or disable key prefixing. - * @returns {boolean} The current useKeyPrefix value. - * @default true - */ - get useKeyPrefix() { - return this._useKeyPrefix; - } - /** - * Set the current useKeyPrefix value. This will enable or disable key prefixing. - * @param {boolean} value The useKeyPrefix value to set. - */ - set useKeyPrefix(value) { - this._useKeyPrefix = value; - this.opts.useKeyPrefix = value; - } - /** - * Get the current throwErrors value. This will enable or disable throwing errors on methods in addition to emitting them. - * @return {boolean} The current throwOnErrors value. - */ - get throwOnErrors() { - return this._throwOnErrors; - } - /** - * Set the current throwOnErrors value. This will enable or disable throwing errors on methods in addition to emitting them. - * @param {boolean} value The throwOnErrors value to set. - */ - set throwOnErrors(value) { - this._throwOnErrors = value; - this.opts.throwOnErrors = value; - } - generateIterator(iterator) { - const function_ = async function* () { - for await (const [key, raw] of typeof iterator === "function" ? iterator(this._store.namespace) : iterator) { - const data = await this.deserializeData(raw); - if (this._useKeyPrefix && this._store.namespace && !key.includes(this._store.namespace)) { - continue; - } - if (typeof data.expires === "number" && Date.now() > data.expires) { - this.delete(key); - continue; - } - yield [this._getKeyUnprefix(key), data.value]; - } - }; - return function_.bind(this); - } - _checkIterableAdapter() { - return iterableAdapters.includes(this._store.opts.dialect) || iterableAdapters.some( - (element) => this._store.opts.url.includes(element) - ); - } - _getKeyPrefix(key) { - if (!this._useKeyPrefix) { - return key; - } - if (!this._namespace) { - return key; - } - return `${this._namespace}:${key}`; - } - _getKeyPrefixArray(keys) { - if (!this._useKeyPrefix) { - return keys; - } - if (!this._namespace) { - return keys; - } - return keys.map((key) => `${this._namespace}:${key}`); - } - _getKeyUnprefix(key) { - if (!this._useKeyPrefix) { - return key; - } - return key.split(":").splice(1).join(":"); - } - // biome-ignore lint/suspicious/noExplicitAny: type format - _isValidStorageAdapter(store) { - return store instanceof Map || typeof store.get === "function" && typeof store.set === "function" && typeof store.delete === "function" && typeof store.clear === "function"; - } - // eslint-disable-next-line @stylistic/max-len - async get(key, options) { - const { store } = this.opts; - const isArray = Array.isArray(key); - const keyPrefixed = isArray ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key); - const isDataExpired = (data) => typeof data.expires === "number" && Date.now() > data.expires; - if (isArray) { - if (options?.raw === true) { - return this.getMany(key, { raw: true }); - } - return this.getMany(key, { raw: false }); - } - this.hooks.trigger("preGet" /* PRE_GET */, { key: keyPrefixed }); - let rawData; - try { - rawData = await store.get(keyPrefixed); - } catch (error) { - if (this.throwOnErrors) { - throw error; - } - } - const deserializedData = typeof rawData === "string" || this.opts.compression ? await this.deserializeData(rawData) : rawData; - if (deserializedData === void 0 || deserializedData === null) { - this.stats.miss(); - return void 0; - } - if (isDataExpired(deserializedData)) { - await this.delete(key); - this.stats.miss(); - return void 0; - } - this.hooks.trigger("postGet" /* POST_GET */, { - key: keyPrefixed, - value: deserializedData - }); - this.stats.hit(); - return options?.raw ? deserializedData : deserializedData.value; - } - async getMany(keys, options) { - const { store } = this.opts; - const keyPrefixed = this._getKeyPrefixArray(keys); - const isDataExpired = (data) => typeof data.expires === "number" && Date.now() > data.expires; - this.hooks.trigger("preGetMany" /* PRE_GET_MANY */, { keys: keyPrefixed }); - if (store.getMany === void 0) { - const promises = keyPrefixed.map(async (key) => { - const rawData2 = await store.get(key); - const deserializedRow = typeof rawData2 === "string" || this.opts.compression ? await this.deserializeData(rawData2) : rawData2; - if (deserializedRow === void 0 || deserializedRow === null) { - return void 0; - } - if (isDataExpired(deserializedRow)) { - await this.delete(key); - return void 0; - } - return options?.raw ? deserializedRow : deserializedRow.value; - }); - const deserializedRows = await Promise.allSettled(promises); - const result2 = deserializedRows.map( - // biome-ignore lint/suspicious/noExplicitAny: type format - (row) => row.value - ); - this.hooks.trigger("postGetMany" /* POST_GET_MANY */, result2); - if (result2.length > 0) { - this.stats.hit(); - } - return result2; - } - const rawData = await store.getMany(keyPrefixed); - const result = []; - const expiredKeys = []; - for (const index in rawData) { - let row = rawData[index]; - if (typeof row === "string") { - row = await this.deserializeData(row); - } - if (row === void 0 || row === null) { - result.push(void 0); - continue; - } - if (isDataExpired(row)) { - expiredKeys.push(keys[index]); - result.push(void 0); - continue; - } - const value = options?.raw ? row : row.value; - result.push(value); - } - if (expiredKeys.length > 0) { - await this.deleteMany(expiredKeys); - } - this.hooks.trigger("postGetMany" /* POST_GET_MANY */, result); - if (result.length > 0) { - this.stats.hit(); - } - return result; - } - /** - * Get the raw value of a key. This is the replacement for setting raw to true in the get() method. - * @param {string} key the key to get - * @returns {Promise | undefined>} will return a StoredDataRaw or undefined if the key does not exist or is expired. - */ - async getRaw(key) { - const { store } = this.opts; - const keyPrefixed = this._getKeyPrefix(key); - this.hooks.trigger("preGetRaw" /* PRE_GET_RAW */, { key: keyPrefixed }); - const rawData = await store.get(keyPrefixed); - if (rawData === void 0 || rawData === null) { - this.stats.miss(); - return void 0; - } - const deserializedData = typeof rawData === "string" || this.opts.compression ? await this.deserializeData(rawData) : rawData; - if (deserializedData !== void 0 && deserializedData.expires !== void 0 && deserializedData.expires !== null && // biome-ignore lint/style/noNonNullAssertion: need to fix - deserializedData.expires < Date.now()) { - this.stats.miss(); - await this.delete(key); - return void 0; - } - this.stats.hit(); - this.hooks.trigger("postGetRaw" /* POST_GET_RAW */, { - key: keyPrefixed, - value: deserializedData - }); - return deserializedData; - } - /** - * Get the raw values of many keys. This is the replacement for setting raw to true in the getMany() method. - * @param {string[]} keys the keys to get - * @returns {Promise>>} will return an array of StoredDataRaw or undefined if the key does not exist or is expired. - */ - async getManyRaw(keys) { - const { store } = this.opts; - const keyPrefixed = this._getKeyPrefixArray(keys); - if (keys.length === 0) { - const result2 = Array.from({ length: keys.length }).fill( - void 0 - ); - this.stats.misses += keys.length; - this.hooks.trigger("postGetManyRaw" /* POST_GET_MANY_RAW */, { - keys: keyPrefixed, - values: result2 - }); - return result2; - } - let result = []; - if (store.getMany === void 0) { - const promises = keyPrefixed.map(async (key) => { - const rawData = await store.get(key); - if (rawData !== void 0 && rawData !== null) { - return this.deserializeData(rawData); - } - return void 0; - }); - const deserializedRows = await Promise.allSettled(promises); - result = deserializedRows.map( - // biome-ignore lint/suspicious/noExplicitAny: type format - (row) => row.value - ); - } else { - const rawData = await store.getMany(keyPrefixed); - for (const row of rawData) { - if (row !== void 0 && row !== null) { - result.push(await this.deserializeData(row)); - } else { - result.push(void 0); - } - } - } - const expiredKeys = []; - const isDataExpired = (data) => typeof data.expires === "number" && Date.now() > data.expires; - for (const [index, row] of result.entries()) { - if (row !== void 0 && isDataExpired(row)) { - expiredKeys.push(keyPrefixed[index]); - result[index] = void 0; - } - } - if (expiredKeys.length > 0) { - await this.deleteMany(expiredKeys); - } - this.stats.hitsOrMisses(result); - this.hooks.trigger("postGetManyRaw" /* POST_GET_MANY_RAW */, { - keys: keyPrefixed, - values: result - }); - return result; - } - /** - * Set an item to the store - * @param {string | Array} key the key to use. If you pass in an array of KeyvEntry it will set many items - * @param {Value} value the value of the key - * @param {number} [ttl] time to live in milliseconds - * @returns {boolean} if it sets then it will return a true. On failure will return false. - */ - async set(key, value, ttl) { - const data = { key, value, ttl }; - this.hooks.trigger("preSet" /* PRE_SET */, data); - const keyPrefixed = this._getKeyPrefix(data.key); - data.ttl ??= this._ttl; - if (data.ttl === 0) { - data.ttl = void 0; - } - const { store } = this.opts; - const expires = typeof data.ttl === "number" ? Date.now() + data.ttl : void 0; - if (typeof data.value === "symbol") { - this.emit("error", "symbol cannot be serialized"); - throw new Error("symbol cannot be serialized"); - } - const formattedValue = { value: data.value, expires }; - const serializedValue = await this.serializeData(formattedValue); - let result = true; - try { - const value2 = await store.set(keyPrefixed, serializedValue, data.ttl); - if (typeof value2 === "boolean") { - result = value2; - } - } catch (error) { - result = false; - this.emit("error", error); - if (this._throwOnErrors) { - throw error; - } - } - this.hooks.trigger("postSet" /* POST_SET */, { - key: keyPrefixed, - value: serializedValue, - ttl - }); - this.stats.set(); - return result; - } - /** - * Set many items to the store - * @param {Array} entries the entries to set - * @returns {boolean[]} will return an array of booleans if it sets then it will return a true. On failure will return false. - */ - // biome-ignore lint/correctness/noUnusedVariables: type format - async setMany(entries) { - let results = []; - try { - if (this._store.setMany === void 0) { - const promises = []; - for (const entry of entries) { - promises.push(this.set(entry.key, entry.value, entry.ttl)); - } - const promiseResults = await Promise.all(promises); - results = promiseResults; - } else { - const serializedEntries = await Promise.all( - entries.map(async ({ key, value, ttl }) => { - ttl ??= this._ttl; - if (ttl === 0) { - ttl = void 0; - } - const expires = typeof ttl === "number" ? Date.now() + ttl : void 0; - if (typeof value === "symbol") { - this.emit("error", "symbol cannot be serialized"); - throw new Error("symbol cannot be serialized"); - } - const formattedValue = { value, expires }; - const serializedValue = await this.serializeData(formattedValue); - const keyPrefixed = this._getKeyPrefix(key); - return { key: keyPrefixed, value: serializedValue, ttl }; - }) - ); - results = await this._store.setMany(serializedEntries); - } - } catch (error) { - this.emit("error", error); - if (this._throwOnErrors) { - throw error; - } - results = entries.map(() => false); - } - return results; - } - /** - * Delete an Entry - * @param {string | string[]} key the key to be deleted. if an array it will delete many items - * @returns {boolean} will return true if item or items are deleted. false if there is an error - */ - async delete(key) { - const { store } = this.opts; - if (Array.isArray(key)) { - return this.deleteMany(key); - } - const keyPrefixed = this._getKeyPrefix(key); - this.hooks.trigger("preDelete" /* PRE_DELETE */, { key: keyPrefixed }); - let result = true; - try { - const value = await store.delete(keyPrefixed); - if (typeof value === "boolean") { - result = value; - } - } catch (error) { - result = false; - this.emit("error", error); - if (this._throwOnErrors) { - throw error; - } - } - this.hooks.trigger("postDelete" /* POST_DELETE */, { - key: keyPrefixed, - value: result - }); - this.stats.delete(); - return result; - } - /** - * Delete many items from the store - * @param {string[]} keys the keys to be deleted - * @returns {boolean} will return true if item or items are deleted. false if there is an error - */ - async deleteMany(keys) { - try { - const { store } = this.opts; - const keyPrefixed = this._getKeyPrefixArray(keys); - this.hooks.trigger("preDelete" /* PRE_DELETE */, { key: keyPrefixed }); - if (store.deleteMany !== void 0) { - return await store.deleteMany(keyPrefixed); - } - const promises = keyPrefixed.map(async (key) => store.delete(key)); - const results = await Promise.all(promises); - const returnResult = results.every(Boolean); - this.hooks.trigger("postDelete" /* POST_DELETE */, { - key: keyPrefixed, - value: returnResult - }); - return returnResult; - } catch (error) { - this.emit("error", error); - if (this._throwOnErrors) { - throw error; - } - return false; - } - } - /** - * Clear the store - * @returns {void} - */ - async clear() { - this.emit("clear"); - const { store } = this.opts; - try { - await store.clear(); - } catch (error) { - this.emit("error", error); - if (this._throwOnErrors) { - throw error; - } - } - } - async has(key) { - if (Array.isArray(key)) { - return this.hasMany(key); - } - const keyPrefixed = this._getKeyPrefix(key); - const { store } = this.opts; - if (store.has !== void 0 && !(store instanceof Map)) { - return store.has(keyPrefixed); - } - let rawData; - try { - rawData = await store.get(keyPrefixed); - } catch (error) { - this.emit("error", error); - if (this._throwOnErrors) { - throw error; - } - return false; - } - if (rawData) { - const data = await this.deserializeData(rawData); - if (data) { - if (data.expires === void 0 || data.expires === null) { - return true; - } - return data.expires > Date.now(); - } - } - return false; - } - /** - * Check if many keys exist - * @param {string[]} keys the keys to check - * @returns {boolean[]} will return an array of booleans if the keys exist - */ - async hasMany(keys) { - const keyPrefixed = this._getKeyPrefixArray(keys); - const { store } = this.opts; - if (store.hasMany !== void 0) { - return store.hasMany(keyPrefixed); - } - const results = []; - for (const key of keys) { - results.push(await this.has(key)); - } - return results; - } - /** - * Will disconnect the store. This is only available if the store has a disconnect method - * @returns {Promise} - */ - async disconnect() { - const { store } = this.opts; - this.emit("disconnect"); - if (typeof store.disconnect === "function") { - return store.disconnect(); - } - } - // biome-ignore lint/suspicious/noExplicitAny: type format - emit(event, ...arguments_) { - if (event === "error" && !this.opts.emitErrors) { - return; - } - super.emit(event, ...arguments_); - } - async serializeData(data) { - if (!this._serialize) { - return data; - } - if (this._compression?.compress) { - return this._serialize({ - value: await this._compression.compress(data.value), - expires: data.expires - }); - } - return this._serialize(data); - } - async deserializeData(data) { - if (!this._deserialize) { - return data; - } - if (this._compression?.decompress && typeof data === "string") { - const result = await this._deserialize(data); - return { - value: await this._compression.decompress(result?.value), - expires: result?.expires - }; - } - if (typeof data === "string") { - return this._deserialize(data); - } - return void 0; - } -}; -var index_default = (/* unused pure expression or super */ null && (Keyv)); + if (typeof url !== 'string') { + throw new TypeError('Argument `url` should be a string'); + } + super({ + read() { + this.push(body); + this.push(null); + }, + }); + this.statusCode = statusCode; + this.headers = lowercaseKeys(headers); + this.body = body; + this.url = url; + } +} + +// EXTERNAL MODULE: ./node_modules/.pnpm/keyv@4.5.4/node_modules/keyv/src/index.js +var src = __nccwpck_require__(75277); ;// CONCATENATED MODULE: ./node_modules/.pnpm/mimic-response@4.0.0/node_modules/mimic-response/index.js // We define these manually to ensure they're always copied // even if they would move up the prototype chain @@ -89677,363 +89079,7 @@ function mimicResponse(fromStream, toStream) { return toStream; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/normalize-url@8.1.0/node_modules/normalize-url/index.js -// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs -const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain'; -const DATA_URL_DEFAULT_CHARSET = 'us-ascii'; - -const testParameter = (name, filters) => filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name); - -const supportedProtocols = new Set([ - 'https:', - 'http:', - 'file:', -]); - -const hasCustomProtocol = urlString => { - try { - const {protocol} = new URL(urlString); - - return protocol.endsWith(':') - && !protocol.includes('.') - && !supportedProtocols.has(protocol); - } catch { - return false; - } -}; - -const normalizeDataURL = (urlString, {stripHash}) => { - const match = /^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(urlString); - - if (!match) { - throw new Error(`Invalid URL: ${urlString}`); - } - - let {type, data, hash} = match.groups; - const mediaType = type.split(';'); - hash = stripHash ? '' : hash; - - let isBase64 = false; - if (mediaType[mediaType.length - 1] === 'base64') { - mediaType.pop(); - isBase64 = true; - } - - // Lowercase MIME type - const mimeType = mediaType.shift()?.toLowerCase() ?? ''; - const attributes = mediaType - .map(attribute => { - let [key, value = ''] = attribute.split('=').map(string => string.trim()); - - // Lowercase `charset` - if (key === 'charset') { - value = value.toLowerCase(); - - if (value === DATA_URL_DEFAULT_CHARSET) { - return ''; - } - } - - return `${key}${value ? `=${value}` : ''}`; - }) - .filter(Boolean); - - const normalizedMediaType = [ - ...attributes, - ]; - - if (isBase64) { - normalizedMediaType.push('base64'); - } - - if (normalizedMediaType.length > 0 || (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)) { - normalizedMediaType.unshift(mimeType); - } - - return `data:${normalizedMediaType.join(';')},${isBase64 ? data.trim() : data}${hash ? `#${hash}` : ''}`; -}; - -function normalizeUrl(urlString, options) { - options = { - defaultProtocol: 'http', - normalizeProtocol: true, - forceHttp: false, - forceHttps: false, - stripAuthentication: true, - stripHash: false, - stripTextFragment: true, - stripWWW: true, - removeQueryParameters: [/^utm_\w+/i], - removeTrailingSlash: true, - removeSingleSlash: true, - removeDirectoryIndex: false, - removeExplicitPort: false, - sortQueryParameters: true, - removePath: false, - transformPath: false, - ...options, - }; - - // Legacy: Append `:` to the protocol if missing. - if (typeof options.defaultProtocol === 'string' && !options.defaultProtocol.endsWith(':')) { - options.defaultProtocol = `${options.defaultProtocol}:`; - } - - urlString = urlString.trim(); - - // Data URL - if (/^data:/i.test(urlString)) { - return normalizeDataURL(urlString, options); - } - - if (hasCustomProtocol(urlString)) { - return urlString; - } - - const hasRelativeProtocol = urlString.startsWith('//'); - const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); - - // Prepend protocol - if (!isRelativeUrl) { - urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol); - } - - const urlObject = new URL(urlString); - - if (options.forceHttp && options.forceHttps) { - throw new Error('The `forceHttp` and `forceHttps` options cannot be used together'); - } - - if (options.forceHttp && urlObject.protocol === 'https:') { - urlObject.protocol = 'http:'; - } - - if (options.forceHttps && urlObject.protocol === 'http:') { - urlObject.protocol = 'https:'; - } - - // Remove auth - if (options.stripAuthentication) { - urlObject.username = ''; - urlObject.password = ''; - } - - // Remove hash - if (options.stripHash) { - urlObject.hash = ''; - } else if (options.stripTextFragment) { - urlObject.hash = urlObject.hash.replace(/#?:~:text.*?$/i, ''); - } - - // Remove duplicate slashes if not preceded by a protocol - // NOTE: This could be implemented using a single negative lookbehind - // regex, but we avoid that to maintain compatibility with older js engines - // which do not have support for that feature. - if (urlObject.pathname) { - // TODO: Replace everything below with `urlObject.pathname = urlObject.pathname.replace(/(? 0) { - let pathComponents = urlObject.pathname.split('/'); - const lastComponent = pathComponents[pathComponents.length - 1]; - - if (testParameter(lastComponent, options.removeDirectoryIndex)) { - pathComponents = pathComponents.slice(0, -1); - urlObject.pathname = pathComponents.slice(1).join('/') + '/'; - } - } - - // Remove path - if (options.removePath) { - urlObject.pathname = '/'; - } - - // Transform path components - if (options.transformPath && typeof options.transformPath === 'function') { - const pathComponents = urlObject.pathname.split('/').filter(Boolean); - const newComponents = options.transformPath(pathComponents); - urlObject.pathname = newComponents?.length > 0 ? `/${newComponents.join('/')}` : '/'; - } - - if (urlObject.hostname) { - // Remove trailing dot - urlObject.hostname = urlObject.hostname.replace(/\.$/, ''); - - // Remove `www.` - if (options.stripWWW && /^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(urlObject.hostname)) { - // Each label should be max 63 at length (min: 1). - // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names - // Each TLD should be up to 63 characters long (min: 2). - // It is technically possible to have a single character TLD, but none currently exist. - urlObject.hostname = urlObject.hostname.replace(/^www\./, ''); - } - } - - // Remove query unwanted parameters - if (Array.isArray(options.removeQueryParameters)) { - // eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy. - for (const key of [...urlObject.searchParams.keys()]) { - if (testParameter(key, options.removeQueryParameters)) { - urlObject.searchParams.delete(key); - } - } - } - - if (!Array.isArray(options.keepQueryParameters) && options.removeQueryParameters === true) { - urlObject.search = ''; - } - - // Keep wanted query parameters - if (Array.isArray(options.keepQueryParameters) && options.keepQueryParameters.length > 0) { - // eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy. - for (const key of [...urlObject.searchParams.keys()]) { - if (!testParameter(key, options.keepQueryParameters)) { - urlObject.searchParams.delete(key); - } - } - } - - // Sort query parameters - if (options.sortQueryParameters) { - const originalSearch = urlObject.search; - urlObject.searchParams.sort(); - - // Calling `.sort()` encodes the search parameters, so we need to decode them again. - try { - urlObject.search = decodeURIComponent(urlObject.search); - } catch {} - - // Fix parameters that originally had no equals sign but got one added by URLSearchParams - const partsWithoutEquals = originalSearch.slice(1).split('&').filter(p => p && !p.includes('=')); - for (const part of partsWithoutEquals) { - const decoded = decodeURIComponent(part); - // Only replace at word boundaries to avoid partial matches - urlObject.search = urlObject.search.replace(`?${decoded}=`, `?${decoded}`).replace(`&${decoded}=`, `&${decoded}`); - } - } - - if (options.removeTrailingSlash) { - urlObject.pathname = urlObject.pathname.replace(/\/$/, ''); - } - - // Remove an explicit port number, excluding a default port number, if applicable - if (options.removeExplicitPort && urlObject.port) { - urlObject.port = ''; - } - - const oldUrlString = urlString; - - // Take advantage of many of the Node `url` normalizations - urlString = urlObject.toString(); - - if (!options.removeSingleSlash && urlObject.pathname === '/' && !oldUrlString.endsWith('/') && urlObject.hash === '') { - urlString = urlString.replace(/\/$/, ''); - } - - // Remove ending `/` unless removeSingleSlash is false - if ((options.removeTrailingSlash || urlObject.pathname === '/') && urlObject.hash === '' && options.removeSingleSlash) { - urlString = urlString.replace(/\/$/, ''); - } - - // Restore relative protocol, if applicable - if (hasRelativeProtocol && !options.normalizeProtocol) { - urlString = urlString.replace(/^http:\/\//, '//'); - } - - // Remove http/https - if (options.stripProtocol) { - urlString = urlString.replace(/^(?:https?:)?\/\//, ''); - } - - return urlString; -} - -;// CONCATENATED MODULE: ./node_modules/.pnpm/lowercase-keys@3.0.0/node_modules/lowercase-keys/index.js -function lowercaseKeys(object) { - return Object.fromEntries(Object.entries(object).map(([key, value]) => [key.toLowerCase(), value])); -} - -;// CONCATENATED MODULE: ./node_modules/.pnpm/responselike@3.0.0/node_modules/responselike/index.js - - - -class Response extends external_node_stream_.Readable { - statusCode; - headers; - body; - url; - - constructor({statusCode, headers, body, url}) { - if (typeof statusCode !== 'number') { - throw new TypeError('Argument `statusCode` should be a number'); - } - - if (typeof headers !== 'object') { - throw new TypeError('Argument `headers` should be an object'); - } - - if (!(body instanceof Uint8Array)) { - throw new TypeError('Argument `body` should be a buffer'); - } - - if (typeof url !== 'string') { - throw new TypeError('Argument `url` should be a string'); - } - - super({ - read() { - this.push(body); - this.push(null); - }, - }); - - this.statusCode = statusCode; - this.headers = lowercaseKeys(headers); - this.body = body; - this.url = url; - } -} - -;// CONCATENATED MODULE: ./node_modules/.pnpm/cacheable-request@13.0.13/node_modules/cacheable-request/dist/types.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/cacheable-request@12.0.1/node_modules/cacheable-request/dist/types.js // Type definitions for cacheable-request 6.0 // Project: https://github.com/lukechilds/cacheable-request#readme // Definitions by: BendingBender @@ -90043,19 +89089,17 @@ class Response extends external_node_stream_.Readable { class types_RequestError extends Error { constructor(error) { super(error.message); - Object.defineProperties(this, Object.getOwnPropertyDescriptors(error)); + Object.assign(this, error); } } class types_CacheError extends Error { constructor(error) { super(error.message); - Object.defineProperties(this, Object.getOwnPropertyDescriptors(error)); + Object.assign(this, error); } } //# sourceMappingURL=types.js.map -;// CONCATENATED MODULE: ./node_modules/.pnpm/cacheable-request@13.0.13/node_modules/cacheable-request/dist/index.js -// biome-ignore-all lint/suspicious/noImplicitAnyLet: legacy format -// biome-ignore-all lint/suspicious/noExplicitAny: legacy format +;// CONCATENATED MODULE: ./node_modules/.pnpm/cacheable-request@12.0.1/node_modules/cacheable-request/dist/index.js @@ -90069,39 +89113,37 @@ class types_CacheError extends Error { class CacheableRequest { constructor(cacheRequest, cacheAdapter) { - this.cache = new Keyv({ namespace: "cacheable-request" }); this.hooks = new Map(); this.request = () => (options, callback) => { let url; - if (typeof options === "string") { - url = normalizeUrlObject(parseWithWhatwg(options)); + if (typeof options === 'string') { + url = normalizeUrlObject(external_node_url_namespaceObject.parse(options)); options = {}; } else if (options instanceof external_node_url_namespaceObject.URL) { - url = normalizeUrlObject(parseWithWhatwg(options.toString())); + url = normalizeUrlObject(external_node_url_namespaceObject.parse(options.toString())); options = {}; } else { - const [pathname, ...searchParts] = (options.path ?? "").split("?"); - const search = searchParts.length > 0 ? `?${searchParts.join("?")}` : ""; + const [pathname, ...searchParts] = (options.path ?? '').split('?'); + const search = searchParts.length > 0 + ? `?${searchParts.join('?')}` + : ''; url = normalizeUrlObject({ ...options, pathname, search }); } options = { headers: {}, - method: "GET", + method: 'GET', cache: true, strictTtl: false, automaticFailover: false, ...options, ...urlObjectToRequestOptions(url), }; - options.headers = Object.fromEntries(entries(options.headers).map(([key, value]) => [ - key.toLowerCase(), - value, - ])); + options.headers = Object.fromEntries(entries(options.headers).map(([key, value]) => [key.toLowerCase(), value])); const ee = new external_node_events_(); const normalizedUrlString = normalizeUrl(external_node_url_namespaceObject.format(url), { - stripWWW: false, + stripWWW: false, // eslint-disable-line @typescript-eslint/naming-convention removeTrailingSlash: false, stripAuthentication: false, }); @@ -90109,9 +89151,7 @@ class CacheableRequest { // POST, PATCH, and PUT requests may be cached, depending on the response // cache-control headers. As a result, the body of the request should be // added to the cache key in order to avoid collisions. - if (options.body && - options.method !== undefined && - ["POST", "PATCH", "PUT"].includes(options.method)) { + if (options.body && options.method !== undefined && ['POST', 'PATCH', 'PUT'].includes(options.method)) { if (options.body instanceof external_node_stream_.Readable) { // Streamed bodies should completely skip the cache because they may // or may not be hashable and in either case the stream would need to @@ -90119,7 +89159,7 @@ class CacheableRequest { options.cache = false; } else { - key += `:${external_node_crypto_.createHash("md5").update(options.body).digest("hex")}`; + key += `:${external_node_crypto_.createHash('md5').update(options.body).digest('hex')}`; } } let revalidate = false; @@ -90127,11 +89167,8 @@ class CacheableRequest { const makeRequest = (options_) => { madeRequest = true; let requestErrored = false; - /* c8 ignore next 4 */ - let requestErrorCallback = () => { - /* do nothing */ - }; - const requestErrorPromise = new Promise((resolve) => { + let requestErrorCallback = () => { }; + const requestErrorPromise = new Promise(resolve => { requestErrorCallback = () => { if (!requestErrored) { requestErrored = true; @@ -90142,42 +89179,17 @@ class CacheableRequest { const handler = async (response) => { if (revalidate) { response.status = response.statusCode; - const originalPolicy = http_cache_semantics.fromObject(revalidate.cachePolicy); - const revalidatedPolicy = originalPolicy.revalidatedPolicy(options_, response); + const revalidatedPolicy = http_cache_semantics.fromObject(revalidate.cachePolicy).revalidatedPolicy(options_, response); if (!revalidatedPolicy.modified) { response.resume(); - await new Promise((resolve) => { + await new Promise(resolve => { // Skipping 'error' handler cause 'error' event should't be emitted for 304 response - response.once("end", resolve); + response + .once('end', resolve); }); - // Get headers from revalidated policy const headers = convertHeaders(revalidatedPolicy.policy.responseHeaders()); - // Preserve headers from the original cached response that may have been - // lost during revalidation (e.g., content-encoding, content-type, etc.) - // This works around a limitation in http-cache-semantics where some headers - // are not preserved when a 304 response has minimal headers - const originalHeaders = convertHeaders(originalPolicy.responseHeaders()); - // Headers that should be preserved from the cached response - // according to RFC 7232 section 4.1 - const preserveHeaders = [ - "content-encoding", - "content-type", - "content-length", - "content-language", - "content-location", - "etag", - ]; - for (const headerName of preserveHeaders) { - if (originalHeaders[headerName] !== undefined && - headers[headerName] === undefined) { - headers[headerName] = originalHeaders[headerName]; - } - } response = new Response({ - statusCode: revalidate.statusCode, - headers, - body: revalidate.body, - url: revalidate.url, + statusCode: revalidate.statusCode, headers, body: revalidate.body, url: revalidate.url, }); response.cachePolicy = revalidatedPolicy.policy; response.fromCache = true; @@ -90195,36 +89207,31 @@ class CacheableRequest { const bodyPromise = getStreamAsBuffer(response); await Promise.race([ requestErrorPromise, - new Promise((resolve) => response.once("end", resolve)), - new Promise((resolve) => response.once("close", resolve)), + new Promise(resolve => response.once('end', resolve)), // eslint-disable-line no-promise-executor-return + new Promise(resolve => response.once('close', resolve)), // eslint-disable-line no-promise-executor-return ]); const body = await bodyPromise; let value = { url: response.url, - statusCode: response.fromCache - ? revalidate.statusCode - : response.statusCode, + statusCode: response.fromCache ? revalidate.statusCode : response.statusCode, body, cachePolicy: response.cachePolicy.toObject(), }; - let ttl = options_.strictTtl - ? response.cachePolicy.timeToLive() - : undefined; + let ttl = options_.strictTtl ? response.cachePolicy.timeToLive() : undefined; if (options_.maxTtl) { ttl = ttl ? Math.min(ttl, options_.maxTtl) : options_.maxTtl; } if (this.hooks.size > 0) { + /* eslint-disable no-await-in-loop */ for (const key_ of this.hooks.keys()) { value = await this.runHook(key_, value, response); } + /* eslint-enable no-await-in-loop */ } await this.cache.set(key, value, ttl); - /* c8 ignore next -- @preserve */ } catch (error) { - /* c8 ignore next -- @preserve */ - ee.emit("error", new types_CacheError(error)); - /* c8 ignore next -- @preserve */ + ee.emit('error', new types_CacheError(error)); } })(); } @@ -90232,63 +89239,50 @@ class CacheableRequest { (async () => { try { await this.cache.delete(key); - /* c8 ignore next -- @preserve */ } catch (error) { - /* c8 ignore next -- @preserve */ - ee.emit("error", new types_CacheError(error)); - /* c8 ignore next -- @preserve */ + ee.emit('error', new types_CacheError(error)); } })(); } - ee.emit("response", clonedResponse ?? response); - if (typeof callback === "function") { + ee.emit('response', clonedResponse ?? response); + if (typeof callback === 'function') { callback(clonedResponse ?? response); } }; try { const request_ = this.cacheRequest(options_, handler); - request_.once("error", requestErrorCallback); - request_.once("abort", requestErrorCallback); - request_.once("destroy", requestErrorCallback); - ee.emit("request", request_); + request_.once('error', requestErrorCallback); + request_.once('abort', requestErrorCallback); + request_.once('destroy', requestErrorCallback); + ee.emit('request', request_); } catch (error) { - ee.emit("error", new types_RequestError(error)); + ee.emit('error', new types_RequestError(error)); } }; (async () => { const get = async (options_) => { await Promise.resolve(); - const cacheEntry = options_.cache - ? await this.cache.get(key) - : undefined; + const cacheEntry = options_.cache ? await this.cache.get(key) : undefined; if (cacheEntry === undefined && !options_.forceRefresh) { makeRequest(options_); return; } const policy = http_cache_semantics.fromObject(cacheEntry.cachePolicy); - if (policy.satisfiesWithoutRevalidation(options_) && - !options_.forceRefresh) { + if (policy.satisfiesWithoutRevalidation(options_) && !options_.forceRefresh) { const headers = convertHeaders(policy.responseHeaders()); - const bodyBuffer = cacheEntry.body; - const body = Buffer.from(bodyBuffer); const response = new Response({ - statusCode: cacheEntry.statusCode, - headers, - body, - url: cacheEntry.url, + statusCode: cacheEntry.statusCode, headers, body: cacheEntry.body, url: cacheEntry.url, }); response.cachePolicy = policy; response.fromCache = true; - ee.emit("response", response); - if (typeof callback === "function") { + ee.emit('response', response); + if (typeof callback === 'function') { callback(response); } } - else if (policy.satisfiesWithoutRevalidation(options_) && - Date.now() >= policy.timeToLive() && - options_.forceRefresh) { + else if (policy.satisfiesWithoutRevalidation(options_) && Date.now() >= policy.timeToLive() && options_.forceRefresh) { await this.cache.delete(key); options_.headers = policy.revalidationHeaders(options_); makeRequest(options_); @@ -90299,26 +89293,21 @@ class CacheableRequest { makeRequest(options_); } }; - const errorHandler = (error) => ee.emit("error", new types_CacheError(error)); - if (this.cache instanceof Keyv) { + const errorHandler = (error) => ee.emit('error', new types_CacheError(error)); + if (this.cache instanceof src) { const cachek = this.cache; - cachek.once("error", errorHandler); - ee.on("error", () => { - cachek.removeListener("error", errorHandler); - }); - ee.on("response", () => { - cachek.removeListener("error", errorHandler); - }); + cachek.once('error', errorHandler); + ee.on('error', () => cachek.removeListener('error', errorHandler)); + ee.on('response', () => cachek.removeListener('error', errorHandler)); } try { await get(options); } catch (error) { - /* c8 ignore next 3 */ if (options.automaticFailover && !madeRequest) { makeRequest(options); } - ee.emit("error", new types_CacheError(error)); + ee.emit('error', new types_CacheError(error)); } })(); return ee; @@ -90331,16 +89320,20 @@ class CacheableRequest { this.removeHook = (name) => this.hooks.delete(name); this.getHook = (name) => this.hooks.get(name); this.runHook = async (name, ...arguments_) => this.hooks.get(name)?.(...arguments_); - if (cacheAdapter) { - if (cacheAdapter instanceof Keyv) { - this.cache = cacheAdapter; - } - else { - this.cache = new Keyv({ - store: cacheAdapter, - namespace: "cacheable-request", - }); - } + if (cacheAdapter instanceof src) { + this.cache = cacheAdapter; + } + else if (typeof cacheAdapter === 'string') { + this.cache = new src({ + uri: cacheAdapter, + namespace: 'cacheable-request', + }); + } + else { + this.cache = new src({ + store: cacheAdapter, + namespace: 'cacheable-request', + }); } this.request = this.request.bind(this); this.cacheRequest = cacheRequest; @@ -90354,7 +89347,7 @@ const cloneResponse = (response) => { }; const urlObjectToRequestOptions = (url) => { const options = { ...url }; - options.path = `${url.pathname || "/"}${url.search || ""}`; + options.path = `${url.pathname || '/'}${url.search || ''}`; delete options.pathname; delete options.search; return options; @@ -90370,7 +89363,7 @@ const normalizeUrlObject = (url) => ({ protocol: url.protocol, auth: url.auth, - hostname: url.hostname || url.host || "localhost", + hostname: url.hostname || url.host || 'localhost', port: url.port, pathname: url.pathname, search: url.search, @@ -90382,121 +89375,12 @@ const convertHeaders = (headers) => { } return result; }; -const parseWithWhatwg = (raw) => { - const u = new external_node_url_namespaceObject.URL(raw); - // If normalizeUrlObject expects the same fields as url.parse() - return { - protocol: u.protocol, // E.g. 'https:' - slashes: true, // Always true for WHATWG URLs - /* c8 ignore next 3 */ - auth: u.username || u.password ? `${u.username}:${u.password}` : undefined, - host: u.host, // E.g. 'example.com:8080' - port: u.port, // E.g. '8080' - hostname: u.hostname, // E.g. 'example.com' - hash: u.hash, // E.g. '#quux' - search: u.search, // E.g. '?bar=baz' - query: Object.fromEntries(u.searchParams), // { bar: 'baz' } - pathname: u.pathname, // E.g. '/foo' - path: u.pathname + u.search, // '/foo?bar=baz' - href: u.href, // Full serialized URL - }; -}; /* harmony default export */ const dist = (CacheableRequest); -const onResponse = "onResponse"; +const onResponse = 'onResponse'; //# sourceMappingURL=index.js.map -;// CONCATENATED MODULE: ./node_modules/.pnpm/decompress-response@10.0.0/node_modules/decompress-response/index.js - - - - -// Detect zstd support (available in Node.js >= 22.15.0) -const supportsZstd = typeof external_node_zlib_.createZstdDecompress === 'function'; - -function decompressResponse(response) { - const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase(); - const supportedEncodings = ['gzip', 'deflate', 'br']; - if (supportsZstd) { - supportedEncodings.push('zstd'); - } - - if (!supportedEncodings.includes(contentEncoding)) { - return response; - } - - let isEmpty = true; - - // Clone headers to avoid modifying the original response headers - const headers = {...response.headers}; - - const finalStream = new external_node_stream_.PassThrough({ - autoDestroy: false, - }); - - // Only destroy response on error, not on normal completion - finalStream.once('error', () => { - response.destroy(); - }); - - function handleContentEncoding(data) { - let decompressStream; - - if (contentEncoding === 'zstd') { - decompressStream = external_node_zlib_.createZstdDecompress(); - } else if (contentEncoding === 'br') { - decompressStream = external_node_zlib_.createBrotliDecompress(); - } else if (contentEncoding === 'deflate' && data.length > 0 && (data[0] & 0x08) === 0) { // eslint-disable-line no-bitwise - decompressStream = external_node_zlib_.createInflateRaw(); - } else { - decompressStream = external_node_zlib_.createUnzip(); - } - - decompressStream.once('error', error => { - if (isEmpty && !response.readable) { - finalStream.end(); - return; - } - - finalStream.destroy(error); - }); - - checker.pipe(decompressStream).pipe(finalStream); - } - - const checker = new external_node_stream_.Transform({ - transform(data, _encoding, callback) { - if (isEmpty === false) { - callback(null, data); - return; - } - - isEmpty = false; - - handleContentEncoding(data); - - callback(null, data); - }, - - flush(callback) { - if (isEmpty) { - finalStream.end(); - } - - callback(); - }, - }); - - delete headers['content-encoding']; - delete headers['content-length']; - finalStream.headers = headers; - - mimicResponse(response, finalStream); - - response.pipe(checker); - - return finalStream; -} - +// EXTERNAL MODULE: ./node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/index.js +var decompress_response = __nccwpck_require__(35459); ;// CONCATENATED MODULE: ./node_modules/.pnpm/form-data-encoder@4.1.0/node_modules/form-data-encoder/lib/index.js var __typeError = (msg) => { throw TypeError(msg); @@ -90842,13 +89726,16 @@ getContentLength_fn = function() { }; -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/utils/is-form-data.js +// EXTERNAL MODULE: external "node:util" +var external_node_util_ = __nccwpck_require__(57975); +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/utils/is-form-data.js function is_form_data_isFormData(body) { return distribution.nodeStream(body) && distribution.function(body.getBoundary); } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/utils/get-body-size.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/utils/get-body-size.js + @@ -90860,34 +89747,18 @@ async function getBodySize(body, headers) { return 0; } if (distribution.string(body)) { - return new TextEncoder().encode(body).byteLength; + return external_node_buffer_.Buffer.byteLength(body); } if (distribution.buffer(body)) { return body.length; } - if (distribution.typedArray(body)) { - return body.byteLength; - } if (is_form_data_isFormData(body)) { - try { - return await (0,external_node_util_.promisify)(body.getLength.bind(body))(); - } - catch (error) { - const typedError = error; - throw new Error('Cannot determine content-length for form-data with stream(s) of unknown length. ' - + 'This is a limitation of the `form-data` package. ' - + 'To fix this, either:\n' - + '1. Use the `knownLength` option when appending streams:\n' - + ' form.append(\'file\', stream, {knownLength: 12345});\n' - + '2. Switch to spec-compliant FormData (formdata-node package)\n' - + 'See: https://github.com/form-data/form-data#alternative-submission-methods\n' - + `Original error: ${typedError.message}`); - } + return (0,external_node_util_.promisify)(body.getLength.bind(body))(); } return undefined; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/utils/proxy-events.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/utils/proxy-events.js function proxyEvents(from, to, events) { const eventFunctions = {}; for (const event of events) { @@ -90906,7 +89777,7 @@ function proxyEvents(from, to, events) { ;// CONCATENATED MODULE: external "node:net" const external_node_net_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:net"); -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/utils/unhandle.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/utils/unhandle.js // When attaching listeners, it's very easy to forget about them. // Especially if you do error handling and set timeouts. // So instead of checking if it's proper to throw an error on every timeout ever, @@ -90928,18 +89799,19 @@ function unhandle() { }; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/timed-out.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/timed-out.js const reentry = Symbol('reentry'); const timed_out_noop = () => { }; class timed_out_TimeoutError extends Error { event; - name = 'TimeoutError'; - code = 'ETIMEDOUT'; + code; constructor(threshold, event) { super(`Timeout awaiting '${event}' for ${threshold}ms`); this.event = event; + this.name = 'TimeoutError'; + this.code = 'ETIMEDOUT'; } } function timedOut(request, delays, options) { @@ -91066,7 +89938,7 @@ function timedOut(request, delays, options) { return cancelTimeouts; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/utils/url-to-options.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/utils/url-to-options.js function urlToOptions(url) { // Cast to URL @@ -91090,10 +89962,14 @@ function urlToOptions(url) { return options; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/utils/weakable-map.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/utils/weakable-map.js class WeakableMap { - weakMap = new WeakMap(); - map = new Map(); + weakMap; + map; + constructor() { + this.weakMap = new WeakMap(); + this.map = new Map(); + } set(key, value) { if (typeof key === 'object') { this.weakMap.set(key, value); @@ -91116,7 +89992,7 @@ class WeakableMap { } } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/calculate-retry-delay.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/calculate-retry-delay.js const calculateRetryDelay = ({ attemptCount, retryOptions, error, retryAfter, computedValue, }) => { if (error.name === 'RetryError') { return 1; @@ -91153,6 +90029,8 @@ const external_node_tls_namespaceObject = __WEBPACK_EXTERNAL_createRequire(impor var external_node_https_ = __nccwpck_require__(44708); ;// CONCATENATED MODULE: external "node:dns" const external_node_dns_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:dns"); +// EXTERNAL MODULE: external "node:os" +var external_node_os_ = __nccwpck_require__(48161); ;// CONCATENATED MODULE: ./node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js @@ -91603,7 +90481,7 @@ class CacheableLookup { // EXTERNAL MODULE: ./node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/index.js var http2_wrapper_source = __nccwpck_require__(90882); -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/parse-link-header.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/parse-link-header.js function parseLinkHeader(link) { const parsed = []; const items = link.split(','); @@ -91638,7 +90516,7 @@ function parseLinkHeader(link) { return parsed; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/options.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/options.js @@ -91652,43 +90530,11 @@ function parseLinkHeader(link) { const [major, minor] = external_node_process_.versions.node.split('.').map(Number); -/** -Generic helper that wraps any assertion function to add context to error messages. -*/ -function wrapAssertionWithContext(optionName, assertionFn) { - try { - assertionFn(); - } - catch (error) { - if (error instanceof Error) { - error.message = `Option '${optionName}': ${error.message}`; - } - throw error; - } -} -/** -Helper function that wraps assert.any() to provide better error messages. -When assertion fails, it includes the option name in the error message. -*/ -function options_assertAny(optionName, validators, value) { - wrapAssertionWithContext(optionName, () => { - assert.any(validators, value); - }); -} -/** -Helper function that wraps assert.plainObject() to provide better error messages. -When assertion fails, it includes the option name in the error message. -*/ -function options_assertPlainObject(optionName, value) { - wrapAssertionWithContext(optionName, () => { - assert.plainObject(value); - }); -} function validateSearchParameters(searchParameters) { // eslint-disable-next-line guard-for-in for (const key in searchParameters) { const value = searchParameters[key]; - options_assertAny(`searchParams.${key}`, [distribution.string, distribution.number, distribution.boolean, distribution.null, distribution.undefined], value); + assert.any([distribution.string, distribution.number, distribution.boolean, distribution.null, distribution.undefined], value); } } const globalCache = new Map(); @@ -91700,39 +90546,6 @@ const getGlobalDnsCache = () => { globalDnsCache = new CacheableLookup(); return globalDnsCache; }; -// Detects and wraps QuickLRU v7+ instances to make them compatible with the StorageAdapter interface -const wrapQuickLruIfNeeded = (value) => { - // Check if this is QuickLRU v7+ using Symbol.toStringTag and the evict method (added in v7) - if (value?.[Symbol.toStringTag] === 'QuickLRU' && typeof value.evict === 'function') { - // QuickLRU v7+ uses set(key, value, {maxAge: number}) but StorageAdapter expects set(key, value, ttl) - // Wrap it to translate the interface - return { - get(key) { - return value.get(key); - }, - set(key, cacheValue, ttl) { - if (ttl === undefined) { - value.set(key, cacheValue); - } - else { - value.set(key, cacheValue, { maxAge: ttl }); - } - return true; - }, - delete(key) { - return value.delete(key); - }, - clear() { - return value.clear(); - }, - has(key) { - return value.has(key); - }, - }; - } - // QuickLRU v5 and other caches work as-is - return value; -}; const defaultInternals = { request: undefined, agent: { @@ -91768,7 +90581,6 @@ const defaultInternals = { beforeError: [], beforeRedirect: [], beforeRetry: [], - beforeCache: [], afterResponse: [], }, followRedirect: true, @@ -91779,7 +90591,6 @@ const defaultInternals = { password: '', http2: false, allowGetBody: false, - copyPipedHeaders: true, headers: { 'user-agent': 'got (https://github.com/sindresorhus/got)', }, @@ -91823,8 +90634,6 @@ const defaultInternals = { calculateDelay: ({ computedValue }) => computedValue, backoffLimit: Number.POSITIVE_INFINITY, noise: 100, - // TODO: Change default to `true` in the next major version to fix https://github.com/sindresorhus/got/issues/2243 - enforceRetryRules: false, }, localAddress: undefined, method: 'GET', @@ -91839,7 +90648,6 @@ const defaultInternals = { alpnProtocols: undefined, rejectUnauthorized: undefined, checkServerIdentity: undefined, - serverName: undefined, certificateAuthority: undefined, key: undefined, certificate: undefined, @@ -91854,7 +90662,6 @@ const defaultInternals = { dhparam: undefined, ecdhCurve: undefined, certificateRevocationLists: undefined, - secureOptions: undefined, }, encoding: undefined, resolveBodyOnly: false, @@ -91893,7 +90700,6 @@ const defaultInternals = { maxHeaderSize: undefined, signal: undefined, enableUnixSockets: false, - strictContentLength: false, }; const cloneInternals = (internals) => { const { hooks, retry } = internals; @@ -91917,12 +90723,14 @@ const cloneInternals = (internals) => { beforeError: [...hooks.beforeError], beforeRedirect: [...hooks.beforeRedirect], beforeRetry: [...hooks.beforeRetry], - beforeCache: [...hooks.beforeCache], afterResponse: [...hooks.afterResponse], }, searchParams: internals.searchParams ? new URLSearchParams(internals.searchParams) : undefined, pagination: { ...internals.pagination }, }; + if (result.url !== undefined) { + result.prefixUrl = ''; + } return result; }; const cloneRaw = (raw) => { @@ -91980,24 +90788,11 @@ const cloneRaw = (raw) => { if (distribution.array(hooks.beforeRetry)) { result.hooks.beforeRetry = [...hooks.beforeRetry]; } - if (distribution.array(hooks.beforeCache)) { - result.hooks.beforeCache = [...hooks.beforeCache]; - } if (distribution.array(hooks.afterResponse)) { result.hooks.afterResponse = [...hooks.afterResponse]; } } - if (raw.searchParams) { - if (distribution.string(raw.searchParams)) { - result.searchParams = raw.searchParams; - } - else if (raw.searchParams instanceof URLSearchParams) { - result.searchParams = new URLSearchParams(raw.searchParams); - } - else if (distribution.object(raw.searchParams)) { - result.searchParams = { ...raw.searchParams }; - } - } + // TODO: raw.searchParams if (distribution.object(raw.pagination)) { result.pagination = { ...raw.pagination }; } @@ -92021,17 +90816,19 @@ const init = (options, withOptions, self) => { class Options { _unixOptions; _internals; - _merging = false; + _merging; _init; constructor(input, options, defaults) { - options_assertAny('input', [distribution.string, distribution.urlInstance, distribution.object, distribution.undefined], input); - options_assertAny('options', [distribution.object, distribution.undefined], options); - options_assertAny('defaults', [distribution.object, distribution.undefined], defaults); + assert.any([distribution.string, distribution.urlInstance, distribution.object, distribution.undefined], input); + assert.any([distribution.object, distribution.undefined], options); + assert.any([distribution.object, distribution.undefined], defaults); if (input instanceof Options || options instanceof Options) { throw new TypeError('The defaults must be passed as the third argument'); } this._internals = cloneInternals(defaults?._internals ?? defaults ?? defaultInternals); this._init = [...(defaults?._init ?? [])]; + this._merging = false; + this._unixOptions = undefined; // This rule allows `finally` to be considered more important. // Meaning no matter the error thrown in the `try` block, // if `finally` throws then the `finally` error will be thrown. @@ -92081,10 +90878,7 @@ class Options { return; } if (options instanceof Options) { - // Create a copy of the _init array to avoid infinite loop - // when merging an Options instance with itself - const initArray = [...options._init]; - for (const init of initArray) { + for (const init of options._init) { this.merge(init); } return; @@ -92108,10 +90902,6 @@ class Options { if (key === 'url') { continue; } - // Never merge `preserveHooks` - it's a control flag, not a persistent option - if (key === 'preserveHooks') { - continue; - } if (!(key in this)) { throw new Error(`Unexpected option: ${key}`); } @@ -92142,7 +90932,7 @@ class Options { return this._internals.request; } set request(value) { - options_assertAny('request', [distribution.function, distribution.undefined], value); + assert.any([distribution.function, distribution.undefined], value); this._internals.request = value; } /** @@ -92171,14 +90961,14 @@ class Options { return this._internals.agent; } set agent(value) { - options_assertPlainObject('agent', value); + assert.plainObject(value); // eslint-disable-next-line guard-for-in for (const key in value) { if (!(key in this._internals.agent)) { throw new TypeError(`Unexpected agent option: ${key}`); } // @ts-expect-error - No idea why `value[key]` doesn't work here. - options_assertAny(`agent.${key}`, [distribution.object, distribution.undefined, (v) => v === false], value[key]); + assert.any([distribution.object, distribution.undefined], value[key]); } if (this._merging) { Object.assign(this._internals.agent, value); @@ -92231,14 +91021,14 @@ class Options { return this._internals.timeout; } set timeout(value) { - options_assertPlainObject('timeout', value); + assert.plainObject(value); // eslint-disable-next-line guard-for-in for (const key in value) { if (!(key in this._internals.timeout)) { throw new Error(`Unexpected timeout option: ${key}`); } // @ts-expect-error - No idea why `value[key]` doesn't work here. - options_assertAny(`timeout.${key}`, [distribution.number, distribution.undefined], value[key]); + assert.any([distribution.number, distribution.undefined], value[key]); } if (this._merging) { Object.assign(this._internals.timeout, value); @@ -92292,7 +91082,7 @@ class Options { return this._internals.prefixUrl; } set prefixUrl(value) { - options_assertAny('prefixUrl', [distribution.string, distribution.urlInstance], value); + assert.any([distribution.string, distribution.urlInstance], value); if (value === '') { this._internals.prefixUrl = ''; return; @@ -92316,32 +91106,15 @@ class Options { __Note #4__: This option is not enumerable and will not be merged with the instance defaults. - The `content-length` header will be automatically set if `body` is a `string` / `Buffer` / typed array ([`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), etc.) / [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) / [`form-data` instance](https://github.com/form-data/form-data), and `content-length` and `transfer-encoding` are not manually set in `options.headers`. + The `content-length` header will be automatically set if `body` is a `string` / `Buffer` / [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) / [`form-data` instance](https://github.com/form-data/form-data), and `content-length` and `transfer-encoding` are not manually set in `options.headers`. Since Got 12, the `content-length` is not automatically set when `body` is a `fs.createReadStream`. - - You can use `Iterable` and `AsyncIterable` objects as request body, including Web [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream): - - @example - ``` - import got from 'got'; - - // Using an async generator - async function* generateData() { - yield 'Hello, '; - yield 'world!'; - } - - await got.post('https://httpbin.org/anything', { - body: generateData() - }); - ``` */ get body() { return this._internals.body; } set body(value) { - options_assertAny('body', [distribution.string, distribution.buffer, distribution.nodeStream, distribution.generator, distribution.asyncGenerator, distribution.iterable, distribution.asyncIterable, lib_isFormData, distribution.typedArray, distribution.undefined], value); + assert.any([distribution.string, distribution.buffer, distribution.nodeStream, distribution.generator, distribution.asyncGenerator, lib_isFormData, distribution.undefined], value); if (distribution.nodeStream(value)) { assert.truthy(value.readable); } @@ -92364,7 +91137,7 @@ class Options { return this._internals.form; } set form(value) { - options_assertAny('form', [distribution.plainObject, distribution.undefined], value); + assert.any([distribution.plainObject, distribution.undefined], value); if (value !== undefined) { assert.undefined(this._internals.body); assert.undefined(this._internals.json); @@ -92372,9 +91145,7 @@ class Options { this._internals.form = value; } /** - JSON request body. If the `content-type` header is not set, it will be set to `application/json`. - - __Important__: This option only affects the request body you send to the server. To parse the response as JSON, you must either call `.json()` on the promise or set `responseType: 'json'` in the options. + JSON body. If the `Content-Type` header is not set, it will be set to `application/json`. __Note #1__: If you provide this option, `got.stream()` will be read-only. @@ -92412,7 +91183,7 @@ class Options { return this._internals.url; } set url(value) { - options_assertAny('url', [distribution.string, distribution.urlInstance, distribution.undefined], value); + assert.any([distribution.string, distribution.urlInstance, distribution.undefined], value); if (value === undefined) { this._internals.url = undefined; return; @@ -92420,11 +91191,7 @@ class Options { if (distribution.string(value) && value.startsWith('/')) { throw new Error('`url` must not start with a slash'); } - // Detect if URL is already absolute (has a protocol/scheme) - const valueString = value.toString(); - const isAbsolute = distribution.urlInstance(value) || /^[a-z][a-z\d+.-]*:\/\//i.test(valueString); - // Only concatenate prefixUrl if the URL is relative - const urlString = isAbsolute ? valueString : `${this.prefixUrl}${valueString}`; + const urlString = `${this.prefixUrl}${value.toString()}`; const url = new URL(urlString); this._internals.url = url; if (url.protocol === 'unix:') { @@ -92476,7 +91243,7 @@ class Options { return this._internals.cookieJar; } set cookieJar(value) { - options_assertAny('cookieJar', [distribution.object, distribution.undefined], value); + assert.any([distribution.object, distribution.undefined], value); if (value === undefined) { this._internals.cookieJar = undefined; return; @@ -92563,7 +91330,7 @@ class Options { return this._internals.searchParams; } set searchParams(value) { - options_assertAny('searchParams', [distribution.string, distribution.object, distribution.undefined], value); + assert.any([distribution.string, distribution.object, distribution.undefined], value); const url = this._internals.url; if (value === undefined) { this._internals.searchParams = undefined; @@ -92623,7 +91390,7 @@ class Options { return this._internals.dnsLookup; } set dnsLookup(value) { - options_assertAny('dnsLookup', [distribution.function, distribution.undefined], value); + assert.any([distribution.function, distribution.undefined], value); this._internals.dnsLookup = value; } /** @@ -92640,7 +91407,7 @@ class Options { return this._internals.dnsCache; } set dnsCache(value) { - options_assertAny('dnsCache', [distribution.object, distribution.boolean, distribution.undefined], value); + assert.any([distribution.object, distribution.boolean, distribution.undefined], value); if (value === true) { this._internals.dnsCache = getGlobalDnsCache(); } @@ -92710,7 +91477,7 @@ class Options { } const typedKnownHookEvent = knownHookEvent; const hooks = value[typedKnownHookEvent]; - options_assertAny(`hooks.${knownHookEvent}`, [distribution.array, distribution.undefined], hooks); + assert.any([distribution.array, distribution.undefined], hooks); if (hooks) { for (const hook of hooks) { assert.function(hook); @@ -92745,7 +91512,7 @@ class Options { return this._internals.followRedirect; } set followRedirect(value) { - options_assertAny('followRedirect', [distribution.boolean, distribution.function], value); + assert.any([distribution.boolean, distribution.function], value); this._internals.followRedirect = value; } get followRedirects() { @@ -92775,7 +91542,7 @@ class Options { return this._internals.cache; } set cache(value) { - options_assertAny('cache', [distribution.object, distribution.string, distribution.boolean, distribution.undefined], value); + assert.any([distribution.object, distribution.string, distribution.boolean, distribution.undefined], value); if (value === true) { this._internals.cache = globalCache; } @@ -92783,7 +91550,7 @@ class Options { this._internals.cache = undefined; } else { - this._internals.cache = wrapQuickLruIfNeeded(value); + this._internals.cache = value; } } /** @@ -92878,62 +91645,6 @@ class Options { this._internals.allowGetBody = value; } /** - Automatically copy headers from piped streams. - - When piping a request into a Got stream (e.g., `request.pipe(got.stream(url))`), this controls whether headers from the source stream are automatically merged into the Got request headers. - - Note: Piped headers overwrite any explicitly set headers with the same name. To override this, either set `copyPipedHeaders` to `false` and manually copy safe headers, or use a `beforeRequest` hook to force specific header values after piping. - - Useful for proxy scenarios, but you may want to disable this to filter out headers like `Host`, `Connection`, `Authorization`, etc. - - @default true - - @example - ``` - import got from 'got'; - import {pipeline} from 'node:stream/promises'; - - // Disable automatic header copying and manually copy only safe headers - server.get('/proxy', async (request, response) => { - const gotStream = got.stream('https://example.com', { - copyPipedHeaders: false, - headers: { - 'user-agent': request.headers['user-agent'], - 'accept': request.headers['accept'], - // Explicitly NOT copying host, connection, authorization, etc. - } - }); - - await pipeline(request, gotStream, response); - }); - ``` - - @example - ``` - import got from 'got'; - - // Override piped headers using beforeRequest hook - const gotStream = got.stream('https://example.com', { - hooks: { - beforeRequest: [ - options => { - // Force specific header values after piping - options.headers.host = 'example.com'; - delete options.headers.authorization; - } - ] - } - }); - ``` - */ - get copyPipedHeaders() { - return this._internals.copyPipedHeaders; - } - set copyPipedHeaders(value) { - assert.boolean(value); - this._internals.copyPipedHeaders = value; - } - /** Request headers. Existing headers will be overwritten. Headers set to `undefined` will be omitted. @@ -92944,7 +91655,7 @@ class Options { return this._internals.headers; } set headers(value) { - options_assertPlainObject('headers', value); + assert.plainObject(value); if (this._merging) { Object.assign(this._internals.headers, lowercaseKeys(value)); } @@ -93066,10 +91777,6 @@ class Options { The `calculateDelay` property is a `function` that receives an object with `attemptCount`, `retryOptions`, `error` and `computedValue` properties for current retry count, the retry options, error and default computed value. The function must return a delay in milliseconds (or a Promise resolving with it) (`0` return value cancels retry). - The `enforceRetryRules` property is a `boolean` that, when set to `true`, enforces the `limit`, `methods`, `statusCodes`, and `errorCodes` options before calling `calculateDelay`. Your `calculateDelay` function is only invoked when a retry is allowed based on these criteria. When `false` (default), `calculateDelay` receives the computed value but can override all retry logic. - - __Note:__ When `enforceRetryRules` is `false`, you must check `computedValue` in your `calculateDelay` function to respect the default retry logic. When `true`, the retry rules are enforced automatically. - By default, it retries *only* on the specified methods, status codes, and on these network errors: - `ETIMEDOUT`: One of the [timeout](#timeout) limits were reached. @@ -93088,15 +91795,14 @@ class Options { return this._internals.retry; } set retry(value) { - options_assertPlainObject('retry', value); - options_assertAny('retry.calculateDelay', [distribution.function, distribution.undefined], value.calculateDelay); - options_assertAny('retry.maxRetryAfter', [distribution.number, distribution.undefined], value.maxRetryAfter); - options_assertAny('retry.limit', [distribution.number, distribution.undefined], value.limit); - options_assertAny('retry.methods', [distribution.array, distribution.undefined], value.methods); - options_assertAny('retry.statusCodes', [distribution.array, distribution.undefined], value.statusCodes); - options_assertAny('retry.errorCodes', [distribution.array, distribution.undefined], value.errorCodes); - options_assertAny('retry.noise', [distribution.number, distribution.undefined], value.noise); - options_assertAny('retry.enforceRetryRules', [distribution.boolean, distribution.undefined], value.enforceRetryRules); + assert.plainObject(value); + assert.any([distribution.function, distribution.undefined], value.calculateDelay); + assert.any([distribution.number, distribution.undefined], value.maxRetryAfter); + assert.any([distribution.number, distribution.undefined], value.limit); + assert.any([distribution.array, distribution.undefined], value.methods); + assert.any([distribution.array, distribution.undefined], value.statusCodes); + assert.any([distribution.array, distribution.undefined], value.errorCodes); + assert.any([distribution.number, distribution.undefined], value.noise); if (value.noise && Math.abs(value.noise) > 100) { throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${value.noise}`); } @@ -93125,7 +91831,7 @@ class Options { return this._internals.localAddress; } set localAddress(value) { - options_assertAny('localAddress', [distribution.string, distribution.undefined], value); + assert.any([distribution.string, distribution.undefined], value); this._internals.localAddress = value; } /** @@ -93144,7 +91850,7 @@ class Options { return this._internals.createConnection; } set createConnection(value) { - options_assertAny('createConnection', [distribution.function, distribution.undefined], value); + assert.any([distribution.function, distribution.undefined], value); this._internals.createConnection = value; } /** @@ -93156,11 +91862,11 @@ class Options { return this._internals.cacheOptions; } set cacheOptions(value) { - options_assertPlainObject('cacheOptions', value); - options_assertAny('cacheOptions.shared', [distribution.boolean, distribution.undefined], value.shared); - options_assertAny('cacheOptions.cacheHeuristic', [distribution.number, distribution.undefined], value.cacheHeuristic); - options_assertAny('cacheOptions.immutableMinTimeToLive', [distribution.number, distribution.undefined], value.immutableMinTimeToLive); - options_assertAny('cacheOptions.ignoreCargoCult', [distribution.boolean, distribution.undefined], value.ignoreCargoCult); + assert.plainObject(value); + assert.any([distribution.boolean, distribution.undefined], value.shared); + assert.any([distribution.number, distribution.undefined], value.cacheHeuristic); + assert.any([distribution.number, distribution.undefined], value.immutableMinTimeToLive); + assert.any([distribution.boolean, distribution.undefined], value.ignoreCargoCult); for (const key in value) { if (!(key in this._internals.cacheOptions)) { throw new Error(`Cache option \`${key}\` does not exist`); @@ -93180,26 +91886,24 @@ class Options { return this._internals.https; } set https(value) { - options_assertPlainObject('https', value); - options_assertAny('https.rejectUnauthorized', [distribution.boolean, distribution.undefined], value.rejectUnauthorized); - options_assertAny('https.checkServerIdentity', [distribution.function, distribution.undefined], value.checkServerIdentity); - options_assertAny('https.serverName', [distribution.string, distribution.undefined], value.serverName); - options_assertAny('https.certificateAuthority', [distribution.string, distribution.object, distribution.array, distribution.undefined], value.certificateAuthority); - options_assertAny('https.key', [distribution.string, distribution.object, distribution.array, distribution.undefined], value.key); - options_assertAny('https.certificate', [distribution.string, distribution.object, distribution.array, distribution.undefined], value.certificate); - options_assertAny('https.passphrase', [distribution.string, distribution.undefined], value.passphrase); - options_assertAny('https.pfx', [distribution.string, distribution.buffer, distribution.array, distribution.undefined], value.pfx); - options_assertAny('https.alpnProtocols', [distribution.array, distribution.undefined], value.alpnProtocols); - options_assertAny('https.ciphers', [distribution.string, distribution.undefined], value.ciphers); - options_assertAny('https.dhparam', [distribution.string, distribution.buffer, distribution.undefined], value.dhparam); - options_assertAny('https.signatureAlgorithms', [distribution.string, distribution.undefined], value.signatureAlgorithms); - options_assertAny('https.minVersion', [distribution.string, distribution.undefined], value.minVersion); - options_assertAny('https.maxVersion', [distribution.string, distribution.undefined], value.maxVersion); - options_assertAny('https.honorCipherOrder', [distribution.boolean, distribution.undefined], value.honorCipherOrder); - options_assertAny('https.tlsSessionLifetime', [distribution.number, distribution.undefined], value.tlsSessionLifetime); - options_assertAny('https.ecdhCurve', [distribution.string, distribution.undefined], value.ecdhCurve); - options_assertAny('https.certificateRevocationLists', [distribution.string, distribution.buffer, distribution.array, distribution.undefined], value.certificateRevocationLists); - options_assertAny('https.secureOptions', [distribution.number, distribution.undefined], value.secureOptions); + assert.plainObject(value); + assert.any([distribution.boolean, distribution.undefined], value.rejectUnauthorized); + assert.any([distribution.function, distribution.undefined], value.checkServerIdentity); + assert.any([distribution.string, distribution.object, distribution.array, distribution.undefined], value.certificateAuthority); + assert.any([distribution.string, distribution.object, distribution.array, distribution.undefined], value.key); + assert.any([distribution.string, distribution.object, distribution.array, distribution.undefined], value.certificate); + assert.any([distribution.string, distribution.undefined], value.passphrase); + assert.any([distribution.string, distribution.buffer, distribution.array, distribution.undefined], value.pfx); + assert.any([distribution.array, distribution.undefined], value.alpnProtocols); + assert.any([distribution.string, distribution.undefined], value.ciphers); + assert.any([distribution.string, distribution.buffer, distribution.undefined], value.dhparam); + assert.any([distribution.string, distribution.undefined], value.signatureAlgorithms); + assert.any([distribution.string, distribution.undefined], value.minVersion); + assert.any([distribution.string, distribution.undefined], value.maxVersion); + assert.any([distribution.boolean, distribution.undefined], value.honorCipherOrder); + assert.any([distribution.number, distribution.undefined], value.tlsSessionLifetime); + assert.any([distribution.string, distribution.undefined], value.ecdhCurve); + assert.any([distribution.string, distribution.buffer, distribution.array, distribution.undefined], value.certificateRevocationLists); for (const key in value) { if (!(key in this._internals.https)) { throw new Error(`HTTPS option \`${key}\` does not exist`); @@ -93229,7 +91933,7 @@ class Options { if (value === null) { throw new TypeError('To get a Buffer, set `options.responseType` to `buffer` instead'); } - options_assertAny('encoding', [distribution.string, distribution.undefined], value); + assert.any([distribution.string, distribution.undefined], value); this._internals.encoding = value; } /** @@ -93329,7 +92033,7 @@ class Options { return this._internals.maxHeaderSize; } set maxHeaderSize(value) { - options_assertAny('maxHeaderSize', [distribution.number, distribution.undefined], value); + assert.any([distribution.number, distribution.undefined], value); this._internals.maxHeaderSize = value; } get enableUnixSockets() { @@ -93339,23 +92043,6 @@ class Options { assert.boolean(value); this._internals.enableUnixSockets = value; } - /** - Throw an error if the server response's `content-length` header value doesn't match the number of bytes received. - - This is useful for detecting truncated responses and follows RFC 9112 requirements for message completeness. - - __Note__: Responses without a `content-length` header are not validated. - __Note__: When enabled and validation fails, a `ReadError` with code `ERR_HTTP_CONTENT_LENGTH_MISMATCH` will be thrown. - - @default false - */ - get strictContentLength() { - return this._internals.strictContentLength; - } - set strictContentLength(value) { - assert.boolean(value); - this._internals.strictContentLength = value; - } // eslint-disable-next-line @typescript-eslint/naming-convention toJSON() { return { ...this._internals }; @@ -93368,17 +92055,7 @@ class Options { const url = internals.url; let agent; if (url.protocol === 'https:') { - if (internals.http2) { - // Ensure HTTP/2 agent is configured for connection reuse - // If no custom agent.http2 is provided, use the global agent for connection pooling - agent = { - ...internals.agent, - http2: internals.agent.http2 ?? http2_wrapper_source.globalAgent, - }; - } - else { - agent = internals.agent.https; - } + agent = internals.http2 ? internals.agent : internals.agent.https; } else { agent = internals.agent.http; @@ -93404,7 +92081,6 @@ class Options { pfx: https.pfx, rejectUnauthorized: https.rejectUnauthorized, checkServerIdentity: https.checkServerIdentity ?? external_node_tls_namespaceObject.checkServerIdentity, - servername: https.serverName, ciphers: https.ciphers, honorCipherOrder: https.honorCipherOrder, minVersion: https.minVersion, @@ -93414,7 +92090,6 @@ class Options { dhparam: https.dhparam, ecdhCurve: https.ecdhCurve, crl: https.certificateRevocationLists, - secureOptions: https.secureOptions, // HTTP options lookup: internals.dnsLookup ?? internals.dnsCache?.lookup, family: internals.dnsLookupIpVersion, @@ -93478,7 +92153,7 @@ class Options { } } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/response.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/response.js const isResponseOk = (response) => { const { statusCode } = response; @@ -93492,11 +92167,11 @@ An error to be thrown when server response code is 2xx, and parsing body fails. Includes a `response` property. */ class ParseError extends RequestError { - name = 'ParseError'; - code = 'ERR_BODY_PARSE_FAILURE'; constructor(error, response) { const { options } = response.request; super(`${error.message} in "${options.url.toString()}"`, error, response.request); + this.name = 'ParseError'; + this.code = 'ERR_BODY_PARSE_FAILURE'; } } const parseBody = (response, responseType, parseJson, encoding) => { @@ -93521,95 +92196,19 @@ const parseBody = (response, responseType, parseJson, encoding) => { }, response); }; -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/utils/is-client-request.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/utils/is-client-request.js function isClientRequest(clientRequest) { return clientRequest.writable && !clientRequest.writableEnded; } /* harmony default export */ const is_client_request = (isClientRequest); -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/utils/is-unix-socket-url.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/utils/is-unix-socket-url.js // eslint-disable-next-line @typescript-eslint/naming-convention function isUnixSocketURL(url) { return url.protocol === 'unix:' || url.hostname === 'unix'; } -/** -Extract the socket path from a UNIX socket URL. - -@example -``` -getUnixSocketPath(new URL('http://unix/foo:/path')); -//=> '/foo' - -getUnixSocketPath(new URL('unix:/foo:/path')); -//=> '/foo' - -getUnixSocketPath(new URL('http://example.com')); -//=> undefined -``` -*/ -function getUnixSocketPath(url) { - if (!isUnixSocketURL(url)) { - return undefined; - } - return /(?.+?):(?.+)/.exec(`${url.pathname}${url.search}`)?.groups?.socketPath; -} - -;// CONCATENATED MODULE: external "node:diagnostics_channel" -const external_node_diagnostics_channel_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:diagnostics_channel"); -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/diagnostics-channel.js - - -const channels = { - requestCreate: external_node_diagnostics_channel_namespaceObject.channel('got:request:create'), - requestStart: external_node_diagnostics_channel_namespaceObject.channel('got:request:start'), - responseStart: external_node_diagnostics_channel_namespaceObject.channel('got:response:start'), - responseEnd: external_node_diagnostics_channel_namespaceObject.channel('got:response:end'), - retry: external_node_diagnostics_channel_namespaceObject.channel('got:request:retry'), - error: external_node_diagnostics_channel_namespaceObject.channel('got:request:error'), - redirect: external_node_diagnostics_channel_namespaceObject.channel('got:response:redirect'), -}; -function generateRequestId() { - return (0,external_node_crypto_.randomUUID)(); -} -function publishRequestCreate(message) { - if (channels.requestCreate.hasSubscribers) { - channels.requestCreate.publish(message); - } -} -function publishRequestStart(message) { - if (channels.requestStart.hasSubscribers) { - channels.requestStart.publish(message); - } -} -function publishResponseStart(message) { - if (channels.responseStart.hasSubscribers) { - channels.responseStart.publish(message); - } -} -function publishResponseEnd(message) { - if (channels.responseEnd.hasSubscribers) { - channels.responseEnd.publish(message); - } -} -function publishRetry(message) { - if (channels.retry.hasSubscribers) { - channels.retry.publish(message); - } -} -function publishError(message) { - if (channels.error.hasSubscribers) { - channels.error.publish(message); - } -} -function publishRedirect(message) { - if (channels.redirect.hasSubscribers) { - channels.redirect.publish(message); - } -} - -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/core/index.js - +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/core/index.js @@ -93632,14 +92231,9 @@ function publishRedirect(message) { const supportsBrotli = distribution.string(external_node_process_.versions.brotli); -const core_supportsZstd = distribution.string(external_node_process_.versions.zstd); const methodsWithoutBody = new Set(['GET', 'HEAD']); -// Methods that should auto-end streams when no body is provided -const methodsWithoutBodyStream = new Set(['OPTIONS', 'DELETE', 'PATCH']); const cacheableStore = new WeakableMap(); const redirectCodes = new Set([300, 301, 302, 303, 304, 307, 308]); -// Track errors that have been processed by beforeError hooks to preserve custom error types -const errorsProcessedByHooks = new WeakSet(); const proxiedRequestEvents = [ 'socket', 'connect', @@ -93656,30 +92250,27 @@ class Request extends external_node_stream_.Duplex { options; response; requestUrl; - redirectUrls = []; - retryCount = 0; - _stopReading = false; - _stopRetry = core_noop; - _downloadedSize = 0; - _uploadedSize = 0; - _pipedServerResponses = new Set(); + redirectUrls; + retryCount; + _stopRetry; + _downloadedSize; + _uploadedSize; + _stopReading; + _pipedServerResponses; _request; _responseSize; _bodySize; - _unproxyEvents = core_noop; + _unproxyEvents; _isFromCache; - _triggerRead = false; - _jobs = []; - _cancelTimeouts = core_noop; - _removeListeners = core_noop; + _cannotHaveBody; + _triggerRead; + _cancelTimeouts; + _removeListeners; _nativeResponse; - _flushed = false; - _aborted = false; - _expectedContentLength; - _compressedBytesCount; - _requestId = generateRequestId(); + _flushed; + _aborted; // We need this because `this._request` if `undefined` when using cache - _requestInitialized = false; + _requestInitialized; constructor(url, options, defaults) { super({ // Don't destroy immediately, as the error may be emitted on unsuccessful retry @@ -93687,8 +92278,24 @@ class Request extends external_node_stream_.Duplex { // It needs to be zero because we're just proxying the data to another stream highWaterMark: 0, }); + this._downloadedSize = 0; + this._uploadedSize = 0; + this._stopReading = false; + this._pipedServerResponses = new Set(); + this._cannotHaveBody = false; + this._unproxyEvents = core_noop; + this._triggerRead = false; + this._cancelTimeouts = core_noop; + this._removeListeners = core_noop; + this._jobs = []; + this._flushed = false; + this._requestInitialized = false; + this._aborted = false; + this.redirectUrls = []; + this.retryCount = 0; + this._stopRetry = core_noop; this.on('pipe', (source) => { - if (this.options.copyPipedHeaders && source?.headers) { + if (source?.headers) { Object.assign(this.options.headers, source.headers); } }); @@ -93706,12 +92313,6 @@ class Request extends external_node_stream_.Duplex { this.options.url = ''; } this.requestUrl = this.options.url; - // Publish request creation event - publishRequestCreate({ - requestId: this._requestId, - url: this.options.url?.toString() ?? '', - method: this.options.method, - }); } catch (error) { const { options } = error; @@ -93720,18 +92321,7 @@ class Request extends external_node_stream_.Duplex { } this.flush = async () => { this.flush = async () => { }; - // Defer error emission to next tick to allow user to attach error handlers - external_node_process_.nextTick(() => { - // _beforeError requires options to access retry logic and hooks - if (this.options) { - this._beforeError(error); - } - else { - // Options is undefined, skip _beforeError and destroy directly - const requestError = error instanceof RequestError ? error : new RequestError(error.message, error, this); - this.destroy(requestError); - } - }); + this.destroy(error); }; return; } @@ -93842,29 +92432,19 @@ class Request extends external_node_stream_.Duplex { } } const retryOptions = options.retry; - const computedValue = calculate_retry_delay({ + backoff = await retryOptions.calculateDelay({ attemptCount, retryOptions, error: typedError, retryAfter, - computedValue: retryOptions.maxRetryAfter ?? options.timeout.request ?? Number.POSITIVE_INFINITY, - }); - // When enforceRetryRules is true, respect the retry rules (limit, methods, statusCodes, errorCodes) - // before calling the user's calculateDelay function. If computedValue is 0 (meaning retry is not allowed - // based on these rules), skip calling calculateDelay entirely. - // When false (default), always call calculateDelay, allowing it to override retry decisions. - if (retryOptions.enforceRetryRules && computedValue === 0) { - backoff = 0; - } - else { - backoff = await retryOptions.calculateDelay({ + computedValue: calculate_retry_delay({ attemptCount, retryOptions, error: typedError, retryAfter, - computedValue, - }); - } + computedValue: retryOptions.maxRetryAfter ?? options.timeout.request ?? Number.POSITIVE_INFINITY, + }), + }); } catch (error_) { void this._error(new RequestError(error_.message, error_, this)); @@ -93882,8 +92462,6 @@ class Request extends external_node_stream_.Duplex { if (this.destroyed) { return; } - // Capture body BEFORE hooks run to detect reassignment - const bodyBeforeHooks = this.options.body; try { for (const hook of this.options.hooks.beforeRetry) { // eslint-disable-next-line no-await-in-loop @@ -93891,58 +92469,14 @@ class Request extends external_node_stream_.Duplex { } } catch (error_) { - void this._error(new RequestError(error_.message, error_, this)); + void this._error(new RequestError(error_.message, error, this)); return; } // Something forced us to abort the retry if (this.destroyed) { return; } - // Preserve stream body reassigned in beforeRetry hooks. - const bodyAfterHooks = this.options.body; - const bodyWasReassigned = bodyBeforeHooks !== bodyAfterHooks; - // Resource cleanup and preservation logic for retry with body reassignment. - // The Promise wrapper (as-promise/index.ts) compares body identity to detect consumed streams, - // so we must preserve the body reference across destroy(). However, destroy() calls _destroy() - // which destroys this.options.body, creating a complex dance of clear/restore operations. - // - // Key constraints: - // 1. If body was reassigned, we must NOT destroy the NEW stream (it will be used for retry) - // 2. If body was reassigned, we MUST destroy the OLD stream to prevent memory leaks - // 3. We must restore the body reference after destroy() for identity checks in promise wrapper - // 4. We cannot use the normal setter after destroy() because it validates stream readability - if (bodyWasReassigned) { - const oldBody = bodyBeforeHooks; - // Temporarily clear body to prevent destroy() from destroying the new stream - this.options.body = undefined; - this.destroy(); - // Clean up the old stream resource if it's a stream and different from new body - // (edge case: if old and new are same stream object, don't destroy it) - if (distribution.nodeStream(oldBody) && oldBody !== bodyAfterHooks) { - oldBody.destroy(); - } - // Restore new body for promise wrapper's identity check - // We bypass the setter because it validates stream.readable (which fails for destroyed request) - // Type assertion is necessary here to access private _internals without exposing internal API - if (distribution.nodeStream(bodyAfterHooks) && (bodyAfterHooks.readableEnded || bodyAfterHooks.destroyed)) { - throw new TypeError('The reassigned stream body must be readable. Ensure you provide a fresh, readable stream in the beforeRetry hook.'); - } - this.options._internals.body = bodyAfterHooks; - } - else { - // Body wasn't reassigned - use normal destroy flow which handles body cleanup - this.destroy(); - // Note: We do NOT restore the body reference here. The stream was destroyed by _destroy() - // and should not be accessed. The promise wrapper will see that body identity hasn't changed - // and will detect it's a consumed stream, which is the correct behavior. - } - // Publish retry event - publishRetry({ - requestId: this._requestId, - retryCount: this.retryCount + 1, - error: typedError, - delay: backoff, - }); + this.destroy(); this.emit('retry', this.retryCount + 1, error, (updatedOptions) => { const request = new Request(options.url, updatedOptions, options); request.retryCount = this.retryCount + 1; @@ -94033,28 +92567,8 @@ class Request extends external_node_stream_.Duplex { if (this._request) { this._request.destroy(); } - // Workaround: http-timer only sets timings.end when the response emits 'end'. - // When a stream is destroyed before completion, the 'end' event may not fire, - // leaving timings.end undefined. This should ideally be fixed in http-timer - // by listening to the 'close' event, but we handle it here for now. - // Only set timings.end if there was no error or abort (to maintain semantic correctness). - const timings = this._request?.timings; - if (timings && distribution.undefined(timings.end) && !distribution.undefined(timings.response) && distribution.undefined(timings.error) && distribution.undefined(timings.abort)) { - timings.end = Date.now(); - if (distribution.undefined(timings.phases.total)) { - timings.phases.download = timings.end - timings.response; - timings.phases.total = timings.end - timings.start; - } - } - // Preserve custom errors returned by beforeError hooks. - // For other errors, wrap non-RequestError instances for consistency. - if (error !== null && !distribution.undefined(error)) { - const processedByHooks = error instanceof Error && errorsProcessedByHooks.has(error); - if (!processedByHooks && !(error instanceof RequestError)) { - error = error instanceof Error - ? new RequestError(error.message, error, this) - : new RequestError(String(error), {}, this); - } + if (error !== null && !distribution.undefined(error) && !(error instanceof RequestError)) { + error = new RequestError(error.message, error, this); } callback(error); } @@ -94071,22 +92585,6 @@ class Request extends external_node_stream_.Duplex { super.unpipe(destination); return this; } - _checkContentLengthMismatch() { - if (this.options.strictContentLength && this._expectedContentLength !== undefined) { - // Use compressed bytes count when available (for compressed responses), - // otherwise use _downloadedSize (for uncompressed responses) - const actualSize = this._compressedBytesCount ?? this._downloadedSize; - if (actualSize !== this._expectedContentLength) { - this._beforeError(new ReadError({ - message: `Content-Length mismatch: expected ${this._expectedContentLength} bytes, received ${actualSize} bytes`, - name: 'Error', - code: 'ERR_HTTP_CONTENT_LENGTH_MISMATCH', - }, this)); - return true; - } - } - return false; - } async _finalizeBody() { const { options } = this; const { headers } = options; @@ -94095,6 +92593,7 @@ class Request extends external_node_stream_.Duplex { const isJSON = !distribution.undefined(options.json); const isBody = !distribution.undefined(options.body); const cannotHaveBody = methodsWithoutBody.has(options.method) && !(options.method === 'GET' && options.allowGetBody); + this._cannotHaveBody = cannotHaveBody; if (isForm || isJSON || isBody) { if (cannotHaveBody) { throw new TypeError(`The \`${options.method}\` method cannot be used with a body`); @@ -94161,32 +92660,12 @@ class Request extends external_node_stream_.Duplex { const { options } = this; const { url } = options; this._nativeResponse = response; - const statusCode = response.statusCode; - const { method } = options; - // Skip decompression for responses that must not have bodies per RFC 9110: - // - HEAD responses (any status code) - // - 1xx (Informational): 100, 101, 102, 103, etc. - // - 204 (No Content) - // - 205 (Reset Content) - // - 304 (Not Modified) - const hasNoBody = method === 'HEAD' - || (statusCode >= 100 && statusCode < 200) - || statusCode === 204 - || statusCode === 205 - || statusCode === 304; - if (options.decompress && !hasNoBody) { - // When strictContentLength is enabled, track compressed bytes by listening to - // the native response's data events before decompression - if (options.strictContentLength) { - this._compressedBytesCount = 0; - this._nativeResponse.on('data', (chunk) => { - this._compressedBytesCount += byteLength(chunk); - }); - } - response = decompressResponse(response); + if (options.decompress) { + response = decompress_response(response); } + const statusCode = response.statusCode; const typedResponse = response; - typedResponse.statusMessage = typedResponse.statusMessage || external_node_http_.STATUS_CODES[statusCode]; // eslint-disable-line @typescript-eslint/prefer-nullish-coalescing -- The status message can be empty. + typedResponse.statusMessage = typedResponse.statusMessage ?? external_node_http_.STATUS_CODES[statusCode]; typedResponse.url = options.url.toString(); typedResponse.requestUrl = this.requestUrl; typedResponse.redirectUrls = this.redirectUrls; @@ -94198,35 +92677,10 @@ class Request extends external_node_stream_.Duplex { this._isFromCache = typedResponse.isFromCache; this._responseSize = Number(response.headers['content-length']) || undefined; this.response = typedResponse; - // Publish response start event - publishResponseStart({ - requestId: this._requestId, - url: typedResponse.url, - statusCode, - headers: response.headers, - isFromCache: typedResponse.isFromCache, + response.once('end', () => { + this._responseSize = this._downloadedSize; + this.emit('downloadProgress', this.downloadProgress); }); - // Workaround for http-timer bug: when connecting to an IP address (no DNS lookup), - // http-timer sets lookup = connect instead of lookup = socket, resulting in - // dns = lookup - socket being a small positive number instead of 0. - // See https://github.com/sindresorhus/got/issues/2279 - const { timings } = response; - if (timings?.lookup !== undefined && timings.socket !== undefined && timings.connect !== undefined && timings.lookup === timings.connect && timings.phases.dns !== 0) { - // Fix the DNS phase to be 0 and set lookup to socket time - timings.phases.dns = 0; - timings.lookup = timings.socket; - // Recalculate TCP time to be the full time from socket to connect - timings.phases.tcp = timings.connect - timings.socket; - } - // Workaround for http-timer limitation with HTTP/2: - // When using HTTP/2, the socket is a proxy that http-timer discards, - // so lookup, connect, and secureConnect events are never captured. - // This results in phases.request being NaN (undefined - undefined). - // Set it to undefined to be consistent with other unavailable timings. - // See https://github.com/sindresorhus/got/issues/1958 - if (timings && Number.isNaN(timings.phases.request)) { - timings.phases.request = undefined; - } response.once('error', (error) => { this._aborted = true; // Force clean-up, because some packages don't do this. @@ -94236,15 +92690,13 @@ class Request extends external_node_stream_.Duplex { }); response.once('aborted', () => { this._aborted = true; - // Check if there's a content-length mismatch to provide a more specific error - if (!this._checkContentLengthMismatch()) { - this._beforeError(new ReadError({ - name: 'Error', - message: 'The server aborted pending request', - code: 'ECONNRESET', - }, this)); - } + this._beforeError(new ReadError({ + name: 'Error', + message: 'The server aborted pending request', + code: 'ECONNRESET', + }, this)); }); + this.emit('downloadProgress', this.downloadProgress); const rawCookies = response.headers['set-cookie']; if (distribution.object(options.cookieJar) && rawCookies) { let promises = rawCookies.map(async (rawCookie) => options.cookieJar.setCookie(rawCookie, url.toString())); @@ -94283,8 +92735,6 @@ class Request extends external_node_stream_.Duplex { return; } this._request = undefined; - // Reset download progress for the new request - this._downloadedSize = 0; const updatedOptions = new Options(undefined, undefined, this.options); const serverRequestedGet = statusCode === 303 && updatedOptions.method !== 'GET' && updatedOptions.method !== 'HEAD'; const canRewrite = statusCode !== 307 && statusCode !== 308; @@ -94305,11 +92755,7 @@ class Request extends external_node_stream_.Duplex { return; } // Redirecting to a different site, clear sensitive data. - // For UNIX sockets, different socket paths are also different origins. - const isDifferentOrigin = redirectUrl.hostname !== url.hostname - || redirectUrl.port !== url.port - || getUnixSocketPath(url) !== getUnixSocketPath(redirectUrl); - if (isDifferentOrigin) { + if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) { if ('host' in updatedOptions.headers) { delete updatedOptions.headers.host; } @@ -94329,18 +92775,12 @@ class Request extends external_node_stream_.Duplex { redirectUrl.password = updatedOptions.password; } this.redirectUrls.push(redirectUrl); + updatedOptions.prefixUrl = ''; updatedOptions.url = redirectUrl; for (const hook of updatedOptions.hooks.beforeRedirect) { // eslint-disable-next-line no-await-in-loop await hook(updatedOptions, typedResponse); } - // Publish redirect event - publishRedirect({ - requestId: this._requestId, - fromUrl: url.toString(), - toUrl: redirectUrl.toString(), - statusCode, - }); this.emit('redirect', updatedOptions, typedResponse); this.options = updatedOptions; await this._makeRequest(); @@ -94360,41 +92800,6 @@ class Request extends external_node_stream_.Duplex { this._beforeError(new HTTPError(typedResponse)); return; } - // Store the expected content-length from the native response for validation. - // This is the content-length before decompression, which is what actually gets transferred. - // Skip storing for responses that shouldn't have bodies per RFC 9110. - // When decompression occurs, only store if strictContentLength is enabled. - const wasDecompressed = response !== this._nativeResponse; - if (!hasNoBody && (!wasDecompressed || options.strictContentLength)) { - const contentLengthHeader = this._nativeResponse.headers['content-length']; - if (contentLengthHeader !== undefined) { - const expectedLength = Number(contentLengthHeader); - if (!Number.isNaN(expectedLength) && expectedLength >= 0) { - this._expectedContentLength = expectedLength; - } - } - } - // Set up end listener AFTER redirect check to avoid emitting progress for redirect responses - response.once('end', () => { - // Validate content-length if it was provided - // Per RFC 9112: "If the sender closes the connection before the indicated number - // of octets are received, the recipient MUST consider the message to be incomplete" - if (this._checkContentLengthMismatch()) { - return; - } - this._responseSize = this._downloadedSize; - this.emit('downloadProgress', this.downloadProgress); - // Publish response end event - publishResponseEnd({ - requestId: this._requestId, - url: typedResponse.url, - statusCode, - bodySize: this._downloadedSize, - timings: this.timings, - }); - this.push(null); - }); - this.emit('downloadProgress', this.downloadProgress); response.on('readable', () => { if (this._triggerRead) { this._read(); @@ -94406,6 +92811,9 @@ class Request extends external_node_stream_.Duplex { this.on('pause', () => { response.pause(); }); + response.once('end', () => { + this.push(null); + }); if (this._noPipe) { const success = await this._setRawBody(); if (success) { @@ -94418,22 +92826,12 @@ class Request extends external_node_stream_.Duplex { if (destination.headersSent) { continue; } - // Check if decompression actually occurred by comparing stream objects. - // decompressResponse wraps the response stream when it decompresses, - // so response !== this._nativeResponse indicates decompression happened. - const wasDecompressed = response !== this._nativeResponse; + // eslint-disable-next-line guard-for-in for (const key in response.headers) { - if (Object.hasOwn(response.headers, key)) { - const value = response.headers[key]; - // When decompression occurred, skip content-encoding and content-length - // as they refer to the compressed data, not the decompressed stream. - if (wasDecompressed && (key === 'content-encoding' || key === 'content-length')) { - continue; - } - // Skip if value is undefined - if (value !== undefined) { - destination.setHeader(key, value); - } + const isAllowed = options.decompress ? key !== 'content-encoding' : true; + const value = response.headers[key]; + if (isAllowed) { + destination.setHeader(key, value); } } destination.statusCode = statusCode; @@ -94469,27 +92867,12 @@ class Request extends external_node_stream_.Duplex { _onRequest(request) { const { options } = this; const { timeout, url } = options; - // Publish request start event - publishRequestStart({ - requestId: this._requestId, - url: url?.toString() ?? '', - method: options.method, - headers: options.headers, - }); dist_source(request); - this._cancelTimeouts = timedOut(request, timeout, url); if (this.options.http2) { // Unset stream timeout, as the `timeout` option was used only for connection timeout. - // We remove all 'timeout' listeners instead of calling setTimeout(0) because: - // 1. setTimeout(0) causes a memory leak (see https://github.com/sindresorhus/got/issues/690) - // 2. With HTTP/2 connection reuse, setTimeout(0) accumulates listeners on the socket - // 3. removeAllListeners('timeout') properly cleans up without the memory leak - request.removeAllListeners('timeout'); - // For HTTP/2, wait for socket and remove timeout listeners from it - request.once('socket', (socket) => { - socket.removeAllListeners('timeout'); - }); + request.setTimeout(0); } + this._cancelTimeouts = timedOut(request, timeout, url); const responseEventName = options.cache ? 'cacheableResponse' : 'response'; request.once(responseEventName, (response) => { void this._onResponse(response); @@ -94525,20 +92908,7 @@ class Request extends external_node_stream_.Duplex { if (distribution.nodeStream(body)) { body.pipe(currentRequest); } - else if (distribution.buffer(body)) { - // Buffer should be sent directly without conversion - this._writeRequest(body, undefined, () => { }); - currentRequest.end(); - } - else if (distribution.typedArray(body)) { - // Typed arrays should be treated like buffers, not iterated over - // Create a Uint8Array view over the data (Node.js streams accept Uint8Array) - const typedArray = body; - const uint8View = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); - this._writeRequest(uint8View, undefined, () => { }); - currentRequest.end(); - } - else if (distribution.asyncIterable(body) || (distribution.iterable(body) && !distribution.string(body) && !isBuffer(body))) { + else if (distribution.generator(body) || distribution.asyncGenerator(body)) { (async () => { try { for await (const chunk of body) { @@ -94551,125 +92921,56 @@ class Request extends external_node_stream_.Duplex { } })(); } - else if (distribution.undefined(body)) { - // No body to send, end the request - const cannotHaveBody = methodsWithoutBody.has(this.options.method) && !(this.options.method === 'GET' && this.options.allowGetBody); - const shouldAutoEndStream = methodsWithoutBodyStream.has(this.options.method); - if ((this._noPipe ?? false) || cannotHaveBody || currentRequest !== this || shouldAutoEndStream) { - currentRequest.end(); - } - } - else { + else if (!distribution.undefined(body)) { this._writeRequest(body, undefined, () => { }); currentRequest.end(); } + else if (this._cannotHaveBody || this._noPipe) { + currentRequest.end(); + } } _prepareCache(cache) { - if (cacheableStore.has(cache)) { - return; + if (!cacheableStore.has(cache)) { + const cacheableRequest = new dist(((requestOptions, handler) => { + const result = requestOptions._request(requestOptions, handler); + // TODO: remove this when `cacheable-request` supports async request functions. + if (distribution.promise(result)) { + // We only need to implement the error handler in order to support HTTP2 caching. + // The result will be a promise anyway. + // @ts-expect-error ignore + result.once = (event, handler) => { + if (event === 'error') { + (async () => { + try { + await result; + } + catch (error) { + handler(error); + } + })(); + } + else if (event === 'abort' || event === 'destroy') { + // The empty catch is needed here in case when + // it rejects before it's `await`ed in `_makeRequest`. + (async () => { + try { + const request = (await result); + request.once(event, handler); + } + catch { } + })(); + } + else { + /* istanbul ignore next: safety check */ + throw new Error(`Unknown HTTP2 promise event: ${event}`); + } + return result; + }; + } + return result; + }), cache); + cacheableStore.set(cache, cacheableRequest.request()); } - const cacheableRequest = new dist(((requestOptions, handler) => { - /** - Wraps the cacheable-request handler to run beforeCache hooks. - These hooks control caching behavior by: - - Directly mutating the response object (changes apply to what gets cached) - - Returning `false` to prevent caching - - Returning `void`/`undefined` to use default caching behavior - - Hooks use direct mutation - they can modify response.headers, response.statusCode, etc. - Mutations take effect immediately and determine what gets cached. - */ - const wrappedHandler = handler ? (response) => { - const { beforeCacheHooks, gotRequest } = requestOptions; - // Early return if no hooks - cache the original response - if (!beforeCacheHooks || beforeCacheHooks.length === 0) { - handler(response); - return; - } - try { - // Call each beforeCache hook with the response - // Hooks can directly mutate the response - mutations take effect immediately - for (const hook of beforeCacheHooks) { - const result = hook(response); - if (result === false) { - // Prevent caching by adding no-cache headers - // Mutate the response directly to add headers - response.headers['cache-control'] = 'no-cache, no-store, must-revalidate'; - response.headers.pragma = 'no-cache'; - response.headers.expires = '0'; - handler(response); - // Don't call remaining hooks - we've decided not to cache - return; - } - if (distribution.promise(result)) { - // BeforeCache hooks must be synchronous because cacheable-request's handler is synchronous - throw new TypeError('beforeCache hooks must be synchronous. The hook returned a Promise, but this hook must return synchronously. If you need async logic, use beforeRequest hook instead.'); - } - if (result !== undefined) { - // Hooks should return false or undefined only - // Mutations work directly - no need to return the response - throw new TypeError('beforeCache hook must return false or undefined. To modify the response, mutate it directly.'); - } - // Else: void/undefined = continue - } - } - catch (error) { - // Convert hook errors to RequestError and propagate - // This is consistent with how other hooks handle errors - if (gotRequest) { - gotRequest._beforeError(error instanceof RequestError ? error : new RequestError(error.message, error, gotRequest)); - // Don't call handler when error was propagated successfully - return; - } - // If gotRequest is missing, log the error to aid debugging - // We still call the handler to prevent the request from hanging - console.error('Got: beforeCache hook error (request context unavailable):', error); - // Call handler with response (potentially partially modified) - handler(response); - return; - } - // All hooks ran successfully - // Cache the response with any mutations applied - handler(response); - } : handler; - const result = requestOptions._request(requestOptions, wrappedHandler); - // TODO: remove this when `cacheable-request` supports async request functions. - if (distribution.promise(result)) { - // We only need to implement the error handler in order to support HTTP2 caching. - // The result will be a promise anyway. - // @ts-expect-error ignore - result.once = (event, handler) => { - if (event === 'error') { - (async () => { - try { - await result; - } - catch (error) { - handler(error); - } - })(); - } - else if (event === 'abort' || event === 'destroy') { - // The empty catch is needed here in case when - // it rejects before it's `await`ed in `_makeRequest`. - (async () => { - try { - const request = (await result); - request.once(event, handler); - } - catch { } - })(); - } - else { - /* istanbul ignore next: safety check */ - throw new Error(`Unknown HTTP2 promise event: ${event}`); - } - return result; - }; - } - return result; - }), cache); - cacheableStore.set(cache, cacheableRequest.request()); } async _createCacheableRequest(url, options) { return new Promise((resolve, reject) => { @@ -94681,15 +92982,9 @@ class Request extends external_node_stream_.Duplex { response._readableState.autoDestroy = false; if (request) { const fix = () => { - // For ResponseLike objects from cache, set complete to true if not already set. - // For real HTTP responses, copy from the underlying response. if (response.req) { response.complete = response.req.res.complete; } - else if (response.complete === undefined) { - // ResponseLike from cache should have complete = true - response.complete = true; - } }; response.prependOnceListener('end', fix); fix(); @@ -94718,14 +93013,7 @@ class Request extends external_node_stream_.Duplex { } } if (options.decompress && distribution.undefined(headers['accept-encoding'])) { - const encodings = ['gzip', 'deflate']; - if (supportsBrotli) { - encodings.push('br'); - } - if (core_supportsZstd) { - encodings.push('zstd'); - } - headers['accept-encoding'] = encodings.join(', '); + headers['accept-encoding'] = supportsBrotli ? 'gzip, deflate, br' : 'gzip, deflate'; } if (username || password) { const credentials = external_node_buffer_.Buffer.from(`${username}:${password}`).toString('base64'); @@ -94738,10 +93026,12 @@ class Request extends external_node_stream_.Duplex { headers.cookie = cookieString; } } + // Reset `prefixUrl` + options.prefixUrl = ''; let request; for (const hook of options.hooks.beforeRequest) { // eslint-disable-next-line no-await-in-loop - const result = await hook(options, { retryCount: this.retryCount }); + const result = await hook(options); if (!distribution.undefined(result)) { // @ts-expect-error Skip the type mismatch to support abstract responses request = () => result; @@ -94755,14 +93045,7 @@ class Request extends external_node_stream_.Duplex { this._requestOptions._request = request; this._requestOptions.cache = options.cache; this._requestOptions.body = options.body; - this._requestOptions.beforeCacheHooks = options.hooks.beforeCache; - this._requestOptions.gotRequest = this; - try { - this._prepareCache(options.cache); - } - catch (error) { - throw new CacheError(error, this); - } + this._prepareCache(options.cache); } // Cache support const function_ = options.cache ? this._createCacheableRequest : request; @@ -94783,15 +93066,15 @@ class Request extends external_node_stream_.Duplex { if (is_client_request(requestOrResponse)) { this._onRequest(requestOrResponse); } - else if (this.writableEnded) { - void this._onResponse(requestOrResponse); - } - else { + else if (this.writable) { this.once('finish', () => { void this._onResponse(requestOrResponse); }); this._sendBody(); } + else { + void this._onResponse(requestOrResponse); + } } catch (error) { if (error instanceof types_CacheError) { @@ -94802,66 +93085,32 @@ class Request extends external_node_stream_.Duplex { } async _error(error) { try { - if (this.options && error instanceof HTTPError && !this.options.throwHttpErrors) { + if (error instanceof HTTPError && !this.options.throwHttpErrors) { // This branch can be reached only when using the Promise API // Skip calling the hooks on purpose. // See https://github.com/sindresorhus/got/issues/2103 } - else if (this.options) { - const hooks = this.options.hooks.beforeError; - if (hooks.length > 0) { - for (const hook of hooks) { - // eslint-disable-next-line no-await-in-loop - error = await hook(error); - // Validate hook return value - if (!(error instanceof Error)) { - throw new TypeError(`The \`beforeError\` hook must return an Error instance. Received ${distribution.string(error) ? 'string' : String(typeof error)}.`); - } - } - // Mark this error as processed by hooks so _destroy preserves custom error types. - // Only mark non-RequestError errors, since RequestErrors are already preserved - // by the instanceof check in _destroy (line 642). - if (!(error instanceof RequestError)) { - errorsProcessedByHooks.add(error); - } + else { + for (const hook of this.options.hooks.beforeError) { + // eslint-disable-next-line no-await-in-loop + error = await hook(error); } } } catch (error_) { error = new RequestError(error_.message, error_, this); } - // Publish error event - publishError({ - requestId: this._requestId, - url: this.options?.url?.toString() ?? '', - error, - timings: this.timings, - }); this.destroy(error); - // Manually emit error for Promise API to ensure it receives it. - // Node.js streams may not re-emit if an error was already emitted during retry attempts. - // Only emit for Promise API (_noPipe = true) to avoid double emissions in stream mode. - // Use process.nextTick to defer emission and allow destroy() to complete first. - // See https://github.com/sindresorhus/got/issues/1995 - if (this._noPipe) { - external_node_process_.nextTick(() => { - this.emit('error', error); - }); - } } _writeRequest(chunk, encoding, callback) { if (!this._request || this._request.destroyed) { - // When there's no request (e.g., using cached response from beforeRequest hook), - // we still need to call the callback to allow the stream to finish properly. - callback(); + // Probably the `ClientRequest` instance will throw return; } this._request.write(chunk, encoding, (error) => { // The `!destroyed` check is required to prevent `uploadProgress` being emitted after the stream was destroyed if (!error && !this._request.destroyed) { - // For strings, encode them first to measure the actual bytes that will be sent - const bytes = typeof chunk === 'string' ? external_node_buffer_.Buffer.from(chunk, encoding) : chunk; - this._uploadedSize += byteLength(bytes); + this._uploadedSize += external_node_buffer_.Buffer.byteLength(chunk, encoding); const progress = this.uploadProgress; if (progress.percent < 1) { this.emit('uploadProgress', progress); @@ -94964,15 +93213,9 @@ class Request extends external_node_stream_.Duplex { get reusedSocket() { return this._request?.reusedSocket; } - /** - Whether the stream is read-only. Returns `true` when `body`, `json`, or `form` options are provided. - */ - get isReadonly() { - return !distribution.undefined(this.options?.body) || !distribution.undefined(this.options?.json) || !distribution.undefined(this.options?.form); - } } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/as-promise/types.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/as-promise/types.js /** An error to be thrown when the request is aborted with `.cancel()`. @@ -94991,7 +93234,7 @@ class types_CancelError extends RequestError { } } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/as-promise/index.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/as-promise/index.js @@ -95012,14 +93255,12 @@ function asPromise(firstRequest) { let globalResponse; let normalizedOptions; const emitter = new external_node_events_.EventEmitter(); - let promiseSettled = false; const promise = new PCancelable((resolve, reject, onCancel) => { onCancel(() => { globalRequest.destroy(); }); onCancel.shouldReject = false; onCancel(() => { - promiseSettled = true; reject(new types_CancelError(globalRequest)); }); const makeRequest = (retryCount) => { @@ -95034,7 +93275,7 @@ function asPromise(firstRequest) { request.once('response', async (response) => { // Parse body const contentEncoding = (response.headers['content-encoding'] ?? '').toLowerCase(); - const isCompressed = contentEncoding === 'gzip' || contentEncoding === 'deflate' || contentEncoding === 'br' || contentEncoding === 'zstd'; + const isCompressed = contentEncoding === 'gzip' || contentEncoding === 'deflate' || contentEncoding === 'br'; const { options } = request; if (isCompressed && !options.decompress) { response.body = response.rawBody; @@ -95064,7 +93305,6 @@ function asPromise(firstRequest) { // @ts-expect-error TS doesn't notice that CancelableRequest is a Promise // eslint-disable-next-line no-await-in-loop response = await hook(response, async (updatedOptions) => { - const preserveHooks = updatedOptions.preserveHooks ?? false; options.merge(updatedOptions); options.prefixUrl = ''; if (updatedOptions.url) { @@ -95072,13 +93312,10 @@ function asPromise(firstRequest) { } // Remove any further hooks for that request, because we'll call them anyway. // The loop continues. We don't want duplicates (asPromise recursion). - // Unless preserveHooks is true, in which case we keep the remaining hooks. - if (!preserveHooks) { - options.hooks.afterResponse = options.hooks.afterResponse.slice(0, index); - } + options.hooks.afterResponse = options.hooks.afterResponse.slice(0, index); throw new RetryError(request); }); - if (!(distribution.object(response) && distribution.number(response.statusCode) && 'body' in response)) { + if (!(distribution.object(response) && distribution.number(response.statusCode) && !distribution.nullOrUndefined(response.body))) { throw new TypeError('The `afterResponse` hook returned an invalid value'); } } @@ -95093,27 +93330,12 @@ function asPromise(firstRequest) { return; } request.destroy(); - promiseSettled = true; resolve(request.options.resolveBodyOnly ? response.body : response); }); - let handledFinalError = false; const onError = (error) => { if (promise.isCanceled) { return; } - // Route errors emitted directly on the stream (e.g., EPIPE from Node.js) - // through retry logic first, then handle them here after retries are exhausted. - // See https://github.com/sindresorhus/got/issues/1995 - if (!request._stopReading) { - request._beforeError(error); - return; - } - // Allow the manual re-emission from Request to land only once. - if (handledFinalError) { - return; - } - handledFinalError = true; - promiseSettled = true; const { options } = request; if (error instanceof HTTPError && !options.throwHttpErrors) { const { response } = error; @@ -95123,21 +93345,10 @@ function asPromise(firstRequest) { } reject(error); }; - // Use .on() instead of .once() to keep the listener active across retries. - // When _stopReading is false, we return early and the error gets re-emitted - // after retry logic completes, so we need this listener to remain active. - // See https://github.com/sindresorhus/got/issues/1995 - request.on('error', onError); + request.once('error', onError); const previousBody = request.options?.body; request.once('retry', (newRetryCount, error) => { firstRequest = undefined; - // If promise already settled, don't retry - // This prevents the race condition in #1489 where a late error - // (e.g., ECONNRESET after successful response) triggers retry - // after the promise has already resolved/rejected - if (promiseSettled) { - return; - } const newBody = request.options.body; if (previousBody === newBody && distribution.nodeStream(newBody)) { error.message = 'Cannot retry with consumed body stream'; @@ -95164,40 +93375,32 @@ function asPromise(firstRequest) { emitter.off(event, function_); return promise; }; - const shortcut = (promiseToAwait, responseType) => { + const shortcut = (responseType) => { const newPromise = (async () => { // Wait until downloading has ended - await promiseToAwait; + await promise; const { options } = globalResponse.request; return parseBody(globalResponse, responseType, options.parseJson, options.encoding); })(); // eslint-disable-next-line @typescript-eslint/no-floating-promises - Object.defineProperties(newPromise, Object.getOwnPropertyDescriptors(promiseToAwait)); + Object.defineProperties(newPromise, Object.getOwnPropertyDescriptors(promise)); return newPromise; }; - // Note: These use `function` syntax (not arrows) to access `this` context. - // When custom handlers wrap the promise to transform errors, these methods - // are copied to the handler's promise. Using `this` ensures we await the - // handler's wrapped promise, not the original, so errors propagate correctly. - promise.json = function () { + promise.json = () => { if (globalRequest.options) { const { headers } = globalRequest.options; if (!globalRequest.writableFinished && !('accept' in headers)) { headers.accept = 'application/json'; } } - return shortcut(this, 'json'); - }; - promise.buffer = function () { - return shortcut(this, 'buffer'); - }; - promise.text = function () { - return shortcut(this, 'text'); + return shortcut('json'); }; + promise.buffer = () => shortcut('buffer'); + promise.text = () => shortcut('text'); return promise; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/create.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/create.js @@ -95339,15 +93542,7 @@ const create = (defaults) => { } else { normalizedOptions.merge(optionsToMerge); - try { - assert.any([distribution.urlInstance, distribution.undefined], optionsToMerge.url); - } - catch (error) { - if (error instanceof Error) { - error.message = `Option 'pagination.paginate.url': ${error.message}`; - } - throw error; - } + assert.any([distribution.urlInstance, distribution.undefined], optionsToMerge.url); if (optionsToMerge.url !== undefined) { normalizedOptions.prefixUrl = ''; normalizedOptions.url = optionsToMerge.url; @@ -95387,7 +93582,7 @@ const create = (defaults) => { }; /* harmony default export */ const source_create = (create); -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.6.2/node_modules/got/dist/source/index.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.7/node_modules/got/dist/source/index.js const defaults = { @@ -95410,1363 +93605,1698 @@ const got = source_create(defaults); - -;// CONCATENATED MODULE: external "node:dns/promises" -const external_node_dns_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:dns/promises"); -// EXTERNAL MODULE: ./node_modules/.pnpm/@actions+cache@4.1.0/node_modules/@actions/cache/lib/cache.js -var cache = __nccwpck_require__(31866); -;// CONCATENATED MODULE: external "node:child_process" -const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:child_process"); -;// CONCATENATED MODULE: external "node:path" -const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path"); -;// CONCATENATED MODULE: ./node_modules/.pnpm/detsys-ts@https+++codeload.github.com+DeterminateSystems+detsys-ts+tar.gz+cb28f5861548d_4d7cb91a8bb951e8650e0a4f49003168/node_modules/detsys-ts/dist/index.js - - - - - - - - - - - - - - - - - - -//#region src/linux-release-info.ts -const readFileAsync = (0,external_node_util_.promisify)(external_node_fs_.readFile); -const linuxReleaseInfoOptionsDefaults = { - mode: "async", - customFile: null, - debug: false +;// CONCATENATED MODULE: external "dns/promises" +const external_dns_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("dns/promises"); +// EXTERNAL MODULE: ./node_modules/.pnpm/@actions+cache@4.0.5/node_modules/@actions/cache/lib/cache.js +var cache = __nccwpck_require__(63002); +// EXTERNAL MODULE: external "child_process" +var external_child_process_ = __nccwpck_require__(35317); +// EXTERNAL MODULE: external "path" +var external_path_ = __nccwpck_require__(16928); +;// CONCATENATED MODULE: ./node_modules/.pnpm/detsys-ts@https+++codeload.github.com+DeterminateSystems+detsys-ts+tar.gz+e439a01995ac0_42b2bed1ec0f71a693d9d66a3bfcc911/node_modules/detsys-ts/dist/index.js +var __defProp = Object.defineProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; + +// src/linux-release-info.ts + + + +var readFileAsync = (0,external_util_.promisify)(external_fs_.readFile); +var linuxReleaseInfoOptionsDefaults = { + mode: "async", + customFile: null, + debug: false }; -/** -* Get OS release info from 'os-release' file and from native os module -* on Windows or Darwin it only returns common os module info -* (uses native fs module) -* @returns {object} info from the current os -*/ function releaseInfo(infoOptions) { - const options = { - ...linuxReleaseInfoOptionsDefaults, - ...infoOptions - }; - const searchOsReleaseFileList = osReleaseFileList(options.customFile); - if (external_node_os_.type() !== "Linux") if (options.mode === "sync") return getOsInfo(); - else return Promise.resolve(getOsInfo()); - if (options.mode === "sync") return readSyncOsreleaseFile(searchOsReleaseFileList, options); - else return Promise.resolve(readAsyncOsReleaseFile(searchOsReleaseFileList, options)); + const options = { ...linuxReleaseInfoOptionsDefaults, ...infoOptions }; + const searchOsReleaseFileList = osReleaseFileList( + options.customFile + ); + if (external_os_.type() !== "Linux") { + if (options.mode === "sync") { + return getOsInfo(); + } else { + return Promise.resolve(getOsInfo()); + } + } + if (options.mode === "sync") { + return readSyncOsreleaseFile(searchOsReleaseFileList, options); + } else { + return Promise.resolve( + readAsyncOsReleaseFile(searchOsReleaseFileList, options) + ); + } } -/** -* Format file data: convert data to object keys/values -* -* @param {object} sourceData Source object to be appended -* @param {string} srcParseData Input file data to be parsed -* @returns {object} Formated object -*/ function formatFileData(sourceData, srcParseData) { - const lines = srcParseData.split("\n"); - for (const line of lines) { - const lineData = line.split("="); - if (lineData.length === 2) { - lineData[1] = lineData[1].replace(/["'\r]/gi, ""); - Object.defineProperty(sourceData, lineData[0].toLowerCase(), { - value: lineData[1], - writable: true, - enumerable: true, - configurable: true - }); - } - } - return sourceData; + const lines = srcParseData.split("\n"); + for (const line of lines) { + const lineData = line.split("="); + if (lineData.length === 2) { + lineData[1] = lineData[1].replace(/["'\r]/gi, ""); + Object.defineProperty(sourceData, lineData[0].toLowerCase(), { + value: lineData[1], + writable: true, + enumerable: true, + configurable: true + }); + } + } + return sourceData; } -/** -* Export a list of os-release files -* -* @param {string} customFile optional custom complete filepath -* @returns {array} list of os-release files -*/ function osReleaseFileList(customFile) { - const DEFAULT_OS_RELEASE_FILES = ["/etc/os-release", "/usr/lib/os-release"]; - if (!customFile) return DEFAULT_OS_RELEASE_FILES; - else return Array(customFile); + const DEFAULT_OS_RELEASE_FILES = ["/etc/os-release", "/usr/lib/os-release"]; + if (!customFile) { + return DEFAULT_OS_RELEASE_FILES; + } else { + return Array(customFile); + } } -/** -* Get OS Basic Info -* (uses node 'os' native module) -* -* @returns {OsInfo} os basic info -*/ function getOsInfo() { - return { - type: external_node_os_.type(), - platform: external_node_os_.platform(), - hostname: external_node_os_.hostname(), - arch: external_node_os_.arch(), - release: external_node_os_.release() - }; + return { + type: external_os_.type(), + platform: external_os_.platform(), + hostname: external_os_.hostname(), + arch: external_os_.arch(), + release: external_os_.release() + }; } async function readAsyncOsReleaseFile(fileList, options) { - let fileData = null; - for (const osReleaseFile of fileList) try { - if (options.debug) console.log(`Trying to read '${osReleaseFile}'...`); - fileData = await readFileAsync(osReleaseFile, "binary"); - if (options.debug) console.log(`Read data:\n${fileData}`); - break; - } catch (error) { - if (options.debug) console.error(error); - } - if (fileData === null) throw new Error("Cannot read os-release file!"); - return formatFileData(getOsInfo(), fileData); + let fileData = null; + for (const osReleaseFile of fileList) { + try { + if (options.debug) { + console.log(`Trying to read '${osReleaseFile}'...`); + } + fileData = await readFileAsync(osReleaseFile, "binary"); + if (options.debug) { + console.log(`Read data: +${fileData}`); + } + break; + } catch (error3) { + if (options.debug) { + console.error(error3); + } + } + } + if (fileData === null) { + throw new Error("Cannot read os-release file!"); + } + return formatFileData(getOsInfo(), fileData); } function readSyncOsreleaseFile(releaseFileList, options) { - let fileData = null; - for (const osReleaseFile of releaseFileList) try { - if (options.debug) console.log(`Trying to read '${osReleaseFile}'...`); - fileData = external_node_fs_.readFileSync(osReleaseFile, "binary"); - if (options.debug) console.log(`Read data:\n${fileData}`); - break; - } catch (error) { - if (options.debug) console.error(error); - } - if (fileData === null) throw new Error("Cannot read os-release file!"); - return formatFileData(getOsInfo(), fileData); + let fileData = null; + for (const osReleaseFile of releaseFileList) { + try { + if (options.debug) { + console.log(`Trying to read '${osReleaseFile}'...`); + } + fileData = external_fs_.readFileSync(osReleaseFile, "binary"); + if (options.debug) { + console.log(`Read data: +${fileData}`); + } + break; + } catch (error3) { + if (options.debug) { + console.error(error3); + } + } + } + if (fileData === null) { + throw new Error("Cannot read os-release file!"); + } + return formatFileData(getOsInfo(), fileData); } -//#endregion -//#region src/actions-core-platform.ts -/** -* Get the name and version of the current Windows system. -*/ -const getWindowsInfo = async () => { - const { stdout: version } = await exec.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Version\"", void 0, { silent: true }); - const { stdout: name } = await exec.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Caption\"", void 0, { silent: true }); - return { - name: name.trim(), - version: version.trim() - }; +// src/actions-core-platform.ts + + + +var getWindowsInfo = async () => { + const { stdout: version } = await exec.getExecOutput( + 'powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', + void 0, + { + silent: true + } + ); + const { stdout: name } = await exec.getExecOutput( + 'powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', + void 0, + { + silent: true + } + ); + return { + name: name.trim(), + version: version.trim() + }; }; -/** -* Get the name and version of the current macOS system. -*/ -const getMacOsInfo = async () => { - const { stdout } = await exec.getExecOutput("sw_vers", void 0, { silent: true }); - const version = stdout.match(/ProductVersion:\s*(.+)/)?.[1] ?? ""; - return { - name: stdout.match(/ProductName:\s*(.+)/)?.[1] ?? "", - version - }; +var getMacOsInfo = async () => { + const { stdout } = await exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = stdout.match(/ProductVersion:\s*(.+)/)?.[1] ?? ""; + const name = stdout.match(/ProductName:\s*(.+)/)?.[1] ?? ""; + return { + name, + version + }; }; -/** -* Get the name and version of the current Linux system. -*/ -const getLinuxInfo = async () => { - let data = {}; - try { - data = releaseInfo({ mode: "sync" }); - core.debug(`Identified release info: ${JSON.stringify(data)}`); - } catch (e) { - core.debug(`Error collecting release info: ${e}`); - } - return { - name: getPropertyViaWithDefault(data, [ - "id", - "name", - "pretty_name", - "id_like" - ], "unknown"), - version: getPropertyViaWithDefault(data, [ - "version_id", - "version", - "version_codename" - ], "unknown") - }; +var getLinuxInfo = async () => { + let data = {}; + try { + data = releaseInfo({ mode: "sync" }); + core.debug(`Identified release info: ${JSON.stringify(data)}`); + } catch (e) { + core.debug(`Error collecting release info: ${e}`); + } + return { + name: getPropertyViaWithDefault( + data, + ["id", "name", "pretty_name", "id_like"], + "unknown" + ), + version: getPropertyViaWithDefault( + data, + ["version_id", "version", "version_codename"], + "unknown" + ) + }; }; function getPropertyViaWithDefault(data, names, defaultValue) { - for (const name of names) { - const ret = getPropertyWithDefault(data, name, defaultValue); - if (ret !== defaultValue) return ret; - } - return defaultValue; + for (const name of names) { + const ret = getPropertyWithDefault(data, name, defaultValue); + if (ret !== defaultValue) { + return ret; + } + } + return defaultValue; } function getPropertyWithDefault(data, name, defaultValue) { - if (!data.hasOwnProperty(name)) return defaultValue; - const value = data[name]; - if (typeof value !== typeof defaultValue) return defaultValue; - return value; + if (!data.hasOwnProperty(name)) { + return defaultValue; + } + const value = data[name]; + if (typeof value !== typeof defaultValue) { + return defaultValue; + } + return value; } -/** -* The Action runner's platform. -*/ -const platform = external_os_.platform(); -/** -* The Action runner's architecture. -*/ -const arch = external_os_.arch(); -/** -* Whether the Action runner is a Windows system. -*/ -const isWindows = platform === "win32"; -/** -* Whether the Action runner is a macOS system. -*/ -const isMacOS = platform === "darwin"; -/** -* Whether the Action runner is a Linux system. -*/ -const isLinux = platform === "linux"; -/** -* Get system-level information about the current host (platform, architecture, etc.). -*/ +var platform2 = external_os_.platform(); +var arch2 = external_os_.arch(); +var isWindows = platform2 === "win32"; +var isMacOS = platform2 === "darwin"; +var isLinux = platform2 === "linux"; async function getDetails() { - return { - ...await (isWindows ? getWindowsInfo() : isMacOS ? getMacOsInfo() : getLinuxInfo()), - platform, - arch, - isWindows, - isMacOS, - isLinux - }; + return { + ...await (isWindows ? getWindowsInfo() : isMacOS ? getMacOsInfo() : getLinuxInfo()), + platform: platform2, + arch: arch2, + isWindows, + isMacOS, + isLinux + }; } -//#endregion -//#region src/errors.ts -/** -* Coerce a value of type `unknown` into a string. -*/ +// src/errors.ts function stringifyError(e) { - if (e instanceof Error) return e.message; - else if (typeof e === "string") return e; - else return JSON.stringify(e); + if (e instanceof Error) { + return e.message; + } else if (typeof e === "string") { + return e; + } else { + return JSON.stringify(e); + } } -//#endregion -//#region src/backtrace.ts -const START_SLOP_SECONDS = 5; +// src/backtrace.ts + + + + + +var START_SLOP_SECONDS = 5; async function collectBacktraces(prefixes, programNameDenyList, startTimestampMs) { - if (isMacOS) return await collectBacktracesMacOS(prefixes, programNameDenyList, startTimestampMs); - if (isLinux) return await collectBacktracesSystemd(prefixes, programNameDenyList, startTimestampMs); - return /* @__PURE__ */ new Map(); + if (isMacOS) { + return await collectBacktracesMacOS( + prefixes, + programNameDenyList, + startTimestampMs + ); + } + if (isLinux) { + return await collectBacktracesSystemd( + prefixes, + programNameDenyList, + startTimestampMs + ); + } + return /* @__PURE__ */ new Map(); } async function collectBacktracesMacOS(prefixes, programNameDenyList, startTimestampMs) { - const backtraces = /* @__PURE__ */ new Map(); - try { - const { stdout: logJson } = await exec.getExecOutput("log", [ - "show", - "--style", - "json", - "--last", - "1m", - "--no-info", - "--predicate", - "sender = 'ReportCrash'" - ], { silent: true }); - const sussyArray = JSON.parse(logJson); - if (!Array.isArray(sussyArray)) throw new Error(`Log json isn't an array: ${logJson}`); - if (sussyArray.length > 0) { - core.info(`Collecting crash data...`); - const delay = async (ms) => new Promise((resolve) => setTimeout(resolve, ms)); - await delay(5e3); - } - } catch { - core.debug("Failed to check logs for in-progress crash dumps; now proceeding with the assumption that all crash dumps completed."); - } - const dirs = [["system", "/Library/Logs/DiagnosticReports/"], ["user", `${process.env["HOME"]}/Library/Logs/DiagnosticReports/`]]; - for (const [source, dir] of dirs) { - const fileNames = (await (0,promises_namespaceObject.readdir)(dir)).filter((fileName) => { - return prefixes.some((prefix) => fileName.startsWith(prefix)); - }).filter((fileName) => { - return !programNameDenyList.some((programName) => fileName.startsWith(programName)); - }).filter((fileName) => { - return !fileName.endsWith(".diag"); - }); - const doGzip = (0,external_node_util_.promisify)(external_node_zlib_.gzip); - for (const fileName of fileNames) try { - if ((await (0,promises_namespaceObject.stat)(`${dir}/${fileName}`)).ctimeMs >= startTimestampMs) { - const buf = await doGzip(await (0,promises_namespaceObject.readFile)(`${dir}/${fileName}`)); - backtraces.set(`backtrace_value_${source}_${fileName}`, buf.toString("base64")); - } - } catch (innerError) { - backtraces.set(`backtrace_failure_${source}_${fileName}`, stringifyError(innerError)); - } - } - return backtraces; + const backtraces = /* @__PURE__ */ new Map(); + try { + const { stdout: logJson } = await exec.getExecOutput( + "log", + [ + "show", + "--style", + "json", + "--last", + // Note we collect the last 1m only, because it should only take a few seconds to write the crash log. + // Therefore, any crashes before this 1m should be long done by now. + "1m", + "--no-info", + "--predicate", + "sender = 'ReportCrash'" + ], + { + silent: true + } + ); + const sussyArray = JSON.parse(logJson); + if (!Array.isArray(sussyArray)) { + throw new Error(`Log json isn't an array: ${logJson}`); + } + if (sussyArray.length > 0) { + core.info(`Collecting crash data...`); + const delay = async (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + await delay(5e3); + } + } catch { + core.debug( + "Failed to check logs for in-progress crash dumps; now proceeding with the assumption that all crash dumps completed." + ); + } + const dirs = [ + ["system", "/Library/Logs/DiagnosticReports/"], + ["user", `${process.env["HOME"]}/Library/Logs/DiagnosticReports/`] + ]; + for (const [source, dir] of dirs) { + const fileNames = (await (0,promises_namespaceObject.readdir)(dir)).filter((fileName) => { + return prefixes.some((prefix) => fileName.startsWith(prefix)); + }).filter((fileName) => { + return !programNameDenyList.some( + (programName) => fileName.startsWith(programName) + ); + }).filter((fileName) => { + return !fileName.endsWith(".diag"); + }); + const doGzip = (0,external_util_.promisify)(external_zlib_.gzip); + for (const fileName of fileNames) { + try { + if ((await (0,promises_namespaceObject.stat)(`${dir}/${fileName}`)).ctimeMs >= startTimestampMs) { + const logText = await (0,promises_namespaceObject.readFile)(`${dir}/${fileName}`); + const buf = await doGzip(logText); + backtraces.set( + `backtrace_value_${source}_${fileName}`, + buf.toString("base64") + ); + } + } catch (innerError) { + backtraces.set( + `backtrace_failure_${source}_${fileName}`, + stringifyError(innerError) + ); + } + } + } + return backtraces; } async function collectBacktracesSystemd(prefixes, programNameDenyList, startTimestampMs) { - const sinceSeconds = Math.ceil((Date.now() - startTimestampMs) / 1e3) + START_SLOP_SECONDS; - const backtraces = /* @__PURE__ */ new Map(); - const coredumps = []; - try { - const { stdout: coredumpjson } = await exec.getExecOutput("coredumpctl", [ - "--json=pretty", - "list", - "--since", - `${sinceSeconds} seconds ago` - ], { silent: true }); - const sussyArray = JSON.parse(coredumpjson); - if (!Array.isArray(sussyArray)) throw new Error(`Coredump isn't an array: ${coredumpjson}`); - for (const sussyObject of sussyArray) { - const keys = Object.keys(sussyObject); - if (keys.includes("exe") && keys.includes("pid")) if (typeof sussyObject.exe == "string" && typeof sussyObject.pid == "number") { - const execParts = sussyObject.exe.split("/"); - const binaryName = execParts[execParts.length - 1]; - if (prefixes.some((prefix) => binaryName.startsWith(prefix)) && !programNameDenyList.includes(binaryName)) coredumps.push({ - exe: sussyObject.exe, - pid: sussyObject.pid - }); - } else core.debug(`Mysterious coredump entry missing exe string and/or pid number: ${JSON.stringify(sussyObject)}`); - else core.debug(`Mysterious coredump entry missing exe value and/or pid value: ${JSON.stringify(sussyObject)}`); - } - } catch (innerError) { - core.debug(`Cannot collect backtraces: ${stringifyError(innerError)}`); - return backtraces; - } - const doGzip = (0,external_node_util_.promisify)(external_node_zlib_.gzip); - for (const coredump of coredumps) try { - const { stdout: logText } = await exec.getExecOutput("coredumpctl", ["info", `${coredump.pid}`], { silent: true }); - const buf = await doGzip(logText); - backtraces.set(`backtrace_value_${coredump.pid}`, buf.toString("base64")); - } catch (innerError) { - backtraces.set(`backtrace_failure_${coredump.pid}`, stringifyError(innerError)); - } - return backtraces; + const sinceSeconds = Math.ceil((Date.now() - startTimestampMs) / 1e3) + START_SLOP_SECONDS; + const backtraces = /* @__PURE__ */ new Map(); + const coredumps = []; + try { + const { stdout: coredumpjson } = await exec.getExecOutput( + "coredumpctl", + ["--json=pretty", "list", "--since", `${sinceSeconds} seconds ago`], + { + silent: true + } + ); + const sussyArray = JSON.parse(coredumpjson); + if (!Array.isArray(sussyArray)) { + throw new Error(`Coredump isn't an array: ${coredumpjson}`); + } + for (const sussyObject of sussyArray) { + const keys = Object.keys(sussyObject); + if (keys.includes("exe") && keys.includes("pid")) { + if (typeof sussyObject.exe == "string" && typeof sussyObject.pid == "number") { + const execParts = sussyObject.exe.split("/"); + const binaryName = execParts[execParts.length - 1]; + if (prefixes.some((prefix) => binaryName.startsWith(prefix)) && !programNameDenyList.includes(binaryName)) { + coredumps.push({ + exe: sussyObject.exe, + pid: sussyObject.pid + }); + } + } else { + core.debug( + `Mysterious coredump entry missing exe string and/or pid number: ${JSON.stringify(sussyObject)}` + ); + } + } else { + core.debug( + `Mysterious coredump entry missing exe value and/or pid value: ${JSON.stringify(sussyObject)}` + ); + } + } + } catch (innerError) { + core.debug( + `Cannot collect backtraces: ${stringifyError(innerError)}` + ); + return backtraces; + } + const doGzip = (0,external_util_.promisify)(external_zlib_.gzip); + for (const coredump of coredumps) { + try { + const { stdout: logText } = await exec.getExecOutput( + "coredumpctl", + ["info", `${coredump.pid}`], + { + silent: true + } + ); + const buf = await doGzip(logText); + backtraces.set(`backtrace_value_${coredump.pid}`, buf.toString("base64")); + } catch (innerError) { + backtraces.set( + `backtrace_failure_${coredump.pid}`, + stringifyError(innerError) + ); + } + } + return backtraces; } -//#endregion -//#region src/correlation.ts -const OPTIONAL_VARIABLES = ["INVOCATION_ID"]; +// src/correlation.ts + + +var OPTIONAL_VARIABLES = ["INVOCATION_ID"]; function identify() { - const repository = hashEnvironmentVariables("GHR", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID", - "GITHUB_REPOSITORY", - "GITHUB_REPOSITORY_ID" - ]); - const run_differentiator = hashEnvironmentVariables("GHWJA", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID", - "GITHUB_REPOSITORY", - "GITHUB_REPOSITORY_ID", - "GITHUB_WORKFLOW", - "GITHUB_JOB", - "GITHUB_RUN_ID", - "GITHUB_RUN_NUMBER", - "GITHUB_RUN_ATTEMPT", - "INVOCATION_ID" - ]); - const ident = { - $anon_distinct_id: process.env["RUNNER_TRACKING_ID"] || (0,external_node_crypto_.randomUUID)(), - correlation_source: "github-actions", - github_repository_hash: repository, - github_workflow_hash: hashEnvironmentVariables("GHW", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID", - "GITHUB_REPOSITORY", - "GITHUB_REPOSITORY_ID", - "GITHUB_WORKFLOW" - ]), - github_workflow_job_hash: hashEnvironmentVariables("GHWJ", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID", - "GITHUB_REPOSITORY", - "GITHUB_REPOSITORY_ID", - "GITHUB_WORKFLOW", - "GITHUB_JOB" - ]), - github_workflow_run_hash: hashEnvironmentVariables("GHWJR", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID", - "GITHUB_REPOSITORY", - "GITHUB_REPOSITORY_ID", - "GITHUB_WORKFLOW", - "GITHUB_JOB", - "GITHUB_RUN_ID" - ]), - github_workflow_run_differentiator_hash: run_differentiator, - $session_id: run_differentiator, - $groups: { - github_repository: repository, - github_organization: hashEnvironmentVariables("GHO", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID" - ]) - }, - is_ci: true - }; - core.debug("Correlation data:"); - core.debug(JSON.stringify(ident, null, 2)); - return ident; + const repository = hashEnvironmentVariables("GHR", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID", + "GITHUB_REPOSITORY", + "GITHUB_REPOSITORY_ID" + ]); + const run_differentiator = hashEnvironmentVariables("GHWJA", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID", + "GITHUB_REPOSITORY", + "GITHUB_REPOSITORY_ID", + "GITHUB_WORKFLOW", + "GITHUB_JOB", + "GITHUB_RUN_ID", + "GITHUB_RUN_NUMBER", + "GITHUB_RUN_ATTEMPT", + "INVOCATION_ID" + ]); + const ident = { + $anon_distinct_id: process.env["RUNNER_TRACKING_ID"] || (0,external_crypto_.randomUUID)(), + correlation_source: "github-actions", + github_repository_hash: repository, + github_workflow_hash: hashEnvironmentVariables("GHW", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID", + "GITHUB_REPOSITORY", + "GITHUB_REPOSITORY_ID", + "GITHUB_WORKFLOW" + ]), + github_workflow_job_hash: hashEnvironmentVariables("GHWJ", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID", + "GITHUB_REPOSITORY", + "GITHUB_REPOSITORY_ID", + "GITHUB_WORKFLOW", + "GITHUB_JOB" + ]), + github_workflow_run_hash: hashEnvironmentVariables("GHWJR", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID", + "GITHUB_REPOSITORY", + "GITHUB_REPOSITORY_ID", + "GITHUB_WORKFLOW", + "GITHUB_JOB", + "GITHUB_RUN_ID" + ]), + github_workflow_run_differentiator_hash: run_differentiator, + $session_id: run_differentiator, + $groups: { + github_repository: repository, + github_organization: hashEnvironmentVariables("GHO", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID" + ]) + }, + is_ci: true + }; + core.debug("Correlation data:"); + core.debug(JSON.stringify(ident, null, 2)); + return ident; } function hashEnvironmentVariables(prefix, variables) { - const hash = (0,external_node_crypto_.createHash)("sha256"); - for (const varName of variables) { - let value = process.env[varName]; - if (value === void 0) if (OPTIONAL_VARIABLES.includes(varName)) { - core.debug(`Optional environment variable not set: ${varName} -- substituting with the variable name`); - value = varName; - } else { - core.debug(`Environment variable not set: ${varName} -- can't generate the requested identity`); - return; - } - hash.update(value); - hash.update("\0"); - } - return `${prefix}-${hash.digest("hex")}`; + const hash = (0,external_crypto_.createHash)("sha256"); + for (const varName of variables) { + let value = process.env[varName]; + if (value === void 0) { + if (OPTIONAL_VARIABLES.includes(varName)) { + core.debug( + `Optional environment variable not set: ${varName} -- substituting with the variable name` + ); + value = varName; + } else { + core.debug( + `Environment variable not set: ${varName} -- can't generate the requested identity` + ); + return void 0; + } + } + hash.update(value); + hash.update("\0"); + } + return `${prefix}-${hash.digest("hex")}`; } -//#endregion -//#region src/ids-host.ts -const DEFAULT_LOOKUP = "_detsys_ids._tcp.install.determinate.systems."; -const ALLOWED_SUFFIXES = [".install.determinate.systems", ".install.detsys.dev"]; -const DEFAULT_IDS_HOST = "https://install.determinate.systems"; -const LOOKUP = process.env["IDS_LOOKUP"] ?? DEFAULT_LOOKUP; -const DEFAULT_TIMEOUT = 1e4; -/** -* Host information for install.determinate.systems. -*/ +// src/ids-host.ts + + + +var DEFAULT_LOOKUP = "_detsys_ids._tcp.install.determinate.systems."; +var ALLOWED_SUFFIXES = [ + ".install.determinate.systems", + ".install.detsys.dev" +]; +var DEFAULT_IDS_HOST = "https://install.determinate.systems"; +var LOOKUP = process.env["IDS_LOOKUP"] ?? DEFAULT_LOOKUP; +var DEFAULT_TIMEOUT = 1e4; var IdsHost = class { - constructor(idsProjectName, diagnosticsSuffix, runtimeDiagnosticsUrl) { - this.idsProjectName = idsProjectName; - this.diagnosticsSuffix = diagnosticsSuffix; - this.runtimeDiagnosticsUrl = runtimeDiagnosticsUrl; - this.client = void 0; - } - async getGot(recordFailoverCallback) { - if (this.client === void 0) this.client = got.extend({ - timeout: { request: DEFAULT_TIMEOUT }, - retry: { - limit: Math.max((await this.getUrlsByPreference()).length, 3), - methods: ["GET", "HEAD"] - }, - hooks: { - beforeRetry: [async (error, retryCount) => { - const prevUrl = await this.getRootUrl(); - this.markCurrentHostBroken(); - const nextUrl = await this.getRootUrl(); - if (recordFailoverCallback !== void 0) recordFailoverCallback(error, prevUrl, nextUrl); - core.info(`Retrying after error ${error.code}, retry #: ${retryCount}`); - }], - beforeRequest: [async (options) => { - const currentUrl = options.url; - if (this.isUrlSubjectToDynamicUrls(currentUrl)) { - const newUrl = new URL(currentUrl); - newUrl.host = (await this.getRootUrl()).host; - options.url = newUrl; - core.debug(`Transmuted ${currentUrl} into ${newUrl}`); - } else core.debug(`No transmutations on ${currentUrl}`); - }] - } - }); - return this.client; - } - markCurrentHostBroken() { - this.prioritizedURLs?.shift(); - } - setPrioritizedUrls(urls) { - this.prioritizedURLs = urls; - } - isUrlSubjectToDynamicUrls(url) { - if (url.origin === DEFAULT_IDS_HOST) return true; - for (const suffix of ALLOWED_SUFFIXES) if (url.host.endsWith(suffix)) return true; - return false; - } - async getDynamicRootUrl() { - const idsHost = process.env["IDS_HOST"]; - if (idsHost !== void 0) try { - return new URL(idsHost); - } catch (err) { - core.error(`IDS_HOST environment variable is not a valid URL. Ignoring. ${stringifyError(err)}`); - } - let url = void 0; - try { - url = (await this.getUrlsByPreference())[0]; - } catch (err) { - core.error(`Error collecting IDS URLs by preference: ${stringifyError(err)}`); - } - if (url === void 0) return; - else return new URL(url); - } - async getRootUrl() { - const url = await this.getDynamicRootUrl(); - if (url === void 0) return new URL(DEFAULT_IDS_HOST); - return url; - } - async getDiagnosticsUrl() { - if (this.runtimeDiagnosticsUrl === "") return; - if (this.runtimeDiagnosticsUrl !== "-" && this.runtimeDiagnosticsUrl !== void 0) try { - return new URL(this.runtimeDiagnosticsUrl); - } catch (err) { - core.info(`User-provided diagnostic endpoint ignored: not a valid URL: ${stringifyError(err)}`); - } - try { - const diagnosticUrl = await this.getRootUrl(); - diagnosticUrl.pathname += "events/batch"; - return diagnosticUrl; - } catch (err) { - core.info(`Generated diagnostic endpoint ignored, and diagnostics are disabled: not a valid URL: ${stringifyError(err)}`); - return; - } - } - async getUrlsByPreference() { - if (this.prioritizedURLs === void 0) this.prioritizedURLs = orderRecordsByPriorityWeight(await discoverServiceRecords()).flatMap((record) => recordToUrl(record) || []); - return this.prioritizedURLs; - } + constructor(idsProjectName, diagnosticsSuffix, runtimeDiagnosticsUrl) { + this.idsProjectName = idsProjectName; + this.diagnosticsSuffix = diagnosticsSuffix; + this.runtimeDiagnosticsUrl = runtimeDiagnosticsUrl; + this.client = void 0; + } + async getGot(recordFailoverCallback) { + if (this.client === void 0) { + this.client = got.extend({ + timeout: { + request: DEFAULT_TIMEOUT + }, + retry: { + limit: Math.max((await this.getUrlsByPreference()).length, 3), + methods: ["GET", "HEAD"] + }, + hooks: { + beforeRetry: [ + async (error3, retryCount) => { + const prevUrl = await this.getRootUrl(); + this.markCurrentHostBroken(); + const nextUrl = await this.getRootUrl(); + if (recordFailoverCallback !== void 0) { + recordFailoverCallback(error3, prevUrl, nextUrl); + } + core.info( + `Retrying after error ${error3.code}, retry #: ${retryCount}` + ); + } + ], + beforeRequest: [ + async (options) => { + const currentUrl = options.url; + if (this.isUrlSubjectToDynamicUrls(currentUrl)) { + const newUrl = new URL(currentUrl); + const url = await this.getRootUrl(); + newUrl.host = url.host; + options.url = newUrl; + core.debug(`Transmuted ${currentUrl} into ${newUrl}`); + } else { + core.debug(`No transmutations on ${currentUrl}`); + } + } + ] + } + }); + } + return this.client; + } + markCurrentHostBroken() { + this.prioritizedURLs?.shift(); + } + setPrioritizedUrls(urls) { + this.prioritizedURLs = urls; + } + isUrlSubjectToDynamicUrls(url) { + if (url.origin === DEFAULT_IDS_HOST) { + return true; + } + for (const suffix of ALLOWED_SUFFIXES) { + if (url.host.endsWith(suffix)) { + return true; + } + } + return false; + } + async getDynamicRootUrl() { + const idsHost = process.env["IDS_HOST"]; + if (idsHost !== void 0) { + try { + return new URL(idsHost); + } catch (err) { + core.error( + `IDS_HOST environment variable is not a valid URL. Ignoring. ${stringifyError(err)}` + ); + } + } + let url = void 0; + try { + const urls = await this.getUrlsByPreference(); + url = urls[0]; + } catch (err) { + core.error( + `Error collecting IDS URLs by preference: ${stringifyError(err)}` + ); + } + if (url === void 0) { + return void 0; + } else { + return new URL(url); + } + } + async getRootUrl() { + const url = await this.getDynamicRootUrl(); + if (url === void 0) { + return new URL(DEFAULT_IDS_HOST); + } + return url; + } + async getDiagnosticsUrl() { + if (this.runtimeDiagnosticsUrl === "") { + return void 0; + } + if (this.runtimeDiagnosticsUrl !== "-" && this.runtimeDiagnosticsUrl !== void 0) { + try { + return new URL(this.runtimeDiagnosticsUrl); + } catch (err) { + core.info( + `User-provided diagnostic endpoint ignored: not a valid URL: ${stringifyError(err)}` + ); + } + } + try { + const diagnosticUrl = await this.getRootUrl(); + diagnosticUrl.pathname += "events/batch"; + return diagnosticUrl; + } catch (err) { + core.info( + `Generated diagnostic endpoint ignored, and diagnostics are disabled: not a valid URL: ${stringifyError(err)}` + ); + return void 0; + } + } + async getUrlsByPreference() { + if (this.prioritizedURLs === void 0) { + this.prioritizedURLs = orderRecordsByPriorityWeight( + await discoverServiceRecords() + ).flatMap((record) => recordToUrl(record) || []); + } + return this.prioritizedURLs; + } }; function recordToUrl(record) { - const urlStr = `https://${record.name}:${record.port}`; - try { - return new URL(urlStr); - } catch (err) { - core.debug(`Record ${JSON.stringify(record)} produced an invalid URL: ${urlStr} (${err})`); - return; - } + const urlStr = `https://${record.name}:${record.port}`; + try { + return new URL(urlStr); + } catch (err) { + core.debug( + `Record ${JSON.stringify(record)} produced an invalid URL: ${urlStr} (${err})` + ); + return void 0; + } } async function discoverServiceRecords() { - return await discoverServicesStub((0,external_node_dns_promises_namespaceObject.resolveSrv)(LOOKUP), 1e3); + return await discoverServicesStub((0,external_dns_promises_namespaceObject.resolveSrv)(LOOKUP), 1e3); } async function discoverServicesStub(lookup, timeout) { - const defaultFallback = new Promise((resolve, _reject) => { - setTimeout(resolve, timeout, []); - }); - let records; - try { - records = await Promise.race([lookup, defaultFallback]); - } catch (reason) { - core.debug(`Error resolving SRV records: ${stringifyError(reason)}`); - records = []; - } - const acceptableRecords = records.filter((record) => { - for (const suffix of ALLOWED_SUFFIXES) if (record.name.endsWith(suffix)) return true; - core.debug(`Unacceptable domain due to an invalid suffix: ${record.name}`); - return false; - }); - if (acceptableRecords.length === 0) core.debug(`No records found for ${LOOKUP}`); - else core.debug(`Resolved ${LOOKUP} to ${JSON.stringify(acceptableRecords)}`); - return acceptableRecords; + const defaultFallback = new Promise( + (resolve, _reject) => { + setTimeout(resolve, timeout, []); + } + ); + let records; + try { + records = await Promise.race([lookup, defaultFallback]); + } catch (reason) { + core.debug(`Error resolving SRV records: ${stringifyError(reason)}`); + records = []; + } + const acceptableRecords = records.filter((record) => { + for (const suffix of ALLOWED_SUFFIXES) { + if (record.name.endsWith(suffix)) { + return true; + } + } + core.debug( + `Unacceptable domain due to an invalid suffix: ${record.name}` + ); + return false; + }); + if (acceptableRecords.length === 0) { + core.debug(`No records found for ${LOOKUP}`); + } else { + core.debug( + `Resolved ${LOOKUP} to ${JSON.stringify(acceptableRecords)}` + ); + } + return acceptableRecords; } function orderRecordsByPriorityWeight(records) { - const byPriorityWeight = /* @__PURE__ */ new Map(); - for (const record of records) { - const existing = byPriorityWeight.get(record.priority); - if (existing) existing.push(record); - else byPriorityWeight.set(record.priority, [record]); - } - const prioritizedRecords = []; - const keys = Array.from(byPriorityWeight.keys()).sort((a, b) => a - b); - for (const priority of keys) { - const recordsByPrio = byPriorityWeight.get(priority); - if (recordsByPrio === void 0) continue; - prioritizedRecords.push(...weightedRandom(recordsByPrio)); - } - return prioritizedRecords; + const byPriorityWeight = /* @__PURE__ */ new Map(); + for (const record of records) { + const existing = byPriorityWeight.get(record.priority); + if (existing) { + existing.push(record); + } else { + byPriorityWeight.set(record.priority, [record]); + } + } + const prioritizedRecords = []; + const keys = Array.from(byPriorityWeight.keys()).sort( + (a, b) => a - b + ); + for (const priority of keys) { + const recordsByPrio = byPriorityWeight.get(priority); + if (recordsByPrio === void 0) { + continue; + } + prioritizedRecords.push(...weightedRandom(recordsByPrio)); + } + return prioritizedRecords; } function weightedRandom(records) { - const scratchRecords = records.slice(); - const result = []; - while (scratchRecords.length > 0) { - const weights = []; - for (let i = 0; i < scratchRecords.length; i++) weights.push(scratchRecords[i].weight + (i > 0 ? scratchRecords[i - 1].weight : 0)); - const point = Math.random() * weights[weights.length - 1]; - for (let selectedIndex = 0; selectedIndex < weights.length; selectedIndex++) if (weights[selectedIndex] > point) { - result.push(scratchRecords.splice(selectedIndex, 1)[0]); - break; - } - } - return result; + const scratchRecords = records.slice(); + const result = []; + while (scratchRecords.length > 0) { + const weights = []; + { + for (let i = 0; i < scratchRecords.length; i++) { + weights.push( + scratchRecords[i].weight + (i > 0 ? scratchRecords[i - 1].weight : 0) + ); + } + } + const point = Math.random() * weights[weights.length - 1]; + for (let selectedIndex = 0; selectedIndex < weights.length; selectedIndex++) { + if (weights[selectedIndex] > point) { + result.push(scratchRecords.splice(selectedIndex, 1)[0]); + break; + } + } + } + return result; } -//#endregion -//#region src/inputs.ts -var inputs_exports = /* @__PURE__ */ __export({ - getArrayOfStrings: () => getArrayOfStrings, - getArrayOfStringsOrNull: () => getArrayOfStringsOrNull, - getBool: () => getBool, - getBoolOrUndefined: () => getBoolOrUndefined, - getMultilineStringOrNull: () => getMultilineStringOrNull, - getNumberOrNull: () => getNumberOrNull, - getString: () => getString, - getStringOrNull: () => getStringOrNull, - getStringOrUndefined: () => getStringOrUndefined, - handleString: () => handleString +// src/inputs.ts +var inputs_exports = {}; +__export(inputs_exports, { + getArrayOfStrings: () => getArrayOfStrings, + getArrayOfStringsOrNull: () => getArrayOfStringsOrNull, + getBool: () => getBool, + getBoolOrUndefined: () => getBoolOrUndefined, + getMultilineStringOrNull: () => getMultilineStringOrNull, + getNumberOrNull: () => getNumberOrNull, + getString: () => getString, + getStringOrNull: () => getStringOrNull, + getStringOrUndefined: () => getStringOrUndefined, + handleString: () => handleString }); -/** -* Get a Boolean input from the Action's configuration by name. -*/ -const getBool = (name) => { - return core.getBooleanInput(name); + +var getBool = (name) => { + return core.getBooleanInput(name); }; -/** -* Get a Boolean input from the Action's configuration by name, or undefined if it is unset. -*/ -const getBoolOrUndefined = (name) => { - if (getStringOrUndefined(name) === void 0) return; - return core.getBooleanInput(name); +var getBoolOrUndefined = (name) => { + if (getStringOrUndefined(name) === void 0) { + return void 0; + } + return core.getBooleanInput(name); }; -/** -* Convert a comma-separated string input into an array of strings. If `comma` is selected, -* all whitespace is removed from the string before converting to an array. -*/ -const getArrayOfStrings = (name, separator) => { - return handleString(getString(name), separator); +var getArrayOfStrings = (name, separator) => { + const original = getString(name); + return handleString(original, separator); }; -/** -* Convert a string input into an array of strings or `null` if no value is set. -*/ -const getArrayOfStringsOrNull = (name, separator) => { - const original = getStringOrNull(name); - if (original === null) return null; - else return handleString(original, separator); +var getArrayOfStringsOrNull = (name, separator) => { + const original = getStringOrNull(name); + if (original === null) { + return null; + } else { + return handleString(original, separator); + } }; -const handleString = (input, separator) => { - const sepChar = separator === "comma" ? "," : /\s+/; - const trimmed = input.trim(); - if (trimmed === "") return []; - return trimmed.split(sepChar).map((s) => s.trim()); +var handleString = (input, separator) => { + const sepChar = separator === "comma" ? "," : /\s+/; + const trimmed = input.trim(); + if (trimmed === "") { + return []; + } + return trimmed.split(sepChar).map((s) => s.trim()); }; -/** -* Get a multi-line string input from the Action's configuration by name or return `null` if not set. -*/ -const getMultilineStringOrNull = (name) => { - const value = core.getMultilineInput(name); - if (value.length === 0) return null; - else return value; +var getMultilineStringOrNull = (name) => { + const value = core.getMultilineInput(name); + if (value.length === 0) { + return null; + } else { + return value; + } }; -/** -* Get a number input from the Action's configuration by name or return `null` if not set. -*/ -const getNumberOrNull = (name) => { - const value = core.getInput(name); - if (value === "") return null; - else return Number(value); +var getNumberOrNull = (name) => { + const value = core.getInput(name); + if (value === "") { + return null; + } else { + return Number(value); + } }; -/** -* Get a string input from the Action's configuration. -*/ -const getString = (name) => { - return core.getInput(name); +var getString = (name) => { + return core.getInput(name); }; -/** -* Get a string input from the Action's configuration by name or return `null` if not set. -*/ -const getStringOrNull = (name) => { - const value = core.getInput(name); - if (value === "") return null; - else return value; +var getStringOrNull = (name) => { + const value = core.getInput(name); + if (value === "") { + return null; + } else { + return value; + } }; -/** -* Get a string input from the Action's configuration by name or return `undefined` if not set. -*/ -const getStringOrUndefined = (name) => { - const value = core.getInput(name); - if (value === "") return; - else return value; +var getStringOrUndefined = (name) => { + const value = core.getInput(name); + if (value === "") { + return void 0; + } else { + return value; + } }; -//#endregion -//#region src/platform.ts -var platform_exports = /* @__PURE__ */ __export({ - getArchOs: () => getArchOs, - getNixPlatform: () => getNixPlatform +// src/platform.ts +var platform_exports = {}; +__export(platform_exports, { + getArchOs: () => getArchOs, + getNixPlatform: () => getNixPlatform }); -/** -* Get the current architecture plus OS. Examples include `X64-Linux` and `ARM64-macOS`. -*/ + function getArchOs() { - const envArch = process.env.RUNNER_ARCH; - const envOs = process.env.RUNNER_OS; - if (envArch && envOs) return `${envArch}-${envOs}`; - else { - core.error(`Can't identify the platform: RUNNER_ARCH or RUNNER_OS undefined (${envArch}-${envOs})`); - throw new Error("RUNNER_ARCH and/or RUNNER_OS is not defined"); - } + const envArch = process.env.RUNNER_ARCH; + const envOs = process.env.RUNNER_OS; + if (envArch && envOs) { + return `${envArch}-${envOs}`; + } else { + core.error( + `Can't identify the platform: RUNNER_ARCH or RUNNER_OS undefined (${envArch}-${envOs})` + ); + throw new Error("RUNNER_ARCH and/or RUNNER_OS is not defined"); + } } -/** -* Get the current Nix system. Examples include `x86_64-linux` and `aarch64-darwin`. -*/ function getNixPlatform(archOs) { - const mappedTo = new Map([ - ["X64-macOS", "x86_64-darwin"], - ["ARM64-macOS", "aarch64-darwin"], - ["X64-Linux", "x86_64-linux"], - ["ARM64-Linux", "aarch64-linux"] - ]).get(archOs); - if (mappedTo) return mappedTo; - else { - core.error(`ArchOs (${archOs}) doesn't map to a supported Nix platform.`); - throw new Error(`Cannot convert ArchOs (${archOs}) to a supported Nix platform.`); - } + const archOsMap = /* @__PURE__ */ new Map([ + ["X64-macOS", "x86_64-darwin"], + ["ARM64-macOS", "aarch64-darwin"], + ["X64-Linux", "x86_64-linux"], + ["ARM64-Linux", "aarch64-linux"] + ]); + const mappedTo = archOsMap.get(archOs); + if (mappedTo) { + return mappedTo; + } else { + core.error( + `ArchOs (${archOs}) doesn't map to a supported Nix platform.` + ); + throw new Error( + `Cannot convert ArchOs (${archOs}) to a supported Nix platform.` + ); + } } -//#endregion -//#region src/sourcedef.ts +// src/sourcedef.ts + function constructSourceParameters(legacyPrefix) { - return { - path: noisilyGetInput("path", legacyPrefix), - url: noisilyGetInput("url", legacyPrefix), - tag: noisilyGetInput("tag", legacyPrefix), - pr: noisilyGetInput("pr", legacyPrefix), - branch: noisilyGetInput("branch", legacyPrefix), - revision: noisilyGetInput("revision", legacyPrefix) - }; + return { + path: noisilyGetInput("path", legacyPrefix), + url: noisilyGetInput("url", legacyPrefix), + tag: noisilyGetInput("tag", legacyPrefix), + pr: noisilyGetInput("pr", legacyPrefix), + branch: noisilyGetInput("branch", legacyPrefix), + revision: noisilyGetInput("revision", legacyPrefix) + }; } function noisilyGetInput(suffix, legacyPrefix) { - const preferredInput = getStringOrUndefined(`source-${suffix}`); - if (!legacyPrefix) return preferredInput; - const legacyInput = getStringOrUndefined(`${legacyPrefix}-${suffix}`); - if (preferredInput && legacyInput) { - core.warning(`The supported option source-${suffix} and the legacy option ${legacyPrefix}-${suffix} are both set. Preferring source-${suffix}. Please stop setting ${legacyPrefix}-${suffix}.`); - return preferredInput; - } else if (legacyInput) { - core.warning(`The legacy option ${legacyPrefix}-${suffix} is set. Please migrate to source-${suffix}.`); - return legacyInput; - } else return preferredInput; + const preferredInput = getStringOrUndefined(`source-${suffix}`); + if (!legacyPrefix) { + return preferredInput; + } + const legacyInput = getStringOrUndefined(`${legacyPrefix}-${suffix}`); + if (preferredInput && legacyInput) { + core.warning( + `The supported option source-${suffix} and the legacy option ${legacyPrefix}-${suffix} are both set. Preferring source-${suffix}. Please stop setting ${legacyPrefix}-${suffix}.` + ); + return preferredInput; + } else if (legacyInput) { + core.warning( + `The legacy option ${legacyPrefix}-${suffix} is set. Please migrate to source-${suffix}.` + ); + return legacyInput; + } else { + return preferredInput; + } } -//#endregion -//#region src/index.ts -const pkgVersion = "1.0"; -const EVENT_BACKTRACES = "backtrace"; -const EVENT_EXCEPTION = "exception"; -const EVENT_ARTIFACT_CACHE_HIT = "artifact_cache_hit"; -const EVENT_ARTIFACT_CACHE_MISS = "artifact_cache_miss"; -const EVENT_ARTIFACT_CACHE_PERSIST = "artifact_cache_persist"; -const EVENT_PREFLIGHT_REQUIRE_NIX_DENIED = "preflight-require-nix-denied"; -const EVENT_STORE_IDENTITY_FAILED = "store_identity_failed"; -const FACT_ARTIFACT_FETCHED_FROM_CACHE = "artifact_fetched_from_cache"; -const FACT_ENDED_WITH_EXCEPTION = "ended_with_exception"; -const FACT_FINAL_EXCEPTION = "final_exception"; -const FACT_OS = "$os"; -const FACT_OS_VERSION = "$os_version"; -const FACT_SOURCE_URL = "source_url"; -const FACT_SOURCE_URL_ETAG = "source_url_etag"; -const FACT_NIX_VERSION = "nix_version"; -const FACT_NIX_LOCATION = "nix_location"; -const FACT_NIX_STORE_TRUST = "nix_store_trusted"; -const FACT_NIX_STORE_VERSION = "nix_store_version"; -const FACT_NIX_STORE_CHECK_METHOD = "nix_store_check_method"; -const FACT_NIX_STORE_CHECK_ERROR = "nix_store_check_error"; -const STATE_KEY_EXECUTION_PHASE = "detsys_action_execution_phase"; -const STATE_KEY_NIX_NOT_FOUND = "detsys_action_nix_not_found"; -const STATE_NOT_FOUND = "not-found"; -const STATE_KEY_CROSS_PHASE_ID = "detsys_cross_phase_id"; -const STATE_BACKTRACE_START_TIMESTAMP = "detsys_backtrace_start_timestamp"; -const DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 1e4; -const CHECK_IN_ENDPOINT_TIMEOUT_MS = 1e3; -const PROGRAM_NAME_CRASH_DENY_LIST = [ - "nix-expr-tests", - "nix-store-tests", - "nix-util-tests" +// src/index.ts + + + + + + + + + + + + + +var pkgVersion = "1.0"; +var EVENT_BACKTRACES = "backtrace"; +var EVENT_EXCEPTION = "exception"; +var EVENT_ARTIFACT_CACHE_HIT = "artifact_cache_hit"; +var EVENT_ARTIFACT_CACHE_MISS = "artifact_cache_miss"; +var EVENT_ARTIFACT_CACHE_PERSIST = "artifact_cache_persist"; +var EVENT_PREFLIGHT_REQUIRE_NIX_DENIED = "preflight-require-nix-denied"; +var EVENT_STORE_IDENTITY_FAILED = "store_identity_failed"; +var FACT_ARTIFACT_FETCHED_FROM_CACHE = "artifact_fetched_from_cache"; +var FACT_ENDED_WITH_EXCEPTION = "ended_with_exception"; +var FACT_FINAL_EXCEPTION = "final_exception"; +var FACT_OS = "$os"; +var FACT_OS_VERSION = "$os_version"; +var FACT_SOURCE_URL = "source_url"; +var FACT_SOURCE_URL_ETAG = "source_url_etag"; +var FACT_NIX_LOCATION = "nix_location"; +var FACT_NIX_STORE_TRUST = "nix_store_trusted"; +var FACT_NIX_STORE_VERSION = "nix_store_version"; +var FACT_NIX_STORE_CHECK_METHOD = "nix_store_check_method"; +var FACT_NIX_STORE_CHECK_ERROR = "nix_store_check_error"; +var STATE_KEY_EXECUTION_PHASE = "detsys_action_execution_phase"; +var STATE_KEY_NIX_NOT_FOUND = "detsys_action_nix_not_found"; +var STATE_NOT_FOUND = "not-found"; +var STATE_KEY_CROSS_PHASE_ID = "detsys_cross_phase_id"; +var STATE_BACKTRACE_START_TIMESTAMP = "detsys_backtrace_start_timestamp"; +var DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 1e4; +var CHECK_IN_ENDPOINT_TIMEOUT_MS = 1e3; +var PROGRAM_NAME_CRASH_DENY_LIST = [ + "nix-expr-tests", + "nix-store-tests", + "nix-util-tests" ]; -const determinateStateDir = "/var/lib/determinate"; -const determinateIdentityFile = external_node_path_namespaceObject.join(determinateStateDir, "identity.json"); -const isRoot = external_node_os_.userInfo().uid === 0; -/** Create the Determinate state directory by escalating via sudo */ +var determinateStateDir = "/var/lib/determinate"; +var determinateIdentityFile = external_path_.join(determinateStateDir, "identity.json"); +var isRoot = external_os_.userInfo().uid === 0; async function sudoEnsureDeterminateStateDir() { - const code = await exec.exec("sudo", [ - "mkdir", - "-p", - determinateStateDir - ]); - if (code !== 0) throw new Error(`sudo mkdir -p exit: ${code}`); + const code = await exec.exec("sudo", [ + "mkdir", + "-p", + determinateStateDir + ]); + if (code !== 0) { + throw new Error(`sudo mkdir -p exit: ${code}`); + } } -/** Ensures the Determinate state directory exists, escalating if necessary */ async function ensureDeterminateStateDir() { - if (isRoot) await (0,promises_namespaceObject.mkdir)(determinateStateDir, { recursive: true }); - else return sudoEnsureDeterminateStateDir(); + if (isRoot) { + await (0,promises_namespaceObject.mkdir)(determinateStateDir, { recursive: true }); + } else { + return sudoEnsureDeterminateStateDir(); + } } -/** Writes correlation hashes to the Determinate state directory by writing to a `sudo tee` pipe */ async function sudoWriteCorrelationHashes(hashes) { - const buffer = Buffer.from(hashes); - const code = await exec.exec("sudo", ["tee", determinateIdentityFile], { - input: buffer, - outStream: (0,external_node_fs_.createWriteStream)("/dev/null") - }); - if (code !== 0) throw new Error(`sudo tee exit: ${code}`); + const buffer = Buffer.from(hashes); + const code = await exec.exec( + "sudo", + ["tee", determinateIdentityFile], + { + input: buffer, + // Ignore output from tee + outStream: (0,external_fs_.createWriteStream)("/dev/null") + } + ); + if (code !== 0) { + throw new Error(`sudo tee exit: ${code}`); + } } -/** Writes correlation hashes to the Determinate state directory, escalating if necessary */ async function writeCorrelationHashes(hashes) { - await ensureDeterminateStateDir(); - if (isRoot) await promises_namespaceObject.writeFile(determinateIdentityFile, hashes, "utf-8"); - else return sudoWriteCorrelationHashes(hashes); + await ensureDeterminateStateDir(); + if (isRoot) { + await promises_namespaceObject.writeFile(determinateIdentityFile, hashes, "utf-8"); + } else { + return sudoWriteCorrelationHashes(hashes); + } } var DetSysAction = class { - determineExecutionPhase() { - if (core.getState(STATE_KEY_EXECUTION_PHASE) === "") { - core.saveState(STATE_KEY_EXECUTION_PHASE, "post"); - return "main"; - } else return "post"; - } - constructor(actionOptions) { - this.actionOptions = makeOptionsConfident(actionOptions); - this.idsHost = new IdsHost(this.actionOptions.idsProjectName, actionOptions.diagnosticsSuffix, process.env["INPUT_DIAGNOSTIC-ENDPOINT"]); - this.exceptionAttachments = /* @__PURE__ */ new Map(); - this.nixStoreTrust = "unknown"; - this.strictMode = getBool("_internal-strict-mode"); - if (getBoolOrUndefined("_internal-obliterate-actions-id-token-request-variables") === true) { - process.env["ACTIONS_ID_TOKEN_REQUEST_URL"] = void 0; - process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"] = void 0; - } - this.features = {}; - this.featureEventMetadata = {}; - this.events = []; - this.getCrossPhaseId(); - this.collectBacktraceSetup(); - this.facts = { - $lib: "idslib", - $lib_version: pkgVersion, - project: this.actionOptions.name, - ids_project: this.actionOptions.idsProjectName - }; - for (const [target, env] of [ - ["github_action_ref", "GITHUB_ACTION_REF"], - ["github_action_repository", "GITHUB_ACTION_REPOSITORY"], - ["github_event_name", "GITHUB_EVENT_NAME"], - ["$os", "RUNNER_OS"], - ["arch", "RUNNER_ARCH"] - ]) { - const value = process.env[env]; - if (value) this.facts[target] = value; - } - this.identity = identify(); - this.archOs = getArchOs(); - this.nixSystem = getNixPlatform(this.archOs); - this.facts.$app_name = `${this.actionOptions.name}/action`; - this.facts.arch_os = this.archOs; - this.facts.nix_system = this.nixSystem; - getDetails().then((details) => { - if (details.name !== "unknown") this.addFact(FACT_OS, details.name); - if (details.version !== "unknown") this.addFact(FACT_OS_VERSION, details.version); - }).catch((e) => { - core.debug(`Failure getting platform details: ${stringifyError$1(e)}`); - }); - this.executionPhase = this.determineExecutionPhase(); - this.facts.execution_phase = this.executionPhase; - if (this.actionOptions.fetchStyle === "gh-env-style") this.architectureFetchSuffix = this.archOs; - else if (this.actionOptions.fetchStyle === "nix-style") this.architectureFetchSuffix = this.nixSystem; - else if (this.actionOptions.fetchStyle === "universal") this.architectureFetchSuffix = "universal"; - else throw new Error(`fetchStyle ${this.actionOptions.fetchStyle} is not a valid style`); - this.sourceParameters = constructSourceParameters(this.actionOptions.legacySourcePrefix); - this.recordEvent(`begin_${this.executionPhase}`); - } - /** - * Attach a file to the diagnostics data in error conditions. - * - * The file at `location` doesn't need to exist when stapleFile is called. - * - * If the file doesn't exist or is unreadable when trying to staple the attachments, the JS error will be stored in a context value at `staple_failure_{name}`. - * If the file is readable, the file's contents will be stored in a context value at `staple_value_{name}`. - */ - stapleFile(name, location) { - this.exceptionAttachments.set(name, location); - } - /** - * Execute the Action as defined. - */ - execute() { - this.executeAsync().catch((error) => { - console.log(error); - process.exitCode = 1; - }); - } - getTemporaryName() { - const tmpDir = process.env["RUNNER_TEMP"] || (0,external_node_os_.tmpdir)(); - return external_node_path_namespaceObject.join(tmpDir, `${this.actionOptions.name}-${(0,external_node_crypto_.randomUUID)()}`); - } - addFact(key, value) { - this.facts[key] = value; - } - async getDiagnosticsUrl() { - return await this.idsHost.getDiagnosticsUrl(); - } - getUniqueId() { - return this.identity.github_workflow_run_differentiator_hash || process.env.RUNNER_TRACKING_ID || (0,external_node_crypto_.randomUUID)(); - } - getCrossPhaseId() { - let crossPhaseId = core.getState(STATE_KEY_CROSS_PHASE_ID); - if (crossPhaseId === "") { - crossPhaseId = (0,external_node_crypto_.randomUUID)(); - core.saveState(STATE_KEY_CROSS_PHASE_ID, crossPhaseId); - } - return crossPhaseId; - } - getCorrelationHashes() { - return this.identity; - } - recordEvent(eventName, context = {}) { - const prefixedName = eventName === "$feature_flag_called" ? eventName : `${this.actionOptions.eventPrefix}${eventName}`; - this.events.push({ - name: prefixedName, - distinct_id: this.identity.$anon_distinct_id, - uuid: (0,external_node_crypto_.randomUUID)(), - timestamp: /* @__PURE__ */ new Date(), - properties: { - ...context, - ...this.identity, - ...this.facts, - ...Object.fromEntries(Object.entries(this.featureEventMetadata).map(([name, variant]) => [`$feature/${name}`, variant])) - } - }); - } - /** - * Unpacks the closure returned by `fetchArtifact()`, imports the - * contents into the Nix store, and returns the path of the executable at - * `/nix/store/STORE_PATH/bin/${bin}`. - */ - async unpackClosure(bin) { - const artifact = await this.fetchArtifact(); - const { stdout } = await (0,external_node_util_.promisify)(external_node_child_process_namespaceObject.exec)(`cat "${artifact}" | xz -d | nix-store --import`); - return `${stdout.split(external_node_os_.EOL).at(-2)}/bin/${bin}`; - } - /** - * Fetches the executable at the URL determined by the `source-*` inputs and - * other facts, `chmod`s it, and returns the path to the executable on disk. - */ - async fetchExecutable() { - const binaryPath = await this.fetchArtifact(); - await (0,promises_namespaceObject.chmod)(binaryPath, external_node_fs_.constants.S_IXUSR | external_node_fs_.constants.S_IXGRP); - return binaryPath; - } - get isMain() { - return this.executionPhase === "main"; - } - get isPost() { - return this.executionPhase === "post"; - } - async executeAsync() { - try { - await this.checkIn(); - const correlationHashes = JSON.stringify(this.getCorrelationHashes()); - process.env.DETSYS_CORRELATION = correlationHashes; - try { - await writeCorrelationHashes(correlationHashes); - } catch (error) { - this.recordEvent(EVENT_STORE_IDENTITY_FAILED, { error: String(error) }); - } - if (!await this.preflightRequireNix()) { - this.recordEvent(EVENT_PREFLIGHT_REQUIRE_NIX_DENIED); - return; - } else { - await this.preflightNixStoreInfo(); - await this.preflightNixVersion(); - this.addFact(FACT_NIX_STORE_TRUST, this.nixStoreTrust); - } - if (this.isMain) { - await this.main(); - await this.preflightNixVersion(); - } else if (this.isPost) await this.post(); - this.addFact(FACT_ENDED_WITH_EXCEPTION, false); - } catch (e) { - this.addFact(FACT_ENDED_WITH_EXCEPTION, true); - const reportable = stringifyError$1(e); - this.addFact(FACT_FINAL_EXCEPTION, reportable); - if (this.isPost) core.warning(reportable); - else core.setFailed(reportable); - const doGzip = (0,external_node_util_.promisify)(external_node_zlib_.gzip); - const exceptionContext = /* @__PURE__ */ new Map(); - for (const [attachmentLabel, filePath] of this.exceptionAttachments) try { - const buf = await doGzip((0,external_node_fs_.readFileSync)(filePath)); - exceptionContext.set(`staple_value_${attachmentLabel}`, buf.toString("base64")); - } catch (innerError) { - exceptionContext.set(`staple_failure_${attachmentLabel}`, stringifyError$1(innerError)); - } - this.recordEvent(EVENT_EXCEPTION, Object.fromEntries(exceptionContext)); - } finally { - if (this.isPost) await this.collectBacktraces(); - await this.complete(); - } - } - async getClient() { - return await this.idsHost.getGot((incitingError, prevUrl, nextUrl) => { - this.recordPlausibleTimeout(incitingError); - this.recordEvent("ids-failover", { - previousUrl: prevUrl.toString(), - nextUrl: nextUrl.toString() - }); - }); - } - async checkIn() { - const checkin = await this.requestCheckIn(); - if (checkin === void 0) return; - this.features = checkin.options; - for (const [key, feature] of Object.entries(this.features)) this.featureEventMetadata[key] = feature.variant; - const impactSymbol = new Map([ - ["none", "⚪"], - ["maintenance", "🛠️"], - ["minor", "🟡"], - ["major", "🟠"], - ["critical", "🔴"] - ]); - const defaultImpactSymbol = "🔵"; - if (checkin.status !== null) { - const summaries = []; - for (const incident of checkin.status.incidents) summaries.push(`${impactSymbol.get(incident.impact) || defaultImpactSymbol} ${incident.status.replace("_", " ")}: ${incident.name} (${incident.shortlink})`); - for (const maintenance of checkin.status.scheduled_maintenances) summaries.push(`${impactSymbol.get(maintenance.impact) || defaultImpactSymbol} ${maintenance.status.replace("_", " ")}: ${maintenance.name} (${maintenance.shortlink})`); - if (summaries.length > 0) { - core.info(`${checkin.status.page.name} Status`); - for (const notice of summaries) core.info(notice); - core.info(`See: ${checkin.status.page.url}`); - core.info(``); - } - } - } - getFeature(name) { - if (!this.features.hasOwnProperty(name)) return; - const result = this.features[name]; - if (result === void 0) return; - this.recordEvent("$feature_flag_called", { - $feature_flag: name, - $feature_flag_response: result.variant - }); - return result; - } - /** - * Check in to install.determinate.systems, to accomplish three things: - * - * 1. Preflight the server selected from IdsHost, to increase the chances of success. - * 2. Fetch any incidents and maintenance events to let users know in case things are weird. - * 3. Get feature flag data so we can gently roll out new features. - */ - async requestCheckIn() { - for (let attemptsRemaining = 5; attemptsRemaining > 0; attemptsRemaining--) { - const checkInUrl = await this.getCheckInUrl(); - if (checkInUrl === void 0) return; - try { - core.debug(`Preflighting via ${checkInUrl}`); - const props = { - distinct_id: this.identity.$anon_distinct_id, - anon_distinct_id: this.identity.$anon_distinct_id, - groups: this.identity.$groups, - person_properties: { - ci: "github", - ...this.identity, - ...this.facts - } - }; - return await (await this.getClient()).post(checkInUrl, { - json: props, - timeout: { request: CHECK_IN_ENDPOINT_TIMEOUT_MS } - }).json(); - } catch (e) { - this.recordPlausibleTimeout(e); - core.debug(`Error checking in: ${stringifyError$1(e)}`); - this.idsHost.markCurrentHostBroken(); - } - } - } - recordPlausibleTimeout(e) { - if (e instanceof TimeoutError && "timings" in e && "request" in e) { - const reportContext = { - url: e.request.requestUrl?.toString(), - retry_count: e.request.retryCount - }; - for (const [key, value] of Object.entries(e.timings.phases)) if (Number.isFinite(value)) reportContext[`timing_phase_${key}`] = value; - this.recordEvent("timeout", reportContext); - } - } - /** - * Fetch an artifact, such as a tarball, from the location determined by the - * `source-*` inputs. If `source-binary` is specified, this will return a path - * to a binary on disk; otherwise, the artifact will be downloaded from the - * URL determined by the other `source-*` inputs (`source-url`, `source-pr`, - * etc.). - */ - async fetchArtifact() { - const sourceBinary = getStringOrNull("source-binary"); - if (sourceBinary !== null && sourceBinary !== "") { - core.debug(`Using the provided source binary at ${sourceBinary}`); - return sourceBinary; - } - core.startGroup(`Downloading ${this.actionOptions.name} for ${this.architectureFetchSuffix}`); - try { - core.info(`Fetching from ${await this.getSourceUrl()}`); - const correlatedUrl = await this.getSourceUrl(); - correlatedUrl.searchParams.set("ci", "github"); - correlatedUrl.searchParams.set("correlation", JSON.stringify(this.identity)); - const versionCheckup = await (await this.getClient()).head(correlatedUrl); - if (versionCheckup.headers.etag) { - const v = versionCheckup.headers.etag; - this.addFact(FACT_SOURCE_URL_ETAG, v); - core.debug(`Checking the tool cache for ${await this.getSourceUrl()} at ${v}`); - const cached = await this.getCachedVersion(v); - if (cached) { - this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = true; - core.debug(`Tool cache hit.`); - return cached; - } - } - this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = false; - core.debug(`No match from the cache, re-fetching from the redirect: ${versionCheckup.url}`); - const destFile = this.getTemporaryName(); - const fetchStream = await this.downloadFile(new URL(versionCheckup.url), destFile); - if (fetchStream.response?.headers.etag) { - const v = fetchStream.response.headers.etag; - try { - await this.saveCachedVersion(v, destFile); - } catch (e) { - core.debug(`Error caching the artifact: ${stringifyError$1(e)}`); - } - } - return destFile; - } catch (e) { - this.recordPlausibleTimeout(e); - throw e; - } finally { - core.endGroup(); - } - } - /** - * A helper function for failing on error only if strict mode is enabled. - * This is intended only for CI environments testing Actions themselves. - */ - failOnError(msg) { - if (this.strictMode) core.setFailed(`strict mode failure: ${msg}`); - } - async downloadFile(url, destination) { - const client = await this.getClient(); - return new Promise((resolve, reject) => { - let writeStream; - let failed = false; - const retry = (stream) => { - if (writeStream) writeStream.destroy(); - writeStream = (0,external_node_fs_.createWriteStream)(destination, { - encoding: "binary", - mode: 493 - }); - writeStream.once("error", (error) => { - failed = true; - reject(error); - }); - writeStream.on("finish", () => { - if (!failed) resolve(stream); - }); - stream.once("retry", (_count, _error, createRetryStream) => { - retry(createRetryStream()); - }); - stream.pipe(writeStream); - }; - retry(client.stream(url)); - }); - } - async complete() { - this.recordEvent(`complete_${this.executionPhase}`); - await this.submitEvents(); - } - async getCheckInUrl() { - const checkInUrl = await this.idsHost.getDynamicRootUrl(); - if (checkInUrl === void 0) return; - checkInUrl.pathname += "check-in"; - return checkInUrl; - } - async getSourceUrl() { - const p = this.sourceParameters; - if (p.url) { - this.addFact(FACT_SOURCE_URL, p.url); - return new URL(p.url); - } - const fetchUrl = await this.idsHost.getRootUrl(); - fetchUrl.pathname += this.actionOptions.idsProjectName; - if (p.tag) fetchUrl.pathname += `/tag/${p.tag}`; - else if (p.pr) fetchUrl.pathname += `/pr/${p.pr}`; - else if (p.branch) fetchUrl.pathname += `/branch/${p.branch}`; - else if (p.revision) fetchUrl.pathname += `/rev/${p.revision}`; - else fetchUrl.pathname += `/stable`; - fetchUrl.pathname += `/${this.architectureFetchSuffix}`; - this.addFact(FACT_SOURCE_URL, fetchUrl.toString()); - return fetchUrl; - } - cacheKey(version) { - const cleanedVersion = version.replace(/[^a-zA-Z0-9-+.]/g, ""); - return `determinatesystem-${this.actionOptions.name}-${this.architectureFetchSuffix}-${cleanedVersion}`; - } - async getCachedVersion(version) { - const startCwd = process.cwd(); - try { - const tempDir = this.getTemporaryName(); - await (0,promises_namespaceObject.mkdir)(tempDir); - process.chdir(tempDir); - process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE; - delete process.env.GITHUB_WORKSPACE; - if (await cache.restoreCache([this.actionOptions.name], this.cacheKey(version), [], void 0, true)) { - this.recordEvent(EVENT_ARTIFACT_CACHE_HIT); - return `${tempDir}/${this.actionOptions.name}`; - } - this.recordEvent(EVENT_ARTIFACT_CACHE_MISS); - return; - } finally { - process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP; - delete process.env.GITHUB_WORKSPACE_BACKUP; - process.chdir(startCwd); - } - } - async saveCachedVersion(version, toolPath) { - const startCwd = process.cwd(); - try { - const tempDir = this.getTemporaryName(); - await (0,promises_namespaceObject.mkdir)(tempDir); - process.chdir(tempDir); - await (0,promises_namespaceObject.copyFile)(toolPath, `${tempDir}/${this.actionOptions.name}`); - process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE; - delete process.env.GITHUB_WORKSPACE; - await cache.saveCache([this.actionOptions.name], this.cacheKey(version), void 0, true); - this.recordEvent(EVENT_ARTIFACT_CACHE_PERSIST); - } finally { - process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP; - delete process.env.GITHUB_WORKSPACE_BACKUP; - process.chdir(startCwd); - } - } - collectBacktraceSetup() { - if (!process.env.DETSYS_BACKTRACE_COLLECTOR) { - core.exportVariable("DETSYS_BACKTRACE_COLLECTOR", this.getCrossPhaseId()); - core.saveState(STATE_BACKTRACE_START_TIMESTAMP, Date.now()); - } - } - async collectBacktraces() { - try { - if (process.env.DETSYS_BACKTRACE_COLLECTOR !== this.getCrossPhaseId()) return; - const backtraces = await collectBacktraces(this.actionOptions.binaryNamePrefixes, this.actionOptions.binaryNamesDenyList, parseInt(core.getState(STATE_BACKTRACE_START_TIMESTAMP))); - core.debug(`Backtraces identified: ${backtraces.size}`); - if (backtraces.size > 0) this.recordEvent(EVENT_BACKTRACES, Object.fromEntries(backtraces)); - } catch (innerError) { - core.debug(`Error collecting backtraces: ${stringifyError$1(innerError)}`); - } - } - async preflightRequireNix() { - let nixLocation; - const pathParts = (process.env["PATH"] || "").split(":"); - for (const location of pathParts) { - const candidateNix = external_node_path_namespaceObject.join(location, "nix"); - try { - await promises_namespaceObject.access(candidateNix, promises_namespaceObject.constants.X_OK); - core.debug(`Found Nix at ${candidateNix}`); - nixLocation = candidateNix; - break; - } catch { - core.debug(`Nix not at ${candidateNix}`); - } - } - this.addFact(FACT_NIX_LOCATION, nixLocation || ""); - if (this.actionOptions.requireNix === "ignore") return true; - if (core.getState(STATE_KEY_NIX_NOT_FOUND) === STATE_NOT_FOUND) return false; - if (nixLocation !== void 0) return true; - core.saveState(STATE_KEY_NIX_NOT_FOUND, STATE_NOT_FOUND); - switch (this.actionOptions.requireNix) { - case "fail": - core.setFailed(["This action can only be used when Nix is installed.", "Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow."].join(" ")); - break; - case "warn": - core.warning(["This action is in no-op mode because Nix is not installed.", "Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow."].join(" ")); - break; - } - return false; - } - async preflightNixStoreInfo() { - let output = ""; - const options = {}; - options.silent = true; - options.listeners = { stdout: (data) => { - output += data.toString(); - } }; - try { - output = ""; - await exec.exec("nix", [ - "store", - "info", - "--json" - ], options); - this.addFact(FACT_NIX_STORE_CHECK_METHOD, "info"); - } catch { - try { - output = ""; - await exec.exec("nix", [ - "store", - "ping", - "--json" - ], options); - this.addFact(FACT_NIX_STORE_CHECK_METHOD, "ping"); - } catch { - this.addFact(FACT_NIX_STORE_CHECK_METHOD, "none"); - return; - } - } - try { - const parsed = JSON.parse(output); - if (parsed.trusted === 1) this.nixStoreTrust = "trusted"; - else if (parsed.trusted === 0) this.nixStoreTrust = "untrusted"; - else if (parsed.trusted !== void 0) this.addFact(FACT_NIX_STORE_CHECK_ERROR, `Mysterious trusted value: ${JSON.stringify(parsed.trusted)}`); - this.addFact(FACT_NIX_STORE_VERSION, JSON.stringify(parsed.version)); - } catch (e) { - this.addFact(FACT_NIX_STORE_CHECK_ERROR, stringifyError$1(e)); - } - } - async preflightNixVersion() { - let output = "unknown"; - try { - ({stdout: output} = await exec.getExecOutput("nix", ["--version"], { silent: true })); - output = output.trim() || "unknown"; - } catch {} - this.addFact(FACT_NIX_VERSION, output); - } - async submitEvents() { - const diagnosticsUrl = await this.idsHost.getDiagnosticsUrl(); - if (diagnosticsUrl === void 0) { - core.debug("Diagnostics are disabled. Not sending the following events:"); - core.debug(JSON.stringify(this.events, void 0, 2)); - return; - } - const batch = { - sent_at: /* @__PURE__ */ new Date(), - batch: this.events - }; - try { - await (await this.getClient()).post(diagnosticsUrl, { - json: batch, - timeout: { request: DIAGNOSTIC_ENDPOINT_TIMEOUT_MS } - }); - } catch (err) { - this.recordPlausibleTimeout(err); - core.debug(`Error submitting diagnostics event to ${diagnosticsUrl}: ${stringifyError$1(err)}`); - } - this.events = []; - } + determineExecutionPhase() { + const currentPhase = core.getState(STATE_KEY_EXECUTION_PHASE); + if (currentPhase === "") { + core.saveState(STATE_KEY_EXECUTION_PHASE, "post"); + return "main"; + } else { + return "post"; + } + } + constructor(actionOptions) { + this.actionOptions = makeOptionsConfident(actionOptions); + this.idsHost = new IdsHost( + this.actionOptions.idsProjectName, + actionOptions.diagnosticsSuffix, + // Note: we don't use actionsCore.getInput('diagnostic-endpoint') on purpose: + // getInput silently converts absent data to an empty string. + process.env["INPUT_DIAGNOSTIC-ENDPOINT"] + ); + this.exceptionAttachments = /* @__PURE__ */ new Map(); + this.nixStoreTrust = "unknown"; + this.strictMode = getBool("_internal-strict-mode"); + if (getBoolOrUndefined( + "_internal-obliterate-actions-id-token-request-variables" + ) === true) { + process.env["ACTIONS_ID_TOKEN_REQUEST_URL"] = void 0; + process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"] = void 0; + } + this.features = {}; + this.featureEventMetadata = {}; + this.events = []; + this.getCrossPhaseId(); + this.collectBacktraceSetup(); + this.facts = { + $lib: "idslib", + $lib_version: pkgVersion, + project: this.actionOptions.name, + ids_project: this.actionOptions.idsProjectName + }; + const params = [ + ["github_action_ref", "GITHUB_ACTION_REF"], + ["github_action_repository", "GITHUB_ACTION_REPOSITORY"], + ["github_event_name", "GITHUB_EVENT_NAME"], + ["$os", "RUNNER_OS"], + ["arch", "RUNNER_ARCH"] + ]; + for (const [target, env] of params) { + const value = process.env[env]; + if (value) { + this.facts[target] = value; + } + } + this.identity = identify(); + this.archOs = getArchOs(); + this.nixSystem = getNixPlatform(this.archOs); + this.facts.$app_name = `${this.actionOptions.name}/action`; + this.facts.arch_os = this.archOs; + this.facts.nix_system = this.nixSystem; + { + getDetails().then((details) => { + if (details.name !== "unknown") { + this.addFact(FACT_OS, details.name); + } + if (details.version !== "unknown") { + this.addFact(FACT_OS_VERSION, details.version); + } + }).catch((e) => { + core.debug( + `Failure getting platform details: ${stringifyError2(e)}` + ); + }); + } + this.executionPhase = this.determineExecutionPhase(); + this.facts.execution_phase = this.executionPhase; + if (this.actionOptions.fetchStyle === "gh-env-style") { + this.architectureFetchSuffix = this.archOs; + } else if (this.actionOptions.fetchStyle === "nix-style") { + this.architectureFetchSuffix = this.nixSystem; + } else if (this.actionOptions.fetchStyle === "universal") { + this.architectureFetchSuffix = "universal"; + } else { + throw new Error( + `fetchStyle ${this.actionOptions.fetchStyle} is not a valid style` + ); + } + this.sourceParameters = constructSourceParameters( + this.actionOptions.legacySourcePrefix + ); + this.recordEvent(`begin_${this.executionPhase}`); + } + /** + * Attach a file to the diagnostics data in error conditions. + * + * The file at `location` doesn't need to exist when stapleFile is called. + * + * If the file doesn't exist or is unreadable when trying to staple the attachments, the JS error will be stored in a context value at `staple_failure_{name}`. + * If the file is readable, the file's contents will be stored in a context value at `staple_value_{name}`. + */ + stapleFile(name, location) { + this.exceptionAttachments.set(name, location); + } + /** + * Execute the Action as defined. + */ + execute() { + this.executeAsync().catch((error3) => { + console.log(error3); + process.exitCode = 1; + }); + } + getTemporaryName() { + const tmpDir = process.env["RUNNER_TEMP"] || (0,external_os_.tmpdir)(); + return external_path_.join(tmpDir, `${this.actionOptions.name}-${(0,external_crypto_.randomUUID)()}`); + } + addFact(key, value) { + this.facts[key] = value; + } + async getDiagnosticsUrl() { + return await this.idsHost.getDiagnosticsUrl(); + } + getUniqueId() { + return this.identity.github_workflow_run_differentiator_hash || process.env.RUNNER_TRACKING_ID || (0,external_crypto_.randomUUID)(); + } + // This ID will be saved in the action's state, to be persisted across phase steps + getCrossPhaseId() { + let crossPhaseId = core.getState(STATE_KEY_CROSS_PHASE_ID); + if (crossPhaseId === "") { + crossPhaseId = (0,external_crypto_.randomUUID)(); + core.saveState(STATE_KEY_CROSS_PHASE_ID, crossPhaseId); + } + return crossPhaseId; + } + getCorrelationHashes() { + return this.identity; + } + recordEvent(eventName, context = {}) { + const prefixedName = eventName === "$feature_flag_called" ? eventName : `${this.actionOptions.eventPrefix}${eventName}`; + this.events.push({ + name: prefixedName, + // Use the anon distinct ID as the distinct ID until we actually have a distinct ID in the future + distinct_id: this.identity.$anon_distinct_id, + // distinct_id + uuid: (0,external_crypto_.randomUUID)(), + timestamp: /* @__PURE__ */ new Date(), + properties: { + ...context, + ...this.identity, + ...this.facts, + ...Object.fromEntries( + Object.entries(this.featureEventMetadata).map(([name, variant]) => [`$feature/${name}`, variant]) + ) + } + }); + } + /** + * Unpacks the closure returned by `fetchArtifact()`, imports the + * contents into the Nix store, and returns the path of the executable at + * `/nix/store/STORE_PATH/bin/${bin}`. + */ + async unpackClosure(bin) { + const artifact = await this.fetchArtifact(); + const { stdout } = await (0,external_util_.promisify)(external_child_process_.exec)( + `cat "${artifact}" | xz -d | nix-store --import` + ); + const paths = stdout.split(external_os_.EOL); + const lastPath = paths.at(-2); + return `${lastPath}/bin/${bin}`; + } + /** + * Fetches the executable at the URL determined by the `source-*` inputs and + * other facts, `chmod`s it, and returns the path to the executable on disk. + */ + async fetchExecutable() { + const binaryPath = await this.fetchArtifact(); + await (0,promises_namespaceObject.chmod)(binaryPath, promises_namespaceObject.constants.S_IXUSR | promises_namespaceObject.constants.S_IXGRP); + return binaryPath; + } + get isMain() { + return this.executionPhase === "main"; + } + get isPost() { + return this.executionPhase === "post"; + } + async executeAsync() { + try { + await this.checkIn(); + const correlationHashes = JSON.stringify(this.getCorrelationHashes()); + process.env.DETSYS_CORRELATION = correlationHashes; + try { + await writeCorrelationHashes(correlationHashes); + } catch (error3) { + this.recordEvent(EVENT_STORE_IDENTITY_FAILED, { error: String(error3) }); + } + if (!await this.preflightRequireNix()) { + this.recordEvent(EVENT_PREFLIGHT_REQUIRE_NIX_DENIED); + return; + } else { + await this.preflightNixStoreInfo(); + this.addFact(FACT_NIX_STORE_TRUST, this.nixStoreTrust); + } + if (this.isMain) { + await this.main(); + } else if (this.isPost) { + await this.post(); + } + this.addFact(FACT_ENDED_WITH_EXCEPTION, false); + } catch (e) { + this.addFact(FACT_ENDED_WITH_EXCEPTION, true); + const reportable = stringifyError2(e); + this.addFact(FACT_FINAL_EXCEPTION, reportable); + if (this.isPost) { + core.warning(reportable); + } else { + core.setFailed(reportable); + } + const doGzip = (0,external_util_.promisify)(external_zlib_.gzip); + const exceptionContext = /* @__PURE__ */ new Map(); + for (const [attachmentLabel, filePath] of this.exceptionAttachments) { + try { + const logText = (0,external_fs_.readFileSync)(filePath); + const buf = await doGzip(logText); + exceptionContext.set( + `staple_value_${attachmentLabel}`, + buf.toString("base64") + ); + } catch (innerError) { + exceptionContext.set( + `staple_failure_${attachmentLabel}`, + stringifyError2(innerError) + ); + } + } + this.recordEvent(EVENT_EXCEPTION, Object.fromEntries(exceptionContext)); + } finally { + if (this.isPost) { + await this.collectBacktraces(); + } + await this.complete(); + } + } + async getClient() { + return await this.idsHost.getGot( + (incitingError, prevUrl, nextUrl) => { + this.recordPlausibleTimeout(incitingError); + this.recordEvent("ids-failover", { + previousUrl: prevUrl.toString(), + nextUrl: nextUrl.toString() + }); + } + ); + } + async checkIn() { + const checkin = await this.requestCheckIn(); + if (checkin === void 0) { + return; + } + this.features = checkin.options; + for (const [key, feature] of Object.entries(this.features)) { + this.featureEventMetadata[key] = feature.variant; + } + const impactSymbol = /* @__PURE__ */ new Map([ + ["none", "\u26AA"], + ["maintenance", "\u{1F6E0}\uFE0F"], + ["minor", "\u{1F7E1}"], + ["major", "\u{1F7E0}"], + ["critical", "\u{1F534}"] + ]); + const defaultImpactSymbol = "\u{1F535}"; + if (checkin.status !== null) { + const summaries = []; + for (const incident of checkin.status.incidents) { + summaries.push( + `${impactSymbol.get(incident.impact) || defaultImpactSymbol} ${incident.status.replace("_", " ")}: ${incident.name} (${incident.shortlink})` + ); + } + for (const maintenance of checkin.status.scheduled_maintenances) { + summaries.push( + `${impactSymbol.get(maintenance.impact) || defaultImpactSymbol} ${maintenance.status.replace("_", " ")}: ${maintenance.name} (${maintenance.shortlink})` + ); + } + if (summaries.length > 0) { + core.info( + // Bright red, Bold, Underline + `${"\x1B[0;31m"}${"\x1B[1m"}${"\x1B[4m"}${checkin.status.page.name} Status` + ); + for (const notice of summaries) { + core.info(notice); + } + core.info(`See: ${checkin.status.page.url}`); + core.info(``); + } + } + } + getFeature(name) { + if (!this.features.hasOwnProperty(name)) { + return void 0; + } + const result = this.features[name]; + if (result === void 0) { + return void 0; + } + this.recordEvent("$feature_flag_called", { + $feature_flag: name, + $feature_flag_response: result.variant + }); + return result; + } + /** + * Check in to install.determinate.systems, to accomplish three things: + * + * 1. Preflight the server selected from IdsHost, to increase the chances of success. + * 2. Fetch any incidents and maintenance events to let users know in case things are weird. + * 3. Get feature flag data so we can gently roll out new features. + */ + async requestCheckIn() { + for (let attemptsRemaining = 5; attemptsRemaining > 0; attemptsRemaining--) { + const checkInUrl = await this.getCheckInUrl(); + if (checkInUrl === void 0) { + return void 0; + } + try { + core.debug(`Preflighting via ${checkInUrl}`); + const props = { + // Use a distinct_id when we actually have one + distinct_id: this.identity.$anon_distinct_id, + anon_distinct_id: this.identity.$anon_distinct_id, + groups: this.identity.$groups, + person_properties: { + ci: "github", + ...this.identity, + ...this.facts + } + }; + return await (await this.getClient()).post(checkInUrl, { + json: props, + timeout: { + request: CHECK_IN_ENDPOINT_TIMEOUT_MS + } + }).json(); + } catch (e) { + this.recordPlausibleTimeout(e); + core.debug(`Error checking in: ${stringifyError2(e)}`); + this.idsHost.markCurrentHostBroken(); + } + } + return void 0; + } + recordPlausibleTimeout(e) { + if (e instanceof TimeoutError && "timings" in e && "request" in e) { + const reportContext = { + url: e.request.requestUrl?.toString(), + retry_count: e.request.retryCount + }; + for (const [key, value] of Object.entries(e.timings.phases)) { + if (Number.isFinite(value)) { + reportContext[`timing_phase_${key}`] = value; + } + } + this.recordEvent("timeout", reportContext); + } + } + /** + * Fetch an artifact, such as a tarball, from the location determined by the + * `source-*` inputs. If `source-binary` is specified, this will return a path + * to a binary on disk; otherwise, the artifact will be downloaded from the + * URL determined by the other `source-*` inputs (`source-url`, `source-pr`, + * etc.). + */ + async fetchArtifact() { + const sourceBinary = getStringOrNull("source-binary"); + if (sourceBinary !== null && sourceBinary !== "") { + core.debug(`Using the provided source binary at ${sourceBinary}`); + return sourceBinary; + } + core.startGroup( + `Downloading ${this.actionOptions.name} for ${this.architectureFetchSuffix}` + ); + try { + core.info(`Fetching from ${await this.getSourceUrl()}`); + const correlatedUrl = await this.getSourceUrl(); + correlatedUrl.searchParams.set("ci", "github"); + correlatedUrl.searchParams.set( + "correlation", + JSON.stringify(this.identity) + ); + const versionCheckup = await (await this.getClient()).head(correlatedUrl); + if (versionCheckup.headers.etag) { + const v = versionCheckup.headers.etag; + this.addFact(FACT_SOURCE_URL_ETAG, v); + core.debug( + `Checking the tool cache for ${await this.getSourceUrl()} at ${v}` + ); + const cached = await this.getCachedVersion(v); + if (cached) { + this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = true; + core.debug(`Tool cache hit.`); + return cached; + } + } + this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = false; + core.debug( + `No match from the cache, re-fetching from the redirect: ${versionCheckup.url}` + ); + const destFile = this.getTemporaryName(); + const fetchStream = await this.downloadFile( + new URL(versionCheckup.url), + destFile + ); + if (fetchStream.response?.headers.etag) { + const v = fetchStream.response.headers.etag; + try { + await this.saveCachedVersion(v, destFile); + } catch (e) { + core.debug(`Error caching the artifact: ${stringifyError2(e)}`); + } + } + return destFile; + } catch (e) { + this.recordPlausibleTimeout(e); + throw e; + } finally { + core.endGroup(); + } + } + /** + * A helper function for failing on error only if strict mode is enabled. + * This is intended only for CI environments testing Actions themselves. + */ + failOnError(msg) { + if (this.strictMode) { + core.setFailed(`strict mode failure: ${msg}`); + } + } + async downloadFile(url, destination) { + const client = await this.getClient(); + return new Promise((resolve, reject) => { + let writeStream; + let failed = false; + const retry = (stream) => { + if (writeStream) { + writeStream.destroy(); + } + writeStream = (0,external_fs_.createWriteStream)(destination, { + encoding: "binary", + mode: 493 + }); + writeStream.once("error", (error3) => { + failed = true; + reject(error3); + }); + writeStream.on("finish", () => { + if (!failed) { + resolve(stream); + } + }); + stream.once("retry", (_count, _error, createRetryStream) => { + retry(createRetryStream()); + }); + stream.pipe(writeStream); + }; + retry(client.stream(url)); + }); + } + async complete() { + this.recordEvent(`complete_${this.executionPhase}`); + await this.submitEvents(); + } + async getCheckInUrl() { + const checkInUrl = await this.idsHost.getDynamicRootUrl(); + if (checkInUrl === void 0) { + return void 0; + } + checkInUrl.pathname += "check-in"; + return checkInUrl; + } + async getSourceUrl() { + const p = this.sourceParameters; + if (p.url) { + this.addFact(FACT_SOURCE_URL, p.url); + return new URL(p.url); + } + const fetchUrl = await this.idsHost.getRootUrl(); + fetchUrl.pathname += this.actionOptions.idsProjectName; + if (p.tag) { + fetchUrl.pathname += `/tag/${p.tag}`; + } else if (p.pr) { + fetchUrl.pathname += `/pr/${p.pr}`; + } else if (p.branch) { + fetchUrl.pathname += `/branch/${p.branch}`; + } else if (p.revision) { + fetchUrl.pathname += `/rev/${p.revision}`; + } else { + fetchUrl.pathname += `/stable`; + } + fetchUrl.pathname += `/${this.architectureFetchSuffix}`; + this.addFact(FACT_SOURCE_URL, fetchUrl.toString()); + return fetchUrl; + } + cacheKey(version) { + const cleanedVersion = version.replace(/[^a-zA-Z0-9-+.]/g, ""); + return `determinatesystem-${this.actionOptions.name}-${this.architectureFetchSuffix}-${cleanedVersion}`; + } + async getCachedVersion(version) { + const startCwd = process.cwd(); + try { + const tempDir = this.getTemporaryName(); + await (0,promises_namespaceObject.mkdir)(tempDir); + process.chdir(tempDir); + process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE; + delete process.env.GITHUB_WORKSPACE; + if (await cache.restoreCache( + [this.actionOptions.name], + this.cacheKey(version), + [], + void 0, + true + )) { + this.recordEvent(EVENT_ARTIFACT_CACHE_HIT); + return `${tempDir}/${this.actionOptions.name}`; + } + this.recordEvent(EVENT_ARTIFACT_CACHE_MISS); + return void 0; + } finally { + process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP; + delete process.env.GITHUB_WORKSPACE_BACKUP; + process.chdir(startCwd); + } + } + async saveCachedVersion(version, toolPath) { + const startCwd = process.cwd(); + try { + const tempDir = this.getTemporaryName(); + await (0,promises_namespaceObject.mkdir)(tempDir); + process.chdir(tempDir); + await (0,promises_namespaceObject.copyFile)(toolPath, `${tempDir}/${this.actionOptions.name}`); + process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE; + delete process.env.GITHUB_WORKSPACE; + await cache.saveCache( + [this.actionOptions.name], + this.cacheKey(version), + void 0, + true + ); + this.recordEvent(EVENT_ARTIFACT_CACHE_PERSIST); + } finally { + process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP; + delete process.env.GITHUB_WORKSPACE_BACKUP; + process.chdir(startCwd); + } + } + collectBacktraceSetup() { + if (!process.env.DETSYS_BACKTRACE_COLLECTOR) { + core.exportVariable( + "DETSYS_BACKTRACE_COLLECTOR", + this.getCrossPhaseId() + ); + core.saveState(STATE_BACKTRACE_START_TIMESTAMP, Date.now()); + } + } + async collectBacktraces() { + try { + if (process.env.DETSYS_BACKTRACE_COLLECTOR !== this.getCrossPhaseId()) { + return; + } + const backtraces = await collectBacktraces( + this.actionOptions.binaryNamePrefixes, + this.actionOptions.binaryNamesDenyList, + parseInt(core.getState(STATE_BACKTRACE_START_TIMESTAMP)) + ); + core.debug(`Backtraces identified: ${backtraces.size}`); + if (backtraces.size > 0) { + this.recordEvent(EVENT_BACKTRACES, Object.fromEntries(backtraces)); + } + } catch (innerError) { + core.debug( + `Error collecting backtraces: ${stringifyError2(innerError)}` + ); + } + } + async preflightRequireNix() { + let nixLocation; + const pathParts = (process.env["PATH"] || "").split(":"); + for (const location of pathParts) { + const candidateNix = external_path_.join(location, "nix"); + try { + await promises_namespaceObject.access(candidateNix, promises_namespaceObject.constants.X_OK); + core.debug(`Found Nix at ${candidateNix}`); + nixLocation = candidateNix; + break; + } catch { + core.debug(`Nix not at ${candidateNix}`); + } + } + this.addFact(FACT_NIX_LOCATION, nixLocation || ""); + if (this.actionOptions.requireNix === "ignore") { + return true; + } + const currentNotFoundState = core.getState(STATE_KEY_NIX_NOT_FOUND); + if (currentNotFoundState === STATE_NOT_FOUND) { + return false; + } + if (nixLocation !== void 0) { + return true; + } + core.saveState(STATE_KEY_NIX_NOT_FOUND, STATE_NOT_FOUND); + switch (this.actionOptions.requireNix) { + case "fail": + core.setFailed( + [ + "This action can only be used when Nix is installed.", + "Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow." + ].join(" ") + ); + break; + case "warn": + core.warning( + [ + "This action is in no-op mode because Nix is not installed.", + "Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow." + ].join(" ") + ); + break; + } + return false; + } + async preflightNixStoreInfo() { + let output = ""; + const options = {}; + options.silent = true; + options.listeners = { + stdout: (data) => { + output += data.toString(); + } + }; + try { + output = ""; + await exec.exec("nix", ["store", "info", "--json"], options); + this.addFact(FACT_NIX_STORE_CHECK_METHOD, "info"); + } catch { + try { + output = ""; + await exec.exec("nix", ["store", "ping", "--json"], options); + this.addFact(FACT_NIX_STORE_CHECK_METHOD, "ping"); + } catch { + this.addFact(FACT_NIX_STORE_CHECK_METHOD, "none"); + return; + } + } + try { + const parsed = JSON.parse(output); + if (parsed.trusted === 1) { + this.nixStoreTrust = "trusted"; + } else if (parsed.trusted === 0) { + this.nixStoreTrust = "untrusted"; + } else if (parsed.trusted !== void 0) { + this.addFact( + FACT_NIX_STORE_CHECK_ERROR, + `Mysterious trusted value: ${JSON.stringify(parsed.trusted)}` + ); + } + this.addFact(FACT_NIX_STORE_VERSION, JSON.stringify(parsed.version)); + } catch (e) { + this.addFact(FACT_NIX_STORE_CHECK_ERROR, stringifyError2(e)); + } + } + async submitEvents() { + const diagnosticsUrl = await this.idsHost.getDiagnosticsUrl(); + if (diagnosticsUrl === void 0) { + core.debug( + "Diagnostics are disabled. Not sending the following events:" + ); + core.debug(JSON.stringify(this.events, void 0, 2)); + return; + } + const batch = { + sent_at: /* @__PURE__ */ new Date(), + batch: this.events + }; + try { + await (await this.getClient()).post(diagnosticsUrl, { + json: batch, + timeout: { + request: DIAGNOSTIC_ENDPOINT_TIMEOUT_MS + } + }); + } catch (err) { + this.recordPlausibleTimeout(err); + core.debug( + `Error submitting diagnostics event to ${diagnosticsUrl}: ${stringifyError2(err)}` + ); + } + this.events = []; + } }; -function stringifyError$1(error) { - return error instanceof Error || typeof error == "string" ? error.toString() : JSON.stringify(error); +function stringifyError2(error3) { + return error3 instanceof Error || typeof error3 == "string" ? error3.toString() : JSON.stringify(error3); } function makeOptionsConfident(actionOptions) { - const idsProjectName = actionOptions.idsProjectName ?? actionOptions.name; - const finalOpts = { - name: actionOptions.name, - idsProjectName, - eventPrefix: actionOptions.eventPrefix || "action:", - fetchStyle: actionOptions.fetchStyle, - legacySourcePrefix: actionOptions.legacySourcePrefix, - requireNix: actionOptions.requireNix, - binaryNamePrefixes: actionOptions.binaryNamePrefixes ?? [ - "nix", - "determinate-nixd", - actionOptions.name - ], - binaryNamesDenyList: actionOptions.binaryNamePrefixes ?? PROGRAM_NAME_CRASH_DENY_LIST - }; - core.debug("idslib options:"); - core.debug(JSON.stringify(finalOpts, void 0, 2)); - return finalOpts; + const idsProjectName = actionOptions.idsProjectName ?? actionOptions.name; + const finalOpts = { + name: actionOptions.name, + idsProjectName, + eventPrefix: actionOptions.eventPrefix || "action:", + fetchStyle: actionOptions.fetchStyle, + legacySourcePrefix: actionOptions.legacySourcePrefix, + requireNix: actionOptions.requireNix, + binaryNamePrefixes: actionOptions.binaryNamePrefixes ?? [ + "nix", + "determinate-nixd", + actionOptions.name + ], + binaryNamesDenyList: actionOptions.binaryNamePrefixes ?? PROGRAM_NAME_CRASH_DENY_LIST + }; + core.debug("idslib options:"); + core.debug(JSON.stringify(finalOpts, void 0, 2)); + return finalOpts; } -//#endregion - +/*! + * linux-release-info + * Get Linux release info (distribution name, version, arch, release, etc.) + * from '/etc/os-release' or '/usr/lib/os-release' files and from native os + * module. On Windows and Darwin platforms it only returns common node os module + * info (platform, hostname, release, and arch) + * + * Licensed under MIT + * Copyright (c) 2018-2020 [Samuel Carreira] + */ //# sourceMappingURL=index.js.map ;// CONCATENATED MODULE: ./dist/index.js // src/nix.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fa3a937..9a6e101 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,10 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + vite@>=7.1.0 <=7.1.10: '>=7.1.11' + vite@>=7.1.0 <=7.1.4: '>=7.1.5' + importers: .: @@ -16,7 +20,7 @@ importers: version: 1.1.1 detsys-ts: specifier: github:DeterminateSystems/detsys-ts - version: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/cb28f5861548d8a85d054c4d6e8e0cd3d3c94329 + version: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/e439a01995ac029e7481a75c4661a7f60eeb8b19 devDependencies: '@trivago/prettier-plugin-sort-imports': specifier: ^4.3.0 @@ -57,8 +61,8 @@ importers: packages: - '@actions/cache@4.1.0': - resolution: {integrity: sha512-z3Opg+P4Y7baq+g1dODXgdtsvPLSewr3ZKpp3U0HQR1A/vWCoJFS52XSezjdngo4SIOdR5oHtyK3a3Arar+X9A==} + '@actions/cache@4.0.5': + resolution: {integrity: sha512-RjLz1/vvntOfp3FpkY3wB0MjVRbLq7bfQEuQG9UUTKwdtcYmFrKVmuD+9B6ADbzbkSfHM+dM4sMjdr3R4XIkFg==} '@actions/core@1.11.1': resolution: {integrity: sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==} @@ -83,17 +87,17 @@ packages: resolution: {integrity: sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==} engines: {node: '>=18.0.0'} - '@azure/core-auth@1.10.1': - resolution: {integrity: sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg==} + '@azure/core-auth@1.10.0': + resolution: {integrity: sha512-88Djs5vBvGbHQHf5ZZcaoNHo6Y8BKZkt3cw2iuJIQzLEgH4Ox6Tm4hjFhbqOxyYsgIG/eJbFEHpxRIfEEWv5Ow==} engines: {node: '>=20.0.0'} - '@azure/core-client@1.10.1': - resolution: {integrity: sha512-Nh5PhEOeY6PrnxNPsEHRr9eimxLwgLlpmguQaHKBinFYA/RU9+kOYVOQqOrTsCL+KSxrLLl1gD8Dk5BFW/7l/w==} + '@azure/core-client@1.10.0': + resolution: {integrity: sha512-O4aP3CLFNodg8eTHXECaH3B3CjicfzkxVtnrfLkOq0XNP7TIECGfHpK/C6vADZkWP75wzmdBnsIA8ksuJMk18g==} engines: {node: '>=20.0.0'} - '@azure/core-http-compat@2.3.1': - resolution: {integrity: sha512-az9BkXND3/d5VgdRRQVkiJb2gOmDU8Qcq4GvjtBmDICNiQ9udFmDk4ZpSB5Qq1OmtDJGlQAfBaS4palFsazQ5g==} - engines: {node: '>=20.0.0'} + '@azure/core-http-compat@2.3.0': + resolution: {integrity: sha512-qLQujmUypBBG0gxHd0j6/Jdmul6ttl24c8WGiLXIk7IHXdBlfoBqW27hyz3Xn6xbfdyVSarl1Ttbk0AwnZBYCw==} + engines: {node: '>=18.0.0'} '@azure/core-lro@2.7.2': resolution: {integrity: sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==} @@ -103,16 +107,16 @@ packages: resolution: {integrity: sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==} engines: {node: '>=18.0.0'} - '@azure/core-rest-pipeline@1.22.2': - resolution: {integrity: sha512-MzHym+wOi8CLUlKCQu12de0nwcq9k9Kuv43j4Wa++CsCpJwps2eeBQwD2Bu8snkxTtDKDx4GwjuR9E8yC8LNrg==} + '@azure/core-rest-pipeline@1.22.0': + resolution: {integrity: sha512-OKHmb3/Kpm06HypvB3g6Q3zJuvyXcpxDpCS1PnU8OV6AJgSFaee/covXBcPbWc6XDDxtEPlbi3EMQ6nUiPaQtw==} engines: {node: '>=20.0.0'} - '@azure/core-tracing@1.3.1': - resolution: {integrity: sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ==} + '@azure/core-tracing@1.3.0': + resolution: {integrity: sha512-+XvmZLLWPe67WXNZo9Oc9CrPj/Tm8QnHR92fFAFdnbzwNdCH1h+7UdpaQgRSBsMY+oW1kHXNUZQLdZ1gHX3ROw==} engines: {node: '>=20.0.0'} - '@azure/core-util@1.13.1': - resolution: {integrity: sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A==} + '@azure/core-util@1.13.0': + resolution: {integrity: sha512-o0psW8QWQ58fq3i24Q1K2XfS/jYTxr7O1HRcyUE9bV9NttLU+kYOH82Ixj8DGlMTOWgxm1Sss2QAfKK5UkSPxw==} engines: {node: '>=20.0.0'} '@azure/core-xml@1.5.0': @@ -126,12 +130,12 @@ packages: '@azure/ms-rest-js@2.7.0': resolution: {integrity: sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==} - '@azure/storage-blob@12.29.1': - resolution: {integrity: sha512-7ktyY0rfTM0vo7HvtK6E3UvYnI9qfd6Oz6z/+92VhGRveWng3kJwMKeUpqmW/NmwcDNbxHpSlldG+vsUnRFnBg==} + '@azure/storage-blob@12.28.0': + resolution: {integrity: sha512-VhQHITXXO03SURhDiGuHhvc/k/sD2WvJUS7hqhiVNbErVCuQoLtWql7r97fleBlIRKHJaa9R7DpBjfE0pfLYcA==} engines: {node: '>=20.0.0'} - '@azure/storage-common@12.1.1': - resolution: {integrity: sha512-eIOH1pqFwI6UmVNnDQvmFeSg0XppuzDLFeUNO/Xht7ODAzRLgGDh7h550pSxoA+lPDxBl1+D2m/KG3jWzCUjTg==} + '@azure/storage-common@12.0.0': + resolution: {integrity: sha512-QyEWXgi4kdRo0wc1rHum9/KnaWZKCdQGZK1BjU4fFL6Jtedp7KLbQihgTTVxldFy1z1ZPtuDPx8mQ5l3huPPbA==} engines: {node: '>=20.0.0'} '@babel/code-frame@7.27.1': @@ -142,8 +146,8 @@ packages: resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==} engines: {node: '>=6.9.0'} - '@babel/generator@7.28.5': - resolution: {integrity: sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==} + '@babel/generator@7.28.3': + resolution: {integrity: sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==} engines: {node: '>=6.9.0'} '@babel/helper-environment-visitor@7.24.7': @@ -166,12 +170,12 @@ packages: resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.28.5': - resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} + '@babel/helper-validator-identifier@7.27.1': + resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} - '@babel/parser@7.28.5': - resolution: {integrity: sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==} + '@babel/parser@7.28.3': + resolution: {integrity: sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA==} engines: {node: '>=6.0.0'} hasBin: true @@ -187,183 +191,183 @@ packages: resolution: {integrity: sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==} engines: {node: '>=6.9.0'} - '@babel/types@7.28.5': - resolution: {integrity: sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==} + '@babel/types@7.28.2': + resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==} engines: {node: '>=6.9.0'} - '@emnapi/core@1.7.0': - resolution: {integrity: sha512-pJdKGq/1iquWYtv1RRSljZklxHCOCAJFJrImO5ZLKPJVJlVUcs8yFwNQlqS0Lo8xT1VAXXTCZocF9n26FWEKsw==} + '@emnapi/core@1.4.5': + resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==} - '@emnapi/runtime@1.7.0': - resolution: {integrity: sha512-oAYoQnCYaQZKVS53Fq23ceWMRxq5EhQsE0x0RdQ55jT7wagMu5k+fS39v1fiSLrtrLQlXwVINenqhLMtTrV/1Q==} + '@emnapi/runtime@1.4.5': + resolution: {integrity: sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==} - '@emnapi/wasi-threads@1.1.0': - resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} + '@emnapi/wasi-threads@1.0.4': + resolution: {integrity: sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g==} - '@esbuild/aix-ppc64@0.25.12': - resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} + '@esbuild/aix-ppc64@0.25.9': + resolution: {integrity: sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.25.12': - resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} + '@esbuild/android-arm64@0.25.9': + resolution: {integrity: sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.25.12': - resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} + '@esbuild/android-arm@0.25.9': + resolution: {integrity: sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.25.12': - resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} + '@esbuild/android-x64@0.25.9': + resolution: {integrity: sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.25.12': - resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} + '@esbuild/darwin-arm64@0.25.9': + resolution: {integrity: sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.25.12': - resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} + '@esbuild/darwin-x64@0.25.9': + resolution: {integrity: sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.25.12': - resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} + '@esbuild/freebsd-arm64@0.25.9': + resolution: {integrity: sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.12': - resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} + '@esbuild/freebsd-x64@0.25.9': + resolution: {integrity: sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.25.12': - resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} + '@esbuild/linux-arm64@0.25.9': + resolution: {integrity: sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.25.12': - resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} + '@esbuild/linux-arm@0.25.9': + resolution: {integrity: sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.25.12': - resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} + '@esbuild/linux-ia32@0.25.9': + resolution: {integrity: sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.25.12': - resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} + '@esbuild/linux-loong64@0.25.9': + resolution: {integrity: sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.25.12': - resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} + '@esbuild/linux-mips64el@0.25.9': + resolution: {integrity: sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.25.12': - resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} + '@esbuild/linux-ppc64@0.25.9': + resolution: {integrity: sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.25.12': - resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} + '@esbuild/linux-riscv64@0.25.9': + resolution: {integrity: sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.25.12': - resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} + '@esbuild/linux-s390x@0.25.9': + resolution: {integrity: sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.25.12': - resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} + '@esbuild/linux-x64@0.25.9': + resolution: {integrity: sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.12': - resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} + '@esbuild/netbsd-arm64@0.25.9': + resolution: {integrity: sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.12': - resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} + '@esbuild/netbsd-x64@0.25.9': + resolution: {integrity: sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.12': - resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} + '@esbuild/openbsd-arm64@0.25.9': + resolution: {integrity: sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.12': - resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} + '@esbuild/openbsd-x64@0.25.9': + resolution: {integrity: sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.25.12': - resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} + '@esbuild/openharmony-arm64@0.25.9': + resolution: {integrity: sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.25.12': - resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} + '@esbuild/sunos-x64@0.25.9': + resolution: {integrity: sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.25.12': - resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} + '@esbuild/win32-arm64@0.25.9': + resolution: {integrity: sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.25.12': - resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} + '@esbuild/win32-ia32@0.25.9': + resolution: {integrity: sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.25.12': - resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} + '@esbuild/win32-x64@0.25.9': + resolution: {integrity: sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.9.0': - resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} + '@eslint-community/eslint-utils@4.7.0': + resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.12.2': - resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} '@eslint/eslintrc@2.1.4': @@ -408,11 +412,8 @@ packages: '@jridgewell/sourcemap-codec@1.5.5': resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} - '@jridgewell/trace-mapping@0.3.31': - resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} - - '@keyv/serialize@1.1.1': - resolution: {integrity: sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==} + '@jridgewell/trace-mapping@0.3.30': + resolution: {integrity: sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==} '@napi-rs/wasm-runtime@0.2.12': resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} @@ -447,113 +448,103 @@ packages: '@protobuf-ts/runtime@2.11.1': resolution: {integrity: sha512-KuDaT1IfHkugM2pyz+FwiY80ejWrkH1pAtOBOZFuR6SXEFTsnb/jiQWQ1rCIrcKx2BtyxnxW6BWwsVSA/Ie+WQ==} - '@rollup/rollup-android-arm-eabi@4.52.5': - resolution: {integrity: sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==} + '@rollup/rollup-android-arm-eabi@4.48.1': + resolution: {integrity: sha512-rGmb8qoG/zdmKoYELCBwu7vt+9HxZ7Koos3pD0+sH5fR3u3Wb/jGcpnqxcnWsPEKDUyzeLSqksN8LJtgXjqBYw==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.52.5': - resolution: {integrity: sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==} + '@rollup/rollup-android-arm64@4.48.1': + resolution: {integrity: sha512-4e9WtTxrk3gu1DFE+imNJr4WsL13nWbD/Y6wQcyku5qadlKHY3OQ3LJ/INrrjngv2BJIHnIzbqMk1GTAC2P8yQ==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.52.5': - resolution: {integrity: sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==} + '@rollup/rollup-darwin-arm64@4.48.1': + resolution: {integrity: sha512-+XjmyChHfc4TSs6WUQGmVf7Hkg8ferMAE2aNYYWjiLzAS/T62uOsdfnqv+GHRjq7rKRnYh4mwWb4Hz7h/alp8A==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.52.5': - resolution: {integrity: sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==} + '@rollup/rollup-darwin-x64@4.48.1': + resolution: {integrity: sha512-upGEY7Ftw8M6BAJyGwnwMw91rSqXTcOKZnnveKrVWsMTF8/k5mleKSuh7D4v4IV1pLxKAk3Tbs0Lo9qYmii5mQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.52.5': - resolution: {integrity: sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==} + '@rollup/rollup-freebsd-arm64@4.48.1': + resolution: {integrity: sha512-P9ViWakdoynYFUOZhqq97vBrhuvRLAbN/p2tAVJvhLb8SvN7rbBnJQcBu8e/rQts42pXGLVhfsAP0k9KXWa3nQ==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.52.5': - resolution: {integrity: sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==} + '@rollup/rollup-freebsd-x64@4.48.1': + resolution: {integrity: sha512-VLKIwIpnBya5/saccM8JshpbxfyJt0Dsli0PjXozHwbSVaHTvWXJH1bbCwPXxnMzU4zVEfgD1HpW3VQHomi2AQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.52.5': - resolution: {integrity: sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.48.1': + resolution: {integrity: sha512-3zEuZsXfKaw8n/yF7t8N6NNdhyFw3s8xJTqjbTDXlipwrEHo4GtIKcMJr5Ed29leLpB9AugtAQpAHW0jvtKKaQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.52.5': - resolution: {integrity: sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==} + '@rollup/rollup-linux-arm-musleabihf@4.48.1': + resolution: {integrity: sha512-leo9tOIlKrcBmmEypzunV/2w946JeLbTdDlwEZ7OnnsUyelZ72NMnT4B2vsikSgwQifjnJUbdXzuW4ToN1wV+Q==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.52.5': - resolution: {integrity: sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==} + '@rollup/rollup-linux-arm64-gnu@4.48.1': + resolution: {integrity: sha512-Vy/WS4z4jEyvnJm+CnPfExIv5sSKqZrUr98h03hpAMbE2aI0aD2wvK6GiSe8Gx2wGp3eD81cYDpLLBqNb2ydwQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.52.5': - resolution: {integrity: sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==} + '@rollup/rollup-linux-arm64-musl@4.48.1': + resolution: {integrity: sha512-x5Kzn7XTwIssU9UYqWDB9VpLpfHYuXw5c6bJr4Mzv9kIv242vmJHbI5PJJEnmBYitUIfoMCODDhR7KoZLot2VQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loong64-gnu@4.52.5': - resolution: {integrity: sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==} + '@rollup/rollup-linux-loongarch64-gnu@4.48.1': + resolution: {integrity: sha512-yzCaBbwkkWt/EcgJOKDUdUpMHjhiZT/eDktOPWvSRpqrVE04p0Nd6EGV4/g7MARXXeOqstflqsKuXVM3H9wOIQ==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.52.5': - resolution: {integrity: sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==} + '@rollup/rollup-linux-ppc64-gnu@4.48.1': + resolution: {integrity: sha512-UK0WzWUjMAJccHIeOpPhPcKBqax7QFg47hwZTp6kiMhQHeOYJeaMwzeRZe1q5IiTKsaLnHu9s6toSYVUlZ2QtQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.52.5': - resolution: {integrity: sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==} + '@rollup/rollup-linux-riscv64-gnu@4.48.1': + resolution: {integrity: sha512-3NADEIlt+aCdCbWVZ7D3tBjBX1lHpXxcvrLt/kdXTiBrOds8APTdtk2yRL2GgmnSVeX4YS1JIf0imFujg78vpw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.52.5': - resolution: {integrity: sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==} + '@rollup/rollup-linux-riscv64-musl@4.48.1': + resolution: {integrity: sha512-euuwm/QTXAMOcyiFCcrx0/S2jGvFlKJ2Iro8rsmYL53dlblp3LkUQVFzEidHhvIPPvcIsxDhl2wkBE+I6YVGzA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.52.5': - resolution: {integrity: sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==} + '@rollup/rollup-linux-s390x-gnu@4.48.1': + resolution: {integrity: sha512-w8mULUjmPdWLJgmTYJx/W6Qhln1a+yqvgwmGXcQl2vFBkWsKGUBRbtLRuKJUln8Uaimf07zgJNxOhHOvjSQmBQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.52.5': - resolution: {integrity: sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==} + '@rollup/rollup-linux-x64-gnu@4.48.1': + resolution: {integrity: sha512-90taWXCWxTbClWuMZD0DKYohY1EovA+W5iytpE89oUPmT5O1HFdf8cuuVIylE6vCbrGdIGv85lVRzTcpTRZ+kA==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.52.5': - resolution: {integrity: sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==} + '@rollup/rollup-linux-x64-musl@4.48.1': + resolution: {integrity: sha512-2Gu29SkFh1FfTRuN1GR1afMuND2GKzlORQUP3mNMJbqdndOg7gNsa81JnORctazHRokiDzQ5+MLE5XYmZW5VWg==} cpu: [x64] os: [linux] - '@rollup/rollup-openharmony-arm64@4.52.5': - resolution: {integrity: sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==} - cpu: [arm64] - os: [openharmony] - - '@rollup/rollup-win32-arm64-msvc@4.52.5': - resolution: {integrity: sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==} + '@rollup/rollup-win32-arm64-msvc@4.48.1': + resolution: {integrity: sha512-6kQFR1WuAO50bxkIlAVeIYsz3RUx+xymwhTo9j94dJ+kmHe9ly7muH23sdfWduD0BA8pD9/yhonUvAjxGh34jQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.52.5': - resolution: {integrity: sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==} + '@rollup/rollup-win32-ia32-msvc@4.48.1': + resolution: {integrity: sha512-RUyZZ/mga88lMI3RlXFs4WQ7n3VyU07sPXmMG7/C1NOi8qisUg57Y7LRarqoGoAiopmGmChUhSwfpvQ3H5iGSQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.52.5': - resolution: {integrity: sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==} - cpu: [x64] - os: [win32] - - '@rollup/rollup-win32-x64-msvc@4.52.5': - resolution: {integrity: sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==} + '@rollup/rollup-win32-x64-msvc@4.48.1': + resolution: {integrity: sha512-8a/caCUN4vkTChxkaIJcMtwIVcBhi4X2PQRoT+yCK3qRYaZ7cURrmJFL5Ux9H9RaMIXj9RuihckdmkBX3zZsgg==} cpu: [x64] os: [win32] @@ -563,8 +554,8 @@ packages: '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} - '@sindresorhus/is@7.1.1': - resolution: {integrity: sha512-rO92VvpgMc3kfiTjGT52LEtJ8Yc5kCWhZjLQ3LwlA4pSgPpQO7bVpYXParOD8Jwf+cVQECJo3yP/4I8aZtUQTQ==} + '@sindresorhus/is@7.0.2': + resolution: {integrity: sha512-d9xRovfKNz1SKieM0qJdO+PQonjnnIfSNWfHYnBSJ9hkjm0ZPw6HlxscDXYstp3z+7V2GOFHc+J0CYrYTjqCJw==} engines: {node: '>=18'} '@szmarczak/http-timer@5.0.1': @@ -580,11 +571,11 @@ packages: '@vue/compiler-sfc': optional: true - '@tybys/wasm-util@0.10.1': - resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} + '@tybys/wasm-util@0.10.0': + resolution: {integrity: sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==} - '@types/chai@5.2.3': - resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + '@types/chai@5.2.2': + resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} @@ -656,8 +647,8 @@ packages: resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} engines: {node: ^18.18.0 || >=20.0.0} - '@typespec/ts-http-runtime@0.3.2': - resolution: {integrity: sha512-IlqQ/Gv22xUC1r/WQm4StLkYQmaaTsXAhUVsNE0+xiyf0yRFiH5++q78U3bw6bLKDCTmh0uqKB9eG9+Bt75Dkg==} + '@typespec/ts-http-runtime@0.3.0': + resolution: {integrity: sha512-sOx1PKSuFwnIl7z4RN0Ls7N9AQawmR9r66eI5rFCzLDIs8HTIYrIpH9QjYWoX0lkgGrkLxXhi4QnK7MizPRrIg==} engines: {node: '>=20.0.0'} '@ungap/structured-clone@1.3.0': @@ -769,7 +760,7 @@ packages: resolution: {integrity: sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==} peerDependencies: msw: ^2.4.9 - vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 + vite: '>=7.1.5' peerDependenciesMeta: msw: optional: true @@ -816,16 +807,16 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.2.2: - resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + ansi-regex@6.2.0: + resolution: {integrity: sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==} engines: {node: '>=12'} ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - ansi-styles@6.2.3: - resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} any-promise@1.3.0: @@ -884,8 +875,8 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - axe-core@4.11.0: - resolution: {integrity: sha512-ilYanEU8vxxBexpJd8cWM4ElSQq4QctCLKih0TSfjIfCQTeyH/6zVrmIJfLPrKTKJRbiG+cfnZbQIjAlJmF1jQ==} + axe-core@4.10.3: + resolution: {integrity: sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==} engines: {node: '>=4'} axobject-query@4.1.0: @@ -895,10 +886,6 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - baseline-browser-mapping@2.8.25: - resolution: {integrity: sha512-2NovHVesVF5TXefsGX1yzx1xgr7+m9JQenvz6FQY3qd+YXkKkYiv+vTCc7OriP9mcDZpTC5mAOYN4ocd29+erA==} - hasBin: true - brace-expansion@1.1.12: resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} @@ -909,8 +896,8 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.27.0: - resolution: {integrity: sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==} + browserslist@4.25.3: + resolution: {integrity: sha512-cDGv1kkDI4/0e5yON9yM5G/0A5u8sf5TnmdX5C9qHzI9PPu++sQ9zjm1k9NiOrf3riY4OkK0zSGqfvJyJsgCBQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -920,10 +907,6 @@ packages: peerDependencies: esbuild: '>=0.18' - byte-counter@0.1.0: - resolution: {integrity: sha512-jheRLVMeUKrDBjVw2O5+k4EvR4t9wtxHL+bo/LxfkxsVeuGMy3a5SEGgXdAFA4FSzTrU8rQXQIrsZ3oBq5a0pQ==} - engines: {node: '>=20'} - cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -932,8 +915,8 @@ packages: resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==} engines: {node: '>=14.16'} - cacheable-request@13.0.13: - resolution: {integrity: sha512-/5/6xDTN/AZHOn93MNaU7HUSzOL/YJWOwa5hV84ib1mPUtQB/ZTg5bn57UGfdNwXGhgQfcPpJDy+eGiNgGJI1w==} + cacheable-request@12.0.1: + resolution: {integrity: sha512-Yo9wGIQUaAfIbk+qY0X4cDQgCosecfBe3V9NSyeY4qPC2SAkbCS4Xj79VP8WOzitpJUZKc/wsRCYF5ariDIwkg==} engines: {node: '>=18'} call-bind-apply-helpers@1.0.2: @@ -952,8 +935,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - caniuse-lite@1.0.30001754: - resolution: {integrity: sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==} + caniuse-lite@1.0.30001737: + resolution: {integrity: sha512-BiloLiXtQNrY5UyF0+1nSJLXUENuhka2pzy2Fx5pGxqavdrxSCW4U6Pn/PoG3Efspi2frRbHpBV2XsrPE6EDlw==} chai@5.3.3: resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} @@ -1023,8 +1006,8 @@ packages: supports-color: optional: true - debug@4.4.3: - resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + debug@4.4.1: + resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -1032,9 +1015,9 @@ packages: supports-color: optional: true - decompress-response@10.0.0: - resolution: {integrity: sha512-oj7KWToJuuxlPr7VV0vabvxEIiqNMo+q0NueIiL3XhtwC6FVOX7Hr1c0C4eD0bmf7Zr+S/dSf2xvkH3Ad6sU3Q==} - engines: {node: '>=20'} + decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} deep-eql@5.0.2: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} @@ -1059,8 +1042,8 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/cb28f5861548d8a85d054c4d6e8e0cd3d3c94329: - resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/cb28f5861548d8a85d054c4d6e8e0cd3d3c94329} + detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/e439a01995ac029e7481a75c4661a7f60eeb8b19: + resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/e439a01995ac029e7481a75c4661a7f60eeb8b19} version: 1.0.0 dir-glob@3.0.1: @@ -1082,8 +1065,8 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - electron-to-chromium@1.5.248: - resolution: {integrity: sha512-zsur2yunphlyAO4gIubdJEXCK6KOVvtpiuDfCIqbM9FjcnMYiyn0ICa3hWfPr0nc41zcLWobgy1iL7VvoOyA2Q==} + electron-to-chromium@1.5.208: + resolution: {integrity: sha512-ozZyibehoe7tOhNaf16lKmljVf+3npZcJIEbJRVftVsmAg5TeA1mGS9dVCZzOwr2xT7xK15V0p7+GZqSPgkuPg==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -1122,8 +1105,8 @@ packages: resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} - esbuild@0.25.12: - resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} + esbuild@0.25.9: + resolution: {integrity: sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==} engines: {node: '>=18'} hasBin: true @@ -1312,8 +1295,8 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-xml-parser@5.3.1: - resolution: {integrity: sha512-jbNkWiv2Ec1A7wuuxk0br0d0aTMUtQ4IkL+l/i1r9PRf6pLXjDgsBsWwO+UyczmQlnehi4Tbc8/KIvxGQe+I/A==} + fast-xml-parser@5.2.5: + resolution: {integrity: sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ==} hasBin: true fastq@1.19.1: @@ -1384,10 +1367,6 @@ packages: functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - generator-function@2.0.1: - resolution: {integrity: sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==} - engines: {node: '>= 0.4'} - get-intrinsic@1.3.0: resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} engines: {node: '>= 0.4'} @@ -1404,8 +1383,8 @@ packages: resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} engines: {node: '>= 0.4'} - get-tsconfig@4.13.0: - resolution: {integrity: sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==} + get-tsconfig@4.10.1: + resolution: {integrity: sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==} glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} @@ -1443,8 +1422,8 @@ packages: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} - got@14.6.2: - resolution: {integrity: sha512-bnhvxegqufyxHAmzwCZSscjGLVpw6/NzTXOk2tQVu/b9Q9FeMAgLabYulXEQRwP04UYltnkcZwvBq14fsdqvyw==} + got@14.4.7: + resolution: {integrity: sha512-DI8zV1231tqiGzOiOzQWDhsBmncFW7oQDH6Zgy6pDPrqJuVZMtoSgPLLsBZQj8Jg4JFfwoOsDA8NGtLQLnIx2g==} engines: {node: '>=20'} graphemer@1.4.0: @@ -1562,8 +1541,8 @@ packages: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} - is-generator-function@1.1.2: - resolution: {integrity: sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==} + is-generator-function@1.1.0: + resolution: {integrity: sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==} engines: {node: '>= 0.4'} is-glob@4.0.3: @@ -1686,9 +1665,6 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - keyv@5.5.3: - resolution: {integrity: sha512-h0Un1ieD+HUrzBH6dJXhod3ifSghk5Hw/2Y4/KHBziPlZecrFyE9YOTPU6eOs0V9pYl8gOs86fkr/KN8lUX39A==} - language-subtag-registry@0.3.23: resolution: {integrity: sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==} @@ -1746,8 +1722,8 @@ packages: lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - magic-string@0.30.21: - resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + magic-string@0.30.18: + resolution: {integrity: sha512-yi8swmWbO17qHhwIBNeeZxTceJMeBvWJaId6dyvTSOwTipqeHhMhOrz6513r1sOKnpvQ7zkhlG8tPrpilwTxHQ==} math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} @@ -1769,6 +1745,10 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} + mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + mimic-response@4.0.0: resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -1801,8 +1781,8 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - napi-postinstall@0.3.4: - resolution: {integrity: sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==} + napi-postinstall@0.3.3: + resolution: {integrity: sha512-uTp172LLXSxuSYHv/kou+f6KW3SMppU9ivthaVTXian9sOt3XM/zHYHpRZiLgQoxeWfYUnslNWQHF1+G71xcow==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} hasBin: true @@ -1818,11 +1798,11 @@ packages: encoding: optional: true - node-releases@2.0.27: - resolution: {integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==} + node-releases@2.0.19: + resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} - normalize-url@8.1.0: - resolution: {integrity: sha512-X06Mfd/5aKsRHc0O0J5CUedwnPmnDtLF2+nq+KN9KSDlJHkPuh0JUviWjEWMe0SW/9TDdSLVPuk7L5gGTIA1/w==} + normalize-url@8.0.2: + resolution: {integrity: sha512-Ee/R3SyN4BuynXcnTaekmaVdbDAEiNrHqjQIA37mHU8G9pf7aaAD4ZX3XjBLo6rsdcxA/gtkcNYZLt30ACgynw==} engines: {node: '>=14.16'} object-assign@4.1.1: @@ -2007,8 +1987,8 @@ packages: resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - resolve@1.22.11: - resolution: {integrity: sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==} + resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} engines: {node: '>= 0.4'} hasBin: true @@ -2016,10 +1996,6 @@ packages: resolution: {integrity: sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==} engines: {node: '>=14.16'} - responselike@4.0.2: - resolution: {integrity: sha512-cGk8IbWEAnaCpdAt1BHzJ3Ahz5ewDJa0KseTsE3qIRMJ3C698W8psM7byCeWVpd/Ha7FUYzuRVzXoKoM6nRUbA==} - engines: {node: '>=20'} - reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -2029,8 +2005,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup@4.52.5: - resolution: {integrity: sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==} + rollup@4.48.1: + resolution: {integrity: sha512-jVG20NvbhTYDkGAty2/Yh7HK6/q3DGSRH4o8ALKGArmMuaauM9kLfoMZ+WliPwA5+JHr2lTn3g557FxBV87ifg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -2052,15 +2028,15 @@ packages: resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} engines: {node: '>= 0.4'} - sax@1.4.3: - resolution: {integrity: sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==} + sax@1.4.1: + resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.7.3: - resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==} + semver@7.7.2: + resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} engines: {node: '>=10'} hasBin: true @@ -2130,8 +2106,8 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - std-env@3.10.0: - resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + std-env@3.9.0: + resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} stop-iteration-iterator@1.1.0: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} @@ -2165,8 +2141,8 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} - strip-ansi@7.1.2: - resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} strip-bom@3.0.0: @@ -2177,8 +2153,8 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strip-literal@3.1.0: - resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==} + strip-literal@3.0.0: + resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} strnum@2.1.1: resolution: {integrity: sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==} @@ -2203,10 +2179,6 @@ packages: resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==} engines: {node: ^14.18.0 || >=16.0.0} - tagged-tag@1.0.0: - resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} - engines: {node: '>=20'} - text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -2223,6 +2195,10 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + tinyglobby@0.2.14: + resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} + engines: {node: '>=12.0.0'} + tinyglobby@0.2.15: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} @@ -2235,8 +2211,8 @@ packages: resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} engines: {node: '>=14.0.0'} - tinyspy@4.0.4: - resolution: {integrity: sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==} + tinyspy@4.0.3: + resolution: {integrity: sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==} engines: {node: '>=14.0.0'} to-fast-properties@2.0.0: @@ -2310,10 +2286,6 @@ packages: resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} - type-fest@5.2.0: - resolution: {integrity: sha512-xxCJm+Bckc6kQBknN7i9fnP/xobQRsRQxR01CztFkp/h++yfVxUUcmMgfR2HttJx/dpWjS9ubVuyspJv24Q9DA==} - engines: {node: '>=20'} - typed-array-buffer@1.0.3: resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} engines: {node: '>= 0.4'} @@ -2349,8 +2321,8 @@ packages: unrs-resolver@1.11.1: resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==} - update-browserslist-db@1.1.4: - resolution: {integrity: sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==} + update-browserslist-db@1.1.3: + resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -2502,7 +2474,7 @@ packages: snapshots: - '@actions/cache@4.1.0': + '@actions/cache@4.0.5': dependencies: '@actions/core': 1.11.1 '@actions/exec': 1.1.1 @@ -2511,7 +2483,7 @@ snapshots: '@actions/io': 1.1.3 '@azure/abort-controller': 1.1.0 '@azure/ms-rest-js': 2.7.0 - '@azure/storage-blob': 12.29.1 + '@azure/storage-blob': 12.28.0 '@protobuf-ts/runtime-rpc': 2.11.1 semver: 6.3.1 transitivePeerDependencies: @@ -2547,38 +2519,38 @@ snapshots: dependencies: tslib: 2.8.1 - '@azure/core-auth@1.10.1': + '@azure/core-auth@1.10.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-util': 1.13.1 + '@azure/core-util': 1.13.0 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@azure/core-client@1.10.1': + '@azure/core-client@1.10.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.1 - '@azure/core-rest-pipeline': 1.22.2 - '@azure/core-tracing': 1.3.1 - '@azure/core-util': 1.13.1 + '@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.3.1': + '@azure/core-http-compat@2.3.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-client': 1.10.1 - '@azure/core-rest-pipeline': 1.22.2 + '@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.13.1 + '@azure/core-util': 1.13.0 '@azure/logger': 1.3.0 tslib: 2.8.1 transitivePeerDependencies: @@ -2588,45 +2560,45 @@ snapshots: dependencies: tslib: 2.8.1 - '@azure/core-rest-pipeline@1.22.2': + '@azure/core-rest-pipeline@1.22.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.1 - '@azure/core-tracing': 1.3.1 - '@azure/core-util': 1.13.1 + '@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.2 + '@typespec/ts-http-runtime': 0.3.0 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@azure/core-tracing@1.3.1': + '@azure/core-tracing@1.3.0': dependencies: tslib: 2.8.1 - '@azure/core-util@1.13.1': + '@azure/core-util@1.13.0': dependencies: '@azure/abort-controller': 2.1.2 - '@typespec/ts-http-runtime': 0.3.2 + '@typespec/ts-http-runtime': 0.3.0 tslib: 2.8.1 transitivePeerDependencies: - supports-color '@azure/core-xml@1.5.0': dependencies: - fast-xml-parser: 5.3.1 + fast-xml-parser: 5.2.5 tslib: 2.8.1 '@azure/logger@1.3.0': dependencies: - '@typespec/ts-http-runtime': 0.3.2 + '@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.10.1 + '@azure/core-auth': 1.10.0 abort-controller: 3.0.0 form-data: 2.5.5 node-fetch: 2.7.0 @@ -2638,33 +2610,33 @@ snapshots: - encoding - supports-color - '@azure/storage-blob@12.29.1': + '@azure/storage-blob@12.28.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.1 - '@azure/core-client': 1.10.1 - '@azure/core-http-compat': 2.3.1 + '@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.22.2 - '@azure/core-tracing': 1.3.1 - '@azure/core-util': 1.13.1 + '@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.1.1 + '@azure/storage-common': 12.0.0 events: 3.3.0 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@azure/storage-common@12.1.1': + '@azure/storage-common@12.0.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.1 - '@azure/core-http-compat': 2.3.1 - '@azure/core-rest-pipeline': 1.22.2 - '@azure/core-tracing': 1.3.1 - '@azure/core-util': 1.13.1 + '@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 @@ -2673,7 +2645,7 @@ snapshots: '@babel/code-frame@7.27.1': dependencies: - '@babel/helper-validator-identifier': 7.28.5 + '@babel/helper-validator-identifier': 7.27.1 js-tokens: 4.0.0 picocolors: 1.1.1 @@ -2683,175 +2655,175 @@ snapshots: jsesc: 2.5.2 source-map: 0.5.7 - '@babel/generator@7.28.5': + '@babel/generator@7.28.3': dependencies: - '@babel/parser': 7.28.5 - '@babel/types': 7.28.5 + '@babel/parser': 7.28.3 + '@babel/types': 7.28.2 '@jridgewell/gen-mapping': 0.3.13 - '@jridgewell/trace-mapping': 0.3.31 + '@jridgewell/trace-mapping': 0.3.30 jsesc: 3.1.0 '@babel/helper-environment-visitor@7.24.7': dependencies: - '@babel/types': 7.28.5 + '@babel/types': 7.28.2 '@babel/helper-function-name@7.24.7': dependencies: '@babel/template': 7.27.2 - '@babel/types': 7.28.5 + '@babel/types': 7.28.2 '@babel/helper-hoist-variables@7.24.7': dependencies: - '@babel/types': 7.28.5 + '@babel/types': 7.28.2 '@babel/helper-split-export-declaration@7.24.7': dependencies: - '@babel/types': 7.28.5 + '@babel/types': 7.28.2 '@babel/helper-string-parser@7.27.1': {} - '@babel/helper-validator-identifier@7.28.5': {} + '@babel/helper-validator-identifier@7.27.1': {} - '@babel/parser@7.28.5': + '@babel/parser@7.28.3': dependencies: - '@babel/types': 7.28.5 + '@babel/types': 7.28.2 '@babel/template@7.27.2': dependencies: '@babel/code-frame': 7.27.1 - '@babel/parser': 7.28.5 - '@babel/types': 7.28.5 + '@babel/parser': 7.28.3 + '@babel/types': 7.28.2 '@babel/traverse@7.23.2': dependencies: '@babel/code-frame': 7.27.1 - '@babel/generator': 7.28.5 + '@babel/generator': 7.28.3 '@babel/helper-environment-visitor': 7.24.7 '@babel/helper-function-name': 7.24.7 '@babel/helper-hoist-variables': 7.24.7 '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.28.5 - '@babel/types': 7.28.5 - debug: 4.4.3 + '@babel/parser': 7.28.3 + '@babel/types': 7.28.2 + debug: 4.4.1 globals: 11.12.0 transitivePeerDependencies: - supports-color '@babel/types@7.17.0': dependencies: - '@babel/helper-validator-identifier': 7.28.5 + '@babel/helper-validator-identifier': 7.27.1 to-fast-properties: 2.0.0 - '@babel/types@7.28.5': + '@babel/types@7.28.2': dependencies: '@babel/helper-string-parser': 7.27.1 - '@babel/helper-validator-identifier': 7.28.5 + '@babel/helper-validator-identifier': 7.27.1 - '@emnapi/core@1.7.0': + '@emnapi/core@1.4.5': dependencies: - '@emnapi/wasi-threads': 1.1.0 + '@emnapi/wasi-threads': 1.0.4 tslib: 2.8.1 optional: true - '@emnapi/runtime@1.7.0': + '@emnapi/runtime@1.4.5': dependencies: tslib: 2.8.1 optional: true - '@emnapi/wasi-threads@1.1.0': + '@emnapi/wasi-threads@1.0.4': dependencies: tslib: 2.8.1 optional: true - '@esbuild/aix-ppc64@0.25.12': + '@esbuild/aix-ppc64@0.25.9': optional: true - '@esbuild/android-arm64@0.25.12': + '@esbuild/android-arm64@0.25.9': optional: true - '@esbuild/android-arm@0.25.12': + '@esbuild/android-arm@0.25.9': optional: true - '@esbuild/android-x64@0.25.12': + '@esbuild/android-x64@0.25.9': optional: true - '@esbuild/darwin-arm64@0.25.12': + '@esbuild/darwin-arm64@0.25.9': optional: true - '@esbuild/darwin-x64@0.25.12': + '@esbuild/darwin-x64@0.25.9': optional: true - '@esbuild/freebsd-arm64@0.25.12': + '@esbuild/freebsd-arm64@0.25.9': optional: true - '@esbuild/freebsd-x64@0.25.12': + '@esbuild/freebsd-x64@0.25.9': optional: true - '@esbuild/linux-arm64@0.25.12': + '@esbuild/linux-arm64@0.25.9': optional: true - '@esbuild/linux-arm@0.25.12': + '@esbuild/linux-arm@0.25.9': optional: true - '@esbuild/linux-ia32@0.25.12': + '@esbuild/linux-ia32@0.25.9': optional: true - '@esbuild/linux-loong64@0.25.12': + '@esbuild/linux-loong64@0.25.9': optional: true - '@esbuild/linux-mips64el@0.25.12': + '@esbuild/linux-mips64el@0.25.9': optional: true - '@esbuild/linux-ppc64@0.25.12': + '@esbuild/linux-ppc64@0.25.9': optional: true - '@esbuild/linux-riscv64@0.25.12': + '@esbuild/linux-riscv64@0.25.9': optional: true - '@esbuild/linux-s390x@0.25.12': + '@esbuild/linux-s390x@0.25.9': optional: true - '@esbuild/linux-x64@0.25.12': + '@esbuild/linux-x64@0.25.9': optional: true - '@esbuild/netbsd-arm64@0.25.12': + '@esbuild/netbsd-arm64@0.25.9': optional: true - '@esbuild/netbsd-x64@0.25.12': + '@esbuild/netbsd-x64@0.25.9': optional: true - '@esbuild/openbsd-arm64@0.25.12': + '@esbuild/openbsd-arm64@0.25.9': optional: true - '@esbuild/openbsd-x64@0.25.12': + '@esbuild/openbsd-x64@0.25.9': optional: true - '@esbuild/openharmony-arm64@0.25.12': + '@esbuild/openharmony-arm64@0.25.9': optional: true - '@esbuild/sunos-x64@0.25.12': + '@esbuild/sunos-x64@0.25.9': optional: true - '@esbuild/win32-arm64@0.25.12': + '@esbuild/win32-arm64@0.25.9': optional: true - '@esbuild/win32-ia32@0.25.12': + '@esbuild/win32-ia32@0.25.9': optional: true - '@esbuild/win32-x64@0.25.12': + '@esbuild/win32-x64@0.25.9': optional: true - '@eslint-community/eslint-utils@4.9.0(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.7.0(eslint@8.57.1)': dependencies: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.12.2': {} + '@eslint-community/regexpp@4.12.1': {} '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.4.3 + debug: 4.4.1 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.2 @@ -2871,7 +2843,7 @@ snapshots: '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.4.3 + debug: 4.4.1 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -2884,7 +2856,7 @@ snapshots: dependencies: string-width: 5.1.2 string-width-cjs: string-width@4.2.3 - strip-ansi: 7.1.2 + strip-ansi: 7.1.0 strip-ansi-cjs: strip-ansi@6.0.1 wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 @@ -2892,24 +2864,22 @@ snapshots: '@jridgewell/gen-mapping@0.3.13': dependencies: '@jridgewell/sourcemap-codec': 1.5.5 - '@jridgewell/trace-mapping': 0.3.31 + '@jridgewell/trace-mapping': 0.3.30 '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/sourcemap-codec@1.5.5': {} - '@jridgewell/trace-mapping@0.3.31': + '@jridgewell/trace-mapping@0.3.30': dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@keyv/serialize@1.1.1': {} - '@napi-rs/wasm-runtime@0.2.12': dependencies: - '@emnapi/core': 1.7.0 - '@emnapi/runtime': 1.7.0 - '@tybys/wasm-util': 0.10.1 + '@emnapi/core': 1.4.5 + '@emnapi/runtime': 1.4.5 + '@tybys/wasm-util': 0.10.0 optional: true '@nodelib/fs.scandir@2.1.5': @@ -2937,77 +2907,71 @@ snapshots: '@protobuf-ts/runtime@2.11.1': {} - '@rollup/rollup-android-arm-eabi@4.52.5': + '@rollup/rollup-android-arm-eabi@4.48.1': optional: true - '@rollup/rollup-android-arm64@4.52.5': + '@rollup/rollup-android-arm64@4.48.1': optional: true - '@rollup/rollup-darwin-arm64@4.52.5': + '@rollup/rollup-darwin-arm64@4.48.1': optional: true - '@rollup/rollup-darwin-x64@4.52.5': + '@rollup/rollup-darwin-x64@4.48.1': optional: true - '@rollup/rollup-freebsd-arm64@4.52.5': + '@rollup/rollup-freebsd-arm64@4.48.1': optional: true - '@rollup/rollup-freebsd-x64@4.52.5': + '@rollup/rollup-freebsd-x64@4.48.1': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.52.5': + '@rollup/rollup-linux-arm-gnueabihf@4.48.1': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.52.5': + '@rollup/rollup-linux-arm-musleabihf@4.48.1': optional: true - '@rollup/rollup-linux-arm64-gnu@4.52.5': + '@rollup/rollup-linux-arm64-gnu@4.48.1': optional: true - '@rollup/rollup-linux-arm64-musl@4.52.5': + '@rollup/rollup-linux-arm64-musl@4.48.1': optional: true - '@rollup/rollup-linux-loong64-gnu@4.52.5': + '@rollup/rollup-linux-loongarch64-gnu@4.48.1': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.52.5': + '@rollup/rollup-linux-ppc64-gnu@4.48.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.52.5': + '@rollup/rollup-linux-riscv64-gnu@4.48.1': optional: true - '@rollup/rollup-linux-riscv64-musl@4.52.5': + '@rollup/rollup-linux-riscv64-musl@4.48.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.52.5': + '@rollup/rollup-linux-s390x-gnu@4.48.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.52.5': + '@rollup/rollup-linux-x64-gnu@4.48.1': optional: true - '@rollup/rollup-linux-x64-musl@4.52.5': + '@rollup/rollup-linux-x64-musl@4.48.1': optional: true - '@rollup/rollup-openharmony-arm64@4.52.5': + '@rollup/rollup-win32-arm64-msvc@4.48.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.52.5': + '@rollup/rollup-win32-ia32-msvc@4.48.1': optional: true - '@rollup/rollup-win32-ia32-msvc@4.52.5': - optional: true - - '@rollup/rollup-win32-x64-gnu@4.52.5': - optional: true - - '@rollup/rollup-win32-x64-msvc@4.52.5': + '@rollup/rollup-win32-x64-msvc@4.48.1': optional: true '@rtsao/scc@1.1.0': {} '@sec-ant/readable-stream@0.4.1': {} - '@sindresorhus/is@7.1.1': {} + '@sindresorhus/is@7.0.2': {} '@szmarczak/http-timer@5.0.1': dependencies: @@ -3016,7 +2980,7 @@ snapshots: '@trivago/prettier-plugin-sort-imports@4.3.0(prettier@3.6.2)': dependencies: '@babel/generator': 7.17.7 - '@babel/parser': 7.28.5 + '@babel/parser': 7.28.3 '@babel/traverse': 7.23.2 '@babel/types': 7.17.0 javascript-natural-sort: 0.7.1 @@ -3025,15 +2989,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@tybys/wasm-util@0.10.1': + '@tybys/wasm-util@0.10.0': dependencies: tslib: 2.8.1 optional: true - '@types/chai@5.2.3': + '@types/chai@5.2.2': dependencies: '@types/deep-eql': 4.0.2 - assertion-error: 2.0.1 '@types/deep-eql@4.0.2': {} @@ -3045,7 +3008,7 @@ snapshots: '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1)(typescript@5.9.3)': dependencies: - '@eslint-community/regexpp': 4.12.2 + '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.9.3) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.9.3) @@ -3067,7 +3030,7 @@ snapshots: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.3) '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.4.3 + debug: 4.4.1 eslint: 8.57.1 optionalDependencies: typescript: 5.9.3 @@ -3083,7 +3046,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.3) '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.9.3) - debug: 4.4.3 + debug: 4.4.1 eslint: 8.57.1 ts-api-utils: 1.4.3(typescript@5.9.3) optionalDependencies: @@ -3097,11 +3060,11 @@ snapshots: dependencies: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.4.3 + debug: 4.4.1 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.7.3 + semver: 7.7.2 ts-api-utils: 1.4.3(typescript@5.9.3) optionalDependencies: typescript: 5.9.3 @@ -3110,7 +3073,7 @@ snapshots: '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.9.3)': dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.3) @@ -3124,7 +3087,7 @@ snapshots: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 - '@typespec/ts-http-runtime@0.3.2': + '@typespec/ts-http-runtime@0.3.0': dependencies: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 @@ -3197,7 +3160,7 @@ snapshots: '@vitest/expect@3.2.4': dependencies: - '@types/chai': 5.2.3 + '@types/chai': 5.2.2 '@vitest/spy': 3.2.4 '@vitest/utils': 3.2.4 chai: 5.3.3 @@ -3207,7 +3170,7 @@ snapshots: dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 - magic-string: 0.30.21 + magic-string: 0.30.18 optionalDependencies: vite: 7.2.2 @@ -3219,17 +3182,17 @@ snapshots: dependencies: '@vitest/utils': 3.2.4 pathe: 2.0.3 - strip-literal: 3.1.0 + strip-literal: 3.0.0 '@vitest/snapshot@3.2.4': dependencies: '@vitest/pretty-format': 3.2.4 - magic-string: 0.30.21 + magic-string: 0.30.18 pathe: 2.0.3 '@vitest/spy@3.2.4': dependencies: - tinyspy: 4.0.4 + tinyspy: 4.0.3 '@vitest/utils@3.2.4': dependencies: @@ -3258,13 +3221,13 @@ snapshots: ansi-regex@5.0.1: {} - ansi-regex@6.2.2: {} + ansi-regex@6.2.0: {} ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 - ansi-styles@6.2.3: {} + ansi-styles@6.2.1: {} any-promise@1.3.0: {} @@ -3336,14 +3299,12 @@ snapshots: dependencies: possible-typed-array-names: 1.1.0 - axe-core@4.11.0: {} + axe-core@4.10.3: {} axobject-query@4.1.0: {} balanced-match@1.0.2: {} - baseline-browser-mapping@2.8.25: {} - brace-expansion@1.1.12: dependencies: balanced-match: 1.0.2 @@ -3357,33 +3318,30 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.27.0: + browserslist@4.25.3: dependencies: - baseline-browser-mapping: 2.8.25 - caniuse-lite: 1.0.30001754 - electron-to-chromium: 1.5.248 - node-releases: 2.0.27 - update-browserslist-db: 1.1.4(browserslist@4.27.0) + caniuse-lite: 1.0.30001737 + electron-to-chromium: 1.5.208 + node-releases: 2.0.19 + update-browserslist-db: 1.1.3(browserslist@4.25.3) - bundle-require@5.1.0(esbuild@0.25.12): + bundle-require@5.1.0(esbuild@0.25.9): dependencies: - esbuild: 0.25.12 + esbuild: 0.25.9 load-tsconfig: 0.2.5 - byte-counter@0.1.0: {} - cac@6.7.14: {} cacheable-lookup@7.0.0: {} - cacheable-request@13.0.13: + cacheable-request@12.0.1: dependencies: '@types/http-cache-semantics': 4.0.4 get-stream: 9.0.1 http-cache-semantics: 4.2.0 - keyv: 5.5.3 + keyv: 4.5.4 mimic-response: 4.0.0 - normalize-url: 8.1.0 + normalize-url: 8.0.2 responselike: 3.0.0 call-bind-apply-helpers@1.0.2: @@ -3405,7 +3363,7 @@ snapshots: callsites@3.1.0: {} - caniuse-lite@1.0.30001754: {} + caniuse-lite@1.0.30001737: {} chai@5.3.3: dependencies: @@ -3474,13 +3432,13 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.4.3: + debug@4.4.1: dependencies: ms: 2.1.3 - decompress-response@10.0.0: + decompress-response@6.0.0: dependencies: - mimic-response: 4.0.0 + mimic-response: 3.1.0 deep-eql@5.0.2: {} @@ -3502,13 +3460,13 @@ snapshots: delayed-stream@1.0.0: {} - detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/cb28f5861548d8a85d054c4d6e8e0cd3d3c94329: + detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/e439a01995ac029e7481a75c4661a7f60eeb8b19: dependencies: - '@actions/cache': 4.1.0 + '@actions/cache': 4.0.5 '@actions/core': 1.11.1 '@actions/exec': 1.1.1 - got: 14.6.2 - type-fest: 5.2.0 + got: 14.4.7 + type-fest: 4.41.0 transitivePeerDependencies: - encoding - supports-color @@ -3533,7 +3491,7 @@ snapshots: eastasianwidth@0.2.0: {} - electron-to-chromium@1.5.248: {} + electron-to-chromium@1.5.208: {} emoji-regex@8.0.0: {} @@ -3623,34 +3581,34 @@ snapshots: is-date-object: 1.1.0 is-symbol: 1.1.1 - esbuild@0.25.12: + esbuild@0.25.9: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.12 - '@esbuild/android-arm': 0.25.12 - '@esbuild/android-arm64': 0.25.12 - '@esbuild/android-x64': 0.25.12 - '@esbuild/darwin-arm64': 0.25.12 - '@esbuild/darwin-x64': 0.25.12 - '@esbuild/freebsd-arm64': 0.25.12 - '@esbuild/freebsd-x64': 0.25.12 - '@esbuild/linux-arm': 0.25.12 - '@esbuild/linux-arm64': 0.25.12 - '@esbuild/linux-ia32': 0.25.12 - '@esbuild/linux-loong64': 0.25.12 - '@esbuild/linux-mips64el': 0.25.12 - '@esbuild/linux-ppc64': 0.25.12 - '@esbuild/linux-riscv64': 0.25.12 - '@esbuild/linux-s390x': 0.25.12 - '@esbuild/linux-x64': 0.25.12 - '@esbuild/netbsd-arm64': 0.25.12 - '@esbuild/netbsd-x64': 0.25.12 - '@esbuild/openbsd-arm64': 0.25.12 - '@esbuild/openbsd-x64': 0.25.12 - '@esbuild/openharmony-arm64': 0.25.12 - '@esbuild/sunos-x64': 0.25.12 - '@esbuild/win32-arm64': 0.25.12 - '@esbuild/win32-ia32': 0.25.12 - '@esbuild/win32-x64': 0.25.12 + '@esbuild/aix-ppc64': 0.25.9 + '@esbuild/android-arm': 0.25.9 + '@esbuild/android-arm64': 0.25.9 + '@esbuild/android-x64': 0.25.9 + '@esbuild/darwin-arm64': 0.25.9 + '@esbuild/darwin-x64': 0.25.9 + '@esbuild/freebsd-arm64': 0.25.9 + '@esbuild/freebsd-x64': 0.25.9 + '@esbuild/linux-arm': 0.25.9 + '@esbuild/linux-arm64': 0.25.9 + '@esbuild/linux-ia32': 0.25.9 + '@esbuild/linux-loong64': 0.25.9 + '@esbuild/linux-mips64el': 0.25.9 + '@esbuild/linux-ppc64': 0.25.9 + '@esbuild/linux-riscv64': 0.25.9 + '@esbuild/linux-s390x': 0.25.9 + '@esbuild/linux-x64': 0.25.9 + '@esbuild/netbsd-arm64': 0.25.9 + '@esbuild/netbsd-x64': 0.25.9 + '@esbuild/openbsd-arm64': 0.25.9 + '@esbuild/openbsd-x64': 0.25.9 + '@esbuild/openharmony-arm64': 0.25.9 + '@esbuild/sunos-x64': 0.25.9 + '@esbuild/win32-arm64': 0.25.9 + '@esbuild/win32-ia32': 0.25.9 + '@esbuild/win32-x64': 0.25.9 escalade@3.2.0: {} @@ -3666,19 +3624,19 @@ snapshots: dependencies: debug: 3.2.7 is-core-module: 2.16.1 - resolve: 1.22.11 + resolve: 1.22.10 transitivePeerDependencies: - supports-color eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1): dependencies: '@nolyfill/is-core-module': 1.0.39 - debug: 4.4.3 + debug: 4.4.1 eslint: 8.57.1 - get-tsconfig: 4.13.0 + get-tsconfig: 4.10.1 is-bun-module: 2.0.0 stable-hash: 0.0.5 - tinyglobby: 0.2.15 + tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) @@ -3698,7 +3656,7 @@ snapshots: eslint-plugin-escompat@3.11.4(eslint@8.57.1): dependencies: - browserslist: 4.27.0 + browserslist: 4.25.3 eslint: 8.57.1 eslint-plugin-eslint-comments@3.2.0(eslint@8.57.1): @@ -3781,7 +3739,7 @@ snapshots: array-includes: 3.1.9 array.prototype.flatmap: 1.3.3 ast-types-flow: 0.0.8 - axe-core: 4.11.0 + axe-core: 4.10.3 axobject-query: 4.1.0 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 @@ -3816,8 +3774,8 @@ snapshots: eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.12.2 + '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.1 '@humanwhocodes/config-array': 0.13.0 @@ -3827,7 +3785,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.3 + debug: 4.4.1 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -3901,7 +3859,7 @@ snapshots: fast-levenshtein@2.0.6: {} - fast-xml-parser@5.3.1: + fast-xml-parser@5.2.5: dependencies: strnum: 2.1.1 @@ -3928,9 +3886,9 @@ snapshots: fix-dts-default-cjs-exports@1.0.1: dependencies: - magic-string: 0.30.21 + magic-string: 0.30.18 mlly: 1.8.0 - rollup: 4.52.5 + rollup: 4.48.1 flat-cache@3.2.0: dependencies: @@ -3978,8 +3936,6 @@ snapshots: functions-have-names@1.2.3: {} - generator-function@2.0.1: {} - get-intrinsic@1.3.0: dependencies: call-bind-apply-helpers: 1.0.2 @@ -4009,7 +3965,7 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.3.0 - get-tsconfig@4.13.0: + get-tsconfig@4.10.1: dependencies: resolve-pkg-maps: 1.0.0 @@ -4061,20 +4017,18 @@ snapshots: gopd@1.2.0: {} - got@14.6.2: + got@14.4.7: dependencies: - '@sindresorhus/is': 7.1.1 + '@sindresorhus/is': 7.0.2 '@szmarczak/http-timer': 5.0.1 - byte-counter: 0.1.0 cacheable-lookup: 7.0.0 - cacheable-request: 13.0.13 - decompress-response: 10.0.0 + cacheable-request: 12.0.1 + decompress-response: 6.0.0 form-data-encoder: 4.1.0 http2-wrapper: 2.2.1 - keyv: 5.5.3 lowercase-keys: 3.0.0 p-cancelable: 4.0.1 - responselike: 4.0.2 + responselike: 3.0.0 type-fest: 4.41.0 graphemer@1.4.0: {} @@ -4106,7 +4060,7 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.4 - debug: 4.4.3 + debug: 4.4.1 transitivePeerDependencies: - supports-color @@ -4118,7 +4072,7 @@ snapshots: https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.4 - debug: 4.4.3 + debug: 4.4.1 transitivePeerDependencies: - supports-color @@ -4169,7 +4123,7 @@ snapshots: is-bun-module@2.0.0: dependencies: - semver: 7.7.3 + semver: 7.7.2 is-callable@1.2.7: {} @@ -4196,10 +4150,9 @@ snapshots: is-fullwidth-code-point@3.0.0: {} - is-generator-function@1.1.2: + is-generator-function@1.1.0: dependencies: call-bound: 1.0.4 - generator-function: 2.0.1 get-proto: 1.0.1 has-tostringtag: 1.0.2 safe-regex-test: 1.1.0 @@ -4309,10 +4262,6 @@ snapshots: dependencies: json-buffer: 3.0.1 - keyv@5.5.3: - dependencies: - '@keyv/serialize': 1.1.1 - language-subtag-registry@0.3.23: {} language-tags@1.0.9: @@ -4354,7 +4303,7 @@ snapshots: lru-cache@10.4.3: {} - magic-string@0.30.21: + magic-string@0.30.18: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -4373,6 +4322,8 @@ snapshots: dependencies: mime-db: 1.52.0 + mimic-response@3.1.0: {} + mimic-response@4.0.0: {} minimatch@3.1.2: @@ -4404,7 +4355,7 @@ snapshots: nanoid@3.3.11: {} - napi-postinstall@0.3.4: {} + napi-postinstall@0.3.3: {} natural-compare@1.4.0: {} @@ -4412,9 +4363,9 @@ snapshots: dependencies: whatwg-url: 5.0.0 - node-releases@2.0.27: {} + node-releases@2.0.19: {} - normalize-url@8.1.0: {} + normalize-url@8.0.2: {} object-assign@4.1.1: {} @@ -4577,7 +4528,7 @@ snapshots: resolve-pkg-maps@1.0.0: {} - resolve@1.22.11: + resolve@1.22.10: dependencies: is-core-module: 2.16.1 path-parse: 1.0.7 @@ -4587,42 +4538,36 @@ snapshots: dependencies: lowercase-keys: 3.0.0 - responselike@4.0.2: - dependencies: - lowercase-keys: 3.0.0 - reusify@1.1.0: {} rimraf@3.0.2: dependencies: glob: 7.2.3 - rollup@4.52.5: + rollup@4.48.1: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.52.5 - '@rollup/rollup-android-arm64': 4.52.5 - '@rollup/rollup-darwin-arm64': 4.52.5 - '@rollup/rollup-darwin-x64': 4.52.5 - '@rollup/rollup-freebsd-arm64': 4.52.5 - '@rollup/rollup-freebsd-x64': 4.52.5 - '@rollup/rollup-linux-arm-gnueabihf': 4.52.5 - '@rollup/rollup-linux-arm-musleabihf': 4.52.5 - '@rollup/rollup-linux-arm64-gnu': 4.52.5 - '@rollup/rollup-linux-arm64-musl': 4.52.5 - '@rollup/rollup-linux-loong64-gnu': 4.52.5 - '@rollup/rollup-linux-ppc64-gnu': 4.52.5 - '@rollup/rollup-linux-riscv64-gnu': 4.52.5 - '@rollup/rollup-linux-riscv64-musl': 4.52.5 - '@rollup/rollup-linux-s390x-gnu': 4.52.5 - '@rollup/rollup-linux-x64-gnu': 4.52.5 - '@rollup/rollup-linux-x64-musl': 4.52.5 - '@rollup/rollup-openharmony-arm64': 4.52.5 - '@rollup/rollup-win32-arm64-msvc': 4.52.5 - '@rollup/rollup-win32-ia32-msvc': 4.52.5 - '@rollup/rollup-win32-x64-gnu': 4.52.5 - '@rollup/rollup-win32-x64-msvc': 4.52.5 + '@rollup/rollup-android-arm-eabi': 4.48.1 + '@rollup/rollup-android-arm64': 4.48.1 + '@rollup/rollup-darwin-arm64': 4.48.1 + '@rollup/rollup-darwin-x64': 4.48.1 + '@rollup/rollup-freebsd-arm64': 4.48.1 + '@rollup/rollup-freebsd-x64': 4.48.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.48.1 + '@rollup/rollup-linux-arm-musleabihf': 4.48.1 + '@rollup/rollup-linux-arm64-gnu': 4.48.1 + '@rollup/rollup-linux-arm64-musl': 4.48.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.48.1 + '@rollup/rollup-linux-ppc64-gnu': 4.48.1 + '@rollup/rollup-linux-riscv64-gnu': 4.48.1 + '@rollup/rollup-linux-riscv64-musl': 4.48.1 + '@rollup/rollup-linux-s390x-gnu': 4.48.1 + '@rollup/rollup-linux-x64-gnu': 4.48.1 + '@rollup/rollup-linux-x64-musl': 4.48.1 + '@rollup/rollup-win32-arm64-msvc': 4.48.1 + '@rollup/rollup-win32-ia32-msvc': 4.48.1 + '@rollup/rollup-win32-x64-msvc': 4.48.1 fsevents: 2.3.3 run-parallel@1.2.0: @@ -4650,11 +4595,11 @@ snapshots: es-errors: 1.3.0 is-regex: 1.2.1 - sax@1.4.3: {} + sax@1.4.1: {} semver@6.3.1: {} - semver@7.7.3: {} + semver@7.7.2: {} set-function-length@1.2.2: dependencies: @@ -4730,7 +4675,7 @@ snapshots: stackback@0.0.2: {} - std-env@3.10.0: {} + std-env@3.9.0: {} stop-iteration-iterator@1.1.0: dependencies: @@ -4747,7 +4692,7 @@ snapshots: dependencies: eastasianwidth: 0.2.0 emoji-regex: 9.2.2 - strip-ansi: 7.1.2 + strip-ansi: 7.1.0 string.prototype.includes@2.0.1: dependencies: @@ -4782,15 +4727,15 @@ snapshots: dependencies: ansi-regex: 5.0.1 - strip-ansi@7.1.2: + strip-ansi@7.1.0: dependencies: - ansi-regex: 6.2.2 + ansi-regex: 6.2.0 strip-bom@3.0.0: {} strip-json-comments@3.1.1: {} - strip-literal@3.1.0: + strip-literal@3.0.0: dependencies: js-tokens: 9.0.1 @@ -4818,8 +4763,6 @@ snapshots: dependencies: '@pkgr/core': 0.2.9 - tagged-tag@1.0.0: {} - text-table@0.2.0: {} thenify-all@1.6.0: @@ -4834,6 +4777,11 @@ snapshots: tinyexec@0.3.2: {} + tinyglobby@0.2.14: + dependencies: + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + tinyglobby@0.2.15: dependencies: fdir: 6.5.0(picomatch@4.0.3) @@ -4843,7 +4791,7 @@ snapshots: tinyrainbow@2.0.0: {} - tinyspy@4.0.4: {} + tinyspy@4.0.3: {} to-fast-properties@2.0.0: {} @@ -4878,22 +4826,22 @@ snapshots: tsup@8.5.0(postcss@8.5.6)(typescript@5.9.3): dependencies: - bundle-require: 5.1.0(esbuild@0.25.12) + bundle-require: 5.1.0(esbuild@0.25.9) cac: 6.7.14 chokidar: 4.0.3 consola: 3.4.2 - debug: 4.4.3 - esbuild: 0.25.12 + debug: 4.4.1 + esbuild: 0.25.9 fix-dts-default-cjs-exports: 1.0.1 joycon: 3.1.1 picocolors: 1.1.1 postcss-load-config: 6.0.1(postcss@8.5.6) resolve-from: 5.0.0 - rollup: 4.52.5 + rollup: 4.48.1 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tinyexec: 0.3.2 - tinyglobby: 0.2.15 + tinyglobby: 0.2.14 tree-kill: 1.2.2 optionalDependencies: postcss: 8.5.6 @@ -4914,10 +4862,6 @@ snapshots: type-fest@4.41.0: {} - type-fest@5.2.0: - dependencies: - tagged-tag: 1.0.0 - typed-array-buffer@1.0.3: dependencies: call-bound: 1.0.4 @@ -4968,7 +4912,7 @@ snapshots: unrs-resolver@1.11.1: dependencies: - napi-postinstall: 0.3.4 + napi-postinstall: 0.3.3 optionalDependencies: '@unrs/resolver-binding-android-arm-eabi': 1.11.1 '@unrs/resolver-binding-android-arm64': 1.11.1 @@ -4990,9 +4934,9 @@ snapshots: '@unrs/resolver-binding-win32-ia32-msvc': 1.11.1 '@unrs/resolver-binding-win32-x64-msvc': 1.11.1 - update-browserslist-db@1.1.4(browserslist@4.27.0): + update-browserslist-db@1.1.3(browserslist@4.25.3): dependencies: - browserslist: 4.27.0 + browserslist: 4.25.3 escalade: 3.2.0 picocolors: 1.1.1 @@ -5005,7 +4949,7 @@ snapshots: vite-node@3.2.4: dependencies: cac: 6.7.14 - debug: 4.4.3 + debug: 4.4.1 es-module-lexer: 1.7.0 pathe: 2.0.3 vite: 7.2.2 @@ -5025,18 +4969,18 @@ snapshots: vite@7.2.2: dependencies: - esbuild: 0.25.12 + esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 - rollup: 4.52.5 + rollup: 4.48.1 tinyglobby: 0.2.15 optionalDependencies: fsevents: 2.3.3 vitest@3.2.4: dependencies: - '@types/chai': 5.2.3 + '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 '@vitest/mocker': 3.2.4(vite@7.2.2) '@vitest/pretty-format': 3.2.4 @@ -5045,15 +4989,15 @@ snapshots: '@vitest/spy': 3.2.4 '@vitest/utils': 3.2.4 chai: 5.3.3 - debug: 4.4.3 + debug: 4.4.1 expect-type: 1.2.2 - magic-string: 0.30.21 + magic-string: 0.30.18 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.10.0 + std-env: 3.9.0 tinybench: 2.9.0 tinyexec: 0.3.2 - tinyglobby: 0.2.15 + tinyglobby: 0.2.14 tinypool: 1.1.1 tinyrainbow: 2.0.0 vite: 7.2.2 @@ -5104,7 +5048,7 @@ snapshots: is-async-function: 2.1.1 is-date-object: 1.1.0 is-finalizationregistry: 1.1.1 - is-generator-function: 1.1.2 + is-generator-function: 1.1.0 is-regex: 1.2.1 is-weakref: 1.1.1 isarray: 2.0.5 @@ -5148,15 +5092,15 @@ snapshots: wrap-ansi@8.1.0: dependencies: - ansi-styles: 6.2.3 + ansi-styles: 6.2.1 string-width: 5.1.2 - strip-ansi: 7.1.2 + strip-ansi: 7.1.0 wrappy@1.0.2: {} xml2js@0.5.0: dependencies: - sax: 1.4.3 + sax: 1.4.1 xmlbuilder: 11.0.1 xmlbuilder@11.0.1: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..77ab8aa --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +overrides: + vite@>=7.1.0 <=7.1.10: ">=7.1.11" + vite@>=7.1.0 <=7.1.4: ">=7.1.5"