From 5d4194e2382669e7d582264f98ec1a73cb36f419 Mon Sep 17 00:00:00 2001 From: lucperkins <1523104+lucperkins@users.noreply.github.com> Date: Mon, 5 May 2025 00:38:01 +0000 Subject: [PATCH] Update `detsys-ts` for: `Merge pull request #93 from DeterminateSystems/dependabot/npm_and_yarn/npm-deps-a403fbca50` (`87c69ec3d48cb353229e74cc2ba8abdef2eb2590`) --- dist/index.js | 7537 +++++++++++++++++++++++++++++++----------------- package.json | 2 +- pnpm-lock.yaml | 202 +- 3 files changed, 5004 insertions(+), 2737 deletions(-) diff --git a/dist/index.js b/dist/index.js index d13afad..2ef33e6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -474,12 +474,12 @@ 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__(5989); -const runtime_1 = __nccwpck_require__(5477); -const runtime_2 = __nccwpck_require__(5477); -const runtime_3 = __nccwpck_require__(5477); -const runtime_4 = __nccwpck_require__(5477); -const runtime_5 = __nccwpck_require__(5477); +const runtime_rpc_1 = __nccwpck_require__(4225); +const runtime_1 = __nccwpck_require__(1841); +const runtime_2 = __nccwpck_require__(1841); +const runtime_3 = __nccwpck_require__(1841); +const runtime_4 = __nccwpck_require__(1841); +const runtime_5 = __nccwpck_require__(1841); const cachemetadata_1 = __nccwpck_require__(1573); // @generated message type with reflection information, may provide speed optimized methods class CreateCacheEntryRequest$Type extends runtime_5.MessageType { @@ -939,11 +939,11 @@ exports.CacheServiceClientProtobuf = CacheServiceClientProtobuf; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CacheMetadata = void 0; -const runtime_1 = __nccwpck_require__(5477); -const runtime_2 = __nccwpck_require__(5477); -const runtime_3 = __nccwpck_require__(5477); -const runtime_4 = __nccwpck_require__(5477); -const runtime_5 = __nccwpck_require__(5477); +const runtime_1 = __nccwpck_require__(1841); +const runtime_2 = __nccwpck_require__(1841); +const runtime_3 = __nccwpck_require__(1841); +const runtime_4 = __nccwpck_require__(1841); +const runtime_5 = __nccwpck_require__(1841); const cachescope_1 = __nccwpck_require__(7182); // @generated message type with reflection information, may provide speed optimized methods class CacheMetadata$Type extends runtime_5.MessageType { @@ -1009,11 +1009,11 @@ exports.CacheMetadata = new CacheMetadata$Type(); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CacheScope = void 0; -const runtime_1 = __nccwpck_require__(5477); -const runtime_2 = __nccwpck_require__(5477); -const runtime_3 = __nccwpck_require__(5477); -const runtime_4 = __nccwpck_require__(5477); -const runtime_5 = __nccwpck_require__(5477); +const runtime_1 = __nccwpck_require__(1841); +const runtime_2 = __nccwpck_require__(1841); +const runtime_3 = __nccwpck_require__(1841); +const runtime_4 = __nccwpck_require__(1841); +const runtime_5 = __nccwpck_require__(1841); // @generated message type with reflection information, may provide speed optimized methods class CacheScope$Type extends runtime_5.MessageType { constructor() { @@ -7572,14 +7572,14 @@ exports.AbortSignal = AbortSignal; Object.defineProperty(exports, "__esModule", ({ value: true })); -var coreRestPipeline = __nccwpck_require__(6553); +var coreRestPipeline = __nccwpck_require__(7992); var tslib = __nccwpck_require__(1577); var coreAuth = __nccwpck_require__(9967); -var coreUtil = __nccwpck_require__(402); -var coreHttpCompat = __nccwpck_require__(9781); -var coreClient = __nccwpck_require__(4074); +var coreUtil = __nccwpck_require__(1831); +var coreHttpCompat = __nccwpck_require__(2464); +var coreClient = __nccwpck_require__(927); var coreXml = __nccwpck_require__(4377); -var logger$1 = __nccwpck_require__(5851); +var logger$1 = __nccwpck_require__(9036); var abortController = __nccwpck_require__(764); var crypto = __nccwpck_require__(6982); var coreTracing = __nccwpck_require__(9340); @@ -32560,7 +32560,7 @@ exports.newPipeline = newPipeline; /***/ }), -/***/ 6876: +/***/ 2312: /***/ (function(__unused_webpack_module, exports) { @@ -32617,7 +32617,7 @@ exports.ClientStreamingCall = ClientStreamingCall; /***/ }), -/***/ 5710: +/***/ 2602: /***/ ((__unused_webpack_module, exports) => { @@ -32710,7 +32710,7 @@ exports.Deferred = Deferred; /***/ }), -/***/ 7339: +/***/ 4135: /***/ (function(__unused_webpack_module, exports) { @@ -32766,7 +32766,7 @@ exports.DuplexStreamingCall = DuplexStreamingCall; /***/ }), -/***/ 5989: +/***/ 4225: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -32774,50 +32774,50 @@ exports.DuplexStreamingCall = DuplexStreamingCall; // Note: we do not use `export * from ...` to help tree shakers, // webpack verbose output hints that this should be useful Object.defineProperty(exports, "__esModule", ({ value: true })); -var service_type_1 = __nccwpck_require__(959); +var service_type_1 = __nccwpck_require__(8315); Object.defineProperty(exports, "ServiceType", ({ enumerable: true, get: function () { return service_type_1.ServiceType; } })); -var reflection_info_1 = __nccwpck_require__(7417); +var reflection_info_1 = __nccwpck_require__(674); Object.defineProperty(exports, "readMethodOptions", ({ enumerable: true, get: function () { return reflection_info_1.readMethodOptions; } })); Object.defineProperty(exports, "readMethodOption", ({ enumerable: true, get: function () { return reflection_info_1.readMethodOption; } })); Object.defineProperty(exports, "readServiceOption", ({ enumerable: true, get: function () { return reflection_info_1.readServiceOption; } })); -var rpc_error_1 = __nccwpck_require__(1569); +var rpc_error_1 = __nccwpck_require__(5597); Object.defineProperty(exports, "RpcError", ({ enumerable: true, get: function () { return rpc_error_1.RpcError; } })); -var rpc_options_1 = __nccwpck_require__(4233); +var rpc_options_1 = __nccwpck_require__(2981); Object.defineProperty(exports, "mergeRpcOptions", ({ enumerable: true, get: function () { return rpc_options_1.mergeRpcOptions; } })); -var rpc_output_stream_1 = __nccwpck_require__(6839); +var rpc_output_stream_1 = __nccwpck_require__(7035); Object.defineProperty(exports, "RpcOutputStreamController", ({ enumerable: true, get: function () { return rpc_output_stream_1.RpcOutputStreamController; } })); -var test_transport_1 = __nccwpck_require__(3217); +var test_transport_1 = __nccwpck_require__(3069); Object.defineProperty(exports, "TestTransport", ({ enumerable: true, get: function () { return test_transport_1.TestTransport; } })); -var deferred_1 = __nccwpck_require__(5710); +var deferred_1 = __nccwpck_require__(2602); Object.defineProperty(exports, "Deferred", ({ enumerable: true, get: function () { return deferred_1.Deferred; } })); Object.defineProperty(exports, "DeferredState", ({ enumerable: true, get: function () { return deferred_1.DeferredState; } })); -var duplex_streaming_call_1 = __nccwpck_require__(7339); +var duplex_streaming_call_1 = __nccwpck_require__(4135); Object.defineProperty(exports, "DuplexStreamingCall", ({ enumerable: true, get: function () { return duplex_streaming_call_1.DuplexStreamingCall; } })); -var client_streaming_call_1 = __nccwpck_require__(6876); +var client_streaming_call_1 = __nccwpck_require__(2312); Object.defineProperty(exports, "ClientStreamingCall", ({ enumerable: true, get: function () { return client_streaming_call_1.ClientStreamingCall; } })); -var server_streaming_call_1 = __nccwpck_require__(1208); +var server_streaming_call_1 = __nccwpck_require__(6636); Object.defineProperty(exports, "ServerStreamingCall", ({ enumerable: true, get: function () { return server_streaming_call_1.ServerStreamingCall; } })); -var unary_call_1 = __nccwpck_require__(8691); +var unary_call_1 = __nccwpck_require__(1415); Object.defineProperty(exports, "UnaryCall", ({ enumerable: true, get: function () { return unary_call_1.UnaryCall; } })); -var rpc_interceptor_1 = __nccwpck_require__(5320); +var rpc_interceptor_1 = __nccwpck_require__(5428); Object.defineProperty(exports, "stackIntercept", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackIntercept; } })); Object.defineProperty(exports, "stackDuplexStreamingInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackDuplexStreamingInterceptors; } })); Object.defineProperty(exports, "stackClientStreamingInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackClientStreamingInterceptors; } })); Object.defineProperty(exports, "stackServerStreamingInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackServerStreamingInterceptors; } })); Object.defineProperty(exports, "stackUnaryInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackUnaryInterceptors; } })); -var server_call_context_1 = __nccwpck_require__(3685); +var server_call_context_1 = __nccwpck_require__(1782); Object.defineProperty(exports, "ServerCallContextController", ({ enumerable: true, get: function () { return server_call_context_1.ServerCallContextController; } })); /***/ }), -/***/ 7417: +/***/ 674: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.readServiceOption = exports.readMethodOption = exports.readMethodOptions = exports.normalizeMethodInfo = void 0; -const runtime_1 = __nccwpck_require__(5477); +const runtime_1 = __nccwpck_require__(1841); /** * Turns PartialMethodInfo into MethodInfo. */ @@ -32875,7 +32875,7 @@ exports.readServiceOption = readServiceOption; /***/ }), -/***/ 1569: +/***/ 5597: /***/ ((__unused_webpack_module, exports) => { @@ -32918,13 +32918,13 @@ exports.RpcError = RpcError; /***/ }), -/***/ 5320: +/***/ 5428: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.stackDuplexStreamingInterceptors = exports.stackClientStreamingInterceptors = exports.stackServerStreamingInterceptors = exports.stackUnaryInterceptors = exports.stackIntercept = void 0; -const runtime_1 = __nccwpck_require__(5477); +const runtime_1 = __nccwpck_require__(1841); /** * Creates a "stack" of of all interceptors specified in the given `RpcOptions`. * Used by generated client implementations. @@ -32999,13 +32999,13 @@ exports.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors; /***/ }), -/***/ 4233: +/***/ 2981: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.mergeRpcOptions = void 0; -const runtime_1 = __nccwpck_require__(5477); +const runtime_1 = __nccwpck_require__(1841); /** * Merges custom RPC options with defaults. Returns a new instance and keeps * the "defaults" and the "options" unmodified. @@ -33072,14 +33072,14 @@ function copy(a, into) { /***/ }), -/***/ 6839: +/***/ 7035: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RpcOutputStreamController = void 0; -const deferred_1 = __nccwpck_require__(5710); -const runtime_1 = __nccwpck_require__(5477); +const deferred_1 = __nccwpck_require__(2602); +const runtime_1 = __nccwpck_require__(1841); /** * A `RpcOutputStream` that you control. */ @@ -33092,6 +33092,10 @@ class RpcOutputStreamController { cmp: [], }; this._closed = false; + // --- RpcOutputStream async iterator API + // iterator state. + // is undefined when no iterator has been acquired yet. + this._itState = { q: [] }; } // --- RpcOutputStream callback API onNext(callback) { @@ -33191,10 +33195,6 @@ class RpcOutputStreamController { * messages are queued. */ [Symbol.asyncIterator]() { - // init the iterator state, enabling pushIt() - if (!this._itState) { - this._itState = { q: [] }; - } // if we are closed, we are definitely not receiving any more messages. // but we can't let the iterator get stuck. we want to either: // a) finish the new iterator immediately, because we are completed @@ -33227,8 +33227,6 @@ class RpcOutputStreamController { // this either resolves a pending promise, or enqueues the result. pushIt(result) { let state = this._itState; - if (!state) - return; // is the consumer waiting for us? if (state.p) { // yes, consumer is waiting for this promise. @@ -33251,7 +33249,7 @@ exports.RpcOutputStreamController = RpcOutputStreamController; /***/ }), -/***/ 3685: +/***/ 1782: /***/ ((__unused_webpack_module, exports) => { @@ -33318,7 +33316,7 @@ exports.ServerCallContextController = ServerCallContextController; /***/ }), -/***/ 1208: +/***/ 6636: /***/ (function(__unused_webpack_module, exports) { @@ -33375,13 +33373,13 @@ exports.ServerStreamingCall = ServerStreamingCall; /***/ }), -/***/ 959: +/***/ 8315: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ServiceType = void 0; -const reflection_info_1 = __nccwpck_require__(7417); +const reflection_info_1 = __nccwpck_require__(674); class ServiceType { constructor(typeName, methods, options) { this.typeName = typeName; @@ -33394,7 +33392,7 @@ exports.ServiceType = ServiceType; /***/ }), -/***/ 3217: +/***/ 3069: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -33409,14 +33407,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TestTransport = void 0; -const rpc_error_1 = __nccwpck_require__(1569); -const runtime_1 = __nccwpck_require__(5477); -const rpc_output_stream_1 = __nccwpck_require__(6839); -const rpc_options_1 = __nccwpck_require__(4233); -const unary_call_1 = __nccwpck_require__(8691); -const server_streaming_call_1 = __nccwpck_require__(1208); -const client_streaming_call_1 = __nccwpck_require__(6876); -const duplex_streaming_call_1 = __nccwpck_require__(7339); +const rpc_error_1 = __nccwpck_require__(5597); +const runtime_1 = __nccwpck_require__(1841); +const rpc_output_stream_1 = __nccwpck_require__(7035); +const rpc_options_1 = __nccwpck_require__(2981); +const unary_call_1 = __nccwpck_require__(1415); +const server_streaming_call_1 = __nccwpck_require__(6636); +const client_streaming_call_1 = __nccwpck_require__(2312); +const duplex_streaming_call_1 = __nccwpck_require__(4135); /** * Transport for testing. */ @@ -33722,7 +33720,7 @@ class TestInputStream { /***/ }), -/***/ 8691: +/***/ 1415: /***/ (function(__unused_webpack_module, exports) { @@ -33778,7 +33776,7 @@ exports.UnaryCall = UnaryCall; /***/ }), -/***/ 3707: +/***/ 9799: /***/ ((__unused_webpack_module, exports) => { @@ -33828,7 +33826,7 @@ exports.assertFloat32 = assertFloat32; /***/ }), -/***/ 2114: +/***/ 2726: /***/ ((__unused_webpack_module, exports) => { @@ -33953,7 +33951,7 @@ exports.base64encode = base64encode; /***/ }), -/***/ 4957: +/***/ 3025: /***/ ((__unused_webpack_module, exports) => { @@ -34060,15 +34058,15 @@ var WireType; /***/ }), -/***/ 7338: +/***/ 5350: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BinaryReader = exports.binaryReadOptions = void 0; -const binary_format_contract_1 = __nccwpck_require__(4957); -const pb_long_1 = __nccwpck_require__(9682); -const goog_varint_1 = __nccwpck_require__(2836); +const binary_format_contract_1 = __nccwpck_require__(3025); +const pb_long_1 = __nccwpck_require__(1278); +const goog_varint_1 = __nccwpck_require__(9848); const defaultsRead = { readUnknownField: true, readerFactory: bytes => new BinaryReader(bytes), @@ -34250,15 +34248,15 @@ exports.BinaryReader = BinaryReader; /***/ }), -/***/ 634: +/***/ 3302: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BinaryWriter = exports.binaryWriteOptions = void 0; -const pb_long_1 = __nccwpck_require__(9682); -const goog_varint_1 = __nccwpck_require__(2836); -const assert_1 = __nccwpck_require__(3707); +const pb_long_1 = __nccwpck_require__(1278); +const goog_varint_1 = __nccwpck_require__(9848); +const assert_1 = __nccwpck_require__(9799); const defaultsWrite = { writeUnknownFields: true, writerFactory: () => new BinaryWriter(), @@ -34489,7 +34487,7 @@ exports.BinaryWriter = BinaryWriter; /***/ }), -/***/ 4750: +/***/ 2786: /***/ ((__unused_webpack_module, exports) => { @@ -34583,7 +34581,7 @@ exports.listEnumNumbers = listEnumNumbers; /***/ }), -/***/ 2836: +/***/ 9848: /***/ ((__unused_webpack_module, exports) => { @@ -34864,7 +34862,7 @@ exports.varint32read = varint32read; /***/ }), -/***/ 5477: +/***/ 1841: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -34873,46 +34871,46 @@ exports.varint32read = varint32read; // webpack verbose output hints that this should be useful Object.defineProperty(exports, "__esModule", ({ value: true })); // Convenience JSON typings and corresponding type guards -var json_typings_1 = __nccwpck_require__(7506); +var json_typings_1 = __nccwpck_require__(6718); Object.defineProperty(exports, "typeofJsonValue", ({ enumerable: true, get: function () { return json_typings_1.typeofJsonValue; } })); Object.defineProperty(exports, "isJsonObject", ({ enumerable: true, get: function () { return json_typings_1.isJsonObject; } })); // Base 64 encoding -var base64_1 = __nccwpck_require__(2114); +var base64_1 = __nccwpck_require__(2726); Object.defineProperty(exports, "base64decode", ({ enumerable: true, get: function () { return base64_1.base64decode; } })); Object.defineProperty(exports, "base64encode", ({ enumerable: true, get: function () { return base64_1.base64encode; } })); // UTF8 encoding -var protobufjs_utf8_1 = __nccwpck_require__(505); +var protobufjs_utf8_1 = __nccwpck_require__(6869); Object.defineProperty(exports, "utf8read", ({ enumerable: true, get: function () { return protobufjs_utf8_1.utf8read; } })); // Binary format contracts, options for reading and writing, for example -var binary_format_contract_1 = __nccwpck_require__(4957); +var binary_format_contract_1 = __nccwpck_require__(3025); Object.defineProperty(exports, "WireType", ({ enumerable: true, get: function () { return binary_format_contract_1.WireType; } })); Object.defineProperty(exports, "mergeBinaryOptions", ({ enumerable: true, get: function () { return binary_format_contract_1.mergeBinaryOptions; } })); Object.defineProperty(exports, "UnknownFieldHandler", ({ enumerable: true, get: function () { return binary_format_contract_1.UnknownFieldHandler; } })); // Standard IBinaryReader implementation -var binary_reader_1 = __nccwpck_require__(7338); +var binary_reader_1 = __nccwpck_require__(5350); 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__(634); +var binary_writer_1 = __nccwpck_require__(3302); 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 -var pb_long_1 = __nccwpck_require__(9682); +var pb_long_1 = __nccwpck_require__(1278); Object.defineProperty(exports, "PbLong", ({ enumerable: true, get: function () { return pb_long_1.PbLong; } })); Object.defineProperty(exports, "PbULong", ({ enumerable: true, get: function () { return pb_long_1.PbULong; } })); // JSON format contracts, options for reading and writing, for example -var json_format_contract_1 = __nccwpck_require__(4674); +var json_format_contract_1 = __nccwpck_require__(1422); Object.defineProperty(exports, "jsonReadOptions", ({ enumerable: true, get: function () { return json_format_contract_1.jsonReadOptions; } })); Object.defineProperty(exports, "jsonWriteOptions", ({ enumerable: true, get: function () { return json_format_contract_1.jsonWriteOptions; } })); Object.defineProperty(exports, "mergeJsonOptions", ({ enumerable: true, get: function () { return json_format_contract_1.mergeJsonOptions; } })); // Message type contract -var message_type_contract_1 = __nccwpck_require__(5114); +var message_type_contract_1 = __nccwpck_require__(9454); Object.defineProperty(exports, "MESSAGE_TYPE", ({ enumerable: true, get: function () { return message_type_contract_1.MESSAGE_TYPE; } })); // Message type implementation via reflection -var message_type_1 = __nccwpck_require__(7503); +var message_type_1 = __nccwpck_require__(2627); Object.defineProperty(exports, "MessageType", ({ enumerable: true, get: function () { return message_type_1.MessageType; } })); // Reflection info, generated by the plugin, exposed to the user, used by reflection ops -var reflection_info_1 = __nccwpck_require__(7369); +var reflection_info_1 = __nccwpck_require__(4181); Object.defineProperty(exports, "ScalarType", ({ enumerable: true, get: function () { return reflection_info_1.ScalarType; } })); Object.defineProperty(exports, "LongType", ({ enumerable: true, get: function () { return reflection_info_1.LongType; } })); Object.defineProperty(exports, "RepeatType", ({ enumerable: true, get: function () { return reflection_info_1.RepeatType; } })); @@ -34921,44 +34919,44 @@ Object.defineProperty(exports, "readFieldOptions", ({ enumerable: true, get: fun Object.defineProperty(exports, "readFieldOption", ({ enumerable: true, get: function () { return reflection_info_1.readFieldOption; } })); Object.defineProperty(exports, "readMessageOption", ({ enumerable: true, get: function () { return reflection_info_1.readMessageOption; } })); // Message operations via reflection -var reflection_type_check_1 = __nccwpck_require__(2664); +var reflection_type_check_1 = __nccwpck_require__(4431); Object.defineProperty(exports, "ReflectionTypeCheck", ({ enumerable: true, get: function () { return reflection_type_check_1.ReflectionTypeCheck; } })); -var reflection_create_1 = __nccwpck_require__(8877); +var reflection_create_1 = __nccwpck_require__(489); Object.defineProperty(exports, "reflectionCreate", ({ enumerable: true, get: function () { return reflection_create_1.reflectionCreate; } })); -var reflection_scalar_default_1 = __nccwpck_require__(4925); +var reflection_scalar_default_1 = __nccwpck_require__(2353); Object.defineProperty(exports, "reflectionScalarDefault", ({ enumerable: true, get: function () { return reflection_scalar_default_1.reflectionScalarDefault; } })); -var reflection_merge_partial_1 = __nccwpck_require__(9257); +var reflection_merge_partial_1 = __nccwpck_require__(90); Object.defineProperty(exports, "reflectionMergePartial", ({ enumerable: true, get: function () { return reflection_merge_partial_1.reflectionMergePartial; } })); -var reflection_equals_1 = __nccwpck_require__(2680); +var reflection_equals_1 = __nccwpck_require__(7156); Object.defineProperty(exports, "reflectionEquals", ({ enumerable: true, get: function () { return reflection_equals_1.reflectionEquals; } })); -var reflection_binary_reader_1 = __nccwpck_require__(3362); +var reflection_binary_reader_1 = __nccwpck_require__(2838); Object.defineProperty(exports, "ReflectionBinaryReader", ({ enumerable: true, get: function () { return reflection_binary_reader_1.ReflectionBinaryReader; } })); -var reflection_binary_writer_1 = __nccwpck_require__(7650); +var reflection_binary_writer_1 = __nccwpck_require__(1830); Object.defineProperty(exports, "ReflectionBinaryWriter", ({ enumerable: true, get: function () { return reflection_binary_writer_1.ReflectionBinaryWriter; } })); -var reflection_json_reader_1 = __nccwpck_require__(5855); +var reflection_json_reader_1 = __nccwpck_require__(9915); Object.defineProperty(exports, "ReflectionJsonReader", ({ enumerable: true, get: function () { return reflection_json_reader_1.ReflectionJsonReader; } })); -var reflection_json_writer_1 = __nccwpck_require__(9359); +var reflection_json_writer_1 = __nccwpck_require__(2891); Object.defineProperty(exports, "ReflectionJsonWriter", ({ enumerable: true, get: function () { return reflection_json_writer_1.ReflectionJsonWriter; } })); -var reflection_contains_message_type_1 = __nccwpck_require__(2683); +var reflection_contains_message_type_1 = __nccwpck_require__(4311); Object.defineProperty(exports, "containsMessageType", ({ enumerable: true, get: function () { return reflection_contains_message_type_1.containsMessageType; } })); // Oneof helpers -var oneof_1 = __nccwpck_require__(7300); +var oneof_1 = __nccwpck_require__(304); Object.defineProperty(exports, "isOneofGroup", ({ enumerable: true, get: function () { return oneof_1.isOneofGroup; } })); Object.defineProperty(exports, "setOneofValue", ({ enumerable: true, get: function () { return oneof_1.setOneofValue; } })); Object.defineProperty(exports, "getOneofValue", ({ enumerable: true, get: function () { return oneof_1.getOneofValue; } })); Object.defineProperty(exports, "clearOneofValue", ({ enumerable: true, get: function () { return oneof_1.clearOneofValue; } })); Object.defineProperty(exports, "getSelectedOneofValue", ({ enumerable: true, get: function () { return oneof_1.getSelectedOneofValue; } })); // Enum object type guard and reflection util, may be interesting to the user. -var enum_object_1 = __nccwpck_require__(4750); +var enum_object_1 = __nccwpck_require__(2786); Object.defineProperty(exports, "listEnumValues", ({ enumerable: true, get: function () { return enum_object_1.listEnumValues; } })); Object.defineProperty(exports, "listEnumNames", ({ enumerable: true, get: function () { return enum_object_1.listEnumNames; } })); Object.defineProperty(exports, "listEnumNumbers", ({ enumerable: true, get: function () { return enum_object_1.listEnumNumbers; } })); Object.defineProperty(exports, "isEnumObject", ({ enumerable: true, get: function () { return enum_object_1.isEnumObject; } })); // lowerCamelCase() is exported for plugin, rpc-runtime and other rpc packages -var lower_camel_case_1 = __nccwpck_require__(1960); +var lower_camel_case_1 = __nccwpck_require__(1444); Object.defineProperty(exports, "lowerCamelCase", ({ enumerable: true, get: function () { return lower_camel_case_1.lowerCamelCase; } })); // assertion functions are exported for plugin, may also be useful to user -var assert_1 = __nccwpck_require__(3707); +var assert_1 = __nccwpck_require__(9799); Object.defineProperty(exports, "assert", ({ enumerable: true, get: function () { return assert_1.assert; } })); Object.defineProperty(exports, "assertNever", ({ enumerable: true, get: function () { return assert_1.assertNever; } })); Object.defineProperty(exports, "assertInt32", ({ enumerable: true, get: function () { return assert_1.assertInt32; } })); @@ -34968,7 +34966,7 @@ Object.defineProperty(exports, "assertFloat32", ({ enumerable: true, get: functi /***/ }), -/***/ 4674: +/***/ 1422: /***/ ((__unused_webpack_module, exports) => { @@ -35010,7 +35008,7 @@ exports.mergeJsonOptions = mergeJsonOptions; /***/ }), -/***/ 7506: +/***/ 6718: /***/ ((__unused_webpack_module, exports) => { @@ -35042,7 +35040,7 @@ exports.isJsonObject = isJsonObject; /***/ }), -/***/ 1960: +/***/ 1444: /***/ ((__unused_webpack_module, exports) => { @@ -35084,7 +35082,7 @@ exports.lowerCamelCase = lowerCamelCase; /***/ }), -/***/ 5114: +/***/ 9454: /***/ ((__unused_webpack_module, exports) => { @@ -35101,26 +35099,26 @@ exports.MESSAGE_TYPE = Symbol.for("protobuf-ts/message-type"); /***/ }), -/***/ 7503: +/***/ 2627: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MessageType = void 0; -const message_type_contract_1 = __nccwpck_require__(5114); -const reflection_info_1 = __nccwpck_require__(7369); -const reflection_type_check_1 = __nccwpck_require__(2664); -const reflection_json_reader_1 = __nccwpck_require__(5855); -const reflection_json_writer_1 = __nccwpck_require__(9359); -const reflection_binary_reader_1 = __nccwpck_require__(3362); -const reflection_binary_writer_1 = __nccwpck_require__(7650); -const reflection_create_1 = __nccwpck_require__(8877); -const reflection_merge_partial_1 = __nccwpck_require__(9257); -const json_typings_1 = __nccwpck_require__(7506); -const json_format_contract_1 = __nccwpck_require__(4674); -const reflection_equals_1 = __nccwpck_require__(2680); -const binary_writer_1 = __nccwpck_require__(634); -const binary_reader_1 = __nccwpck_require__(7338); +const message_type_contract_1 = __nccwpck_require__(9454); +const reflection_info_1 = __nccwpck_require__(4181); +const reflection_type_check_1 = __nccwpck_require__(4431); +const reflection_json_reader_1 = __nccwpck_require__(9915); +const reflection_json_writer_1 = __nccwpck_require__(2891); +const reflection_binary_reader_1 = __nccwpck_require__(2838); +const reflection_binary_writer_1 = __nccwpck_require__(1830); +const reflection_create_1 = __nccwpck_require__(489); +const reflection_merge_partial_1 = __nccwpck_require__(90); +const json_typings_1 = __nccwpck_require__(6718); +const json_format_contract_1 = __nccwpck_require__(1422); +const reflection_equals_1 = __nccwpck_require__(7156); +const binary_writer_1 = __nccwpck_require__(3302); +const binary_reader_1 = __nccwpck_require__(5350); const baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})); /** * This standard message type provides reflection-based @@ -35283,7 +35281,7 @@ exports.MessageType = MessageType; /***/ }), -/***/ 7300: +/***/ 304: /***/ ((__unused_webpack_module, exports) => { @@ -35404,13 +35402,13 @@ exports.getSelectedOneofValue = getSelectedOneofValue; /***/ }), -/***/ 9682: +/***/ 1278: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PbLong = exports.PbULong = exports.detectBi = void 0; -const goog_varint_1 = __nccwpck_require__(2836); +const goog_varint_1 = __nccwpck_require__(9848); let BI; function detectBi() { const dv = new DataView(new ArrayBuffer(8)); @@ -35649,7 +35647,7 @@ PbLong.ZERO = new PbLong(0, 0); /***/ }), -/***/ 505: +/***/ 6869: /***/ ((__unused_webpack_module, exports) => { @@ -35731,16 +35729,16 @@ exports.utf8read = utf8read; /***/ }), -/***/ 3362: +/***/ 2838: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ReflectionBinaryReader = void 0; -const binary_format_contract_1 = __nccwpck_require__(4957); -const reflection_info_1 = __nccwpck_require__(7369); -const reflection_long_convert_1 = __nccwpck_require__(9141); -const reflection_scalar_default_1 = __nccwpck_require__(4925); +const binary_format_contract_1 = __nccwpck_require__(3025); +const reflection_info_1 = __nccwpck_require__(4181); +const reflection_long_convert_1 = __nccwpck_require__(6537); +const reflection_scalar_default_1 = __nccwpck_require__(2353); /** * Reads proto3 messages in binary format using reflection information. * @@ -35921,16 +35919,16 @@ exports.ReflectionBinaryReader = ReflectionBinaryReader; /***/ }), -/***/ 7650: +/***/ 1830: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ReflectionBinaryWriter = void 0; -const binary_format_contract_1 = __nccwpck_require__(4957); -const reflection_info_1 = __nccwpck_require__(7369); -const assert_1 = __nccwpck_require__(3707); -const pb_long_1 = __nccwpck_require__(9682); +const binary_format_contract_1 = __nccwpck_require__(3025); +const reflection_info_1 = __nccwpck_require__(4181); +const assert_1 = __nccwpck_require__(9799); +const pb_long_1 = __nccwpck_require__(1278); /** * Writes proto3 messages in binary format using reflection information. * @@ -36161,13 +36159,13 @@ exports.ReflectionBinaryWriter = ReflectionBinaryWriter; /***/ }), -/***/ 2683: +/***/ 4311: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.containsMessageType = void 0; -const message_type_contract_1 = __nccwpck_require__(5114); +const message_type_contract_1 = __nccwpck_require__(9454); /** * Check if the provided object is a proto message. * @@ -36182,14 +36180,14 @@ exports.containsMessageType = containsMessageType; /***/ }), -/***/ 8877: +/***/ 489: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.reflectionCreate = void 0; -const reflection_scalar_default_1 = __nccwpck_require__(4925); -const message_type_contract_1 = __nccwpck_require__(5114); +const reflection_scalar_default_1 = __nccwpck_require__(2353); +const message_type_contract_1 = __nccwpck_require__(9454); /** * Creates an instance of the generic message, using the field * information. @@ -36237,13 +36235,13 @@ exports.reflectionCreate = reflectionCreate; /***/ }), -/***/ 2680: +/***/ 7156: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.reflectionEquals = void 0; -const reflection_info_1 = __nccwpck_require__(7369); +const reflection_info_1 = __nccwpck_require__(4181); /** * Determines whether two message of the same type have the same field values. * Checks for deep equality, traversing repeated fields, oneof groups, maps @@ -36321,13 +36319,13 @@ function repeatedMsgEq(type, a, b) { /***/ }), -/***/ 7369: +/***/ 4181: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.readMessageOption = exports.readFieldOption = exports.readFieldOptions = exports.normalizeFieldInfo = exports.RepeatType = exports.LongType = exports.ScalarType = void 0; -const lower_camel_case_1 = __nccwpck_require__(1960); +const lower_camel_case_1 = __nccwpck_require__(1444); /** * Scalar value types. This is a subset of field types declared by protobuf * enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE @@ -36486,18 +36484,18 @@ exports.readMessageOption = readMessageOption; /***/ }), -/***/ 5855: +/***/ 9915: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ReflectionJsonReader = void 0; -const json_typings_1 = __nccwpck_require__(7506); -const base64_1 = __nccwpck_require__(2114); -const reflection_info_1 = __nccwpck_require__(7369); -const pb_long_1 = __nccwpck_require__(9682); -const assert_1 = __nccwpck_require__(3707); -const reflection_long_convert_1 = __nccwpck_require__(9141); +const json_typings_1 = __nccwpck_require__(6718); +const base64_1 = __nccwpck_require__(2726); +const reflection_info_1 = __nccwpck_require__(4181); +const pb_long_1 = __nccwpck_require__(1278); +const assert_1 = __nccwpck_require__(9799); +const reflection_long_convert_1 = __nccwpck_require__(6537); /** * Reads proto3 messages in canonical JSON format using reflection information. * @@ -36810,16 +36808,16 @@ exports.ReflectionJsonReader = ReflectionJsonReader; /***/ }), -/***/ 9359: +/***/ 2891: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ReflectionJsonWriter = void 0; -const base64_1 = __nccwpck_require__(2114); -const pb_long_1 = __nccwpck_require__(9682); -const reflection_info_1 = __nccwpck_require__(7369); -const assert_1 = __nccwpck_require__(3707); +const base64_1 = __nccwpck_require__(2726); +const pb_long_1 = __nccwpck_require__(1278); +const reflection_info_1 = __nccwpck_require__(4181); +const assert_1 = __nccwpck_require__(9799); /** * Writes proto3 messages in canonical JSON format using reflection * information. @@ -37047,13 +37045,13 @@ exports.ReflectionJsonWriter = ReflectionJsonWriter; /***/ }), -/***/ 9141: +/***/ 6537: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.reflectionLongConvert = void 0; -const reflection_info_1 = __nccwpck_require__(7369); +const reflection_info_1 = __nccwpck_require__(4181); /** * Utility method to convert a PbLong or PbUlong to a JavaScript * representation during runtime. @@ -37078,7 +37076,7 @@ exports.reflectionLongConvert = reflectionLongConvert; /***/ }), -/***/ 9257: +/***/ 90: /***/ ((__unused_webpack_module, exports) => { @@ -37175,15 +37173,15 @@ exports.reflectionMergePartial = reflectionMergePartial; /***/ }), -/***/ 4925: +/***/ 2353: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.reflectionScalarDefault = void 0; -const reflection_info_1 = __nccwpck_require__(7369); -const reflection_long_convert_1 = __nccwpck_require__(9141); -const pb_long_1 = __nccwpck_require__(9682); +const reflection_info_1 = __nccwpck_require__(4181); +const reflection_long_convert_1 = __nccwpck_require__(6537); +const pb_long_1 = __nccwpck_require__(1278); /** * Creates the default value for a scalar type. */ @@ -37219,14 +37217,14 @@ exports.reflectionScalarDefault = reflectionScalarDefault; /***/ }), -/***/ 2664: +/***/ 4431: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ReflectionTypeCheck = void 0; -const reflection_info_1 = __nccwpck_require__(7369); -const oneof_1 = __nccwpck_require__(7300); +const reflection_info_1 = __nccwpck_require__(4181); +const oneof_1 = __nccwpck_require__(304); // noinspection JSMethodCanBeStatic class ReflectionTypeCheck { constructor(info) { @@ -69259,7 +69257,7 @@ exports.AzureKeyCredential = AzureKeyCredential; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AzureNamedKeyCredential = void 0; exports.isNamedKeyCredential = isNamedKeyCredential; -const core_util_1 = __nccwpck_require__(402); +const core_util_1 = __nccwpck_require__(1831); /** * A static name/key-based credential that supports updating * the underlying name and key values. @@ -69332,7 +69330,7 @@ function isNamedKeyCredential(credential) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AzureSASCredential = void 0; exports.isSASCredential = isSASCredential; -const core_util_1 = __nccwpck_require__(402); +const core_util_1 = __nccwpck_require__(1831); /** * A static-signature-based credential that supports updating * the underlying signature value. @@ -69414,7 +69412,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__(402); +const core_util_1 = __nccwpck_require__(1831); /** * Tests an object to determine whether it implements KeyCredential. * @@ -69473,7 +69471,7 @@ function isTokenCredential(credential) { /***/ }), -/***/ 4176: +/***/ 1091: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -69482,8 +69480,8 @@ function isTokenCredential(credential) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.parseCAEChallenge = parseCAEChallenge; exports.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; -const log_js_1 = __nccwpck_require__(4240); -const base64_js_1 = __nccwpck_require__(4187); +const log_js_1 = __nccwpck_require__(8049); +const base64_js_1 = __nccwpck_require__(448); /** * Converts: `Bearer a="b", c="d", Bearer d="e", f="g"`. * Into: `[ { a: 'b', c: 'd' }, { d: 'e', f: 'g' } ]`. @@ -69556,7 +69554,7 @@ async function authorizeRequestOnClaimChallenge(onChallengeOptions) { /***/ }), -/***/ 1260: +/***/ 4746: /***/ ((__unused_webpack_module, exports) => { @@ -69680,7 +69678,7 @@ function requestToOptions(request) { /***/ }), -/***/ 4187: +/***/ 448: /***/ ((__unused_webpack_module, exports) => { @@ -69728,7 +69726,7 @@ function decodeStringToString(value) { /***/ }), -/***/ 8809: +/***/ 4600: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -69737,10 +69735,10 @@ function decodeStringToString(value) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.deserializationPolicyName = void 0; exports.deserializationPolicy = deserializationPolicy; -const interfaces_js_1 = __nccwpck_require__(9691); -const core_rest_pipeline_1 = __nccwpck_require__(6553); -const serializer_js_1 = __nccwpck_require__(2372); -const operationHelpers_js_1 = __nccwpck_require__(6202); +const interfaces_js_1 = __nccwpck_require__(9275); +const core_rest_pipeline_1 = __nccwpck_require__(7992); +const serializer_js_1 = __nccwpck_require__(2335); +const operationHelpers_js_1 = __nccwpck_require__(693); const defaultJsonContentTypes = ["application/json", "text/json"]; const defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; /** @@ -69971,7 +69969,7 @@ async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, /***/ }), -/***/ 4353: +/***/ 8244: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -69979,7 +69977,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__(6553); +const core_rest_pipeline_1 = __nccwpck_require__(7992); let cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -69991,7 +69989,7 @@ function getCachedDefaultHttpClient() { /***/ }), -/***/ 4074: +/***/ 927: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -69999,31 +69997,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__(2372); +var serializer_js_1 = __nccwpck_require__(2335); 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__(3038); +var serviceClient_js_1 = __nccwpck_require__(2407); Object.defineProperty(exports, "ServiceClient", ({ enumerable: true, get: function () { return serviceClient_js_1.ServiceClient; } })); -var pipeline_js_1 = __nccwpck_require__(662); +var pipeline_js_1 = __nccwpck_require__(3509); Object.defineProperty(exports, "createClientPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createClientPipeline; } })); -var interfaces_js_1 = __nccwpck_require__(9691); +var interfaces_js_1 = __nccwpck_require__(9275); 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__(8809); +var deserializationPolicy_js_1 = __nccwpck_require__(4600); 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__(7724); +var serializationPolicy_js_1 = __nccwpck_require__(829); 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__(4176); +var authorizeRequestOnClaimChallenge_js_1 = __nccwpck_require__(1091); Object.defineProperty(exports, "authorizeRequestOnClaimChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnClaimChallenge_js_1.authorizeRequestOnClaimChallenge; } })); -var authorizeRequestOnTenantChallenge_js_1 = __nccwpck_require__(1260); +var authorizeRequestOnTenantChallenge_js_1 = __nccwpck_require__(4746); Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnTenantChallenge_js_1.authorizeRequestOnTenantChallenge; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 7524: +/***/ 943: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -70032,7 +70030,7 @@ Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", ({ enumerabl Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; exports.getPathStringFromParameter = getPathStringFromParameter; -const serializer_js_1 = __nccwpck_require__(2372); +const serializer_js_1 = __nccwpck_require__(2335); /** * Gets the list of status codes for streaming responses. * @internal @@ -70072,7 +70070,7 @@ function getPathStringFromParameter(parameter) { /***/ }), -/***/ 9691: +/***/ 9275: /***/ ((__unused_webpack_module, exports) => { @@ -70092,7 +70090,7 @@ exports.XML_CHARKEY = "_"; /***/ }), -/***/ 4240: +/***/ 8049: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -70100,13 +70098,13 @@ exports.XML_CHARKEY = "_"; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.logger = void 0; -const logger_1 = __nccwpck_require__(5851); +const logger_1 = __nccwpck_require__(9036); exports.logger = (0, logger_1.createClientLogger)("core-client"); //# sourceMappingURL=log.js.map /***/ }), -/***/ 6202: +/***/ 693: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -70115,7 +70113,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__(4659); +const state_js_1 = __nccwpck_require__(9170); /** * @internal * Retrieves the value to use for a given operation argument @@ -70210,7 +70208,7 @@ function getOperationRequestInfo(request) { /***/ }), -/***/ 662: +/***/ 3509: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -70218,9 +70216,9 @@ function getOperationRequestInfo(request) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createClientPipeline = createClientPipeline; -const deserializationPolicy_js_1 = __nccwpck_require__(8809); -const core_rest_pipeline_1 = __nccwpck_require__(6553); -const serializationPolicy_js_1 = __nccwpck_require__(7724); +const deserializationPolicy_js_1 = __nccwpck_require__(4600); +const core_rest_pipeline_1 = __nccwpck_require__(7992); +const serializationPolicy_js_1 = __nccwpck_require__(829); /** * Creates a new Pipeline for use with a Service Client. * Adds in deserializationPolicy by default. @@ -70245,7 +70243,7 @@ function createClientPipeline(options = {}) { /***/ }), -/***/ 7724: +/***/ 829: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -70256,10 +70254,10 @@ exports.serializationPolicyName = void 0; exports.serializationPolicy = serializationPolicy; exports.serializeHeaders = serializeHeaders; exports.serializeRequestBody = serializeRequestBody; -const interfaces_js_1 = __nccwpck_require__(9691); -const operationHelpers_js_1 = __nccwpck_require__(6202); -const serializer_js_1 = __nccwpck_require__(2372); -const interfaceHelpers_js_1 = __nccwpck_require__(7524); +const interfaces_js_1 = __nccwpck_require__(9275); +const operationHelpers_js_1 = __nccwpck_require__(693); +const serializer_js_1 = __nccwpck_require__(2335); +const interfaceHelpers_js_1 = __nccwpck_require__(943); /** * The programmatic identifier of the serializationPolicy. */ @@ -70410,7 +70408,7 @@ function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { /***/ }), -/***/ 2372: +/***/ 2335: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -70420,9 +70418,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MapperTypeNames = void 0; exports.createSerializer = createSerializer; const tslib_1 = __nccwpck_require__(1577); -const base64 = tslib_1.__importStar(__nccwpck_require__(4187)); -const interfaces_js_1 = __nccwpck_require__(9691); -const utils_js_1 = __nccwpck_require__(667); +const base64 = tslib_1.__importStar(__nccwpck_require__(448)); +const interfaces_js_1 = __nccwpck_require__(9275); +const utils_js_1 = __nccwpck_require__(8250); class SerializerImpl { constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; @@ -71343,7 +71341,7 @@ exports.MapperTypeNames = { /***/ }), -/***/ 3038: +/***/ 2407: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -71351,14 +71349,14 @@ exports.MapperTypeNames = { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ServiceClient = void 0; -const core_rest_pipeline_1 = __nccwpck_require__(6553); -const pipeline_js_1 = __nccwpck_require__(662); -const utils_js_1 = __nccwpck_require__(667); -const httpClientCache_js_1 = __nccwpck_require__(4353); -const operationHelpers_js_1 = __nccwpck_require__(6202); -const urlHelpers_js_1 = __nccwpck_require__(5006); -const interfaceHelpers_js_1 = __nccwpck_require__(7524); -const log_js_1 = __nccwpck_require__(4240); +const core_rest_pipeline_1 = __nccwpck_require__(7992); +const pipeline_js_1 = __nccwpck_require__(3509); +const utils_js_1 = __nccwpck_require__(8250); +const httpClientCache_js_1 = __nccwpck_require__(8244); +const operationHelpers_js_1 = __nccwpck_require__(693); +const urlHelpers_js_1 = __nccwpck_require__(9117); +const interfaceHelpers_js_1 = __nccwpck_require__(943); +const log_js_1 = __nccwpck_require__(8049); /** * Initializes a new instance of the ServiceClient. */ @@ -71501,7 +71499,7 @@ function getCredentialScopes(options) { /***/ }), -/***/ 4659: +/***/ 9170: /***/ ((__unused_webpack_module, exports) => { @@ -71519,7 +71517,7 @@ exports.state = { /***/ }), -/***/ 5006: +/***/ 9117: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -71528,8 +71526,8 @@ exports.state = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRequestUrl = getRequestUrl; exports.appendQueryParams = appendQueryParams; -const operationHelpers_js_1 = __nccwpck_require__(6202); -const interfaceHelpers_js_1 = __nccwpck_require__(7524); +const operationHelpers_js_1 = __nccwpck_require__(693); +const interfaceHelpers_js_1 = __nccwpck_require__(943); const CollectionFormatToDelimiterMap = { CSV: ",", SSV: " ", @@ -71764,7 +71762,7 @@ function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false /***/ }), -/***/ 667: +/***/ 8250: /***/ ((__unused_webpack_module, exports) => { @@ -71891,7 +71889,7 @@ function flattenResponse(fullResponse, responseSpec) { /***/ }), -/***/ 5651: +/***/ 7828: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -71899,10 +71897,10 @@ 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__(5770); -const core_rest_pipeline_1 = __nccwpck_require__(6553); -const core_client_1 = __nccwpck_require__(4074); -const response_js_1 = __nccwpck_require__(2714); +const disableKeepAlivePolicy_js_1 = __nccwpck_require__(7215); +const core_rest_pipeline_1 = __nccwpck_require__(7992); +const core_client_1 = __nccwpck_require__(927); +const response_js_1 = __nccwpck_require__(7209); /** * Client to provide compatability between core V1 & V2. */ @@ -71952,7 +71950,7 @@ exports.ExtendedServiceClient = ExtendedServiceClient; /***/ }), -/***/ 4891: +/***/ 1582: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -71960,8 +71958,8 @@ exports.ExtendedServiceClient = ExtendedServiceClient; // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.convertHttpClient = convertHttpClient; -const response_js_1 = __nccwpck_require__(2714); -const util_js_1 = __nccwpck_require__(3013); +const response_js_1 = __nccwpck_require__(7209); +const util_js_1 = __nccwpck_require__(4970); /** * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient. * @param requestPolicyClient - A HttpClient compatible with core-http @@ -71979,7 +71977,7 @@ function convertHttpClient(requestPolicyClient) { /***/ }), -/***/ 9781: +/***/ 2464: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -71992,23 +71990,23 @@ exports.toHttpHeadersLike = exports.convertHttpClient = exports.disableKeepAlive * * @packageDocumentation */ -var extendedClient_js_1 = __nccwpck_require__(5651); +var extendedClient_js_1 = __nccwpck_require__(7828); Object.defineProperty(exports, "ExtendedServiceClient", ({ enumerable: true, get: function () { return extendedClient_js_1.ExtendedServiceClient; } })); -var requestPolicyFactoryPolicy_js_1 = __nccwpck_require__(8919); +var requestPolicyFactoryPolicy_js_1 = __nccwpck_require__(3533); 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__(5770); +var disableKeepAlivePolicy_js_1 = __nccwpck_require__(7215); Object.defineProperty(exports, "disableKeepAlivePolicyName", ({ enumerable: true, get: function () { return disableKeepAlivePolicy_js_1.disableKeepAlivePolicyName; } })); -var httpClientAdapter_js_1 = __nccwpck_require__(4891); +var httpClientAdapter_js_1 = __nccwpck_require__(1582); Object.defineProperty(exports, "convertHttpClient", ({ enumerable: true, get: function () { return httpClientAdapter_js_1.convertHttpClient; } })); -var util_js_1 = __nccwpck_require__(3013); +var util_js_1 = __nccwpck_require__(4970); Object.defineProperty(exports, "toHttpHeadersLike", ({ enumerable: true, get: function () { return util_js_1.toHttpHeadersLike; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 5770: +/***/ 7215: /***/ ((__unused_webpack_module, exports) => { @@ -72038,7 +72036,7 @@ function pipelineContainsDisableKeepAlivePolicy(pipeline) { /***/ }), -/***/ 8919: +/***/ 3533: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72047,8 +72045,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__(3013); -const response_js_1 = __nccwpck_require__(2714); +const util_js_1 = __nccwpck_require__(4970); +const response_js_1 = __nccwpck_require__(7209); /** * An enum for compatibility with RequestPolicy */ @@ -72099,7 +72097,7 @@ function createRequestPolicyFactoryPolicy(factories) { /***/ }), -/***/ 2714: +/***/ 7209: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72108,8 +72106,8 @@ function createRequestPolicyFactoryPolicy(factories) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toCompatResponse = toCompatResponse; exports.toPipelineResponse = toPipelineResponse; -const core_rest_pipeline_1 = __nccwpck_require__(6553); -const util_js_1 = __nccwpck_require__(3013); +const core_rest_pipeline_1 = __nccwpck_require__(7992); +const util_js_1 = __nccwpck_require__(4970); const originalResponse = Symbol("Original FullOperationResponse"); /** * A helper to convert response objects from the new pipeline back to the old one. @@ -72169,7 +72167,7 @@ function toPipelineResponse(compatResponse) { /***/ }), -/***/ 3013: +/***/ 4970: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -72180,7 +72178,7 @@ exports.HttpHeaders = void 0; exports.toPipelineRequest = toPipelineRequest; exports.toWebResourceLike = toWebResourceLike; exports.toHttpHeadersLike = toHttpHeadersLike; -const core_rest_pipeline_1 = __nccwpck_require__(6553); +const core_rest_pipeline_1 = __nccwpck_require__(7992); // 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"); @@ -72214,6 +72212,7 @@ function toPipelineRequest(webResource, options = {}) { proxySettings: webResource.proxySettings, streamResponseStatusCodes: webResource.streamResponseStatusCodes, agent: webResource.agent, + requestOverrides: webResource.requestOverrides, }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = @@ -72241,6 +72240,7 @@ function toWebResourceLike(request, options) { proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -72285,6 +72285,7 @@ function toWebResourceLike(request, options) { "proxySettings", "streamResponseStatusCodes", "agent", + "requestOverrides", ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -73401,7 +73402,7 @@ exports.Poller = Poller; // Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.logger = void 0; -const logger_1 = __nccwpck_require__(5851); +const logger_1 = __nccwpck_require__(9036); /** * The `@azure/logger` configuration for this package. * @internal @@ -73619,7 +73620,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.buildCreatePoller = void 0; const operation_js_1 = __nccwpck_require__(804); const constants_js_1 = __nccwpck_require__(2216); -const core_util_1 = __nccwpck_require__(402); +const core_util_1 = __nccwpck_require__(1831); const createStateProxy = () => ({ /** * The state at this point is created to be of type OperationState. @@ -73789,7 +73790,7 @@ exports.buildCreatePoller = buildCreatePoller; /***/ }), -/***/ 464: +/***/ 7837: /***/ ((__unused_webpack_module, exports) => { @@ -73797,13 +73798,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.19.1"; +exports.SDK_VERSION = "1.20.0"; exports.DEFAULT_RETRY_POLICY_COUNT = 3; //# sourceMappingURL=constants.js.map /***/ }), -/***/ 3929: +/***/ 4680: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73811,20 +73812,21 @@ 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__(984); -const pipeline_js_1 = __nccwpck_require__(219); -const redirectPolicy_js_1 = __nccwpck_require__(104); -const userAgentPolicy_js_1 = __nccwpck_require__(6738); -const multipartPolicy_js_1 = __nccwpck_require__(8350); -const decompressResponsePolicy_js_1 = __nccwpck_require__(4188); -const defaultRetryPolicy_js_1 = __nccwpck_require__(4977); -const formDataPolicy_js_1 = __nccwpck_require__(4106); -const core_util_1 = __nccwpck_require__(402); -const proxyPolicy_js_1 = __nccwpck_require__(7206); -const setClientRequestIdPolicy_js_1 = __nccwpck_require__(85); -const agentPolicy_js_1 = __nccwpck_require__(3063); -const tlsPolicy_js_1 = __nccwpck_require__(3539); -const tracingPolicy_js_1 = __nccwpck_require__(4576); +const logPolicy_js_1 = __nccwpck_require__(9491); +const pipeline_js_1 = __nccwpck_require__(6736); +const redirectPolicy_js_1 = __nccwpck_require__(6669); +const userAgentPolicy_js_1 = __nccwpck_require__(2365); +const multipartPolicy_js_1 = __nccwpck_require__(8145); +const decompressResponsePolicy_js_1 = __nccwpck_require__(81); +const defaultRetryPolicy_js_1 = __nccwpck_require__(9384); +const formDataPolicy_js_1 = __nccwpck_require__(5911); +const core_util_1 = __nccwpck_require__(1831); +const proxyPolicy_js_1 = __nccwpck_require__(133); +const setClientRequestIdPolicy_js_1 = __nccwpck_require__(9428); +const agentPolicy_js_1 = __nccwpck_require__(3504); +const tlsPolicy_js_1 = __nccwpck_require__(4808); +const tracingPolicy_js_1 = __nccwpck_require__(139); +const wrapAbortSignalLikePolicy_js_1 = __nccwpck_require__(2564); /** * Create a new pipeline with a default set of customizable policies. * @param options - Options to configure a custom pipeline. @@ -73842,6 +73844,7 @@ function createPipelineFromOptions(options) { pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); @@ -73865,7 +73868,7 @@ function createPipelineFromOptions(options) { /***/ }), -/***/ 3775: +/***/ 1238: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73873,116 +73876,56 @@ function createPipelineFromOptions(options) { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createDefaultHttpClient = createDefaultHttpClient; -const nodeHttpClient_js_1 = __nccwpck_require__(2942); +const ts_http_runtime_1 = __nccwpck_require__(1717); +const wrapAbortSignal_js_1 = __nccwpck_require__(2243); /** * Create the correct HttpClient for the current environment. */ function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + // we wrap any AbortSignalLike here since the TypeSpec runtime expects a native AbortSignal. + // 99% of the time, this should be a no-op since a native AbortSignal is passed in. + const { abortSignal, cleanup } = request.abortSignal + ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) + : {}; + try { + // eslint-disable-next-line no-param-reassign + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } + finally { + cleanup === null || cleanup === void 0 ? void 0 : cleanup(); + } + }, + }; } //# sourceMappingURL=defaultHttpClient.js.map /***/ }), -/***/ 2007: -/***/ ((__unused_webpack_module, exports) => { +/***/ 7642: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createHttpHeaders = createHttpHeaders; -function normalizeName(name) { - return name.toLowerCase(); -} -function* headerIterator(map) { - for (const entry of map.values()) { - yield [entry.name, entry.value]; - } -} -class HttpHeadersImpl { - constructor(rawHeaders) { - this._headersMap = new Map(); - if (rawHeaders) { - for (const headerName of Object.keys(rawHeaders)) { - this.set(headerName, rawHeaders[headerName]); - } - } - } - /** - * Set a header in this collection with the provided name and value. The name is - * case-insensitive. - * @param name - The name of the header to set. This value is case-insensitive. - * @param value - The value of the header to set. - */ - set(name, value) { - this._headersMap.set(normalizeName(name), { name, value: String(value).trim() }); - } - /** - * Get the header value for the provided header name, or undefined if no header exists in this - * collection with the provided name. - * @param name - The name of the header. This value is case-insensitive. - */ - get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; - } - /** - * Get whether or not this header collection contains a header entry for the provided header name. - * @param name - The name of the header to set. This value is case-insensitive. - */ - has(name) { - return this._headersMap.has(normalizeName(name)); - } - /** - * Remove the header with the provided headerName. - * @param name - The name of the header to remove. - */ - delete(name) { - this._headersMap.delete(normalizeName(name)); - } - /** - * Get the JSON object representation of this HTTP header collection. - */ - toJSON(options = {}) { - const result = {}; - if (options.preserveCase) { - for (const entry of this._headersMap.values()) { - result[entry.name] = entry.value; - } - } - else { - for (const [normalizedName, entry] of this._headersMap) { - result[normalizedName] = entry.value; - } - } - return result; - } - /** - * Get the string representation of this HTTP header collection. - */ - toString() { - return JSON.stringify(this.toJSON({ preserveCase: true })); - } - /** - * Iterate over tuples of header [name, value] pairs. - */ - [Symbol.iterator]() { - return headerIterator(this._headersMap); - } -} +const ts_http_runtime_1 = __nccwpck_require__(1717); /** * Creates an object that satisfies the `HttpHeaders` interface. * @param rawHeaders - A simple object representing initial headers */ function createHttpHeaders(rawHeaders) { - return new HttpHeadersImpl(rawHeaders); + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } //# sourceMappingURL=httpHeaders.js.map /***/ }), -/***/ 6553: +/***/ 7992: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -73990,83 +73933,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__(219); +var pipeline_js_1 = __nccwpck_require__(6736); Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); -var createPipelineFromOptions_js_1 = __nccwpck_require__(3929); +var createPipelineFromOptions_js_1 = __nccwpck_require__(4680); Object.defineProperty(exports, "createPipelineFromOptions", ({ enumerable: true, get: function () { return createPipelineFromOptions_js_1.createPipelineFromOptions; } })); -var defaultHttpClient_js_1 = __nccwpck_require__(3775); +var defaultHttpClient_js_1 = __nccwpck_require__(1238); Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); -var httpHeaders_js_1 = __nccwpck_require__(2007); +var httpHeaders_js_1 = __nccwpck_require__(7642); Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); -var pipelineRequest_js_1 = __nccwpck_require__(2646); +var pipelineRequest_js_1 = __nccwpck_require__(6531); Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); -var restError_js_1 = __nccwpck_require__(7761); +var restError_js_1 = __nccwpck_require__(244); 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__(4188); +var decompressResponsePolicy_js_1 = __nccwpck_require__(81); 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__(3187); +var exponentialRetryPolicy_js_1 = __nccwpck_require__(7986); 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__(85); +var setClientRequestIdPolicy_js_1 = __nccwpck_require__(9428); 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__(984); +var logPolicy_js_1 = __nccwpck_require__(9491); 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__(8350); +var multipartPolicy_js_1 = __nccwpck_require__(8145); 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__(7206); +var proxyPolicy_js_1 = __nccwpck_require__(133); 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__(104); +var redirectPolicy_js_1 = __nccwpck_require__(6669); 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__(7861); +var systemErrorRetryPolicy_js_1 = __nccwpck_require__(872); 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__(409); +var throttlingRetryPolicy_js_1 = __nccwpck_require__(1770); 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__(2872); +var retryPolicy_js_1 = __nccwpck_require__(3915); Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); -var tracingPolicy_js_1 = __nccwpck_require__(4576); +var tracingPolicy_js_1 = __nccwpck_require__(139); 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__(4977); +var defaultRetryPolicy_js_1 = __nccwpck_require__(9384); Object.defineProperty(exports, "defaultRetryPolicy", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicy; } })); -var userAgentPolicy_js_1 = __nccwpck_require__(6738); +var userAgentPolicy_js_1 = __nccwpck_require__(2365); 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__(3539); +var tlsPolicy_js_1 = __nccwpck_require__(4808); 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__(4106); +var formDataPolicy_js_1 = __nccwpck_require__(5911); 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__(2768); +var bearerTokenAuthenticationPolicy_js_1 = __nccwpck_require__(2939); 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__(9244); +var ndJsonPolicy_js_1 = __nccwpck_require__(6337); 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__(3823); +var auxiliaryAuthenticationHeaderPolicy_js_1 = __nccwpck_require__(924); 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__(3063); +var agentPolicy_js_1 = __nccwpck_require__(3504); 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__(2686); +var file_js_1 = __nccwpck_require__(3811); 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 /***/ }), -/***/ 479: +/***/ 9637: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -74074,643 +74017,33 @@ Object.defineProperty(exports, "createFileFromStream", ({ enumerable: true, get: // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.logger = void 0; -const logger_1 = __nccwpck_require__(5851); +const logger_1 = __nccwpck_require__(9036); exports.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); //# sourceMappingURL=log.js.map /***/ }), -/***/ 2942: +/***/ 6736: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getBodyLength = getBodyLength; -exports.createNodeHttpClient = createNodeHttpClient; -const tslib_1 = __nccwpck_require__(1577); -const http = tslib_1.__importStar(__nccwpck_require__(7067)); -const https = tslib_1.__importStar(__nccwpck_require__(4708)); -const zlib = tslib_1.__importStar(__nccwpck_require__(8522)); -const node_stream_1 = __nccwpck_require__(7075); -const abort_controller_1 = __nccwpck_require__(764); -const httpHeaders_js_1 = __nccwpck_require__(2007); -const restError_js_1 = __nccwpck_require__(7761); -const log_js_1 = __nccwpck_require__(479); -const sanitizer_js_1 = __nccwpck_require__(3933); -const DEFAULT_TLS_SETTINGS = {}; -function isReadableStream(body) { - return body && typeof body.pipe === "function"; -} -function isStreamComplete(stream) { - if (stream.readable === false) { - return Promise.resolve(); - } - return new Promise((resolve) => { - const handler = () => { - resolve(); - stream.removeListener("close", handler); - stream.removeListener("end", handler); - stream.removeListener("error", handler); - }; - stream.on("close", handler); - stream.on("end", handler); - stream.on("error", handler); - }); -} -function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; -} -class ReportTransform extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } - catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } -} -/** - * A HttpClient implementation that uses Node's "https" module to send HTTPS requests. - * @internal - */ -class NodeHttpClient { - constructor() { - this.cachedHttpsAgents = new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted. Request has already been canceled."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - let timeoutId; - if (request.timeout > 0) { - timeoutId = setTimeout(() => { - const sanitizer = new sanitizer_js_1.Sanitizer(); - log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } - else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - if (timeoutId !== undefined) { - clearTimeout(timeoutId); - } - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request, - }; - // Responses to HEAD must not have a body. - // If they do return a body, that body must be ignored. - if (request.method === "HEAD") { - // call resume() and not destroy() to avoid closing the socket - // and losing keep alive - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || - ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status))) { - response.readableStreamBody = responseStream; - } - else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } - finally { - // clean up event listener - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]) - .then(() => { - var _a; - // eslint-disable-next-line promise/always-return - if (abortListener) { - (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener("abort", abortListener); - } - }) - .catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - if (isInsecure && !request.allowInsecureConnection) { - throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); - } - const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); - const options = { - agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }), - }; - return new Promise((resolve, reject) => { - const req = isInsecure ? http.request(options, resolve) : https.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 })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } - else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } - else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } - else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } - else { - // streams don't like "undefined" being passed as data - req.end(); - } - }); - } - 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; - } - if (!this.cachedHttpAgent) { - // If there is no cached agent create a new one and cache it. - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } - else { - if (disableKeepAlive && !request.tlsSettings) { - // When there are no tlsSettings and keepAlive is false - // we don't need a custom agent - return https.globalAgent; - } - // We use the tlsSettings to index cached clients - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - // Get the cached agent or create a new one with the - // provided values for keepAlive and tlsSettings - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } -} -function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } - else if (value) { - headers.set(header, value); - } - } - return headers; -} -function getDecodedResponseStream(stream, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream.pipe(unzip); - return unzip; - } - else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream.pipe(inflate); - return inflate; - } - return stream; -} -function streamToText(stream) { - return new Promise((resolve, reject) => { - const buffer = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } - else { - buffer.push(Buffer.from(chunk)); - } - }); - stream.on("end", () => { - resolve(Buffer.concat(buffer).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } - else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR, - })); - } - }); - }); -} -/** @internal */ -function getBodyLength(body) { - if (!body) { - return 0; - } - else if (Buffer.isBuffer(body)) { - return body.length; - } - else if (isReadableStream(body)) { - return null; - } - else if (isArrayBuffer(body)) { - return body.byteLength; - } - else if (typeof body === "string") { - return Buffer.from(body).length; - } - else { - return null; - } -} -/** - * Create a new HttpClient instance for the NodeJS environment. - * @internal - */ -function createNodeHttpClient() { - return new NodeHttpClient(); -} -//# sourceMappingURL=nodeHttpClient.js.map - -/***/ }), - -/***/ 219: -/***/ ((__unused_webpack_module, exports) => { - - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createEmptyPipeline = createEmptyPipeline; -const ValidPhaseNames = new Set(["Deserialize", "Serialize", "Retry", "Sign"]); -/** - * A private implementation of Pipeline. - * Do not export this class from the package. - * @internal - */ -class HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = undefined; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options, - }); - this._orderedPolicies = undefined; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if ((options.name && policyDescriptor.policy.name === options.name) || - (options.phase && policyDescriptor.options.phase === options.phase)) { - removedPolicies.push(policyDescriptor.policy); - return false; - } - else { - return true; - } - }); - this._orderedPolicies = undefined; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new HttpPipeline(this._policies); - } - static create() { - return new HttpPipeline(); - } - orderPolicies() { - /** - * The goal of this method is to reliably order pipeline policies - * based on their declared requirements when they were added. - * - * Order is first determined by phase: - * - * 1. Serialize Phase - * 2. Policies not in a phase - * 3. Deserialize Phase - * 4. Retry Phase - * 5. Sign Phase - * - * Within each phase, policies are executed in the order - * they were added unless they were specified to execute - * before/after other policies or after a particular phase. - * - * To determine the final order, we will walk the policy list - * in phase order multiple times until all dependencies are - * satisfied. - * - * `afterPolicies` are the set of policies that must be - * executed before a given policy. This requirement is - * considered satisfied when each of the listed policies - * have been scheduled. - * - * `beforePolicies` are the set of policies that must be - * executed after a given policy. Since this dependency - * can be expressed by converting it into a equivalent - * `afterPolicies` declarations, they are normalized - * into that form for simplicity. - * - * An `afterPhase` dependency is considered satisfied when all - * policies in that phase have scheduled. - * - */ - const result = []; - // Track all policies we know about. - const policyMap = new Map(); - function createPhase(name) { - return { - name, - policies: new Set(), - hasRun: false, - hasAfterPolicies: false, - }; - } - // Track policies for each phase. - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - // a list of phases in order - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - // Small helper function to map phase name to each Phase - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } - else if (phase === "Serialize") { - return serializePhase; - } - else if (phase === "Deserialize") { - return deserializePhase; - } - else if (phase === "Sign") { - return signPhase; - } - else { - return noPhase; - } - } - // First walk each policy and create a node to track metadata. - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: new Set(), - dependants: new Set(), - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - // Now that each policy has a node, connect dependency references. - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - // Linking in both directions helps later - // when we want to notify dependants. - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - // To execute before another node, make it - // depend on the current node. - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - // Sets iterate in insertion order - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - // If this node is waiting on a phase to complete, - // we need to skip it for now. - // Even if the phase is empty, we should wait for it - // to be walked to avoid re-ordering policies. - continue; - } - if (node.dependsOn.size === 0) { - // If there's nothing else we're waiting for, we can - // add this policy to the result list. - result.push(node.policy); - // Notify anything that depends on this policy that - // the policy has been scheduled. - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - // if the phase isn't complete - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - // Try running noPhase to see if that unblocks this phase next tick. - // This can happen if a phase that happens before noPhase - // is waiting on a noPhase policy to complete. - walkPhase(noPhase); - } - // Don't proceed to the next phase until this phase finishes. - return; - } - if (phase.hasAfterPolicies) { - // Run any policies unblocked by this phase - walkPhase(noPhase); - } - } - } - // Iterate until we've put every node in the result list. - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - // Keep walking each phase in order until we can order every node. - walkPhases(); - // The result list *should* get at least one larger each time - // after the first full pass. - // Otherwise, we're going to loop forever. - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } -} +const ts_http_runtime_1 = __nccwpck_require__(1717); /** * Creates a totally empty pipeline. * Useful for testing or creating a custom one. */ function createEmptyPipeline() { - return HttpPipeline.create(); + return (0, ts_http_runtime_1.createEmptyPipeline)(); } //# sourceMappingURL=pipeline.js.map /***/ }), -/***/ 2646: +/***/ 6531: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -74718,47 +74051,24 @@ function createEmptyPipeline() { // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createPipelineRequest = createPipelineRequest; -const httpHeaders_js_1 = __nccwpck_require__(2007); -const core_util_1 = __nccwpck_require__(402); -class PipelineRequestImpl { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - this.agent = options.agent; - this.tlsSettings = options.tlsSettings; - } -} +const ts_http_runtime_1 = __nccwpck_require__(1717); /** * Creates a new pipeline request with the given options. * This method is to allow for the easy setting of default values and not required. * @param options - The options to create the request with. */ function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + // Cast required due to difference between ts-http-runtime requiring AbortSignal while core-rest-pipeline allows + // the more generic AbortSignalLike. The wrapAbortSignalLike pipeline policy will take care of ensuring that any AbortSignalLike in the request + // is converted into a true AbortSignal. + return (0, ts_http_runtime_1.createPipelineRequest)(options); } //# sourceMappingURL=pipelineRequest.js.map /***/ }), -/***/ 3063: -/***/ ((__unused_webpack_module, exports) => { +/***/ 3504: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { // Copyright (c) Microsoft Corporation. @@ -74766,30 +74076,22 @@ function createPipelineRequest(options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.agentPolicyName = void 0; exports.agentPolicy = agentPolicy; +const policies_1 = __nccwpck_require__(3803); /** * Name of the Agent Policy */ -exports.agentPolicyName = "agentPolicy"; +exports.agentPolicyName = policies_1.agentPolicyName; /** * Gets a pipeline policy that sets http.agent */ function agentPolicy(agent) { - return { - name: exports.agentPolicyName, - sendRequest: async (req, next) => { - // Users may define an agent on the request, honor it over the client level one - if (!req.agent) { - req.agent = agent; - } - return next(req); - }, - }; + return (0, policies_1.agentPolicy)(agent); } //# sourceMappingURL=agentPolicy.js.map /***/ }), -/***/ 3823: +/***/ 924: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -74798,8 +74100,8 @@ function agentPolicy(agent) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.auxiliaryAuthenticationHeaderPolicyName = void 0; exports.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; -const tokenCycler_js_1 = __nccwpck_require__(1291); -const log_js_1 = __nccwpck_require__(479); +const tokenCycler_js_1 = __nccwpck_require__(8052); +const log_js_1 = __nccwpck_require__(9637); /** * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. */ @@ -74862,7 +74164,7 @@ function auxiliaryAuthenticationHeaderPolicy(options) { /***/ }), -/***/ 2768: +/***/ 2939: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -74872,9 +74174,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.bearerTokenAuthenticationPolicyName = void 0; exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; exports.parseChallenges = parseChallenges; -const tokenCycler_js_1 = __nccwpck_require__(1291); -const log_js_1 = __nccwpck_require__(479); -const restError_js_1 = __nccwpck_require__(7761); +const tokenCycler_js_1 = __nccwpck_require__(8052); +const log_js_1 = __nccwpck_require__(9637); +const restError_js_1 = __nccwpck_require__(244); /** * The programmatic identifier of the bearerTokenAuthenticationPolicy. */ @@ -75111,8 +74413,8 @@ function getCaeChallengeClaims(challenges) { /***/ }), -/***/ 4188: -/***/ ((__unused_webpack_module, exports) => { +/***/ 81: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { // Copyright (c) Microsoft Corporation. @@ -75120,31 +74422,23 @@ function getCaeChallengeClaims(challenges) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.decompressResponsePolicyName = void 0; exports.decompressResponsePolicy = decompressResponsePolicy; +const policies_1 = __nccwpck_require__(3803); /** * The programmatic identifier of the decompressResponsePolicy. */ -exports.decompressResponsePolicyName = "decompressResponsePolicy"; +exports.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; /** * A policy to enable response decompression according to Accept-Encoding header * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding */ function decompressResponsePolicy() { - return { - name: exports.decompressResponsePolicyName, - async sendRequest(request, next) { - // HEAD requests have no body - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - }, - }; + return (0, policies_1.decompressResponsePolicy)(); } //# sourceMappingURL=decompressResponsePolicy.js.map /***/ }), -/***/ 4977: +/***/ 9384: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -75153,14 +74447,11 @@ function decompressResponsePolicy() { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultRetryPolicyName = void 0; exports.defaultRetryPolicy = defaultRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(3883); -const throttlingRetryStrategy_js_1 = __nccwpck_require__(5243); -const retryPolicy_js_1 = __nccwpck_require__(2872); -const constants_js_1 = __nccwpck_require__(464); +const policies_1 = __nccwpck_require__(3803); /** * Name of the {@link defaultRetryPolicy} */ -exports.defaultRetryPolicyName = "defaultRetryPolicy"; +exports.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; /** * A policy that retries according to three strategies: * - When the server sends a 429 response with a Retry-After header. @@ -75168,19 +74459,13 @@ 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, - }).sendRequest, - }; + return (0, policies_1.defaultRetryPolicy)(options); } //# sourceMappingURL=defaultRetryPolicy.js.map /***/ }), -/***/ 3187: +/***/ 7986: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -75189,30 +74474,23 @@ function defaultRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.exponentialRetryPolicyName = void 0; exports.exponentialRetryPolicy = exponentialRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(3883); -const retryPolicy_js_1 = __nccwpck_require__(2872); -const constants_js_1 = __nccwpck_require__(464); +const policies_1 = __nccwpck_require__(3803); /** * The programmatic identifier of the exponentialRetryPolicy. */ -exports.exponentialRetryPolicyName = "exponentialRetryPolicy"; +exports.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; /** * A policy that attempts to retry requests while introducing an exponentially increasing delay. * @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 })), - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, - }); + return (0, policies_1.exponentialRetryPolicy)(options); } //# sourceMappingURL=exponentialRetryPolicy.js.map /***/ }), -/***/ 4106: +/***/ 5911: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -75221,104 +74499,22 @@ function exponentialRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.formDataPolicyName = void 0; exports.formDataPolicy = formDataPolicy; -const core_util_1 = __nccwpck_require__(402); -const httpHeaders_js_1 = __nccwpck_require__(2007); +const policies_1 = __nccwpck_require__(3803); /** * 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].push(value); - } - return formDataMap; -} +exports.formDataPolicyName = policies_1.formDataPolicyName; /** * A policy that encodes FormData on the request into the body. */ function formDataPolicy() { - return { - name: exports.formDataPolicyName, - async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { - request.formData = formDataToFormDataMap(request.body); - request.body = undefined; - } - if (request.formData) { - const contentType = request.headers.get("Content-Type"); - if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) { - request.body = wwwFormUrlEncode(request.formData); - } - else { - await prepareFormData(request.formData, request); - } - request.formData = undefined; - } - return next(request); - }, - }; -} -function wwwFormUrlEncode(formData) { - const urlSearchParams = new URLSearchParams(); - for (const [key, value] of Object.entries(formData)) { - if (Array.isArray(value)) { - for (const subValue of value) { - urlSearchParams.append(key, subValue.toString()); - } - } - else { - urlSearchParams.append(key, value.toString()); - } - } - return urlSearchParams.toString(); -} -async function prepareFormData(formData, request) { - // validate content type (multipart/form-data) - const contentType = request.headers.get("Content-Type"); - if (contentType && !contentType.startsWith("multipart/form-data")) { - // 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"); - // set body to MultipartRequestBody using content from FormDataMap - const parts = []; - for (const [fieldName, values] of Object.entries(formData)) { - for (const value of Array.isArray(values) ? values : [values]) { - if (typeof value === "string") { - parts.push({ - headers: (0, httpHeaders_js_1.createHttpHeaders)({ - "Content-Disposition": `form-data; name="${fieldName}"`, - }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8"), - }); - } - else if (value === undefined || value === null || typeof value !== "object") { - throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); - } - else { - // using || instead of ?? here since if value.name is empty we should create a file name - const fileName = value.name || "blob"; - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - headers.set("Content-Disposition", `form-data; name="${fieldName}"; filename="${fileName}"`); - // again, || is used since an empty value.type means the content type is unset - headers.set("Content-Type", value.type || "application/octet-stream"); - parts.push({ - headers, - body: value, - }); - } - } - } - request.multipartBody = { parts }; + return (0, policies_1.formDataPolicy)(); } //# sourceMappingURL=formDataPolicy.js.map /***/ }), -/***/ 984: +/***/ 9491: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -75327,42 +74523,24 @@ async function prepareFormData(formData, request) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.logPolicyName = void 0; exports.logPolicy = logPolicy; -const log_js_1 = __nccwpck_require__(479); -const sanitizer_js_1 = __nccwpck_require__(3933); +const log_js_1 = __nccwpck_require__(9637); +const policies_1 = __nccwpck_require__(3803); /** * The programmatic identifier of the logPolicy. */ -exports.logPolicyName = "logPolicy"; +exports.logPolicyName = policies_1.logPolicyName; /** * A policy that logs all requests and responses. * @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 sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, - }); - return { - name: exports.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - }, - }; + return (0, policies_1.logPolicy)(Object.assign({ logger: log_js_1.logger.info }, options)); } //# sourceMappingURL=logPolicy.js.map /***/ }), -/***/ 8350: +/***/ 8145: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -75371,111 +74549,28 @@ function logPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.multipartPolicyName = void 0; exports.multipartPolicy = multipartPolicy; -const core_util_1 = __nccwpck_require__(402); -const concat_js_1 = __nccwpck_require__(8672); -const typeGuards_js_1 = __nccwpck_require__(8666); -function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; -} -function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r\n`; - } - return result; -} -function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } - else if ((0, typeGuards_js_1.isBlob)(source)) { - // if was created using createFile then -1 means we have an unknown size - return source.size === -1 ? undefined : source.size; - } - else { - return undefined; - } -} -function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === undefined) { - return undefined; - } - else { - total += partLength; - } - } - return total; -} -async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r\n--${boundary}`, "utf-8"), - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8"), - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); -} +const policies_1 = __nccwpck_require__(3803); +const file_js_1 = __nccwpck_require__(3811); /** * Name of multipart policy */ -exports.multipartPolicyName = "multipartPolicy"; -const maxBoundaryLength = 70; -const validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); -function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } -} +exports.multipartPolicyName = policies_1.multipartPolicyName; /** * Pipeline policy for multipart requests */ function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); return { name: exports.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : (boundary = parsedBoundary); - if (boundary) { - assertValidBoundary(boundary); - } - else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = undefined; - return next(request); + return tspPolicy.sendRequest(request, next); }, }; } @@ -75483,7 +74578,7 @@ function multipartPolicy() { /***/ }), -/***/ 9244: +/***/ 6337: /***/ ((__unused_webpack_module, exports) => { @@ -75518,101 +74613,21 @@ function ndJsonPolicy() { /***/ }), -/***/ 7206: +/***/ 133: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.globalNoProxyList = exports.proxyPolicyName = void 0; -exports.loadNoProxy = loadNoProxy; +exports.proxyPolicyName = void 0; exports.getDefaultProxySettings = getDefaultProxySettings; exports.proxyPolicy = proxyPolicy; -const https_proxy_agent_1 = __nccwpck_require__(2327); -const http_proxy_agent_1 = __nccwpck_require__(4702); -const log_js_1 = __nccwpck_require__(479); -const HTTPS_PROXY = "HTTPS_PROXY"; -const HTTP_PROXY = "HTTP_PROXY"; -const ALL_PROXY = "ALL_PROXY"; -const NO_PROXY = "NO_PROXY"; +const policies_1 = __nccwpck_require__(3803); /** * The programmatic identifier of the proxyPolicy. */ -exports.proxyPolicyName = "proxyPolicy"; -/** - * Stores the patterns specified in NO_PROXY environment variable. - * @internal - */ -exports.globalNoProxyList = []; -let noProxyListLoaded = false; -/** A cache of whether a host should bypass the proxy. */ -const globalBypassedMap = new Map(); -function getEnvironmentValue(name) { - if (process.env[name]) { - return process.env[name]; - } - else if (process.env[name.toLowerCase()]) { - return process.env[name.toLowerCase()]; - } - return undefined; -} -function loadEnvironmentProxyValue() { - if (!process) { - return undefined; - } - const httpsProxy = getEnvironmentValue(HTTPS_PROXY); - const allProxy = getEnvironmentValue(ALL_PROXY); - const httpProxy = getEnvironmentValue(HTTP_PROXY); - return httpsProxy || allProxy || httpProxy; -} -/** - * Check whether the host of a given `uri` matches any pattern in the no proxy list. - * If there's a match, any request sent to the same host shouldn't have the proxy settings set. - * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210 - */ -function isBypassed(uri, noProxyList, bypassedMap) { - if (noProxyList.length === 0) { - return false; - } - const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { - return bypassedMap.get(host); - } - let isBypassedFlag = false; - for (const pattern of noProxyList) { - if (pattern[0] === ".") { - // This should match either domain it self or any subdomain or host - // .foo.com will match foo.com it self or *.foo.com - if (host.endsWith(pattern)) { - isBypassedFlag = true; - } - else { - if (host.length === pattern.length - 1 && host === pattern.slice(1)) { - isBypassedFlag = true; - } - } - } - else { - if (host === pattern) { - isBypassedFlag = true; - } - } - } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); - return isBypassedFlag; -} -function loadNoProxy() { - const noProxy = getEnvironmentValue(NO_PROXY); - noProxyListLoaded = true; - if (noProxy) { - return noProxy - .split(",") - .map((item) => item.trim()) - .filter((item) => item.length); - } - return []; -} +exports.proxyPolicyName = policies_1.proxyPolicyName; /** * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. * If no argument is given, it attempts to parse a proxy URL from the environment @@ -75621,70 +74636,7 @@ function loadNoProxy() { * @deprecated - Internally this method is no longer necessary when setting proxy information. */ function getDefaultProxySettings(proxyUrl) { - if (!proxyUrl) { - proxyUrl = loadEnvironmentProxyValue(); - if (!proxyUrl) { - return undefined; - } - } - const parsedUrl = new URL(proxyUrl); - const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; - return { - host: schema + parsedUrl.hostname, - port: Number.parseInt(parsedUrl.port || "80"), - username: parsedUrl.username, - password: parsedUrl.password, - }; -} -/** - * This method attempts to parse a proxy URL from the environment - * variables `HTTPS_PROXY` or `HTTP_PROXY`. - */ -function getDefaultProxySettingsInternal() { - const envProxy = loadEnvironmentProxyValue(); - return envProxy ? new URL(envProxy) : undefined; -} -function getUrlFromProxySettings(settings) { - let parsedProxyUrl; - try { - parsedProxyUrl = new URL(settings.host); - } - catch (_a) { - throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); - } - parsedProxyUrl.port = String(settings.port); - if (settings.username) { - parsedProxyUrl.username = settings.username; - } - if (settings.password) { - parsedProxyUrl.password = settings.password; - } - return parsedProxyUrl; -} -function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { - // Custom Agent should take precedence so if one is present - // we should skip to avoid overwriting it. - if (request.agent) { - return; - } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - if (request.tlsSettings) { - log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); - } - const headers = request.headers.toJSON(); - if (isInsecure) { - if (!cachedAgents.httpProxyAgent) { - cachedAgents.httpProxyAgent = new http_proxy_agent_1.HttpProxyAgent(proxyUrl, { headers }); - } - request.agent = cachedAgents.httpProxyAgent; - } - else { - if (!cachedAgents.httpsProxyAgent) { - cachedAgents.httpsProxyAgent = new https_proxy_agent_1.HttpsProxyAgent(proxyUrl, { headers }); - } - request.agent = cachedAgents.httpsProxyAgent; - } + return (0, policies_1.getDefaultProxySettings)(proxyUrl); } /** * A policy that allows one to apply proxy settings to all requests. @@ -75694,35 +74646,14 @@ function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { * @param options - additional settings, for example, custom NO_PROXY patterns */ function proxyPolicy(proxySettings, options) { - if (!noProxyListLoaded) { - exports.globalNoProxyList.push(...loadNoProxy()); - } - const defaultProxy = proxySettings - ? getUrlFromProxySettings(proxySettings) - : getDefaultProxySettingsInternal(); - const cachedAgents = {}; - 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)) { - setProxyAgentOnRequest(request, cachedAgents, defaultProxy); - } - else if (request.proxySettings) { - setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); - } - return next(request); - }, - }; + return (0, policies_1.proxyPolicy)(proxySettings, options); } //# sourceMappingURL=proxyPolicy.js.map /***/ }), -/***/ 104: -/***/ ((__unused_webpack_module, exports) => { +/***/ 6669: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { // Copyright (c) Microsoft Corporation. @@ -75730,14 +74661,11 @@ function proxyPolicy(proxySettings, options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.redirectPolicyName = void 0; exports.redirectPolicy = redirectPolicy; +const policies_1 = __nccwpck_require__(3803); /** * The programmatic identifier of the redirectPolicy. */ -exports.redirectPolicyName = "redirectPolicy"; -/** - * Methods that are allowed to follow redirects 301 and 302 - */ -const allowedRedirect = ["GET", "HEAD"]; +exports.redirectPolicyName = policies_1.redirectPolicyName; /** * A policy to follow Location headers from the server in order * to support server-side redirection. @@ -75745,45 +74673,13 @@ const allowedRedirect = ["GET", "HEAD"]; * @param options - Options to control policy behavior. */ function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - }, - }; -} -async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - const { request, status, headers } = response; - const locationHeader = headers.get("location"); - if (locationHeader && - (status === 300 || - (status === 301 && allowedRedirect.includes(request.method)) || - (status === 302 && allowedRedirect.includes(request.method)) || - (status === 303 && request.method === "POST") || - status === 307) && - currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); - // POST request with Status code 303 should be converted into a - // redirected GET request if the redirect url is present in the location header - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; + return (0, policies_1.redirectPolicy)(options); } //# sourceMappingURL=redirectPolicy.js.map /***/ }), -/***/ 2872: +/***/ 3915: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -75791,113 +74687,24 @@ 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__(7483); -const logger_1 = __nccwpck_require__(5851); -const abort_controller_1 = __nccwpck_require__(764); -const constants_js_1 = __nccwpck_require__(464); +const logger_1 = __nccwpck_require__(9036); +const constants_js_1 = __nccwpck_require__(7837); +const policies_1 = __nccwpck_require__(3803); const retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); -/** - * The programmatic identifier of the retryPolicy. - */ -const retryPolicyName = "retryPolicy"; /** * retryPolicy is a generic policy to enable retrying requests when certain conditions are met */ function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = undefined; - responseError = undefined; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } - catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - // RestErrors are valid targets for the retry strategies. - // If none of the retry strategies can work with them, they will be thrown later in this policy. - // If the received error is not a RestError, it is immediately thrown. - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } - else if (response) { - return response; - } - else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError, - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, undefined, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } - // If all the retries skip and there's no response, - // we're still in the retry loop, so a new request will be sent - // until `maxRetries` is reached. - } - }, - }; + // 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)); } //# sourceMappingURL=retryPolicy.js.map /***/ }), -/***/ 85: +/***/ 9428: /***/ ((__unused_webpack_module, exports) => { @@ -75931,7 +74738,7 @@ function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id" /***/ }), -/***/ 7861: +/***/ 872: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -75940,13 +74747,11 @@ function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id" Object.defineProperty(exports, "__esModule", ({ value: true })); exports.systemErrorRetryPolicyName = void 0; exports.systemErrorRetryPolicy = systemErrorRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(3883); -const retryPolicy_js_1 = __nccwpck_require__(2872); -const constants_js_1 = __nccwpck_require__(464); +const policies_1 = __nccwpck_require__(3803); /** * Name of the {@link systemErrorRetryPolicy} */ -exports.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; +exports.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; /** * A retry policy that specifically seeks to handle errors in the * underlying transport layer (e.g. DNS lookup failures) rather than @@ -75954,21 +74759,13 @@ exports.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; * @param options - Options that customize the policy. */ function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })), - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } //# sourceMappingURL=systemErrorRetryPolicy.js.map /***/ }), -/***/ 409: +/***/ 1770: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -75977,13 +74774,11 @@ function systemErrorRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.throttlingRetryPolicyName = void 0; exports.throttlingRetryPolicy = throttlingRetryPolicy; -const throttlingRetryStrategy_js_1 = __nccwpck_require__(5243); -const retryPolicy_js_1 = __nccwpck_require__(2872); -const constants_js_1 = __nccwpck_require__(464); +const policies_1 = __nccwpck_require__(3803); /** * Name of the {@link throttlingRetryPolicy} */ -exports.throttlingRetryPolicyName = "throttlingRetryPolicy"; +exports.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; /** * A policy that retries when the server sends a 429 response with a Retry-After header. * @@ -75995,20 +74790,14 @@ 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, - }).sendRequest, - }; + return (0, policies_1.throttlingRetryPolicy)(options); } //# sourceMappingURL=throttlingRetryPolicy.js.map /***/ }), -/***/ 3539: -/***/ ((__unused_webpack_module, exports) => { +/***/ 4808: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { // Copyright (c) Microsoft Corporation. @@ -76016,30 +74805,22 @@ function throttlingRetryPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.tlsPolicyName = void 0; exports.tlsPolicy = tlsPolicy; +const policies_1 = __nccwpck_require__(3803); /** * Name of the TLS Policy */ -exports.tlsPolicyName = "tlsPolicy"; +exports.tlsPolicyName = policies_1.tlsPolicyName; /** * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. */ function tlsPolicy(tlsSettings) { - return { - name: exports.tlsPolicyName, - sendRequest: async (req, next) => { - // Users may define a request tlsSettings, honor those over the client level one - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - }, - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } //# sourceMappingURL=tlsPolicy.js.map /***/ }), -/***/ 4576: +/***/ 139: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -76049,12 +74830,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.tracingPolicyName = void 0; exports.tracingPolicy = tracingPolicy; const core_tracing_1 = __nccwpck_require__(9340); -const constants_js_1 = __nccwpck_require__(464); -const userAgent_js_1 = __nccwpck_require__(1965); -const log_js_1 = __nccwpck_require__(479); -const core_util_1 = __nccwpck_require__(402); -const restError_js_1 = __nccwpck_require__(7761); -const sanitizer_js_1 = __nccwpck_require__(3933); +const constants_js_1 = __nccwpck_require__(7837); +const userAgent_js_1 = __nccwpck_require__(2105); +const log_js_1 = __nccwpck_require__(9637); +const core_util_1 = __nccwpck_require__(1831); +const restError_js_1 = __nccwpck_require__(244); +const util_1 = __nccwpck_require__(7201); /** * The programmatic identifier of the tracingPolicy. */ @@ -76067,7 +74848,7 @@ exports.tracingPolicyName = "tracingPolicy"; */ function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, }); const tracingClient = tryCreateTracingClient(); @@ -76181,7 +74962,7 @@ function tryProcessResponse(span, response) { /***/ }), -/***/ 6738: +/***/ 2365: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -76190,7 +74971,7 @@ function tryProcessResponse(span, response) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.userAgentPolicyName = void 0; exports.userAgentPolicy = userAgentPolicy; -const userAgent_js_1 = __nccwpck_require__(1965); +const userAgent_js_1 = __nccwpck_require__(2105); const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); /** * The programmatic identifier of the userAgentPolicy. @@ -76217,7 +74998,47 @@ function userAgentPolicy(options = {}) { /***/ }), -/***/ 7761: +/***/ 2564: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.wrapAbortSignalLikePolicyName = void 0; +exports.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; +const wrapAbortSignal_js_1 = __nccwpck_require__(2243); +exports.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; +/** + * Policy that ensure that any AbortSignalLike is wrapped in a native AbortSignal for processing by the pipeline. + * Since the ts-http-runtime expects a native AbortSignal, this policy is used to ensure that any AbortSignalLike is wrapped in a native AbortSignal. + * + * @returns - created policy + */ +function wrapAbortSignalLikePolicy() { + return { + name: exports.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + // eslint-disable-next-line no-param-reassign + request.abortSignal = abortSignal; + try { + return await next(request); + } + finally { + cleanup === null || cleanup === void 0 ? void 0 : cleanup(); + } + }, + }; +} +//# sourceMappingURL=wrapAbortSignalLikePolicy.js.map + +/***/ }), + +/***/ 244: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -76226,34 +75047,19 @@ function userAgentPolicy(options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RestError = void 0; exports.isRestError = isRestError; -const core_util_1 = __nccwpck_require__(402); -const inspect_js_1 = __nccwpck_require__(4358); -const sanitizer_js_1 = __nccwpck_require__(3933); -const errorSanitizer = new sanitizer_js_1.Sanitizer(); +const ts_http_runtime_1 = __nccwpck_require__(1717); /** * A custom error type for failed pipeline requests. */ class RestError extends Error { constructor(message, options = {}) { super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - // The request and response may contain sensitive information in the headers or body. - // To help prevent this sensitive information being accidentally logged, the request and response - // properties are marked as non-enumerable here. This prevents them showing up in the output of - // JSON.stringify and console.log. - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - // 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 }))}`; + // what is this?? + // it turns out that you can return from a constructor and it causes + // calling `new` to return the value you return. + // this lets us wrap the TypeSpec RestError so that calling this constructor will give you the same type of object as calling the TypeSpec one, + // even though the constructor signatures (through RestErrorOptions) are slightly different. + return new ts_http_runtime_1.RestError(message, options); } } exports.RestError = RestError; @@ -76273,283 +75079,27 @@ RestError.PARSE_ERROR = "PARSE_ERROR"; * @param e - Something caught by a catch clause. */ function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } //# sourceMappingURL=restError.js.map /***/ }), -/***/ 3883: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.exponentialRetryStrategy = exponentialRetryStrategy; -exports.isExponentialRetryResponse = isExponentialRetryResponse; -exports.isSystemError = isSystemError; -const core_util_1 = __nccwpck_require__(402); -const throttlingRetryStrategy_js_1 = __nccwpck_require__(5243); -// intervals are in milliseconds -const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; -const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; -/** - * A retry strategy that retries with an exponentially increasing delay in these two cases: - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - 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; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - return (0, core_util_1.calculateRetryDelay)(retryCount, { - retryDelayInMs: retryInterval, - maxRetryDelayInMs: maxRetryInterval, - }); - }, - }; -} -/** - * A response is a retry response if it has status codes: - * - 408, or - * - Greater or equal than 500, except for 501 and 505. - */ -function isExponentialRetryResponse(response) { - return Boolean(response && - response.status !== undefined && - (response.status >= 500 || response.status === 408) && - response.status !== 501 && - response.status !== 505); -} -/** - * Determines whether an error from a pipeline response was triggered in the network layer. - */ -function isSystemError(err) { - if (!err) { - return false; - } - return (err.code === "ETIMEDOUT" || - err.code === "ESOCKETTIMEDOUT" || - err.code === "ECONNREFUSED" || - err.code === "ECONNRESET" || - err.code === "ENOENT" || - err.code === "ENOTFOUND"); -} -//# sourceMappingURL=exponentialRetryStrategy.js.map - -/***/ }), - -/***/ 5243: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isThrottlingRetryResponse = isThrottlingRetryResponse; -exports.throttlingRetryStrategy = throttlingRetryStrategy; -const helpers_js_1 = __nccwpck_require__(7483); -/** - * The header that comes back from Azure services representing - * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry). - */ -const RetryAfterHeader = "Retry-After"; -/** - * The headers that come back from Azure services representing - * the amount of time (minimum) to wait to retry. - * - * "retry-after-ms", "x-ms-retry-after-ms" : milliseconds - * "Retry-After" : seconds or timestamp - */ -const AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; -/** - * A response is a throttling retry response if it has a throttling status code (429 or 503), - * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. - * - * Returns the `retryAfterInMs` value if the response is a throttling retry response. - * If not throttling retry response, returns `undefined`. - * - * @internal - */ -function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return undefined; - try { - // Headers: "retry-after-ms", "x-ms-retry-after-ms", "Retry-After" - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - // "Retry-After" header ==> seconds - // "retry-after-ms", "x-ms-retry-after-ms" headers ==> milli-seconds - const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1; - return retryAfterValue * multiplyingFactor; // in milli-seconds - } - } - // RetryAfterHeader ("Retry-After") has a special case where it might be formatted as a date instead of a number of seconds - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) - return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - // 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) { - return undefined; - } -} -/** - * A response is a retry response if it has a throttling status code (429 or 503), - * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. - */ -function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); -} -function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs, - }; - }, - }; -} -//# sourceMappingURL=throttlingRetryStrategy.js.map - -/***/ }), - -/***/ 8672: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.concat = concat; -const tslib_1 = __nccwpck_require__(1577); -const node_stream_1 = __nccwpck_require__(7075); -const typeGuards_js_1 = __nccwpck_require__(8666); -const file_js_1 = __nccwpck_require__(2686); -function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } - finally { - reader.releaseLock(); - } - }); -} -function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } -} -function ensureNodeStream(stream) { - if (stream instanceof ReadableStream) { - makeAsyncIterable(stream); - return node_stream_1.Readable.fromWeb(stream); - } - else { - return stream; - } -} -function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } - else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } - else { - return ensureNodeStream(source); - } -} -/** - * Utility function that concatenates a set of binary inputs into one combined output. - * - * @param sources - array of sources for the concatenation - * @returns - in Node, a (() =\> NodeJS.ReadableStream) which, when read, produces a concatenation of all the inputs. - * In browser, returns a `Blob` representing all the concatenated inputs. - * - * @internal - */ -async function concat(sources) { - return function () { - const streams = sources.map((x) => (typeof x === "function" ? x() : x)).map(toStream); - return node_stream_1.Readable.from((function () { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } - finally { if (e_1) throw e_1.error; } - } - } - }); - })()); - }; -} -//# sourceMappingURL=concat.js.map - -/***/ }), - -/***/ 2686: +/***/ 3811: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.hasRawContent = hasRawContent; exports.getRawContent = getRawContent; exports.createFileFromStream = createFileFromStream; exports.createFile = createFile; -const core_util_1 = __nccwpck_require__(402); -const typeGuards_js_1 = __nccwpck_require__(8666); +const core_util_1 = __nccwpck_require__(1831); +function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); +} const unimplementedMethods = { arrayBuffer: () => { throw new Error("Not implemented"); @@ -76579,13 +75129,16 @@ const unimplementedMethods = { * @internal */ const rawContent = Symbol("rawContent"); +/** + * Type guard to check if a given object is a blob-like object with a raw content property. + */ function hasRawContent(x) { return typeof x[rawContent] === "function"; } /** * Extract the raw content from a given blob-like object. If the input was created using createFile * or createFileFromStream, the exact content passed into createFile/createFileFromStream will be used. - * For true instances of Blob and File, returns the blob's content as a Web ReadableStream. + * For true instances of Blob and File, returns the actual blob. * * @internal */ @@ -76594,7 +75147,7 @@ function getRawContent(blob) { return blob[rawContent](); } else { - return blob.stream(); + return blob; } } /** @@ -76618,7 +75171,7 @@ 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: () => { const s = stream(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { + if (isNodeReadableStream(s)) { throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); } return s; @@ -76648,238 +75201,7 @@ function createFile(content, name, options = {}) { /***/ }), -/***/ 7483: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.delay = delay; -exports.parseHeaderValueAsNumber = parseHeaderValueAsNumber; -const abort_controller_1 = __nccwpck_require__(764); -const StandardAbortMessage = "The operation was aborted."; -/** - * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. - * @param delayInMs - The number of milliseconds to be delayed. - * @param value - The value to be resolved with after a timeout of t milliseconds. - * @param options - The options for delay - currently abort options - * - abortSignal - The abortSignal associated with containing operation. - * - abortErrorMsg - The abort error message associated with containing operation. - * @returns Resolved promise - */ -function delay(delayInMs, value, options) { - return new Promise((resolve, reject) => { - let timer = undefined; - let onAborted = undefined; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); - } - timer = setTimeout(() => { - removeListeners(); - resolve(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); - } - }); -} -/** - * @internal - * @returns the parsed value or undefined if the parsed value is invalid. - */ -function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; -} -//# sourceMappingURL=helpers.js.map - -/***/ }), - -/***/ 4358: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.custom = void 0; -const node_util_1 = __nccwpck_require__(7975); -exports.custom = node_util_1.inspect.custom; -//# sourceMappingURL=inspect.js.map - -/***/ }), - -/***/ 3933: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Sanitizer = void 0; -const core_util_1 = __nccwpck_require__(402); -const RedactedString = "REDACTED"; -// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts -const defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate", -]; -const defaultAllowedQueryParameters = ["api-version"]; -/** - * @internal - */ -class Sanitizer { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [], } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = new Set(); - 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 }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } - else if (key === "url") { - return this.sanitizeUrl(value); - } - else if (key === "query") { - return this.sanitizeQuery(value); - } - else if (key === "body") { - // Don't log the request body - return undefined; - } - else if (key === "response") { - // Don't log response again - return undefined; - } - else if (key === "operationSpec") { - // When using sendOperationRequest, the request carries a massive - // field with the autorest spec. No need to log it. - return undefined; - } - else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } - else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } - else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } -} -exports.Sanitizer = Sanitizer; -//# sourceMappingURL=sanitizer.js.map - -/***/ }), - -/***/ 1291: +/***/ 8052: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -76888,7 +75210,7 @@ exports.Sanitizer = Sanitizer; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DEFAULT_CYCLER_OPTIONS = void 0; exports.createTokenCycler = createTokenCycler; -const helpers_js_1 = __nccwpck_require__(7483); +const core_util_1 = __nccwpck_require__(1831); // 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 @@ -76928,7 +75250,7 @@ async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -77051,36 +75373,7 @@ function createTokenCycler(credential, tokenCyclerOptions) { /***/ }), -/***/ 8666: -/***/ ((__unused_webpack_module, exports) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isNodeReadableStream = isNodeReadableStream; -exports.isWebReadableStream = isWebReadableStream; -exports.isReadableStream = isReadableStream; -exports.isBlob = isBlob; -function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); -} -function isWebReadableStream(x) { - return Boolean(x && - typeof x.getReader === "function" && - typeof x.tee === "function"); -} -function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); -} -function isBlob(x) { - return typeof x.stream === "function"; -} -//# sourceMappingURL=typeGuards.js.map - -/***/ }), - -/***/ 1965: +/***/ 2105: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -77089,8 +75382,8 @@ function isBlob(x) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getUserAgentHeaderName = getUserAgentHeaderName; exports.getUserAgentValue = getUserAgentValue; -const userAgentPlatform_js_1 = __nccwpck_require__(7849); -const constants_js_1 = __nccwpck_require__(464); +const userAgentPlatform_js_1 = __nccwpck_require__(726); +const constants_js_1 = __nccwpck_require__(7837); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { @@ -77120,7 +75413,7 @@ async function getUserAgentValue(prefix) { /***/ }), -/***/ 7849: +/***/ 726: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -77160,6 +75453,46 @@ async function setPlatformSpecificData(map) { /***/ }), +/***/ 2243: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.wrapAbortSignalLike = wrapAbortSignalLike; +/** + * Creates a native AbortSignal which reflects the state of the provided AbortSignalLike. + * If the AbortSignalLike is already a native AbortSignal, it is returned as is. + * @param abortSignalLike - The AbortSignalLike to wrap. + * @returns - An object containing the native AbortSignal and an optional cleanup function. The cleanup function should be called when the AbortSignal is no longer needed. + */ +function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; +} +//# sourceMappingURL=wrapAbortSignal.js.map + +/***/ }), + /***/ 9340: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -77412,7 +75745,7 @@ exports.TracingContextImpl = TracingContextImpl; /***/ }), -/***/ 6826: +/***/ 2429: /***/ ((__unused_webpack_module, exports) => { @@ -77442,94 +75775,7 @@ async function cancelablePromiseRace(abortablePromiseBuilders, options) { /***/ }), -/***/ 6508: -/***/ ((__unused_webpack_module, exports) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.uint8ArrayToString = uint8ArrayToString; -exports.stringToUint8Array = stringToUint8Array; -/** - * The helper that transforms bytes with specific character encoding into string - * @param bytes - the uint8array bytes - * @param format - the format we use to encode the byte - * @returns a string of the encoded string - */ -function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); -} -/** - * The helper that transforms string to specific character encoded bytes array. - * @param value - the string to be converted - * @param format - the format we use to decode the value - * @returns a uint8array - */ -function stringToUint8Array(value, format) { - return Buffer.from(value, format); -} -//# sourceMappingURL=bytesEncoding.js.map - -/***/ }), - -/***/ 5869: -/***/ ((__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.isNode = exports.isNodeLike = exports.isBun = exports.isDeno = exports.isWebWorker = exports.isBrowser = void 0; -/** - * A constant that indicates whether the environment the code is running is a Web Browser. - */ -// eslint-disable-next-line @azure/azure-sdk/ts-no-window -exports.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; -/** - * 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"); -/** - * A constant that indicates whether the environment the code is running is Deno. - */ -exports.isDeno = typeof Deno !== "undefined" && - typeof Deno.version !== "undefined" && - typeof Deno.version.deno !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is Bun.sh. - */ -exports.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is a Node.js compatible environment. - */ -exports.isNodeLike = typeof globalThis.process !== "undefined" && - Boolean(globalThis.process.version) && - Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); -/** - * A constant that indicates whether the environment the code is running is a Node.js compatible environment. - * @deprecated Use `isNodeLike` instead. - */ -exports.isNode = exports.isNodeLike; -/** - * A constant that indicates whether the environment the code is running is Node.JS. - */ -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"; -//# sourceMappingURL=checkEnvironment.js.map - -/***/ }), - -/***/ 9639: +/***/ 8988: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -77580,7 +75826,7 @@ function createAbortablePromise(buildPromise, options) { /***/ }), -/***/ 2389: +/***/ 8384: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -77589,8 +75835,8 @@ function createAbortablePromise(buildPromise, options) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.delay = delay; exports.calculateRetryDelay = calculateRetryDelay; -const createAbortablePromise_js_1 = __nccwpck_require__(9639); -const random_js_1 = __nccwpck_require__(987); +const createAbortablePromise_js_1 = __nccwpck_require__(8988); +const util_1 = __nccwpck_require__(7201); const StandardAbortMessage = "The delay was aborted."; /** * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. @@ -77622,35 +75868,22 @@ function calculateRetryDelay(retryAttempt, config) { const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); // Allow the final value to have some "jitter" (within 50% of the delay size) so // that retries across multiple clients don't occur simultaneously. - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); return { retryAfterInMs }; } //# sourceMappingURL=delay.js.map /***/ }), -/***/ 6024: +/***/ 8645: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isError = isError; exports.getErrorMessage = getErrorMessage; -const object_js_1 = __nccwpck_require__(6943); -/** - * Typeguard for an error object shape (has name and message) - * @param e - Something caught by a catch clause. - */ -function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; -} +const util_1 = __nccwpck_require__(7201); /** * 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. @@ -77658,7 +75891,7 @@ function isError(e) { * @returns The error message or a string of the input */ function getErrorMessage(e) { - if (isError(e)) { + if ((0, util_1.isError)(e)) { return e.message; } else { @@ -77681,139 +75914,164 @@ function getErrorMessage(e) { /***/ }), -/***/ 402: +/***/ 1831: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.stringToUint8Array = exports.uint8ArrayToString = exports.isWebWorker = exports.isReactNative = exports.isDeno = exports.isNodeRuntime = exports.isNodeLike = exports.isNode = exports.isBun = exports.isBrowser = exports.randomUUID = exports.objectHasProperty = exports.isObjectWithProperties = exports.isDefined = exports.computeSha256Hmac = exports.computeSha256Hash = exports.getErrorMessage = exports.isError = exports.isObject = exports.getRandomIntegerInclusive = exports.createAbortablePromise = exports.cancelablePromiseRace = exports.calculateRetryDelay = exports.delay = void 0; -var delay_js_1 = __nccwpck_require__(2389); -Object.defineProperty(exports, "delay", ({ enumerable: true, get: function () { return delay_js_1.delay; } })); -Object.defineProperty(exports, "calculateRetryDelay", ({ enumerable: true, get: function () { return delay_js_1.calculateRetryDelay; } })); -var aborterUtils_js_1 = __nccwpck_require__(6826); +exports.isWebWorker = exports.isReactNative = exports.isNodeRuntime = exports.isNodeLike = exports.isNode = exports.isDeno = exports.isBun = exports.isBrowser = exports.objectHasProperty = exports.isObjectWithProperties = exports.isDefined = exports.getErrorMessage = exports.delay = exports.createAbortablePromise = exports.cancelablePromiseRace = void 0; +exports.calculateRetryDelay = calculateRetryDelay; +exports.computeSha256Hash = computeSha256Hash; +exports.computeSha256Hmac = computeSha256Hmac; +exports.getRandomIntegerInclusive = getRandomIntegerInclusive; +exports.isError = isError; +exports.isObject = isObject; +exports.randomUUID = randomUUID; +exports.uint8ArrayToString = uint8ArrayToString; +exports.stringToUint8Array = stringToUint8Array; +const tslib_1 = __nccwpck_require__(1577); +const tspRuntime = tslib_1.__importStar(__nccwpck_require__(7201)); +var aborterUtils_js_1 = __nccwpck_require__(2429); Object.defineProperty(exports, "cancelablePromiseRace", ({ enumerable: true, get: function () { return aborterUtils_js_1.cancelablePromiseRace; } })); -var createAbortablePromise_js_1 = __nccwpck_require__(9639); +var createAbortablePromise_js_1 = __nccwpck_require__(8988); Object.defineProperty(exports, "createAbortablePromise", ({ enumerable: true, get: function () { return createAbortablePromise_js_1.createAbortablePromise; } })); -var random_js_1 = __nccwpck_require__(987); -Object.defineProperty(exports, "getRandomIntegerInclusive", ({ enumerable: true, get: function () { return random_js_1.getRandomIntegerInclusive; } })); -var object_js_1 = __nccwpck_require__(6943); -Object.defineProperty(exports, "isObject", ({ enumerable: true, get: function () { return object_js_1.isObject; } })); -var error_js_1 = __nccwpck_require__(6024); -Object.defineProperty(exports, "isError", ({ enumerable: true, get: function () { return error_js_1.isError; } })); +var delay_js_1 = __nccwpck_require__(8384); +Object.defineProperty(exports, "delay", ({ enumerable: true, get: function () { return delay_js_1.delay; } })); +var error_js_1 = __nccwpck_require__(8645); Object.defineProperty(exports, "getErrorMessage", ({ enumerable: true, get: function () { return error_js_1.getErrorMessage; } })); -var sha256_js_1 = __nccwpck_require__(9723); -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 typeGuards_js_1 = __nccwpck_require__(1218); +var typeGuards_js_1 = __nccwpck_require__(5041); 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; } })); -var uuidUtils_js_1 = __nccwpck_require__(8358); -Object.defineProperty(exports, "randomUUID", ({ enumerable: true, get: function () { return uuidUtils_js_1.randomUUID; } })); -var checkEnvironment_js_1 = __nccwpck_require__(5869); -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, "isNode", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNode; } })); -Object.defineProperty(exports, "isNodeLike", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeLike; } })); -Object.defineProperty(exports, "isNodeRuntime", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeRuntime; } })); -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__(6508); -Object.defineProperty(exports, "uint8ArrayToString", ({ enumerable: true, get: function () { return bytesEncoding_js_1.uint8ArrayToString; } })); -Object.defineProperty(exports, "stringToUint8Array", ({ enumerable: true, get: function () { return bytesEncoding_js_1.stringToUint8Array; } })); +/** + * Calculates the delay interval for retry attempts using exponential delay with jitter. + * + * @param retryAttempt - The current retry attempt number. + * + * @param config - The exponential retry configuration. + * + * @returns An object containing the calculated retry delay. + */ +function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); +} +/** + * Generates a SHA-256 hash. + * + * @param content - The data to be included in the hash. + * + * @param encoding - The textual encoding to use for the returned hash. + */ +function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); +} +/** + * Generates a SHA-256 HMAC signature. + * + * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. + * + * @param stringToSign - The data to be signed. + * + * @param encoding - The textual encoding to use for the returned HMAC digest. + */ +function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); +} +/** + * Returns a random integer value between a lower and upper bound, inclusive of both bounds. Note that this uses Math.random and isn't secure. If you need to use this for any kind of security purpose, find a better source of random. + * + * @param min - The smallest integer value allowed. + * + * @param max - The largest integer value allowed. + */ +function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); +} +/** + * Typeguard for an error object shape (has name and message) + * + * @param e - Something caught by a catch clause. + */ +function isError(e) { + return tspRuntime.isError(e); +} +/** + * Helper to determine when an input is a generic JS object. + * + * @returns true when input is an object type that is not null, Array, RegExp, or Date. + */ +function isObject(input) { + return tspRuntime.isObject(input); +} +/** + * Generated Universally Unique Identifier + * + * @returns RFC4122 v4 UUID. + */ +function randomUUID() { + return tspRuntime.randomUUID(); +} +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +exports.isBrowser = tspRuntime.isBrowser; +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +exports.isBun = tspRuntime.isBun; +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +exports.isDeno = tspRuntime.isDeno; +/** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + * + * @deprecated + * + * Use `isNodeLike` instead. + */ +exports.isNode = tspRuntime.isNodeLike; +/** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + */ +exports.isNodeLike = tspRuntime.isNodeLike; +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +exports.isNodeRuntime = tspRuntime.isNodeRuntime; +/** + * A constant that indicates whether the environment the code is running is in React-Native. + */ +exports.isReactNative = tspRuntime.isReactNative; +/** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ +exports.isWebWorker = tspRuntime.isWebWorker; +/** + * The helper that transforms bytes with specific character encoding into string + * @param bytes - the uint8array bytes + * @param format - the format we use to encode the byte + * @returns a string of the encoded string + */ +function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); +} +/** + * The helper that transforms string to specific character encoded bytes array. + * @param value - the string to be converted + * @param format - the format we use to decode the value + * @returns a uint8array + */ +function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); +} //# sourceMappingURL=index.js.map /***/ }), -/***/ 6943: -/***/ ((__unused_webpack_module, exports) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isObject = isObject; -/** - * Helper to determine when an input is a generic JS object. - * @returns true when input is an object type that is not null, Array, RegExp, or Date. - */ -function isObject(input) { - return (typeof input === "object" && - input !== null && - !Array.isArray(input) && - !(input instanceof RegExp) && - !(input instanceof Date)); -} -//# sourceMappingURL=object.js.map - -/***/ }), - -/***/ 987: -/***/ ((__unused_webpack_module, exports) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRandomIntegerInclusive = getRandomIntegerInclusive; -/** - * Returns a random integer value between a lower and upper bound, - * inclusive of both bounds. - * Note that this uses Math.random and isn't secure. If you need to use - * this for any kind of security purpose, find a better source of random. - * @param min - The smallest integer value allowed. - * @param max - The largest integer value allowed. - */ -function getRandomIntegerInclusive(min, max) { - // Make sure inputs are integers. - min = Math.ceil(min); - max = Math.floor(max); - // Pick a random offset from zero to the size of the range. - // Since Math.random() can never return 1, we have to make the range one larger - // in order to be inclusive of the maximum value after we take the floor. - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; -} -//# sourceMappingURL=random.js.map - -/***/ }), - -/***/ 9723: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.computeSha256Hmac = computeSha256Hmac; -exports.computeSha256Hash = computeSha256Hash; -const crypto_1 = __nccwpck_require__(6982); -/** - * Generates a SHA-256 HMAC signature. - * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. - * @param stringToSign - The data to be signed. - * @param encoding - The textual encoding to use for the returned HMAC digest. - */ -async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); -} -/** - * Generates a SHA-256 hash. - * @param content - The data to be included in the hash. - * @param encoding - The textual encoding to use for the returned hash. - */ -async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); -} -//# sourceMappingURL=sha256.js.map - -/***/ }), - -/***/ 1218: +/***/ 5041: /***/ ((__unused_webpack_module, exports) => { @@ -77858,32 +76116,6 @@ function objectHasProperty(thing, property) { /***/ }), -/***/ 8358: -/***/ ((__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 crypto_1 = __nccwpck_require__(6982); -// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+. -const uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" - ? globalThis.crypto.randomUUID.bind(globalThis.crypto) - : crypto_1.randomUUID; -/** - * Generated Universally Unique Identifier - * - * @returns RFC4122 v4 UUID. - */ -function randomUUID() { - return uuidFunction(); -} -//# sourceMappingURL=uuidUtils.js.map - -/***/ }), - /***/ 4377: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -77995,142 +76227,28 @@ async function parseXML(str, opts = {}) { /***/ }), -/***/ 6676: +/***/ 9036: /***/ ((__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__(1165); -const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; -let enabledString; -let enabledNamespaces = []; -let skippedNamespaces = []; -const debuggers = []; -if (debugEnvVariable) { - enable(debugEnvVariable); -} -const debugObj = Object.assign((namespace) => { - return createDebugger(namespace); -}, { - enable, - enabled, - disable, - log: log_js_1.log, -}); -function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } - else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } -} -function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; -} -function disable() { - const result = enabledString || ""; - enable(""); - return result; -} -function createDebugger(namespace) { - const newDebugger = Object.assign(debug, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend, - }); - function debug(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; -} -function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; -} -function extend(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; -} -exports["default"] = debugObj; -//# sourceMappingURL=debug.js.map - -/***/ }), - -/***/ 5851: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AzureLogger = void 0; exports.setLogLevel = setLogLevel; exports.getLogLevel = getLogLevel; exports.createClientLogger = createClientLogger; -const tslib_1 = __nccwpck_require__(1577); -const debug_js_1 = tslib_1.__importDefault(__nccwpck_require__(6676)); -const registeredLoggers = new Set(); -const logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL) || undefined; -let azureLogLevel; +const logger_1 = __nccwpck_require__(665); +const context = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure", +}); /** * The AzureLogger provides a mechanism for overriding where logs are output to. * By default, logs are sent to stderr. * Override the `log` method to redirect logs to another location. */ -exports.AzureLogger = (0, debug_js_1.default)("azure"); -exports.AzureLogger.log = (...args) => { - debug_js_1.default.log(...args); -}; -const AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; -if (logLevelFromEnv) { - // avoid calling setLogLevel because we don't want a mis-set environment variable to crash - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } - else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } -} +exports.AzureLogger = context.logger; /** * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. * @param level - The log level to enable for logging. @@ -78141,91 +76259,26 @@ if (logLevelFromEnv) { * - error */ function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces.push(logger.namespace); - } - } - debug_js_1.default.enable(enabledNamespaces.join(",")); + context.setLogLevel(level); } /** * Retrieves the currently specified log level. */ function getLogLevel() { - return azureLogLevel; + return context.getLogLevel(); } -const levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100, -}; /** * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. * @param namespace - The name of the SDK package. * @hidden */ function createClientLogger(namespace) { - const clientRootLogger = exports.AzureLogger.extend(namespace); - patchLogMethod(exports.AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose"), - }; -} -function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; -} -function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level, - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces = debug_js_1.default.disable(); - debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; -} -function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); -} -function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); + return context.createClientLogger(namespace); } //# sourceMappingURL=index.js.map /***/ }), -/***/ 1165: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.log = log; -const tslib_1 = __nccwpck_require__(1577); -const node_os_1 = __nccwpck_require__(8161); -const node_util_1 = tslib_1.__importDefault(__nccwpck_require__(7975)); -const process = tslib_1.__importStar(__nccwpck_require__(1708)); -function log(message, ...args) { - process.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); -} -//# sourceMappingURL=log.js.map - -/***/ }), - /***/ 6917: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { @@ -79837,6 +77890,4198 @@ function parseParams (str) { module.exports = parseParams +/***/ }), + +/***/ 7543: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AbortError = void 0; +/** + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * ```ts snippet:ReadmeSampleAbortError + * import { AbortError } from "@typespec/ts-http-runtime"; + * + * async function doAsyncWork(options: { abortSignal: AbortSignal }): Promise { + * if (options.abortSignal.aborted) { + * throw new AbortError(); + * } + * + * // do async work + * } + * + * const controller = new AbortController(); + * controller.abort(); + * + * try { + * doAsyncWork({ abortSignal: controller.signal }); + * } catch (e) { + * if (e instanceof Error && e.name === "AbortError") { + * // handle abort error here. + * } + * } + * ``` + */ +class AbortError extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } +} +exports.AbortError = AbortError; +//# sourceMappingURL=AbortError.js.map + +/***/ }), + +/***/ 4206: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isOAuth2TokenCredential = isOAuth2TokenCredential; +exports.isBearerTokenCredential = isBearerTokenCredential; +exports.isBasicCredential = isBasicCredential; +exports.isApiKeyCredential = isApiKeyCredential; +/** + * Type guard to check if a credential is an OAuth2 token credential. + */ +function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; +} +/** + * Type guard to check if a credential is a Bearer token credential. + */ +function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; +} +/** + * Type guard to check if a credential is a Basic auth credential. + */ +function isBasicCredential(credential) { + return "username" in credential && "password" in credential; +} +/** + * Type guard to check if a credential is an API key credential. + */ +function isApiKeyCredential(credential) { + return "key" in credential; +} +//# sourceMappingURL=credentials.js.map + +/***/ }), + +/***/ 9544: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=oauth2Flows.js.map + +/***/ }), + +/***/ 9932: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=schemes.js.map + +/***/ }), + +/***/ 9919: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.apiVersionPolicyName = void 0; +exports.apiVersionPolicy = apiVersionPolicy; +exports.apiVersionPolicyName = "ApiVersionPolicy"; +/** + * Creates a policy that sets the apiVersion as a query parameter on every request + * @param options - Client options + * @returns Pipeline policy that sets the apiVersion as a query parameter on every request + */ +function apiVersionPolicy(options) { + return { + name: exports.apiVersionPolicyName, + sendRequest: (req, next) => { + // Use the apiVesion defined in request url directly + // Append one if there is no apiVesion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + }, + }; +} +//# sourceMappingURL=apiVersionPolicy.js.map + +/***/ }), + +/***/ 4829: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDefaultPipeline = createDefaultPipeline; +exports.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; +const defaultHttpClient_js_1 = __nccwpck_require__(9875); +const createPipelineFromOptions_js_1 = __nccwpck_require__(429); +const apiVersionPolicy_js_1 = __nccwpck_require__(9919); +const credentials_js_1 = __nccwpck_require__(4206); +const apiKeyAuthenticationPolicy_js_1 = __nccwpck_require__(1794); +const basicAuthenticationPolicy_js_1 = __nccwpck_require__(4351); +const bearerAuthenticationPolicy_js_1 = __nccwpck_require__(4760); +const oauth2AuthenticationPolicy_js_1 = __nccwpck_require__(4818); +let cachedHttpClient; +/** + * Creates a default rest pipeline to re-use accross Rest Level Clients + */ +function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; +} +function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; +} +//# sourceMappingURL=clientHelpers.js.map + +/***/ }), + +/***/ 490: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getClient = getClient; +const clientHelpers_js_1 = __nccwpck_require__(4829); +const sendRequest_js_1 = __nccwpck_require__(9686); +const urlHelpers_js_1 = __nccwpck_require__(2263); +const checkEnvironment_js_1 = __nccwpck_require__(8633); +/** + * Creates a client with a default pipeline + * @param endpoint - Base endpoint for the client + * @param credentials - Credentials to authenticate the requests + * @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) { + for (const { policy, position } of clientOptions.additionalPolicies) { + // Sign happens after Retry and is commonly needed to occur + // before policies that intercept post-retry. + const afterPhase = position === "perRetry" ? "Sign" : undefined; + pipeline.addPolicy(policy, { + afterPhase, + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = (_c = clientOptions.endpoint) !== null && _c !== void 0 ? _c : endpoint; + const client = (path, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path, args, Object.assign({ allowInsecureConnection }, requestOptions)); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline, + }; +} +function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + var _a; + allowInsecureConnection = (_a = options.allowInsecureConnection) !== null && _a !== void 0 ? _a : allowInsecureConnection; + return { + then: function (onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection }), httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } + else { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection, responseAsStream: true }), httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection, responseAsStream: true }), httpClient); + } + else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + }, + }; +} +//# sourceMappingURL=getClient.js.map + +/***/ }), + +/***/ 5749: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.buildBodyPart = buildBodyPart; +exports.buildMultipartBody = buildMultipartBody; +const restError_js_1 = __nccwpck_require__(8293); +const httpHeaders_js_1 = __nccwpck_require__(9939); +const bytesEncoding_js_1 = __nccwpck_require__(6000); +const typeGuards_js_1 = __nccwpck_require__(8390); +/** + * Get value of a header in the part descriptor ignoring case + */ +function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return undefined; +} +function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + // Special value of null means content type is to be omitted + if (descriptor.contentType === null) { + return undefined; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === undefined) { + return undefined; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + // arbitrary non-text object -> generic JSON content type by default. We will try to JSON.stringify the body. + return "application/json"; +} +/** + * Enclose value in quotes and escape special characters, for use in the Content-Disposition header + */ +function escapeDispositionField(value) { + return JSON.stringify(value); +} +function getContentDisposition(descriptor) { + var _a; + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === undefined && + descriptor.name === undefined && + descriptor.filename === undefined) { + return undefined; + } + const dispositionType = (_a = descriptor.dispositionType) !== null && _a !== void 0 ? _a : "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = undefined; + if (descriptor.filename) { + filename = descriptor.filename; + } + else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; +} +function normalizeBody(body, contentType) { + if (body === undefined) { + // zero-length body + return new Uint8Array([]); + } + // binary and primitives should go straight on the wire regardless of content type + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + // stringify objects for JSON-ish content types e.g. application/json, application/merge-patch+json, application/vnd.oci.manifest.v1+json, application.json; charset=UTF-8 + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); +} +function buildBodyPart(descriptor) { + var _a; + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)((_a = descriptor.headers) !== null && _a !== void 0 ? _a : {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body, + }; +} +function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; +} +//# sourceMappingURL=multipart.js.map + +/***/ }), + +/***/ 4792: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.operationOptionsToRequestParameters = operationOptionsToRequestParameters; +/** + * Helper function to convert OperationOptions to RequestParameters + * @param options - the options that are used by Modular layer to send the request + * @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, + 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), + onResponse: options.onResponse, + }; +} +//# sourceMappingURL=operationOptionHelpers.js.map + +/***/ }), + +/***/ 1565: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createRestError = createRestError; +const restError_js_1 = __nccwpck_require__(8293); +const httpHeaders_js_1 = __nccwpck_require__(9939); +function createRestError(messageOrResponse, response) { + var _a, _b, _c; + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = (_b = (_a = resp.body) === null || _a === void 0 ? void 0 : _a.error) !== null && _b !== void 0 ? _b : resp.body; + const message = typeof messageOrResponse === "string" + ? messageOrResponse + : ((_c = internalError === null || internalError === void 0 ? void 0 : internalError.message) !== null && _c !== void 0 ? _c : `Unexpected status code: ${resp.status}`); + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError === null || internalError === void 0 ? void 0 : internalError.code, + request: resp.request, + response: toPipelineResponse(resp), + }); +} +function toPipelineResponse(response) { + var _a; + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: (_a = statusCodeToNumber(response.status)) !== null && _a !== void 0 ? _a : -1, + }; +} +function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? undefined : status; +} +//# sourceMappingURL=restError.js.map + +/***/ }), + +/***/ 9686: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.sendRequest = sendRequest; +const restError_js_1 = __nccwpck_require__(8293); +const httpHeaders_js_1 = __nccwpck_require__(9939); +const pipelineRequest_js_1 = __nccwpck_require__(6906); +const clientHelpers_js_1 = __nccwpck_require__(4829); +const typeGuards_js_1 = __nccwpck_require__(8390); +const multipart_js_1 = __nccwpck_require__(5749); +/** + * Helper function to send request used by the client + * @param method - method to use to send the request + * @param url - url to send the request to + * @param pipeline - pipeline with the policies to run when sending the request + * @param options - request options + * @param customHttpClient - a custom HttpClient to use when making the request + * @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 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 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 })); + } + return { + request, + headers, + status: `${response.status}`, + body, + }; + } + catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + // 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); + } + throw e; + } +} +/** + * Function to determine the request content type + * @param options - request options InternalRequestParameters + * @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)); +} +/** + * Function to determine the content-type of a body + * this is used if an explicit content-type is not provided + * @param body - body in the request + * @returns returns the content-type + */ +function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } + catch (error) { + // If we fail to parse the body, it is not json + return undefined; + } + } + // By default return json + 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, + }))); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream + ? new Set([Number.POSITIVE_INFINITY]) + : undefined, + }); +} +/** + * Prepares the body before sending the request + */ +function getRequestBody(body, contentType = "") { + if (body === undefined) { + return { body: undefined }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } +} +/** + * 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 firstType = contentType.split(";")[0]; + const bodyToParse = (_b = response.bodyAsText) !== null && _b !== void 0 ? _b : ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + // Default to "application/json" and fallback to string; + try { + return bodyToParse ? JSON.parse(bodyToParse) : undefined; + } + catch (error) { + // If we were supposed to get a JSON object and failed to + // parse, throw a parse error + if (firstType === "application/json") { + throw createParseError(response, error); + } + // We are not sure how to handle the response so we return it as + // plain text. + return String(bodyToParse); + } +} +function createParseError(response, err) { + var _a; + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = (_a = err.code) !== null && _a !== void 0 ? _a : restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response: response, + }); +} +//# sourceMappingURL=sendRequest.js.map + +/***/ }), + +/***/ 2263: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.buildRequestUrl = buildRequestUrl; +exports.buildBaseUrl = buildBaseUrl; +exports.replaceAll = replaceAll; +function isQueryParameterWithOptions(x) { + const value = x.value; + return (value !== undefined && value.toString !== undefined && typeof value.toString === "function"); +} +/** + * Builds the request url, filling in query and path parameters + * @param endpoint - base url which can be a template url + * @param routePath - path to append to the endpoint + * @param pathParameters - values of the path parameters + * @param options - request parameters including query parameters + * @returns a full url with path and query parameters + */ +function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url = new URL(requestUrl); + return (url + .toString() + // Remove double forward slashes + .replace(/([^:]\/)\/+/g, "$1")); +} +function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } + else if (style === "spaceDelimited") { + separator = "%20"; + } + else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } + else if (typeof param === "object" && param.toString === Object.prototype.toString) { + // If the parameter is an object without a custom toString implementation (e.g. a Date), + // then we should deconstruct the object into an array [key1, value1, key2, value2, ...]. + paramValues = Object.entries(param).flat(); + } + else { + paramValues = [param]; + } + const value = paramValues + .map((p) => { + if (p === null || p === undefined) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== undefined ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }) + .join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; +} +function appendQueryParams(url, options = {}) { + var _a, _b, _c, _d; + if (!options.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === undefined || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? ((_a = param.explode) !== null && _a !== void 0 ? _a : false) : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, (_b = options.skipUrlEncoding) !== null && _b !== void 0 ? _b : false, style, item)); + } + } + else if (typeof rawValue === "object") { + // For object explode, the name of the query parameter is ignored and we use the object key instead + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, (_c = options.skipUrlEncoding) !== null && _c !== void 0 ? _c : false, style, value)); + } + } + else { + // Explode doesn't really make sense for primitives + throw new Error("explode can only be set to true for objects and arrays"); + } + } + else { + paramStrings.push(getQueryParamValue(key, (_d = options.skipUrlEncoding) !== null && _d !== void 0 ? _d : false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); +} +function buildBaseUrl(endpoint, options) { + var _a; + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === undefined || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== undefined ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = (_a = replaceAll(endpoint, `{${key}}`, value)) !== null && _a !== void 0 ? _a : ""; + } + return endpoint; +} +function buildRoutePath(routePath, pathParameters, options = {}) { + var _a; + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && ((_a = pathParam.allowReserved) !== null && _a !== void 0 ? _a : false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; +} +/** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param value - The value to search and replace in. + * @param searchValue - The value to search for in the value argument. + * @param replaceValue - The value to replace searchValue with in the value argument. + * @returns The value where each instance of searchValue was replaced with replacedValue. + */ +function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); +} +//# sourceMappingURL=urlHelpers.js.map + +/***/ }), + +/***/ 8956: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// 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.2.2"; +exports.DEFAULT_RETRY_POLICY_COUNT = 3; +//# sourceMappingURL=constants.js.map + +/***/ }), + +/***/ 429: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPipelineFromOptions = createPipelineFromOptions; +const logPolicy_js_1 = __nccwpck_require__(5244); +const pipeline_js_1 = __nccwpck_require__(8439); +const redirectPolicy_js_1 = __nccwpck_require__(2572); +const userAgentPolicy_js_1 = __nccwpck_require__(2718); +const decompressResponsePolicy_js_1 = __nccwpck_require__(56); +const defaultRetryPolicy_js_1 = __nccwpck_require__(6933); +const formDataPolicy_js_1 = __nccwpck_require__(710); +const checkEnvironment_js_1 = __nccwpck_require__(8633); +const proxyPolicy_js_1 = __nccwpck_require__(1722); +const agentPolicy_js_1 = __nccwpck_require__(883); +const tlsPolicy_js_1 = __nccwpck_require__(6239); +const multipartPolicy_js_1 = __nccwpck_require__(834); +/** + * Create a new pipeline with a default set of customizable policies. + * @param options - Options to configure a custom pipeline. + */ +function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + // 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" }); + if (checkEnvironment_js_1.isNodeLike) { + // Both XHR and Fetch expect to handle redirects automatically, + // so only include this policy when we're in Node. + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; +} +//# sourceMappingURL=createPipelineFromOptions.js.map + +/***/ }), + +/***/ 9875: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDefaultHttpClient = createDefaultHttpClient; +const nodeHttpClient_js_1 = __nccwpck_require__(3482); +/** + * Create the correct HttpClient for the current environment. + */ +function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); +} +//# sourceMappingURL=defaultHttpClient.js.map + +/***/ }), + +/***/ 9939: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createHttpHeaders = createHttpHeaders; +function normalizeName(name) { + return name.toLowerCase(); +} +function* headerIterator(map) { + for (const entry of map.values()) { + yield [entry.name, entry.value]; + } +} +class HttpHeadersImpl { + constructor(rawHeaders) { + this._headersMap = new Map(); + if (rawHeaders) { + for (const headerName of Object.keys(rawHeaders)) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param name - The name of the header to set. This value is case-insensitive. + * @param value - The value of the header to set. + */ + set(name, value) { + this._headersMap.set(normalizeName(name), { name, value: String(value).trim() }); + } + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param name - The name of the header. This value is case-insensitive. + */ + get(name) { + var _a; + return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + } + /** + * Get whether or not this header collection contains a header entry for the provided header name. + * @param name - The name of the header to set. This value is case-insensitive. + */ + has(name) { + return this._headersMap.has(normalizeName(name)); + } + /** + * Remove the header with the provided headerName. + * @param name - The name of the header to remove. + */ + delete(name) { + this._headersMap.delete(normalizeName(name)); + } + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJSON(options = {}) { + const result = {}; + if (options.preserveCase) { + for (const entry of this._headersMap.values()) { + result[entry.name] = entry.value; + } + } + else { + for (const [normalizedName, entry] of this._headersMap) { + result[normalizedName] = entry.value; + } + } + return result; + } + /** + * Get the string representation of this HTTP header collection. + */ + toString() { + return JSON.stringify(this.toJSON({ preserveCase: true })); + } + /** + * Iterate over tuples of header [name, value] pairs. + */ + [Symbol.iterator]() { + return headerIterator(this._headersMap); + } +} +/** + * Creates an object that satisfies the `HttpHeaders` interface. + * @param rawHeaders - A simple object representing initial headers + */ +function createHttpHeaders(rawHeaders) { + return new HttpHeadersImpl(rawHeaders); +} +//# sourceMappingURL=httpHeaders.js.map + +/***/ }), + +/***/ 1717: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +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__(1577); +var AbortError_js_1 = __nccwpck_require__(7543); +Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); +var logger_js_1 = __nccwpck_require__(5300); +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__(9939); +Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); +tslib_1.__exportStar(__nccwpck_require__(9932), exports); +tslib_1.__exportStar(__nccwpck_require__(9544), exports); +var pipelineRequest_js_1 = __nccwpck_require__(6906); +Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); +var pipeline_js_1 = __nccwpck_require__(8439); +Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); +var restError_js_1 = __nccwpck_require__(8293); +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__(6000); +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__(9875); +Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); +var getClient_js_1 = __nccwpck_require__(490); +Object.defineProperty(exports, "getClient", ({ enumerable: true, get: function () { return getClient_js_1.getClient; } })); +var operationOptionHelpers_js_1 = __nccwpck_require__(4792); +Object.defineProperty(exports, "operationOptionsToRequestParameters", ({ enumerable: true, get: function () { return operationOptionHelpers_js_1.operationOptionsToRequestParameters; } })); +var restError_js_2 = __nccwpck_require__(1565); +Object.defineProperty(exports, "createRestError", ({ enumerable: true, get: function () { return restError_js_2.createRestError; } })); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 1979: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = void 0; +const logger_js_1 = __nccwpck_require__(5300); +exports.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 2337: +/***/ ((__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__(8252); +const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; +let enabledString; +let enabledNamespaces = []; +let skippedNamespaces = []; +const debuggers = []; +if (debugEnvVariable) { + enable(debugEnvVariable); +} +const debugObj = Object.assign((namespace) => { + return createDebugger(namespace); +}, { + enable, + enabled, + disable, + log: log_js_1.log, +}); +function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const wildcard = /\*/g; + const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); + } + else { + enabledNamespaces.push(new RegExp(`^${ns}$`)); + } + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } +} +function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (skipped.test(namespace)) { + return false; + } + } + for (const enabledNamespace of enabledNamespaces) { + if (enabledNamespace.test(namespace)) { + return true; + } + } + return false; +} +function disable() { + const result = enabledString || ""; + enable(""); + return result; +} +function createDebugger(namespace) { + const newDebugger = Object.assign(debug, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend, + }); + function debug(...args) { + if (!newDebugger.enabled) { + return; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); + } + debuggers.push(newDebugger); + return newDebugger; +} +function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; + } + return false; +} +function extend(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; +} +exports["default"] = debugObj; +//# sourceMappingURL=debug.js.map + +/***/ }), + +/***/ 665: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createLoggerContext = void 0; +var logger_js_1 = __nccwpck_require__(5300); +Object.defineProperty(exports, "createLoggerContext", ({ enumerable: true, get: function () { return logger_js_1.createLoggerContext; } })); +//# sourceMappingURL=internal.js.map + +/***/ }), + +/***/ 8252: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.log = log; +const tslib_1 = __nccwpck_require__(1577); +const node_os_1 = __nccwpck_require__(8161); +const node_util_1 = tslib_1.__importDefault(__nccwpck_require__(7975)); +const process = tslib_1.__importStar(__nccwpck_require__(1708)); +function log(message, ...args) { + process.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); +} +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 5300: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TypeSpecRuntimeLogger = void 0; +exports.createLoggerContext = createLoggerContext; +exports.setLogLevel = setLogLevel; +exports.getLogLevel = getLogLevel; +exports.createClientLogger = createClientLogger; +const tslib_1 = __nccwpck_require__(1577); +const debug_js_1 = tslib_1.__importDefault(__nccwpck_require__(2337)); +const TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; +const levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100, +}; +function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; +} +function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); +} +/** + * Creates a logger context base on the provided options. + * @param options - The options for creating a logger context. + * @returns The logger context. + */ +function createLoggerContext(options) { + const registeredLoggers = new Set(); + const logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName]) || + undefined; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + if (logLevelFromEnv) { + // avoid calling setLogLevel because we don't want a mis-set environment variable to crash + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + setLogLevel(logLevelFromEnv); + } + else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level, + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + return { + setLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); + } + } + debug_js_1.default.enable(enabledNamespaces.join(",")); + }, + getLogLevel() { + return logLevel; + }, + createClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose"), + }; + }, + logger: clientLogger, + }; +} +const context = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime", +}); +/** + * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. + * @param level - The log level to enable for logging. + * Options from most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ +// eslint-disable-next-line @typescript-eslint/no-redeclare +exports.TypeSpecRuntimeLogger = context.logger; +/** + * Retrieves the currently specified log level. + */ +function setLogLevel(logLevel) { + context.setLogLevel(logLevel); +} +/** + * Retrieves the currently specified log level. + */ +function getLogLevel() { + return context.getLogLevel(); +} +/** + * Creates a logger for use by the SDKs that inherits from `TypeSpecRuntimeLogger`. + * @param namespace - The name of the SDK package. + * @hidden + */ +function createClientLogger(namespace) { + return context.createClientLogger(namespace); +} +//# sourceMappingURL=logger.js.map + +/***/ }), + +/***/ 3482: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getBodyLength = getBodyLength; +exports.createNodeHttpClient = createNodeHttpClient; +const tslib_1 = __nccwpck_require__(1577); +const http = tslib_1.__importStar(__nccwpck_require__(7067)); +const https = tslib_1.__importStar(__nccwpck_require__(4708)); +const zlib = tslib_1.__importStar(__nccwpck_require__(8522)); +const node_stream_1 = __nccwpck_require__(7075); +const AbortError_js_1 = __nccwpck_require__(7543); +const httpHeaders_js_1 = __nccwpck_require__(9939); +const restError_js_1 = __nccwpck_require__(8293); +const log_js_1 = __nccwpck_require__(1979); +const sanitizer_js_1 = __nccwpck_require__(577); +const DEFAULT_TLS_SETTINGS = {}; +function isReadableStream(body) { + return body && typeof body.pipe === "function"; +} +function isStreamComplete(stream) { + if (stream.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve) => { + const handler = () => { + resolve(); + stream.removeListener("close", handler); + stream.removeListener("end", handler); + stream.removeListener("error", handler); + }; + stream.on("close", handler); + stream.on("end", handler); + stream.on("error", handler); + }); +} +function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; +} +class ReportTransform extends node_stream_1.Transform { + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } + catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.loadedBytes = 0; + this.progressCallback = progressCallback; + } +} +/** + * A HttpClient implementation that uses Node's "https" module to send HTTPS requests. + * @internal + */ +class NodeHttpClient { + constructor() { + this.cachedHttpsAgents = new WeakMap(); + } + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + var _a, _b, _c; + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } + else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== undefined) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; + const response = { + status, + headers, + request, + }; + // Responses to HEAD must not have a body. + // If they do return a body, that body must be ignored. + if (request.method === "HEAD") { + // call resume() and not destroy() to avoid closing the socket + // and losing keep alive + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || + ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status))) { + response.readableStreamBody = responseStream; + } + else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } + finally { + // clean up event listener + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]) + .then(() => { + var _a; + // eslint-disable-next-line promise/always-return + if (abortListener) { + (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener("abort", abortListener); + } + }) + .catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + var _a; + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) { + throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); + } + const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); + const options = Object.assign({ agent, hostname: url.hostname, path: `${url.pathname}${url.search}`, port: url.port, method: request.method, headers: request.headers.toJSON({ preserveCase: true }) }, request.requestOverrides); + return new Promise((resolve, reject) => { + const req = isInsecure ? http.request(options, resolve) : https.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 })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } + else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } + else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } + else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } + else { + // streams don't like "undefined" being passed as data + req.end(); + } + }); + } + 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; + } + if (!this.cachedHttpAgent) { + // If there is no cached agent create a new one and cache it. + this.cachedHttpAgent = new http.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } + else { + if (disableKeepAlive && !request.tlsSettings) { + // When there are no tlsSettings and keepAlive is false + // we don't need a custom agent + return https.globalAgent; + } + // We use the tlsSettings to index cached clients + const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; + // Get the cached agent or create a new one with the + // provided values for keepAlive and tlsSettings + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new https.Agent(Object.assign({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive }, tlsSettings)); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } +} +function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } + else if (value) { + headers.set(header, value); + } + } + return headers; +} +function getDecodedResponseStream(stream, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = zlib.createGunzip(); + stream.pipe(unzip); + return unzip; + } + else if (contentEncoding === "deflate") { + const inflate = zlib.createInflate(); + stream.pipe(inflate); + return inflate; + } + return stream; +} +function streamToText(stream) { + return new Promise((resolve, reject) => { + const buffer = []; + stream.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } + else { + buffer.push(Buffer.from(chunk)); + } + }); + stream.on("end", () => { + resolve(Buffer.concat(buffer).toString("utf8")); + }); + stream.on("error", (e) => { + if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { + reject(e); + } + else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR, + })); + } + }); + }); +} +/** @internal */ +function getBodyLength(body) { + if (!body) { + return 0; + } + else if (Buffer.isBuffer(body)) { + return body.length; + } + else if (isReadableStream(body)) { + return null; + } + else if (isArrayBuffer(body)) { + return body.byteLength; + } + else if (typeof body === "string") { + return Buffer.from(body).length; + } + else { + return null; + } +} +/** + * Create a new HttpClient instance for the NodeJS environment. + * @internal + */ +function createNodeHttpClient() { + return new NodeHttpClient(); +} +//# sourceMappingURL=nodeHttpClient.js.map + +/***/ }), + +/***/ 8439: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createEmptyPipeline = createEmptyPipeline; +const ValidPhaseNames = new Set(["Deserialize", "Serialize", "Retry", "Sign"]); +/** + * A private implementation of Pipeline. + * Do not export this class from the package. + * @internal + */ +class HttpPipeline { + constructor(policies) { + var _a; + this._policies = []; + this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; + this._orderedPolicies = undefined; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options, + }); + this._orderedPolicies = undefined; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if ((options.name && policyDescriptor.policy.name === options.name) || + (options.phase && policyDescriptor.options.phase === options.phase)) { + removedPolicies.push(policyDescriptor.policy); + return false; + } + else { + return true; + } + }); + this._orderedPolicies = undefined; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new HttpPipeline(this._policies); + } + static create() { + return new HttpPipeline(); + } + orderPolicies() { + /** + * The goal of this method is to reliably order pipeline policies + * based on their declared requirements when they were added. + * + * Order is first determined by phase: + * + * 1. Serialize Phase + * 2. Policies not in a phase + * 3. Deserialize Phase + * 4. Retry Phase + * 5. Sign Phase + * + * Within each phase, policies are executed in the order + * they were added unless they were specified to execute + * before/after other policies or after a particular phase. + * + * To determine the final order, we will walk the policy list + * in phase order multiple times until all dependencies are + * satisfied. + * + * `afterPolicies` are the set of policies that must be + * executed before a given policy. This requirement is + * considered satisfied when each of the listed policies + * have been scheduled. + * + * `beforePolicies` are the set of policies that must be + * executed after a given policy. Since this dependency + * can be expressed by converting it into a equivalent + * `afterPolicies` declarations, they are normalized + * into that form for simplicity. + * + * An `afterPhase` dependency is considered satisfied when all + * policies in that phase have scheduled. + * + */ + const result = []; + // Track all policies we know about. + const policyMap = new Map(); + function createPhase(name) { + return { + name, + policies: new Set(), + hasRun: false, + hasAfterPolicies: false, + }; + } + // Track policies for each phase. + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + // a list of phases in order + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + // Small helper function to map phase name to each Phase + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } + else if (phase === "Serialize") { + return serializePhase; + } + else if (phase === "Deserialize") { + return deserializePhase; + } + else if (phase === "Sign") { + return signPhase; + } + else { + return noPhase; + } + } + // First walk each policy and create a node to track metadata. + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: new Set(), + dependants: new Set(), + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + // Now that each policy has a node, connect dependency references. + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + // Linking in both directions helps later + // when we want to notify dependants. + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + // To execute before another node, make it + // depend on the current node. + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + // Sets iterate in insertion order + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + // If this node is waiting on a phase to complete, + // we need to skip it for now. + // Even if the phase is empty, we should wait for it + // to be walked to avoid re-ordering policies. + continue; + } + if (node.dependsOn.size === 0) { + // If there's nothing else we're waiting for, we can + // add this policy to the result list. + result.push(node.policy); + // Notify anything that depends on this policy that + // the policy has been scheduled. + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + // if the phase isn't complete + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + // Try running noPhase to see if that unblocks this phase next tick. + // This can happen if a phase that happens before noPhase + // is waiting on a noPhase policy to complete. + walkPhase(noPhase); + } + // Don't proceed to the next phase until this phase finishes. + return; + } + if (phase.hasAfterPolicies) { + // Run any policies unblocked by this phase + walkPhase(noPhase); + } + } + } + // Iterate until we've put every node in the result list. + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + // Keep walking each phase in order until we can order every node. + walkPhases(); + // The result list *should* get at least one larger each time + // after the first full pass. + // Otherwise, we're going to loop forever. + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } +} +/** + * Creates a totally empty pipeline. + * Useful for testing or creating a custom one. + */ +function createEmptyPipeline() { + return HttpPipeline.create(); +} +//# sourceMappingURL=pipeline.js.map + +/***/ }), + +/***/ 6906: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPipelineRequest = createPipelineRequest; +const httpHeaders_js_1 = __nccwpck_require__(9939); +const uuidUtils_js_1 = __nccwpck_require__(8506); +class PipelineRequestImpl { + constructor(options) { + var _a, _b, _c, _d, _e, _f, _g; + this.url = options.url; + this.body = options.body; + this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; + this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; + this.abortSignal = options.abortSignal; + this.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.requestOverrides = options.requestOverrides; + } +} +/** + * Creates a new pipeline request with the given options. + * This method is to allow for the easy setting of default values and not required. + * @param options - The options to create the request with. + */ +function createPipelineRequest(options) { + return new PipelineRequestImpl(options); +} +//# sourceMappingURL=pipelineRequest.js.map + +/***/ }), + +/***/ 883: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.agentPolicyName = void 0; +exports.agentPolicy = agentPolicy; +/** + * Name of the Agent Policy + */ +exports.agentPolicyName = "agentPolicy"; +/** + * Gets a pipeline policy that sets http.agent + */ +function agentPolicy(agent) { + return { + name: exports.agentPolicyName, + sendRequest: async (req, next) => { + // Users may define an agent on the request, honor it over the client level one + if (!req.agent) { + req.agent = agent; + } + return next(req); + }, + }; +} +//# sourceMappingURL=agentPolicy.js.map + +/***/ }), + +/***/ 1794: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.apiKeyAuthenticationPolicyName = void 0; +exports.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; +const checkInsecureConnection_js_1 = __nccwpck_require__(9785); +/** + * Name of the API Key Authentication Policy + */ +exports.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; +/** + * Gets a pipeline policy that adds API key authentication to requests + */ +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"); + // Skip adding authentication header if no API key authentication scheme is found + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + }, + }; +} +//# sourceMappingURL=apiKeyAuthenticationPolicy.js.map + +/***/ }), + +/***/ 4351: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.basicAuthenticationPolicyName = void 0; +exports.basicAuthenticationPolicy = basicAuthenticationPolicy; +const bytesEncoding_js_1 = __nccwpck_require__(6000); +const checkInsecureConnection_js_1 = __nccwpck_require__(9785); +/** + * Name of the Basic Authentication Policy + */ +exports.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; +/** + * Gets a pipeline policy that adds basic authentication to requests + */ +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"); + // Skip adding authentication header if no basic authentication scheme is found + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + }, + }; +} +//# sourceMappingURL=basicAuthenticationPolicy.js.map + +/***/ }), + +/***/ 4760: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.bearerAuthenticationPolicyName = void 0; +exports.bearerAuthenticationPolicy = bearerAuthenticationPolicy; +const checkInsecureConnection_js_1 = __nccwpck_require__(9785); +/** + * Name of the Bearer Authentication Policy + */ +exports.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; +/** + * Gets a pipeline policy that adds bearer token authentication to requests + */ +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"); + // Skip adding authentication header if no bearer authentication scheme is found + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal, + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + }, + }; +} +//# sourceMappingURL=bearerAuthenticationPolicy.js.map + +/***/ }), + +/***/ 9785: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ensureSecureConnection = ensureSecureConnection; +const log_js_1 = __nccwpck_require__(1979); +// Ensure the warining is only emitted once +let insecureConnectionWarningEmmitted = false; +/** + * Checks if the request is allowed to be sent over an insecure connection. + * + * A request is allowed to be sent over an insecure connection when: + * - The `allowInsecureConnection` option is set to `true`. + * - The request has the `allowInsecureConnection` property set to `true`. + * - The request is being sent to `localhost` or `127.0.0.1` + */ +function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; + } + } + return false; +} +/** + * Logs a warning about sending a token over an insecure connection. + * + * This function will emit a node warning once, but log the warning every time. + */ +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) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning); + } +} +/** + * Ensures that authentication is only allowed over HTTPS unless explicitly allowed. + * Throws an error if the connection is not secure and not explicitly allowed. + */ +function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } + else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } +} +//# sourceMappingURL=checkInsecureConnection.js.map + +/***/ }), + +/***/ 4818: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.oauth2AuthenticationPolicyName = void 0; +exports.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; +const checkInsecureConnection_js_1 = __nccwpck_require__(9785); +/** + * Name of the OAuth2 Authentication Policy + */ +exports.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; +/** + * Gets a pipeline policy that adds authorization header from OAuth2 schemes + */ +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"); + // Skip adding authentication header if no OAuth2 authentication scheme is found + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal, + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + }, + }; +} +//# sourceMappingURL=oauth2AuthenticationPolicy.js.map + +/***/ }), + +/***/ 56: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.decompressResponsePolicyName = void 0; +exports.decompressResponsePolicy = decompressResponsePolicy; +/** + * The programmatic identifier of the decompressResponsePolicy. + */ +exports.decompressResponsePolicyName = "decompressResponsePolicy"; +/** + * A policy to enable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ +function decompressResponsePolicy() { + return { + name: exports.decompressResponsePolicyName, + async sendRequest(request, next) { + // HEAD requests have no body + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + }, + }; +} +//# sourceMappingURL=decompressResponsePolicy.js.map + +/***/ }), + +/***/ 6933: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRetryPolicyName = void 0; +exports.defaultRetryPolicy = defaultRetryPolicy; +const exponentialRetryStrategy_js_1 = __nccwpck_require__(511); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(5495); +const retryPolicy_js_1 = __nccwpck_require__(9844); +const constants_js_1 = __nccwpck_require__(8956); +/** + * Name of the {@link defaultRetryPolicy} + */ +exports.defaultRetryPolicyName = "defaultRetryPolicy"; +/** + * A policy that retries according to three strategies: + * - When the server sends a 429 response with a Retry-After header. + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - 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, + }).sendRequest, + }; +} +//# sourceMappingURL=defaultRetryPolicy.js.map + +/***/ }), + +/***/ 8527: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.exponentialRetryPolicyName = void 0; +exports.exponentialRetryPolicy = exponentialRetryPolicy; +const exponentialRetryStrategy_js_1 = __nccwpck_require__(511); +const retryPolicy_js_1 = __nccwpck_require__(9844); +const constants_js_1 = __nccwpck_require__(8956); +/** + * The programmatic identifier of the exponentialRetryPolicy. + */ +exports.exponentialRetryPolicyName = "exponentialRetryPolicy"; +/** + * A policy that attempts to retry requests while introducing an exponentially increasing delay. + * @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 })), + ], { + maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + }); +} +//# sourceMappingURL=exponentialRetryPolicy.js.map + +/***/ }), + +/***/ 710: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.formDataPolicyName = void 0; +exports.formDataPolicy = formDataPolicy; +const bytesEncoding_js_1 = __nccwpck_require__(6000); +const checkEnvironment_js_1 = __nccwpck_require__(8633); +const httpHeaders_js_1 = __nccwpck_require__(9939); +/** + * 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].push(value); + } + return formDataMap; +} +/** + * A policy that encodes FormData on the request into the body. + */ +function formDataPolicy() { + return { + name: exports.formDataPolicyName, + async sendRequest(request, next) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + request.formData = formDataToFormDataMap(request.body); + request.body = undefined; + } + if (request.formData) { + const contentType = request.headers.get("Content-Type"); + if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) { + request.body = wwwFormUrlEncode(request.formData); + } + else { + await prepareFormData(request.formData, request); + } + request.formData = undefined; + } + return next(request); + }, + }; +} +function wwwFormUrlEncode(formData) { + const urlSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(formData)) { + if (Array.isArray(value)) { + for (const subValue of value) { + urlSearchParams.append(key, subValue.toString()); + } + } + else { + urlSearchParams.append(key, value.toString()); + } + } + return urlSearchParams.toString(); +} +async function prepareFormData(formData, request) { + // validate content type (multipart/form-data) + const contentType = request.headers.get("Content-Type"); + if (contentType && !contentType.startsWith("multipart/form-data")) { + // 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"); + // set body to MultipartRequestBody using content from FormDataMap + const parts = []; + for (const [fieldName, values] of Object.entries(formData)) { + for (const value of Array.isArray(values) ? values : [values]) { + if (typeof value === "string") { + parts.push({ + headers: (0, httpHeaders_js_1.createHttpHeaders)({ + "Content-Disposition": `form-data; name="${fieldName}"`, + }), + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8"), + }); + } + else if (value === undefined || value === null || typeof value !== "object") { + throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); + } + else { + // using || instead of ?? here since if value.name is empty we should create a file name + const fileName = value.name || "blob"; + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + headers.set("Content-Disposition", `form-data; name="${fieldName}"; filename="${fileName}"`); + // again, || is used since an empty value.type means the content type is unset + headers.set("Content-Type", value.type || "application/octet-stream"); + parts.push({ + headers, + body: value, + }); + } + } + } + request.multipartBody = { parts }; +} +//# sourceMappingURL=formDataPolicy.js.map + +/***/ }), + +/***/ 3803: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// 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__(883); +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__(56); +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__(6933); +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__(8527); +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__(9844); +Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); +var systemErrorRetryPolicy_js_1 = __nccwpck_require__(8337); +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__(2109); +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__(710); +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__(5244); +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__(834); +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__(1722); +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__(2572); +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__(6239); +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__(2718); +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 + +/***/ }), + +/***/ 5244: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logPolicyName = void 0; +exports.logPolicy = logPolicy; +const log_js_1 = __nccwpck_require__(1979); +const sanitizer_js_1 = __nccwpck_require__(577); +/** + * The programmatic identifier of the logPolicy. + */ +exports.logPolicyName = "logPolicy"; +/** + * A policy that logs all requests and responses. + * @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 sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, + }); + return { + name: exports.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + }, + }; +} +//# sourceMappingURL=logPolicy.js.map + +/***/ }), + +/***/ 834: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.multipartPolicyName = void 0; +exports.multipartPolicy = multipartPolicy; +const bytesEncoding_js_1 = __nccwpck_require__(6000); +const typeGuards_js_1 = __nccwpck_require__(8390); +const uuidUtils_js_1 = __nccwpck_require__(8506); +const concat_js_1 = __nccwpck_require__(2716); +function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; +} +function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r\n`; + } + return result; +} +function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } + else if ((0, typeGuards_js_1.isBlob)(source)) { + // if was created using createFile then -1 means we have an unknown size + return source.size === -1 ? undefined : source.size; + } + else { + return undefined; + } +} +function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === undefined) { + return undefined; + } + else { + total += partLength; + } + } + return total; +} +async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r\n--${boundary}`, "utf-8"), + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8"), + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); +} +/** + * Name of multipart policy + */ +exports.multipartPolicyName = "multipartPolicy"; +const maxBoundaryLength = 70; +const validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); +function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } +} +/** + * Pipeline policy for multipart requests + */ +function multipartPolicy() { + return { + name: exports.multipartPolicyName, + async sendRequest(request, next) { + var _a; + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary !== null && boundary !== void 0 ? boundary : (boundary = parsedBoundary); + if (boundary) { + assertValidBoundary(boundary); + } + else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = undefined; + return next(request); + }, + }; +} +//# sourceMappingURL=multipartPolicy.js.map + +/***/ }), + +/***/ 1722: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.globalNoProxyList = exports.proxyPolicyName = void 0; +exports.loadNoProxy = loadNoProxy; +exports.getDefaultProxySettings = getDefaultProxySettings; +exports.proxyPolicy = proxyPolicy; +const https_proxy_agent_1 = __nccwpck_require__(2327); +const http_proxy_agent_1 = __nccwpck_require__(4702); +const log_js_1 = __nccwpck_require__(1979); +const HTTPS_PROXY = "HTTPS_PROXY"; +const HTTP_PROXY = "HTTP_PROXY"; +const ALL_PROXY = "ALL_PROXY"; +const NO_PROXY = "NO_PROXY"; +/** + * The programmatic identifier of the proxyPolicy. + */ +exports.proxyPolicyName = "proxyPolicy"; +/** + * Stores the patterns specified in NO_PROXY environment variable. + * @internal + */ +exports.globalNoProxyList = []; +let noProxyListLoaded = false; +/** A cache of whether a host should bypass the proxy. */ +const globalBypassedMap = new Map(); +function getEnvironmentValue(name) { + if (process.env[name]) { + return process.env[name]; + } + else if (process.env[name.toLowerCase()]) { + return process.env[name.toLowerCase()]; + } + return undefined; +} +function loadEnvironmentProxyValue() { + if (!process) { + return undefined; + } + const httpsProxy = getEnvironmentValue(HTTPS_PROXY); + const allProxy = getEnvironmentValue(ALL_PROXY); + const httpProxy = getEnvironmentValue(HTTP_PROXY); + return httpsProxy || allProxy || httpProxy; +} +/** + * Check whether the host of a given `uri` matches any pattern in the no proxy list. + * If there's a match, any request sent to the same host shouldn't have the proxy settings set. + * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210 + */ +function isBypassed(uri, noProxyList, bypassedMap) { + if (noProxyList.length === 0) { + return false; + } + const host = new URL(uri).hostname; + if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + return bypassedMap.get(host); + } + let isBypassedFlag = false; + for (const pattern of noProxyList) { + if (pattern[0] === ".") { + // This should match either domain it self or any subdomain or host + // .foo.com will match foo.com it self or *.foo.com + if (host.endsWith(pattern)) { + isBypassedFlag = true; + } + else { + if (host.length === pattern.length - 1 && host === pattern.slice(1)) { + isBypassedFlag = true; + } + } + } + else { + if (host === pattern) { + isBypassedFlag = true; + } + } + } + bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + return isBypassedFlag; +} +function loadNoProxy() { + const noProxy = getEnvironmentValue(NO_PROXY); + noProxyListLoaded = true; + if (noProxy) { + return noProxy + .split(",") + .map((item) => item.trim()) + .filter((item) => item.length); + } + return []; +} +/** + * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. + * If no argument is given, it attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + * @param proxyUrl - The url of the proxy to use. May contain authentication information. + * @deprecated - Internally this method is no longer necessary when setting proxy information. + */ +function getDefaultProxySettings(proxyUrl) { + if (!proxyUrl) { + proxyUrl = loadEnvironmentProxyValue(); + if (!proxyUrl) { + return undefined; + } + } + const parsedUrl = new URL(proxyUrl); + const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; + return { + host: schema + parsedUrl.hostname, + port: Number.parseInt(parsedUrl.port || "80"), + username: parsedUrl.username, + password: parsedUrl.password, + }; +} +/** + * This method attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + */ +function getDefaultProxySettingsInternal() { + const envProxy = loadEnvironmentProxyValue(); + return envProxy ? new URL(envProxy) : undefined; +} +function getUrlFromProxySettings(settings) { + let parsedProxyUrl; + try { + parsedProxyUrl = new URL(settings.host); + } + catch (_a) { + throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); + } + parsedProxyUrl.port = String(settings.port); + if (settings.username) { + parsedProxyUrl.username = settings.username; + } + if (settings.password) { + parsedProxyUrl.password = settings.password; + } + return parsedProxyUrl; +} +function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { + // Custom Agent should take precedence so if one is present + // we should skip to avoid overwriting it. + if (request.agent) { + return; + } + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (request.tlsSettings) { + log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); + } + const headers = request.headers.toJSON(); + if (isInsecure) { + if (!cachedAgents.httpProxyAgent) { + cachedAgents.httpProxyAgent = new http_proxy_agent_1.HttpProxyAgent(proxyUrl, { headers }); + } + request.agent = cachedAgents.httpProxyAgent; + } + else { + if (!cachedAgents.httpsProxyAgent) { + cachedAgents.httpsProxyAgent = new https_proxy_agent_1.HttpsProxyAgent(proxyUrl, { headers }); + } + request.agent = cachedAgents.httpsProxyAgent; + } +} +/** + * A policy that allows one to apply proxy settings to all requests. + * If not passed static settings, they will be retrieved from the HTTPS_PROXY + * or HTTP_PROXY environment variables. + * @param proxySettings - ProxySettings to use on each request. + * @param options - additional settings, for example, custom NO_PROXY patterns + */ +function proxyPolicy(proxySettings, options) { + if (!noProxyListLoaded) { + exports.globalNoProxyList.push(...loadNoProxy()); + } + const defaultProxy = proxySettings + ? getUrlFromProxySettings(proxySettings) + : getDefaultProxySettingsInternal(); + const cachedAgents = {}; + 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)) { + setProxyAgentOnRequest(request, cachedAgents, defaultProxy); + } + else if (request.proxySettings) { + setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); + } + return next(request); + }, + }; +} +//# sourceMappingURL=proxyPolicy.js.map + +/***/ }), + +/***/ 2572: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.redirectPolicyName = void 0; +exports.redirectPolicy = redirectPolicy; +/** + * The programmatic identifier of the redirectPolicy. + */ +exports.redirectPolicyName = "redirectPolicy"; +/** + * Methods that are allowed to follow redirects 301 and 302 + */ +const allowedRedirect = ["GET", "HEAD"]; +/** + * A policy to follow Location headers from the server in order + * to support server-side redirection. + * In the browser, this policy is not used. + * @param options - Options to control policy behavior. + */ +function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + }, + }; +} +async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + const { request, status, headers } = response; + const locationHeader = headers.get("location"); + if (locationHeader && + (status === 300 || + (status === 301 && allowedRedirect.includes(request.method)) || + (status === 302 && allowedRedirect.includes(request.method)) || + (status === 303 && request.method === "POST") || + status === 307) && + currentRetries < maxRetries) { + const url = new URL(locationHeader, request.url); + request.url = url.toString(); + // POST request with Status code 303 should be converted into a + // redirected GET request if the redirect url is present in the location header + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; +} +//# sourceMappingURL=redirectPolicy.js.map + +/***/ }), + +/***/ 9844: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.retryPolicy = retryPolicy; +const helpers_js_1 = __nccwpck_require__(2508); +const AbortError_js_1 = __nccwpck_require__(7543); +const logger_js_1 = __nccwpck_require__(5300); +const constants_js_1 = __nccwpck_require__(8956); +const retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); +/** + * The programmatic identifier of the retryPolicy. + */ +const retryPolicyName = "retryPolicy"; +/** + * retryPolicy is a generic policy to enable retrying requests when certain conditions are met + */ +function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + var _a, _b; + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = undefined; + responseError = undefined; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } + catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + // RestErrors are valid targets for the retry strategies. + // If none of the retry strategies can work with them, they will be thrown later in this policy. + // If the received error is not a RestError, it is immediately thrown. + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } + else if (response) { + return response; + } + else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError, + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, undefined, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + // If all the retries skip and there's no response, + // we're still in the retry loop, so a new request will be sent + // until `maxRetries` is reached. + } + }, + }; +} +//# sourceMappingURL=retryPolicy.js.map + +/***/ }), + +/***/ 8337: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.systemErrorRetryPolicyName = void 0; +exports.systemErrorRetryPolicy = systemErrorRetryPolicy; +const exponentialRetryStrategy_js_1 = __nccwpck_require__(511); +const retryPolicy_js_1 = __nccwpck_require__(9844); +const constants_js_1 = __nccwpck_require__(8956); +/** + * Name of the {@link systemErrorRetryPolicy} + */ +exports.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; +/** + * A retry policy that specifically seeks to handle errors in the + * underlying transport layer (e.g. DNS lookup failures) rather than + * retryable error codes from the server itself. + * @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 })), + ], { + maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + }).sendRequest, + }; +} +//# sourceMappingURL=systemErrorRetryPolicy.js.map + +/***/ }), + +/***/ 2109: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.throttlingRetryPolicyName = void 0; +exports.throttlingRetryPolicy = throttlingRetryPolicy; +const throttlingRetryStrategy_js_1 = __nccwpck_require__(5495); +const retryPolicy_js_1 = __nccwpck_require__(9844); +const constants_js_1 = __nccwpck_require__(8956); +/** + * Name of the {@link throttlingRetryPolicy} + */ +exports.throttlingRetryPolicyName = "throttlingRetryPolicy"; +/** + * A policy that retries when the server sends a 429 response with a Retry-After header. + * + * To learn more, please refer to + * https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://learn.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + * + * @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, + }).sendRequest, + }; +} +//# sourceMappingURL=throttlingRetryPolicy.js.map + +/***/ }), + +/***/ 6239: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.tlsPolicyName = void 0; +exports.tlsPolicy = tlsPolicy; +/** + * Name of the TLS Policy + */ +exports.tlsPolicyName = "tlsPolicy"; +/** + * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. + */ +function tlsPolicy(tlsSettings) { + return { + name: exports.tlsPolicyName, + sendRequest: async (req, next) => { + // Users may define a request tlsSettings, honor those over the client level one + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + }, + }; +} +//# sourceMappingURL=tlsPolicy.js.map + +/***/ }), + +/***/ 2718: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.userAgentPolicyName = void 0; +exports.userAgentPolicy = userAgentPolicy; +const userAgent_js_1 = __nccwpck_require__(7878); +const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); +/** + * The programmatic identifier of the userAgentPolicy. + */ +exports.userAgentPolicyName = "userAgentPolicy"; +/** + * A policy that sets the User-Agent header (or equivalent) to reflect + * the library version. + * @param options - Options to customize the user agent value. + */ +function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + }, + }; +} +//# sourceMappingURL=userAgentPolicy.js.map + +/***/ }), + +/***/ 8293: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RestError = void 0; +exports.isRestError = isRestError; +const error_js_1 = __nccwpck_require__(8172); +const inspect_js_1 = __nccwpck_require__(3642); +const sanitizer_js_1 = __nccwpck_require__(577); +const errorSanitizer = new sanitizer_js_1.Sanitizer(); +/** + * A custom error type for failed pipeline requests. + */ +class RestError extends Error { + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + // The request and response may contain sensitive information in the headers or body. + // To help prevent this sensitive information being accidentally logged, the request and response + // properties are marked as non-enumerable here. This prevents them showing up in the output of + // JSON.stringify and console.log. + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + // 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 }))}`; + }, + enumerable: false, + }); + Object.setPrototypeOf(this, RestError.prototype); + } +} +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. + */ +function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; +} +//# sourceMappingURL=restError.js.map + +/***/ }), + +/***/ 511: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.exponentialRetryStrategy = exponentialRetryStrategy; +exports.isExponentialRetryResponse = isExponentialRetryResponse; +exports.isSystemError = isSystemError; +const delay_js_1 = __nccwpck_require__(8737); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(5495); +// intervals are in milliseconds +const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; +const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; +/** + * A retry strategy that retries with an exponentially increasing delay in these two cases: + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - 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; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval, + }); + }, + }; +} +/** + * A response is a retry response if it has status codes: + * - 408, or + * - Greater or equal than 500, except for 501 and 505. + */ +function isExponentialRetryResponse(response) { + return Boolean(response && + response.status !== undefined && + (response.status >= 500 || response.status === 408) && + response.status !== 501 && + response.status !== 505); +} +/** + * Determines whether an error from a pipeline response was triggered in the network layer. + */ +function isSystemError(err) { + if (!err) { + return false; + } + return (err.code === "ETIMEDOUT" || + err.code === "ESOCKETTIMEDOUT" || + err.code === "ECONNREFUSED" || + err.code === "ECONNRESET" || + err.code === "ENOENT" || + err.code === "ENOTFOUND"); +} +//# sourceMappingURL=exponentialRetryStrategy.js.map + +/***/ }), + +/***/ 5495: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isThrottlingRetryResponse = isThrottlingRetryResponse; +exports.throttlingRetryStrategy = throttlingRetryStrategy; +const helpers_js_1 = __nccwpck_require__(2508); +/** + * 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). + */ +const RetryAfterHeader = "Retry-After"; +/** + * The headers that come back from services representing + * the amount of time (minimum) to wait to retry. + * + * "retry-after-ms", "x-ms-retry-after-ms" : milliseconds + * "Retry-After" : seconds or timestamp + */ +const AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; +/** + * A response is a throttling retry response if it has a throttling status code (429 or 503), + * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. + * + * Returns the `retryAfterInMs` value if the response is a throttling retry response. + * If not throttling retry response, returns `undefined`. + * + * @internal + */ +function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return undefined; + try { + // Headers: "retry-after-ms", "x-ms-retry-after-ms", "Retry-After" + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + // "Retry-After" header ==> seconds + // "retry-after-ms", "x-ms-retry-after-ms" headers ==> milli-seconds + const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1; + return retryAfterValue * multiplyingFactor; // in milli-seconds + } + } + // RetryAfterHeader ("Retry-After") has a special case where it might be formatted as a date instead of a number of seconds + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + // 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) { + return undefined; + } +} +/** + * A response is a retry response if it has a throttling status code (429 or 503), + * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. + */ +function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); +} +function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs, + }; + }, + }; +} +//# sourceMappingURL=throttlingRetryStrategy.js.map + +/***/ }), + +/***/ 6000: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.uint8ArrayToString = uint8ArrayToString; +exports.stringToUint8Array = stringToUint8Array; +/** + * The helper that transforms bytes with specific character encoding into string + * @param bytes - the uint8array bytes + * @param format - the format we use to encode the byte + * @returns a string of the encoded string + */ +function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); +} +/** + * The helper that transforms string to specific character encoded bytes array. + * @param value - the string to be converted + * @param format - the format we use to decode the value + * @returns a uint8array + */ +function stringToUint8Array(value, format) { + return Buffer.from(value, format); +} +//# sourceMappingURL=bytesEncoding.js.map + +/***/ }), + +/***/ 8633: +/***/ ((__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; +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +// eslint-disable-next-line @azure/azure-sdk/ts-no-window +exports.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; +/** + * 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"); +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +exports.isDeno = typeof Deno !== "undefined" && + typeof Deno.version !== "undefined" && + typeof Deno.version.deno !== "undefined"; +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +exports.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; +/** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + */ +exports.isNodeLike = typeof globalThis.process !== "undefined" && + Boolean(globalThis.process.version) && + Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +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"; +//# sourceMappingURL=checkEnvironment.js.map + +/***/ }), + +/***/ 2716: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.concat = concat; +const tslib_1 = __nccwpck_require__(1577); +const stream_1 = __nccwpck_require__(2203); +const typeGuards_js_1 = __nccwpck_require__(8390); +function streamAsyncIterator() { + return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = yield tslib_1.__await(reader.read()); + if (done) { + return yield tslib_1.__await(void 0); + } + yield yield tslib_1.__await(value); + } + } + finally { + reader.releaseLock(); + } + }); +} +function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } +} +function ensureNodeStream(stream) { + if (stream instanceof ReadableStream) { + makeAsyncIterable(stream); + return stream_1.Readable.fromWeb(stream); + } + else { + return stream; + } +} +function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } + else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } + else { + return ensureNodeStream(source); + } +} +/** + * Utility function that concatenates a set of binary inputs into one combined output. + * + * @param sources - array of sources for the concatenation + * @returns - in Node, a (() =\> NodeJS.ReadableStream) which, when read, produces a concatenation of all the inputs. + * In browser, returns a `Blob` representing all the concatenated inputs. + * + * @internal + */ +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; } + } + } + }); + })()); + }; +} +//# sourceMappingURL=concat.js.map + +/***/ }), + +/***/ 8737: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.calculateRetryDelay = calculateRetryDelay; +const random_js_1 = __nccwpck_require__(2663); +/** + * Calculates the delay interval for retry attempts using exponential delay with jitter. + * @param retryAttempt - The current retry attempt number. + * @param config - The exponential retry configuration. + * @returns An object containing the calculated retry delay. + */ +function calculateRetryDelay(retryAttempt, config) { + // Exponentially increase the delay each time + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + // Don't let the delay exceed the maximum + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + // Allow the final value to have some "jitter" (within 50% of the delay size) so + // that retries across multiple clients don't occur simultaneously. + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; +} +//# sourceMappingURL=delay.js.map + +/***/ }), + +/***/ 8172: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isError = isError; +const object_js_1 = __nccwpck_require__(6563); +/** + * Typeguard for an error object shape (has name and message) + * @param e - Something caught by a catch clause. + */ +function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; +} +//# sourceMappingURL=error.js.map + +/***/ }), + +/***/ 2508: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.delay = delay; +exports.parseHeaderValueAsNumber = parseHeaderValueAsNumber; +const AbortError_js_1 = __nccwpck_require__(7543); +const StandardAbortMessage = "The operation was aborted."; +/** + * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. + * @param delayInMs - The number of milliseconds to be delayed. + * @param value - The value to be resolved with after a timeout of t milliseconds. + * @param options - The options for delay - currently abort options + * - abortSignal - The abortSignal associated with containing operation. + * - abortErrorMsg - The abort error message associated with containing operation. + * @returns Resolved promise + */ +function delay(delayInMs, value, options) { + return new Promise((resolve, reject) => { + 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)); + }; + const removeListeners = () => { + if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve(value); + }, delayInMs); + if (options === null || options === void 0 ? void 0 : options.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); +} +/** + * @internal + * @returns the parsed value or undefined if the parsed value is invalid. + */ +function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; +} +//# sourceMappingURL=helpers.js.map + +/***/ }), + +/***/ 3642: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.custom = void 0; +const node_util_1 = __nccwpck_require__(7975); +exports.custom = node_util_1.inspect.custom; +//# sourceMappingURL=inspect.js.map + +/***/ }), + +/***/ 7201: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// 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__(8737); +Object.defineProperty(exports, "calculateRetryDelay", ({ enumerable: true, get: function () { return delay_js_1.calculateRetryDelay; } })); +var random_js_1 = __nccwpck_require__(2663); +Object.defineProperty(exports, "getRandomIntegerInclusive", ({ enumerable: true, get: function () { return random_js_1.getRandomIntegerInclusive; } })); +var object_js_1 = __nccwpck_require__(6563); +Object.defineProperty(exports, "isObject", ({ enumerable: true, get: function () { return object_js_1.isObject; } })); +var error_js_1 = __nccwpck_require__(8172); +Object.defineProperty(exports, "isError", ({ enumerable: true, get: function () { return error_js_1.isError; } })); +var sha256_js_1 = __nccwpck_require__(4887); +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__(8506); +Object.defineProperty(exports, "randomUUID", ({ enumerable: true, get: function () { return uuidUtils_js_1.randomUUID; } })); +var checkEnvironment_js_1 = __nccwpck_require__(8633); +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; } })); +Object.defineProperty(exports, "isNodeRuntime", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeRuntime; } })); +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__(6000); +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__(577); +Object.defineProperty(exports, "Sanitizer", ({ enumerable: true, get: function () { return sanitizer_js_1.Sanitizer; } })); +//# sourceMappingURL=internal.js.map + +/***/ }), + +/***/ 6563: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isObject = isObject; +/** + * Helper to determine when an input is a generic JS object. + * @returns true when input is an object type that is not null, Array, RegExp, or Date. + */ +function isObject(input) { + return (typeof input === "object" && + input !== null && + !Array.isArray(input) && + !(input instanceof RegExp) && + !(input instanceof Date)); +} +//# sourceMappingURL=object.js.map + +/***/ }), + +/***/ 2663: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRandomIntegerInclusive = getRandomIntegerInclusive; +/** + * Returns a random integer value between a lower and upper bound, + * inclusive of both bounds. + * Note that this uses Math.random and isn't secure. If you need to use + * this for any kind of security purpose, find a better source of random. + * @param min - The smallest integer value allowed. + * @param max - The largest integer value allowed. + */ +function getRandomIntegerInclusive(min, max) { + // Make sure inputs are integers. + min = Math.ceil(min); + max = Math.floor(max); + // Pick a random offset from zero to the size of the range. + // Since Math.random() can never return 1, we have to make the range one larger + // in order to be inclusive of the maximum value after we take the floor. + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; +} +//# sourceMappingURL=random.js.map + +/***/ }), + +/***/ 577: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Sanitizer = void 0; +const object_js_1 = __nccwpck_require__(6563); +const RedactedString = "REDACTED"; +// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts +const defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate", +]; +const defaultAllowedQueryParameters = ["api-version"]; +/** + * A utility class to sanitize objects for logging. + */ +class Sanitizer { + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [], } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = new Set(); + 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 }); + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } + else if (key === "url") { + return this.sanitizeUrl(value); + } + else if (key === "query") { + return this.sanitizeQuery(value); + } + else if (key === "body") { + // Don't log the request body + return undefined; + } + else if (key === "response") { + // Don't log response again + return undefined; + } + else if (key === "operationSpec") { + // When using sendOperationRequest, the request carries a massive + // field with the autorest spec. No need to log it. + return undefined; + } + else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url = new URL(value); + if (!url.search) { + return value; + } + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + return url.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } + else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } + else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } +} +exports.Sanitizer = Sanitizer; +//# sourceMappingURL=sanitizer.js.map + +/***/ }), + +/***/ 4887: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.computeSha256Hmac = computeSha256Hmac; +exports.computeSha256Hash = computeSha256Hash; +const node_crypto_1 = __nccwpck_require__(7598); +/** + * Generates a SHA-256 HMAC signature. + * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. + * @param stringToSign - The data to be signed. + * @param encoding - The textual encoding to use for the returned HMAC digest. + */ +async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); +} +/** + * Generates a SHA-256 hash. + * @param content - The data to be included in the hash. + * @param encoding - The textual encoding to use for the returned hash. + */ +async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); +} +//# sourceMappingURL=sha256.js.map + +/***/ }), + +/***/ 8390: +/***/ ((__unused_webpack_module, exports) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isNodeReadableStream = isNodeReadableStream; +exports.isWebReadableStream = isWebReadableStream; +exports.isBinaryBody = isBinaryBody; +exports.isReadableStream = isReadableStream; +exports.isBlob = isBlob; +function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); +} +function isWebReadableStream(x) { + return Boolean(x && + typeof x.getReader === "function" && + typeof x.tee === "function"); +} +function isBinaryBody(body) { + return (body !== undefined && + (body instanceof Uint8Array || + isReadableStream(body) || + typeof body === "function" || + body instanceof Blob)); +} +function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); +} +function isBlob(x) { + return typeof x.stream === "function"; +} +//# sourceMappingURL=typeGuards.js.map + +/***/ }), + +/***/ 7878: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getUserAgentHeaderName = getUserAgentHeaderName; +exports.getUserAgentValue = getUserAgentValue; +const userAgentPlatform_js_1 = __nccwpck_require__(2877); +const constants_js_1 = __nccwpck_require__(8956); +function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); +} +/** + * @internal + */ +function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); +} +/** + * @internal + */ +async function getUserAgentValue(prefix) { + const runtimeInfo = new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; +} +//# sourceMappingURL=userAgent.js.map + +/***/ }), + +/***/ 2877: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHeaderName = getHeaderName; +exports.setPlatformSpecificData = setPlatformSpecificData; +const tslib_1 = __nccwpck_require__(1577); +const os = tslib_1.__importStar(__nccwpck_require__(8161)); +const process = tslib_1.__importStar(__nccwpck_require__(1708)); +/** + * @internal + */ +function getHeaderName() { + return "User-Agent"; +} +/** + * @internal + */ +async function setPlatformSpecificData(map) { + if (process && process.versions) { + const versions = process.versions; + if (versions.bun) { + map.set("Bun", versions.bun); + } + else if (versions.deno) { + map.set("Deno", versions.deno); + } + else if (versions.node) { + map.set("Node", versions.node); + } + } + map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); +} +//# sourceMappingURL=userAgentPlatform.js.map + +/***/ }), + +/***/ 8506: +/***/ ((__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__(7598); +// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+. +const uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" + ? globalThis.crypto.randomUUID.bind(globalThis.crypto) + : node_crypto_1.randomUUID; +/** + * Generated Universally Unique Identifier + * + * @returns RFC4122 v4 UUID. + */ +function randomUUID() { + return uuidFunction(); +} +//# sourceMappingURL=uuidUtils.js.map + /***/ }), /***/ 3353: @@ -87008,7 +89253,7 @@ var cache = __nccwpck_require__(7389); 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+19c948d15e766_ba73f03af7d1f5aea5cbca8d012375c0/node_modules/detsys-ts/dist/index.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/detsys-ts@https+++codeload.github.com+DeterminateSystems+detsys-ts+tar.gz+87c69ec3d48cb_755eebaff605e3be5720cb83cd3c904a/node_modules/detsys-ts/dist/index.js var __defProp = Object.defineProperty; var __export = (target, all) => { for (var name in all) diff --git a/package.json b/package.json index 5f39b65..5ce4ed5 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "eslint-import-resolver-typescript": "^3.10.1", "eslint-plugin-github": "^4.10.2", "eslint-plugin-import": "^2.31.0", - "eslint-plugin-prettier": "^5.2.6", + "eslint-plugin-prettier": "^5.3.1", "prettier": "^3.5.3", "tsup": "^8.4.0", "typescript": "^5.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b9c3972..2c76961 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/19c948d15e766687225515331fbebc216a14ed06 + version: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/87c69ec3d48cb353229e74cc2ba8abdef2eb2590 devDependencies: '@trivago/prettier-plugin-sort-imports': specifier: ^4.3.0 @@ -40,8 +40,8 @@ importers: specifier: ^2.31.0 version: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) eslint-plugin-prettier: - specifier: ^5.2.6 - version: 5.2.6(eslint-config-prettier@10.1.2(eslint@8.57.1))(eslint@8.57.1)(prettier@3.5.3) + specifier: ^5.3.1 + version: 5.3.1(eslint-config-prettier@10.1.2(eslint@8.57.1))(eslint@8.57.1)(prettier@3.5.3) prettier: specifier: ^3.5.3 version: 3.5.3 @@ -87,12 +87,12 @@ packages: resolution: {integrity: sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==} engines: {node: '>=18.0.0'} - '@azure/core-client@1.9.3': - resolution: {integrity: sha512-/wGw8fJ4mdpJ1Cum7s1S+VQyXt1ihwKLzfabS1O/RDADnmzVc01dHn44qD0BvGH6KlZNzOMW95tEpKqhkCChPA==} + '@azure/core-client@1.9.4': + resolution: {integrity: sha512-f7IxTD15Qdux30s2qFARH+JxgwxWLG2Rlr4oSkPGuLWm+1p5y1+C04XGLA0vmX6EtqfutmjvpNmAfgwVIS5hpw==} engines: {node: '>=18.0.0'} - '@azure/core-http-compat@2.2.0': - resolution: {integrity: sha512-1kW8ZhN0CfbNOG6C688z5uh2yrzALE7dDXHiR9dY4vt+EbhGZQSbjDa5bQd2rf3X2pdWMsXbqbArxUyeNdvtmg==} + '@azure/core-http-compat@2.3.0': + resolution: {integrity: sha512-qLQujmUypBBG0gxHd0j6/Jdmul6ttl24c8WGiLXIk7IHXdBlfoBqW27hyz3Xn6xbfdyVSarl1Ttbk0AwnZBYCw==} engines: {node: '>=18.0.0'} '@azure/core-lro@2.7.2': @@ -103,24 +103,24 @@ packages: resolution: {integrity: sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==} engines: {node: '>=18.0.0'} - '@azure/core-rest-pipeline@1.19.1': - resolution: {integrity: sha512-zHeoI3NCs53lLBbWNzQycjnYKsA1CVKlnzSNuSFcUDwBp8HHVObePxrM7HaX+Ha5Ks639H7chNC9HOaIhNS03w==} + '@azure/core-rest-pipeline@1.20.0': + resolution: {integrity: sha512-ASoP8uqZBS3H/8N8at/XwFr6vYrRP3syTK0EUjDXQy0Y1/AUS+QeIRThKmTNJO2RggvBBxaXDPM7YoIwDGeA0g==} engines: {node: '>=18.0.0'} '@azure/core-tracing@1.2.0': resolution: {integrity: sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==} engines: {node: '>=18.0.0'} - '@azure/core-util@1.11.0': - resolution: {integrity: sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==} + '@azure/core-util@1.12.0': + resolution: {integrity: sha512-13IyjTQgABPARvG90+N2dXpC+hwp466XCdQXPCRlbWHgd3SJd5Q1VvaBGv6k1BIa4MQm6hAF1UBU1m8QUxV8sQ==} engines: {node: '>=18.0.0'} '@azure/core-xml@1.4.5': resolution: {integrity: sha512-gT4H8mTaSXRz7eGTuQyq1aIJnJqeXzpOe9Ay7Z3FrCouer14CbV3VzjnJrNrQfbBpGBLO9oy8BmrY75A0p53cA==} engines: {node: '>=18.0.0'} - '@azure/logger@1.1.4': - resolution: {integrity: sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==} + '@azure/logger@1.2.0': + resolution: {integrity: sha512-0hKEzLhpw+ZTAfNJyRrn6s+V0nDWzXk9OjBr2TiGIu0OfMr5s2V4FpKLTAK3Ca5r5OKLbf4hkOGDPyiRjie/jA==} engines: {node: '>=18.0.0'} '@azure/ms-rest-js@2.7.0': @@ -346,8 +346,8 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.6.1': - resolution: {integrity: sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==} + '@eslint-community/eslint-utils@4.7.0': + resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -433,22 +433,22 @@ packages: resolution: {integrity: sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@protobuf-ts/plugin-framework@2.9.6': - resolution: {integrity: sha512-w7A1RXrDCiVzcaRE6YJP7FCARuAFe/Vc4SNQnHAi4CF0V6mEtyjAYEIC5BNYgIRaJEqB26zzsBQjIem3R02SCA==} + '@protobuf-ts/plugin-framework@2.10.0': + resolution: {integrity: sha512-EuW9irbt+w7Ml1CaAxK6xyl7pSuWVbNy0rsChxJEthMrAVTN5EPdJ3whNWvsRBa+HwRImEl8KHNnRoq/vGOHbg==} - '@protobuf-ts/plugin@2.9.6': - resolution: {integrity: sha512-Wpv5rkXeu6E5Y4r0TjWE0bzRGddiTYl/RM+tLgVlS0r8CqOBqNAmlWv+s8ltf/F75rVrahUal0cpyhFwha9GRA==} + '@protobuf-ts/plugin@2.10.0': + resolution: {integrity: sha512-iMX4C4TVfMNRLn2msK0cVg5jmizjtu5FYiy8EK5Lg6EgyR9TVHeK2rzmufWKYM2Pcg1jSwC0cFcXHQnCoeFxUg==} hasBin: true - '@protobuf-ts/protoc@2.9.6': - resolution: {integrity: sha512-c0XvAPDIBAovH9HxV8gBv8gzOTreQIqibcusrB1+DxvFiSvy+2V1tjbUmG5gJEbjk3aAOaoj0a3+QuE+P28xUw==} + '@protobuf-ts/protoc@2.10.0': + resolution: {integrity: sha512-S4BtGBh22+uL5E6qLVxV0QNY6tiLVB8QL7RIkvo+KYknipZfSNwubdKy5CPkrwVXzJn4s3cx7bKx1w6BxkBIPg==} hasBin: true - '@protobuf-ts/runtime-rpc@2.9.6': - resolution: {integrity: sha512-0UeqDRzNxgsh08lY5eWzFJNfD3gZ8Xf+WG1HzbIAbVAigzigwjwsYNNhTeas5H3gco1U5owTzCg177aambKOOw==} + '@protobuf-ts/runtime-rpc@2.10.0': + resolution: {integrity: sha512-8CS/XPv3+pMK4v8UKhtCdvbS4h9l7aqlteKdRt0/UbIKZ8n0qHj6hX8cBhz2ngvohxCOS0N08zPr9aCLBNhW3Q==} - '@protobuf-ts/runtime@2.9.6': - resolution: {integrity: sha512-C0CfpKx4n4LBbUrajOdRj2BTbd3qBoK0SiKWLq7RgCoU6xiN4wesBMFHUOBp3fFzKeZwgU8Q2KtzaqzIvPLRXg==} + '@protobuf-ts/runtime@2.10.0': + resolution: {integrity: sha512-ypYwGg9Pn3W/2lZ7/HW60hONGuSdzphvOY8Dq7LeNttymDe0y3LaTUUMRpuGqOT6FfrWEMnfQbyqU8AAreo8wA==} '@rollup/rollup-android-arm-eabi@4.40.1': resolution: {integrity: sha512-kxz0YeeCrRUHz3zyqvd7n+TVRlNyTifBsmnmNPtk3hQURUyG9eAB+usz6DAwagMusjx/zb3AjvDUvhFGDAexGw==} @@ -643,6 +643,10 @@ packages: resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} engines: {node: ^18.18.0 || >=20.0.0} + '@typespec/ts-http-runtime@0.2.2': + resolution: {integrity: sha512-Gz/Sm64+Sq/vklJu1tt9t+4R2lvnud8NbTD/ZfpZtMiUX7YeVpCA8j6NSW8ptwcoLL+NmYANwqP8DV0q/bwl2w==} + engines: {node: '>=18.0.0'} + '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} @@ -878,8 +882,8 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.24.4: - resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} + browserslist@4.24.5: + resolution: {integrity: sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -1021,8 +1025,8 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/19c948d15e766687225515331fbebc216a14ed06: - resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/19c948d15e766687225515331fbebc216a14ed06} + detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/87c69ec3d48cb353229e74cc2ba8abdef2eb2590: + resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/87c69ec3d48cb353229e74cc2ba8abdef2eb2590} version: 1.0.0 dir-glob@3.0.1: @@ -1044,8 +1048,8 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - electron-to-chromium@1.5.145: - resolution: {integrity: sha512-pZ5EcTWRq/055MvSBgoFEyKf2i4apwfoqJbK/ak2jnFq8oHjZ+vzc3AhRcz37Xn+ZJfL58R666FLJx0YOK9yTw==} + electron-to-chromium@1.5.149: + resolution: {integrity: sha512-UyiO82eb9dVOx8YO3ajDf9jz2kKyt98DEITRdeLPstOEuTlLzDA4Gyq5K9he71TQziU5jUVu2OAu5N48HmQiyQ==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -1191,8 +1195,8 @@ packages: resolution: {integrity: sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==} engines: {node: '>=5.0.0'} - eslint-plugin-prettier@5.2.6: - resolution: {integrity: sha512-mUcf7QG2Tjk7H055Jk0lGBjbgDnfrvqjhXh9t2xLMSCjZVcw9Rb1V6sVNXO0th3jgeO7zllWPTNRil3JW94TnQ==} + eslint-plugin-prettier@5.3.1: + resolution: {integrity: sha512-vad9VWgEm9xaVXRNmb4aeOt0PWDc61IAdzghkbYQ2wavgax148iKoX1rNJcgkBGCipzLzOnHYVgL7xudM9yccQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: '@types/eslint': '>=8.0.0' @@ -2110,8 +2114,8 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strnum@2.0.5: - resolution: {integrity: sha512-YAT3K/sgpCUxhxNMrrdhtod3jckkpYwH6JAuwmUdXZsmzH1wUyzTMrrK2wYCEEqlKwrWDd35NeuUkbBy/1iK+Q==} + strnum@2.1.0: + resolution: {integrity: sha512-w0S//9BqZZGw0L0Y8uLSelFGnDJgTyyNQLmSlPnVz43zPAiqu3w4t8J8sDqqANOGeZIZ/9jWuPguYcEnsoHv4A==} sucrase@3.35.0: resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} @@ -2436,7 +2440,7 @@ snapshots: '@azure/abort-controller': 1.1.0 '@azure/ms-rest-js': 2.7.0 '@azure/storage-blob': 12.27.0 - '@protobuf-ts/plugin': 2.9.6 + '@protobuf-ts/plugin': 2.10.0 semver: 6.3.1 transitivePeerDependencies: - encoding @@ -2474,49 +2478,52 @@ snapshots: '@azure/core-auth@1.9.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-util': 1.11.0 - tslib: 2.8.1 - - '@azure/core-client@1.9.3': - dependencies: - '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.9.0 - '@azure/core-rest-pipeline': 1.19.1 - '@azure/core-tracing': 1.2.0 - '@azure/core-util': 1.11.0 - '@azure/logger': 1.1.4 + '@azure/core-util': 1.12.0 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@azure/core-http-compat@2.2.0': + '@azure/core-client@1.9.4': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-client': 1.9.3 - '@azure/core-rest-pipeline': 1.19.1 + '@azure/core-auth': 1.9.0 + '@azure/core-rest-pipeline': 1.20.0 + '@azure/core-tracing': 1.2.0 + '@azure/core-util': 1.12.0 + '@azure/logger': 1.2.0 + tslib: 2.8.1 + transitivePeerDependencies: + - supports-color + + '@azure/core-http-compat@2.3.0': + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-client': 1.9.4 + '@azure/core-rest-pipeline': 1.20.0 transitivePeerDependencies: - supports-color '@azure/core-lro@2.7.2': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-util': 1.11.0 - '@azure/logger': 1.1.4 + '@azure/core-util': 1.12.0 + '@azure/logger': 1.2.0 tslib: 2.8.1 + transitivePeerDependencies: + - supports-color '@azure/core-paging@1.6.2': dependencies: tslib: 2.8.1 - '@azure/core-rest-pipeline@1.19.1': + '@azure/core-rest-pipeline@1.20.0': dependencies: '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.9.0 '@azure/core-tracing': 1.2.0 - '@azure/core-util': 1.11.0 - '@azure/logger': 1.1.4 - http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.6 + '@azure/core-util': 1.12.0 + '@azure/logger': 1.2.0 + '@typespec/ts-http-runtime': 0.2.2 tslib: 2.8.1 transitivePeerDependencies: - supports-color @@ -2525,19 +2532,25 @@ snapshots: dependencies: tslib: 2.8.1 - '@azure/core-util@1.11.0': + '@azure/core-util@1.12.0': dependencies: '@azure/abort-controller': 2.1.2 + '@typespec/ts-http-runtime': 0.2.2 tslib: 2.8.1 + transitivePeerDependencies: + - supports-color '@azure/core-xml@1.4.5': dependencies: fast-xml-parser: 5.2.1 tslib: 2.8.1 - '@azure/logger@1.1.4': + '@azure/logger@1.2.0': dependencies: + '@typespec/ts-http-runtime': 0.2.2 tslib: 2.8.1 + transitivePeerDependencies: + - supports-color '@azure/ms-rest-js@2.7.0': dependencies: @@ -2551,20 +2564,21 @@ snapshots: xml2js: 0.5.0 transitivePeerDependencies: - encoding + - supports-color '@azure/storage-blob@12.27.0': dependencies: '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.9.0 - '@azure/core-client': 1.9.3 - '@azure/core-http-compat': 2.2.0 + '@azure/core-client': 1.9.4 + '@azure/core-http-compat': 2.3.0 '@azure/core-lro': 2.7.2 '@azure/core-paging': 1.6.2 - '@azure/core-rest-pipeline': 1.19.1 + '@azure/core-rest-pipeline': 1.20.0 '@azure/core-tracing': 1.2.0 - '@azure/core-util': 1.11.0 + '@azure/core-util': 1.12.0 '@azure/core-xml': 1.4.5 - '@azure/logger': 1.1.4 + '@azure/logger': 1.2.0 events: 3.3.0 tslib: 2.8.1 transitivePeerDependencies: @@ -2737,7 +2751,7 @@ snapshots: '@esbuild/win32-x64@0.25.3': optional: true - '@eslint-community/eslint-utils@4.6.1(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.7.0(eslint@8.57.1)': dependencies: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 @@ -2828,26 +2842,26 @@ snapshots: '@pkgr/core@0.2.4': {} - '@protobuf-ts/plugin-framework@2.9.6': + '@protobuf-ts/plugin-framework@2.10.0': dependencies: - '@protobuf-ts/runtime': 2.9.6 + '@protobuf-ts/runtime': 2.10.0 typescript: 3.9.10 - '@protobuf-ts/plugin@2.9.6': + '@protobuf-ts/plugin@2.10.0': dependencies: - '@protobuf-ts/plugin-framework': 2.9.6 - '@protobuf-ts/protoc': 2.9.6 - '@protobuf-ts/runtime': 2.9.6 - '@protobuf-ts/runtime-rpc': 2.9.6 + '@protobuf-ts/plugin-framework': 2.10.0 + '@protobuf-ts/protoc': 2.10.0 + '@protobuf-ts/runtime': 2.10.0 + '@protobuf-ts/runtime-rpc': 2.10.0 typescript: 3.9.10 - '@protobuf-ts/protoc@2.9.6': {} + '@protobuf-ts/protoc@2.10.0': {} - '@protobuf-ts/runtime-rpc@2.9.6': + '@protobuf-ts/runtime-rpc@2.10.0': dependencies: - '@protobuf-ts/runtime': 2.9.6 + '@protobuf-ts/runtime': 2.10.0 - '@protobuf-ts/runtime@2.9.6': {} + '@protobuf-ts/runtime@2.10.0': {} '@rollup/rollup-android-arm-eabi@4.40.1': optional: true @@ -3009,7 +3023,7 @@ snapshots: '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) @@ -3023,6 +3037,14 @@ snapshots: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 + '@typespec/ts-http-runtime@0.2.2': + dependencies: + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + tslib: 2.8.1 + transitivePeerDependencies: + - supports-color + '@ungap/structured-clone@1.3.0': {} '@unrs/resolver-binding-darwin-arm64@1.7.2': @@ -3236,12 +3258,12 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.24.4: + browserslist@4.24.5: dependencies: caniuse-lite: 1.0.30001716 - electron-to-chromium: 1.5.145 + electron-to-chromium: 1.5.149 node-releases: 2.0.19 - update-browserslist-db: 1.1.3(browserslist@4.24.4) + update-browserslist-db: 1.1.3(browserslist@4.24.5) bundle-require@5.1.0(esbuild@0.25.3): dependencies: @@ -3376,7 +3398,7 @@ snapshots: delayed-stream@1.0.0: {} - detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/19c948d15e766687225515331fbebc216a14ed06: + detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/87c69ec3d48cb353229e74cc2ba8abdef2eb2590: dependencies: '@actions/cache': 4.0.3 '@actions/core': 1.11.1 @@ -3407,7 +3429,7 @@ snapshots: eastasianwidth@0.2.0: {} - electron-to-chromium@1.5.145: {} + electron-to-chromium@1.5.149: {} emoji-regex@8.0.0: {} @@ -3568,7 +3590,7 @@ snapshots: eslint-plugin-escompat@3.11.4(eslint@8.57.1): dependencies: - browserslist: 4.24.4 + browserslist: 4.24.5 eslint: 8.57.1 eslint-plugin-eslint-comments@3.2.0(eslint@8.57.1): @@ -3600,7 +3622,7 @@ snapshots: eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1) eslint-plugin-no-only-tests: 3.3.0 - eslint-plugin-prettier: 5.2.6(eslint-config-prettier@10.1.2(eslint@8.57.1))(eslint@8.57.1)(prettier@3.5.3) + eslint-plugin-prettier: 5.3.1(eslint-config-prettier@10.1.2(eslint@8.57.1))(eslint@8.57.1)(prettier@3.5.3) eslint-rule-documentation: 1.0.23 jsx-ast-utils: 3.3.5 prettier: 3.5.3 @@ -3666,7 +3688,7 @@ snapshots: eslint-plugin-no-only-tests@3.3.0: {} - eslint-plugin-prettier@5.2.6(eslint-config-prettier@10.1.2(eslint@8.57.1))(eslint@8.57.1)(prettier@3.5.3): + eslint-plugin-prettier@5.3.1(eslint-config-prettier@10.1.2(eslint@8.57.1))(eslint@8.57.1)(prettier@3.5.3): dependencies: eslint: 8.57.1 prettier: 3.5.3 @@ -3686,7 +3708,7 @@ snapshots: eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.1 @@ -3773,7 +3795,7 @@ snapshots: fast-xml-parser@5.2.1: dependencies: - strnum: 2.0.5 + strnum: 2.1.0 fastq@1.19.1: dependencies: @@ -4618,7 +4640,7 @@ snapshots: strip-json-comments@3.1.1: {} - strnum@2.0.5: {} + strnum@2.1.0: {} sucrase@3.35.0: dependencies: @@ -4806,9 +4828,9 @@ snapshots: '@unrs/resolver-binding-win32-ia32-msvc': 1.7.2 '@unrs/resolver-binding-win32-x64-msvc': 1.7.2 - update-browserslist-db@1.1.3(browserslist@4.24.4): + update-browserslist-db@1.1.3(browserslist@4.24.5): dependencies: - browserslist: 4.24.4 + browserslist: 4.24.5 escalade: 3.2.0 picocolors: 1.1.1