@jhzhu89/m2r 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +491 -468
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,25 +5,43 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
function __accessProp(key) {
|
|
9
|
+
return this[key];
|
|
10
|
+
}
|
|
11
|
+
var __toESMCache_node;
|
|
12
|
+
var __toESMCache_esm;
|
|
8
13
|
var __toESM = (mod, isNodeMode, target) => {
|
|
14
|
+
var canCache = mod != null && typeof mod === "object";
|
|
15
|
+
if (canCache) {
|
|
16
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
17
|
+
var cached = cache.get(mod);
|
|
18
|
+
if (cached)
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
9
21
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
22
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
23
|
for (let key of __getOwnPropNames(mod))
|
|
12
24
|
if (!__hasOwnProp.call(to, key))
|
|
13
25
|
__defProp(to, key, {
|
|
14
|
-
get: (
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
15
27
|
enumerable: true
|
|
16
28
|
});
|
|
29
|
+
if (canCache)
|
|
30
|
+
cache.set(mod, to);
|
|
17
31
|
return to;
|
|
18
32
|
};
|
|
19
33
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
|
+
var __returnValue = (v) => v;
|
|
35
|
+
function __exportSetter(name, newValue) {
|
|
36
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
37
|
+
}
|
|
20
38
|
var __export = (target, all) => {
|
|
21
39
|
for (var name in all)
|
|
22
40
|
__defProp(target, name, {
|
|
23
41
|
get: all[name],
|
|
24
42
|
enumerable: true,
|
|
25
43
|
configurable: true,
|
|
26
|
-
set: (
|
|
44
|
+
set: __exportSetter.bind(all, name)
|
|
27
45
|
});
|
|
28
46
|
};
|
|
29
47
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -16079,10 +16097,15 @@ var init_validate = __esm(() => {
|
|
|
16079
16097
|
exports_external.object({ type: exports_external.literal("any") }),
|
|
16080
16098
|
exports_external.object({ type: exports_external.literal("tool"), name: exports_external.string() })
|
|
16081
16099
|
]);
|
|
16082
|
-
thinking = exports_external.
|
|
16083
|
-
|
|
16084
|
-
|
|
16085
|
-
|
|
16100
|
+
thinking = exports_external.union([
|
|
16101
|
+
exports_external.object({
|
|
16102
|
+
type: exports_external.literal("enabled"),
|
|
16103
|
+
budget_tokens: exports_external.number()
|
|
16104
|
+
}),
|
|
16105
|
+
exports_external.object({
|
|
16106
|
+
type: exports_external.literal("disabled")
|
|
16107
|
+
})
|
|
16108
|
+
]);
|
|
16086
16109
|
schema = exports_external.object({
|
|
16087
16110
|
model: exports_external.string(),
|
|
16088
16111
|
messages: exports_external.array(message),
|
|
@@ -17952,7 +17975,7 @@ var EMPTY, createPathTagFunction = (pathEncoder = encodeURIPath) => function pat
|
|
|
17952
17975
|
return statics[0];
|
|
17953
17976
|
let postPath = false;
|
|
17954
17977
|
const invalidSegments = [];
|
|
17955
|
-
const
|
|
17978
|
+
const path2 = statics.reduce((previousValue, currentValue, index) => {
|
|
17956
17979
|
if (/[?#]/.test(currentValue)) {
|
|
17957
17980
|
postPath = true;
|
|
17958
17981
|
}
|
|
@@ -17968,7 +17991,7 @@ var EMPTY, createPathTagFunction = (pathEncoder = encodeURIPath) => function pat
|
|
|
17968
17991
|
}
|
|
17969
17992
|
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
17970
17993
|
}, "");
|
|
17971
|
-
const pathOnly =
|
|
17994
|
+
const pathOnly = path2.split(/[?#]/, 1)[0];
|
|
17972
17995
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
17973
17996
|
let match2;
|
|
17974
17997
|
while ((match2 = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
@@ -17990,10 +18013,10 @@ var EMPTY, createPathTagFunction = (pathEncoder = encodeURIPath) => function pat
|
|
|
17990
18013
|
throw new OpenAIError(`Path parameters result in path with invalid segments:
|
|
17991
18014
|
${invalidSegments.map((e) => e.error).join(`
|
|
17992
18015
|
`)}
|
|
17993
|
-
${
|
|
18016
|
+
${path2}
|
|
17994
18017
|
${underline}`);
|
|
17995
18018
|
}
|
|
17996
|
-
return
|
|
18019
|
+
return path2;
|
|
17997
18020
|
}, path;
|
|
17998
18021
|
var init_path = __esm(() => {
|
|
17999
18022
|
init_error();
|
|
@@ -18934,11 +18957,11 @@ var init_ChatCompletionStream = __esm(() => {
|
|
|
18934
18957
|
}
|
|
18935
18958
|
return this._addChatCompletion(__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this));
|
|
18936
18959
|
}
|
|
18937
|
-
[(_ChatCompletionStream_params = new WeakMap, _ChatCompletionStream_choiceEventStates = new WeakMap, _ChatCompletionStream_currentChatCompletionSnapshot = new WeakMap, _ChatCompletionStream_instances = new WeakSet, _ChatCompletionStream_beginRequest = function
|
|
18960
|
+
[(_ChatCompletionStream_params = new WeakMap, _ChatCompletionStream_choiceEventStates = new WeakMap, _ChatCompletionStream_currentChatCompletionSnapshot = new WeakMap, _ChatCompletionStream_instances = new WeakSet, _ChatCompletionStream_beginRequest = function _ChatCompletionStream_beginRequest2() {
|
|
18938
18961
|
if (this.ended)
|
|
18939
18962
|
return;
|
|
18940
18963
|
__classPrivateFieldSet(this, _ChatCompletionStream_currentChatCompletionSnapshot, undefined, "f");
|
|
18941
|
-
}, _ChatCompletionStream_getChoiceEventState = function
|
|
18964
|
+
}, _ChatCompletionStream_getChoiceEventState = function _ChatCompletionStream_getChoiceEventState2(choice) {
|
|
18942
18965
|
let state = __classPrivateFieldGet(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index];
|
|
18943
18966
|
if (state) {
|
|
18944
18967
|
return state;
|
|
@@ -18953,7 +18976,7 @@ var init_ChatCompletionStream = __esm(() => {
|
|
|
18953
18976
|
};
|
|
18954
18977
|
__classPrivateFieldGet(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index] = state;
|
|
18955
18978
|
return state;
|
|
18956
|
-
}, _ChatCompletionStream_addChunk = function
|
|
18979
|
+
}, _ChatCompletionStream_addChunk = function _ChatCompletionStream_addChunk2(chunk) {
|
|
18957
18980
|
if (this.ended)
|
|
18958
18981
|
return;
|
|
18959
18982
|
const completion = __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_accumulateChatCompletion).call(this, chunk);
|
|
@@ -19020,7 +19043,7 @@ var init_ChatCompletionStream = __esm(() => {
|
|
|
19020
19043
|
}
|
|
19021
19044
|
}
|
|
19022
19045
|
}
|
|
19023
|
-
}, _ChatCompletionStream_emitToolCallDoneEvent = function
|
|
19046
|
+
}, _ChatCompletionStream_emitToolCallDoneEvent = function _ChatCompletionStream_emitToolCallDoneEvent2(choiceSnapshot, toolCallIndex) {
|
|
19024
19047
|
const state = __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot);
|
|
19025
19048
|
if (state.done_tool_calls.has(toolCallIndex)) {
|
|
19026
19049
|
return;
|
|
@@ -19043,7 +19066,7 @@ var init_ChatCompletionStream = __esm(() => {
|
|
|
19043
19066
|
} else {
|
|
19044
19067
|
assertNever2(toolCallSnapshot.type);
|
|
19045
19068
|
}
|
|
19046
|
-
}, _ChatCompletionStream_emitContentDoneEvents = function
|
|
19069
|
+
}, _ChatCompletionStream_emitContentDoneEvents = function _ChatCompletionStream_emitContentDoneEvents2(choiceSnapshot) {
|
|
19047
19070
|
const state = __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot);
|
|
19048
19071
|
if (choiceSnapshot.message.content && !state.content_done) {
|
|
19049
19072
|
state.content_done = true;
|
|
@@ -19065,7 +19088,7 @@ var init_ChatCompletionStream = __esm(() => {
|
|
|
19065
19088
|
state.logprobs_refusal_done = true;
|
|
19066
19089
|
this._emit("logprobs.refusal.done", { refusal: choiceSnapshot.logprobs.refusal });
|
|
19067
19090
|
}
|
|
19068
|
-
}, _ChatCompletionStream_endRequest = function
|
|
19091
|
+
}, _ChatCompletionStream_endRequest = function _ChatCompletionStream_endRequest2() {
|
|
19069
19092
|
if (this.ended) {
|
|
19070
19093
|
throw new OpenAIError(`stream has ended, this shouldn't happen`);
|
|
19071
19094
|
}
|
|
@@ -19076,13 +19099,13 @@ var init_ChatCompletionStream = __esm(() => {
|
|
|
19076
19099
|
__classPrivateFieldSet(this, _ChatCompletionStream_currentChatCompletionSnapshot, undefined, "f");
|
|
19077
19100
|
__classPrivateFieldSet(this, _ChatCompletionStream_choiceEventStates, [], "f");
|
|
19078
19101
|
return finalizeChatCompletion(snapshot, __classPrivateFieldGet(this, _ChatCompletionStream_params, "f"));
|
|
19079
|
-
}, _ChatCompletionStream_getAutoParseableResponseFormat = function
|
|
19102
|
+
}, _ChatCompletionStream_getAutoParseableResponseFormat = function _ChatCompletionStream_getAutoParseableResponseFormat2() {
|
|
19080
19103
|
const responseFormat = __classPrivateFieldGet(this, _ChatCompletionStream_params, "f")?.response_format;
|
|
19081
19104
|
if (isAutoParsableResponseFormat(responseFormat)) {
|
|
19082
19105
|
return responseFormat;
|
|
19083
19106
|
}
|
|
19084
19107
|
return null;
|
|
19085
|
-
}, _ChatCompletionStream_accumulateChatCompletion = function
|
|
19108
|
+
}, _ChatCompletionStream_accumulateChatCompletion = function _ChatCompletionStream_accumulateChatCompletion2(chunk) {
|
|
19086
19109
|
var _a2, _b, _c, _d;
|
|
19087
19110
|
let snapshot = __classPrivateFieldGet(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f");
|
|
19088
19111
|
const { choices, ...rest } = chunk;
|
|
@@ -21275,11 +21298,11 @@ var init_ResponseStream = __esm(() => {
|
|
|
21275
21298
|
}
|
|
21276
21299
|
return __classPrivateFieldGet(this, _ResponseStream_instances, "m", _ResponseStream_endRequest).call(this);
|
|
21277
21300
|
}
|
|
21278
|
-
[(_ResponseStream_params = new WeakMap, _ResponseStream_currentResponseSnapshot = new WeakMap, _ResponseStream_finalResponse = new WeakMap, _ResponseStream_instances = new WeakSet, _ResponseStream_beginRequest = function
|
|
21301
|
+
[(_ResponseStream_params = new WeakMap, _ResponseStream_currentResponseSnapshot = new WeakMap, _ResponseStream_finalResponse = new WeakMap, _ResponseStream_instances = new WeakSet, _ResponseStream_beginRequest = function _ResponseStream_beginRequest2() {
|
|
21279
21302
|
if (this.ended)
|
|
21280
21303
|
return;
|
|
21281
21304
|
__classPrivateFieldSet(this, _ResponseStream_currentResponseSnapshot, undefined, "f");
|
|
21282
|
-
}, _ResponseStream_addEvent = function
|
|
21305
|
+
}, _ResponseStream_addEvent = function _ResponseStream_addEvent2(event, starting_after) {
|
|
21283
21306
|
if (this.ended)
|
|
21284
21307
|
return;
|
|
21285
21308
|
const maybeEmit = (name, event2) => {
|
|
@@ -21327,7 +21350,7 @@ var init_ResponseStream = __esm(() => {
|
|
|
21327
21350
|
maybeEmit(event.type, event);
|
|
21328
21351
|
break;
|
|
21329
21352
|
}
|
|
21330
|
-
}, _ResponseStream_endRequest = function
|
|
21353
|
+
}, _ResponseStream_endRequest = function _ResponseStream_endRequest2() {
|
|
21331
21354
|
if (this.ended) {
|
|
21332
21355
|
throw new OpenAIError(`stream has ended, this shouldn't happen`);
|
|
21333
21356
|
}
|
|
@@ -21339,7 +21362,7 @@ var init_ResponseStream = __esm(() => {
|
|
|
21339
21362
|
const parsedResponse = finalizeResponse(snapshot, __classPrivateFieldGet(this, _ResponseStream_params, "f"));
|
|
21340
21363
|
__classPrivateFieldSet(this, _ResponseStream_finalResponse, parsedResponse, "f");
|
|
21341
21364
|
return parsedResponse;
|
|
21342
|
-
}, _ResponseStream_accumulateResponse = function
|
|
21365
|
+
}, _ResponseStream_accumulateResponse = function _ResponseStream_accumulateResponse2(event) {
|
|
21343
21366
|
let snapshot = __classPrivateFieldGet(this, _ResponseStream_currentResponseSnapshot, "f");
|
|
21344
21367
|
if (!snapshot) {
|
|
21345
21368
|
if (event.type !== "response.created") {
|
|
@@ -38897,7 +38920,7 @@ var init_NetworkUtils = __esm(() => {
|
|
|
38897
38920
|
});
|
|
38898
38921
|
|
|
38899
38922
|
// node_modules/@azure/msal-node/dist/packageMetadata.mjs
|
|
38900
|
-
var name2 = "@azure/msal-node",
|
|
38923
|
+
var name2 = "@azure/msal-node", version4 = "3.8.4";
|
|
38901
38924
|
var init_packageMetadata2 = __esm(() => {
|
|
38902
38925
|
/*! @azure/msal-node v3.8.4 2025-12-04 */
|
|
38903
38926
|
});
|
|
@@ -39122,7 +39145,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
39122
39145
|
};
|
|
39123
39146
|
this.proxyUrl = proxyUrl || "";
|
|
39124
39147
|
this.customAgentOptions = customAgentOptions || {};
|
|
39125
|
-
this.logger = new Logger(loggerOptions || {}, name2,
|
|
39148
|
+
this.logger = new Logger(loggerOptions || {}, name2, version4);
|
|
39126
39149
|
this.isPiiEnabled = this.logger.isPiiLoggingEnabled();
|
|
39127
39150
|
}
|
|
39128
39151
|
async sendGetRequestAsync(url2, options, timeout) {
|
|
@@ -39330,7 +39353,7 @@ var init_NodeAuthError = __esm(() => {
|
|
|
39330
39353
|
// node_modules/@azure/msal-node/dist/config/Configuration.mjs
|
|
39331
39354
|
function buildAppConfiguration({ auth, broker, cache, system, telemetry }) {
|
|
39332
39355
|
const systemOptions = {
|
|
39333
|
-
...
|
|
39356
|
+
...DEFAULT_SYSTEM_OPTIONS3,
|
|
39334
39357
|
networkClient: new HttpClient(system?.proxyUrl, system?.customAgentOptions),
|
|
39335
39358
|
loggerOptions: system?.loggerOptions || DEFAULT_LOGGER_OPTIONS,
|
|
39336
39359
|
disableInternalRetries: system?.disableInternalRetries || false
|
|
@@ -39365,7 +39388,7 @@ function buildManagedIdentityConfiguration({ clientCapabilities, managedIdentity
|
|
|
39365
39388
|
disableInternalRetries: system?.disableInternalRetries || false
|
|
39366
39389
|
};
|
|
39367
39390
|
}
|
|
39368
|
-
var DEFAULT_AUTH_OPTIONS, DEFAULT_CACHE_OPTIONS2, DEFAULT_LOGGER_OPTIONS,
|
|
39391
|
+
var DEFAULT_AUTH_OPTIONS, DEFAULT_CACHE_OPTIONS2, DEFAULT_LOGGER_OPTIONS, DEFAULT_SYSTEM_OPTIONS3, DEFAULT_TELEMETRY_OPTIONS2;
|
|
39369
39392
|
var init_Configuration = __esm(() => {
|
|
39370
39393
|
init_index_node();
|
|
39371
39394
|
init_HttpClient();
|
|
@@ -39403,7 +39426,7 @@ var init_Configuration = __esm(() => {
|
|
|
39403
39426
|
piiLoggingEnabled: false,
|
|
39404
39427
|
logLevel: LogLevel.Info
|
|
39405
39428
|
};
|
|
39406
|
-
|
|
39429
|
+
DEFAULT_SYSTEM_OPTIONS3 = {
|
|
39407
39430
|
loggerOptions: DEFAULT_LOGGER_OPTIONS,
|
|
39408
39431
|
networkClient: new HttpClient,
|
|
39409
39432
|
proxyUrl: Constants.EMPTY_STRING,
|
|
@@ -39620,7 +39643,7 @@ var require_v35 = __commonJS((exports) => {
|
|
|
39620
39643
|
exports.DNS = DNS;
|
|
39621
39644
|
var URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
39622
39645
|
exports.URL = URL2;
|
|
39623
|
-
function _default3(name3,
|
|
39646
|
+
function _default3(name3, version5, hashfunc) {
|
|
39624
39647
|
function generateUUID(value, namespace, buf, offset) {
|
|
39625
39648
|
if (typeof value === "string") {
|
|
39626
39649
|
value = stringToBytes(value);
|
|
@@ -39635,7 +39658,7 @@ var require_v35 = __commonJS((exports) => {
|
|
|
39635
39658
|
bytes.set(namespace);
|
|
39636
39659
|
bytes.set(value, namespace.length);
|
|
39637
39660
|
bytes = hashfunc(bytes);
|
|
39638
|
-
bytes[6] = bytes[6] & 15 |
|
|
39661
|
+
bytes[6] = bytes[6] & 15 | version5;
|
|
39639
39662
|
bytes[8] = bytes[8] & 63 | 128;
|
|
39640
39663
|
if (buf) {
|
|
39641
39664
|
offset = offset || 0;
|
|
@@ -39780,13 +39803,13 @@ var require_version = __commonJS((exports) => {
|
|
|
39780
39803
|
function _interopRequireDefault(obj) {
|
|
39781
39804
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
39782
39805
|
}
|
|
39783
|
-
function
|
|
39806
|
+
function version5(uuid5) {
|
|
39784
39807
|
if (!(0, _validate.default)(uuid5)) {
|
|
39785
39808
|
throw TypeError("Invalid UUID");
|
|
39786
39809
|
}
|
|
39787
39810
|
return parseInt(uuid5.substr(14, 1), 16);
|
|
39788
39811
|
}
|
|
39789
|
-
var _default3 =
|
|
39812
|
+
var _default3 = version5;
|
|
39790
39813
|
exports.default = _default3;
|
|
39791
39814
|
});
|
|
39792
39815
|
|
|
@@ -39864,7 +39887,7 @@ var require_dist = __commonJS((exports) => {
|
|
|
39864
39887
|
});
|
|
39865
39888
|
|
|
39866
39889
|
// node_modules/uuid/wrapper.mjs
|
|
39867
|
-
var import_dist, v1, v3, v4, v5, NIL,
|
|
39890
|
+
var import_dist, v1, v3, v4, v5, NIL, version5, validate2, stringify2, parse5;
|
|
39868
39891
|
var init_wrapper = __esm(() => {
|
|
39869
39892
|
import_dist = __toESM(require_dist(), 1);
|
|
39870
39893
|
v1 = import_dist.default.v1;
|
|
@@ -39872,7 +39895,7 @@ var init_wrapper = __esm(() => {
|
|
|
39872
39895
|
v4 = import_dist.default.v4;
|
|
39873
39896
|
v5 = import_dist.default.v5;
|
|
39874
39897
|
NIL = import_dist.default.NIL;
|
|
39875
|
-
|
|
39898
|
+
version5 = import_dist.default.version;
|
|
39876
39899
|
validate2 = import_dist.default.validate;
|
|
39877
39900
|
stringify2 = import_dist.default.stringify;
|
|
39878
39901
|
parse5 = import_dist.default.parse;
|
|
@@ -40915,12 +40938,12 @@ var require_jwa = __commonJS((exports, module) => {
|
|
|
40915
40938
|
};
|
|
40916
40939
|
}
|
|
40917
40940
|
var bufferEqual;
|
|
40918
|
-
var timingSafeEqual = "timingSafeEqual" in crypto4 ? function
|
|
40941
|
+
var timingSafeEqual = "timingSafeEqual" in crypto4 ? function timingSafeEqual2(a, b) {
|
|
40919
40942
|
if (a.byteLength !== b.byteLength) {
|
|
40920
40943
|
return false;
|
|
40921
40944
|
}
|
|
40922
40945
|
return crypto4.timingSafeEqual(a, b);
|
|
40923
|
-
} : function
|
|
40946
|
+
} : function timingSafeEqual2(a, b) {
|
|
40924
40947
|
if (!bufferEqual) {
|
|
40925
40948
|
bufferEqual = require_buffer_equal_constant_time();
|
|
40926
40949
|
}
|
|
@@ -41627,29 +41650,29 @@ var require_semver = __commonJS((exports, module) => {
|
|
|
41627
41650
|
var { compareIdentifiers } = require_identifiers();
|
|
41628
41651
|
|
|
41629
41652
|
class SemVer {
|
|
41630
|
-
constructor(
|
|
41653
|
+
constructor(version7, options) {
|
|
41631
41654
|
options = parseOptions(options);
|
|
41632
|
-
if (
|
|
41633
|
-
if (
|
|
41634
|
-
return
|
|
41655
|
+
if (version7 instanceof SemVer) {
|
|
41656
|
+
if (version7.loose === !!options.loose && version7.includePrerelease === !!options.includePrerelease) {
|
|
41657
|
+
return version7;
|
|
41635
41658
|
} else {
|
|
41636
|
-
|
|
41659
|
+
version7 = version7.version;
|
|
41637
41660
|
}
|
|
41638
|
-
} else if (typeof
|
|
41639
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof
|
|
41661
|
+
} else if (typeof version7 !== "string") {
|
|
41662
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version7}".`);
|
|
41640
41663
|
}
|
|
41641
|
-
if (
|
|
41664
|
+
if (version7.length > MAX_LENGTH) {
|
|
41642
41665
|
throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
41643
41666
|
}
|
|
41644
|
-
debug("SemVer",
|
|
41667
|
+
debug("SemVer", version7, options);
|
|
41645
41668
|
this.options = options;
|
|
41646
41669
|
this.loose = !!options.loose;
|
|
41647
41670
|
this.includePrerelease = !!options.includePrerelease;
|
|
41648
|
-
const m =
|
|
41671
|
+
const m = version7.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
41649
41672
|
if (!m) {
|
|
41650
|
-
throw new TypeError(`Invalid Version: ${
|
|
41673
|
+
throw new TypeError(`Invalid Version: ${version7}`);
|
|
41651
41674
|
}
|
|
41652
|
-
this.raw =
|
|
41675
|
+
this.raw = version7;
|
|
41653
41676
|
this.major = +m[1];
|
|
41654
41677
|
this.minor = +m[2];
|
|
41655
41678
|
this.patch = +m[3];
|
|
@@ -41890,12 +41913,12 @@ var require_semver = __commonJS((exports, module) => {
|
|
|
41890
41913
|
// node_modules/semver/functions/parse.js
|
|
41891
41914
|
var require_parse2 = __commonJS((exports, module) => {
|
|
41892
41915
|
var SemVer = require_semver();
|
|
41893
|
-
var parse6 = (
|
|
41894
|
-
if (
|
|
41895
|
-
return
|
|
41916
|
+
var parse6 = (version7, options, throwErrors = false) => {
|
|
41917
|
+
if (version7 instanceof SemVer) {
|
|
41918
|
+
return version7;
|
|
41896
41919
|
}
|
|
41897
41920
|
try {
|
|
41898
|
-
return new SemVer(
|
|
41921
|
+
return new SemVer(version7, options);
|
|
41899
41922
|
} catch (er) {
|
|
41900
41923
|
if (!throwErrors) {
|
|
41901
41924
|
return null;
|
|
@@ -41909,8 +41932,8 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
41909
41932
|
// node_modules/semver/functions/valid.js
|
|
41910
41933
|
var require_valid = __commonJS((exports, module) => {
|
|
41911
41934
|
var parse6 = require_parse2();
|
|
41912
|
-
var valid = (
|
|
41913
|
-
const v = parse6(
|
|
41935
|
+
var valid = (version7, options) => {
|
|
41936
|
+
const v = parse6(version7, options);
|
|
41914
41937
|
return v ? v.version : null;
|
|
41915
41938
|
};
|
|
41916
41939
|
module.exports = valid;
|
|
@@ -41919,8 +41942,8 @@ var require_valid = __commonJS((exports, module) => {
|
|
|
41919
41942
|
// node_modules/semver/functions/clean.js
|
|
41920
41943
|
var require_clean = __commonJS((exports, module) => {
|
|
41921
41944
|
var parse6 = require_parse2();
|
|
41922
|
-
var clean = (
|
|
41923
|
-
const s = parse6(
|
|
41945
|
+
var clean = (version7, options) => {
|
|
41946
|
+
const s = parse6(version7.trim().replace(/^[=v]+/, ""), options);
|
|
41924
41947
|
return s ? s.version : null;
|
|
41925
41948
|
};
|
|
41926
41949
|
module.exports = clean;
|
|
@@ -41929,14 +41952,14 @@ var require_clean = __commonJS((exports, module) => {
|
|
|
41929
41952
|
// node_modules/semver/functions/inc.js
|
|
41930
41953
|
var require_inc = __commonJS((exports, module) => {
|
|
41931
41954
|
var SemVer = require_semver();
|
|
41932
|
-
var inc = (
|
|
41955
|
+
var inc = (version7, release, options, identifier, identifierBase) => {
|
|
41933
41956
|
if (typeof options === "string") {
|
|
41934
41957
|
identifierBase = identifier;
|
|
41935
41958
|
identifier = options;
|
|
41936
41959
|
options = undefined;
|
|
41937
41960
|
}
|
|
41938
41961
|
try {
|
|
41939
|
-
return new SemVer(
|
|
41962
|
+
return new SemVer(version7 instanceof SemVer ? version7.version : version7, options).inc(release, identifier, identifierBase).version;
|
|
41940
41963
|
} catch (er) {
|
|
41941
41964
|
return null;
|
|
41942
41965
|
}
|
|
@@ -42009,8 +42032,8 @@ var require_patch = __commonJS((exports, module) => {
|
|
|
42009
42032
|
// node_modules/semver/functions/prerelease.js
|
|
42010
42033
|
var require_prerelease = __commonJS((exports, module) => {
|
|
42011
42034
|
var parse6 = require_parse2();
|
|
42012
|
-
var prerelease = (
|
|
42013
|
-
const parsed = parse6(
|
|
42035
|
+
var prerelease = (version7, options) => {
|
|
42036
|
+
const parsed = parse6(version7, options);
|
|
42014
42037
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
42015
42038
|
};
|
|
42016
42039
|
module.exports = prerelease;
|
|
@@ -42156,24 +42179,24 @@ var require_coerce = __commonJS((exports, module) => {
|
|
|
42156
42179
|
var SemVer = require_semver();
|
|
42157
42180
|
var parse6 = require_parse2();
|
|
42158
42181
|
var { safeRe: re, t } = require_re();
|
|
42159
|
-
var coerce = (
|
|
42160
|
-
if (
|
|
42161
|
-
return
|
|
42182
|
+
var coerce = (version7, options) => {
|
|
42183
|
+
if (version7 instanceof SemVer) {
|
|
42184
|
+
return version7;
|
|
42162
42185
|
}
|
|
42163
|
-
if (typeof
|
|
42164
|
-
|
|
42186
|
+
if (typeof version7 === "number") {
|
|
42187
|
+
version7 = String(version7);
|
|
42165
42188
|
}
|
|
42166
|
-
if (typeof
|
|
42189
|
+
if (typeof version7 !== "string") {
|
|
42167
42190
|
return null;
|
|
42168
42191
|
}
|
|
42169
42192
|
options = options || {};
|
|
42170
42193
|
let match2 = null;
|
|
42171
42194
|
if (!options.rtl) {
|
|
42172
|
-
match2 =
|
|
42195
|
+
match2 = version7.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
42173
42196
|
} else {
|
|
42174
42197
|
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
42175
42198
|
let next;
|
|
42176
|
-
while ((next = coerceRtlRegex.exec(
|
|
42199
|
+
while ((next = coerceRtlRegex.exec(version7)) && (!match2 || match2.index + match2[0].length !== version7.length)) {
|
|
42177
42200
|
if (!match2 || next.index + next[0].length !== match2.index + match2[0].length) {
|
|
42178
42201
|
match2 = next;
|
|
42179
42202
|
}
|
|
@@ -42351,19 +42374,19 @@ var require_range = __commonJS((exports, module) => {
|
|
|
42351
42374
|
});
|
|
42352
42375
|
});
|
|
42353
42376
|
}
|
|
42354
|
-
test(
|
|
42355
|
-
if (!
|
|
42377
|
+
test(version7) {
|
|
42378
|
+
if (!version7) {
|
|
42356
42379
|
return false;
|
|
42357
42380
|
}
|
|
42358
|
-
if (typeof
|
|
42381
|
+
if (typeof version7 === "string") {
|
|
42359
42382
|
try {
|
|
42360
|
-
|
|
42383
|
+
version7 = new SemVer(version7, this.options);
|
|
42361
42384
|
} catch (er) {
|
|
42362
42385
|
return false;
|
|
42363
42386
|
}
|
|
42364
42387
|
}
|
|
42365
42388
|
for (let i = 0;i < this.set.length; i++) {
|
|
42366
|
-
if (testSet(this.set[i],
|
|
42389
|
+
if (testSet(this.set[i], version7, this.options)) {
|
|
42367
42390
|
return true;
|
|
42368
42391
|
}
|
|
42369
42392
|
}
|
|
@@ -42578,13 +42601,13 @@ var require_range = __commonJS((exports, module) => {
|
|
|
42578
42601
|
}
|
|
42579
42602
|
return `${from} ${to}`.trim();
|
|
42580
42603
|
};
|
|
42581
|
-
var testSet = (set2,
|
|
42604
|
+
var testSet = (set2, version7, options) => {
|
|
42582
42605
|
for (let i = 0;i < set2.length; i++) {
|
|
42583
|
-
if (!set2[i].test(
|
|
42606
|
+
if (!set2[i].test(version7)) {
|
|
42584
42607
|
return false;
|
|
42585
42608
|
}
|
|
42586
42609
|
}
|
|
42587
|
-
if (
|
|
42610
|
+
if (version7.prerelease.length && !options.includePrerelease) {
|
|
42588
42611
|
for (let i = 0;i < set2.length; i++) {
|
|
42589
42612
|
debug(set2[i].semver);
|
|
42590
42613
|
if (set2[i].semver === Comparator.ANY) {
|
|
@@ -42592,7 +42615,7 @@ var require_range = __commonJS((exports, module) => {
|
|
|
42592
42615
|
}
|
|
42593
42616
|
if (set2[i].semver.prerelease.length > 0) {
|
|
42594
42617
|
const allowed = set2[i].semver;
|
|
42595
|
-
if (allowed.major ===
|
|
42618
|
+
if (allowed.major === version7.major && allowed.minor === version7.minor && allowed.patch === version7.patch) {
|
|
42596
42619
|
return true;
|
|
42597
42620
|
}
|
|
42598
42621
|
}
|
|
@@ -42651,19 +42674,19 @@ var require_comparator = __commonJS((exports, module) => {
|
|
|
42651
42674
|
toString() {
|
|
42652
42675
|
return this.value;
|
|
42653
42676
|
}
|
|
42654
|
-
test(
|
|
42655
|
-
debug("Comparator.test",
|
|
42656
|
-
if (this.semver === ANY ||
|
|
42677
|
+
test(version7) {
|
|
42678
|
+
debug("Comparator.test", version7, this.options.loose);
|
|
42679
|
+
if (this.semver === ANY || version7 === ANY) {
|
|
42657
42680
|
return true;
|
|
42658
42681
|
}
|
|
42659
|
-
if (typeof
|
|
42682
|
+
if (typeof version7 === "string") {
|
|
42660
42683
|
try {
|
|
42661
|
-
|
|
42684
|
+
version7 = new SemVer(version7, this.options);
|
|
42662
42685
|
} catch (er) {
|
|
42663
42686
|
return false;
|
|
42664
42687
|
}
|
|
42665
42688
|
}
|
|
42666
|
-
return cmp(
|
|
42689
|
+
return cmp(version7, this.operator, this.semver, this.options);
|
|
42667
42690
|
}
|
|
42668
42691
|
intersects(comp, options) {
|
|
42669
42692
|
if (!(comp instanceof Comparator)) {
|
|
@@ -42717,13 +42740,13 @@ var require_comparator = __commonJS((exports, module) => {
|
|
|
42717
42740
|
// node_modules/semver/functions/satisfies.js
|
|
42718
42741
|
var require_satisfies = __commonJS((exports, module) => {
|
|
42719
42742
|
var Range = require_range();
|
|
42720
|
-
var satisfies = (
|
|
42743
|
+
var satisfies = (version7, range, options) => {
|
|
42721
42744
|
try {
|
|
42722
42745
|
range = new Range(range, options);
|
|
42723
42746
|
} catch (er) {
|
|
42724
42747
|
return false;
|
|
42725
42748
|
}
|
|
42726
|
-
return range.test(
|
|
42749
|
+
return range.test(version7);
|
|
42727
42750
|
};
|
|
42728
42751
|
module.exports = satisfies;
|
|
42729
42752
|
});
|
|
@@ -42865,8 +42888,8 @@ var require_outside = __commonJS((exports, module) => {
|
|
|
42865
42888
|
var lt = require_lt();
|
|
42866
42889
|
var lte = require_lte();
|
|
42867
42890
|
var gte = require_gte();
|
|
42868
|
-
var outside = (
|
|
42869
|
-
|
|
42891
|
+
var outside = (version7, range, hilo, options) => {
|
|
42892
|
+
version7 = new SemVer(version7, options);
|
|
42870
42893
|
range = new Range(range, options);
|
|
42871
42894
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
42872
42895
|
switch (hilo) {
|
|
@@ -42887,7 +42910,7 @@ var require_outside = __commonJS((exports, module) => {
|
|
|
42887
42910
|
default:
|
|
42888
42911
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
42889
42912
|
}
|
|
42890
|
-
if (satisfies(
|
|
42913
|
+
if (satisfies(version7, range, options)) {
|
|
42891
42914
|
return false;
|
|
42892
42915
|
}
|
|
42893
42916
|
for (let i = 0;i < range.set.length; ++i) {
|
|
@@ -42909,9 +42932,9 @@ var require_outside = __commonJS((exports, module) => {
|
|
|
42909
42932
|
if (high.operator === comp || high.operator === ecomp) {
|
|
42910
42933
|
return false;
|
|
42911
42934
|
}
|
|
42912
|
-
if ((!low.operator || low.operator === comp) && ltefn(
|
|
42935
|
+
if ((!low.operator || low.operator === comp) && ltefn(version7, low.semver)) {
|
|
42913
42936
|
return false;
|
|
42914
|
-
} else if (low.operator === ecomp && ltfn(
|
|
42937
|
+
} else if (low.operator === ecomp && ltfn(version7, low.semver)) {
|
|
42915
42938
|
return false;
|
|
42916
42939
|
}
|
|
42917
42940
|
}
|
|
@@ -42923,14 +42946,14 @@ var require_outside = __commonJS((exports, module) => {
|
|
|
42923
42946
|
// node_modules/semver/ranges/gtr.js
|
|
42924
42947
|
var require_gtr = __commonJS((exports, module) => {
|
|
42925
42948
|
var outside = require_outside();
|
|
42926
|
-
var gtr = (
|
|
42949
|
+
var gtr = (version7, range, options) => outside(version7, range, ">", options);
|
|
42927
42950
|
module.exports = gtr;
|
|
42928
42951
|
});
|
|
42929
42952
|
|
|
42930
42953
|
// node_modules/semver/ranges/ltr.js
|
|
42931
42954
|
var require_ltr = __commonJS((exports, module) => {
|
|
42932
42955
|
var outside = require_outside();
|
|
42933
|
-
var ltr = (
|
|
42956
|
+
var ltr = (version7, range, options) => outside(version7, range, "<", options);
|
|
42934
42957
|
module.exports = ltr;
|
|
42935
42958
|
});
|
|
42936
42959
|
|
|
@@ -42954,12 +42977,12 @@ var require_simplify = __commonJS((exports, module) => {
|
|
|
42954
42977
|
let first = null;
|
|
42955
42978
|
let prev = null;
|
|
42956
42979
|
const v = versions2.sort((a, b) => compare(a, b, options));
|
|
42957
|
-
for (const
|
|
42958
|
-
const included = satisfies(
|
|
42980
|
+
for (const version7 of v) {
|
|
42981
|
+
const included = satisfies(version7, range, options);
|
|
42959
42982
|
if (included) {
|
|
42960
|
-
prev =
|
|
42983
|
+
prev = version7;
|
|
42961
42984
|
if (!first) {
|
|
42962
|
-
first =
|
|
42985
|
+
first = version7;
|
|
42963
42986
|
}
|
|
42964
42987
|
} else {
|
|
42965
42988
|
if (prev) {
|
|
@@ -44344,7 +44367,7 @@ function getAuthCodeRequestUrl(config3, authority, request, logger4) {
|
|
|
44344
44367
|
}, request, logger4);
|
|
44345
44368
|
exports_RequestParameterBuilder.addLibraryInfo(parameters, {
|
|
44346
44369
|
sku: Constants2.MSAL_SKU,
|
|
44347
|
-
version:
|
|
44370
|
+
version: version4,
|
|
44348
44371
|
cpu: process.arch || "",
|
|
44349
44372
|
os: process.platform || ""
|
|
44350
44373
|
});
|
|
@@ -44370,7 +44393,7 @@ class ClientApplication {
|
|
|
44370
44393
|
constructor(configuration) {
|
|
44371
44394
|
this.config = buildAppConfiguration(configuration);
|
|
44372
44395
|
this.cryptoProvider = new CryptoProvider;
|
|
44373
|
-
this.logger = new Logger(this.config.system.loggerOptions, name2,
|
|
44396
|
+
this.logger = new Logger(this.config.system.loggerOptions, name2, version4);
|
|
44374
44397
|
this.storage = new NodeStorage(this.logger, this.config.auth.clientId, this.cryptoProvider, buildStaticAuthorityOptions(this.config.auth));
|
|
44375
44398
|
this.tokenCache = new TokenCache(this.storage, this.logger, this.config.cache.cachePlugin);
|
|
44376
44399
|
}
|
|
@@ -44549,7 +44572,7 @@ class ClientApplication {
|
|
|
44549
44572
|
},
|
|
44550
44573
|
libraryInfo: {
|
|
44551
44574
|
sku: Constants2.MSAL_SKU,
|
|
44552
|
-
version:
|
|
44575
|
+
version: version4,
|
|
44553
44576
|
cpu: process.arch || Constants.EMPTY_STRING,
|
|
44554
44577
|
os: process.platform || Constants.EMPTY_STRING
|
|
44555
44578
|
},
|
|
@@ -44863,7 +44886,7 @@ var init_PublicClientApplication = __esm(() => {
|
|
|
44863
44886
|
}
|
|
44864
44887
|
this.skus = ServerTelemetryManager.makeExtraSkuString({
|
|
44865
44888
|
libraryName: Constants2.MSAL_SKU,
|
|
44866
|
-
libraryVersion:
|
|
44889
|
+
libraryVersion: version4
|
|
44867
44890
|
});
|
|
44868
44891
|
}
|
|
44869
44892
|
async acquireTokenByDeviceCode(request) {
|
|
@@ -46149,7 +46172,7 @@ var init_ManagedIdentityClient = __esm(() => {
|
|
|
46149
46172
|
class ManagedIdentityApplication {
|
|
46150
46173
|
constructor(configuration) {
|
|
46151
46174
|
this.config = buildManagedIdentityConfiguration(configuration || {});
|
|
46152
|
-
this.logger = new Logger(this.config.system.loggerOptions, name2,
|
|
46175
|
+
this.logger = new Logger(this.config.system.loggerOptions, name2, version4);
|
|
46153
46176
|
const fakeStatusAuthorityOptions = {
|
|
46154
46177
|
canonicalAuthority: Constants.DEFAULT_AUTHORITY
|
|
46155
46178
|
};
|
|
@@ -46268,7 +46291,7 @@ var init_DistributedCachePlugin = __esm(() => {
|
|
|
46268
46291
|
// node_modules/@azure/msal-node/dist/index.mjs
|
|
46269
46292
|
var exports_dist = {};
|
|
46270
46293
|
__export(exports_dist, {
|
|
46271
|
-
version: () =>
|
|
46294
|
+
version: () => version4,
|
|
46272
46295
|
internals: () => exports_internals,
|
|
46273
46296
|
UsernamePasswordClient: () => UsernamePasswordClient,
|
|
46274
46297
|
TokenCacheContext: () => TokenCacheContext,
|
|
@@ -46770,104 +46793,6 @@ var init_utils4 = __esm(() => {
|
|
|
46770
46793
|
logger4 = credentialLogger("IdentityUtils");
|
|
46771
46794
|
});
|
|
46772
46795
|
|
|
46773
|
-
// node_modules/@azure/core-client/dist/esm/interfaces.js
|
|
46774
|
-
var XML_ATTRKEY = "$", XML_CHARKEY = "_";
|
|
46775
|
-
|
|
46776
|
-
// node_modules/@azure/core-client/dist/esm/utils.js
|
|
46777
|
-
function isPrimitiveBody(value, mapperTypeName) {
|
|
46778
|
-
return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === undefined || value === null);
|
|
46779
|
-
}
|
|
46780
|
-
function handleNullableResponseAndWrappableBody(responseObject) {
|
|
46781
|
-
const combinedHeadersAndBody = {
|
|
46782
|
-
...responseObject.headers,
|
|
46783
|
-
...responseObject.body
|
|
46784
|
-
};
|
|
46785
|
-
if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) {
|
|
46786
|
-
return responseObject.shouldWrapBody ? { body: null } : null;
|
|
46787
|
-
} else {
|
|
46788
|
-
return responseObject.shouldWrapBody ? {
|
|
46789
|
-
...responseObject.headers,
|
|
46790
|
-
body: responseObject.body
|
|
46791
|
-
} : combinedHeadersAndBody;
|
|
46792
|
-
}
|
|
46793
|
-
}
|
|
46794
|
-
function flattenResponse(fullResponse, responseSpec) {
|
|
46795
|
-
const parsedHeaders = fullResponse.parsedHeaders;
|
|
46796
|
-
if (fullResponse.request.method === "HEAD") {
|
|
46797
|
-
return {
|
|
46798
|
-
...parsedHeaders,
|
|
46799
|
-
body: fullResponse.parsedBody
|
|
46800
|
-
};
|
|
46801
|
-
}
|
|
46802
|
-
const bodyMapper = responseSpec && responseSpec.bodyMapper;
|
|
46803
|
-
const isNullable = Boolean(bodyMapper?.nullable);
|
|
46804
|
-
const expectedBodyTypeName = bodyMapper?.type.name;
|
|
46805
|
-
if (expectedBodyTypeName === "Stream") {
|
|
46806
|
-
return {
|
|
46807
|
-
...parsedHeaders,
|
|
46808
|
-
blobBody: fullResponse.blobBody,
|
|
46809
|
-
readableStreamBody: fullResponse.readableStreamBody
|
|
46810
|
-
};
|
|
46811
|
-
}
|
|
46812
|
-
const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {};
|
|
46813
|
-
const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === "");
|
|
46814
|
-
if (expectedBodyTypeName === "Sequence" || isPageableResponse) {
|
|
46815
|
-
const arrayResponse = fullResponse.parsedBody ?? [];
|
|
46816
|
-
for (const key of Object.keys(modelProperties)) {
|
|
46817
|
-
if (modelProperties[key].serializedName) {
|
|
46818
|
-
arrayResponse[key] = fullResponse.parsedBody?.[key];
|
|
46819
|
-
}
|
|
46820
|
-
}
|
|
46821
|
-
if (parsedHeaders) {
|
|
46822
|
-
for (const key of Object.keys(parsedHeaders)) {
|
|
46823
|
-
arrayResponse[key] = parsedHeaders[key];
|
|
46824
|
-
}
|
|
46825
|
-
}
|
|
46826
|
-
return isNullable && !fullResponse.parsedBody && !parsedHeaders && Object.getOwnPropertyNames(modelProperties).length === 0 ? null : arrayResponse;
|
|
46827
|
-
}
|
|
46828
|
-
return handleNullableResponseAndWrappableBody({
|
|
46829
|
-
body: fullResponse.parsedBody,
|
|
46830
|
-
headers: parsedHeaders,
|
|
46831
|
-
hasNullableType: isNullable,
|
|
46832
|
-
shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName)
|
|
46833
|
-
});
|
|
46834
|
-
}
|
|
46835
|
-
var init_utils5 = () => {};
|
|
46836
|
-
|
|
46837
|
-
// node_modules/@azure/core-client/dist/esm/serializer.js
|
|
46838
|
-
var MapperTypeNames;
|
|
46839
|
-
var init_serializer = __esm(() => {
|
|
46840
|
-
MapperTypeNames = {
|
|
46841
|
-
Base64Url: "Base64Url",
|
|
46842
|
-
Boolean: "Boolean",
|
|
46843
|
-
ByteArray: "ByteArray",
|
|
46844
|
-
Composite: "Composite",
|
|
46845
|
-
Date: "Date",
|
|
46846
|
-
DateTime: "DateTime",
|
|
46847
|
-
DateTimeRfc1123: "DateTimeRfc1123",
|
|
46848
|
-
Dictionary: "Dictionary",
|
|
46849
|
-
Enum: "Enum",
|
|
46850
|
-
Number: "Number",
|
|
46851
|
-
Object: "Object",
|
|
46852
|
-
Sequence: "Sequence",
|
|
46853
|
-
String: "String",
|
|
46854
|
-
Stream: "Stream",
|
|
46855
|
-
TimeSpan: "TimeSpan",
|
|
46856
|
-
UnixTime: "UnixTime"
|
|
46857
|
-
};
|
|
46858
|
-
});
|
|
46859
|
-
|
|
46860
|
-
// node_modules/@typespec/ts-http-runtime/dist/esm/abort-controller/AbortError.js
|
|
46861
|
-
var AbortError2;
|
|
46862
|
-
var init_AbortError2 = __esm(() => {
|
|
46863
|
-
AbortError2 = class AbortError2 extends Error {
|
|
46864
|
-
constructor(message2) {
|
|
46865
|
-
super(message2);
|
|
46866
|
-
this.name = "AbortError";
|
|
46867
|
-
}
|
|
46868
|
-
};
|
|
46869
|
-
});
|
|
46870
|
-
|
|
46871
46796
|
// node_modules/@typespec/ts-http-runtime/dist/esm/httpHeaders.js
|
|
46872
46797
|
function normalizeName(name3) {
|
|
46873
46798
|
return name3.toLowerCase();
|
|
@@ -47221,6 +47146,17 @@ var init_restError = __esm(() => {
|
|
|
47221
47146
|
};
|
|
47222
47147
|
});
|
|
47223
47148
|
|
|
47149
|
+
// node_modules/@typespec/ts-http-runtime/dist/esm/abort-controller/AbortError.js
|
|
47150
|
+
var AbortError2;
|
|
47151
|
+
var init_AbortError2 = __esm(() => {
|
|
47152
|
+
AbortError2 = class AbortError2 extends Error {
|
|
47153
|
+
constructor(message2) {
|
|
47154
|
+
super(message2);
|
|
47155
|
+
this.name = "AbortError";
|
|
47156
|
+
}
|
|
47157
|
+
};
|
|
47158
|
+
});
|
|
47159
|
+
|
|
47224
47160
|
// node_modules/@typespec/ts-http-runtime/dist/esm/log.js
|
|
47225
47161
|
var logger5;
|
|
47226
47162
|
var init_log3 = __esm(() => {
|
|
@@ -47532,68 +47468,45 @@ var init_defaultHttpClient = __esm(() => {
|
|
|
47532
47468
|
init_nodeHttpClient();
|
|
47533
47469
|
});
|
|
47534
47470
|
|
|
47535
|
-
// node_modules/@typespec/ts-http-runtime/dist/esm/
|
|
47536
|
-
|
|
47537
|
-
|
|
47538
|
-
|
|
47539
|
-
|
|
47540
|
-
|
|
47541
|
-
|
|
47542
|
-
|
|
47543
|
-
|
|
47544
|
-
|
|
47545
|
-
|
|
47546
|
-
|
|
47547
|
-
|
|
47548
|
-
|
|
47549
|
-
const response = await next(request);
|
|
47550
|
-
logger6(`Response status code: ${response.status}`);
|
|
47551
|
-
logger6(`Headers: ${sanitizer.sanitize(response.headers)}`);
|
|
47552
|
-
return response;
|
|
47553
|
-
}
|
|
47554
|
-
};
|
|
47471
|
+
// node_modules/@typespec/ts-http-runtime/dist/esm/index.js
|
|
47472
|
+
var init_esm5 = __esm(() => {
|
|
47473
|
+
init_httpHeaders();
|
|
47474
|
+
init_pipelineRequest();
|
|
47475
|
+
init_pipeline();
|
|
47476
|
+
init_restError();
|
|
47477
|
+
init_defaultHttpClient();
|
|
47478
|
+
init_schemes();
|
|
47479
|
+
init_oauth2Flows();
|
|
47480
|
+
});
|
|
47481
|
+
|
|
47482
|
+
// node_modules/@azure/core-rest-pipeline/dist/esm/pipeline.js
|
|
47483
|
+
function createEmptyPipeline2() {
|
|
47484
|
+
return createEmptyPipeline();
|
|
47555
47485
|
}
|
|
47556
|
-
var
|
|
47557
|
-
|
|
47558
|
-
init_log3();
|
|
47559
|
-
init_sanitizer();
|
|
47486
|
+
var init_pipeline2 = __esm(() => {
|
|
47487
|
+
init_esm5();
|
|
47560
47488
|
});
|
|
47561
47489
|
|
|
47562
|
-
// node_modules/@
|
|
47563
|
-
|
|
47564
|
-
|
|
47490
|
+
// node_modules/@azure/core-rest-pipeline/dist/esm/log.js
|
|
47491
|
+
var logger6;
|
|
47492
|
+
var init_log4 = __esm(() => {
|
|
47493
|
+
init_esm();
|
|
47494
|
+
logger6 = createClientLogger2("core-rest-pipeline");
|
|
47495
|
+
});
|
|
47496
|
+
|
|
47497
|
+
// node_modules/@typespec/ts-http-runtime/dist/esm/policies/agentPolicy.js
|
|
47498
|
+
function agentPolicy(agent) {
|
|
47565
47499
|
return {
|
|
47566
|
-
name:
|
|
47567
|
-
async
|
|
47568
|
-
|
|
47569
|
-
|
|
47500
|
+
name: agentPolicyName,
|
|
47501
|
+
sendRequest: async (req, next) => {
|
|
47502
|
+
if (!req.agent) {
|
|
47503
|
+
req.agent = agent;
|
|
47504
|
+
}
|
|
47505
|
+
return next(req);
|
|
47570
47506
|
}
|
|
47571
47507
|
};
|
|
47572
47508
|
}
|
|
47573
|
-
|
|
47574
|
-
const { request, status, headers } = response;
|
|
47575
|
-
const locationHeader = headers.get("location");
|
|
47576
|
-
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) {
|
|
47577
|
-
const url2 = new URL(locationHeader, request.url);
|
|
47578
|
-
request.url = url2.toString();
|
|
47579
|
-
if (status === 303) {
|
|
47580
|
-
request.method = "GET";
|
|
47581
|
-
request.headers.delete("Content-Length");
|
|
47582
|
-
delete request.body;
|
|
47583
|
-
}
|
|
47584
|
-
request.headers.delete("Authorization");
|
|
47585
|
-
const res = await next(request);
|
|
47586
|
-
return handleRedirect(next, res, maxRetries, currentRetries + 1);
|
|
47587
|
-
}
|
|
47588
|
-
return response;
|
|
47589
|
-
}
|
|
47590
|
-
var redirectPolicyName = "redirectPolicy", allowedRedirect;
|
|
47591
|
-
var init_redirectPolicy = __esm(() => {
|
|
47592
|
-
allowedRedirect = ["GET", "HEAD"];
|
|
47593
|
-
});
|
|
47594
|
-
|
|
47595
|
-
// node_modules/@typespec/ts-http-runtime/dist/esm/constants.js
|
|
47596
|
-
var DEFAULT_RETRY_POLICY_COUNT = 3;
|
|
47509
|
+
var agentPolicyName = "agentPolicy";
|
|
47597
47510
|
|
|
47598
47511
|
// node_modules/@typespec/ts-http-runtime/dist/esm/policies/decompressResponsePolicy.js
|
|
47599
47512
|
function decompressResponsePolicy() {
|
|
@@ -47741,9 +47654,12 @@ var init_exponentialRetryStrategy = __esm(() => {
|
|
|
47741
47654
|
DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64;
|
|
47742
47655
|
});
|
|
47743
47656
|
|
|
47657
|
+
// node_modules/@typespec/ts-http-runtime/dist/esm/constants.js
|
|
47658
|
+
var DEFAULT_RETRY_POLICY_COUNT = 3;
|
|
47659
|
+
|
|
47744
47660
|
// node_modules/@typespec/ts-http-runtime/dist/esm/policies/retryPolicy.js
|
|
47745
47661
|
function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_COUNT }) {
|
|
47746
|
-
const
|
|
47662
|
+
const logger7 = options.logger || retryPolicyLogger;
|
|
47747
47663
|
return {
|
|
47748
47664
|
name: retryPolicyName,
|
|
47749
47665
|
async sendRequest(request, next) {
|
|
@@ -47756,11 +47672,11 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO
|
|
|
47756
47672
|
response = undefined;
|
|
47757
47673
|
responseError = undefined;
|
|
47758
47674
|
try {
|
|
47759
|
-
|
|
47675
|
+
logger7.info(`Retry ${retryCount}: Attempting to send request`, request.requestId);
|
|
47760
47676
|
response = await next(request);
|
|
47761
|
-
|
|
47677
|
+
logger7.info(`Retry ${retryCount}: Received a response from request`, request.requestId);
|
|
47762
47678
|
} catch (e) {
|
|
47763
|
-
|
|
47679
|
+
logger7.error(`Retry ${retryCount}: Received an error from request`, request.requestId);
|
|
47764
47680
|
responseError = e;
|
|
47765
47681
|
if (!e || responseError.name !== "RestError") {
|
|
47766
47682
|
throw e;
|
|
@@ -47768,12 +47684,12 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO
|
|
|
47768
47684
|
response = responseError.response;
|
|
47769
47685
|
}
|
|
47770
47686
|
if (request.abortSignal?.aborted) {
|
|
47771
|
-
|
|
47687
|
+
logger7.error(`Retry ${retryCount}: Request aborted.`);
|
|
47772
47688
|
const abortError = new AbortError2;
|
|
47773
47689
|
throw abortError;
|
|
47774
47690
|
}
|
|
47775
47691
|
if (retryCount >= (options.maxRetries ?? DEFAULT_RETRY_POLICY_COUNT)) {
|
|
47776
|
-
|
|
47692
|
+
logger7.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`);
|
|
47777
47693
|
if (responseError) {
|
|
47778
47694
|
throw responseError;
|
|
47779
47695
|
} else if (response) {
|
|
@@ -47782,10 +47698,10 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO
|
|
|
47782
47698
|
throw new Error("Maximum retries reached with no response or error to throw");
|
|
47783
47699
|
}
|
|
47784
47700
|
}
|
|
47785
|
-
|
|
47701
|
+
logger7.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`);
|
|
47786
47702
|
strategiesLoop:
|
|
47787
47703
|
for (const strategy of strategies) {
|
|
47788
|
-
const strategyLogger = strategy.logger ||
|
|
47704
|
+
const strategyLogger = strategy.logger || logger7;
|
|
47789
47705
|
strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`);
|
|
47790
47706
|
const modifiers = strategy.retry({
|
|
47791
47707
|
retryCount,
|
|
@@ -47813,11 +47729,11 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO
|
|
|
47813
47729
|
}
|
|
47814
47730
|
}
|
|
47815
47731
|
if (responseError) {
|
|
47816
|
-
|
|
47732
|
+
logger7.info(`None of the retry strategies could work with the received error. Throwing it.`);
|
|
47817
47733
|
throw responseError;
|
|
47818
47734
|
}
|
|
47819
47735
|
if (response) {
|
|
47820
|
-
|
|
47736
|
+
logger7.info(`None of the retry strategies could work with the received response. Returning it.`);
|
|
47821
47737
|
return response;
|
|
47822
47738
|
}
|
|
47823
47739
|
}
|
|
@@ -47929,6 +47845,196 @@ var init_formDataPolicy = __esm(() => {
|
|
|
47929
47845
|
init_httpHeaders();
|
|
47930
47846
|
});
|
|
47931
47847
|
|
|
47848
|
+
// node_modules/@typespec/ts-http-runtime/dist/esm/policies/logPolicy.js
|
|
47849
|
+
function logPolicy(options = {}) {
|
|
47850
|
+
const logger7 = options.logger ?? logger5.info;
|
|
47851
|
+
const sanitizer = new Sanitizer({
|
|
47852
|
+
additionalAllowedHeaderNames: options.additionalAllowedHeaderNames,
|
|
47853
|
+
additionalAllowedQueryParameters: options.additionalAllowedQueryParameters
|
|
47854
|
+
});
|
|
47855
|
+
return {
|
|
47856
|
+
name: logPolicyName,
|
|
47857
|
+
async sendRequest(request, next) {
|
|
47858
|
+
if (!logger7.enabled) {
|
|
47859
|
+
return next(request);
|
|
47860
|
+
}
|
|
47861
|
+
logger7(`Request: ${sanitizer.sanitize(request)}`);
|
|
47862
|
+
const response = await next(request);
|
|
47863
|
+
logger7(`Response status code: ${response.status}`);
|
|
47864
|
+
logger7(`Headers: ${sanitizer.sanitize(response.headers)}`);
|
|
47865
|
+
return response;
|
|
47866
|
+
}
|
|
47867
|
+
};
|
|
47868
|
+
}
|
|
47869
|
+
var logPolicyName = "logPolicy";
|
|
47870
|
+
var init_logPolicy = __esm(() => {
|
|
47871
|
+
init_log3();
|
|
47872
|
+
init_sanitizer();
|
|
47873
|
+
});
|
|
47874
|
+
|
|
47875
|
+
// node_modules/@typespec/ts-http-runtime/dist/esm/util/typeGuards.js
|
|
47876
|
+
function isBlob(x) {
|
|
47877
|
+
return typeof x.stream === "function";
|
|
47878
|
+
}
|
|
47879
|
+
|
|
47880
|
+
// node_modules/@typespec/ts-http-runtime/dist/esm/util/concat.js
|
|
47881
|
+
import { Readable } from "stream";
|
|
47882
|
+
async function* streamAsyncIterator() {
|
|
47883
|
+
const reader = this.getReader();
|
|
47884
|
+
try {
|
|
47885
|
+
while (true) {
|
|
47886
|
+
const { done, value } = await reader.read();
|
|
47887
|
+
if (done) {
|
|
47888
|
+
return;
|
|
47889
|
+
}
|
|
47890
|
+
yield value;
|
|
47891
|
+
}
|
|
47892
|
+
} finally {
|
|
47893
|
+
reader.releaseLock();
|
|
47894
|
+
}
|
|
47895
|
+
}
|
|
47896
|
+
function makeAsyncIterable(webStream) {
|
|
47897
|
+
if (!webStream[Symbol.asyncIterator]) {
|
|
47898
|
+
webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream);
|
|
47899
|
+
}
|
|
47900
|
+
if (!webStream.values) {
|
|
47901
|
+
webStream.values = streamAsyncIterator.bind(webStream);
|
|
47902
|
+
}
|
|
47903
|
+
}
|
|
47904
|
+
function ensureNodeStream(stream2) {
|
|
47905
|
+
if (stream2 instanceof ReadableStream) {
|
|
47906
|
+
makeAsyncIterable(stream2);
|
|
47907
|
+
return Readable.fromWeb(stream2);
|
|
47908
|
+
} else {
|
|
47909
|
+
return stream2;
|
|
47910
|
+
}
|
|
47911
|
+
}
|
|
47912
|
+
function toStream(source) {
|
|
47913
|
+
if (source instanceof Uint8Array) {
|
|
47914
|
+
return Readable.from(Buffer.from(source));
|
|
47915
|
+
} else if (isBlob(source)) {
|
|
47916
|
+
return ensureNodeStream(source.stream());
|
|
47917
|
+
} else {
|
|
47918
|
+
return ensureNodeStream(source);
|
|
47919
|
+
}
|
|
47920
|
+
}
|
|
47921
|
+
async function concat(sources) {
|
|
47922
|
+
return function() {
|
|
47923
|
+
const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream);
|
|
47924
|
+
return Readable.from(async function* () {
|
|
47925
|
+
for (const stream2 of streams) {
|
|
47926
|
+
for await (const chunk of stream2) {
|
|
47927
|
+
yield chunk;
|
|
47928
|
+
}
|
|
47929
|
+
}
|
|
47930
|
+
}());
|
|
47931
|
+
};
|
|
47932
|
+
}
|
|
47933
|
+
var init_concat = () => {};
|
|
47934
|
+
|
|
47935
|
+
// node_modules/@typespec/ts-http-runtime/dist/esm/policies/multipartPolicy.js
|
|
47936
|
+
function generateBoundary() {
|
|
47937
|
+
return `----AzSDKFormBoundary${randomUUID()}`;
|
|
47938
|
+
}
|
|
47939
|
+
function encodeHeaders(headers) {
|
|
47940
|
+
let result = "";
|
|
47941
|
+
for (const [key, value] of headers) {
|
|
47942
|
+
result += `${key}: ${value}\r
|
|
47943
|
+
`;
|
|
47944
|
+
}
|
|
47945
|
+
return result;
|
|
47946
|
+
}
|
|
47947
|
+
function getLength(source) {
|
|
47948
|
+
if (source instanceof Uint8Array) {
|
|
47949
|
+
return source.byteLength;
|
|
47950
|
+
} else if (isBlob(source)) {
|
|
47951
|
+
return source.size === -1 ? undefined : source.size;
|
|
47952
|
+
} else {
|
|
47953
|
+
return;
|
|
47954
|
+
}
|
|
47955
|
+
}
|
|
47956
|
+
function getTotalLength(sources) {
|
|
47957
|
+
let total = 0;
|
|
47958
|
+
for (const source of sources) {
|
|
47959
|
+
const partLength = getLength(source);
|
|
47960
|
+
if (partLength === undefined) {
|
|
47961
|
+
return;
|
|
47962
|
+
} else {
|
|
47963
|
+
total += partLength;
|
|
47964
|
+
}
|
|
47965
|
+
}
|
|
47966
|
+
return total;
|
|
47967
|
+
}
|
|
47968
|
+
async function buildRequestBody(request, parts, boundary) {
|
|
47969
|
+
const sources = [
|
|
47970
|
+
stringToUint8Array(`--${boundary}`, "utf-8"),
|
|
47971
|
+
...parts.flatMap((part) => [
|
|
47972
|
+
stringToUint8Array(`\r
|
|
47973
|
+
`, "utf-8"),
|
|
47974
|
+
stringToUint8Array(encodeHeaders(part.headers), "utf-8"),
|
|
47975
|
+
stringToUint8Array(`\r
|
|
47976
|
+
`, "utf-8"),
|
|
47977
|
+
part.body,
|
|
47978
|
+
stringToUint8Array(`\r
|
|
47979
|
+
--${boundary}`, "utf-8")
|
|
47980
|
+
]),
|
|
47981
|
+
stringToUint8Array(`--\r
|
|
47982
|
+
\r
|
|
47983
|
+
`, "utf-8")
|
|
47984
|
+
];
|
|
47985
|
+
const contentLength = getTotalLength(sources);
|
|
47986
|
+
if (contentLength) {
|
|
47987
|
+
request.headers.set("Content-Length", contentLength);
|
|
47988
|
+
}
|
|
47989
|
+
request.body = await concat(sources);
|
|
47990
|
+
}
|
|
47991
|
+
function assertValidBoundary(boundary) {
|
|
47992
|
+
if (boundary.length > maxBoundaryLength) {
|
|
47993
|
+
throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`);
|
|
47994
|
+
}
|
|
47995
|
+
if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) {
|
|
47996
|
+
throw new Error(`Multipart boundary "${boundary}" contains invalid characters`);
|
|
47997
|
+
}
|
|
47998
|
+
}
|
|
47999
|
+
function multipartPolicy() {
|
|
48000
|
+
return {
|
|
48001
|
+
name: multipartPolicyName,
|
|
48002
|
+
async sendRequest(request, next) {
|
|
48003
|
+
if (!request.multipartBody) {
|
|
48004
|
+
return next(request);
|
|
48005
|
+
}
|
|
48006
|
+
if (request.body) {
|
|
48007
|
+
throw new Error("multipartBody and regular body cannot be set at the same time");
|
|
48008
|
+
}
|
|
48009
|
+
let boundary = request.multipartBody.boundary;
|
|
48010
|
+
const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed";
|
|
48011
|
+
const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);
|
|
48012
|
+
if (!parsedHeader) {
|
|
48013
|
+
throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`);
|
|
48014
|
+
}
|
|
48015
|
+
const [, contentType, parsedBoundary] = parsedHeader;
|
|
48016
|
+
if (parsedBoundary && boundary && parsedBoundary !== boundary) {
|
|
48017
|
+
throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`);
|
|
48018
|
+
}
|
|
48019
|
+
boundary ??= parsedBoundary;
|
|
48020
|
+
if (boundary) {
|
|
48021
|
+
assertValidBoundary(boundary);
|
|
48022
|
+
} else {
|
|
48023
|
+
boundary = generateBoundary();
|
|
48024
|
+
}
|
|
48025
|
+
request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`);
|
|
48026
|
+
await buildRequestBody(request, request.multipartBody.parts, boundary);
|
|
48027
|
+
request.multipartBody = undefined;
|
|
48028
|
+
return next(request);
|
|
48029
|
+
}
|
|
48030
|
+
};
|
|
48031
|
+
}
|
|
48032
|
+
var multipartPolicyName = "multipartPolicy", maxBoundaryLength = 70, validBoundaryCharacters;
|
|
48033
|
+
var init_multipartPolicy = __esm(() => {
|
|
48034
|
+
init_concat();
|
|
48035
|
+
validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`);
|
|
48036
|
+
});
|
|
48037
|
+
|
|
47932
48038
|
// node_modules/debug/src/common.js
|
|
47933
48039
|
var require_common = __commonJS((exports, module) => {
|
|
47934
48040
|
function setup(env2) {
|
|
@@ -48343,10 +48449,10 @@ var require_supports_color = __commonJS((exports, module) => {
|
|
|
48343
48449
|
return 3;
|
|
48344
48450
|
}
|
|
48345
48451
|
if ("TERM_PROGRAM" in env2) {
|
|
48346
|
-
const
|
|
48452
|
+
const version7 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
48347
48453
|
switch (env2.TERM_PROGRAM) {
|
|
48348
48454
|
case "iTerm.app":
|
|
48349
|
-
return
|
|
48455
|
+
return version7 >= 3 ? 3 : 2;
|
|
48350
48456
|
case "Apple_Terminal":
|
|
48351
48457
|
return 2;
|
|
48352
48458
|
}
|
|
@@ -49277,19 +49383,38 @@ var init_proxyPolicy = __esm(() => {
|
|
|
49277
49383
|
globalBypassedMap = new Map;
|
|
49278
49384
|
});
|
|
49279
49385
|
|
|
49280
|
-
// node_modules/@typespec/ts-http-runtime/dist/esm/policies/
|
|
49281
|
-
function
|
|
49386
|
+
// node_modules/@typespec/ts-http-runtime/dist/esm/policies/redirectPolicy.js
|
|
49387
|
+
function redirectPolicy(options = {}) {
|
|
49388
|
+
const { maxRetries = 20 } = options;
|
|
49282
49389
|
return {
|
|
49283
|
-
name:
|
|
49284
|
-
|
|
49285
|
-
|
|
49286
|
-
|
|
49287
|
-
}
|
|
49288
|
-
return next(req);
|
|
49390
|
+
name: redirectPolicyName,
|
|
49391
|
+
async sendRequest(request, next) {
|
|
49392
|
+
const response = await next(request);
|
|
49393
|
+
return handleRedirect(next, response, maxRetries);
|
|
49289
49394
|
}
|
|
49290
49395
|
};
|
|
49291
49396
|
}
|
|
49292
|
-
|
|
49397
|
+
async function handleRedirect(next, response, maxRetries, currentRetries = 0) {
|
|
49398
|
+
const { request, status, headers } = response;
|
|
49399
|
+
const locationHeader = headers.get("location");
|
|
49400
|
+
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) {
|
|
49401
|
+
const url2 = new URL(locationHeader, request.url);
|
|
49402
|
+
request.url = url2.toString();
|
|
49403
|
+
if (status === 303) {
|
|
49404
|
+
request.method = "GET";
|
|
49405
|
+
request.headers.delete("Content-Length");
|
|
49406
|
+
delete request.body;
|
|
49407
|
+
}
|
|
49408
|
+
request.headers.delete("Authorization");
|
|
49409
|
+
const res = await next(request);
|
|
49410
|
+
return handleRedirect(next, res, maxRetries, currentRetries + 1);
|
|
49411
|
+
}
|
|
49412
|
+
return response;
|
|
49413
|
+
}
|
|
49414
|
+
var redirectPolicyName = "redirectPolicy", allowedRedirect;
|
|
49415
|
+
var init_redirectPolicy = __esm(() => {
|
|
49416
|
+
allowedRedirect = ["GET", "HEAD"];
|
|
49417
|
+
});
|
|
49293
49418
|
|
|
49294
49419
|
// node_modules/@typespec/ts-http-runtime/dist/esm/policies/tlsPolicy.js
|
|
49295
49420
|
function tlsPolicy(tlsSettings) {
|
|
@@ -49305,195 +49430,6 @@ function tlsPolicy(tlsSettings) {
|
|
|
49305
49430
|
}
|
|
49306
49431
|
var tlsPolicyName = "tlsPolicy";
|
|
49307
49432
|
|
|
49308
|
-
// node_modules/@typespec/ts-http-runtime/dist/esm/util/typeGuards.js
|
|
49309
|
-
function isBlob(x) {
|
|
49310
|
-
return typeof x.stream === "function";
|
|
49311
|
-
}
|
|
49312
|
-
|
|
49313
|
-
// node_modules/@typespec/ts-http-runtime/dist/esm/util/concat.js
|
|
49314
|
-
import { Readable } from "stream";
|
|
49315
|
-
async function* streamAsyncIterator() {
|
|
49316
|
-
const reader = this.getReader();
|
|
49317
|
-
try {
|
|
49318
|
-
while (true) {
|
|
49319
|
-
const { done, value } = await reader.read();
|
|
49320
|
-
if (done) {
|
|
49321
|
-
return;
|
|
49322
|
-
}
|
|
49323
|
-
yield value;
|
|
49324
|
-
}
|
|
49325
|
-
} finally {
|
|
49326
|
-
reader.releaseLock();
|
|
49327
|
-
}
|
|
49328
|
-
}
|
|
49329
|
-
function makeAsyncIterable(webStream) {
|
|
49330
|
-
if (!webStream[Symbol.asyncIterator]) {
|
|
49331
|
-
webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream);
|
|
49332
|
-
}
|
|
49333
|
-
if (!webStream.values) {
|
|
49334
|
-
webStream.values = streamAsyncIterator.bind(webStream);
|
|
49335
|
-
}
|
|
49336
|
-
}
|
|
49337
|
-
function ensureNodeStream(stream2) {
|
|
49338
|
-
if (stream2 instanceof ReadableStream) {
|
|
49339
|
-
makeAsyncIterable(stream2);
|
|
49340
|
-
return Readable.fromWeb(stream2);
|
|
49341
|
-
} else {
|
|
49342
|
-
return stream2;
|
|
49343
|
-
}
|
|
49344
|
-
}
|
|
49345
|
-
function toStream(source) {
|
|
49346
|
-
if (source instanceof Uint8Array) {
|
|
49347
|
-
return Readable.from(Buffer.from(source));
|
|
49348
|
-
} else if (isBlob(source)) {
|
|
49349
|
-
return ensureNodeStream(source.stream());
|
|
49350
|
-
} else {
|
|
49351
|
-
return ensureNodeStream(source);
|
|
49352
|
-
}
|
|
49353
|
-
}
|
|
49354
|
-
async function concat(sources) {
|
|
49355
|
-
return function() {
|
|
49356
|
-
const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream);
|
|
49357
|
-
return Readable.from(async function* () {
|
|
49358
|
-
for (const stream2 of streams) {
|
|
49359
|
-
for await (const chunk of stream2) {
|
|
49360
|
-
yield chunk;
|
|
49361
|
-
}
|
|
49362
|
-
}
|
|
49363
|
-
}());
|
|
49364
|
-
};
|
|
49365
|
-
}
|
|
49366
|
-
var init_concat = () => {};
|
|
49367
|
-
|
|
49368
|
-
// node_modules/@typespec/ts-http-runtime/dist/esm/policies/multipartPolicy.js
|
|
49369
|
-
function generateBoundary() {
|
|
49370
|
-
return `----AzSDKFormBoundary${randomUUID()}`;
|
|
49371
|
-
}
|
|
49372
|
-
function encodeHeaders(headers) {
|
|
49373
|
-
let result = "";
|
|
49374
|
-
for (const [key, value] of headers) {
|
|
49375
|
-
result += `${key}: ${value}\r
|
|
49376
|
-
`;
|
|
49377
|
-
}
|
|
49378
|
-
return result;
|
|
49379
|
-
}
|
|
49380
|
-
function getLength(source) {
|
|
49381
|
-
if (source instanceof Uint8Array) {
|
|
49382
|
-
return source.byteLength;
|
|
49383
|
-
} else if (isBlob(source)) {
|
|
49384
|
-
return source.size === -1 ? undefined : source.size;
|
|
49385
|
-
} else {
|
|
49386
|
-
return;
|
|
49387
|
-
}
|
|
49388
|
-
}
|
|
49389
|
-
function getTotalLength(sources) {
|
|
49390
|
-
let total = 0;
|
|
49391
|
-
for (const source of sources) {
|
|
49392
|
-
const partLength = getLength(source);
|
|
49393
|
-
if (partLength === undefined) {
|
|
49394
|
-
return;
|
|
49395
|
-
} else {
|
|
49396
|
-
total += partLength;
|
|
49397
|
-
}
|
|
49398
|
-
}
|
|
49399
|
-
return total;
|
|
49400
|
-
}
|
|
49401
|
-
async function buildRequestBody(request, parts, boundary) {
|
|
49402
|
-
const sources = [
|
|
49403
|
-
stringToUint8Array(`--${boundary}`, "utf-8"),
|
|
49404
|
-
...parts.flatMap((part) => [
|
|
49405
|
-
stringToUint8Array(`\r
|
|
49406
|
-
`, "utf-8"),
|
|
49407
|
-
stringToUint8Array(encodeHeaders(part.headers), "utf-8"),
|
|
49408
|
-
stringToUint8Array(`\r
|
|
49409
|
-
`, "utf-8"),
|
|
49410
|
-
part.body,
|
|
49411
|
-
stringToUint8Array(`\r
|
|
49412
|
-
--${boundary}`, "utf-8")
|
|
49413
|
-
]),
|
|
49414
|
-
stringToUint8Array(`--\r
|
|
49415
|
-
\r
|
|
49416
|
-
`, "utf-8")
|
|
49417
|
-
];
|
|
49418
|
-
const contentLength = getTotalLength(sources);
|
|
49419
|
-
if (contentLength) {
|
|
49420
|
-
request.headers.set("Content-Length", contentLength);
|
|
49421
|
-
}
|
|
49422
|
-
request.body = await concat(sources);
|
|
49423
|
-
}
|
|
49424
|
-
function assertValidBoundary(boundary) {
|
|
49425
|
-
if (boundary.length > maxBoundaryLength) {
|
|
49426
|
-
throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`);
|
|
49427
|
-
}
|
|
49428
|
-
if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) {
|
|
49429
|
-
throw new Error(`Multipart boundary "${boundary}" contains invalid characters`);
|
|
49430
|
-
}
|
|
49431
|
-
}
|
|
49432
|
-
function multipartPolicy() {
|
|
49433
|
-
return {
|
|
49434
|
-
name: multipartPolicyName,
|
|
49435
|
-
async sendRequest(request, next) {
|
|
49436
|
-
if (!request.multipartBody) {
|
|
49437
|
-
return next(request);
|
|
49438
|
-
}
|
|
49439
|
-
if (request.body) {
|
|
49440
|
-
throw new Error("multipartBody and regular body cannot be set at the same time");
|
|
49441
|
-
}
|
|
49442
|
-
let boundary = request.multipartBody.boundary;
|
|
49443
|
-
const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed";
|
|
49444
|
-
const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);
|
|
49445
|
-
if (!parsedHeader) {
|
|
49446
|
-
throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`);
|
|
49447
|
-
}
|
|
49448
|
-
const [, contentType, parsedBoundary] = parsedHeader;
|
|
49449
|
-
if (parsedBoundary && boundary && parsedBoundary !== boundary) {
|
|
49450
|
-
throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`);
|
|
49451
|
-
}
|
|
49452
|
-
boundary ??= parsedBoundary;
|
|
49453
|
-
if (boundary) {
|
|
49454
|
-
assertValidBoundary(boundary);
|
|
49455
|
-
} else {
|
|
49456
|
-
boundary = generateBoundary();
|
|
49457
|
-
}
|
|
49458
|
-
request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`);
|
|
49459
|
-
await buildRequestBody(request, request.multipartBody.parts, boundary);
|
|
49460
|
-
request.multipartBody = undefined;
|
|
49461
|
-
return next(request);
|
|
49462
|
-
}
|
|
49463
|
-
};
|
|
49464
|
-
}
|
|
49465
|
-
var multipartPolicyName = "multipartPolicy", maxBoundaryLength = 70, validBoundaryCharacters;
|
|
49466
|
-
var init_multipartPolicy = __esm(() => {
|
|
49467
|
-
init_concat();
|
|
49468
|
-
validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`);
|
|
49469
|
-
});
|
|
49470
|
-
|
|
49471
|
-
// node_modules/@typespec/ts-http-runtime/dist/esm/index.js
|
|
49472
|
-
var init_esm5 = __esm(() => {
|
|
49473
|
-
init_httpHeaders();
|
|
49474
|
-
init_pipelineRequest();
|
|
49475
|
-
init_pipeline();
|
|
49476
|
-
init_restError();
|
|
49477
|
-
init_defaultHttpClient();
|
|
49478
|
-
init_schemes();
|
|
49479
|
-
init_oauth2Flows();
|
|
49480
|
-
});
|
|
49481
|
-
|
|
49482
|
-
// node_modules/@azure/core-rest-pipeline/dist/esm/pipeline.js
|
|
49483
|
-
function createEmptyPipeline2() {
|
|
49484
|
-
return createEmptyPipeline();
|
|
49485
|
-
}
|
|
49486
|
-
var init_pipeline2 = __esm(() => {
|
|
49487
|
-
init_esm5();
|
|
49488
|
-
});
|
|
49489
|
-
|
|
49490
|
-
// node_modules/@azure/core-rest-pipeline/dist/esm/log.js
|
|
49491
|
-
var logger6;
|
|
49492
|
-
var init_log4 = __esm(() => {
|
|
49493
|
-
init_esm();
|
|
49494
|
-
logger6 = createClientLogger2("core-rest-pipeline");
|
|
49495
|
-
});
|
|
49496
|
-
|
|
49497
49433
|
// node_modules/@typespec/ts-http-runtime/dist/esm/policies/internal.js
|
|
49498
49434
|
var init_internal3 = __esm(() => {
|
|
49499
49435
|
init_defaultRetryPolicy();
|
|
@@ -49574,10 +49510,10 @@ var init_userAgent = __esm(() => {
|
|
|
49574
49510
|
});
|
|
49575
49511
|
|
|
49576
49512
|
// node_modules/@azure/core-rest-pipeline/dist/esm/policies/userAgentPolicy.js
|
|
49577
|
-
function
|
|
49513
|
+
function userAgentPolicy2(options = {}) {
|
|
49578
49514
|
const userAgentValue = getUserAgentValue(options.userAgentPrefix);
|
|
49579
49515
|
return {
|
|
49580
|
-
name:
|
|
49516
|
+
name: userAgentPolicyName2,
|
|
49581
49517
|
async sendRequest(request, next) {
|
|
49582
49518
|
if (!request.headers.has(UserAgentHeaderName)) {
|
|
49583
49519
|
request.headers.set(UserAgentHeaderName, await userAgentValue);
|
|
@@ -49586,7 +49522,7 @@ function userAgentPolicy(options = {}) {
|
|
|
49586
49522
|
}
|
|
49587
49523
|
};
|
|
49588
49524
|
}
|
|
49589
|
-
var UserAgentHeaderName,
|
|
49525
|
+
var UserAgentHeaderName, userAgentPolicyName2 = "userAgentPolicy";
|
|
49590
49526
|
var init_userAgentPolicy = __esm(() => {
|
|
49591
49527
|
init_userAgent();
|
|
49592
49528
|
UserAgentHeaderName = getUserAgentHeaderName();
|
|
@@ -49875,7 +49811,7 @@ function createPipelineFromOptions(options) {
|
|
|
49875
49811
|
}
|
|
49876
49812
|
pipeline.addPolicy(wrapAbortSignalLikePolicy());
|
|
49877
49813
|
pipeline.addPolicy(formDataPolicy2(), { beforePolicies: [multipartPolicyName2] });
|
|
49878
|
-
pipeline.addPolicy(
|
|
49814
|
+
pipeline.addPolicy(userAgentPolicy2(options.userAgentOptions));
|
|
49879
49815
|
pipeline.addPolicy(setClientRequestIdPolicy(options.telemetryOptions?.clientRequestIdHeaderName));
|
|
49880
49816
|
pipeline.addPolicy(multipartPolicy2(), { afterPhase: "Deserialize" });
|
|
49881
49817
|
pipeline.addPolicy(defaultRetryPolicy2(options.retryOptions), { phase: "Retry" });
|
|
@@ -50215,6 +50151,93 @@ var init_esm6 = __esm(() => {
|
|
|
50215
50151
|
init_bearerTokenAuthenticationPolicy();
|
|
50216
50152
|
});
|
|
50217
50153
|
|
|
50154
|
+
// node_modules/@azure/core-client/dist/esm/interfaces.js
|
|
50155
|
+
var XML_ATTRKEY = "$", XML_CHARKEY = "_";
|
|
50156
|
+
|
|
50157
|
+
// node_modules/@azure/core-client/dist/esm/utils.js
|
|
50158
|
+
function isPrimitiveBody(value, mapperTypeName) {
|
|
50159
|
+
return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === undefined || value === null);
|
|
50160
|
+
}
|
|
50161
|
+
function handleNullableResponseAndWrappableBody(responseObject) {
|
|
50162
|
+
const combinedHeadersAndBody = {
|
|
50163
|
+
...responseObject.headers,
|
|
50164
|
+
...responseObject.body
|
|
50165
|
+
};
|
|
50166
|
+
if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) {
|
|
50167
|
+
return responseObject.shouldWrapBody ? { body: null } : null;
|
|
50168
|
+
} else {
|
|
50169
|
+
return responseObject.shouldWrapBody ? {
|
|
50170
|
+
...responseObject.headers,
|
|
50171
|
+
body: responseObject.body
|
|
50172
|
+
} : combinedHeadersAndBody;
|
|
50173
|
+
}
|
|
50174
|
+
}
|
|
50175
|
+
function flattenResponse(fullResponse, responseSpec) {
|
|
50176
|
+
const parsedHeaders = fullResponse.parsedHeaders;
|
|
50177
|
+
if (fullResponse.request.method === "HEAD") {
|
|
50178
|
+
return {
|
|
50179
|
+
...parsedHeaders,
|
|
50180
|
+
body: fullResponse.parsedBody
|
|
50181
|
+
};
|
|
50182
|
+
}
|
|
50183
|
+
const bodyMapper = responseSpec && responseSpec.bodyMapper;
|
|
50184
|
+
const isNullable = Boolean(bodyMapper?.nullable);
|
|
50185
|
+
const expectedBodyTypeName = bodyMapper?.type.name;
|
|
50186
|
+
if (expectedBodyTypeName === "Stream") {
|
|
50187
|
+
return {
|
|
50188
|
+
...parsedHeaders,
|
|
50189
|
+
blobBody: fullResponse.blobBody,
|
|
50190
|
+
readableStreamBody: fullResponse.readableStreamBody
|
|
50191
|
+
};
|
|
50192
|
+
}
|
|
50193
|
+
const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {};
|
|
50194
|
+
const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === "");
|
|
50195
|
+
if (expectedBodyTypeName === "Sequence" || isPageableResponse) {
|
|
50196
|
+
const arrayResponse = fullResponse.parsedBody ?? [];
|
|
50197
|
+
for (const key of Object.keys(modelProperties)) {
|
|
50198
|
+
if (modelProperties[key].serializedName) {
|
|
50199
|
+
arrayResponse[key] = fullResponse.parsedBody?.[key];
|
|
50200
|
+
}
|
|
50201
|
+
}
|
|
50202
|
+
if (parsedHeaders) {
|
|
50203
|
+
for (const key of Object.keys(parsedHeaders)) {
|
|
50204
|
+
arrayResponse[key] = parsedHeaders[key];
|
|
50205
|
+
}
|
|
50206
|
+
}
|
|
50207
|
+
return isNullable && !fullResponse.parsedBody && !parsedHeaders && Object.getOwnPropertyNames(modelProperties).length === 0 ? null : arrayResponse;
|
|
50208
|
+
}
|
|
50209
|
+
return handleNullableResponseAndWrappableBody({
|
|
50210
|
+
body: fullResponse.parsedBody,
|
|
50211
|
+
headers: parsedHeaders,
|
|
50212
|
+
hasNullableType: isNullable,
|
|
50213
|
+
shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName)
|
|
50214
|
+
});
|
|
50215
|
+
}
|
|
50216
|
+
var init_utils5 = () => {};
|
|
50217
|
+
|
|
50218
|
+
// node_modules/@azure/core-client/dist/esm/serializer.js
|
|
50219
|
+
var MapperTypeNames;
|
|
50220
|
+
var init_serializer = __esm(() => {
|
|
50221
|
+
MapperTypeNames = {
|
|
50222
|
+
Base64Url: "Base64Url",
|
|
50223
|
+
Boolean: "Boolean",
|
|
50224
|
+
ByteArray: "ByteArray",
|
|
50225
|
+
Composite: "Composite",
|
|
50226
|
+
Date: "Date",
|
|
50227
|
+
DateTime: "DateTime",
|
|
50228
|
+
DateTimeRfc1123: "DateTimeRfc1123",
|
|
50229
|
+
Dictionary: "Dictionary",
|
|
50230
|
+
Enum: "Enum",
|
|
50231
|
+
Number: "Number",
|
|
50232
|
+
Object: "Object",
|
|
50233
|
+
Sequence: "Sequence",
|
|
50234
|
+
String: "String",
|
|
50235
|
+
Stream: "Stream",
|
|
50236
|
+
TimeSpan: "TimeSpan",
|
|
50237
|
+
UnixTime: "UnixTime"
|
|
50238
|
+
};
|
|
50239
|
+
});
|
|
50240
|
+
|
|
50218
50241
|
// node_modules/@azure/core-client/dist/commonjs/state.js
|
|
50219
50242
|
var require_state2 = __commonJS((exports) => {
|
|
50220
50243
|
Object.defineProperty(exports, "__esModule", { value: true });
|