From bcb68a867a67debd91fc4aa2182ceb28ff532cea Mon Sep 17 00:00:00 2001 From: lucperkins <1523104+lucperkins@users.noreply.github.com> Date: Fri, 12 Sep 2025 12:39:23 +0000 Subject: [PATCH] Update `detsys-ts` for: `Merge pull request #109 from DeterminateSystems/tsup-to-tsdown` (`285768c0d657f9709cb689893f12895c36923093`) --- dist/index.js | 4812 +++++++++++++++++++++++------------------------- pnpm-lock.yaml | 452 ++--- 2 files changed, 2566 insertions(+), 2698 deletions(-) diff --git a/dist/index.js b/dist/index.js index 4ac9a72..457f3fb 100644 --- a/dist/index.js +++ b/dist/index.js @@ -523,7 +523,7 @@ exports.CacheService = exports.GetCacheEntryDownloadURLResponse = exports.GetCac // @generated by protobuf-ts 2.9.1 with parameter long_type_string,client_none,generate_dependencies // @generated from protobuf file "results/api/v1/cache.proto" (package "github.actions.results.api.v1", syntax proto3) // tslint:disable -const runtime_rpc_1 = __nccwpck_require__(42229); +const runtime_rpc_1 = __nccwpck_require__(64610); const runtime_1 = __nccwpck_require__(66765); const runtime_2 = __nccwpck_require__(66765); const runtime_3 = __nccwpck_require__(66765); @@ -7820,7 +7820,7 @@ exports.DuplexStreamingCall = DuplexStreamingCall; /***/ }), -/***/ 42229: +/***/ 64610: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -9302,7 +9302,7 @@ exports.BinaryReader = BinaryReader; /***/ }), -/***/ 15573: +/***/ 37954: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -9945,7 +9945,7 @@ var binary_reader_1 = __nccwpck_require__(68386); Object.defineProperty(exports, "BinaryReader", ({ enumerable: true, get: function () { return binary_reader_1.BinaryReader; } })); Object.defineProperty(exports, "binaryReadOptions", ({ enumerable: true, get: function () { return binary_reader_1.binaryReadOptions; } })); // Standard IBinaryWriter implementation -var binary_writer_1 = __nccwpck_require__(15573); +var binary_writer_1 = __nccwpck_require__(37954); Object.defineProperty(exports, "BinaryWriter", ({ enumerable: true, get: function () { return binary_writer_1.BinaryWriter; } })); Object.defineProperty(exports, "binaryWriteOptions", ({ enumerable: true, get: function () { return binary_writer_1.binaryWriteOptions; } })); // Int64 and UInt64 implementations required for the binary format @@ -10171,7 +10171,7 @@ const reflection_merge_partial_1 = __nccwpck_require__(81713); const json_typings_1 = __nccwpck_require__(11978); const json_format_contract_1 = __nccwpck_require__(57738); const reflection_equals_1 = __nccwpck_require__(29808); -const binary_writer_1 = __nccwpck_require__(15573); +const binary_writer_1 = __nccwpck_require__(37954); const binary_reader_1 = __nccwpck_require__(68386); const baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})); const messageTypeDescriptor = baseDescriptors[message_type_contract_1.MESSAGE_TYPE] = {}; @@ -44522,7 +44522,7 @@ Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function /***/ }), -/***/ 28678: +/***/ 25647: /***/ ((__unused_webpack_module, exports) => { @@ -44535,6 +44535,7 @@ exports.AzureKeyCredential = void 0; * the underlying key value. */ class AzureKeyCredential { + _key; /** * The value of the key to be used in authentication */ @@ -44570,7 +44571,7 @@ exports.AzureKeyCredential = AzureKeyCredential; /***/ }), -/***/ 23711: +/***/ 42492: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44579,12 +44580,14 @@ exports.AzureKeyCredential = AzureKeyCredential; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AzureNamedKeyCredential = void 0; exports.isNamedKeyCredential = isNamedKeyCredential; -const core_util_1 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); /** * 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. */ @@ -44643,7 +44646,7 @@ function isNamedKeyCredential(credential) { /***/ }), -/***/ 60560: +/***/ 29517: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44652,12 +44655,13 @@ function isNamedKeyCredential(credential) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AzureSASCredential = void 0; exports.isSASCredential = isSASCredential; -const core_util_1 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); /** * 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 */ @@ -44704,29 +44708,29 @@ function isSASCredential(credential) { /***/ }), -/***/ 46113: +/***/ 10734: /***/ ((__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__(28678); +var azureKeyCredential_js_1 = __nccwpck_require__(25647); Object.defineProperty(exports, "AzureKeyCredential", ({ enumerable: true, get: function () { return azureKeyCredential_js_1.AzureKeyCredential; } })); -var keyCredential_js_1 = __nccwpck_require__(72515); +var keyCredential_js_1 = __nccwpck_require__(16480); Object.defineProperty(exports, "isKeyCredential", ({ enumerable: true, get: function () { return keyCredential_js_1.isKeyCredential; } })); -var azureNamedKeyCredential_js_1 = __nccwpck_require__(23711); +var azureNamedKeyCredential_js_1 = __nccwpck_require__(42492); 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__(60560); +var azureSASCredential_js_1 = __nccwpck_require__(29517); 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__(2545); +var tokenCredential_js_1 = __nccwpck_require__(81574); Object.defineProperty(exports, "isTokenCredential", ({ enumerable: true, get: function () { return tokenCredential_js_1.isTokenCredential; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 72515: +/***/ 16480: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44734,7 +44738,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__(91276); +const core_util_1 = __nccwpck_require__(60643); /** * Tests an object to determine whether it implements KeyCredential. * @@ -44747,7 +44751,7 @@ function isKeyCredential(credential) { /***/ }), -/***/ 2545: +/***/ 81574: /***/ ((__unused_webpack_module, exports) => { @@ -44793,7 +44797,7 @@ function isTokenCredential(credential) { /***/ }), -/***/ 90247: +/***/ 5022: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -44802,8 +44806,8 @@ function isTokenCredential(credential) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.parseCAEChallenge = parseCAEChallenge; exports.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; -const log_js_1 = __nccwpck_require__(64341); -const base64_js_1 = __nccwpck_require__(36732); +const log_js_1 = __nccwpck_require__(54006); +const base64_js_1 = __nccwpck_require__(15465); /** * Converts: `Bearer a="b", c="d", Bearer d="e", f="g"`. * Into: `[ { a: 'b', c: 'd' }, { d: 'e', f: 'g' } ]`. @@ -44816,7 +44820,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) => (Object.assign(Object.assign({}, a), b)), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } /** @@ -44849,7 +44853,6 @@ 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"); @@ -44869,14 +44872,14 @@ async function authorizeRequestOnClaimChallenge(onChallengeOptions) { if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } //# sourceMappingURL=authorizeRequestOnClaimChallenge.js.map /***/ }), -/***/ 62785: +/***/ 64890: /***/ ((__unused_webpack_module, exports) => { @@ -44908,7 +44911,6 @@ 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) { @@ -44918,11 +44920,14 @@ const authorizeRequestOnTenantChallenge = async (challengeOptions) => { if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId, + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -44982,7 +44987,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) => (Object.assign(Object.assign({}, a), b)), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } /** * Extracts the options form a Pipeline Request for later re-use @@ -45000,7 +45005,7 @@ function requestToOptions(request) { /***/ }), -/***/ 36732: +/***/ 15465: /***/ ((__unused_webpack_module, exports) => { @@ -45048,7 +45053,7 @@ function decodeStringToString(value) { /***/ }), -/***/ 76268: +/***/ 59515: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45057,10 +45062,10 @@ function decodeStringToString(value) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.deserializationPolicyName = void 0; exports.deserializationPolicy = deserializationPolicy; -const interfaces_js_1 = __nccwpck_require__(38839); -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const serializer_js_1 = __nccwpck_require__(25019); -const operationHelpers_js_1 = __nccwpck_require__(93609); +const interfaces_js_1 = __nccwpck_require__(5150); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const serializer_js_1 = __nccwpck_require__(54414); +const operationHelpers_js_1 = __nccwpck_require__(75108); const defaultJsonContentTypes = ["application/json", "text/json"]; const defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; /** @@ -45071,16 +45076,15 @@ exports.deserializationPolicyName = "deserializationPolicy"; * This policy handles parsing out responses according to OperationSpecs on the request. */ function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY, + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, }, }; return { @@ -45095,13 +45099,13 @@ function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -45109,7 +45113,7 @@ function getOperationResponseMap(parsedResponse) { function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === undefined) { result = true; @@ -45128,7 +45132,7 @@ async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, respon return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -45179,7 +45183,6 @@ 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 @@ -45194,8 +45197,8 @@ function handleErrorResponse(parsedResponse, operationSpec, responseSpec, option return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error = new core_rest_pipeline_1.RestError(initialErrorMessage, { @@ -45207,11 +45210,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 && - !(((_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))) { + !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error; } - const defaultBodyMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = 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 @@ -45250,8 +45253,7 @@ function handleErrorResponse(parsedResponse, operationSpec, responseSpec, option return { error, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; @@ -45291,7 +45293,7 @@ async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, /***/ }), -/***/ 33368: +/***/ 59855: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45299,7 +45301,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__(54786); +const core_rest_pipeline_1 = __nccwpck_require__(64839); let cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -45311,7 +45313,7 @@ function getCachedDefaultHttpClient() { /***/ }), -/***/ 9235: +/***/ 32588: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45319,31 +45321,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__(25019); +var serializer_js_1 = __nccwpck_require__(54414); 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__(37435); +var serviceClient_js_1 = __nccwpck_require__(63572); Object.defineProperty(exports, "ServiceClient", ({ enumerable: true, get: function () { return serviceClient_js_1.ServiceClient; } })); -var pipeline_js_1 = __nccwpck_require__(13225); +var pipeline_js_1 = __nccwpck_require__(44324); Object.defineProperty(exports, "createClientPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createClientPipeline; } })); -var interfaces_js_1 = __nccwpck_require__(38839); +var interfaces_js_1 = __nccwpck_require__(5150); 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__(76268); +var deserializationPolicy_js_1 = __nccwpck_require__(59515); 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__(65873); +var serializationPolicy_js_1 = __nccwpck_require__(98054); 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__(90247); +var authorizeRequestOnClaimChallenge_js_1 = __nccwpck_require__(5022); Object.defineProperty(exports, "authorizeRequestOnClaimChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnClaimChallenge_js_1.authorizeRequestOnClaimChallenge; } })); -var authorizeRequestOnTenantChallenge_js_1 = __nccwpck_require__(62785); +var authorizeRequestOnTenantChallenge_js_1 = __nccwpck_require__(64890); Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnTenantChallenge_js_1.authorizeRequestOnTenantChallenge; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 58739: +/***/ 6350: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45352,7 +45354,7 @@ Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", ({ enumerabl Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; exports.getPathStringFromParameter = getPathStringFromParameter; -const serializer_js_1 = __nccwpck_require__(25019); +const serializer_js_1 = __nccwpck_require__(54414); /** * Gets the list of status codes for streaming responses. * @internal @@ -45392,7 +45394,7 @@ function getPathStringFromParameter(parameter) { /***/ }), -/***/ 38839: +/***/ 5150: /***/ ((__unused_webpack_module, exports) => { @@ -45412,7 +45414,7 @@ exports.XML_CHARKEY = "_"; /***/ }), -/***/ 64341: +/***/ 54006: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45426,7 +45428,7 @@ exports.logger = (0, logger_1.createClientLogger)("core-client"); /***/ }), -/***/ 93609: +/***/ 75108: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45435,7 +45437,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__(48166); +const state_js_1 = __nccwpck_require__(86925); /** * @internal * Retrieves the value to use for a given operation argument @@ -45530,7 +45532,7 @@ function getOperationRequestInfo(request) { /***/ }), -/***/ 13225: +/***/ 44324: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45538,9 +45540,9 @@ function getOperationRequestInfo(request) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createClientPipeline = createClientPipeline; -const deserializationPolicy_js_1 = __nccwpck_require__(76268); -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const serializationPolicy_js_1 = __nccwpck_require__(65873); +const deserializationPolicy_js_1 = __nccwpck_require__(59515); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const serializationPolicy_js_1 = __nccwpck_require__(98054); /** * Creates a new Pipeline for use with a Service Client. * Adds in deserializationPolicy by default. @@ -45548,7 +45550,7 @@ const serializationPolicy_js_1 = __nccwpck_require__(65873); * @param options - Options to customize the created pipeline. */ function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -45565,7 +45567,7 @@ function createClientPipeline(options = {}) { /***/ }), -/***/ 65873: +/***/ 98054: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45576,10 +45578,10 @@ exports.serializationPolicyName = void 0; exports.serializationPolicy = serializationPolicy; exports.serializeHeaders = serializeHeaders; exports.serializeRequestBody = serializeRequestBody; -const interfaces_js_1 = __nccwpck_require__(38839); -const operationHelpers_js_1 = __nccwpck_require__(93609); -const serializer_js_1 = __nccwpck_require__(25019); -const interfaceHelpers_js_1 = __nccwpck_require__(58739); +const interfaces_js_1 = __nccwpck_require__(5150); +const operationHelpers_js_1 = __nccwpck_require__(75108); +const serializer_js_1 = __nccwpck_require__(54414); +const interfaceHelpers_js_1 = __nccwpck_require__(6350); /** * The programmatic identifier of the serializationPolicy. */ @@ -45594,8 +45596,8 @@ function serializationPolicy(options = {}) { name: exports.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -45608,7 +45610,6 @@ 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); @@ -45627,7 +45628,7 @@ function serializeHeaders(request, operationArguments, operationSpec) { } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); @@ -45640,13 +45641,12 @@ function serializeHeaders(request, operationArguments, operationSpec) { function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function () { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY, + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, }, }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -45676,7 +45676,7 @@ function serializeRequestBody(request, operationArguments, operationSpec, string } } else if (typeName === serializer_js_1.MapperTypeNames.String && - (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { // the String serializer has validated that request body is a string // so just send the string. return; @@ -45730,7 +45730,7 @@ function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { /***/ }), -/***/ 25019: +/***/ 54414: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -45740,10 +45740,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MapperTypeNames = void 0; exports.createSerializer = createSerializer; const tslib_1 = __nccwpck_require__(31577); -const base64 = tslib_1.__importStar(__nccwpck_require__(36732)); -const interfaces_js_1 = __nccwpck_require__(38839); -const utils_js_1 = __nccwpck_require__(40398); +const base64 = tslib_1.__importStar(__nccwpck_require__(15465)); +const interfaces_js_1 = __nccwpck_require__(5150); +const utils_js_1 = __nccwpck_require__(18757); class SerializerImpl { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -45810,12 +45812,11 @@ class SerializerImpl { * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY, + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, }, }; let payload = {}; @@ -45897,14 +45898,13 @@ class SerializerImpl { * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY, + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false, + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false, }; if (responseBody === undefined || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -46170,7 +46170,6 @@ 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.`); } @@ -46183,7 +46182,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 = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -46193,7 +46192,7 @@ function serializeSequenceType(serializer, mapper, object, objectName, isXml, op ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { @@ -46242,7 +46241,7 @@ function resolveAdditionalProperties(serializer, mapper, objectName) { const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -46271,7 +46270,7 @@ function resolveModelProperties(serializer, mapper, objectName) { if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the ` + `mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); @@ -46319,7 +46318,10 @@ function serializeCompositeType(serializer, mapper, object, objectName, isXml, o const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace, + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName @@ -46377,7 +46379,7 @@ function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { return serializedValue; } else { - const result = Object.assign({}, serializedValue); + const result = { ...serializedValue }; result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result; } @@ -46391,8 +46393,7 @@ function isSpecialXmlProperty(propertyName, options) { return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -46451,7 +46452,7 @@ function deserializeCompositeType(serializer, mapper, responseBody, objectName, xmlName is "Cors" and xmlElementName is"CorsRule". */ const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } @@ -46559,7 +46560,6 @@ 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 ` + @@ -46574,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 = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -46607,7 +46607,6 @@ 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]; @@ -46617,7 +46616,7 @@ function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyNam discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -46663,7 +46662,7 @@ exports.MapperTypeNames = { /***/ }), -/***/ 37435: +/***/ 63572: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -46671,33 +46670,54 @@ exports.MapperTypeNames = { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ServiceClient = void 0; -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const pipeline_js_1 = __nccwpck_require__(13225); -const utils_js_1 = __nccwpck_require__(40398); -const httpClientCache_js_1 = __nccwpck_require__(33368); -const operationHelpers_js_1 = __nccwpck_require__(93609); -const urlHelpers_js_1 = __nccwpck_require__(52825); -const interfaceHelpers_js_1 = __nccwpck_require__(58739); -const log_js_1 = __nccwpck_require__(64341); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const pipeline_js_1 = __nccwpck_require__(44324); +const utils_js_1 = __nccwpck_require__(18757); +const httpClientCache_js_1 = __nccwpck_require__(59855); +const operationHelpers_js_1 = __nccwpck_require__(75108); +const urlHelpers_js_1 = __nccwpck_require__(93292); +const interfaceHelpers_js_1 = __nccwpck_require__(6350); +const log_js_1 = __nccwpck_require__(54006); /** * 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 = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { // Sign happens after Retry and is commonly needed to occur // before policies that intercept post-retry. @@ -46776,17 +46796,17 @@ class ServiceClient { try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error) { - if (typeof error === "object" && (error === null || error === void 0 ? void 0 : error.response)) { + if (typeof error === "object" && 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 === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error); } } @@ -46800,7 +46820,10 @@ function createDefaultPipeline(options) { const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : undefined; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions, + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -46821,7 +46844,7 @@ function getCredentialScopes(options) { /***/ }), -/***/ 48166: +/***/ 86925: /***/ ((__unused_webpack_module, exports) => { @@ -46839,7 +46862,7 @@ exports.state = { /***/ }), -/***/ 52825: +/***/ 93292: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -46848,8 +46871,8 @@ exports.state = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRequestUrl = getRequestUrl; exports.appendQueryParams = appendQueryParams; -const operationHelpers_js_1 = __nccwpck_require__(93609); -const interfaceHelpers_js_1 = __nccwpck_require__(58739); +const operationHelpers_js_1 = __nccwpck_require__(75108); +const interfaceHelpers_js_1 = __nccwpck_require__(6350); const CollectionFormatToDelimiterMap = { CSV: ",", SSV: " ", @@ -46898,9 +46921,8 @@ function replaceAll(input, replacements) { return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -46944,10 +46966,9 @@ function appendPath(url, pathToAppend) { return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = new Map(); const sequenceParams = new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -47084,7 +47105,7 @@ function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false /***/ }), -/***/ 40398: +/***/ 18757: /***/ ((__unused_webpack_module, exports) => { @@ -47107,7 +47128,7 @@ function isPrimitiveBody(value, mapperTypeName) { (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || - (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== + mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === undefined || value === null)); @@ -47144,14 +47165,21 @@ function isValidUuid(uuid) { * @internal */ function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body, + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { return responseObject.shouldWrapBody - ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + ? { + ...responseObject.headers, + body: responseObject.body, + } + : combinedHeadersAndBody; } } /** @@ -47163,29 +47191,35 @@ 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 Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody, + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; /** If the body is asked for, we look at the expected body type to handle it */ if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody, + }; } const modelProperties = (expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties) || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -47211,7 +47245,7 @@ function flattenResponse(fullResponse, responseSpec) { /***/ }), -/***/ 47828: +/***/ 46495: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -47219,22 +47253,21 @@ 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__(87215); -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const core_client_1 = __nccwpck_require__(9235); -const response_js_1 = __nccwpck_require__(37209); +const disableKeepAlivePolicy_js_1 = __nccwpck_require__(79030); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const core_client_1 = __nccwpck_require__(32588); +const response_js_1 = __nccwpck_require__(40158); /** * Client to provide compatability between core V1 & V2. */ class ExtendedServiceClient extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName, }); @@ -47248,8 +47281,7 @@ class ExtendedServiceClient extends core_client_1.ServiceClient { * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error) { lastResponse = rawResponse; @@ -47257,7 +47289,10 @@ class ExtendedServiceClient extends core_client_1.ServiceClient { userProvidedCallBack(rawResponse, flatResponse, error); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse, + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -47272,7 +47307,7 @@ exports.ExtendedServiceClient = ExtendedServiceClient; /***/ }), -/***/ 1582: +/***/ 61519: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -47280,8 +47315,8 @@ exports.ExtendedServiceClient = ExtendedServiceClient; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.convertHttpClient = convertHttpClient; -const response_js_1 = __nccwpck_require__(37209); -const util_js_1 = __nccwpck_require__(24970); +const response_js_1 = __nccwpck_require__(40158); +const util_js_1 = __nccwpck_require__(57777); /** * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient. * @param requestPolicyClient - A HttpClient compatible with core-http @@ -47299,7 +47334,7 @@ function convertHttpClient(requestPolicyClient) { /***/ }), -/***/ 62464: +/***/ 37385: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -47312,23 +47347,23 @@ exports.toHttpHeadersLike = exports.convertHttpClient = exports.disableKeepAlive * * @packageDocumentation */ -var extendedClient_js_1 = __nccwpck_require__(47828); +var extendedClient_js_1 = __nccwpck_require__(46495); Object.defineProperty(exports, "ExtendedServiceClient", ({ enumerable: true, get: function () { return extendedClient_js_1.ExtendedServiceClient; } })); -var requestPolicyFactoryPolicy_js_1 = __nccwpck_require__(83533); +var requestPolicyFactoryPolicy_js_1 = __nccwpck_require__(43179); 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__(87215); +var disableKeepAlivePolicy_js_1 = __nccwpck_require__(79030); Object.defineProperty(exports, "disableKeepAlivePolicyName", ({ enumerable: true, get: function () { return disableKeepAlivePolicy_js_1.disableKeepAlivePolicyName; } })); -var httpClientAdapter_js_1 = __nccwpck_require__(1582); +var httpClientAdapter_js_1 = __nccwpck_require__(61519); Object.defineProperty(exports, "convertHttpClient", ({ enumerable: true, get: function () { return httpClientAdapter_js_1.convertHttpClient; } })); -var util_js_1 = __nccwpck_require__(24970); +var util_js_1 = __nccwpck_require__(57777); Object.defineProperty(exports, "toHttpHeadersLike", ({ enumerable: true, get: function () { return util_js_1.toHttpHeadersLike; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 87215: +/***/ 79030: /***/ ((__unused_webpack_module, exports) => { @@ -47358,7 +47393,7 @@ function pipelineContainsDisableKeepAlivePolicy(pipeline) { /***/ }), -/***/ 83533: +/***/ 43179: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -47367,8 +47402,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__(24970); -const response_js_1 = __nccwpck_require__(37209); +const util_js_1 = __nccwpck_require__(57777); +const response_js_1 = __nccwpck_require__(40158); /** * An enum for compatibility with RequestPolicy */ @@ -47419,7 +47454,7 @@ function createRequestPolicyFactoryPolicy(factories) { /***/ }), -/***/ 37209: +/***/ 40158: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -47428,8 +47463,8 @@ function createRequestPolicyFactoryPolicy(factories) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toCompatResponse = toCompatResponse; exports.toPipelineResponse = toPipelineResponse; -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const util_js_1 = __nccwpck_require__(24970); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const util_js_1 = __nccwpck_require__(57777); const originalResponse = Symbol("Original FullOperationResponse"); /** * A helper to convert response objects from the new pipeline back to the old one. @@ -47439,7 +47474,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 === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -47465,8 +47500,11 @@ function toCompatResponse(response, options) { }); } else { - return Object.assign(Object.assign({}, response), { request, - headers }); + return { + ...response, + request, + headers, + }; } } /** @@ -47482,14 +47520,18 @@ function toPipelineResponse(compatResponse) { return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request), + }; } } //# sourceMappingURL=response.js.map /***/ }), -/***/ 24970: +/***/ 57777: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -47500,7 +47542,7 @@ exports.HttpHeaders = void 0; exports.toPipelineRequest = toPipelineRequest; exports.toWebResourceLike = toWebResourceLike; exports.toHttpHeadersLike = toHttpHeadersLike; -const core_rest_pipeline_1 = __nccwpck_require__(54786); +const core_rest_pipeline_1 = __nccwpck_require__(64839); // 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"); @@ -47544,8 +47586,7 @@ function toPipelineRequest(webResource, options = {}) { } } function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -47573,7 +47614,7 @@ function toWebResourceLike(request, options) { /** do nothing */ }, }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -47639,6 +47680,7 @@ function getHeaderKey(headerName) { * A collection of HTTP header key/value pairs. */ class HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -48942,7 +48984,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.buildCreatePoller = void 0; const operation_js_1 = __nccwpck_require__(90804); const constants_js_1 = __nccwpck_require__(52216); -const core_util_1 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); const createStateProxy = () => ({ /** * The state at this point is created to be of type OperationState. @@ -49112,7 +49154,7 @@ exports.buildCreatePoller = buildCreatePoller; /***/ }), -/***/ 19: +/***/ 11210: /***/ ((__unused_webpack_module, exports) => { @@ -49120,13 +49162,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.0"; +exports.SDK_VERSION = "1.22.1"; exports.DEFAULT_RETRY_POLICY_COUNT = 3; //# sourceMappingURL=constants.js.map /***/ }), -/***/ 10582: +/***/ 94603: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49134,27 +49176,26 @@ 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__(84557); -const pipeline_js_1 = __nccwpck_require__(75310); -const redirectPolicy_js_1 = __nccwpck_require__(83871); -const userAgentPolicy_js_1 = __nccwpck_require__(49335); -const multipartPolicy_js_1 = __nccwpck_require__(43879); -const decompressResponsePolicy_js_1 = __nccwpck_require__(16791); -const defaultRetryPolicy_js_1 = __nccwpck_require__(60962); -const formDataPolicy_js_1 = __nccwpck_require__(91201); -const core_util_1 = __nccwpck_require__(91276); -const proxyPolicy_js_1 = __nccwpck_require__(59847); -const setClientRequestIdPolicy_js_1 = __nccwpck_require__(81150); -const agentPolicy_js_1 = __nccwpck_require__(53138); -const tlsPolicy_js_1 = __nccwpck_require__(53230); -const tracingPolicy_js_1 = __nccwpck_require__(25373); -const wrapAbortSignalLikePolicy_js_1 = __nccwpck_require__(15922); +const logPolicy_js_1 = __nccwpck_require__(39614); +const pipeline_js_1 = __nccwpck_require__(16365); +const redirectPolicy_js_1 = __nccwpck_require__(16798); +const userAgentPolicy_js_1 = __nccwpck_require__(69072); +const multipartPolicy_js_1 = __nccwpck_require__(79608); +const decompressResponsePolicy_js_1 = __nccwpck_require__(73758); +const defaultRetryPolicy_js_1 = __nccwpck_require__(88135); +const formDataPolicy_js_1 = __nccwpck_require__(66160); +const core_util_1 = __nccwpck_require__(60643); +const proxyPolicy_js_1 = __nccwpck_require__(16236); +const setClientRequestIdPolicy_js_1 = __nccwpck_require__(34275); +const agentPolicy_js_1 = __nccwpck_require__(2845); +const tlsPolicy_js_1 = __nccwpck_require__(34741); +const tracingPolicy_js_1 = __nccwpck_require__(30558); +const wrapAbortSignalLikePolicy_js_1 = __nccwpck_require__(25801); /** * 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) { @@ -49169,13 +49210,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)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.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)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry", }); if (core_util_1.isNodeLike) { @@ -49190,7 +49231,7 @@ function createPipelineFromOptions(options) { /***/ }), -/***/ 46896: +/***/ 45445: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49198,8 +49239,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__(67810); -const wrapAbortSignal_js_1 = __nccwpck_require__(79049); +const ts_http_runtime_1 = __nccwpck_require__(54855); +const wrapAbortSignal_js_1 = __nccwpck_require__(47694); /** * Create the correct HttpClient for the current environment. */ @@ -49218,7 +49259,7 @@ function createDefaultHttpClient() { return await client.sendRequest(request); } finally { - cleanup === null || cleanup === void 0 ? void 0 : cleanup(); + cleanup?.(); } }, }; @@ -49227,7 +49268,7 @@ function createDefaultHttpClient() { /***/ }), -/***/ 18536: +/***/ 65257: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49235,7 +49276,7 @@ function createDefaultHttpClient() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createHttpHeaders = createHttpHeaders; -const ts_http_runtime_1 = __nccwpck_require__(67810); +const ts_http_runtime_1 = __nccwpck_require__(54855); /** * Creates an object that satisfies the `HttpHeaders` interface. * @param rawHeaders - A simple object representing initial headers @@ -49247,7 +49288,7 @@ function createHttpHeaders(rawHeaders) { /***/ }), -/***/ 54786: +/***/ 64839: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49255,83 +49296,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__(75310); +var pipeline_js_1 = __nccwpck_require__(16365); Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); -var createPipelineFromOptions_js_1 = __nccwpck_require__(10582); +var createPipelineFromOptions_js_1 = __nccwpck_require__(94603); Object.defineProperty(exports, "createPipelineFromOptions", ({ enumerable: true, get: function () { return createPipelineFromOptions_js_1.createPipelineFromOptions; } })); -var defaultHttpClient_js_1 = __nccwpck_require__(46896); +var defaultHttpClient_js_1 = __nccwpck_require__(45445); Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); -var httpHeaders_js_1 = __nccwpck_require__(18536); +var httpHeaders_js_1 = __nccwpck_require__(65257); Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); -var pipelineRequest_js_1 = __nccwpck_require__(22181); +var pipelineRequest_js_1 = __nccwpck_require__(89372); Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); -var restError_js_1 = __nccwpck_require__(15186); +var restError_js_1 = __nccwpck_require__(69867); 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__(16791); +var decompressResponsePolicy_js_1 = __nccwpck_require__(73758); 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__(72332); +var exponentialRetryPolicy_js_1 = __nccwpck_require__(85985); 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__(81150); +var setClientRequestIdPolicy_js_1 = __nccwpck_require__(34275); 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__(84557); +var logPolicy_js_1 = __nccwpck_require__(39614); 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__(43879); +var multipartPolicy_js_1 = __nccwpck_require__(79608); 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__(59847); +var proxyPolicy_js_1 = __nccwpck_require__(16236); 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__(83871); +var redirectPolicy_js_1 = __nccwpck_require__(16798); 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__(41374); +var systemErrorRetryPolicy_js_1 = __nccwpck_require__(67655); 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__(6444); +var throttlingRetryPolicy_js_1 = __nccwpck_require__(63663); 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__(16269); +var retryPolicy_js_1 = __nccwpck_require__(22526); Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); -var tracingPolicy_js_1 = __nccwpck_require__(25373); +var tracingPolicy_js_1 = __nccwpck_require__(30558); 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__(60962); +var defaultRetryPolicy_js_1 = __nccwpck_require__(88135); Object.defineProperty(exports, "defaultRetryPolicy", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicy; } })); -var userAgentPolicy_js_1 = __nccwpck_require__(49335); +var userAgentPolicy_js_1 = __nccwpck_require__(69072); 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__(53230); +var tlsPolicy_js_1 = __nccwpck_require__(34741); 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__(91201); +var formDataPolicy_js_1 = __nccwpck_require__(66160); 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__(13733); +var bearerTokenAuthenticationPolicy_js_1 = __nccwpck_require__(95782); 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__(90227); +var ndJsonPolicy_js_1 = __nccwpck_require__(99866); 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__(41566); +var auxiliaryAuthenticationHeaderPolicy_js_1 = __nccwpck_require__(12861); 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__(53138); +var agentPolicy_js_1 = __nccwpck_require__(2845); 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__(99273); +var file_js_1 = __nccwpck_require__(13168); 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 /***/ }), -/***/ 43016: +/***/ 51449: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49345,7 +49386,7 @@ exports.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); /***/ }), -/***/ 75310: +/***/ 16365: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49353,7 +49394,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__(67810); +const ts_http_runtime_1 = __nccwpck_require__(54855); /** * Creates a totally empty pipeline. * Useful for testing or creating a custom one. @@ -49365,7 +49406,7 @@ function createEmptyPipeline() { /***/ }), -/***/ 22181: +/***/ 89372: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49373,7 +49414,7 @@ function createEmptyPipeline() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createPipelineRequest = createPipelineRequest; -const ts_http_runtime_1 = __nccwpck_require__(67810); +const ts_http_runtime_1 = __nccwpck_require__(54855); /** * Creates a new pipeline request with the given options. * This method is to allow for the easy setting of default values and not required. @@ -49389,7 +49430,7 @@ function createPipelineRequest(options) { /***/ }), -/***/ 53138: +/***/ 2845: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49398,7 +49439,7 @@ function createPipelineRequest(options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.agentPolicyName = void 0; exports.agentPolicy = agentPolicy; -const policies_1 = __nccwpck_require__(25068); +const policies_1 = __nccwpck_require__(37717); /** * Name of the Agent Policy */ @@ -49413,7 +49454,7 @@ function agentPolicy(agent) { /***/ }), -/***/ 41566: +/***/ 12861: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49422,21 +49463,20 @@ function agentPolicy(agent) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.auxiliaryAuthenticationHeaderPolicyName = void 0; exports.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; -const tokenCycler_js_1 = __nccwpck_require__(59130); -const log_js_1 = __nccwpck_require__(43016); +const tokenCycler_js_1 = __nccwpck_require__(86389); +const log_js_1 = __nccwpck_require__(51449); /** * 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 (_b = (_a = (await getAccessToken(scopes, getTokenOptions))) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } /** * A policy for external tokens to `x-ms-authorization-auxiliary` header. @@ -49486,7 +49526,7 @@ function auxiliaryAuthenticationHeaderPolicy(options) { /***/ }), -/***/ 13733: +/***/ 95782: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49496,9 +49536,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.bearerTokenAuthenticationPolicyName = void 0; exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; exports.parseChallenges = parseChallenges; -const tokenCycler_js_1 = __nccwpck_require__(59130); -const log_js_1 = __nccwpck_require__(43016); -const restError_js_1 = __nccwpck_require__(15186); +const tokenCycler_js_1 = __nccwpck_require__(86389); +const log_js_1 = __nccwpck_require__(51449); +const restError_js_1 = __nccwpck_require__(69867); /** * The programmatic identifier of the bearerTokenAuthenticationPolicy. */ @@ -49554,7 +49594,6 @@ 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, @@ -49563,7 +49602,7 @@ async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } /** @@ -49571,12 +49610,11 @@ 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: (_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), + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.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. @@ -49723,19 +49761,18 @@ function parseChallenges(challenges) { * @internal */ function getCaeChallengeClaims(challenges) { - var _a; if (!challenges) { return; } // Find all challenges present in the header const parsedChallenges = parseChallenges(challenges); - return (_a = parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")) === null || _a === void 0 ? void 0 : _a.params.claims; + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; } //# sourceMappingURL=bearerTokenAuthenticationPolicy.js.map /***/ }), -/***/ 16791: +/***/ 73758: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49744,7 +49781,7 @@ function getCaeChallengeClaims(challenges) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.decompressResponsePolicyName = void 0; exports.decompressResponsePolicy = decompressResponsePolicy; -const policies_1 = __nccwpck_require__(25068); +const policies_1 = __nccwpck_require__(37717); /** * The programmatic identifier of the decompressResponsePolicy. */ @@ -49760,7 +49797,7 @@ function decompressResponsePolicy() { /***/ }), -/***/ 60962: +/***/ 88135: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49769,7 +49806,7 @@ function decompressResponsePolicy() { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultRetryPolicyName = void 0; exports.defaultRetryPolicy = defaultRetryPolicy; -const policies_1 = __nccwpck_require__(25068); +const policies_1 = __nccwpck_require__(37717); /** * Name of the {@link defaultRetryPolicy} */ @@ -49787,7 +49824,7 @@ function defaultRetryPolicy(options = {}) { /***/ }), -/***/ 72332: +/***/ 85985: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49796,7 +49833,7 @@ function defaultRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.exponentialRetryPolicyName = void 0; exports.exponentialRetryPolicy = exponentialRetryPolicy; -const policies_1 = __nccwpck_require__(25068); +const policies_1 = __nccwpck_require__(37717); /** * The programmatic identifier of the exponentialRetryPolicy. */ @@ -49812,7 +49849,7 @@ function exponentialRetryPolicy(options = {}) { /***/ }), -/***/ 91201: +/***/ 66160: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49821,7 +49858,7 @@ function exponentialRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.formDataPolicyName = void 0; exports.formDataPolicy = formDataPolicy; -const policies_1 = __nccwpck_require__(25068); +const policies_1 = __nccwpck_require__(37717); /** * The programmatic identifier of the formDataPolicy. */ @@ -49836,7 +49873,7 @@ function formDataPolicy() { /***/ }), -/***/ 84557: +/***/ 39614: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49845,8 +49882,8 @@ function formDataPolicy() { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.logPolicyName = void 0; exports.logPolicy = logPolicy; -const log_js_1 = __nccwpck_require__(43016); -const policies_1 = __nccwpck_require__(25068); +const log_js_1 = __nccwpck_require__(51449); +const policies_1 = __nccwpck_require__(37717); /** * The programmatic identifier of the logPolicy. */ @@ -49856,13 +49893,16 @@ exports.logPolicyName = policies_1.logPolicyName; * @param options - Options to configure logPolicy. */ function logPolicy(options = {}) { - return (0, policies_1.logPolicy)(Object.assign({ logger: log_js_1.logger.info }, options)); + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options, + }); } //# sourceMappingURL=logPolicy.js.map /***/ }), -/***/ 43879: +/***/ 79608: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49871,8 +49911,8 @@ function logPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.multipartPolicyName = void 0; exports.multipartPolicy = multipartPolicy; -const policies_1 = __nccwpck_require__(25068); -const file_js_1 = __nccwpck_require__(99273); +const policies_1 = __nccwpck_require__(37717); +const file_js_1 = __nccwpck_require__(13168); /** * Name of multipart policy */ @@ -49900,7 +49940,7 @@ function multipartPolicy() { /***/ }), -/***/ 90227: +/***/ 99866: /***/ ((__unused_webpack_module, exports) => { @@ -49935,7 +49975,7 @@ function ndJsonPolicy() { /***/ }), -/***/ 59847: +/***/ 16236: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49945,7 +49985,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.proxyPolicyName = void 0; exports.getDefaultProxySettings = getDefaultProxySettings; exports.proxyPolicy = proxyPolicy; -const policies_1 = __nccwpck_require__(25068); +const policies_1 = __nccwpck_require__(37717); /** * The programmatic identifier of the proxyPolicy. */ @@ -49974,7 +50014,7 @@ function proxyPolicy(proxySettings, options) { /***/ }), -/***/ 83871: +/***/ 16798: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49983,7 +50023,7 @@ function proxyPolicy(proxySettings, options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.redirectPolicyName = void 0; exports.redirectPolicy = redirectPolicy; -const policies_1 = __nccwpck_require__(25068); +const policies_1 = __nccwpck_require__(37717); /** * The programmatic identifier of the redirectPolicy. */ @@ -50001,7 +50041,7 @@ function redirectPolicy(options = {}) { /***/ }), -/***/ 16269: +/***/ 22526: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50010,8 +50050,8 @@ function redirectPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.retryPolicy = retryPolicy; const logger_1 = __nccwpck_require__(42549); -const constants_js_1 = __nccwpck_require__(19); -const policies_1 = __nccwpck_require__(25068); +const constants_js_1 = __nccwpck_require__(11210); +const policies_1 = __nccwpck_require__(37717); const retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); /** * retryPolicy is a generic policy to enable retrying requests when certain conditions are met @@ -50020,13 +50060,16 @@ 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, Object.assign({ logger: retryPolicyLogger }, options)); + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options, + }); } //# sourceMappingURL=retryPolicy.js.map /***/ }), -/***/ 81150: +/***/ 34275: /***/ ((__unused_webpack_module, exports) => { @@ -50060,7 +50103,7 @@ function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id" /***/ }), -/***/ 41374: +/***/ 67655: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50069,7 +50112,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__(25068); +const policies_1 = __nccwpck_require__(37717); /** * Name of the {@link systemErrorRetryPolicy} */ @@ -50087,7 +50130,7 @@ function systemErrorRetryPolicy(options = {}) { /***/ }), -/***/ 6444: +/***/ 63663: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50096,7 +50139,7 @@ function systemErrorRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.throttlingRetryPolicyName = void 0; exports.throttlingRetryPolicy = throttlingRetryPolicy; -const policies_1 = __nccwpck_require__(25068); +const policies_1 = __nccwpck_require__(37717); /** * Name of the {@link throttlingRetryPolicy} */ @@ -50118,7 +50161,7 @@ function throttlingRetryPolicy(options = {}) { /***/ }), -/***/ 53230: +/***/ 34741: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50127,7 +50170,7 @@ function throttlingRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.tlsPolicyName = void 0; exports.tlsPolicy = tlsPolicy; -const policies_1 = __nccwpck_require__(25068); +const policies_1 = __nccwpck_require__(37717); /** * Name of the TLS Policy */ @@ -50142,7 +50185,7 @@ function tlsPolicy(tlsSettings) { /***/ }), -/***/ 25373: +/***/ 30558: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50151,13 +50194,13 @@ function tlsPolicy(tlsSettings) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.tracingPolicyName = void 0; exports.tracingPolicy = tracingPolicy; -const core_tracing_1 = __nccwpck_require__(92245); -const constants_js_1 = __nccwpck_require__(19); -const userAgent_js_1 = __nccwpck_require__(21127); -const log_js_1 = __nccwpck_require__(43016); -const core_util_1 = __nccwpck_require__(91276); -const restError_js_1 = __nccwpck_require__(15186); -const util_1 = __nccwpck_require__(37954); +const core_tracing_1 = __nccwpck_require__(78168); +const constants_js_1 = __nccwpck_require__(11210); +const userAgent_js_1 = __nccwpck_require__(52476); +const log_js_1 = __nccwpck_require__(51449); +const core_util_1 = __nccwpck_require__(60643); +const restError_js_1 = __nccwpck_require__(69867); +const util_1 = __nccwpck_require__(56759); /** * The programmatic identifier of the tracingPolicy. */ @@ -50177,7 +50220,6 @@ function tracingPolicy(options = {}) { return { name: exports.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -50191,7 +50233,7 @@ function tracingPolicy(options = {}) { if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -50284,7 +50326,7 @@ function tryProcessResponse(span, response) { /***/ }), -/***/ 49335: +/***/ 69072: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50293,7 +50335,7 @@ function tryProcessResponse(span, response) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.userAgentPolicyName = void 0; exports.userAgentPolicy = userAgentPolicy; -const userAgent_js_1 = __nccwpck_require__(21127); +const userAgent_js_1 = __nccwpck_require__(52476); const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); /** * The programmatic identifier of the userAgentPolicy. @@ -50320,7 +50362,7 @@ function userAgentPolicy(options = {}) { /***/ }), -/***/ 15922: +/***/ 25801: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50329,7 +50371,7 @@ function userAgentPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.wrapAbortSignalLikePolicyName = void 0; exports.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; -const wrapAbortSignal_js_1 = __nccwpck_require__(79049); +const wrapAbortSignal_js_1 = __nccwpck_require__(47694); exports.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; /** * Policy that ensure that any AbortSignalLike is wrapped in a native AbortSignal for processing by the pipeline. @@ -50351,7 +50393,7 @@ function wrapAbortSignalLikePolicy() { return await next(request); } finally { - cleanup === null || cleanup === void 0 ? void 0 : cleanup(); + cleanup?.(); } }, }; @@ -50360,7 +50402,7 @@ function wrapAbortSignalLikePolicy() { /***/ }), -/***/ 15186: +/***/ 69867: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50369,7 +50411,7 @@ function wrapAbortSignalLikePolicy() { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RestError = void 0; exports.isRestError = isRestError; -const ts_http_runtime_1 = __nccwpck_require__(67810); +const ts_http_runtime_1 = __nccwpck_require__(54855); /** * A custom error type for failed pipeline requests. */ @@ -50386,7 +50428,7 @@ function isRestError(e) { /***/ }), -/***/ 99273: +/***/ 13168: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50397,7 +50439,7 @@ exports.hasRawContent = hasRawContent; exports.getRawContent = getRawContent; exports.createFileFromStream = createFileFromStream; exports.createFile = createFile; -const core_util_1 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); function isNodeReadableStream(x) { return Boolean(x && typeof x["pipe"] === "function"); } @@ -50469,14 +50511,22 @@ function getRawContent(blob) { * @param options - optional metadata about the file, e.g. file name, file size, MIME type. */ function createFileFromStream(stream, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? new Date().getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { const s = stream(); if (isNodeReadableStream(s)) { throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); } return s; - }, [rawContent]: stream }); + }, + [rawContent]: stream, + }; } /** * Create an object that implements the File interface. This object is intended to be @@ -50490,9 +50540,18 @@ 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 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 }); + 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([content]).stream(), + [rawContent]: () => content, + }; } else { return new File([content], name, options); @@ -50502,7 +50561,7 @@ function createFile(content, name, options = {}) { /***/ }), -/***/ 59130: +/***/ 86389: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50511,7 +50570,7 @@ function createFile(content, name, options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DEFAULT_CYCLER_OPTIONS = void 0; exports.createTokenCycler = createTokenCycler; -const core_util_1 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); // 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 @@ -50536,7 +50595,7 @@ async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { try { return await getAccessToken(); } - catch (_a) { + catch { return null; } } @@ -50574,7 +50633,10 @@ function createTokenCycler(credential, tokenCyclerOptions) { let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions, + }; /** * This little holder defines several predicates that we use to construct * the rules of refreshing the token. @@ -50591,14 +50653,13 @@ function createTokenCycler(credential, tokenCyclerOptions) { * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -50613,7 +50674,6 @@ 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); @@ -50621,7 +50681,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 - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now()) + token?.expiresOnTimestamp ?? Date.now()) .then((_token) => { refreshWorker = null; token = _token; @@ -50674,7 +50734,7 @@ function createTokenCycler(credential, tokenCyclerOptions) { /***/ }), -/***/ 21127: +/***/ 52476: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50683,8 +50743,8 @@ function createTokenCycler(credential, tokenCyclerOptions) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getUserAgentHeaderName = getUserAgentHeaderName; exports.getUserAgentValue = getUserAgentValue; -const userAgentPlatform_js_1 = __nccwpck_require__(98672); -const constants_js_1 = __nccwpck_require__(19); +const userAgentPlatform_js_1 = __nccwpck_require__(11351); +const constants_js_1 = __nccwpck_require__(11210); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { @@ -50714,7 +50774,7 @@ async function getUserAgentValue(prefix) { /***/ }), -/***/ 98672: +/***/ 11351: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50724,8 +50784,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getHeaderName = getHeaderName; exports.setPlatformSpecificData = setPlatformSpecificData; const tslib_1 = __nccwpck_require__(31577); -const os = tslib_1.__importStar(__nccwpck_require__(48161)); -const process = tslib_1.__importStar(__nccwpck_require__(1708)); +const node_os_1 = tslib_1.__importDefault(__nccwpck_require__(48161)); +const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(1708)); /** * @internal */ @@ -50736,8 +50796,8 @@ function getHeaderName() { * @internal */ async function setPlatformSpecificData(map) { - if (process && process.versions) { - const versions = process.versions; + if (node_process_1.default && node_process_1.default.versions) { + const versions = node_process_1.default.versions; if (versions.bun) { map.set("Bun", versions.bun); } @@ -50748,13 +50808,13 @@ async function setPlatformSpecificData(map) { map.set("Node", versions.node); } } - map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); + map.set("OS", `(${node_os_1.default.arch()}-${node_os_1.default.type()}-${node_os_1.default.release()})`); } //# sourceMappingURL=userAgentPlatform.js.map /***/ }), -/***/ 79049: +/***/ 47694: /***/ ((__unused_webpack_module, exports) => { @@ -50794,7 +50854,7 @@ function wrapAbortSignalLike(abortSignalLike) { /***/ }), -/***/ 92245: +/***/ 78168: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50802,15 +50862,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__(84939); +var instrumenter_js_1 = __nccwpck_require__(93068); Object.defineProperty(exports, "useInstrumenter", ({ enumerable: true, get: function () { return instrumenter_js_1.useInstrumenter; } })); -var tracingClient_js_1 = __nccwpck_require__(63960); +var tracingClient_js_1 = __nccwpck_require__(44509); Object.defineProperty(exports, "createTracingClient", ({ enumerable: true, get: function () { return tracingClient_js_1.createTracingClient; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 84939: +/***/ 93068: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50821,8 +50881,8 @@ exports.createDefaultTracingSpan = createDefaultTracingSpan; exports.createDefaultInstrumenter = createDefaultInstrumenter; exports.useInstrumenter = useInstrumenter; exports.getInstrumenter = getInstrumenter; -const tracingContext_js_1 = __nccwpck_require__(57428); -const state_js_1 = __nccwpck_require__(19016); +const tracingContext_js_1 = __nccwpck_require__(51047); +const state_js_1 = __nccwpck_require__(55145); function createDefaultTracingSpan() { return { end: () => { @@ -50885,7 +50945,7 @@ function getInstrumenter() { /***/ }), -/***/ 19016: +/***/ 55145: /***/ ((__unused_webpack_module, exports) => { @@ -50905,7 +50965,7 @@ exports.state = { /***/ }), -/***/ 63960: +/***/ 44509: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -50913,8 +50973,8 @@ exports.state = { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createTracingClient = createTracingClient; -const instrumenter_js_1 = __nccwpck_require__(84939); -const tracingContext_js_1 = __nccwpck_require__(57428); +const instrumenter_js_1 = __nccwpck_require__(93068); +const tracingContext_js_1 = __nccwpck_require__(51047); /** * Creates a new tracing client. * @@ -50924,8 +50984,12 @@ const tracingContext_js_1 = __nccwpck_require__(57428); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName: packageName, packageVersion: packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName: packageName, + packageVersion: packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext, + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -50933,7 +50997,7 @@ function createTracingClient(options) { } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }), + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext }, }); return { span, @@ -50988,7 +51052,7 @@ function createTracingClient(options) { /***/ }), -/***/ 57428: +/***/ 51047: /***/ ((__unused_webpack_module, exports) => { @@ -51021,6 +51085,7 @@ function createTracingContext(options = {}) { } /** @internal */ class TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof TracingContextImpl @@ -51046,7 +51111,7 @@ exports.TracingContextImpl = TracingContextImpl; /***/ }), -/***/ 64904: +/***/ 67145: /***/ ((__unused_webpack_module, exports) => { @@ -51058,25 +51123,24 @@ 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(); } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); + options?.abortSignal?.addEventListener("abort", abortHandler); try { return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); } finally { aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); + options?.abortSignal?.removeEventListener("abort", abortHandler); } } //# sourceMappingURL=aborterUtils.js.map /***/ }), -/***/ 28677: +/***/ 53784: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -51092,20 +51156,20 @@ const abort_controller_1 = __nccwpck_require__(764); * @returns A promise that can be aborted. */ function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; return new Promise((resolve, reject) => { function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); } function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); + abortSignal?.removeEventListener("abort", onAbort); } function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); + cleanupBeforeAbort?.(); removeListeners(); rejectOnAbort(); } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { + if (abortSignal?.aborted) { return rejectOnAbort(); } try { @@ -51120,14 +51184,14 @@ function createAbortablePromise(buildPromise, options) { catch (err) { reject(err); } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); + abortSignal?.addEventListener("abort", onAbort); }); } //# sourceMappingURL=createAbortablePromise.js.map /***/ }), -/***/ 50419: +/***/ 45164: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -51136,8 +51200,8 @@ function createAbortablePromise(buildPromise, options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.delay = delay; exports.calculateRetryDelay = calculateRetryDelay; -const createAbortablePromise_js_1 = __nccwpck_require__(28677); -const util_1 = __nccwpck_require__(37954); +const createAbortablePromise_js_1 = __nccwpck_require__(53784); +const util_1 = __nccwpck_require__(56759); const StandardAbortMessage = "The delay was aborted."; /** * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. @@ -51147,13 +51211,13 @@ const StandardAbortMessage = "The delay was aborted."; */ function delay(timeInMs, options) { let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; + const { abortSignal, abortErrorMsg } = options ?? {}; return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve) => { token = setTimeout(resolve, timeInMs); }, { cleanupBeforeAbort: () => clearTimeout(token), abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage, }); } /** @@ -51176,7 +51240,7 @@ function calculateRetryDelay(retryAttempt, config) { /***/ }), -/***/ 3030: +/***/ 23721: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -51184,7 +51248,7 @@ function calculateRetryDelay(retryAttempt, config) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getErrorMessage = getErrorMessage; -const util_1 = __nccwpck_require__(37954); +const util_1 = __nccwpck_require__(56759); /** * 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. @@ -51215,7 +51279,7 @@ function getErrorMessage(e) { /***/ }), -/***/ 91276: +/***/ 60643: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -51233,16 +51297,16 @@ exports.randomUUID = randomUUID; exports.uint8ArrayToString = uint8ArrayToString; exports.stringToUint8Array = stringToUint8Array; const tslib_1 = __nccwpck_require__(31577); -const tspRuntime = tslib_1.__importStar(__nccwpck_require__(37954)); -var aborterUtils_js_1 = __nccwpck_require__(64904); +const tspRuntime = tslib_1.__importStar(__nccwpck_require__(56759)); +var aborterUtils_js_1 = __nccwpck_require__(67145); Object.defineProperty(exports, "cancelablePromiseRace", ({ enumerable: true, get: function () { return aborterUtils_js_1.cancelablePromiseRace; } })); -var createAbortablePromise_js_1 = __nccwpck_require__(28677); +var createAbortablePromise_js_1 = __nccwpck_require__(53784); Object.defineProperty(exports, "createAbortablePromise", ({ enumerable: true, get: function () { return createAbortablePromise_js_1.createAbortablePromise; } })); -var delay_js_1 = __nccwpck_require__(50419); +var delay_js_1 = __nccwpck_require__(45164); Object.defineProperty(exports, "delay", ({ enumerable: true, get: function () { return delay_js_1.delay; } })); -var error_js_1 = __nccwpck_require__(3030); +var error_js_1 = __nccwpck_require__(23721); Object.defineProperty(exports, "getErrorMessage", ({ enumerable: true, get: function () { return error_js_1.getErrorMessage; } })); -var typeGuards_js_1 = __nccwpck_require__(34552); +var typeGuards_js_1 = __nccwpck_require__(73989); 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; } })); @@ -51372,7 +51436,7 @@ function stringToUint8Array(value, format) { /***/ }), -/***/ 34552: +/***/ 73989: /***/ ((__unused_webpack_module, exports) => { @@ -51539,7 +51603,7 @@ exports.AzureLogger = void 0; exports.setLogLevel = setLogLevel; exports.getLogLevel = getLogLevel; exports.createClientLogger = createClientLogger; -const logger_1 = __nccwpck_require__(5334); +const logger_1 = __nccwpck_require__(49647); const context = (0, logger_1.createLoggerContext)({ logLevelEnvVarName: "AZURE_LOG_LEVEL", namespace: "azure", @@ -51599,8 +51663,8 @@ 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__(54786); -const core_http_compat_1 = __nccwpck_require__(62464); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const core_http_compat_1 = __nccwpck_require__(37385); const constants_js_1 = __nccwpck_require__(48855); const BatchUtils_js_1 = __nccwpck_require__(9071); const log_js_1 = __nccwpck_require__(19150); @@ -51776,10 +51840,10 @@ function utf8ByteLength(str) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobBatch = void 0; -const core_util_1 = __nccwpck_require__(91276); -const core_auth_1 = __nccwpck_require__(46113); -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const core_util_2 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); +const core_auth_1 = __nccwpck_require__(10734); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const core_util_2 = __nccwpck_require__(60643); const AnonymousCredential_js_1 = __nccwpck_require__(77725); const Clients_js_1 = __nccwpck_require__(79656); const Mutex_js_1 = __nccwpck_require__(93269); @@ -51789,7 +51853,7 @@ const core_xml_1 = __nccwpck_require__(64993); const constants_js_1 = __nccwpck_require__(48855); const StorageSharedKeyCredential_js_1 = __nccwpck_require__(78403); const tracing_js_1 = __nccwpck_require__(9820); -const core_client_1 = __nccwpck_require__(9235); +const core_client_1 = __nccwpck_require__(32588); const StorageSharedKeyCredentialPolicyV2_js_1 = __nccwpck_require__(99283); /** * A BlobBatch represents an aggregated set of operations on blobs. @@ -52244,7 +52308,7 @@ 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__(91276); +const core_util_1 = __nccwpck_require__(60643); const RetriableReadableStream_js_1 = __nccwpck_require__(90424); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -52719,7 +52783,7 @@ exports.BlobDownloadResponse = BlobDownloadResponse; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobLeaseClient = void 0; -const core_util_1 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); const constants_js_1 = __nccwpck_require__(48855); const tracing_js_1 = __nccwpck_require__(9820); const utils_common_js_1 = __nccwpck_require__(46456); @@ -52930,7 +52994,7 @@ exports.BlobLeaseClient = BlobLeaseClient; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobQueryResponse = void 0; -const core_util_1 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); const BlobQuickQueryStream_js_1 = __nccwpck_require__(35942); /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -53307,9 +53371,9 @@ exports.BlobQueryResponse = BlobQueryResponse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobServiceClient = void 0; -const core_auth_1 = __nccwpck_require__(46113); -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const core_util_1 = __nccwpck_require__(91276); +const core_auth_1 = __nccwpck_require__(10734); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const core_util_1 = __nccwpck_require__(60643); const Pipeline_js_1 = __nccwpck_require__(24236); const ContainerClient_js_1 = __nccwpck_require__(11432); const utils_common_js_1 = __nccwpck_require__(46456); @@ -54022,10 +54086,10 @@ 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__(54786); -const core_auth_1 = __nccwpck_require__(46113); -const core_util_1 = __nccwpck_require__(91276); -const core_util_2 = __nccwpck_require__(91276); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const core_auth_1 = __nccwpck_require__(10734); +const core_util_1 = __nccwpck_require__(60643); +const core_util_2 = __nccwpck_require__(60643); const BlobDownloadResponse_js_1 = __nccwpck_require__(85602); const BlobQueryResponse_js_1 = __nccwpck_require__(24454); const AnonymousCredential_js_1 = __nccwpck_require__(77725); @@ -56877,9 +56941,9 @@ exports.PageBlobClient = PageBlobClient; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ContainerClient = void 0; -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const core_util_1 = __nccwpck_require__(91276); -const core_auth_1 = __nccwpck_require__(46113); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const core_util_1 = __nccwpck_require__(60643); +const core_auth_1 = __nccwpck_require__(10734); const AnonymousCredential_js_1 = __nccwpck_require__(77725); const StorageSharedKeyCredential_js_1 = __nccwpck_require__(78403); const Pipeline_js_1 = __nccwpck_require__(24236); @@ -58227,11 +58291,11 @@ exports.isPipelineLike = isPipelineLike; exports.newPipeline = newPipeline; exports.getCoreClientOptions = getCoreClientOptions; exports.getCredentialFromPipeline = getCredentialFromPipeline; -const core_http_compat_1 = __nccwpck_require__(62464); -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const core_client_1 = __nccwpck_require__(9235); +const core_http_compat_1 = __nccwpck_require__(37385); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const core_client_1 = __nccwpck_require__(32588); const core_xml_1 = __nccwpck_require__(64993); -const core_auth_1 = __nccwpck_require__(46113); +const core_auth_1 = __nccwpck_require__(10734); const log_js_1 = __nccwpck_require__(19150); const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(92075); const StorageSharedKeyCredential_js_1 = __nccwpck_require__(78403); @@ -69040,7 +69104,7 @@ exports.listType = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AppendBlobImpl = void 0; const tslib_1 = __nccwpck_require__(31577); -const coreClient = tslib_1.__importStar(__nccwpck_require__(9235)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(32588)); const Mappers = tslib_1.__importStar(__nccwpck_require__(52108)); const Parameters = tslib_1.__importStar(__nccwpck_require__(11236)); /** Class containing AppendBlob operations. */ @@ -69274,7 +69338,7 @@ const sealOperationSpec = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlobImpl = void 0; const tslib_1 = __nccwpck_require__(31577); -const coreClient = tslib_1.__importStar(__nccwpck_require__(9235)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(32588)); const Mappers = tslib_1.__importStar(__nccwpck_require__(52108)); const Parameters = tslib_1.__importStar(__nccwpck_require__(11236)); /** Class containing Blob operations. */ @@ -70307,7 +70371,7 @@ const setTagsOperationSpec = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BlockBlobImpl = void 0; const tslib_1 = __nccwpck_require__(31577); -const coreClient = tslib_1.__importStar(__nccwpck_require__(9235)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(32588)); const Mappers = tslib_1.__importStar(__nccwpck_require__(52108)); const Parameters = tslib_1.__importStar(__nccwpck_require__(11236)); /** Class containing BlockBlob operations. */ @@ -70686,7 +70750,7 @@ const getBlockListOperationSpec = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ContainerImpl = void 0; const tslib_1 = __nccwpck_require__(31577); -const coreClient = tslib_1.__importStar(__nccwpck_require__(9235)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(32588)); const Mappers = tslib_1.__importStar(__nccwpck_require__(52108)); const Parameters = tslib_1.__importStar(__nccwpck_require__(11236)); /** Class containing Container operations. */ @@ -71434,7 +71498,7 @@ tslib_1.__exportStar(__nccwpck_require__(32020), exports); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PageBlobImpl = void 0; const tslib_1 = __nccwpck_require__(31577); -const coreClient = tslib_1.__importStar(__nccwpck_require__(9235)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(32588)); const Mappers = tslib_1.__importStar(__nccwpck_require__(52108)); const Parameters = tslib_1.__importStar(__nccwpck_require__(11236)); /** Class containing PageBlob operations. */ @@ -71903,7 +71967,7 @@ const copyIncrementalOperationSpec = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ServiceImpl = void 0; const tslib_1 = __nccwpck_require__(31577); -const coreClient = tslib_1.__importStar(__nccwpck_require__(9235)); +const coreClient = tslib_1.__importStar(__nccwpck_require__(32588)); const Mappers = tslib_1.__importStar(__nccwpck_require__(52108)); const Parameters = tslib_1.__importStar(__nccwpck_require__(11236)); /** Class containing Service operations. */ @@ -72357,7 +72421,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageClient = void 0; const tslib_1 = __nccwpck_require__(31577); -const coreHttpCompat = tslib_1.__importStar(__nccwpck_require__(62464)); +const coreHttpCompat = tslib_1.__importStar(__nccwpck_require__(37385)); const index_js_1 = __nccwpck_require__(62594); class StorageClient extends coreHttpCompat.ExtendedServiceClient { url; @@ -72441,7 +72505,7 @@ 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__(31577); -const core_rest_pipeline_1 = __nccwpck_require__(54786); +const core_rest_pipeline_1 = __nccwpck_require__(64839); Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return core_rest_pipeline_1.RestError; } })); tslib_1.__exportStar(__nccwpck_require__(74177), exports); tslib_1.__exportStar(__nccwpck_require__(79656), exports); @@ -73392,7 +73456,7 @@ exports.BaseRequestPolicy = BaseRequestPolicy; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageBrowserPolicy = void 0; const RequestPolicy_js_1 = __nccwpck_require__(51916); -const core_util_1 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); const constants_js_1 = __nccwpck_require__(48855); const utils_common_js_1 = __nccwpck_require__(46456); /** @@ -73449,7 +73513,7 @@ exports.StorageBrowserPolicy = StorageBrowserPolicy; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageBrowserPolicyName = void 0; exports.storageBrowserPolicy = storageBrowserPolicy; -const core_util_1 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); const constants_js_1 = __nccwpck_require__(48855); const utils_common_js_1 = __nccwpck_require__(46456); /** @@ -73785,8 +73849,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageRetryPolicyName = void 0; exports.storageRetryPolicy = storageRetryPolicy; const abort_controller_1 = __nccwpck_require__(764); -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const core_util_1 = __nccwpck_require__(91276); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const core_util_1 = __nccwpck_require__(60643); const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(92075); const constants_js_1 = __nccwpck_require__(48855); const utils_common_js_1 = __nccwpck_require__(46456); @@ -74255,7 +74319,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__(91276); +const core_util_1 = __nccwpck_require__(60643); const core_lro_1 = __nccwpck_require__(22670); /** * This is the poller returned by {@link BlobClient.beginCopyFromURL}. @@ -77198,7 +77262,7 @@ exports.PathStylePorts = [ // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.tracingClient = void 0; -const core_tracing_1 = __nccwpck_require__(92245); +const core_tracing_1 = __nccwpck_require__(78168); const constants_js_1 = __nccwpck_require__(48855); /** * Creates a span using the global tracer. @@ -77256,8 +77320,8 @@ exports.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfLi exports.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; exports.EscapePath = EscapePath; exports.assertResponse = assertResponse; -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const core_util_1 = __nccwpck_require__(91276); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const core_util_1 = __nccwpck_require__(60643); const constants_js_1 = __nccwpck_require__(48855); /** * Reserved URL characters must be properly escaped for Storage services like Blob or File. @@ -78749,7 +78813,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__(54786); +const core_rest_pipeline_1 = __nccwpck_require__(64839); let _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { @@ -79060,7 +79124,7 @@ exports.BaseRequestPolicy = BaseRequestPolicy; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StorageBrowserPolicy = void 0; const RequestPolicy_js_1 = __nccwpck_require__(19024); -const core_util_1 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); const constants_js_1 = __nccwpck_require__(94795); const utils_common_js_1 = __nccwpck_require__(4100); /** @@ -79117,7 +79181,7 @@ exports.StorageBrowserPolicy = StorageBrowserPolicy; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageBrowserPolicyName = void 0; exports.storageBrowserPolicy = storageBrowserPolicy; -const core_util_1 = __nccwpck_require__(91276); +const core_util_1 = __nccwpck_require__(60643); const constants_js_1 = __nccwpck_require__(94795); const utils_common_js_1 = __nccwpck_require__(4100); /** @@ -79453,8 +79517,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.storageRetryPolicyName = void 0; exports.storageRetryPolicy = storageRetryPolicy; const abort_controller_1 = __nccwpck_require__(764); -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const core_util_1 = __nccwpck_require__(91276); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const core_util_1 = __nccwpck_require__(60643); const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(53519); const constants_js_1 = __nccwpck_require__(94795); const utils_common_js_1 = __nccwpck_require__(4100); @@ -80104,8 +80168,8 @@ exports.attachCredential = attachCredential; exports.httpAuthorizationToString = httpAuthorizationToString; exports.EscapePath = EscapePath; exports.assertResponse = assertResponse; -const core_rest_pipeline_1 = __nccwpck_require__(54786); -const core_util_1 = __nccwpck_require__(91276); +const core_rest_pipeline_1 = __nccwpck_require__(64839); +const core_util_1 = __nccwpck_require__(60643); const constants_js_1 = __nccwpck_require__(94795); /** * Reserved URL characters must be properly escaped for Storage services like Blob or File. @@ -82262,7 +82326,7 @@ module.exports = parseParams /***/ }), -/***/ 84260: +/***/ 61865: /***/ ((__unused_webpack_module, exports) => { @@ -82310,7 +82374,7 @@ exports.AbortError = AbortError; /***/ }), -/***/ 8007: +/***/ 97796: /***/ ((__unused_webpack_module, exports) => { @@ -82349,7 +82413,7 @@ function isApiKeyCredential(credential) { /***/ }), -/***/ 98517: +/***/ 926: /***/ ((__unused_webpack_module, exports) => { @@ -82360,7 +82424,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 32157: +/***/ 24558: /***/ ((__unused_webpack_module, exports) => { @@ -82371,7 +82435,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 28540: +/***/ 18261: /***/ ((__unused_webpack_module, exports) => { @@ -82404,7 +82468,7 @@ function apiVersionPolicy(options) { /***/ }), -/***/ 38052: +/***/ 51051: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82413,14 +82477,14 @@ function apiVersionPolicy(options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createDefaultPipeline = createDefaultPipeline; exports.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; -const defaultHttpClient_js_1 = __nccwpck_require__(41264); -const createPipelineFromOptions_js_1 = __nccwpck_require__(38358); -const apiVersionPolicy_js_1 = __nccwpck_require__(28540); -const credentials_js_1 = __nccwpck_require__(8007); -const apiKeyAuthenticationPolicy_js_1 = __nccwpck_require__(86987); -const basicAuthenticationPolicy_js_1 = __nccwpck_require__(6664); -const bearerAuthenticationPolicy_js_1 = __nccwpck_require__(66849); -const oauth2AuthenticationPolicy_js_1 = __nccwpck_require__(71143); +const defaultHttpClient_js_1 = __nccwpck_require__(51045); +const createPipelineFromOptions_js_1 = __nccwpck_require__(60459); +const apiVersionPolicy_js_1 = __nccwpck_require__(18261); +const credentials_js_1 = __nccwpck_require__(97796); +const apiKeyAuthenticationPolicy_js_1 = __nccwpck_require__(64668); +const basicAuthenticationPolicy_js_1 = __nccwpck_require__(42229); +const bearerAuthenticationPolicy_js_1 = __nccwpck_require__(89434); +const oauth2AuthenticationPolicy_js_1 = __nccwpck_require__(18912); let cachedHttpClient; /** * Creates a default rest pipeline to re-use accross Rest Level Clients @@ -82455,7 +82519,7 @@ function getCachedDefaultHttpsClient() { /***/ }), -/***/ 20587: +/***/ 42468: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82463,10 +82527,10 @@ function getCachedDefaultHttpsClient() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getClient = getClient; -const clientHelpers_js_1 = __nccwpck_require__(38052); -const sendRequest_js_1 = __nccwpck_require__(36451); -const urlHelpers_js_1 = __nccwpck_require__(12500); -const checkEnvironment_js_1 = __nccwpck_require__(98402); +const clientHelpers_js_1 = __nccwpck_require__(51051); +const sendRequest_js_1 = __nccwpck_require__(50796); +const urlHelpers_js_1 = __nccwpck_require__(98693); +const checkEnvironment_js_1 = __nccwpck_require__(31407); /** * Creates a client with a default pipeline * @param endpoint - Base endpoint for the client @@ -82474,9 +82538,8 @@ const checkEnvironment_js_1 = __nccwpck_require__(98402); * @param options - Client options */ function getClient(endpoint, clientOptions = {}) { - var _a, _b, _c; - const pipeline = (_a = clientOptions.pipeline) !== null && _a !== void 0 ? _a : (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); - if ((_b = clientOptions.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { for (const { policy, position } of clientOptions.additionalPolicies) { // Sign happens after Retry and is commonly needed to occur // before policies that intercept post-retry. @@ -82487,9 +82550,9 @@ function getClient(endpoint, clientOptions = {}) { } } const { allowInsecureConnection, httpClient } = clientOptions; - const endpointUrl = (_c = clientOptions.endpoint) !== null && _c !== void 0 ? _c : endpoint; + const endpointUrl = clientOptions.endpoint ?? endpoint; const client = (path, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path, args, Object.assign({ allowInsecureConnection }, requestOptions)); + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -82524,23 +82587,22 @@ function getClient(endpoint, clientOptions = {}) { }; } function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { - var _a; - allowInsecureConnection = (_a = options.allowInsecureConnection) !== null && _a !== void 0 ? _a : allowInsecureConnection; + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; return { then: function (onFulfilled, onrejected) { - return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection }), httpClient).then(onFulfilled, onrejected); + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); }, async asBrowserStream() { if (checkEnvironment_js_1.isNodeLike) { throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); } else { - return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection, responseAsStream: true }), httpClient); + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); } }, async asNodeStream() { if (checkEnvironment_js_1.isNodeLike) { - return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection, responseAsStream: true }), httpClient); + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); } else { throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); @@ -82552,7 +82614,7 @@ function buildOperation(method, url, pipeline, options, allowInsecureConnection, /***/ }), -/***/ 20140: +/***/ 73407: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82561,10 +82623,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__(79058); -const httpHeaders_js_1 = __nccwpck_require__(43688); -const bytesEncoding_js_1 = __nccwpck_require__(28917); -const typeGuards_js_1 = __nccwpck_require__(1093); +const restError_js_1 = __nccwpck_require__(45227); +const httpHeaders_js_1 = __nccwpck_require__(82345); +const bytesEncoding_js_1 = __nccwpck_require__(28482); +const typeGuards_js_1 = __nccwpck_require__(90932); /** * Get value of a header in the part descriptor ignoring case */ @@ -82612,7 +82674,6 @@ function escapeDispositionField(value) { return JSON.stringify(value); } function getContentDisposition(descriptor) { - var _a; const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); if (contentDispositionHeader) { return contentDispositionHeader; @@ -82622,7 +82683,7 @@ function getContentDisposition(descriptor) { descriptor.filename === undefined) { return undefined; } - const dispositionType = (_a = descriptor.dispositionType) !== null && _a !== void 0 ? _a : "form-data"; + const dispositionType = descriptor.dispositionType ?? "form-data"; let disposition = dispositionType; if (descriptor.name) { disposition += `; name=${escapeDispositionField(descriptor.name)}`; @@ -82661,10 +82722,9 @@ 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)((_a = descriptor.headers) !== null && _a !== void 0 ? _a : {}); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); if (contentType) { headers.set("content-type", contentType); } @@ -82684,7 +82744,7 @@ function buildMultipartBody(parts) { /***/ }), -/***/ 82831: +/***/ 85470: /***/ ((__unused_webpack_module, exports) => { @@ -82698,15 +82758,14 @@ 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: (_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, + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, abortSignal: options.abortSignal, - 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), + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, onResponse: options.onResponse, }; } @@ -82714,7 +82773,7 @@ function operationOptionsToRequestParameters(options) { /***/ }), -/***/ 26920: +/***/ 31835: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82722,28 +82781,26 @@ function operationOptionsToRequestParameters(options) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createRestError = createRestError; -const restError_js_1 = __nccwpck_require__(79058); -const httpHeaders_js_1 = __nccwpck_require__(43688); +const restError_js_1 = __nccwpck_require__(45227); +const httpHeaders_js_1 = __nccwpck_require__(82345); function createRestError(messageOrResponse, response) { - var _a, _b, _c; const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; - const internalError = (_b = (_a = resp.body) === null || _a === void 0 ? void 0 : _a.error) !== null && _b !== void 0 ? _b : resp.body; + const internalError = resp.body?.error ?? resp.body; const message = typeof messageOrResponse === "string" ? messageOrResponse - : ((_c = internalError === null || internalError === void 0 ? void 0 : internalError.message) !== null && _c !== void 0 ? _c : `Unexpected status code: ${resp.status}`); + : (internalError?.message ?? `Unexpected status code: ${resp.status}`); return new restError_js_1.RestError(message, { statusCode: statusCodeToNumber(resp.status), - code: internalError === null || internalError === void 0 ? void 0 : internalError.code, + code: internalError?.code, request: resp.request, response: toPipelineResponse(resp), }); } function toPipelineResponse(response) { - var _a; return { headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), request: response.request, - status: (_a = statusCodeToNumber(response.status)) !== null && _a !== void 0 ? _a : -1, + status: statusCodeToNumber(response.status) ?? -1, }; } function statusCodeToNumber(statusCode) { @@ -82754,7 +82811,7 @@ function statusCodeToNumber(statusCode) { /***/ }), -/***/ 36451: +/***/ 50796: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -82762,12 +82819,12 @@ function statusCodeToNumber(statusCode) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.sendRequest = sendRequest; -const restError_js_1 = __nccwpck_require__(79058); -const httpHeaders_js_1 = __nccwpck_require__(43688); -const pipelineRequest_js_1 = __nccwpck_require__(61605); -const clientHelpers_js_1 = __nccwpck_require__(38052); -const typeGuards_js_1 = __nccwpck_require__(1093); -const multipart_js_1 = __nccwpck_require__(20140); +const restError_js_1 = __nccwpck_require__(45227); +const httpHeaders_js_1 = __nccwpck_require__(82345); +const pipelineRequest_js_1 = __nccwpck_require__(93244); +const clientHelpers_js_1 = __nccwpck_require__(51051); +const typeGuards_js_1 = __nccwpck_require__(90932); +const multipart_js_1 = __nccwpck_require__(73407); /** * Helper function to send request used by the client * @param method - method to use to send the request @@ -82778,17 +82835,16 @@ const multipart_js_1 = __nccwpck_require__(20140); * @returns returns and HttpResponse */ async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { - var _a; - const httpClient = customHttpClient !== null && customHttpClient !== void 0 ? customHttpClient : (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); const request = buildPipelineRequest(method, url, options); try { const response = await pipeline.sendRequest(httpClient, request); const headers = response.headers.toJSON(); - const stream = (_a = response.readableStreamBody) !== null && _a !== void 0 ? _a : response.browserStreamBody; + const stream = response.readableStreamBody ?? response.browserStreamBody; const parsedBody = options.responseAsStream || stream !== undefined ? undefined : getResponseBody(response); - 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 })); + const body = stream ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); } return { request, @@ -82802,7 +82858,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 === null || options === void 0 ? void 0 : options.onResponse(Object.assign(Object.assign({}, response), { request, rawHeaders }), e); + options?.onResponse({ ...response, request, rawHeaders }, e); } throw e; } @@ -82813,8 +82869,9 @@ async function sendRequest(method, url, pipeline, options = {}, customHttpClient * @returns returns the content-type */ function getRequestContentType(options = {}) { - 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)); + return (options.contentType ?? + options.headers?.["content-type"] ?? + getContentType(options.body)); } /** * Function to determine the content-type of a body @@ -82840,14 +82897,17 @@ 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)(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, - }))); + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...(options.headers ? options.headers : {}), + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...(hasContent && + requestContentType && { + "content-type": requestContentType, + }), + }); return (0, pipelineRequest_js_1.createPipelineRequest)({ url, method, @@ -82903,11 +82963,10 @@ function getRequestBody(body, contentType = "") { * Prepares the response body */ function getResponseBody(response) { - var _a, _b; // Set the default response type - const contentType = (_a = response.headers.get("content-type")) !== null && _a !== void 0 ? _a : ""; + const contentType = response.headers.get("content-type") ?? ""; const firstType = contentType.split(";")[0]; - const bodyToParse = (_b = response.bodyAsText) !== null && _b !== void 0 ? _b : ""; + const bodyToParse = response.bodyAsText ?? ""; if (firstType === "text/plain") { return String(bodyToParse); } @@ -82927,9 +82986,8 @@ function getResponseBody(response) { } } function createParseError(response, err) { - var _a; const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; - const errCode = (_a = err.code) !== null && _a !== void 0 ? _a : restError_js_1.RestError.PARSE_ERROR; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; return new restError_js_1.RestError(msg, { code: errCode, statusCode: response.status, @@ -82941,7 +82999,7 @@ function createParseError(response, err) { /***/ }), -/***/ 12500: +/***/ 98693: /***/ ((__unused_webpack_module, exports) => { @@ -83014,7 +83072,6 @@ 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; } @@ -83028,18 +83085,18 @@ function appendQueryParams(url, options = {}) { } const hasMetadata = isQueryParameterWithOptions(param); const rawValue = hasMetadata ? param.value : param; - const explode = hasMetadata ? ((_a = param.explode) !== null && _a !== void 0 ? _a : false) : false; + const explode = hasMetadata ? (param.explode ?? false) : false; const style = hasMetadata && param.style ? param.style : "form"; if (explode) { if (Array.isArray(rawValue)) { for (const item of rawValue) { - paramStrings.push(getQueryParamValue(key, (_b = options.skipUrlEncoding) !== null && _b !== void 0 ? _b : false, style, item)); + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? 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, (_c = options.skipUrlEncoding) !== null && _c !== void 0 ? _c : false, style, value)); + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); } } else { @@ -83048,7 +83105,7 @@ function appendQueryParams(url, options = {}) { } } else { - paramStrings.push(getQueryParamValue(key, (_d = options.skipUrlEncoding) !== null && _d !== void 0 ? _d : false, style, rawValue)); + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); } } if (parsedUrl.search !== "") { @@ -83058,7 +83115,6 @@ function appendQueryParams(url, options = {}) { return parsedUrl.toString(); } function buildBaseUrl(endpoint, options) { - var _a; if (!options.pathParameters) { return endpoint; } @@ -83074,14 +83130,13 @@ function buildBaseUrl(endpoint, options) { if (!options.skipUrlEncoding) { value = encodeURIComponent(param); } - endpoint = (_a = replaceAll(endpoint, `{${key}}`, value)) !== null && _a !== void 0 ? _a : ""; + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; } return endpoint; } function buildRoutePath(routePath, pathParameters, options = {}) { - var _a; for (const pathParam of pathParameters) { - const allowReserved = typeof pathParam === "object" && ((_a = pathParam.allowReserved) !== null && _a !== void 0 ? _a : false); + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); let value = typeof pathParam === "object" ? pathParam.value : pathParam; if (!options.skipUrlEncoding && !allowReserved) { value = encodeURIComponent(value); @@ -83104,7 +83159,7 @@ function replaceAll(value, searchValue, replaceValue) { /***/ }), -/***/ 88819: +/***/ 4202: /***/ ((__unused_webpack_module, exports) => { @@ -83112,13 +83167,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.0"; +exports.SDK_VERSION = "0.3.1"; exports.DEFAULT_RETRY_POLICY_COUNT = 3; //# sourceMappingURL=constants.js.map /***/ }), -/***/ 38358: +/***/ 60459: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83126,18 +83181,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__(85613); -const pipeline_js_1 = __nccwpck_require__(53390); -const redirectPolicy_js_1 = __nccwpck_require__(56959); -const userAgentPolicy_js_1 = __nccwpck_require__(92375); -const decompressResponsePolicy_js_1 = __nccwpck_require__(29815); -const defaultRetryPolicy_js_1 = __nccwpck_require__(14786); -const formDataPolicy_js_1 = __nccwpck_require__(70337); -const checkEnvironment_js_1 = __nccwpck_require__(98402); -const proxyPolicy_js_1 = __nccwpck_require__(53511); -const agentPolicy_js_1 = __nccwpck_require__(51250); -const tlsPolicy_js_1 = __nccwpck_require__(55726); -const multipartPolicy_js_1 = __nccwpck_require__(75303); +const logPolicy_js_1 = __nccwpck_require__(65598); +const pipeline_js_1 = __nccwpck_require__(95405); +const redirectPolicy_js_1 = __nccwpck_require__(96318); +const userAgentPolicy_js_1 = __nccwpck_require__(22448); +const decompressResponsePolicy_js_1 = __nccwpck_require__(42878); +const defaultRetryPolicy_js_1 = __nccwpck_require__(50247); +const formDataPolicy_js_1 = __nccwpck_require__(51888); +const checkEnvironment_js_1 = __nccwpck_require__(31407); +const proxyPolicy_js_1 = __nccwpck_require__(33996); +const agentPolicy_js_1 = __nccwpck_require__(97789); +const tlsPolicy_js_1 = __nccwpck_require__(84949); +const multipartPolicy_js_1 = __nccwpck_require__(35384); /** * Create a new pipeline with a default set of customizable policies. * @param options - Options to configure a custom pipeline. @@ -83173,7 +83228,7 @@ function createPipelineFromOptions(options) { /***/ }), -/***/ 41264: +/***/ 51045: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83181,7 +83236,7 @@ function createPipelineFromOptions(options) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createDefaultHttpClient = createDefaultHttpClient; -const nodeHttpClient_js_1 = __nccwpck_require__(93003); +const nodeHttpClient_js_1 = __nccwpck_require__(77860); /** * Create the correct HttpClient for the current environment. */ @@ -83192,7 +83247,7 @@ function createDefaultHttpClient() { /***/ }), -/***/ 43688: +/***/ 82345: /***/ ((__unused_webpack_module, exports) => { @@ -83209,6 +83264,7 @@ function* headerIterator(map) { } } class HttpHeadersImpl { + _headersMap; constructor(rawHeaders) { this._headersMap = new Map(); if (rawHeaders) { @@ -83232,8 +83288,7 @@ class HttpHeadersImpl { * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -83290,7 +83345,7 @@ function createHttpHeaders(rawHeaders) { /***/ }), -/***/ 67810: +/***/ 54855: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83299,40 +83354,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__(31577); -var AbortError_js_1 = __nccwpck_require__(84260); +var AbortError_js_1 = __nccwpck_require__(61865); Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); -var logger_js_1 = __nccwpck_require__(34135); +var logger_js_1 = __nccwpck_require__(96342); 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__(43688); +var httpHeaders_js_1 = __nccwpck_require__(82345); Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); -tslib_1.__exportStar(__nccwpck_require__(32157), exports); -tslib_1.__exportStar(__nccwpck_require__(98517), exports); -var pipelineRequest_js_1 = __nccwpck_require__(61605); +tslib_1.__exportStar(__nccwpck_require__(24558), exports); +tslib_1.__exportStar(__nccwpck_require__(926), exports); +var pipelineRequest_js_1 = __nccwpck_require__(93244); Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); -var pipeline_js_1 = __nccwpck_require__(53390); +var pipeline_js_1 = __nccwpck_require__(95405); Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); -var restError_js_1 = __nccwpck_require__(79058); +var restError_js_1 = __nccwpck_require__(45227); 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__(28917); +var bytesEncoding_js_1 = __nccwpck_require__(28482); 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__(41264); +var defaultHttpClient_js_1 = __nccwpck_require__(51045); Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); -var getClient_js_1 = __nccwpck_require__(20587); +var getClient_js_1 = __nccwpck_require__(42468); Object.defineProperty(exports, "getClient", ({ enumerable: true, get: function () { return getClient_js_1.getClient; } })); -var operationOptionHelpers_js_1 = __nccwpck_require__(82831); +var operationOptionHelpers_js_1 = __nccwpck_require__(85470); Object.defineProperty(exports, "operationOptionsToRequestParameters", ({ enumerable: true, get: function () { return operationOptionHelpers_js_1.operationOptionsToRequestParameters; } })); -var restError_js_2 = __nccwpck_require__(26920); +var restError_js_2 = __nccwpck_require__(31835); Object.defineProperty(exports, "createRestError", ({ enumerable: true, get: function () { return restError_js_2.createRestError; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 76488: +/***/ 10009: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83340,20 +83395,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__(34135); +const logger_js_1 = __nccwpck_require__(96342); exports.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); //# sourceMappingURL=log.js.map /***/ }), -/***/ 91424: +/***/ 90087: /***/ ((__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__(60513); +const log_js_1 = __nccwpck_require__(65682); const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; let enabledString; let enabledNamespaces = []; @@ -83374,14 +83429,13 @@ function enable(namespaces) { enabledString = namespaces; enabledNamespaces = []; skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); for (const ns of namespaceList) { if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); + skippedNamespaces.push(ns.substring(1)); } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); + enabledNamespaces.push(ns); } } for (const instance of debuggers) { @@ -83393,17 +83447,110 @@ function enabled(namespace) { return true; } for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { + if (namespaceMatches(namespace, skipped)) { return false; } } for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { + if (namespaceMatches(namespace, enabledNamespace)) { 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(""); @@ -83447,7 +83594,7 @@ exports["default"] = debugObj; /***/ }), -/***/ 5334: +/***/ 49647: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83455,13 +83602,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__(34135); +var logger_js_1 = __nccwpck_require__(96342); Object.defineProperty(exports, "createLoggerContext", ({ enumerable: true, get: function () { return logger_js_1.createLoggerContext; } })); //# sourceMappingURL=internal.js.map /***/ }), -/***/ 60513: +/***/ 65682: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83472,15 +83619,15 @@ exports.log = log; const tslib_1 = __nccwpck_require__(31577); const node_os_1 = __nccwpck_require__(48161); const node_util_1 = tslib_1.__importDefault(__nccwpck_require__(57975)); -const process = tslib_1.__importStar(__nccwpck_require__(1708)); +const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(1708)); function log(message, ...args) { - process.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); } //# sourceMappingURL=log.js.map /***/ }), -/***/ 34135: +/***/ 96342: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83493,7 +83640,7 @@ exports.setLogLevel = setLogLevel; exports.getLogLevel = getLogLevel; exports.createClientLogger = createClientLogger; const tslib_1 = __nccwpck_require__(31577); -const debug_js_1 = tslib_1.__importDefault(__nccwpck_require__(91424)); +const debug_js_1 = tslib_1.__importDefault(__nccwpck_require__(90087)); const TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; const levelMap = { verbose: 400, @@ -83619,7 +83766,7 @@ function createClientLogger(namespace) { /***/ }), -/***/ 93003: +/***/ 77860: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -83629,15 +83776,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getBodyLength = getBodyLength; exports.createNodeHttpClient = createNodeHttpClient; const tslib_1 = __nccwpck_require__(31577); -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_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 node_stream_1 = __nccwpck_require__(57075); -const AbortError_js_1 = __nccwpck_require__(84260); -const httpHeaders_js_1 = __nccwpck_require__(43688); -const restError_js_1 = __nccwpck_require__(79058); -const log_js_1 = __nccwpck_require__(76488); -const sanitizer_js_1 = __nccwpck_require__(56620); +const AbortError_js_1 = __nccwpck_require__(61865); +const httpHeaders_js_1 = __nccwpck_require__(82345); +const restError_js_1 = __nccwpck_require__(45227); +const log_js_1 = __nccwpck_require__(10009); +const sanitizer_js_1 = __nccwpck_require__(83839); const DEFAULT_TLS_SETTINGS = {}; function isReadableStream(body) { return body && typeof body.pipe === "function"; @@ -83662,6 +83809,8 @@ 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); @@ -83676,7 +83825,6 @@ class ReportTransform extends node_stream_1.Transform { } constructor(progressCallback) { super(); - this.loadedBytes = 0; this.progressCallback = progressCallback; } } @@ -83685,15 +83833,13 @@ class ReportTransform extends node_stream_1.Transform { * @internal */ class NodeHttpClient { - constructor() { - this.cachedHttpsAgents = new WeakMap(); - } + cachedHttpAgent; + 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) { @@ -83716,7 +83862,7 @@ class NodeHttpClient { }, request.timeout); } const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); let body = typeof request.body === "function" ? request.body() : request.body; if (body && !request.headers.has("Content-Length")) { const bodyLength = getBodyLength(body); @@ -83745,7 +83891,7 @@ class NodeHttpClient { clearTimeout(timeoutId); } const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; + const status = res.statusCode ?? 0; const response = { status, headers, @@ -83771,8 +83917,8 @@ class NodeHttpClient { } if ( // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || - ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status))) { + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || + request.streamResponseStatusCodes?.has(response.status)) { response.readableStreamBody = responseStream; } else { @@ -83793,10 +83939,9 @@ class NodeHttpClient { } Promise.all([uploadStreamDone, downloadStreamDone]) .then(() => { - var _a; // eslint-disable-next-line promise/always-return if (abortListener) { - (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener("abort", abortListener); + request.abortSignal?.removeEventListener("abort", abortListener); } }) .catch((e) => { @@ -83806,19 +83951,25 @@ 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 = (_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); + const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides, + }; return new Promise((resolve, reject) => { - const req = isInsecure ? http.request(options, resolve) : https.request(options, resolve); + const req = isInsecure ? node_http_1.default.request(options, resolve) : node_https_1.default.request(options, resolve); req.once("error", (err) => { - 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 })); + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); }); abortController.signal.addEventListener("abort", () => { const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); @@ -83847,17 +83998,16 @@ 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 http.globalAgent; + return node_http_1.default.globalAgent; } if (!this.cachedHttpAgent) { // If there is no cached agent create a new one and cache it. - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); } return this.cachedHttpAgent; } @@ -83865,10 +84015,10 @@ class NodeHttpClient { if (disableKeepAlive && !request.tlsSettings) { // When there are no tlsSettings and keepAlive is false // we don't need a custom agent - return https.globalAgent; + return node_https_1.default.globalAgent; } // We use the tlsSettings to index cached clients - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; + const tlsSettings = request.tlsSettings ?? 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); @@ -83876,9 +84026,12 @@ class NodeHttpClient { return agent; } log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https.Agent(Object.assign({ + agent = new node_https_1.default.Agent({ // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive }, tlsSettings)); + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings, + }); this.cachedHttpsAgents.set(tlsSettings, agent); return agent; } @@ -83902,12 +84055,12 @@ function getResponseHeaders(res) { function getDecodedResponseStream(stream, headers) { const contentEncoding = headers.get("Content-Encoding"); if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); + const unzip = node_zlib_1.default.createGunzip(); stream.pipe(unzip); return unzip; } else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); + const inflate = node_zlib_1.default.createInflate(); stream.pipe(inflate); return inflate; } @@ -83928,7 +84081,7 @@ function streamToText(stream) { resolve(Buffer.concat(buffer).toString("utf8")); }); stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { + if (e && e?.name === "AbortError") { reject(e); } else { @@ -83971,7 +84124,7 @@ function createNodeHttpClient() { /***/ }), -/***/ 53390: +/***/ 95405: /***/ ((__unused_webpack_module, exports) => { @@ -83986,10 +84139,10 @@ const ValidPhaseNames = new Set(["Deserialize", "Serialize", "Retry", "Sign"]); * @internal */ class HttpPipeline { + _policies = []; + _orderedPolicies; constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; + this._policies = policies?.slice(0) ?? []; this._orderedPolicies = undefined; } addPolicy(policy, options = {}) { @@ -84242,7 +84395,7 @@ function createEmptyPipeline() { /***/ }), -/***/ 61605: +/***/ 93244: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84250,28 +84403,46 @@ function createEmptyPipeline() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createPipelineRequest = createPipelineRequest; -const httpHeaders_js_1 = __nccwpck_require__(43688); -const uuidUtils_js_1 = __nccwpck_require__(90955); +const httpHeaders_js_1 = __nccwpck_require__(82345); +const uuidUtils_js_1 = __nccwpck_require__(64052); 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 = (_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.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; this.multipartBody = options.multipartBody; this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; + this.disableKeepAlive = options.disableKeepAlive ?? false; this.proxySettings = options.proxySettings; this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; + this.withCredentials = options.withCredentials ?? false; this.abortSignal = options.abortSignal; this.onUploadProgress = options.onUploadProgress; this.onDownloadProgress = options.onDownloadProgress; this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; this.requestOverrides = options.requestOverrides; this.authSchemes = options.authSchemes; } @@ -84288,7 +84459,7 @@ function createPipelineRequest(options) { /***/ }), -/***/ 51250: +/***/ 97789: /***/ ((__unused_webpack_module, exports) => { @@ -84320,7 +84491,7 @@ function agentPolicy(agent) { /***/ }), -/***/ 86987: +/***/ 64668: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84329,7 +84500,7 @@ function agentPolicy(agent) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.apiKeyAuthenticationPolicyName = void 0; exports.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; -const checkInsecureConnection_js_1 = __nccwpck_require__(75626); +const checkInsecureConnection_js_1 = __nccwpck_require__(67027); /** * Name of the API Key Authentication Policy */ @@ -84341,10 +84512,9 @@ 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 = (_b = ((_a = request.authSchemes) !== null && _a !== void 0 ? _a : options.authSchemes)) === null || _b === void 0 ? void 0 : _b.find((x) => x.kind === "apiKey"); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); // Skip adding authentication header if no API key authentication scheme is found if (!scheme) { return next(request); @@ -84361,7 +84531,7 @@ function apiKeyAuthenticationPolicy(options) { /***/ }), -/***/ 6664: +/***/ 42229: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84370,8 +84540,8 @@ function apiKeyAuthenticationPolicy(options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.basicAuthenticationPolicyName = void 0; exports.basicAuthenticationPolicy = basicAuthenticationPolicy; -const bytesEncoding_js_1 = __nccwpck_require__(28917); -const checkInsecureConnection_js_1 = __nccwpck_require__(75626); +const bytesEncoding_js_1 = __nccwpck_require__(28482); +const checkInsecureConnection_js_1 = __nccwpck_require__(67027); /** * Name of the Basic Authentication Policy */ @@ -84383,10 +84553,9 @@ 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 = (_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"); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); // Skip adding authentication header if no basic authentication scheme is found if (!scheme) { return next(request); @@ -84402,7 +84571,7 @@ function basicAuthenticationPolicy(options) { /***/ }), -/***/ 66849: +/***/ 89434: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84411,7 +84580,7 @@ function basicAuthenticationPolicy(options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.bearerAuthenticationPolicyName = void 0; exports.bearerAuthenticationPolicy = bearerAuthenticationPolicy; -const checkInsecureConnection_js_1 = __nccwpck_require__(75626); +const checkInsecureConnection_js_1 = __nccwpck_require__(67027); /** * Name of the Bearer Authentication Policy */ @@ -84423,10 +84592,9 @@ 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 = (_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"); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); // Skip adding authentication header if no bearer authentication scheme is found if (!scheme) { return next(request); @@ -84443,7 +84611,7 @@ function bearerAuthenticationPolicy(options) { /***/ }), -/***/ 75626: +/***/ 67027: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84451,7 +84619,7 @@ function bearerAuthenticationPolicy(options) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ensureSecureConnection = ensureSecureConnection; -const log_js_1 = __nccwpck_require__(76488); +const log_js_1 = __nccwpck_require__(10009); // Ensure the warining is only emitted once let insecureConnectionWarningEmmitted = false; /** @@ -84479,7 +84647,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 === null || process === void 0 ? void 0 : process.emitWarning) === "function" && !insecureConnectionWarningEmmitted) { + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { insecureConnectionWarningEmmitted = true; process.emitWarning(warning); } @@ -84502,7 +84670,7 @@ function ensureSecureConnection(request, options) { /***/ }), -/***/ 71143: +/***/ 18912: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84511,7 +84679,7 @@ function ensureSecureConnection(request, options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.oauth2AuthenticationPolicyName = void 0; exports.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; -const checkInsecureConnection_js_1 = __nccwpck_require__(75626); +const checkInsecureConnection_js_1 = __nccwpck_require__(67027); /** * Name of the OAuth2 Authentication Policy */ @@ -84523,10 +84691,9 @@ 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 = (_b = ((_a = request.authSchemes) !== null && _a !== void 0 ? _a : options.authSchemes)) === null || _b === void 0 ? void 0 : _b.find((x) => x.kind === "oauth2"); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); // Skip adding authentication header if no OAuth2 authentication scheme is found if (!scheme) { return next(request); @@ -84543,7 +84710,7 @@ function oauth2AuthenticationPolicy(options) { /***/ }), -/***/ 29815: +/***/ 42878: /***/ ((__unused_webpack_module, exports) => { @@ -84576,7 +84743,7 @@ function decompressResponsePolicy() { /***/ }), -/***/ 14786: +/***/ 50247: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84585,10 +84752,10 @@ function decompressResponsePolicy() { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultRetryPolicyName = void 0; exports.defaultRetryPolicy = defaultRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(22714); -const throttlingRetryStrategy_js_1 = __nccwpck_require__(7524); -const retryPolicy_js_1 = __nccwpck_require__(67021); -const constants_js_1 = __nccwpck_require__(88819); +const exponentialRetryStrategy_js_1 = __nccwpck_require__(86269); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(60373); +const retryPolicy_js_1 = __nccwpck_require__(54878); +const constants_js_1 = __nccwpck_require__(4202); /** * Name of the {@link defaultRetryPolicy} */ @@ -84600,11 +84767,10 @@ 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: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, }).sendRequest, }; } @@ -84612,7 +84778,7 @@ function defaultRetryPolicy(options = {}) { /***/ }), -/***/ 28332: +/***/ 72449: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84621,9 +84787,9 @@ function defaultRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.exponentialRetryPolicyName = void 0; exports.exponentialRetryPolicy = exponentialRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(22714); -const retryPolicy_js_1 = __nccwpck_require__(67021); -const constants_js_1 = __nccwpck_require__(88819); +const exponentialRetryStrategy_js_1 = __nccwpck_require__(86269); +const retryPolicy_js_1 = __nccwpck_require__(54878); +const constants_js_1 = __nccwpck_require__(4202); /** * The programmatic identifier of the exponentialRetryPolicy. */ @@ -84633,18 +84799,20 @@ 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)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })), + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true, + }), ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, }); } //# sourceMappingURL=exponentialRetryPolicy.js.map /***/ }), -/***/ 70337: +/***/ 51888: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84653,18 +84821,17 @@ function exponentialRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.formDataPolicyName = void 0; exports.formDataPolicy = formDataPolicy; -const bytesEncoding_js_1 = __nccwpck_require__(28917); -const checkEnvironment_js_1 = __nccwpck_require__(98402); -const httpHeaders_js_1 = __nccwpck_require__(43688); +const bytesEncoding_js_1 = __nccwpck_require__(28482); +const checkEnvironment_js_1 = __nccwpck_require__(31407); +const httpHeaders_js_1 = __nccwpck_require__(82345); /** * The programmatic identifier of the formDataPolicy. */ exports.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : (formDataMap[key] = []); + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -84715,7 +84882,7 @@ async function prepareFormData(formData, request) { // content type is specified and is not multipart/form-data. Exit. return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); // set body to MultipartRequestBody using content from FormDataMap const parts = []; for (const [fieldName, values] of Object.entries(formData)) { @@ -84751,7 +84918,7 @@ async function prepareFormData(formData, request) { /***/ }), -/***/ 25068: +/***/ 37717: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84759,53 +84926,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__(51250); +var agentPolicy_js_1 = __nccwpck_require__(97789); 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__(29815); +var decompressResponsePolicy_js_1 = __nccwpck_require__(42878); 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__(14786); +var defaultRetryPolicy_js_1 = __nccwpck_require__(50247); 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__(28332); +var exponentialRetryPolicy_js_1 = __nccwpck_require__(72449); 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__(67021); +var retryPolicy_js_1 = __nccwpck_require__(54878); Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); -var systemErrorRetryPolicy_js_1 = __nccwpck_require__(79998); +var systemErrorRetryPolicy_js_1 = __nccwpck_require__(25767); 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__(48492); +var throttlingRetryPolicy_js_1 = __nccwpck_require__(90383); 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__(70337); +var formDataPolicy_js_1 = __nccwpck_require__(51888); 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__(85613); +var logPolicy_js_1 = __nccwpck_require__(65598); 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__(75303); +var multipartPolicy_js_1 = __nccwpck_require__(35384); 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__(53511); +var proxyPolicy_js_1 = __nccwpck_require__(33996); 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__(56959); +var redirectPolicy_js_1 = __nccwpck_require__(96318); 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__(55726); +var tlsPolicy_js_1 = __nccwpck_require__(84949); 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__(92375); +var userAgentPolicy_js_1 = __nccwpck_require__(22448); 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 /***/ }), -/***/ 85613: +/***/ 65598: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84814,8 +84981,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__(76488); -const sanitizer_js_1 = __nccwpck_require__(56620); +const log_js_1 = __nccwpck_require__(10009); +const sanitizer_js_1 = __nccwpck_require__(83839); /** * The programmatic identifier of the logPolicy. */ @@ -84825,8 +84992,7 @@ exports.logPolicyName = "logPolicy"; * @param options - Options to configure logPolicy. */ function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; + const logger = options.logger ?? log_js_1.logger.info; const sanitizer = new sanitizer_js_1.Sanitizer({ additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, @@ -84849,7 +85015,7 @@ function logPolicy(options = {}) { /***/ }), -/***/ 75303: +/***/ 35384: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84858,10 +85024,10 @@ function logPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.multipartPolicyName = void 0; exports.multipartPolicy = multipartPolicy; -const bytesEncoding_js_1 = __nccwpck_require__(28917); -const typeGuards_js_1 = __nccwpck_require__(1093); -const uuidUtils_js_1 = __nccwpck_require__(90955); -const concat_js_1 = __nccwpck_require__(93407); +const bytesEncoding_js_1 = __nccwpck_require__(28482); +const typeGuards_js_1 = __nccwpck_require__(90932); +const uuidUtils_js_1 = __nccwpck_require__(64052); +const concat_js_1 = __nccwpck_require__(75142); function generateBoundary() { return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; } @@ -84936,7 +85102,6 @@ function multipartPolicy() { return { name: exports.multipartPolicyName, async sendRequest(request, next) { - var _a; if (!request.multipartBody) { return next(request); } @@ -84944,7 +85109,7 @@ function multipartPolicy() { throw new Error("multipartBody and regular body cannot be set at the same time"); } let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); if (!parsedHeader) { throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); @@ -84953,7 +85118,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 !== null && boundary !== void 0 ? boundary : (boundary = parsedBoundary); + boundary ??= parsedBoundary; if (boundary) { assertValidBoundary(boundary); } @@ -84971,7 +85136,7 @@ function multipartPolicy() { /***/ }), -/***/ 53511: +/***/ 33996: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -84984,7 +85149,7 @@ exports.getDefaultProxySettings = getDefaultProxySettings; exports.proxyPolicy = proxyPolicy; const https_proxy_agent_1 = __nccwpck_require__(84708); const http_proxy_agent_1 = __nccwpck_require__(64702); -const log_js_1 = __nccwpck_require__(76488); +const log_js_1 = __nccwpck_require__(10009); const HTTPS_PROXY = "HTTPS_PROXY"; const HTTP_PROXY = "HTTP_PROXY"; const ALL_PROXY = "ALL_PROXY"; @@ -85029,7 +85194,7 @@ function isBypassed(uri, noProxyList, bypassedMap) { return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -85052,7 +85217,7 @@ function isBypassed(uri, noProxyList, bypassedMap) { } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -85102,7 +85267,7 @@ function getUrlFromProxySettings(settings) { try { parsedProxyUrl = new URL(settings.host); } - catch (_a) { + catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -85157,10 +85322,9 @@ function proxyPolicy(proxySettings, options) { return { name: exports.proxyPolicyName, async sendRequest(request, next) { - var _a; if (!request.proxySettings && defaultProxy && - !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? undefined : globalBypassedMap)) { + !isBypassed(request.url, options?.customNoProxyList ?? exports.globalNoProxyList, options?.customNoProxyList ? undefined : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { @@ -85174,7 +85338,7 @@ function proxyPolicy(proxySettings, options) { /***/ }), -/***/ 56959: +/***/ 96318: /***/ ((__unused_webpack_module, exports) => { @@ -85236,7 +85400,7 @@ async function handleRedirect(next, response, maxRetries, currentRetries = 0) { /***/ }), -/***/ 67021: +/***/ 54878: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85244,10 +85408,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__(19490); -const AbortError_js_1 = __nccwpck_require__(84260); -const logger_js_1 = __nccwpck_require__(34135); -const constants_js_1 = __nccwpck_require__(88819); +const helpers_js_1 = __nccwpck_require__(18365); +const AbortError_js_1 = __nccwpck_require__(61865); +const logger_js_1 = __nccwpck_require__(96342); +const constants_js_1 = __nccwpck_require__(4202); const retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); /** * The programmatic identifier of the retryPolicy. @@ -85261,7 +85425,6 @@ 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; @@ -85285,12 +85448,12 @@ function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_ } response = responseError.response; } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (request.abortSignal?.aborted) { logger.error(`Retry ${retryCount}: Request aborted.`); const abortError = new AbortError_js_1.AbortError(); throw abortError; } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); if (responseError) { throw responseError; @@ -85350,7 +85513,7 @@ function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_ /***/ }), -/***/ 79998: +/***/ 25767: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85359,9 +85522,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__(22714); -const retryPolicy_js_1 = __nccwpck_require__(67021); -const constants_js_1 = __nccwpck_require__(88819); +const exponentialRetryStrategy_js_1 = __nccwpck_require__(86269); +const retryPolicy_js_1 = __nccwpck_require__(54878); +const constants_js_1 = __nccwpck_require__(4202); /** * Name of the {@link systemErrorRetryPolicy} */ @@ -85373,13 +85536,15 @@ 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)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })), + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true, + }), ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, }).sendRequest, }; } @@ -85387,7 +85552,7 @@ function systemErrorRetryPolicy(options = {}) { /***/ }), -/***/ 48492: +/***/ 90383: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85396,9 +85561,9 @@ function systemErrorRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.throttlingRetryPolicyName = void 0; exports.throttlingRetryPolicy = throttlingRetryPolicy; -const throttlingRetryStrategy_js_1 = __nccwpck_require__(7524); -const retryPolicy_js_1 = __nccwpck_require__(67021); -const constants_js_1 = __nccwpck_require__(88819); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(60373); +const retryPolicy_js_1 = __nccwpck_require__(54878); +const constants_js_1 = __nccwpck_require__(4202); /** * Name of the {@link throttlingRetryPolicy} */ @@ -85414,11 +85579,10 @@ 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: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, }).sendRequest, }; } @@ -85426,7 +85590,7 @@ function throttlingRetryPolicy(options = {}) { /***/ }), -/***/ 55726: +/***/ 84949: /***/ ((__unused_webpack_module, exports) => { @@ -85458,7 +85622,7 @@ function tlsPolicy(tlsSettings) { /***/ }), -/***/ 92375: +/***/ 22448: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85467,7 +85631,7 @@ function tlsPolicy(tlsSettings) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.userAgentPolicyName = void 0; exports.userAgentPolicy = userAgentPolicy; -const userAgent_js_1 = __nccwpck_require__(295); +const userAgent_js_1 = __nccwpck_require__(77788); const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); /** * The programmatic identifier of the userAgentPolicy. @@ -85494,7 +85658,7 @@ function userAgentPolicy(options = {}) { /***/ }), -/***/ 79058: +/***/ 45227: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85503,14 +85667,47 @@ function userAgentPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RestError = void 0; exports.isRestError = isRestError; -const error_js_1 = __nccwpck_require__(29769); -const inspect_js_1 = __nccwpck_require__(39067); -const sanitizer_js_1 = __nccwpck_require__(56620); +const error_js_1 = __nccwpck_require__(59602); +const inspect_js_1 = __nccwpck_require__(8580); +const sanitizer_js_1 = __nccwpck_require__(83839); 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"; @@ -85522,12 +85719,24 @@ 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(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; + return `RestError: ${this.message} \n ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response, + })}`; }, enumerable: false, }); @@ -85535,17 +85744,6 @@ 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. @@ -85560,7 +85758,7 @@ function isRestError(e) { /***/ }), -/***/ 22714: +/***/ 86269: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85570,8 +85768,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.exponentialRetryStrategy = exponentialRetryStrategy; exports.isExponentialRetryResponse = isExponentialRetryResponse; exports.isSystemError = isSystemError; -const delay_js_1 = __nccwpck_require__(36812); -const throttlingRetryStrategy_js_1 = __nccwpck_require__(7524); +const delay_js_1 = __nccwpck_require__(91463); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(60373); // intervals are in milliseconds const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; @@ -85581,9 +85779,8 @@ 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 = {}) { - 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; + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; return { name: "exponentialRetryStrategy", retry({ retryCount, response, responseError }) { @@ -85635,7 +85832,7 @@ function isSystemError(err) { /***/ }), -/***/ 7524: +/***/ 60373: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85644,7 +85841,7 @@ function isSystemError(err) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isThrottlingRetryResponse = isThrottlingRetryResponse; exports.throttlingRetryStrategy = throttlingRetryStrategy; -const helpers_js_1 = __nccwpck_require__(19490); +const helpers_js_1 = __nccwpck_require__(18365); /** * 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). @@ -85690,7 +85887,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 (_a) { + catch { return undefined; } } @@ -85719,7 +85916,7 @@ function throttlingRetryStrategy() { /***/ }), -/***/ 28917: +/***/ 28482: /***/ ((__unused_webpack_module, exports) => { @@ -85750,13 +85947,12 @@ function stringToUint8Array(value, format) { /***/ }), -/***/ 98402: +/***/ 31407: /***/ ((__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; /** @@ -85768,10 +85964,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 === 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"); + typeof self?.importScripts === "function" && + (self.constructor?.name === "DedicatedWorkerGlobalScope" || + self.constructor?.name === "ServiceWorkerGlobalScope" || + self.constructor?.name === "SharedWorkerGlobalScope"); /** * A constant that indicates whether the environment the code is running is Deno. */ @@ -85787,7 +85983,7 @@ exports.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined" */ exports.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && - Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); + Boolean(globalThis.process.versions?.node); /** * A constant that indicates whether the environment the code is running is Node.JS. */ @@ -85796,12 +85992,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 === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; +exports.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; //# sourceMappingURL=checkEnvironment.js.map /***/ }), -/***/ 93407: +/***/ 75142: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85809,25 +86005,22 @@ exports.isReactNative = typeof navigator !== "undefined" && (navigator === null // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.concat = concat; -const tslib_1 = __nccwpck_require__(31577); const stream_1 = __nccwpck_require__(2203); -const typeGuards_js_1 = __nccwpck_require__(1093); -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); +const typeGuards_js_1 = __nccwpck_require__(90932); +async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; } + yield value; } - finally { - reader.releaseLock(); - } - }); + } + finally { + reader.releaseLock(); + } } function makeAsyncIterable(webStream) { if (!webStream[Symbol.asyncIterator]) { @@ -85869,27 +86062,12 @@ 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((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; } - } + return stream_1.Readable.from((async function* () { + for (const stream of streams) { + for await (const chunk of stream) { + yield chunk; } - }); + } })()); }; } @@ -85897,7 +86075,7 @@ async function concat(sources) { /***/ }), -/***/ 36812: +/***/ 91463: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85905,7 +86083,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__(81988); +const random_js_1 = __nccwpck_require__(28501); /** * Calculates the delay interval for retry attempts using exponential delay with jitter. * @param retryAttempt - The current retry attempt number. @@ -85926,7 +86104,7 @@ function calculateRetryDelay(retryAttempt, config) { /***/ }), -/***/ 29769: +/***/ 59602: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85934,7 +86112,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__(51900); +const object_js_1 = __nccwpck_require__(1301); /** * Typeguard for an error object shape (has name and message) * @param e - Something caught by a catch clause. @@ -85951,7 +86129,7 @@ function isError(e) { /***/ }), -/***/ 19490: +/***/ 18365: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -85960,7 +86138,7 @@ function isError(e) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.delay = delay; exports.parseHeaderValueAsNumber = parseHeaderValueAsNumber; -const AbortError_js_1 = __nccwpck_require__(84260); +const AbortError_js_1 = __nccwpck_require__(61865); const StandardAbortMessage = "The operation was aborted."; /** * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. @@ -85976,10 +86154,10 @@ function delay(delayInMs, value, options) { let timer = undefined; let onAborted = undefined; const rejectOnAbort = () => { - 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)); + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); }; const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { + if (options?.abortSignal && onAborted) { options.abortSignal.removeEventListener("abort", onAborted); } }; @@ -85990,14 +86168,14 @@ function delay(delayInMs, value, options) { removeListeners(); return rejectOnAbort(); }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { + if (options?.abortSignal && options.abortSignal.aborted) { return rejectOnAbort(); } timer = setTimeout(() => { removeListeners(); resolve(value); }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { + if (options?.abortSignal) { options.abortSignal.addEventListener("abort", onAborted); } }); @@ -86019,7 +86197,7 @@ function parseHeaderValueAsNumber(response, headerName) { /***/ }), -/***/ 39067: +/***/ 8580: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -86033,7 +86211,7 @@ exports.custom = node_util_1.inspect.custom; /***/ }), -/***/ 37954: +/***/ 56759: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -86041,20 +86219,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__(36812); +var delay_js_1 = __nccwpck_require__(91463); Object.defineProperty(exports, "calculateRetryDelay", ({ enumerable: true, get: function () { return delay_js_1.calculateRetryDelay; } })); -var random_js_1 = __nccwpck_require__(81988); +var random_js_1 = __nccwpck_require__(28501); Object.defineProperty(exports, "getRandomIntegerInclusive", ({ enumerable: true, get: function () { return random_js_1.getRandomIntegerInclusive; } })); -var object_js_1 = __nccwpck_require__(51900); +var object_js_1 = __nccwpck_require__(1301); Object.defineProperty(exports, "isObject", ({ enumerable: true, get: function () { return object_js_1.isObject; } })); -var error_js_1 = __nccwpck_require__(29769); +var error_js_1 = __nccwpck_require__(59602); Object.defineProperty(exports, "isError", ({ enumerable: true, get: function () { return error_js_1.isError; } })); -var sha256_js_1 = __nccwpck_require__(53876); +var sha256_js_1 = __nccwpck_require__(22237); 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__(90955); +var uuidUtils_js_1 = __nccwpck_require__(64052); Object.defineProperty(exports, "randomUUID", ({ enumerable: true, get: function () { return uuidUtils_js_1.randomUUID; } })); -var checkEnvironment_js_1 = __nccwpck_require__(98402); +var checkEnvironment_js_1 = __nccwpck_require__(31407); 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; } })); @@ -86062,16 +86240,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__(28917); +var bytesEncoding_js_1 = __nccwpck_require__(28482); 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__(56620); +var sanitizer_js_1 = __nccwpck_require__(83839); Object.defineProperty(exports, "Sanitizer", ({ enumerable: true, get: function () { return sanitizer_js_1.Sanitizer; } })); //# sourceMappingURL=internal.js.map /***/ }), -/***/ 51900: +/***/ 1301: /***/ ((__unused_webpack_module, exports) => { @@ -86094,7 +86272,7 @@ function isObject(input) { /***/ }), -/***/ 81988: +/***/ 28501: /***/ ((__unused_webpack_module, exports) => { @@ -86124,7 +86302,7 @@ function getRandomIntegerInclusive(min, max) { /***/ }), -/***/ 56620: +/***/ 83839: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -86132,7 +86310,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__(51900); +const object_js_1 = __nccwpck_require__(1301); const RedactedString = "REDACTED"; // Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts const defaultAllowedHeaderNames = [ @@ -86181,6 +86359,8 @@ 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); @@ -86197,7 +86377,11 @@ class Sanitizer { return JSON.stringify(obj, (key, value) => { // Ensure Errors include their interesting non-enumerable members if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); + return { + ...value, + name: value.name, + message: value.message, + }; } if (key === "headers") { return this.sanitizeHeaders(value); @@ -86283,7 +86467,7 @@ exports.Sanitizer = Sanitizer; /***/ }), -/***/ 53876: +/***/ 22237: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -86315,7 +86499,7 @@ async function computeSha256Hash(content, encoding) { /***/ }), -/***/ 1093: +/***/ 90932: /***/ ((__unused_webpack_module, exports) => { @@ -86352,7 +86536,7 @@ function isBlob(x) { /***/ }), -/***/ 295: +/***/ 77788: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -86361,8 +86545,8 @@ function isBlob(x) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getUserAgentHeaderName = getUserAgentHeaderName; exports.getUserAgentValue = getUserAgentValue; -const userAgentPlatform_js_1 = __nccwpck_require__(89776); -const constants_js_1 = __nccwpck_require__(88819); +const userAgentPlatform_js_1 = __nccwpck_require__(24375); +const constants_js_1 = __nccwpck_require__(4202); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { @@ -86392,7 +86576,7 @@ async function getUserAgentValue(prefix) { /***/ }), -/***/ 89776: +/***/ 24375: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -86402,8 +86586,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getHeaderName = getHeaderName; exports.setPlatformSpecificData = setPlatformSpecificData; const tslib_1 = __nccwpck_require__(31577); -const os = tslib_1.__importStar(__nccwpck_require__(48161)); -const process = tslib_1.__importStar(__nccwpck_require__(1708)); +const node_os_1 = tslib_1.__importDefault(__nccwpck_require__(48161)); +const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(1708)); /** * @internal */ @@ -86414,8 +86598,8 @@ function getHeaderName() { * @internal */ async function setPlatformSpecificData(map) { - if (process && process.versions) { - const versions = process.versions; + if (node_process_1.default && node_process_1.default.versions) { + const versions = node_process_1.default.versions; if (versions.bun) { map.set("Bun", versions.bun); } @@ -86426,24 +86610,23 @@ async function setPlatformSpecificData(map) { map.set("Node", versions.node); } } - map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); + map.set("OS", `(${node_os_1.default.arch()}-${node_os_1.default.type()}-${node_os_1.default.release()})`); } //# sourceMappingURL=userAgentPlatform.js.map /***/ }), -/***/ 90955: +/***/ 64052: /***/ ((__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" +const uuidFunction = typeof globalThis?.crypto?.randomUUID === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : node_crypto_1.randomUUID; /** @@ -86516,18 +86699,34 @@ var __webpack_exports__ = {}; var core = __nccwpck_require__(59999); // EXTERNAL MODULE: ./node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js var exec = __nccwpck_require__(58872); -// EXTERNAL MODULE: external "fs" -var external_fs_ = __nccwpck_require__(79896); +;// CONCATENATED MODULE: ./node_modules/.pnpm/detsys-ts@https+++codeload.github.com+DeterminateSystems+detsys-ts+tar.gz+285768c0d657f_c9f3de82f778b67727761493310aa570/node_modules/detsys-ts/dist/chunk-CTAAG5j7.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 "os" var external_os_ = __nccwpck_require__(70857); -// 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: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); ;// 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.0.2/node_modules/@sindresorhus/is/distribution/index.js @@ -88108,6 +88307,8 @@ var external_node_stream_ = __nccwpck_require__(57075); var external_node_http_ = __nccwpck_require__(37067); // 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__(57596); ;// CONCATENATED MODULE: ./node_modules/.pnpm/@szmarczak+http-timer@5.0.1/node_modules/@szmarczak/http-timer/dist/source/index.js @@ -88220,9 +88421,7 @@ 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 +;// 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'; @@ -88314,6 +88513,8 @@ function normalizeUrl(urlString, options) { removeDirectoryIndex: false, removeExplicitPort: false, sortQueryParameters: true, + removePath: false, + transformPath: false, ...options, }; @@ -88425,6 +88626,18 @@ function normalizeUrl(urlString, options) { } } + // 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(/\.$/, ''); @@ -88465,12 +88678,21 @@ function normalizeUrl(urlString, options) { // 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) { @@ -89726,8 +89948,6 @@ getContentLength_fn = function() { }; -// EXTERNAL MODULE: external "node:util" -var external_node_util_ = __nccwpck_require__(57975); ;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.8/node_modules/got/dist/source/core/utils/is-form-data.js function is_form_data_isFormData(body) { @@ -90029,8 +90249,6 @@ 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 @@ -93608,1716 +93826,1366 @@ const got = source_create(defaults); -;// CONCATENATED MODULE: external "dns/promises" -const external_dns_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("dns/promises"); +;// 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.0.5/node_modules/@actions/cache/lib/cache.js var cache = __nccwpck_require__(95291); -// 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+c7303495f43d3_41cd57da148c86939fc69e6db3511415/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 +;// 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+285768c0d657f_c9f3de82f778b67727761493310aa570/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 }; +/** +* 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_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_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)); } +/** +* 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_os_.type(), - platform: external_os_.platform(), - hostname: external_os_.hostname(), - arch: external_os_.arch(), - release: external_os_.release() - }; + 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() + }; } 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: -${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); + 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); } function readSyncOsreleaseFile(releaseFileList, options) { - 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); + 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); } -// 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() - }; +//#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() + }; }; -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 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 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" - ) - }; +/** +* 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") + }; }; 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; } -var platform2 = external_os_.platform(); -var arch2 = external_os_.arch(); -var isWindows = platform2 === "win32"; -var isMacOS = platform2 === "darwin"; -var isLinux = platform2 === "linux"; +/** +* 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.). +*/ async function getDetails() { - return { - ...await (isWindows ? getWindowsInfo() : isMacOS ? getMacOsInfo() : getLinuxInfo()), - platform: platform2, - arch: arch2, - isWindows, - isMacOS, - isLinux - }; + return { + ...await (isWindows ? getWindowsInfo() : isMacOS ? getMacOsInfo() : getLinuxInfo()), + platform, + arch, + isWindows, + isMacOS, + isLinux + }; } -// src/errors.ts +//#endregion +//#region src/errors.ts +/** +* Coerce a value of type `unknown` into a string. +*/ 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); } -// src/backtrace.ts - - - - - -var START_SLOP_SECONDS = 5; +//#endregion +//#region src/backtrace.ts +const 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", - // 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; + 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 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_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; + 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; } -// src/correlation.ts - - -var OPTIONAL_VARIABLES = ["INVOCATION_ID"]; +//#endregion +//#region src/correlation.ts +const 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_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_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; } function hashEnvironmentVariables(prefix, variables) { - 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")}`; + 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")}`; } -// 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; +//#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. +*/ 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 (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; - } + 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; + } }; 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 void 0; - } + 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; + } } async function discoverServiceRecords() { - return await discoverServicesStub((0,external_dns_promises_namespaceObject.resolveSrv)(LOOKUP), 1e3); + return await discoverServicesStub((0,external_node_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; } -// 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 +//#endregion +//#region src/inputs.ts +var inputs_exports = __export({ + getArrayOfStrings: () => getArrayOfStrings, + getArrayOfStringsOrNull: () => getArrayOfStringsOrNull, + getBool: () => getBool, + getBoolOrUndefined: () => getBoolOrUndefined, + getMultilineStringOrNull: () => getMultilineStringOrNull, + getNumberOrNull: () => getNumberOrNull, + getString: () => getString, + getStringOrNull: () => getStringOrNull, + getStringOrUndefined: () => getStringOrUndefined, + handleString: () => handleString }); - -var getBool = (name) => { - return core.getBooleanInput(name); +/** +* Get a Boolean input from the Action's configuration by name. +*/ +const getBool = (name) => { + return core.getBooleanInput(name); }; -var getBoolOrUndefined = (name) => { - if (getStringOrUndefined(name) === void 0) { - return void 0; - } - 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 getArrayOfStrings = (name, separator) => { - const original = getString(name); - return handleString(original, separator); +/** +* 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) => { + const original = getString(name); + return handleString(original, separator); }; -var getArrayOfStringsOrNull = (name, separator) => { - const original = getStringOrNull(name); - if (original === null) { - return null; - } else { - 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 handleString = (input, separator) => { - const sepChar = separator === "comma" ? "," : /\s+/; - const trimmed = input.trim(); - if (trimmed === "") { - return []; - } - return trimmed.split(sepChar).map((s) => s.trim()); +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 getMultilineStringOrNull = (name) => { - const value = core.getMultilineInput(name); - if (value.length === 0) { - return null; - } else { - return value; - } +/** +* 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 getNumberOrNull = (name) => { - const value = core.getInput(name); - if (value === "") { - return null; - } else { - return Number(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 getString = (name) => { - return core.getInput(name); +/** +* Get a string input from the Action's configuration. +*/ +const getString = (name) => { + return core.getInput(name); }; -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 `null` if not set. +*/ +const getStringOrNull = (name) => { + const value = core.getInput(name); + if (value === "") return null; + else return value; }; -var getStringOrUndefined = (name) => { - const value = core.getInput(name); - if (value === "") { - return void 0; - } 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; }; -// src/platform.ts -var platform_exports = {}; -__export(platform_exports, { - getArchOs: () => getArchOs, - getNixPlatform: () => getNixPlatform +//#endregion +//#region src/platform.ts +var platform_exports = __export({ + 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 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.` - ); - } + 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.`); + } } -// src/sourcedef.ts - +//#endregion +//#region 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; } -// 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_VERSION = "nix_version"; -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" +//#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" ]; -var determinateStateDir = "/var/lib/determinate"; -var determinateIdentityFile = external_path_.join(determinateStateDir, "identity.json"); -var isRoot = external_os_.userInfo().uid === 0; +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 */ 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, - // Ignore output from tee - outStream: (0,external_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, + outStream: (0,external_node_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() { - 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(); - 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 = 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 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}: ${stringifyError2(err)}` - ); - } - this.events = []; - } + 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 + }; + 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: ${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 logText = (0,external_node_fs_.readFileSync)(filePath); + const buf = await doGzip(logText); + 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 = []; + } }; -function stringifyError2(error3) { - return error3 instanceof Error || typeof error3 == "string" ? error3.toString() : JSON.stringify(error3); +function stringifyError$1(error) { + return error instanceof Error || typeof error == "string" ? error.toString() : JSON.stringify(error); } 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; } -/*! - * 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] - */ +//#endregion + //# sourceMappingURL=index.js.map ;// CONCATENATED MODULE: ./dist/index.js // src/nix.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0c3fb22..a03fa5f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: version: 1.1.1 detsys-ts: specifier: github:DeterminateSystems/detsys-ts - version: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/c7303495f43d348cac78091ef434443b1ef22485 + version: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/285768c0d657f9709cb689893f12895c36923093 devDependencies: '@trivago/prettier-plugin-sort-imports': specifier: ^4.3.0 @@ -83,17 +83,17 @@ packages: resolution: {integrity: sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==} engines: {node: '>=18.0.0'} - '@azure/core-auth@1.10.0': - resolution: {integrity: sha512-88Djs5vBvGbHQHf5ZZcaoNHo6Y8BKZkt3cw2iuJIQzLEgH4Ox6Tm4hjFhbqOxyYsgIG/eJbFEHpxRIfEEWv5Ow==} + '@azure/core-auth@1.10.1': + resolution: {integrity: sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg==} engines: {node: '>=20.0.0'} - '@azure/core-client@1.10.0': - resolution: {integrity: sha512-O4aP3CLFNodg8eTHXECaH3B3CjicfzkxVtnrfLkOq0XNP7TIECGfHpK/C6vADZkWP75wzmdBnsIA8ksuJMk18g==} + '@azure/core-client@1.10.1': + resolution: {integrity: sha512-Nh5PhEOeY6PrnxNPsEHRr9eimxLwgLlpmguQaHKBinFYA/RU9+kOYVOQqOrTsCL+KSxrLLl1gD8Dk5BFW/7l/w==} engines: {node: '>=20.0.0'} - '@azure/core-http-compat@2.3.0': - resolution: {integrity: sha512-qLQujmUypBBG0gxHd0j6/Jdmul6ttl24c8WGiLXIk7IHXdBlfoBqW27hyz3Xn6xbfdyVSarl1Ttbk0AwnZBYCw==} - engines: {node: '>=18.0.0'} + '@azure/core-http-compat@2.3.1': + resolution: {integrity: sha512-az9BkXND3/d5VgdRRQVkiJb2gOmDU8Qcq4GvjtBmDICNiQ9udFmDk4ZpSB5Qq1OmtDJGlQAfBaS4palFsazQ5g==} + engines: {node: '>=20.0.0'} '@azure/core-lro@2.7.2': resolution: {integrity: sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==} @@ -103,16 +103,16 @@ packages: resolution: {integrity: sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==} engines: {node: '>=18.0.0'} - '@azure/core-rest-pipeline@1.22.0': - resolution: {integrity: sha512-OKHmb3/Kpm06HypvB3g6Q3zJuvyXcpxDpCS1PnU8OV6AJgSFaee/covXBcPbWc6XDDxtEPlbi3EMQ6nUiPaQtw==} + '@azure/core-rest-pipeline@1.22.1': + resolution: {integrity: sha512-UVZlVLfLyz6g3Hy7GNDpooMQonUygH7ghdiSASOOHy97fKj/mPLqgDX7aidOijn+sCMU+WU8NjlPlNTgnvbcGA==} engines: {node: '>=20.0.0'} - '@azure/core-tracing@1.3.0': - resolution: {integrity: sha512-+XvmZLLWPe67WXNZo9Oc9CrPj/Tm8QnHR92fFAFdnbzwNdCH1h+7UdpaQgRSBsMY+oW1kHXNUZQLdZ1gHX3ROw==} + '@azure/core-tracing@1.3.1': + resolution: {integrity: sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ==} engines: {node: '>=20.0.0'} - '@azure/core-util@1.13.0': - resolution: {integrity: sha512-o0psW8QWQ58fq3i24Q1K2XfS/jYTxr7O1HRcyUE9bV9NttLU+kYOH82Ixj8DGlMTOWgxm1Sss2QAfKK5UkSPxw==} + '@azure/core-util@1.13.1': + resolution: {integrity: sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A==} engines: {node: '>=20.0.0'} '@azure/core-xml@1.5.0': @@ -170,8 +170,8 @@ packages: resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} - '@babel/parser@7.28.3': - resolution: {integrity: sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA==} + '@babel/parser@7.28.4': + resolution: {integrity: sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==} engines: {node: '>=6.0.0'} hasBin: true @@ -187,8 +187,8 @@ packages: resolution: {integrity: sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==} engines: {node: '>=6.9.0'} - '@babel/types@7.28.2': - resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==} + '@babel/types@7.28.4': + resolution: {integrity: sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==} engines: {node: '>=6.9.0'} '@emnapi/core@1.5.0': @@ -356,8 +356,8 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.8.0': - resolution: {integrity: sha512-MJQFqrZgcW0UNYLGOuQpey/oTN59vyWwplvCGZztn1cKz9agZPPYpJB7h2OMmuu7VLqkvEjN8feFZJmxNF9D+Q==} + '@eslint-community/eslint-utils@4.9.0': + resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -408,8 +408,8 @@ packages: '@jridgewell/sourcemap-codec@1.5.5': resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} - '@jridgewell/trace-mapping@0.3.30': - resolution: {integrity: sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==} + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} '@napi-rs/wasm-runtime@0.2.12': resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} @@ -444,108 +444,108 @@ packages: '@protobuf-ts/runtime@2.11.1': resolution: {integrity: sha512-KuDaT1IfHkugM2pyz+FwiY80ejWrkH1pAtOBOZFuR6SXEFTsnb/jiQWQ1rCIrcKx2BtyxnxW6BWwsVSA/Ie+WQ==} - '@rollup/rollup-android-arm-eabi@4.50.0': - resolution: {integrity: sha512-lVgpeQyy4fWN5QYebtW4buT/4kn4p4IJ+kDNB4uYNT5b8c8DLJDg6titg20NIg7E8RWwdWZORW6vUFfrLyG3KQ==} + '@rollup/rollup-android-arm-eabi@4.50.1': + resolution: {integrity: sha512-HJXwzoZN4eYTdD8bVV22DN8gsPCAj3V20NHKOs8ezfXanGpmVPR7kalUHd+Y31IJp9stdB87VKPFbsGY3H/2ag==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.50.0': - resolution: {integrity: sha512-2O73dR4Dc9bp+wSYhviP6sDziurB5/HCym7xILKifWdE9UsOe2FtNcM+I4xZjKrfLJnq5UR8k9riB87gauiQtw==} + '@rollup/rollup-android-arm64@4.50.1': + resolution: {integrity: sha512-PZlsJVcjHfcH53mOImyt3bc97Ep3FJDXRpk9sMdGX0qgLmY0EIWxCag6EigerGhLVuL8lDVYNnSo8qnTElO4xw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.50.0': - resolution: {integrity: sha512-vwSXQN8T4sKf1RHr1F0s98Pf8UPz7pS6P3LG9NSmuw0TVh7EmaE+5Ny7hJOZ0M2yuTctEsHHRTMi2wuHkdS6Hg==} + '@rollup/rollup-darwin-arm64@4.50.1': + resolution: {integrity: sha512-xc6i2AuWh++oGi4ylOFPmzJOEeAa2lJeGUGb4MudOtgfyyjr4UPNK+eEWTPLvmPJIY/pgw6ssFIox23SyrkkJw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.50.0': - resolution: {integrity: sha512-cQp/WG8HE7BCGyFVuzUg0FNmupxC+EPZEwWu2FCGGw5WDT1o2/YlENbm5e9SMvfDFR6FRhVCBePLqj0o8MN7Vw==} + '@rollup/rollup-darwin-x64@4.50.1': + resolution: {integrity: sha512-2ofU89lEpDYhdLAbRdeyz/kX3Y2lpYc6ShRnDjY35bZhd2ipuDMDi6ZTQ9NIag94K28nFMofdnKeHR7BT0CATw==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.50.0': - resolution: {integrity: sha512-UR1uTJFU/p801DvvBbtDD7z9mQL8J80xB0bR7DqW7UGQHRm/OaKzp4is7sQSdbt2pjjSS72eAtRh43hNduTnnQ==} + '@rollup/rollup-freebsd-arm64@4.50.1': + resolution: {integrity: sha512-wOsE6H2u6PxsHY/BeFHA4VGQN3KUJFZp7QJBmDYI983fgxq5Th8FDkVuERb2l9vDMs1D5XhOrhBrnqcEY6l8ZA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.50.0': - resolution: {integrity: sha512-G/DKyS6PK0dD0+VEzH/6n/hWDNPDZSMBmqsElWnCRGrYOb2jC0VSupp7UAHHQ4+QILwkxSMaYIbQ72dktp8pKA==} + '@rollup/rollup-freebsd-x64@4.50.1': + resolution: {integrity: sha512-A/xeqaHTlKbQggxCqispFAcNjycpUEHP52mwMQZUNqDUJFFYtPHCXS1VAG29uMlDzIVr+i00tSFWFLivMcoIBQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.50.0': - resolution: {integrity: sha512-u72Mzc6jyJwKjJbZZcIYmd9bumJu7KNmHYdue43vT1rXPm2rITwmPWF0mmPzLm9/vJWxIRbao/jrQmxTO0Sm9w==} + '@rollup/rollup-linux-arm-gnueabihf@4.50.1': + resolution: {integrity: sha512-54v4okehwl5TaSIkpp97rAHGp7t3ghinRd/vyC1iXqXMfjYUTm7TfYmCzXDoHUPTTf36L8pr0E7YsD3CfB3ZDg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.50.0': - resolution: {integrity: sha512-S4UefYdV0tnynDJV1mdkNawp0E5Qm2MtSs330IyHgaccOFrwqsvgigUD29uT+B/70PDY1eQ3t40+xf6wIvXJyg==} + '@rollup/rollup-linux-arm-musleabihf@4.50.1': + resolution: {integrity: sha512-p/LaFyajPN/0PUHjv8TNyxLiA7RwmDoVY3flXHPSzqrGcIp/c2FjwPPP5++u87DGHtw+5kSH5bCJz0mvXngYxw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.50.0': - resolution: {integrity: sha512-1EhkSvUQXJsIhk4msxP5nNAUWoB4MFDHhtc4gAYvnqoHlaL9V3F37pNHabndawsfy/Tp7BPiy/aSa6XBYbaD1g==} + '@rollup/rollup-linux-arm64-gnu@4.50.1': + resolution: {integrity: sha512-2AbMhFFkTo6Ptna1zO7kAXXDLi7H9fGTbVaIq2AAYO7yzcAsuTNWPHhb2aTA6GPiP+JXh85Y8CiS54iZoj4opw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.50.0': - resolution: {integrity: sha512-EtBDIZuDtVg75xIPIK1l5vCXNNCIRM0OBPUG+tbApDuJAy9mKago6QxX+tfMzbCI6tXEhMuZuN1+CU8iDW+0UQ==} + '@rollup/rollup-linux-arm64-musl@4.50.1': + resolution: {integrity: sha512-Cgef+5aZwuvesQNw9eX7g19FfKX5/pQRIyhoXLCiBOrWopjo7ycfB292TX9MDcDijiuIJlx1IzJz3IoCPfqs9w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.50.0': - resolution: {integrity: sha512-BGYSwJdMP0hT5CCmljuSNx7+k+0upweM2M4YGfFBjnFSZMHOLYR0gEEj/dxyYJ6Zc6AiSeaBY8dWOa11GF/ppQ==} + '@rollup/rollup-linux-loongarch64-gnu@4.50.1': + resolution: {integrity: sha512-RPhTwWMzpYYrHrJAS7CmpdtHNKtt2Ueo+BlLBjfZEhYBhK00OsEqM08/7f+eohiF6poe0YRDDd8nAvwtE/Y62Q==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.50.0': - resolution: {integrity: sha512-I1gSMzkVe1KzAxKAroCJL30hA4DqSi+wGc5gviD0y3IL/VkvcnAqwBf4RHXHyvH66YVHxpKO8ojrgc4SrWAnLg==} + '@rollup/rollup-linux-ppc64-gnu@4.50.1': + resolution: {integrity: sha512-eSGMVQw9iekut62O7eBdbiccRguuDgiPMsw++BVUg+1K7WjZXHOg/YOT9SWMzPZA+w98G+Fa1VqJgHZOHHnY0Q==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.50.0': - resolution: {integrity: sha512-bSbWlY3jZo7molh4tc5dKfeSxkqnf48UsLqYbUhnkdnfgZjgufLS/NTA8PcP/dnvct5CCdNkABJ56CbclMRYCA==} + '@rollup/rollup-linux-riscv64-gnu@4.50.1': + resolution: {integrity: sha512-S208ojx8a4ciIPrLgazF6AgdcNJzQE4+S9rsmOmDJkusvctii+ZvEuIC4v/xFqzbuP8yDjn73oBlNDgF6YGSXQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.50.0': - resolution: {integrity: sha512-LSXSGumSURzEQLT2e4sFqFOv3LWZsEF8FK7AAv9zHZNDdMnUPYH3t8ZlaeYYZyTXnsob3htwTKeWtBIkPV27iQ==} + '@rollup/rollup-linux-riscv64-musl@4.50.1': + resolution: {integrity: sha512-3Ag8Ls1ggqkGUvSZWYcdgFwriy2lWo+0QlYgEFra/5JGtAd6C5Hw59oojx1DeqcA2Wds2ayRgvJ4qxVTzCHgzg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.50.0': - resolution: {integrity: sha512-CxRKyakfDrsLXiCyucVfVWVoaPA4oFSpPpDwlMcDFQvrv3XY6KEzMtMZrA+e/goC8xxp2WSOxHQubP8fPmmjOQ==} + '@rollup/rollup-linux-s390x-gnu@4.50.1': + resolution: {integrity: sha512-t9YrKfaxCYe7l7ldFERE1BRg/4TATxIg+YieHQ966jwvo7ddHJxPj9cNFWLAzhkVsbBvNA4qTbPVNsZKBO4NSg==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.50.0': - resolution: {integrity: sha512-8PrJJA7/VU8ToHVEPu14FzuSAqVKyo5gg/J8xUerMbyNkWkO9j2ExBho/68RnJsMGNJq4zH114iAttgm7BZVkA==} + '@rollup/rollup-linux-x64-gnu@4.50.1': + resolution: {integrity: sha512-MCgtFB2+SVNuQmmjHf+wfI4CMxy3Tk8XjA5Z//A0AKD7QXUYFMQcns91K6dEHBvZPCnhJSyDWLApk40Iq/H3tA==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.50.0': - resolution: {integrity: sha512-SkE6YQp+CzpyOrbw7Oc4MgXFvTw2UIBElvAvLCo230pyxOLmYwRPwZ/L5lBe/VW/qT1ZgND9wJfOsdy0XptRvw==} + '@rollup/rollup-linux-x64-musl@4.50.1': + resolution: {integrity: sha512-nEvqG+0jeRmqaUMuwzlfMKwcIVffy/9KGbAGyoa26iu6eSngAYQ512bMXuqqPrlTyfqdlB9FVINs93j534UJrg==} cpu: [x64] os: [linux] - '@rollup/rollup-openharmony-arm64@4.50.0': - resolution: {integrity: sha512-PZkNLPfvXeIOgJWA804zjSFH7fARBBCpCXxgkGDRjjAhRLOR8o0IGS01ykh5GYfod4c2yiiREuDM8iZ+pVsT+Q==} + '@rollup/rollup-openharmony-arm64@4.50.1': + resolution: {integrity: sha512-RDsLm+phmT3MJd9SNxA9MNuEAO/J2fhW8GXk62G/B4G7sLVumNFbRwDL6v5NrESb48k+QMqdGbHgEtfU0LCpbA==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.50.0': - resolution: {integrity: sha512-q7cIIdFvWQoaCbLDUyUc8YfR3Jh2xx3unO8Dn6/TTogKjfwrax9SyfmGGK6cQhKtjePI7jRfd7iRYcxYs93esg==} + '@rollup/rollup-win32-arm64-msvc@4.50.1': + resolution: {integrity: sha512-hpZB/TImk2FlAFAIsoElM3tLzq57uxnGYwplg6WDyAxbYczSi8O2eQ+H2Lx74504rwKtZ3N2g4bCUkiamzS6TQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.50.0': - resolution: {integrity: sha512-XzNOVg/YnDOmFdDKcxxK410PrcbcqZkBmz+0FicpW5jtjKQxcW1BZJEQOF0NJa6JO7CZhett8GEtRN/wYLYJuw==} + '@rollup/rollup-win32-ia32-msvc@4.50.1': + resolution: {integrity: sha512-SXjv8JlbzKM0fTJidX4eVsH+Wmnp0/WcD8gJxIZyR6Gay5Qcsmdbi9zVtnbkGPG8v2vMR1AD06lGWy5FLMcG7A==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.50.0': - resolution: {integrity: sha512-xMmiWRR8sp72Zqwjgtf3QbZfF1wdh8X2ABu3EaozvZcyHJeU0r+XAnXdKgs4cCAp6ORoYoCygipYP1mjmbjrsg==} + '@rollup/rollup-win32-x64-msvc@4.50.1': + resolution: {integrity: sha512-StxAO/8ts62KZVRAm4JZYq9+NqNsV7RvimNK+YM7ry//zebEH6meuugqW/P5OFUCjyQgui+9fUxT6d5NShvMvA==} cpu: [x64] os: [win32] @@ -572,8 +572,8 @@ packages: '@vue/compiler-sfc': optional: true - '@tybys/wasm-util@0.10.0': - resolution: {integrity: sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==} + '@tybys/wasm-util@0.10.1': + resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} '@types/chai@5.2.2': resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} @@ -648,8 +648,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.0': - resolution: {integrity: sha512-sOx1PKSuFwnIl7z4RN0Ls7N9AQawmR9r66eI5rFCzLDIs8HTIYrIpH9QjYWoX0lkgGrkLxXhi4QnK7MizPRrIg==} + '@typespec/ts-http-runtime@0.3.1': + resolution: {integrity: sha512-SnbaqayTVFEA6/tYumdF0UmybY0KHyKwGPBXnyckFlrrKdhWFrL3a2HIPXHjht5ZOElKGcXfD2D63P36btb+ww==} engines: {node: '>=20.0.0'} '@ungap/structured-clone@1.3.0': @@ -808,16 +808,16 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.2.0: - resolution: {integrity: sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==} + ansi-regex@6.2.2: + resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} engines: {node: '>=12'} ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - ansi-styles@6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} engines: {node: '>=12'} any-promise@1.3.0: @@ -936,8 +936,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - caniuse-lite@1.0.30001739: - resolution: {integrity: sha512-y+j60d6ulelrNSwpPyrHdl+9mJnQzHBr08xm48Qno0nSk4h3Qojh+ziv2qE6rXf4k3tadF4o1J/1tAbVm1NtnA==} + caniuse-lite@1.0.30001741: + resolution: {integrity: sha512-QGUGitqsc8ARjLdgAfxETDhRbJ0REsP6O3I96TAth/mVjh2cYzN2u+3AzPP3aVSm2FehEItaJw1xd+IGBXWeSw==} chai@5.3.3: resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} @@ -1043,8 +1043,8 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/c7303495f43d348cac78091ef434443b1ef22485: - resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/c7303495f43d348cac78091ef434443b1ef22485} + detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/285768c0d657f9709cb689893f12895c36923093: + resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/285768c0d657f9709cb689893f12895c36923093} version: 1.0.0 dir-glob@3.0.1: @@ -1066,8 +1066,8 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - electron-to-chromium@1.5.213: - resolution: {integrity: sha512-xr9eRzSLNa4neDO0xVFrkXu3vyIzG4Ay08dApecw42Z1NbmCt+keEpXdvlYGVe0wtvY5dhW0Ay0lY0IOfsCg0Q==} + electron-to-chromium@1.5.218: + resolution: {integrity: sha512-uwwdN0TUHs8u6iRgN8vKeWZMRll4gBkz+QMqdS7DDe49uiK68/UX92lFb61oiFPrpYZNeZIqa4bA7O6Aiasnzg==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -1723,8 +1723,8 @@ packages: lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - magic-string@0.30.18: - resolution: {integrity: sha512-yi8swmWbO17qHhwIBNeeZxTceJMeBvWJaId6dyvTSOwTipqeHhMhOrz6513r1sOKnpvQ7zkhlG8tPrpilwTxHQ==} + magic-string@0.30.19: + resolution: {integrity: sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==} math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} @@ -1799,11 +1799,11 @@ packages: encoding: optional: true - node-releases@2.0.19: - resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + node-releases@2.0.21: + resolution: {integrity: sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw==} - normalize-url@8.0.2: - resolution: {integrity: sha512-Ee/R3SyN4BuynXcnTaekmaVdbDAEiNrHqjQIA37mHU8G9pf7aaAD4ZX3XjBLo6rsdcxA/gtkcNYZLt30ACgynw==} + normalize-url@8.1.0: + resolution: {integrity: sha512-X06Mfd/5aKsRHc0O0J5CUedwnPmnDtLF2+nq+KN9KSDlJHkPuh0JUviWjEWMe0SW/9TDdSLVPuk7L5gGTIA1/w==} engines: {node: '>=14.16'} object-assign@4.1.1: @@ -2006,8 +2006,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup@4.50.0: - resolution: {integrity: sha512-/Zl4D8zPifNmyGzJS+3kVoyXeDeT/GrsJM94sACNg9RtUE0hrHa1bNPtRSrfHTMH5HjRzce6K7rlTh3Khiw+pw==} + rollup@4.50.1: + resolution: {integrity: sha512-78E9voJHwnXQMiQdiqswVLZwJIzdBKJ1GdI5Zx6XwoFKUIk09/sSrr+05QFzvYb8q6Y9pPV45zzDuYa3907TZA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -2142,8 +2142,8 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} - strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + strip-ansi@7.1.2: + resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} engines: {node: '>=12'} strip-bom@3.0.0: @@ -2196,8 +2196,8 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyglobby@0.2.14: - resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} + tinyglobby@0.2.15: + resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} tinypool@1.1.1: @@ -2336,8 +2336,8 @@ packages: engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true - vite@7.1.4: - resolution: {integrity: sha512-X5QFK4SGynAeeIt+A7ZWnApdUyHYm+pzv/8/A57LqSGcI88U6R6ipOs3uCesdc6yl7nl+zNO0t8LmqAdXcQihw==} + vite@7.1.5: + resolution: {integrity: sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -2516,38 +2516,38 @@ snapshots: dependencies: tslib: 2.8.1 - '@azure/core-auth@1.10.0': + '@azure/core-auth@1.10.1': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-util': 1.13.0 + '@azure/core-util': 1.13.1 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@azure/core-client@1.10.0': + '@azure/core-client@1.10.1': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.0 - '@azure/core-rest-pipeline': 1.22.0 - '@azure/core-tracing': 1.3.0 - '@azure/core-util': 1.13.0 + '@azure/core-auth': 1.10.1 + '@azure/core-rest-pipeline': 1.22.1 + '@azure/core-tracing': 1.3.1 + '@azure/core-util': 1.13.1 '@azure/logger': 1.3.0 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@azure/core-http-compat@2.3.0': + '@azure/core-http-compat@2.3.1': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-client': 1.10.0 - '@azure/core-rest-pipeline': 1.22.0 + '@azure/core-client': 1.10.1 + '@azure/core-rest-pipeline': 1.22.1 transitivePeerDependencies: - supports-color '@azure/core-lro@2.7.2': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-util': 1.13.0 + '@azure/core-util': 1.13.1 '@azure/logger': 1.3.0 tslib: 2.8.1 transitivePeerDependencies: @@ -2557,26 +2557,26 @@ snapshots: dependencies: tslib: 2.8.1 - '@azure/core-rest-pipeline@1.22.0': + '@azure/core-rest-pipeline@1.22.1': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.0 - '@azure/core-tracing': 1.3.0 - '@azure/core-util': 1.13.0 + '@azure/core-auth': 1.10.1 + '@azure/core-tracing': 1.3.1 + '@azure/core-util': 1.13.1 '@azure/logger': 1.3.0 - '@typespec/ts-http-runtime': 0.3.0 + '@typespec/ts-http-runtime': 0.3.1 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@azure/core-tracing@1.3.0': + '@azure/core-tracing@1.3.1': dependencies: tslib: 2.8.1 - '@azure/core-util@1.13.0': + '@azure/core-util@1.13.1': dependencies: '@azure/abort-controller': 2.1.2 - '@typespec/ts-http-runtime': 0.3.0 + '@typespec/ts-http-runtime': 0.3.1 tslib: 2.8.1 transitivePeerDependencies: - supports-color @@ -2588,14 +2588,14 @@ snapshots: '@azure/logger@1.3.0': dependencies: - '@typespec/ts-http-runtime': 0.3.0 + '@typespec/ts-http-runtime': 0.3.1 tslib: 2.8.1 transitivePeerDependencies: - supports-color '@azure/ms-rest-js@2.7.0': dependencies: - '@azure/core-auth': 1.10.0 + '@azure/core-auth': 1.10.1 abort-controller: 3.0.0 form-data: 2.5.5 node-fetch: 2.7.0 @@ -2610,14 +2610,14 @@ snapshots: '@azure/storage-blob@12.28.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.0 - '@azure/core-client': 1.10.0 - '@azure/core-http-compat': 2.3.0 + '@azure/core-auth': 1.10.1 + '@azure/core-client': 1.10.1 + '@azure/core-http-compat': 2.3.1 '@azure/core-lro': 2.7.2 '@azure/core-paging': 1.6.2 - '@azure/core-rest-pipeline': 1.22.0 - '@azure/core-tracing': 1.3.0 - '@azure/core-util': 1.13.0 + '@azure/core-rest-pipeline': 1.22.1 + '@azure/core-tracing': 1.3.1 + '@azure/core-util': 1.13.1 '@azure/core-xml': 1.5.0 '@azure/logger': 1.3.0 '@azure/storage-common': 12.0.0 @@ -2629,11 +2629,11 @@ snapshots: '@azure/storage-common@12.0.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.0 - '@azure/core-http-compat': 2.3.0 - '@azure/core-rest-pipeline': 1.22.0 - '@azure/core-tracing': 1.3.0 - '@azure/core-util': 1.13.0 + '@azure/core-auth': 1.10.1 + '@azure/core-http-compat': 2.3.1 + '@azure/core-rest-pipeline': 1.22.1 + '@azure/core-tracing': 1.3.1 + '@azure/core-util': 1.13.1 '@azure/logger': 1.3.0 events: 3.3.0 tslib: 2.8.1 @@ -2654,42 +2654,42 @@ snapshots: '@babel/generator@7.28.3': dependencies: - '@babel/parser': 7.28.3 - '@babel/types': 7.28.2 + '@babel/parser': 7.28.4 + '@babel/types': 7.28.4 '@jridgewell/gen-mapping': 0.3.13 - '@jridgewell/trace-mapping': 0.3.30 + '@jridgewell/trace-mapping': 0.3.31 jsesc: 3.1.0 '@babel/helper-environment-visitor@7.24.7': dependencies: - '@babel/types': 7.28.2 + '@babel/types': 7.28.4 '@babel/helper-function-name@7.24.7': dependencies: '@babel/template': 7.27.2 - '@babel/types': 7.28.2 + '@babel/types': 7.28.4 '@babel/helper-hoist-variables@7.24.7': dependencies: - '@babel/types': 7.28.2 + '@babel/types': 7.28.4 '@babel/helper-split-export-declaration@7.24.7': dependencies: - '@babel/types': 7.28.2 + '@babel/types': 7.28.4 '@babel/helper-string-parser@7.27.1': {} '@babel/helper-validator-identifier@7.27.1': {} - '@babel/parser@7.28.3': + '@babel/parser@7.28.4': dependencies: - '@babel/types': 7.28.2 + '@babel/types': 7.28.4 '@babel/template@7.27.2': dependencies: '@babel/code-frame': 7.27.1 - '@babel/parser': 7.28.3 - '@babel/types': 7.28.2 + '@babel/parser': 7.28.4 + '@babel/types': 7.28.4 '@babel/traverse@7.23.2': dependencies: @@ -2699,8 +2699,8 @@ snapshots: '@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.3 - '@babel/types': 7.28.2 + '@babel/parser': 7.28.4 + '@babel/types': 7.28.4 debug: 4.4.1 globals: 11.12.0 transitivePeerDependencies: @@ -2711,7 +2711,7 @@ snapshots: '@babel/helper-validator-identifier': 7.27.1 to-fast-properties: 2.0.0 - '@babel/types@7.28.2': + '@babel/types@7.28.4': dependencies: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 @@ -2810,7 +2810,7 @@ snapshots: '@esbuild/win32-x64@0.25.9': optional: true - '@eslint-community/eslint-utils@4.8.0(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.9.0(eslint@8.57.1)': dependencies: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 @@ -2853,7 +2853,7 @@ snapshots: dependencies: string-width: 5.1.2 string-width-cjs: string-width@4.2.3 - strip-ansi: 7.1.0 + strip-ansi: 7.1.2 strip-ansi-cjs: strip-ansi@6.0.1 wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 @@ -2861,13 +2861,13 @@ snapshots: '@jridgewell/gen-mapping@0.3.13': dependencies: '@jridgewell/sourcemap-codec': 1.5.5 - '@jridgewell/trace-mapping': 0.3.30 + '@jridgewell/trace-mapping': 0.3.31 '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/sourcemap-codec@1.5.5': {} - '@jridgewell/trace-mapping@0.3.30': + '@jridgewell/trace-mapping@0.3.31': dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 @@ -2876,7 +2876,7 @@ snapshots: dependencies: '@emnapi/core': 1.5.0 '@emnapi/runtime': 1.5.0 - '@tybys/wasm-util': 0.10.0 + '@tybys/wasm-util': 0.10.1 optional: true '@nodelib/fs.scandir@2.1.5': @@ -2904,67 +2904,67 @@ snapshots: '@protobuf-ts/runtime@2.11.1': {} - '@rollup/rollup-android-arm-eabi@4.50.0': + '@rollup/rollup-android-arm-eabi@4.50.1': optional: true - '@rollup/rollup-android-arm64@4.50.0': + '@rollup/rollup-android-arm64@4.50.1': optional: true - '@rollup/rollup-darwin-arm64@4.50.0': + '@rollup/rollup-darwin-arm64@4.50.1': optional: true - '@rollup/rollup-darwin-x64@4.50.0': + '@rollup/rollup-darwin-x64@4.50.1': optional: true - '@rollup/rollup-freebsd-arm64@4.50.0': + '@rollup/rollup-freebsd-arm64@4.50.1': optional: true - '@rollup/rollup-freebsd-x64@4.50.0': + '@rollup/rollup-freebsd-x64@4.50.1': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.50.0': + '@rollup/rollup-linux-arm-gnueabihf@4.50.1': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.50.0': + '@rollup/rollup-linux-arm-musleabihf@4.50.1': optional: true - '@rollup/rollup-linux-arm64-gnu@4.50.0': + '@rollup/rollup-linux-arm64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-arm64-musl@4.50.0': + '@rollup/rollup-linux-arm64-musl@4.50.1': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.50.0': + '@rollup/rollup-linux-loongarch64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.50.0': + '@rollup/rollup-linux-ppc64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.50.0': + '@rollup/rollup-linux-riscv64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-riscv64-musl@4.50.0': + '@rollup/rollup-linux-riscv64-musl@4.50.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.50.0': + '@rollup/rollup-linux-s390x-gnu@4.50.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.50.0': + '@rollup/rollup-linux-x64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-x64-musl@4.50.0': + '@rollup/rollup-linux-x64-musl@4.50.1': optional: true - '@rollup/rollup-openharmony-arm64@4.50.0': + '@rollup/rollup-openharmony-arm64@4.50.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.50.0': + '@rollup/rollup-win32-arm64-msvc@4.50.1': optional: true - '@rollup/rollup-win32-ia32-msvc@4.50.0': + '@rollup/rollup-win32-ia32-msvc@4.50.1': optional: true - '@rollup/rollup-win32-x64-msvc@4.50.0': + '@rollup/rollup-win32-x64-msvc@4.50.1': optional: true '@rtsao/scc@1.1.0': {} @@ -2980,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.3 + '@babel/parser': 7.28.4 '@babel/traverse': 7.23.2 '@babel/types': 7.17.0 javascript-natural-sort: 0.7.1 @@ -2989,7 +2989,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@tybys/wasm-util@0.10.0': + '@tybys/wasm-util@0.10.1': dependencies: tslib: 2.8.1 optional: true @@ -3073,7 +3073,7 @@ snapshots: '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.9.2)': dependencies: - '@eslint-community/eslint-utils': 4.8.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.9.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.2) @@ -3087,7 +3087,7 @@ snapshots: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 - '@typespec/ts-http-runtime@0.3.0': + '@typespec/ts-http-runtime@0.3.1': dependencies: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 @@ -3166,13 +3166,13 @@ snapshots: chai: 5.3.3 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.4(vite@7.1.4)': + '@vitest/mocker@3.2.4(vite@7.1.5)': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 - magic-string: 0.30.18 + magic-string: 0.30.19 optionalDependencies: - vite: 7.1.4 + vite: 7.1.5 '@vitest/pretty-format@3.2.4': dependencies: @@ -3187,7 +3187,7 @@ snapshots: '@vitest/snapshot@3.2.4': dependencies: '@vitest/pretty-format': 3.2.4 - magic-string: 0.30.18 + magic-string: 0.30.19 pathe: 2.0.3 '@vitest/spy@3.2.4': @@ -3221,13 +3221,13 @@ snapshots: ansi-regex@5.0.1: {} - ansi-regex@6.2.0: {} + ansi-regex@6.2.2: {} ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 - ansi-styles@6.2.1: {} + ansi-styles@6.2.3: {} any-promise@1.3.0: {} @@ -3320,9 +3320,9 @@ snapshots: browserslist@4.25.4: dependencies: - caniuse-lite: 1.0.30001739 - electron-to-chromium: 1.5.213 - node-releases: 2.0.19 + caniuse-lite: 1.0.30001741 + electron-to-chromium: 1.5.218 + node-releases: 2.0.21 update-browserslist-db: 1.1.3(browserslist@4.25.4) bundle-require@5.1.0(esbuild@0.25.9): @@ -3341,7 +3341,7 @@ snapshots: http-cache-semantics: 4.2.0 keyv: 4.5.4 mimic-response: 4.0.0 - normalize-url: 8.0.2 + normalize-url: 8.1.0 responselike: 3.0.0 call-bind-apply-helpers@1.0.2: @@ -3363,7 +3363,7 @@ snapshots: callsites@3.1.0: {} - caniuse-lite@1.0.30001739: {} + caniuse-lite@1.0.30001741: {} chai@5.3.3: dependencies: @@ -3460,7 +3460,7 @@ snapshots: delayed-stream@1.0.0: {} - detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/c7303495f43d348cac78091ef434443b1ef22485: + detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/285768c0d657f9709cb689893f12895c36923093: dependencies: '@actions/cache': 4.0.5 '@actions/core': 1.11.1 @@ -3491,7 +3491,7 @@ snapshots: eastasianwidth@0.2.0: {} - electron-to-chromium@1.5.213: {} + electron-to-chromium@1.5.218: {} emoji-regex@8.0.0: {} @@ -3636,7 +3636,7 @@ snapshots: get-tsconfig: 4.10.1 is-bun-module: 2.0.0 stable-hash: 0.0.5 - tinyglobby: 0.2.14 + tinyglobby: 0.2.15 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.2))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) @@ -3774,7 +3774,7 @@ snapshots: eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.8.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.9.0(eslint@8.57.1) '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.1 @@ -3886,9 +3886,9 @@ snapshots: fix-dts-default-cjs-exports@1.0.1: dependencies: - magic-string: 0.30.18 + magic-string: 0.30.19 mlly: 1.8.0 - rollup: 4.50.0 + rollup: 4.50.1 flat-cache@3.2.0: dependencies: @@ -4303,7 +4303,7 @@ snapshots: lru-cache@10.4.3: {} - magic-string@0.30.18: + magic-string@0.30.19: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -4363,9 +4363,9 @@ snapshots: dependencies: whatwg-url: 5.0.0 - node-releases@2.0.19: {} + node-releases@2.0.21: {} - normalize-url@8.0.2: {} + normalize-url@8.1.0: {} object-assign@4.1.1: {} @@ -4544,31 +4544,31 @@ snapshots: dependencies: glob: 7.2.3 - rollup@4.50.0: + rollup@4.50.1: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.50.0 - '@rollup/rollup-android-arm64': 4.50.0 - '@rollup/rollup-darwin-arm64': 4.50.0 - '@rollup/rollup-darwin-x64': 4.50.0 - '@rollup/rollup-freebsd-arm64': 4.50.0 - '@rollup/rollup-freebsd-x64': 4.50.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.50.0 - '@rollup/rollup-linux-arm-musleabihf': 4.50.0 - '@rollup/rollup-linux-arm64-gnu': 4.50.0 - '@rollup/rollup-linux-arm64-musl': 4.50.0 - '@rollup/rollup-linux-loongarch64-gnu': 4.50.0 - '@rollup/rollup-linux-ppc64-gnu': 4.50.0 - '@rollup/rollup-linux-riscv64-gnu': 4.50.0 - '@rollup/rollup-linux-riscv64-musl': 4.50.0 - '@rollup/rollup-linux-s390x-gnu': 4.50.0 - '@rollup/rollup-linux-x64-gnu': 4.50.0 - '@rollup/rollup-linux-x64-musl': 4.50.0 - '@rollup/rollup-openharmony-arm64': 4.50.0 - '@rollup/rollup-win32-arm64-msvc': 4.50.0 - '@rollup/rollup-win32-ia32-msvc': 4.50.0 - '@rollup/rollup-win32-x64-msvc': 4.50.0 + '@rollup/rollup-android-arm-eabi': 4.50.1 + '@rollup/rollup-android-arm64': 4.50.1 + '@rollup/rollup-darwin-arm64': 4.50.1 + '@rollup/rollup-darwin-x64': 4.50.1 + '@rollup/rollup-freebsd-arm64': 4.50.1 + '@rollup/rollup-freebsd-x64': 4.50.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.50.1 + '@rollup/rollup-linux-arm-musleabihf': 4.50.1 + '@rollup/rollup-linux-arm64-gnu': 4.50.1 + '@rollup/rollup-linux-arm64-musl': 4.50.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.50.1 + '@rollup/rollup-linux-ppc64-gnu': 4.50.1 + '@rollup/rollup-linux-riscv64-gnu': 4.50.1 + '@rollup/rollup-linux-riscv64-musl': 4.50.1 + '@rollup/rollup-linux-s390x-gnu': 4.50.1 + '@rollup/rollup-linux-x64-gnu': 4.50.1 + '@rollup/rollup-linux-x64-musl': 4.50.1 + '@rollup/rollup-openharmony-arm64': 4.50.1 + '@rollup/rollup-win32-arm64-msvc': 4.50.1 + '@rollup/rollup-win32-ia32-msvc': 4.50.1 + '@rollup/rollup-win32-x64-msvc': 4.50.1 fsevents: 2.3.3 run-parallel@1.2.0: @@ -4693,7 +4693,7 @@ snapshots: dependencies: eastasianwidth: 0.2.0 emoji-regex: 9.2.2 - strip-ansi: 7.1.0 + strip-ansi: 7.1.2 string.prototype.includes@2.0.1: dependencies: @@ -4728,9 +4728,9 @@ snapshots: dependencies: ansi-regex: 5.0.1 - strip-ansi@7.1.0: + strip-ansi@7.1.2: dependencies: - ansi-regex: 6.2.0 + ansi-regex: 6.2.2 strip-bom@3.0.0: {} @@ -4778,7 +4778,7 @@ snapshots: tinyexec@0.3.2: {} - tinyglobby@0.2.14: + tinyglobby@0.2.15: dependencies: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 @@ -4833,11 +4833,11 @@ snapshots: picocolors: 1.1.1 postcss-load-config: 6.0.1(postcss@8.5.6) resolve-from: 5.0.0 - rollup: 4.50.0 + rollup: 4.50.1 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tinyexec: 0.3.2 - tinyglobby: 0.2.14 + tinyglobby: 0.2.15 tree-kill: 1.2.2 optionalDependencies: postcss: 8.5.6 @@ -4948,7 +4948,7 @@ snapshots: debug: 4.4.1 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.1.4 + vite: 7.1.5 transitivePeerDependencies: - '@types/node' - jiti @@ -4963,14 +4963,14 @@ snapshots: - tsx - yaml - vite@7.1.4: + vite@7.1.5: dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 - rollup: 4.50.0 - tinyglobby: 0.2.14 + rollup: 4.50.1 + tinyglobby: 0.2.15 optionalDependencies: fsevents: 2.3.3 @@ -4978,7 +4978,7 @@ snapshots: dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.1.4) + '@vitest/mocker': 3.2.4(vite@7.1.5) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -4987,16 +4987,16 @@ snapshots: chai: 5.3.3 debug: 4.4.1 expect-type: 1.2.2 - magic-string: 0.30.18 + magic-string: 0.30.19 pathe: 2.0.3 picomatch: 4.0.3 std-env: 3.9.0 tinybench: 2.9.0 tinyexec: 0.3.2 - tinyglobby: 0.2.14 + tinyglobby: 0.2.15 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.1.4 + vite: 7.1.5 vite-node: 3.2.4 why-is-node-running: 2.3.0 transitivePeerDependencies: @@ -5088,9 +5088,9 @@ snapshots: wrap-ansi@8.1.0: dependencies: - ansi-styles: 6.2.1 + ansi-styles: 6.2.3 string-width: 5.1.2 - strip-ansi: 7.1.0 + strip-ansi: 7.1.2 wrappy@1.0.2: {}