@ms-cloudpack/remote-cache 0.11.55 → 0.11.56
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/NOTICE.txt +36 -14
- package/dist/{AzureRemoteCacheClient-UD3RM6RT.js → AzureRemoteCacheClient-2QBRLTWH.js} +899 -665
- package/dist/{chunk-GSSWZTS6.js → chunk-IGWDIFPL.js} +97 -28
- package/dist/{chunk-ZYLGEKCT.js → chunk-JEBJUXPQ.js} +668 -559
- package/dist/{getCredential-TYTELKFM.js → getCredential-CYQ5LCNH.js} +115 -93
- package/dist/index.js +1533 -1126
- package/package.json +2 -2
|
@@ -15,17 +15,18 @@ import {
|
|
|
15
15
|
require_state,
|
|
16
16
|
require_state2,
|
|
17
17
|
tslib_es6_exports
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IGWDIFPL.js";
|
|
19
19
|
import {
|
|
20
20
|
__commonJS,
|
|
21
21
|
__name,
|
|
22
|
+
__publicField,
|
|
22
23
|
__require,
|
|
23
24
|
__toCommonJS
|
|
24
25
|
} from "./chunk-G5MAFA37.js";
|
|
25
26
|
|
|
26
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
27
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/random.js
|
|
27
28
|
var require_random = __commonJS({
|
|
28
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
29
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/random.js"(exports) {
|
|
29
30
|
"use strict";
|
|
30
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
32
|
exports.getRandomIntegerInclusive = getRandomIntegerInclusive;
|
|
@@ -39,9 +40,9 @@ var require_random = __commonJS({
|
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
42
|
|
|
42
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
43
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/delay.js
|
|
43
44
|
var require_delay = __commonJS({
|
|
44
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
45
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/delay.js"(exports) {
|
|
45
46
|
"use strict";
|
|
46
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
48
|
exports.calculateRetryDelay = calculateRetryDelay;
|
|
@@ -56,9 +57,9 @@ var require_delay = __commonJS({
|
|
|
56
57
|
}
|
|
57
58
|
});
|
|
58
59
|
|
|
59
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
60
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/object.js
|
|
60
61
|
var require_object = __commonJS({
|
|
61
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
62
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/object.js"(exports) {
|
|
62
63
|
"use strict";
|
|
63
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
64
65
|
exports.isObject = isObject;
|
|
@@ -69,9 +70,9 @@ var require_object = __commonJS({
|
|
|
69
70
|
}
|
|
70
71
|
});
|
|
71
72
|
|
|
72
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
73
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/error.js
|
|
73
74
|
var require_error = __commonJS({
|
|
74
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
75
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/error.js"(exports) {
|
|
75
76
|
"use strict";
|
|
76
77
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
77
78
|
exports.isError = isError;
|
|
@@ -88,9 +89,9 @@ var require_error = __commonJS({
|
|
|
88
89
|
}
|
|
89
90
|
});
|
|
90
91
|
|
|
91
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
92
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/sha256.js
|
|
92
93
|
var require_sha256 = __commonJS({
|
|
93
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
94
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/sha256.js"(exports) {
|
|
94
95
|
"use strict";
|
|
95
96
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96
97
|
exports.computeSha256Hmac = computeSha256Hmac;
|
|
@@ -108,15 +109,15 @@ var require_sha256 = __commonJS({
|
|
|
108
109
|
}
|
|
109
110
|
});
|
|
110
111
|
|
|
111
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
112
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/uuidUtils.js
|
|
112
113
|
var require_uuidUtils = __commonJS({
|
|
113
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
114
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/uuidUtils.js"(exports) {
|
|
114
115
|
"use strict";
|
|
115
|
-
var _a;
|
|
116
116
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
117
117
|
exports.randomUUID = randomUUID;
|
|
118
118
|
var node_crypto_1 = __require("node:crypto");
|
|
119
|
-
var
|
|
119
|
+
var _a;
|
|
120
|
+
var uuidFunction = typeof ((_a = globalThis == null ? void 0 : globalThis.crypto) == null ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : node_crypto_1.randomUUID;
|
|
120
121
|
function randomUUID() {
|
|
121
122
|
return uuidFunction();
|
|
122
123
|
}
|
|
@@ -124,29 +125,27 @@ var require_uuidUtils = __commonJS({
|
|
|
124
125
|
}
|
|
125
126
|
});
|
|
126
127
|
|
|
127
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
128
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/checkEnvironment.js
|
|
128
129
|
var require_checkEnvironment = __commonJS({
|
|
129
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
130
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/checkEnvironment.js"(exports) {
|
|
130
131
|
"use strict";
|
|
131
|
-
var _a;
|
|
132
|
-
var _b;
|
|
133
|
-
var _c;
|
|
134
|
-
var _d;
|
|
135
132
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
136
133
|
exports.isReactNative = exports.isNodeRuntime = exports.isNodeLike = exports.isBun = exports.isDeno = exports.isWebWorker = exports.isBrowser = void 0;
|
|
137
134
|
exports.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
138
|
-
|
|
135
|
+
var _a, _b, _c;
|
|
136
|
+
exports.isWebWorker = typeof self === "object" && typeof (self == null ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) == null ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) == null ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) == null ? void 0 : _c.name) === "SharedWorkerGlobalScope");
|
|
139
137
|
exports.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
|
|
140
138
|
exports.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
|
|
141
|
-
|
|
139
|
+
var _a2;
|
|
140
|
+
exports.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_a2 = globalThis.process.versions) == null ? void 0 : _a2.node);
|
|
142
141
|
exports.isNodeRuntime = exports.isNodeLike && !exports.isBun && !exports.isDeno;
|
|
143
|
-
exports.isReactNative = typeof navigator !== "undefined" && (navigator
|
|
142
|
+
exports.isReactNative = typeof navigator !== "undefined" && (navigator == null ? void 0 : navigator.product) === "ReactNative";
|
|
144
143
|
}
|
|
145
144
|
});
|
|
146
145
|
|
|
147
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
146
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/bytesEncoding.js
|
|
148
147
|
var require_bytesEncoding = __commonJS({
|
|
149
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
148
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/bytesEncoding.js"(exports) {
|
|
150
149
|
"use strict";
|
|
151
150
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
152
151
|
exports.uint8ArrayToString = uint8ArrayToString;
|
|
@@ -162,9 +161,9 @@ var require_bytesEncoding = __commonJS({
|
|
|
162
161
|
}
|
|
163
162
|
});
|
|
164
163
|
|
|
165
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
164
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/sanitizer.js
|
|
166
165
|
var require_sanitizer = __commonJS({
|
|
167
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
166
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/sanitizer.js"(exports) {
|
|
168
167
|
"use strict";
|
|
169
168
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
170
169
|
exports.Sanitizer = void 0;
|
|
@@ -213,6 +212,8 @@ var require_sanitizer = __commonJS({
|
|
|
213
212
|
];
|
|
214
213
|
var defaultAllowedQueryParameters = ["api-version"];
|
|
215
214
|
var _Sanitizer = class _Sanitizer {
|
|
215
|
+
allowedHeaderNames;
|
|
216
|
+
allowedQueryParameters;
|
|
216
217
|
constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) {
|
|
217
218
|
allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames);
|
|
218
219
|
allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters);
|
|
@@ -228,7 +229,11 @@ var require_sanitizer = __commonJS({
|
|
|
228
229
|
const seen = /* @__PURE__ */ new Set();
|
|
229
230
|
return JSON.stringify(obj, (key, value) => {
|
|
230
231
|
if (value instanceof Error) {
|
|
231
|
-
return
|
|
232
|
+
return {
|
|
233
|
+
...value,
|
|
234
|
+
name: value.name,
|
|
235
|
+
message: value.message
|
|
236
|
+
};
|
|
232
237
|
}
|
|
233
238
|
if (key === "headers") {
|
|
234
239
|
return this.sanitizeHeaders(value);
|
|
@@ -303,9 +308,9 @@ var require_sanitizer = __commonJS({
|
|
|
303
308
|
}
|
|
304
309
|
});
|
|
305
310
|
|
|
306
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
311
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/internal.js
|
|
307
312
|
var require_internal = __commonJS({
|
|
308
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
313
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/internal.js"(exports) {
|
|
309
314
|
"use strict";
|
|
310
315
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
311
316
|
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;
|
|
@@ -372,9 +377,9 @@ var require_internal = __commonJS({
|
|
|
372
377
|
}
|
|
373
378
|
});
|
|
374
379
|
|
|
375
|
-
// ../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
380
|
+
// ../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/aborterUtils.js
|
|
376
381
|
var require_aborterUtils = __commonJS({
|
|
377
|
-
"../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
382
|
+
"../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/aborterUtils.js"(exports) {
|
|
378
383
|
"use strict";
|
|
379
384
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
380
385
|
exports.cancelablePromiseRace = cancelablePromiseRace;
|
|
@@ -385,12 +390,12 @@ var require_aborterUtils = __commonJS({
|
|
|
385
390
|
aborter.abort();
|
|
386
391
|
}
|
|
387
392
|
__name(abortHandler, "abortHandler");
|
|
388
|
-
(_a = options
|
|
393
|
+
(_a = options == null ? void 0 : options.abortSignal) == null ? void 0 : _a.addEventListener("abort", abortHandler);
|
|
389
394
|
try {
|
|
390
395
|
return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal })));
|
|
391
396
|
} finally {
|
|
392
397
|
aborter.abort();
|
|
393
|
-
(_b = options
|
|
398
|
+
(_b = options == null ? void 0 : options.abortSignal) == null ? void 0 : _b.removeEventListener("abort", abortHandler);
|
|
394
399
|
}
|
|
395
400
|
}
|
|
396
401
|
__name(cancelablePromiseRace, "cancelablePromiseRace");
|
|
@@ -428,31 +433,31 @@ var require_commonjs2 = __commonJS({
|
|
|
428
433
|
}
|
|
429
434
|
});
|
|
430
435
|
|
|
431
|
-
// ../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
436
|
+
// ../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/createAbortablePromise.js
|
|
432
437
|
var require_createAbortablePromise = __commonJS({
|
|
433
|
-
"../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
438
|
+
"../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/createAbortablePromise.js"(exports) {
|
|
434
439
|
"use strict";
|
|
435
440
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
436
441
|
exports.createAbortablePromise = createAbortablePromise;
|
|
437
442
|
var abort_controller_1 = require_commonjs2();
|
|
438
443
|
function createAbortablePromise(buildPromise, options) {
|
|
439
|
-
const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options
|
|
444
|
+
const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {};
|
|
440
445
|
return new Promise((resolve, reject) => {
|
|
441
446
|
function rejectOnAbort() {
|
|
442
|
-
reject(new abort_controller_1.AbortError(abortErrorMsg
|
|
447
|
+
reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted."));
|
|
443
448
|
}
|
|
444
449
|
__name(rejectOnAbort, "rejectOnAbort");
|
|
445
450
|
function removeListeners() {
|
|
446
|
-
abortSignal
|
|
451
|
+
abortSignal == null ? void 0 : abortSignal.removeEventListener("abort", onAbort);
|
|
447
452
|
}
|
|
448
453
|
__name(removeListeners, "removeListeners");
|
|
449
454
|
function onAbort() {
|
|
450
|
-
cleanupBeforeAbort
|
|
455
|
+
cleanupBeforeAbort == null ? void 0 : cleanupBeforeAbort();
|
|
451
456
|
removeListeners();
|
|
452
457
|
rejectOnAbort();
|
|
453
458
|
}
|
|
454
459
|
__name(onAbort, "onAbort");
|
|
455
|
-
if (abortSignal
|
|
460
|
+
if (abortSignal == null ? void 0 : abortSignal.aborted) {
|
|
456
461
|
return rejectOnAbort();
|
|
457
462
|
}
|
|
458
463
|
try {
|
|
@@ -466,16 +471,16 @@ var require_createAbortablePromise = __commonJS({
|
|
|
466
471
|
} catch (err) {
|
|
467
472
|
reject(err);
|
|
468
473
|
}
|
|
469
|
-
abortSignal
|
|
474
|
+
abortSignal == null ? void 0 : abortSignal.addEventListener("abort", onAbort);
|
|
470
475
|
});
|
|
471
476
|
}
|
|
472
477
|
__name(createAbortablePromise, "createAbortablePromise");
|
|
473
478
|
}
|
|
474
479
|
});
|
|
475
480
|
|
|
476
|
-
// ../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
481
|
+
// ../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/delay.js
|
|
477
482
|
var require_delay2 = __commonJS({
|
|
478
|
-
"../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
483
|
+
"../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/delay.js"(exports) {
|
|
479
484
|
"use strict";
|
|
480
485
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
481
486
|
exports.delay = delay;
|
|
@@ -485,13 +490,13 @@ var require_delay2 = __commonJS({
|
|
|
485
490
|
var StandardAbortMessage = "The delay was aborted.";
|
|
486
491
|
function delay(timeInMs, options) {
|
|
487
492
|
let token;
|
|
488
|
-
const { abortSignal, abortErrorMsg } = options
|
|
493
|
+
const { abortSignal, abortErrorMsg } = options ?? {};
|
|
489
494
|
return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve) => {
|
|
490
495
|
token = setTimeout(resolve, timeInMs);
|
|
491
496
|
}, {
|
|
492
497
|
cleanupBeforeAbort: /* @__PURE__ */ __name(() => clearTimeout(token), "cleanupBeforeAbort"),
|
|
493
498
|
abortSignal,
|
|
494
|
-
abortErrorMsg: abortErrorMsg
|
|
499
|
+
abortErrorMsg: abortErrorMsg ?? StandardAbortMessage
|
|
495
500
|
});
|
|
496
501
|
}
|
|
497
502
|
__name(delay, "delay");
|
|
@@ -505,9 +510,9 @@ var require_delay2 = __commonJS({
|
|
|
505
510
|
}
|
|
506
511
|
});
|
|
507
512
|
|
|
508
|
-
// ../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
513
|
+
// ../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/error.js
|
|
509
514
|
var require_error2 = __commonJS({
|
|
510
|
-
"../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
515
|
+
"../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/error.js"(exports) {
|
|
511
516
|
"use strict";
|
|
512
517
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
513
518
|
exports.getErrorMessage = getErrorMessage;
|
|
@@ -533,9 +538,9 @@ var require_error2 = __commonJS({
|
|
|
533
538
|
}
|
|
534
539
|
});
|
|
535
540
|
|
|
536
|
-
// ../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
541
|
+
// ../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/typeGuards.js
|
|
537
542
|
var require_typeGuards = __commonJS({
|
|
538
|
-
"../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
543
|
+
"../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/typeGuards.js"(exports) {
|
|
539
544
|
"use strict";
|
|
540
545
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
541
546
|
exports.isDefined = isDefined;
|
|
@@ -564,9 +569,9 @@ var require_typeGuards = __commonJS({
|
|
|
564
569
|
}
|
|
565
570
|
});
|
|
566
571
|
|
|
567
|
-
// ../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
572
|
+
// ../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/index.js
|
|
568
573
|
var require_commonjs3 = __commonJS({
|
|
569
|
-
"../../node_modules/.store/@azure-core-util-npm-1.13.
|
|
574
|
+
"../../node_modules/.store/@azure-core-util-npm-1.13.1-f6d65e92ea/package/dist/commonjs/index.js"(exports) {
|
|
570
575
|
"use strict";
|
|
571
576
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
572
577
|
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;
|
|
@@ -654,9 +659,9 @@ var require_commonjs3 = __commonJS({
|
|
|
654
659
|
}
|
|
655
660
|
});
|
|
656
661
|
|
|
657
|
-
// ../../node_modules/.store/@azure-core-tracing-npm-1.3.
|
|
662
|
+
// ../../node_modules/.store/@azure-core-tracing-npm-1.3.1-eb2949b9c4/package/dist/commonjs/tracingContext.js
|
|
658
663
|
var require_tracingContext = __commonJS({
|
|
659
|
-
"../../node_modules/.store/@azure-core-tracing-npm-1.3.
|
|
664
|
+
"../../node_modules/.store/@azure-core-tracing-npm-1.3.1-eb2949b9c4/package/dist/commonjs/tracingContext.js"(exports) {
|
|
660
665
|
"use strict";
|
|
661
666
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
662
667
|
exports.TracingContextImpl = exports.knownContextKeys = void 0;
|
|
@@ -677,6 +682,7 @@ var require_tracingContext = __commonJS({
|
|
|
677
682
|
}
|
|
678
683
|
__name(createTracingContext, "createTracingContext");
|
|
679
684
|
var _TracingContextImpl = class _TracingContextImpl {
|
|
685
|
+
_contextMap;
|
|
680
686
|
constructor(initialContext) {
|
|
681
687
|
this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map();
|
|
682
688
|
}
|
|
@@ -700,9 +706,9 @@ var require_tracingContext = __commonJS({
|
|
|
700
706
|
}
|
|
701
707
|
});
|
|
702
708
|
|
|
703
|
-
// ../../node_modules/.store/@azure-core-tracing-npm-1.3.
|
|
709
|
+
// ../../node_modules/.store/@azure-core-tracing-npm-1.3.1-eb2949b9c4/package/dist/commonjs/instrumenter.js
|
|
704
710
|
var require_instrumenter = __commonJS({
|
|
705
|
-
"../../node_modules/.store/@azure-core-tracing-npm-1.3.
|
|
711
|
+
"../../node_modules/.store/@azure-core-tracing-npm-1.3.1-eb2949b9c4/package/dist/commonjs/instrumenter.js"(exports) {
|
|
706
712
|
"use strict";
|
|
707
713
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
708
714
|
exports.createDefaultTracingSpan = createDefaultTracingSpan;
|
|
@@ -761,9 +767,9 @@ var require_instrumenter = __commonJS({
|
|
|
761
767
|
}
|
|
762
768
|
});
|
|
763
769
|
|
|
764
|
-
// ../../node_modules/.store/@azure-core-tracing-npm-1.3.
|
|
770
|
+
// ../../node_modules/.store/@azure-core-tracing-npm-1.3.1-eb2949b9c4/package/dist/commonjs/tracingClient.js
|
|
765
771
|
var require_tracingClient = __commonJS({
|
|
766
|
-
"../../node_modules/.store/@azure-core-tracing-npm-1.3.
|
|
772
|
+
"../../node_modules/.store/@azure-core-tracing-npm-1.3.1-eb2949b9c4/package/dist/commonjs/tracingClient.js"(exports) {
|
|
767
773
|
"use strict";
|
|
768
774
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
769
775
|
exports.createTracingClient = createTracingClient;
|
|
@@ -773,7 +779,12 @@ var require_tracingClient = __commonJS({
|
|
|
773
779
|
const { namespace, packageName, packageVersion } = options;
|
|
774
780
|
function startSpan(name, operationOptions, spanOptions) {
|
|
775
781
|
var _a;
|
|
776
|
-
const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name,
|
|
782
|
+
const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, {
|
|
783
|
+
...spanOptions,
|
|
784
|
+
packageName,
|
|
785
|
+
packageVersion,
|
|
786
|
+
tracingContext: (_a = operationOptions == null ? void 0 : operationOptions.tracingOptions) == null ? void 0 : _a.tracingContext
|
|
787
|
+
});
|
|
777
788
|
let tracingContext = startSpanResult.tracingContext;
|
|
778
789
|
const span = startSpanResult.span;
|
|
779
790
|
if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) {
|
|
@@ -781,7 +792,7 @@ var require_tracingClient = __commonJS({
|
|
|
781
792
|
}
|
|
782
793
|
span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace));
|
|
783
794
|
const updatedOptions = Object.assign({}, operationOptions, {
|
|
784
|
-
tracingOptions:
|
|
795
|
+
tracingOptions: { ...operationOptions == null ? void 0 : operationOptions.tracingOptions, tracingContext }
|
|
785
796
|
});
|
|
786
797
|
return {
|
|
787
798
|
span,
|
|
@@ -827,9 +838,9 @@ var require_tracingClient = __commonJS({
|
|
|
827
838
|
}
|
|
828
839
|
});
|
|
829
840
|
|
|
830
|
-
// ../../node_modules/.store/@azure-core-tracing-npm-1.3.
|
|
841
|
+
// ../../node_modules/.store/@azure-core-tracing-npm-1.3.1-eb2949b9c4/package/dist/commonjs/index.js
|
|
831
842
|
var require_commonjs4 = __commonJS({
|
|
832
|
-
"../../node_modules/.store/@azure-core-tracing-npm-1.3.
|
|
843
|
+
"../../node_modules/.store/@azure-core-tracing-npm-1.3.1-eb2949b9c4/package/dist/commonjs/index.js"(exports) {
|
|
833
844
|
"use strict";
|
|
834
845
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
835
846
|
exports.createTracingClient = exports.useInstrumenter = void 0;
|
|
@@ -844,9 +855,9 @@ var require_commonjs4 = __commonJS({
|
|
|
844
855
|
}
|
|
845
856
|
});
|
|
846
857
|
|
|
847
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
858
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/abort-controller/AbortError.js
|
|
848
859
|
var require_AbortError2 = __commonJS({
|
|
849
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
860
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/abort-controller/AbortError.js"(exports) {
|
|
850
861
|
"use strict";
|
|
851
862
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
852
863
|
exports.AbortError = void 0;
|
|
@@ -862,9 +873,9 @@ var require_AbortError2 = __commonJS({
|
|
|
862
873
|
}
|
|
863
874
|
});
|
|
864
875
|
|
|
865
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
876
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/httpHeaders.js
|
|
866
877
|
var require_httpHeaders = __commonJS({
|
|
867
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
878
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/httpHeaders.js"(exports) {
|
|
868
879
|
"use strict";
|
|
869
880
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
870
881
|
exports.createHttpHeaders = createHttpHeaders;
|
|
@@ -879,6 +890,7 @@ var require_httpHeaders = __commonJS({
|
|
|
879
890
|
}
|
|
880
891
|
__name(headerIterator, "headerIterator");
|
|
881
892
|
var _HttpHeadersImpl = class _HttpHeadersImpl {
|
|
893
|
+
_headersMap;
|
|
882
894
|
constructor(rawHeaders) {
|
|
883
895
|
this._headersMap = /* @__PURE__ */ new Map();
|
|
884
896
|
if (rawHeaders) {
|
|
@@ -903,7 +915,7 @@ var require_httpHeaders = __commonJS({
|
|
|
903
915
|
*/
|
|
904
916
|
get(name) {
|
|
905
917
|
var _a;
|
|
906
|
-
return (_a = this._headersMap.get(normalizeName(name)))
|
|
918
|
+
return (_a = this._headersMap.get(normalizeName(name))) == null ? void 0 : _a.value;
|
|
907
919
|
}
|
|
908
920
|
/**
|
|
909
921
|
* Get whether or not this header collection contains a header entry for the provided header name.
|
|
@@ -957,50 +969,68 @@ var require_httpHeaders = __commonJS({
|
|
|
957
969
|
}
|
|
958
970
|
});
|
|
959
971
|
|
|
960
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
972
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/auth/schemes.js
|
|
961
973
|
var require_schemes = __commonJS({
|
|
962
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
974
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/auth/schemes.js"(exports) {
|
|
963
975
|
"use strict";
|
|
964
976
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
965
977
|
}
|
|
966
978
|
});
|
|
967
979
|
|
|
968
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
980
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/auth/oauth2Flows.js
|
|
969
981
|
var require_oauth2Flows = __commonJS({
|
|
970
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
982
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/auth/oauth2Flows.js"(exports) {
|
|
971
983
|
"use strict";
|
|
972
984
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
973
985
|
}
|
|
974
986
|
});
|
|
975
987
|
|
|
976
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
988
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/pipelineRequest.js
|
|
977
989
|
var require_pipelineRequest = __commonJS({
|
|
978
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
990
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/pipelineRequest.js"(exports) {
|
|
979
991
|
"use strict";
|
|
980
992
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
981
993
|
exports.createPipelineRequest = createPipelineRequest;
|
|
982
994
|
var httpHeaders_js_1 = require_httpHeaders();
|
|
983
995
|
var uuidUtils_js_1 = require_uuidUtils();
|
|
984
996
|
var _PipelineRequestImpl = class _PipelineRequestImpl {
|
|
997
|
+
url;
|
|
998
|
+
method;
|
|
999
|
+
headers;
|
|
1000
|
+
timeout;
|
|
1001
|
+
withCredentials;
|
|
1002
|
+
body;
|
|
1003
|
+
multipartBody;
|
|
1004
|
+
formData;
|
|
1005
|
+
streamResponseStatusCodes;
|
|
1006
|
+
enableBrowserStreams;
|
|
1007
|
+
proxySettings;
|
|
1008
|
+
disableKeepAlive;
|
|
1009
|
+
abortSignal;
|
|
1010
|
+
requestId;
|
|
1011
|
+
allowInsecureConnection;
|
|
1012
|
+
onUploadProgress;
|
|
1013
|
+
onDownloadProgress;
|
|
1014
|
+
requestOverrides;
|
|
1015
|
+
authSchemes;
|
|
985
1016
|
constructor(options) {
|
|
986
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
987
1017
|
this.url = options.url;
|
|
988
1018
|
this.body = options.body;
|
|
989
|
-
this.headers =
|
|
990
|
-
this.method =
|
|
991
|
-
this.timeout =
|
|
1019
|
+
this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)();
|
|
1020
|
+
this.method = options.method ?? "GET";
|
|
1021
|
+
this.timeout = options.timeout ?? 0;
|
|
992
1022
|
this.multipartBody = options.multipartBody;
|
|
993
1023
|
this.formData = options.formData;
|
|
994
|
-
this.disableKeepAlive =
|
|
1024
|
+
this.disableKeepAlive = options.disableKeepAlive ?? false;
|
|
995
1025
|
this.proxySettings = options.proxySettings;
|
|
996
1026
|
this.streamResponseStatusCodes = options.streamResponseStatusCodes;
|
|
997
|
-
this.withCredentials =
|
|
1027
|
+
this.withCredentials = options.withCredentials ?? false;
|
|
998
1028
|
this.abortSignal = options.abortSignal;
|
|
999
1029
|
this.onUploadProgress = options.onUploadProgress;
|
|
1000
1030
|
this.onDownloadProgress = options.onDownloadProgress;
|
|
1001
1031
|
this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)();
|
|
1002
|
-
this.allowInsecureConnection =
|
|
1003
|
-
this.enableBrowserStreams =
|
|
1032
|
+
this.allowInsecureConnection = options.allowInsecureConnection ?? false;
|
|
1033
|
+
this.enableBrowserStreams = options.enableBrowserStreams ?? false;
|
|
1004
1034
|
this.requestOverrides = options.requestOverrides;
|
|
1005
1035
|
this.authSchemes = options.authSchemes;
|
|
1006
1036
|
}
|
|
@@ -1014,18 +1044,18 @@ var require_pipelineRequest = __commonJS({
|
|
|
1014
1044
|
}
|
|
1015
1045
|
});
|
|
1016
1046
|
|
|
1017
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1047
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/pipeline.js
|
|
1018
1048
|
var require_pipeline = __commonJS({
|
|
1019
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1049
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/pipeline.js"(exports) {
|
|
1020
1050
|
"use strict";
|
|
1021
1051
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1022
1052
|
exports.createEmptyPipeline = createEmptyPipeline;
|
|
1023
1053
|
var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]);
|
|
1024
1054
|
var _HttpPipeline = class _HttpPipeline {
|
|
1055
|
+
_policies = [];
|
|
1056
|
+
_orderedPolicies;
|
|
1025
1057
|
constructor(policies) {
|
|
1026
|
-
|
|
1027
|
-
this._policies = [];
|
|
1028
|
-
this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : [];
|
|
1058
|
+
this._policies = (policies == null ? void 0 : policies.slice(0)) ?? [];
|
|
1029
1059
|
this._orderedPolicies = void 0;
|
|
1030
1060
|
}
|
|
1031
1061
|
addPolicy(policy, options = {}) {
|
|
@@ -1209,9 +1239,9 @@ var require_pipeline = __commonJS({
|
|
|
1209
1239
|
}
|
|
1210
1240
|
});
|
|
1211
1241
|
|
|
1212
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1242
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/inspect.js
|
|
1213
1243
|
var require_inspect = __commonJS({
|
|
1214
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1244
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/inspect.js"(exports) {
|
|
1215
1245
|
"use strict";
|
|
1216
1246
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1217
1247
|
exports.custom = void 0;
|
|
@@ -1220,9 +1250,9 @@ var require_inspect = __commonJS({
|
|
|
1220
1250
|
}
|
|
1221
1251
|
});
|
|
1222
1252
|
|
|
1223
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1253
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/restError.js
|
|
1224
1254
|
var require_restError = __commonJS({
|
|
1225
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1255
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/restError.js"(exports) {
|
|
1226
1256
|
"use strict";
|
|
1227
1257
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1228
1258
|
exports.RestError = void 0;
|
|
@@ -1232,17 +1262,48 @@ var require_restError = __commonJS({
|
|
|
1232
1262
|
var sanitizer_js_1 = require_sanitizer();
|
|
1233
1263
|
var errorSanitizer = new sanitizer_js_1.Sanitizer();
|
|
1234
1264
|
var _RestError = class _RestError extends Error {
|
|
1265
|
+
/**
|
|
1266
|
+
* The code of the error itself (use statics on RestError if possible.)
|
|
1267
|
+
*/
|
|
1268
|
+
code;
|
|
1269
|
+
/**
|
|
1270
|
+
* The HTTP status code of the request (if applicable.)
|
|
1271
|
+
*/
|
|
1272
|
+
statusCode;
|
|
1273
|
+
/**
|
|
1274
|
+
* The request that was made.
|
|
1275
|
+
* This property is non-enumerable.
|
|
1276
|
+
*/
|
|
1277
|
+
request;
|
|
1278
|
+
/**
|
|
1279
|
+
* The response received (if any.)
|
|
1280
|
+
* This property is non-enumerable.
|
|
1281
|
+
*/
|
|
1282
|
+
response;
|
|
1283
|
+
/**
|
|
1284
|
+
* Bonus property set by the throw site.
|
|
1285
|
+
*/
|
|
1286
|
+
details;
|
|
1235
1287
|
constructor(message, options = {}) {
|
|
1288
|
+
var _a;
|
|
1236
1289
|
super(message);
|
|
1237
1290
|
this.name = "RestError";
|
|
1238
1291
|
this.code = options.code;
|
|
1239
1292
|
this.statusCode = options.statusCode;
|
|
1240
1293
|
Object.defineProperty(this, "request", { value: options.request, enumerable: false });
|
|
1241
1294
|
Object.defineProperty(this, "response", { value: options.response, enumerable: false });
|
|
1295
|
+
const agent = ((_a = this.request) == null ? void 0 : _a.agent) ? {
|
|
1296
|
+
maxFreeSockets: this.request.agent.maxFreeSockets,
|
|
1297
|
+
maxSockets: this.request.agent.maxSockets
|
|
1298
|
+
} : void 0;
|
|
1242
1299
|
Object.defineProperty(this, inspect_js_1.custom, {
|
|
1243
1300
|
value: /* @__PURE__ */ __name(() => {
|
|
1244
1301
|
return `RestError: ${this.message}
|
|
1245
|
-
${errorSanitizer.sanitize(
|
|
1302
|
+
${errorSanitizer.sanitize({
|
|
1303
|
+
...this,
|
|
1304
|
+
request: { ...this.request, agent },
|
|
1305
|
+
response: this.response
|
|
1306
|
+
})}`;
|
|
1246
1307
|
}, "value"),
|
|
1247
1308
|
enumerable: false
|
|
1248
1309
|
});
|
|
@@ -1250,10 +1311,19 @@ var require_restError = __commonJS({
|
|
|
1250
1311
|
}
|
|
1251
1312
|
};
|
|
1252
1313
|
__name(_RestError, "RestError");
|
|
1314
|
+
/**
|
|
1315
|
+
* Something went wrong when making the request.
|
|
1316
|
+
* This means the actual request failed for some reason,
|
|
1317
|
+
* such as a DNS issue or the connection being lost.
|
|
1318
|
+
*/
|
|
1319
|
+
__publicField(_RestError, "REQUEST_SEND_ERROR", "REQUEST_SEND_ERROR");
|
|
1320
|
+
/**
|
|
1321
|
+
* This means that parsing the response from the server failed.
|
|
1322
|
+
* It may have been malformed.
|
|
1323
|
+
*/
|
|
1324
|
+
__publicField(_RestError, "PARSE_ERROR", "PARSE_ERROR");
|
|
1253
1325
|
var RestError = _RestError;
|
|
1254
1326
|
exports.RestError = RestError;
|
|
1255
|
-
RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR";
|
|
1256
|
-
RestError.PARSE_ERROR = "PARSE_ERROR";
|
|
1257
1327
|
function isRestError(e) {
|
|
1258
1328
|
if (e instanceof RestError) {
|
|
1259
1329
|
return true;
|
|
@@ -1264,9 +1334,9 @@ var require_restError = __commonJS({
|
|
|
1264
1334
|
}
|
|
1265
1335
|
});
|
|
1266
1336
|
|
|
1267
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1337
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/log.js
|
|
1268
1338
|
var require_log = __commonJS({
|
|
1269
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1339
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/log.js"(exports) {
|
|
1270
1340
|
"use strict";
|
|
1271
1341
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1272
1342
|
exports.logger = void 0;
|
|
@@ -1275,17 +1345,17 @@ var require_log = __commonJS({
|
|
|
1275
1345
|
}
|
|
1276
1346
|
});
|
|
1277
1347
|
|
|
1278
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1348
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/nodeHttpClient.js
|
|
1279
1349
|
var require_nodeHttpClient = __commonJS({
|
|
1280
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1350
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/nodeHttpClient.js"(exports) {
|
|
1281
1351
|
"use strict";
|
|
1282
1352
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1283
1353
|
exports.getBodyLength = getBodyLength;
|
|
1284
1354
|
exports.createNodeHttpClient = createNodeHttpClient;
|
|
1285
1355
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
1286
|
-
var
|
|
1287
|
-
var
|
|
1288
|
-
var
|
|
1356
|
+
var node_http_1 = tslib_1.__importDefault(__require("node:http"));
|
|
1357
|
+
var node_https_1 = tslib_1.__importDefault(__require("node:https"));
|
|
1358
|
+
var node_zlib_1 = tslib_1.__importDefault(__require("node:zlib"));
|
|
1289
1359
|
var node_stream_1 = __require("node:stream");
|
|
1290
1360
|
var AbortError_js_1 = require_AbortError2();
|
|
1291
1361
|
var httpHeaders_js_1 = require_httpHeaders();
|
|
@@ -1319,6 +1389,8 @@ var require_nodeHttpClient = __commonJS({
|
|
|
1319
1389
|
}
|
|
1320
1390
|
__name(isArrayBuffer, "isArrayBuffer");
|
|
1321
1391
|
var _ReportTransform = class _ReportTransform extends node_stream_1.Transform {
|
|
1392
|
+
loadedBytes = 0;
|
|
1393
|
+
progressCallback;
|
|
1322
1394
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
1323
1395
|
_transform(chunk, _encoding, callback) {
|
|
1324
1396
|
this.push(chunk);
|
|
@@ -1332,22 +1404,20 @@ var require_nodeHttpClient = __commonJS({
|
|
|
1332
1404
|
}
|
|
1333
1405
|
constructor(progressCallback) {
|
|
1334
1406
|
super();
|
|
1335
|
-
this.loadedBytes = 0;
|
|
1336
1407
|
this.progressCallback = progressCallback;
|
|
1337
1408
|
}
|
|
1338
1409
|
};
|
|
1339
1410
|
__name(_ReportTransform, "ReportTransform");
|
|
1340
1411
|
var ReportTransform = _ReportTransform;
|
|
1341
1412
|
var _NodeHttpClient = class _NodeHttpClient {
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
}
|
|
1413
|
+
cachedHttpAgent;
|
|
1414
|
+
cachedHttpsAgents = /* @__PURE__ */ new WeakMap();
|
|
1345
1415
|
/**
|
|
1346
1416
|
* Makes a request over an underlying transport layer and returns the response.
|
|
1347
1417
|
* @param request - The request to be made.
|
|
1348
1418
|
*/
|
|
1349
1419
|
async sendRequest(request) {
|
|
1350
|
-
var _a, _b
|
|
1420
|
+
var _a, _b;
|
|
1351
1421
|
const abortController = new AbortController();
|
|
1352
1422
|
let abortListener;
|
|
1353
1423
|
if (request.abortSignal) {
|
|
@@ -1370,7 +1440,7 @@ var require_nodeHttpClient = __commonJS({
|
|
|
1370
1440
|
}, request.timeout);
|
|
1371
1441
|
}
|
|
1372
1442
|
const acceptEncoding = request.headers.get("Accept-Encoding");
|
|
1373
|
-
const shouldDecompress = (acceptEncoding
|
|
1443
|
+
const shouldDecompress = (acceptEncoding == null ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding == null ? void 0 : acceptEncoding.includes("deflate"));
|
|
1374
1444
|
let body = typeof request.body === "function" ? request.body() : request.body;
|
|
1375
1445
|
if (body && !request.headers.has("Content-Length")) {
|
|
1376
1446
|
const bodyLength = getBodyLength(body);
|
|
@@ -1398,7 +1468,7 @@ var require_nodeHttpClient = __commonJS({
|
|
|
1398
1468
|
clearTimeout(timeoutId);
|
|
1399
1469
|
}
|
|
1400
1470
|
const headers = getResponseHeaders(res);
|
|
1401
|
-
const status =
|
|
1471
|
+
const status = res.statusCode ?? 0;
|
|
1402
1472
|
const response = {
|
|
1403
1473
|
status,
|
|
1404
1474
|
headers,
|
|
@@ -1420,7 +1490,7 @@ var require_nodeHttpClient = __commonJS({
|
|
|
1420
1490
|
}
|
|
1421
1491
|
if (
|
|
1422
1492
|
// Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code
|
|
1423
|
-
((
|
|
1493
|
+
((_a = request.streamResponseStatusCodes) == null ? void 0 : _a.has(Number.POSITIVE_INFINITY)) || ((_b = request.streamResponseStatusCodes) == null ? void 0 : _b.has(response.status))
|
|
1424
1494
|
) {
|
|
1425
1495
|
response.readableStreamBody = responseStream;
|
|
1426
1496
|
} else {
|
|
@@ -1440,7 +1510,7 @@ var require_nodeHttpClient = __commonJS({
|
|
|
1440
1510
|
Promise.all([uploadStreamDone, downloadStreamDone]).then(() => {
|
|
1441
1511
|
var _a2;
|
|
1442
1512
|
if (abortListener) {
|
|
1443
|
-
(_a2 = request.abortSignal)
|
|
1513
|
+
(_a2 = request.abortSignal) == null ? void 0 : _a2.removeEventListener("abort", abortListener);
|
|
1444
1514
|
}
|
|
1445
1515
|
}).catch((e) => {
|
|
1446
1516
|
log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e);
|
|
@@ -1449,19 +1519,25 @@ var require_nodeHttpClient = __commonJS({
|
|
|
1449
1519
|
}
|
|
1450
1520
|
}
|
|
1451
1521
|
makeRequest(request, abortController, body) {
|
|
1452
|
-
var _a;
|
|
1453
1522
|
const url = new URL(request.url);
|
|
1454
1523
|
const isInsecure = url.protocol !== "https:";
|
|
1455
1524
|
if (isInsecure && !request.allowInsecureConnection) {
|
|
1456
1525
|
throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`);
|
|
1457
1526
|
}
|
|
1458
|
-
const agent =
|
|
1459
|
-
const options =
|
|
1527
|
+
const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure);
|
|
1528
|
+
const options = {
|
|
1529
|
+
agent,
|
|
1530
|
+
hostname: url.hostname,
|
|
1531
|
+
path: `${url.pathname}${url.search}`,
|
|
1532
|
+
port: url.port,
|
|
1533
|
+
method: request.method,
|
|
1534
|
+
headers: request.headers.toJSON({ preserveCase: true }),
|
|
1535
|
+
...request.requestOverrides
|
|
1536
|
+
};
|
|
1460
1537
|
return new Promise((resolve, reject) => {
|
|
1461
|
-
const req = isInsecure ?
|
|
1538
|
+
const req = isInsecure ? node_http_1.default.request(options, resolve) : node_https_1.default.request(options, resolve);
|
|
1462
1539
|
req.once("error", (err) => {
|
|
1463
|
-
|
|
1464
|
-
reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request }));
|
|
1540
|
+
reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request }));
|
|
1465
1541
|
});
|
|
1466
1542
|
abortController.signal.addEventListener("abort", () => {
|
|
1467
1543
|
const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request.");
|
|
@@ -1485,30 +1561,31 @@ var require_nodeHttpClient = __commonJS({
|
|
|
1485
1561
|
});
|
|
1486
1562
|
}
|
|
1487
1563
|
getOrCreateAgent(request, isInsecure) {
|
|
1488
|
-
var _a;
|
|
1489
1564
|
const disableKeepAlive = request.disableKeepAlive;
|
|
1490
1565
|
if (isInsecure) {
|
|
1491
1566
|
if (disableKeepAlive) {
|
|
1492
|
-
return
|
|
1567
|
+
return node_http_1.default.globalAgent;
|
|
1493
1568
|
}
|
|
1494
1569
|
if (!this.cachedHttpAgent) {
|
|
1495
|
-
this.cachedHttpAgent = new
|
|
1570
|
+
this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true });
|
|
1496
1571
|
}
|
|
1497
1572
|
return this.cachedHttpAgent;
|
|
1498
1573
|
} else {
|
|
1499
1574
|
if (disableKeepAlive && !request.tlsSettings) {
|
|
1500
|
-
return
|
|
1575
|
+
return node_https_1.default.globalAgent;
|
|
1501
1576
|
}
|
|
1502
|
-
const tlsSettings =
|
|
1577
|
+
const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS;
|
|
1503
1578
|
let agent = this.cachedHttpsAgents.get(tlsSettings);
|
|
1504
1579
|
if (agent && agent.options.keepAlive === !disableKeepAlive) {
|
|
1505
1580
|
return agent;
|
|
1506
1581
|
}
|
|
1507
1582
|
log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent");
|
|
1508
|
-
agent = new
|
|
1583
|
+
agent = new node_https_1.default.Agent({
|
|
1509
1584
|
// keepAlive is true if disableKeepAlive is false.
|
|
1510
|
-
keepAlive: !disableKeepAlive
|
|
1511
|
-
|
|
1585
|
+
keepAlive: !disableKeepAlive,
|
|
1586
|
+
// Since we are spreading, if no tslSettings were provided, nothing is added to the agent options.
|
|
1587
|
+
...tlsSettings
|
|
1588
|
+
});
|
|
1512
1589
|
this.cachedHttpsAgents.set(tlsSettings, agent);
|
|
1513
1590
|
return agent;
|
|
1514
1591
|
}
|
|
@@ -1534,11 +1611,11 @@ var require_nodeHttpClient = __commonJS({
|
|
|
1534
1611
|
function getDecodedResponseStream(stream, headers) {
|
|
1535
1612
|
const contentEncoding = headers.get("Content-Encoding");
|
|
1536
1613
|
if (contentEncoding === "gzip") {
|
|
1537
|
-
const unzip =
|
|
1614
|
+
const unzip = node_zlib_1.default.createGunzip();
|
|
1538
1615
|
stream.pipe(unzip);
|
|
1539
1616
|
return unzip;
|
|
1540
1617
|
} else if (contentEncoding === "deflate") {
|
|
1541
|
-
const inflate =
|
|
1618
|
+
const inflate = node_zlib_1.default.createInflate();
|
|
1542
1619
|
stream.pipe(inflate);
|
|
1543
1620
|
return inflate;
|
|
1544
1621
|
}
|
|
@@ -1559,7 +1636,7 @@ var require_nodeHttpClient = __commonJS({
|
|
|
1559
1636
|
resolve(Buffer.concat(buffer).toString("utf8"));
|
|
1560
1637
|
});
|
|
1561
1638
|
stream.on("error", (e) => {
|
|
1562
|
-
if (e && (e
|
|
1639
|
+
if (e && (e == null ? void 0 : e.name) === "AbortError") {
|
|
1563
1640
|
reject(e);
|
|
1564
1641
|
} else {
|
|
1565
1642
|
reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, {
|
|
@@ -1593,9 +1670,9 @@ var require_nodeHttpClient = __commonJS({
|
|
|
1593
1670
|
}
|
|
1594
1671
|
});
|
|
1595
1672
|
|
|
1596
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1673
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/defaultHttpClient.js
|
|
1597
1674
|
var require_defaultHttpClient = __commonJS({
|
|
1598
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1675
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/defaultHttpClient.js"(exports) {
|
|
1599
1676
|
"use strict";
|
|
1600
1677
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1601
1678
|
exports.createDefaultHttpClient = createDefaultHttpClient;
|
|
@@ -1607,9 +1684,9 @@ var require_defaultHttpClient = __commonJS({
|
|
|
1607
1684
|
}
|
|
1608
1685
|
});
|
|
1609
1686
|
|
|
1610
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1687
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/logPolicy.js
|
|
1611
1688
|
var require_logPolicy = __commonJS({
|
|
1612
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1689
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/logPolicy.js"(exports) {
|
|
1613
1690
|
"use strict";
|
|
1614
1691
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1615
1692
|
exports.logPolicyName = void 0;
|
|
@@ -1618,8 +1695,7 @@ var require_logPolicy = __commonJS({
|
|
|
1618
1695
|
var sanitizer_js_1 = require_sanitizer();
|
|
1619
1696
|
exports.logPolicyName = "logPolicy";
|
|
1620
1697
|
function logPolicy(options = {}) {
|
|
1621
|
-
|
|
1622
|
-
const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info;
|
|
1698
|
+
const logger = options.logger ?? log_js_1.logger.info;
|
|
1623
1699
|
const sanitizer = new sanitizer_js_1.Sanitizer({
|
|
1624
1700
|
additionalAllowedHeaderNames: options.additionalAllowedHeaderNames,
|
|
1625
1701
|
additionalAllowedQueryParameters: options.additionalAllowedQueryParameters
|
|
@@ -1642,9 +1718,9 @@ var require_logPolicy = __commonJS({
|
|
|
1642
1718
|
}
|
|
1643
1719
|
});
|
|
1644
1720
|
|
|
1645
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1721
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/redirectPolicy.js
|
|
1646
1722
|
var require_redirectPolicy = __commonJS({
|
|
1647
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1723
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/redirectPolicy.js"(exports) {
|
|
1648
1724
|
"use strict";
|
|
1649
1725
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1650
1726
|
exports.redirectPolicyName = void 0;
|
|
@@ -1683,23 +1759,23 @@ var require_redirectPolicy = __commonJS({
|
|
|
1683
1759
|
}
|
|
1684
1760
|
});
|
|
1685
1761
|
|
|
1686
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1762
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/userAgentPlatform.js
|
|
1687
1763
|
var require_userAgentPlatform = __commonJS({
|
|
1688
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1764
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/userAgentPlatform.js"(exports) {
|
|
1689
1765
|
"use strict";
|
|
1690
1766
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1691
1767
|
exports.getHeaderName = getHeaderName;
|
|
1692
1768
|
exports.setPlatformSpecificData = setPlatformSpecificData;
|
|
1693
1769
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
1694
|
-
var
|
|
1695
|
-
var
|
|
1770
|
+
var node_os_1 = tslib_1.__importDefault(__require("node:os"));
|
|
1771
|
+
var node_process_1 = tslib_1.__importDefault(__require("node:process"));
|
|
1696
1772
|
function getHeaderName() {
|
|
1697
1773
|
return "User-Agent";
|
|
1698
1774
|
}
|
|
1699
1775
|
__name(getHeaderName, "getHeaderName");
|
|
1700
1776
|
async function setPlatformSpecificData(map) {
|
|
1701
|
-
if (
|
|
1702
|
-
const versions =
|
|
1777
|
+
if (node_process_1.default && node_process_1.default.versions) {
|
|
1778
|
+
const versions = node_process_1.default.versions;
|
|
1703
1779
|
if (versions.bun) {
|
|
1704
1780
|
map.set("Bun", versions.bun);
|
|
1705
1781
|
} else if (versions.deno) {
|
|
@@ -1708,26 +1784,26 @@ var require_userAgentPlatform = __commonJS({
|
|
|
1708
1784
|
map.set("Node", versions.node);
|
|
1709
1785
|
}
|
|
1710
1786
|
}
|
|
1711
|
-
map.set("OS", `(${
|
|
1787
|
+
map.set("OS", `(${node_os_1.default.arch()}-${node_os_1.default.type()}-${node_os_1.default.release()})`);
|
|
1712
1788
|
}
|
|
1713
1789
|
__name(setPlatformSpecificData, "setPlatformSpecificData");
|
|
1714
1790
|
}
|
|
1715
1791
|
});
|
|
1716
1792
|
|
|
1717
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1793
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/constants.js
|
|
1718
1794
|
var require_constants = __commonJS({
|
|
1719
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1795
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/constants.js"(exports) {
|
|
1720
1796
|
"use strict";
|
|
1721
1797
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1722
1798
|
exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0;
|
|
1723
|
-
exports.SDK_VERSION = "0.3.
|
|
1799
|
+
exports.SDK_VERSION = "0.3.1";
|
|
1724
1800
|
exports.DEFAULT_RETRY_POLICY_COUNT = 3;
|
|
1725
1801
|
}
|
|
1726
1802
|
});
|
|
1727
1803
|
|
|
1728
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1804
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/userAgent.js
|
|
1729
1805
|
var require_userAgent = __commonJS({
|
|
1730
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1806
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/userAgent.js"(exports) {
|
|
1731
1807
|
"use strict";
|
|
1732
1808
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1733
1809
|
exports.getUserAgentHeaderName = getUserAgentHeaderName;
|
|
@@ -1759,9 +1835,9 @@ var require_userAgent = __commonJS({
|
|
|
1759
1835
|
}
|
|
1760
1836
|
});
|
|
1761
1837
|
|
|
1762
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1838
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/userAgentPolicy.js
|
|
1763
1839
|
var require_userAgentPolicy = __commonJS({
|
|
1764
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1840
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/userAgentPolicy.js"(exports) {
|
|
1765
1841
|
"use strict";
|
|
1766
1842
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1767
1843
|
exports.userAgentPolicyName = void 0;
|
|
@@ -1785,9 +1861,9 @@ var require_userAgentPolicy = __commonJS({
|
|
|
1785
1861
|
}
|
|
1786
1862
|
});
|
|
1787
1863
|
|
|
1788
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1864
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/decompressResponsePolicy.js
|
|
1789
1865
|
var require_decompressResponsePolicy = __commonJS({
|
|
1790
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1866
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/decompressResponsePolicy.js"(exports) {
|
|
1791
1867
|
"use strict";
|
|
1792
1868
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1793
1869
|
exports.decompressResponsePolicyName = void 0;
|
|
@@ -1808,9 +1884,9 @@ var require_decompressResponsePolicy = __commonJS({
|
|
|
1808
1884
|
}
|
|
1809
1885
|
});
|
|
1810
1886
|
|
|
1811
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1887
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/helpers.js
|
|
1812
1888
|
var require_helpers = __commonJS({
|
|
1813
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1889
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/helpers.js"(exports) {
|
|
1814
1890
|
"use strict";
|
|
1815
1891
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1816
1892
|
exports.delay = delay;
|
|
@@ -1822,10 +1898,10 @@ var require_helpers = __commonJS({
|
|
|
1822
1898
|
let timer = void 0;
|
|
1823
1899
|
let onAborted = void 0;
|
|
1824
1900
|
const rejectOnAbort = /* @__PURE__ */ __name(() => {
|
|
1825
|
-
return reject(new AbortError_js_1.AbortError((options
|
|
1901
|
+
return reject(new AbortError_js_1.AbortError((options == null ? void 0 : options.abortErrorMsg) ? options == null ? void 0 : options.abortErrorMsg : StandardAbortMessage));
|
|
1826
1902
|
}, "rejectOnAbort");
|
|
1827
1903
|
const removeListeners = /* @__PURE__ */ __name(() => {
|
|
1828
|
-
if ((options
|
|
1904
|
+
if ((options == null ? void 0 : options.abortSignal) && onAborted) {
|
|
1829
1905
|
options.abortSignal.removeEventListener("abort", onAborted);
|
|
1830
1906
|
}
|
|
1831
1907
|
}, "removeListeners");
|
|
@@ -1836,14 +1912,14 @@ var require_helpers = __commonJS({
|
|
|
1836
1912
|
removeListeners();
|
|
1837
1913
|
return rejectOnAbort();
|
|
1838
1914
|
}, "onAborted");
|
|
1839
|
-
if ((options
|
|
1915
|
+
if ((options == null ? void 0 : options.abortSignal) && options.abortSignal.aborted) {
|
|
1840
1916
|
return rejectOnAbort();
|
|
1841
1917
|
}
|
|
1842
1918
|
timer = setTimeout(() => {
|
|
1843
1919
|
removeListeners();
|
|
1844
1920
|
resolve(value);
|
|
1845
1921
|
}, delayInMs);
|
|
1846
|
-
if (options
|
|
1922
|
+
if (options == null ? void 0 : options.abortSignal) {
|
|
1847
1923
|
options.abortSignal.addEventListener("abort", onAborted);
|
|
1848
1924
|
}
|
|
1849
1925
|
});
|
|
@@ -1862,9 +1938,9 @@ var require_helpers = __commonJS({
|
|
|
1862
1938
|
}
|
|
1863
1939
|
});
|
|
1864
1940
|
|
|
1865
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1941
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/retryStrategies/throttlingRetryStrategy.js
|
|
1866
1942
|
var require_throttlingRetryStrategy = __commonJS({
|
|
1867
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1943
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports) {
|
|
1868
1944
|
"use strict";
|
|
1869
1945
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1870
1946
|
exports.isThrottlingRetryResponse = isThrottlingRetryResponse;
|
|
@@ -1889,7 +1965,7 @@ var require_throttlingRetryStrategy = __commonJS({
|
|
|
1889
1965
|
const date = Date.parse(retryAfterHeader);
|
|
1890
1966
|
const diff = date - Date.now();
|
|
1891
1967
|
return Number.isFinite(diff) ? Math.max(0, diff) : void 0;
|
|
1892
|
-
} catch
|
|
1968
|
+
} catch {
|
|
1893
1969
|
return void 0;
|
|
1894
1970
|
}
|
|
1895
1971
|
}
|
|
@@ -1916,9 +1992,9 @@ var require_throttlingRetryStrategy = __commonJS({
|
|
|
1916
1992
|
}
|
|
1917
1993
|
});
|
|
1918
1994
|
|
|
1919
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1995
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/retryStrategies/exponentialRetryStrategy.js
|
|
1920
1996
|
var require_exponentialRetryStrategy = __commonJS({
|
|
1921
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
1997
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports) {
|
|
1922
1998
|
"use strict";
|
|
1923
1999
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1924
2000
|
exports.exponentialRetryStrategy = exponentialRetryStrategy;
|
|
@@ -1929,9 +2005,8 @@ var require_exponentialRetryStrategy = __commonJS({
|
|
|
1929
2005
|
var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3;
|
|
1930
2006
|
var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64;
|
|
1931
2007
|
function exponentialRetryStrategy(options = {}) {
|
|
1932
|
-
|
|
1933
|
-
const
|
|
1934
|
-
const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;
|
|
2008
|
+
const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL;
|
|
2009
|
+
const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL;
|
|
1935
2010
|
return {
|
|
1936
2011
|
name: "exponentialRetryStrategy",
|
|
1937
2012
|
retry({ retryCount, response, responseError }) {
|
|
@@ -1968,9 +2043,9 @@ var require_exponentialRetryStrategy = __commonJS({
|
|
|
1968
2043
|
}
|
|
1969
2044
|
});
|
|
1970
2045
|
|
|
1971
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2046
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/retryPolicy.js
|
|
1972
2047
|
var require_retryPolicy = __commonJS({
|
|
1973
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2048
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/retryPolicy.js"(exports) {
|
|
1974
2049
|
"use strict";
|
|
1975
2050
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1976
2051
|
exports.retryPolicy = retryPolicy;
|
|
@@ -1985,7 +2060,7 @@ var require_retryPolicy = __commonJS({
|
|
|
1985
2060
|
return {
|
|
1986
2061
|
name: retryPolicyName,
|
|
1987
2062
|
async sendRequest(request, next) {
|
|
1988
|
-
var _a
|
|
2063
|
+
var _a;
|
|
1989
2064
|
let response;
|
|
1990
2065
|
let responseError;
|
|
1991
2066
|
let retryCount = -1;
|
|
@@ -2005,12 +2080,12 @@ var require_retryPolicy = __commonJS({
|
|
|
2005
2080
|
}
|
|
2006
2081
|
response = responseError.response;
|
|
2007
2082
|
}
|
|
2008
|
-
if ((_a = request.abortSignal)
|
|
2083
|
+
if ((_a = request.abortSignal) == null ? void 0 : _a.aborted) {
|
|
2009
2084
|
logger.error(`Retry ${retryCount}: Request aborted.`);
|
|
2010
2085
|
const abortError = new AbortError_js_1.AbortError();
|
|
2011
2086
|
throw abortError;
|
|
2012
2087
|
}
|
|
2013
|
-
if (retryCount >= (
|
|
2088
|
+
if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) {
|
|
2014
2089
|
logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`);
|
|
2015
2090
|
if (responseError) {
|
|
2016
2091
|
throw responseError;
|
|
@@ -2065,9 +2140,9 @@ var require_retryPolicy = __commonJS({
|
|
|
2065
2140
|
}
|
|
2066
2141
|
});
|
|
2067
2142
|
|
|
2068
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2143
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/defaultRetryPolicy.js
|
|
2069
2144
|
var require_defaultRetryPolicy = __commonJS({
|
|
2070
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2145
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/defaultRetryPolicy.js"(exports) {
|
|
2071
2146
|
"use strict";
|
|
2072
2147
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2073
2148
|
exports.defaultRetryPolicyName = void 0;
|
|
@@ -2078,11 +2153,10 @@ var require_defaultRetryPolicy = __commonJS({
|
|
|
2078
2153
|
var constants_js_1 = require_constants();
|
|
2079
2154
|
exports.defaultRetryPolicyName = "defaultRetryPolicy";
|
|
2080
2155
|
function defaultRetryPolicy(options = {}) {
|
|
2081
|
-
var _a;
|
|
2082
2156
|
return {
|
|
2083
2157
|
name: exports.defaultRetryPolicyName,
|
|
2084
2158
|
sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], {
|
|
2085
|
-
maxRetries:
|
|
2159
|
+
maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT
|
|
2086
2160
|
}).sendRequest
|
|
2087
2161
|
};
|
|
2088
2162
|
}
|
|
@@ -2090,9 +2164,9 @@ var require_defaultRetryPolicy = __commonJS({
|
|
|
2090
2164
|
}
|
|
2091
2165
|
});
|
|
2092
2166
|
|
|
2093
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2167
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/formDataPolicy.js
|
|
2094
2168
|
var require_formDataPolicy = __commonJS({
|
|
2095
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2169
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/formDataPolicy.js"(exports) {
|
|
2096
2170
|
"use strict";
|
|
2097
2171
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2098
2172
|
exports.formDataPolicyName = void 0;
|
|
@@ -2102,10 +2176,9 @@ var require_formDataPolicy = __commonJS({
|
|
|
2102
2176
|
var httpHeaders_js_1 = require_httpHeaders();
|
|
2103
2177
|
exports.formDataPolicyName = "formDataPolicy";
|
|
2104
2178
|
function formDataToFormDataMap(formData) {
|
|
2105
|
-
var _a;
|
|
2106
2179
|
const formDataMap = {};
|
|
2107
2180
|
for (const [key, value] of formData.entries()) {
|
|
2108
|
-
|
|
2181
|
+
formDataMap[key] ??= [];
|
|
2109
2182
|
formDataMap[key].push(value);
|
|
2110
2183
|
}
|
|
2111
2184
|
return formDataMap;
|
|
@@ -2152,7 +2225,7 @@ var require_formDataPolicy = __commonJS({
|
|
|
2152
2225
|
if (contentType && !contentType.startsWith("multipart/form-data")) {
|
|
2153
2226
|
return;
|
|
2154
2227
|
}
|
|
2155
|
-
request.headers.set("Content-Type", contentType
|
|
2228
|
+
request.headers.set("Content-Type", contentType ?? "multipart/form-data");
|
|
2156
2229
|
const parts = [];
|
|
2157
2230
|
for (const [fieldName, values] of Object.entries(formData)) {
|
|
2158
2231
|
for (const value of Array.isArray(values) ? values : [values]) {
|
|
@@ -2183,9 +2256,9 @@ var require_formDataPolicy = __commonJS({
|
|
|
2183
2256
|
}
|
|
2184
2257
|
});
|
|
2185
2258
|
|
|
2186
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2259
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/proxyPolicy.js
|
|
2187
2260
|
var require_proxyPolicy = __commonJS({
|
|
2188
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2261
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/proxyPolicy.js"(exports) {
|
|
2189
2262
|
"use strict";
|
|
2190
2263
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2191
2264
|
exports.globalNoProxyList = exports.proxyPolicyName = void 0;
|
|
@@ -2227,7 +2300,7 @@ var require_proxyPolicy = __commonJS({
|
|
|
2227
2300
|
return false;
|
|
2228
2301
|
}
|
|
2229
2302
|
const host = new URL(uri).hostname;
|
|
2230
|
-
if (bypassedMap
|
|
2303
|
+
if (bypassedMap == null ? void 0 : bypassedMap.has(host)) {
|
|
2231
2304
|
return bypassedMap.get(host);
|
|
2232
2305
|
}
|
|
2233
2306
|
let isBypassedFlag = false;
|
|
@@ -2246,7 +2319,7 @@ var require_proxyPolicy = __commonJS({
|
|
|
2246
2319
|
}
|
|
2247
2320
|
}
|
|
2248
2321
|
}
|
|
2249
|
-
bypassedMap
|
|
2322
|
+
bypassedMap == null ? void 0 : bypassedMap.set(host, isBypassedFlag);
|
|
2250
2323
|
return isBypassedFlag;
|
|
2251
2324
|
}
|
|
2252
2325
|
__name(isBypassed, "isBypassed");
|
|
@@ -2285,7 +2358,7 @@ var require_proxyPolicy = __commonJS({
|
|
|
2285
2358
|
let parsedProxyUrl;
|
|
2286
2359
|
try {
|
|
2287
2360
|
parsedProxyUrl = new URL(settings.host);
|
|
2288
|
-
} catch
|
|
2361
|
+
} catch {
|
|
2289
2362
|
throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`);
|
|
2290
2363
|
}
|
|
2291
2364
|
parsedProxyUrl.port = String(settings.port);
|
|
@@ -2330,8 +2403,7 @@ var require_proxyPolicy = __commonJS({
|
|
|
2330
2403
|
return {
|
|
2331
2404
|
name: exports.proxyPolicyName,
|
|
2332
2405
|
async sendRequest(request, next) {
|
|
2333
|
-
|
|
2334
|
-
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) ? void 0 : globalBypassedMap)) {
|
|
2406
|
+
if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (options == null ? void 0 : options.customNoProxyList) ?? exports.globalNoProxyList, (options == null ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) {
|
|
2335
2407
|
setProxyAgentOnRequest(request, cachedAgents, defaultProxy);
|
|
2336
2408
|
} else if (request.proxySettings) {
|
|
2337
2409
|
setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings));
|
|
@@ -2344,9 +2416,9 @@ var require_proxyPolicy = __commonJS({
|
|
|
2344
2416
|
}
|
|
2345
2417
|
});
|
|
2346
2418
|
|
|
2347
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2419
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/agentPolicy.js
|
|
2348
2420
|
var require_agentPolicy = __commonJS({
|
|
2349
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2421
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/agentPolicy.js"(exports) {
|
|
2350
2422
|
"use strict";
|
|
2351
2423
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2352
2424
|
exports.agentPolicyName = void 0;
|
|
@@ -2367,9 +2439,9 @@ var require_agentPolicy = __commonJS({
|
|
|
2367
2439
|
}
|
|
2368
2440
|
});
|
|
2369
2441
|
|
|
2370
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2442
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/tlsPolicy.js
|
|
2371
2443
|
var require_tlsPolicy = __commonJS({
|
|
2372
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2444
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/tlsPolicy.js"(exports) {
|
|
2373
2445
|
"use strict";
|
|
2374
2446
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2375
2447
|
exports.tlsPolicyName = void 0;
|
|
@@ -2390,9 +2462,9 @@ var require_tlsPolicy = __commonJS({
|
|
|
2390
2462
|
}
|
|
2391
2463
|
});
|
|
2392
2464
|
|
|
2393
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2465
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/typeGuards.js
|
|
2394
2466
|
var require_typeGuards2 = __commonJS({
|
|
2395
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2467
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/typeGuards.js"(exports) {
|
|
2396
2468
|
"use strict";
|
|
2397
2469
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2398
2470
|
exports.isNodeReadableStream = isNodeReadableStream;
|
|
@@ -2423,30 +2495,27 @@ var require_typeGuards2 = __commonJS({
|
|
|
2423
2495
|
}
|
|
2424
2496
|
});
|
|
2425
2497
|
|
|
2426
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2498
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/concat.js
|
|
2427
2499
|
var require_concat = __commonJS({
|
|
2428
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2500
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/util/concat.js"(exports) {
|
|
2429
2501
|
"use strict";
|
|
2430
2502
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2431
2503
|
exports.concat = concat;
|
|
2432
|
-
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
2433
2504
|
var stream_1 = __require("stream");
|
|
2434
2505
|
var typeGuards_js_1 = require_typeGuards2();
|
|
2435
|
-
function streamAsyncIterator() {
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
return yield tslib_1.__await(void 0);
|
|
2443
|
-
}
|
|
2444
|
-
yield yield tslib_1.__await(value);
|
|
2506
|
+
async function* streamAsyncIterator() {
|
|
2507
|
+
const reader = this.getReader();
|
|
2508
|
+
try {
|
|
2509
|
+
while (true) {
|
|
2510
|
+
const { done, value } = await reader.read();
|
|
2511
|
+
if (done) {
|
|
2512
|
+
return;
|
|
2445
2513
|
}
|
|
2446
|
-
|
|
2447
|
-
reader.releaseLock();
|
|
2514
|
+
yield value;
|
|
2448
2515
|
}
|
|
2449
|
-
}
|
|
2516
|
+
} finally {
|
|
2517
|
+
reader.releaseLock();
|
|
2518
|
+
}
|
|
2450
2519
|
}
|
|
2451
2520
|
__name(streamAsyncIterator, "streamAsyncIterator");
|
|
2452
2521
|
function makeAsyncIterable(webStream) {
|
|
@@ -2480,28 +2549,12 @@ var require_concat = __commonJS({
|
|
|
2480
2549
|
async function concat(sources) {
|
|
2481
2550
|
return function() {
|
|
2482
2551
|
const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream);
|
|
2483
|
-
return stream_1.Readable.from((function() {
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
try {
|
|
2488
|
-
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) {
|
|
2489
|
-
_c = stream_2_1.value;
|
|
2490
|
-
_d = false;
|
|
2491
|
-
const chunk = _c;
|
|
2492
|
-
yield yield tslib_1.__await(chunk);
|
|
2493
|
-
}
|
|
2494
|
-
} catch (e_1_1) {
|
|
2495
|
-
e_1 = { error: e_1_1 };
|
|
2496
|
-
} finally {
|
|
2497
|
-
try {
|
|
2498
|
-
if (!_d && !_a && (_b = stream_2.return)) yield tslib_1.__await(_b.call(stream_2));
|
|
2499
|
-
} finally {
|
|
2500
|
-
if (e_1) throw e_1.error;
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2552
|
+
return stream_1.Readable.from((async function* () {
|
|
2553
|
+
for (const stream of streams) {
|
|
2554
|
+
for await (const chunk of stream) {
|
|
2555
|
+
yield chunk;
|
|
2503
2556
|
}
|
|
2504
|
-
}
|
|
2557
|
+
}
|
|
2505
2558
|
})());
|
|
2506
2559
|
};
|
|
2507
2560
|
}
|
|
@@ -2509,9 +2562,9 @@ var require_concat = __commonJS({
|
|
|
2509
2562
|
}
|
|
2510
2563
|
});
|
|
2511
2564
|
|
|
2512
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2565
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/multipartPolicy.js
|
|
2513
2566
|
var require_multipartPolicy = __commonJS({
|
|
2514
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2567
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/multipartPolicy.js"(exports) {
|
|
2515
2568
|
"use strict";
|
|
2516
2569
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2517
2570
|
exports.multipartPolicyName = void 0;
|
|
@@ -2592,7 +2645,6 @@ var require_multipartPolicy = __commonJS({
|
|
|
2592
2645
|
return {
|
|
2593
2646
|
name: exports.multipartPolicyName,
|
|
2594
2647
|
async sendRequest(request, next) {
|
|
2595
|
-
var _a;
|
|
2596
2648
|
if (!request.multipartBody) {
|
|
2597
2649
|
return next(request);
|
|
2598
2650
|
}
|
|
@@ -2600,7 +2652,7 @@ var require_multipartPolicy = __commonJS({
|
|
|
2600
2652
|
throw new Error("multipartBody and regular body cannot be set at the same time");
|
|
2601
2653
|
}
|
|
2602
2654
|
let boundary = request.multipartBody.boundary;
|
|
2603
|
-
const contentTypeHeader =
|
|
2655
|
+
const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed";
|
|
2604
2656
|
const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);
|
|
2605
2657
|
if (!parsedHeader) {
|
|
2606
2658
|
throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`);
|
|
@@ -2609,7 +2661,7 @@ var require_multipartPolicy = __commonJS({
|
|
|
2609
2661
|
if (parsedBoundary && boundary && parsedBoundary !== boundary) {
|
|
2610
2662
|
throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`);
|
|
2611
2663
|
}
|
|
2612
|
-
boundary
|
|
2664
|
+
boundary ??= parsedBoundary;
|
|
2613
2665
|
if (boundary) {
|
|
2614
2666
|
assertValidBoundary(boundary);
|
|
2615
2667
|
} else {
|
|
@@ -2626,9 +2678,9 @@ var require_multipartPolicy = __commonJS({
|
|
|
2626
2678
|
}
|
|
2627
2679
|
});
|
|
2628
2680
|
|
|
2629
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2681
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/createPipelineFromOptions.js
|
|
2630
2682
|
var require_createPipelineFromOptions = __commonJS({
|
|
2631
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2683
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/createPipelineFromOptions.js"(exports) {
|
|
2632
2684
|
"use strict";
|
|
2633
2685
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2634
2686
|
exports.createPipelineFromOptions = createPipelineFromOptions;
|
|
@@ -2670,9 +2722,9 @@ var require_createPipelineFromOptions = __commonJS({
|
|
|
2670
2722
|
}
|
|
2671
2723
|
});
|
|
2672
2724
|
|
|
2673
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2725
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/apiVersionPolicy.js
|
|
2674
2726
|
var require_apiVersionPolicy = __commonJS({
|
|
2675
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2727
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/apiVersionPolicy.js"(exports) {
|
|
2676
2728
|
"use strict";
|
|
2677
2729
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2678
2730
|
exports.apiVersionPolicyName = void 0;
|
|
@@ -2694,9 +2746,9 @@ var require_apiVersionPolicy = __commonJS({
|
|
|
2694
2746
|
}
|
|
2695
2747
|
});
|
|
2696
2748
|
|
|
2697
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2749
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/auth/credentials.js
|
|
2698
2750
|
var require_credentials = __commonJS({
|
|
2699
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2751
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/auth/credentials.js"(exports) {
|
|
2700
2752
|
"use strict";
|
|
2701
2753
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2702
2754
|
exports.isOAuth2TokenCredential = isOAuth2TokenCredential;
|
|
@@ -2722,9 +2774,9 @@ var require_credentials = __commonJS({
|
|
|
2722
2774
|
}
|
|
2723
2775
|
});
|
|
2724
2776
|
|
|
2725
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2777
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/auth/checkInsecureConnection.js
|
|
2726
2778
|
var require_checkInsecureConnection = __commonJS({
|
|
2727
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2779
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports) {
|
|
2728
2780
|
"use strict";
|
|
2729
2781
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2730
2782
|
exports.ensureSecureConnection = ensureSecureConnection;
|
|
@@ -2743,7 +2795,7 @@ var require_checkInsecureConnection = __commonJS({
|
|
|
2743
2795
|
function emitInsecureConnectionWarning() {
|
|
2744
2796
|
const warning = "Sending token over insecure transport. Assume any token issued is compromised.";
|
|
2745
2797
|
log_js_1.logger.warning(warning);
|
|
2746
|
-
if (typeof (process
|
|
2798
|
+
if (typeof (process == null ? void 0 : process.emitWarning) === "function" && !insecureConnectionWarningEmmitted) {
|
|
2747
2799
|
insecureConnectionWarningEmmitted = true;
|
|
2748
2800
|
process.emitWarning(warning);
|
|
2749
2801
|
}
|
|
@@ -2762,9 +2814,9 @@ var require_checkInsecureConnection = __commonJS({
|
|
|
2762
2814
|
}
|
|
2763
2815
|
});
|
|
2764
2816
|
|
|
2765
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2817
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js
|
|
2766
2818
|
var require_apiKeyAuthenticationPolicy = __commonJS({
|
|
2767
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2819
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports) {
|
|
2768
2820
|
"use strict";
|
|
2769
2821
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2770
2822
|
exports.apiKeyAuthenticationPolicyName = void 0;
|
|
@@ -2775,9 +2827,9 @@ var require_apiKeyAuthenticationPolicy = __commonJS({
|
|
|
2775
2827
|
return {
|
|
2776
2828
|
name: exports.apiKeyAuthenticationPolicyName,
|
|
2777
2829
|
async sendRequest(request, next) {
|
|
2778
|
-
var _a
|
|
2830
|
+
var _a;
|
|
2779
2831
|
(0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options);
|
|
2780
|
-
const scheme = (
|
|
2832
|
+
const scheme = (_a = request.authSchemes ?? options.authSchemes) == null ? void 0 : _a.find((x) => x.kind === "apiKey");
|
|
2781
2833
|
if (!scheme) {
|
|
2782
2834
|
return next(request);
|
|
2783
2835
|
}
|
|
@@ -2793,9 +2845,9 @@ var require_apiKeyAuthenticationPolicy = __commonJS({
|
|
|
2793
2845
|
}
|
|
2794
2846
|
});
|
|
2795
2847
|
|
|
2796
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2848
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/auth/basicAuthenticationPolicy.js
|
|
2797
2849
|
var require_basicAuthenticationPolicy = __commonJS({
|
|
2798
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2850
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports) {
|
|
2799
2851
|
"use strict";
|
|
2800
2852
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2801
2853
|
exports.basicAuthenticationPolicyName = void 0;
|
|
@@ -2807,9 +2859,9 @@ var require_basicAuthenticationPolicy = __commonJS({
|
|
|
2807
2859
|
return {
|
|
2808
2860
|
name: exports.basicAuthenticationPolicyName,
|
|
2809
2861
|
async sendRequest(request, next) {
|
|
2810
|
-
var _a
|
|
2862
|
+
var _a;
|
|
2811
2863
|
(0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options);
|
|
2812
|
-
const scheme = (
|
|
2864
|
+
const scheme = (_a = request.authSchemes ?? options.authSchemes) == null ? void 0 : _a.find((x) => x.kind === "http" && x.scheme === "basic");
|
|
2813
2865
|
if (!scheme) {
|
|
2814
2866
|
return next(request);
|
|
2815
2867
|
}
|
|
@@ -2824,9 +2876,9 @@ var require_basicAuthenticationPolicy = __commonJS({
|
|
|
2824
2876
|
}
|
|
2825
2877
|
});
|
|
2826
2878
|
|
|
2827
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2879
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js
|
|
2828
2880
|
var require_bearerAuthenticationPolicy = __commonJS({
|
|
2829
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2881
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports) {
|
|
2830
2882
|
"use strict";
|
|
2831
2883
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2832
2884
|
exports.bearerAuthenticationPolicyName = void 0;
|
|
@@ -2837,9 +2889,9 @@ var require_bearerAuthenticationPolicy = __commonJS({
|
|
|
2837
2889
|
return {
|
|
2838
2890
|
name: exports.bearerAuthenticationPolicyName,
|
|
2839
2891
|
async sendRequest(request, next) {
|
|
2840
|
-
var _a
|
|
2892
|
+
var _a;
|
|
2841
2893
|
(0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options);
|
|
2842
|
-
const scheme = (
|
|
2894
|
+
const scheme = (_a = request.authSchemes ?? options.authSchemes) == null ? void 0 : _a.find((x) => x.kind === "http" && x.scheme === "bearer");
|
|
2843
2895
|
if (!scheme) {
|
|
2844
2896
|
return next(request);
|
|
2845
2897
|
}
|
|
@@ -2855,9 +2907,9 @@ var require_bearerAuthenticationPolicy = __commonJS({
|
|
|
2855
2907
|
}
|
|
2856
2908
|
});
|
|
2857
2909
|
|
|
2858
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2910
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js
|
|
2859
2911
|
var require_oauth2AuthenticationPolicy = __commonJS({
|
|
2860
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2912
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports) {
|
|
2861
2913
|
"use strict";
|
|
2862
2914
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2863
2915
|
exports.oauth2AuthenticationPolicyName = void 0;
|
|
@@ -2868,9 +2920,9 @@ var require_oauth2AuthenticationPolicy = __commonJS({
|
|
|
2868
2920
|
return {
|
|
2869
2921
|
name: exports.oauth2AuthenticationPolicyName,
|
|
2870
2922
|
async sendRequest(request, next) {
|
|
2871
|
-
var _a
|
|
2923
|
+
var _a;
|
|
2872
2924
|
(0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options);
|
|
2873
|
-
const scheme = (
|
|
2925
|
+
const scheme = (_a = request.authSchemes ?? options.authSchemes) == null ? void 0 : _a.find((x) => x.kind === "oauth2");
|
|
2874
2926
|
if (!scheme) {
|
|
2875
2927
|
return next(request);
|
|
2876
2928
|
}
|
|
@@ -2886,9 +2938,9 @@ var require_oauth2AuthenticationPolicy = __commonJS({
|
|
|
2886
2938
|
}
|
|
2887
2939
|
});
|
|
2888
2940
|
|
|
2889
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2941
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/clientHelpers.js
|
|
2890
2942
|
var require_clientHelpers = __commonJS({
|
|
2891
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2943
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/clientHelpers.js"(exports) {
|
|
2892
2944
|
"use strict";
|
|
2893
2945
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2894
2946
|
exports.createDefaultPipeline = createDefaultPipeline;
|
|
@@ -2930,9 +2982,9 @@ var require_clientHelpers = __commonJS({
|
|
|
2930
2982
|
}
|
|
2931
2983
|
});
|
|
2932
2984
|
|
|
2933
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2985
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/multipart.js
|
|
2934
2986
|
var require_multipart = __commonJS({
|
|
2935
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
2987
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/multipart.js"(exports) {
|
|
2936
2988
|
"use strict";
|
|
2937
2989
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2938
2990
|
exports.buildBodyPart = buildBodyPart;
|
|
@@ -2983,7 +3035,6 @@ var require_multipart = __commonJS({
|
|
|
2983
3035
|
}
|
|
2984
3036
|
__name(escapeDispositionField, "escapeDispositionField");
|
|
2985
3037
|
function getContentDisposition(descriptor) {
|
|
2986
|
-
var _a;
|
|
2987
3038
|
const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition");
|
|
2988
3039
|
if (contentDispositionHeader) {
|
|
2989
3040
|
return contentDispositionHeader;
|
|
@@ -2991,7 +3042,7 @@ var require_multipart = __commonJS({
|
|
|
2991
3042
|
if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) {
|
|
2992
3043
|
return void 0;
|
|
2993
3044
|
}
|
|
2994
|
-
const dispositionType =
|
|
3045
|
+
const dispositionType = descriptor.dispositionType ?? "form-data";
|
|
2995
3046
|
let disposition = dispositionType;
|
|
2996
3047
|
if (descriptor.name) {
|
|
2997
3048
|
disposition += `; name=${escapeDispositionField(descriptor.name)}`;
|
|
@@ -3028,10 +3079,9 @@ var require_multipart = __commonJS({
|
|
|
3028
3079
|
}
|
|
3029
3080
|
__name(normalizeBody, "normalizeBody");
|
|
3030
3081
|
function buildBodyPart(descriptor) {
|
|
3031
|
-
var _a;
|
|
3032
3082
|
const contentType = getPartContentType(descriptor);
|
|
3033
3083
|
const contentDisposition = getContentDisposition(descriptor);
|
|
3034
|
-
const headers = (0, httpHeaders_js_1.createHttpHeaders)(
|
|
3084
|
+
const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {});
|
|
3035
3085
|
if (contentType) {
|
|
3036
3086
|
headers.set("content-type", contentType);
|
|
3037
3087
|
}
|
|
@@ -3052,9 +3102,9 @@ var require_multipart = __commonJS({
|
|
|
3052
3102
|
}
|
|
3053
3103
|
});
|
|
3054
3104
|
|
|
3055
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3105
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/sendRequest.js
|
|
3056
3106
|
var require_sendRequest = __commonJS({
|
|
3057
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3107
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/sendRequest.js"(exports) {
|
|
3058
3108
|
"use strict";
|
|
3059
3109
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3060
3110
|
exports.sendRequest = sendRequest;
|
|
@@ -3065,17 +3115,16 @@ var require_sendRequest = __commonJS({
|
|
|
3065
3115
|
var typeGuards_js_1 = require_typeGuards2();
|
|
3066
3116
|
var multipart_js_1 = require_multipart();
|
|
3067
3117
|
async function sendRequest(method, url, pipeline, options = {}, customHttpClient) {
|
|
3068
|
-
|
|
3069
|
-
const httpClient = customHttpClient !== null && customHttpClient !== void 0 ? customHttpClient : (0, clientHelpers_js_1.getCachedDefaultHttpsClient)();
|
|
3118
|
+
const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)();
|
|
3070
3119
|
const request = buildPipelineRequest(method, url, options);
|
|
3071
3120
|
try {
|
|
3072
3121
|
const response = await pipeline.sendRequest(httpClient, request);
|
|
3073
3122
|
const headers = response.headers.toJSON();
|
|
3074
|
-
const stream =
|
|
3123
|
+
const stream = response.readableStreamBody ?? response.browserStreamBody;
|
|
3075
3124
|
const parsedBody = options.responseAsStream || stream !== void 0 ? void 0 : getResponseBody(response);
|
|
3076
|
-
const body = stream
|
|
3077
|
-
if (options
|
|
3078
|
-
options.onResponse(
|
|
3125
|
+
const body = stream ?? parsedBody;
|
|
3126
|
+
if (options == null ? void 0 : options.onResponse) {
|
|
3127
|
+
options.onResponse({ ...response, request, rawHeaders: headers, parsedBody });
|
|
3079
3128
|
}
|
|
3080
3129
|
return {
|
|
3081
3130
|
request,
|
|
@@ -3087,15 +3136,15 @@ var require_sendRequest = __commonJS({
|
|
|
3087
3136
|
if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) {
|
|
3088
3137
|
const { response } = e;
|
|
3089
3138
|
const rawHeaders = response.headers.toJSON();
|
|
3090
|
-
options
|
|
3139
|
+
options == null ? void 0 : options.onResponse({ ...response, request, rawHeaders }, e);
|
|
3091
3140
|
}
|
|
3092
3141
|
throw e;
|
|
3093
3142
|
}
|
|
3094
3143
|
}
|
|
3095
3144
|
__name(sendRequest, "sendRequest");
|
|
3096
3145
|
function getRequestContentType(options = {}) {
|
|
3097
|
-
var _a
|
|
3098
|
-
return
|
|
3146
|
+
var _a;
|
|
3147
|
+
return options.contentType ?? ((_a = options.headers) == null ? void 0 : _a["content-type"]) ?? getContentType(options.body);
|
|
3099
3148
|
}
|
|
3100
3149
|
__name(getRequestContentType, "getRequestContentType");
|
|
3101
3150
|
function getContentType(body) {
|
|
@@ -3114,13 +3163,17 @@ var require_sendRequest = __commonJS({
|
|
|
3114
3163
|
}
|
|
3115
3164
|
__name(getContentType, "getContentType");
|
|
3116
3165
|
function buildPipelineRequest(method, url, options = {}) {
|
|
3117
|
-
var _a
|
|
3166
|
+
var _a;
|
|
3118
3167
|
const requestContentType = getRequestContentType(options);
|
|
3119
3168
|
const { body, multipartBody } = getRequestBody(options.body, requestContentType);
|
|
3120
3169
|
const hasContent = body !== void 0 || multipartBody !== void 0;
|
|
3121
|
-
const headers = (0, httpHeaders_js_1.createHttpHeaders)(
|
|
3122
|
-
|
|
3123
|
-
|
|
3170
|
+
const headers = (0, httpHeaders_js_1.createHttpHeaders)({
|
|
3171
|
+
...options.headers ? options.headers : {},
|
|
3172
|
+
accept: options.accept ?? ((_a = options.headers) == null ? void 0 : _a.accept) ?? "application/json",
|
|
3173
|
+
...hasContent && requestContentType && {
|
|
3174
|
+
"content-type": requestContentType
|
|
3175
|
+
}
|
|
3176
|
+
});
|
|
3124
3177
|
return (0, pipelineRequest_js_1.createPipelineRequest)({
|
|
3125
3178
|
url,
|
|
3126
3179
|
method,
|
|
@@ -3170,10 +3223,9 @@ var require_sendRequest = __commonJS({
|
|
|
3170
3223
|
}
|
|
3171
3224
|
__name(getRequestBody, "getRequestBody");
|
|
3172
3225
|
function getResponseBody(response) {
|
|
3173
|
-
|
|
3174
|
-
const contentType = (_a = response.headers.get("content-type")) !== null && _a !== void 0 ? _a : "";
|
|
3226
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
3175
3227
|
const firstType = contentType.split(";")[0];
|
|
3176
|
-
const bodyToParse =
|
|
3228
|
+
const bodyToParse = response.bodyAsText ?? "";
|
|
3177
3229
|
if (firstType === "text/plain") {
|
|
3178
3230
|
return String(bodyToParse);
|
|
3179
3231
|
}
|
|
@@ -3188,9 +3240,8 @@ var require_sendRequest = __commonJS({
|
|
|
3188
3240
|
}
|
|
3189
3241
|
__name(getResponseBody, "getResponseBody");
|
|
3190
3242
|
function createParseError(response, err) {
|
|
3191
|
-
var _a;
|
|
3192
3243
|
const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`;
|
|
3193
|
-
const errCode =
|
|
3244
|
+
const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR;
|
|
3194
3245
|
return new restError_js_1.RestError(msg, {
|
|
3195
3246
|
code: errCode,
|
|
3196
3247
|
statusCode: response.status,
|
|
@@ -3202,9 +3253,9 @@ var require_sendRequest = __commonJS({
|
|
|
3202
3253
|
}
|
|
3203
3254
|
});
|
|
3204
3255
|
|
|
3205
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3256
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/urlHelpers.js
|
|
3206
3257
|
var require_urlHelpers = __commonJS({
|
|
3207
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3258
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/urlHelpers.js"(exports) {
|
|
3208
3259
|
"use strict";
|
|
3209
3260
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3210
3261
|
exports.buildRequestUrl = buildRequestUrl;
|
|
@@ -3257,7 +3308,6 @@ var require_urlHelpers = __commonJS({
|
|
|
3257
3308
|
}
|
|
3258
3309
|
__name(getQueryParamValue, "getQueryParamValue");
|
|
3259
3310
|
function appendQueryParams(url, options = {}) {
|
|
3260
|
-
var _a, _b, _c, _d;
|
|
3261
3311
|
if (!options.queryParameters) {
|
|
3262
3312
|
return url;
|
|
3263
3313
|
}
|
|
@@ -3271,22 +3321,22 @@ var require_urlHelpers = __commonJS({
|
|
|
3271
3321
|
}
|
|
3272
3322
|
const hasMetadata = isQueryParameterWithOptions(param);
|
|
3273
3323
|
const rawValue = hasMetadata ? param.value : param;
|
|
3274
|
-
const explode = hasMetadata ?
|
|
3324
|
+
const explode = hasMetadata ? param.explode ?? false : false;
|
|
3275
3325
|
const style = hasMetadata && param.style ? param.style : "form";
|
|
3276
3326
|
if (explode) {
|
|
3277
3327
|
if (Array.isArray(rawValue)) {
|
|
3278
3328
|
for (const item of rawValue) {
|
|
3279
|
-
paramStrings.push(getQueryParamValue(key,
|
|
3329
|
+
paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item));
|
|
3280
3330
|
}
|
|
3281
3331
|
} else if (typeof rawValue === "object") {
|
|
3282
3332
|
for (const [actualKey, value] of Object.entries(rawValue)) {
|
|
3283
|
-
paramStrings.push(getQueryParamValue(actualKey,
|
|
3333
|
+
paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value));
|
|
3284
3334
|
}
|
|
3285
3335
|
} else {
|
|
3286
3336
|
throw new Error("explode can only be set to true for objects and arrays");
|
|
3287
3337
|
}
|
|
3288
3338
|
} else {
|
|
3289
|
-
paramStrings.push(getQueryParamValue(key,
|
|
3339
|
+
paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue));
|
|
3290
3340
|
}
|
|
3291
3341
|
}
|
|
3292
3342
|
if (parsedUrl.search !== "") {
|
|
@@ -3297,7 +3347,6 @@ var require_urlHelpers = __commonJS({
|
|
|
3297
3347
|
}
|
|
3298
3348
|
__name(appendQueryParams, "appendQueryParams");
|
|
3299
3349
|
function buildBaseUrl(endpoint, options) {
|
|
3300
|
-
var _a;
|
|
3301
3350
|
if (!options.pathParameters) {
|
|
3302
3351
|
return endpoint;
|
|
3303
3352
|
}
|
|
@@ -3313,15 +3362,14 @@ var require_urlHelpers = __commonJS({
|
|
|
3313
3362
|
if (!options.skipUrlEncoding) {
|
|
3314
3363
|
value = encodeURIComponent(param);
|
|
3315
3364
|
}
|
|
3316
|
-
endpoint =
|
|
3365
|
+
endpoint = replaceAll(endpoint, `{${key}}`, value) ?? "";
|
|
3317
3366
|
}
|
|
3318
3367
|
return endpoint;
|
|
3319
3368
|
}
|
|
3320
3369
|
__name(buildBaseUrl, "buildBaseUrl");
|
|
3321
3370
|
function buildRoutePath(routePath, pathParameters, options = {}) {
|
|
3322
|
-
var _a;
|
|
3323
3371
|
for (const pathParam of pathParameters) {
|
|
3324
|
-
const allowReserved = typeof pathParam === "object" && (
|
|
3372
|
+
const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false);
|
|
3325
3373
|
let value = typeof pathParam === "object" ? pathParam.value : pathParam;
|
|
3326
3374
|
if (!options.skipUrlEncoding && !allowReserved) {
|
|
3327
3375
|
value = encodeURIComponent(value);
|
|
@@ -3338,9 +3386,9 @@ var require_urlHelpers = __commonJS({
|
|
|
3338
3386
|
}
|
|
3339
3387
|
});
|
|
3340
3388
|
|
|
3341
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3389
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/getClient.js
|
|
3342
3390
|
var require_getClient = __commonJS({
|
|
3343
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3391
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/getClient.js"(exports) {
|
|
3344
3392
|
"use strict";
|
|
3345
3393
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3346
3394
|
exports.getClient = getClient;
|
|
@@ -3349,9 +3397,9 @@ var require_getClient = __commonJS({
|
|
|
3349
3397
|
var urlHelpers_js_1 = require_urlHelpers();
|
|
3350
3398
|
var checkEnvironment_js_1 = require_checkEnvironment();
|
|
3351
3399
|
function getClient(endpoint, clientOptions = {}) {
|
|
3352
|
-
var _a
|
|
3353
|
-
const pipeline =
|
|
3354
|
-
if ((
|
|
3400
|
+
var _a;
|
|
3401
|
+
const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions);
|
|
3402
|
+
if ((_a = clientOptions.additionalPolicies) == null ? void 0 : _a.length) {
|
|
3355
3403
|
for (const { policy, position } of clientOptions.additionalPolicies) {
|
|
3356
3404
|
const afterPhase = position === "perRetry" ? "Sign" : void 0;
|
|
3357
3405
|
pipeline.addPolicy(policy, {
|
|
@@ -3360,9 +3408,9 @@ var require_getClient = __commonJS({
|
|
|
3360
3408
|
}
|
|
3361
3409
|
}
|
|
3362
3410
|
const { allowInsecureConnection, httpClient } = clientOptions;
|
|
3363
|
-
const endpointUrl =
|
|
3411
|
+
const endpointUrl = clientOptions.endpoint ?? endpoint;
|
|
3364
3412
|
const client = /* @__PURE__ */ __name((path, ...args) => {
|
|
3365
|
-
const getUrl = /* @__PURE__ */ __name((requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path, args,
|
|
3413
|
+
const getUrl = /* @__PURE__ */ __name((requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path, args, { allowInsecureConnection, ...requestOptions }), "getUrl");
|
|
3366
3414
|
return {
|
|
3367
3415
|
get: /* @__PURE__ */ __name((requestOptions = {}) => {
|
|
3368
3416
|
return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient);
|
|
@@ -3398,22 +3446,21 @@ var require_getClient = __commonJS({
|
|
|
3398
3446
|
}
|
|
3399
3447
|
__name(getClient, "getClient");
|
|
3400
3448
|
function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) {
|
|
3401
|
-
|
|
3402
|
-
allowInsecureConnection = (_a = options.allowInsecureConnection) !== null && _a !== void 0 ? _a : allowInsecureConnection;
|
|
3449
|
+
allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection;
|
|
3403
3450
|
return {
|
|
3404
3451
|
then: /* @__PURE__ */ __name(function(onFulfilled, onrejected) {
|
|
3405
|
-
return (0, sendRequest_js_1.sendRequest)(method, url, pipeline,
|
|
3452
|
+
return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected);
|
|
3406
3453
|
}, "then"),
|
|
3407
3454
|
async asBrowserStream() {
|
|
3408
3455
|
if (checkEnvironment_js_1.isNodeLike) {
|
|
3409
3456
|
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`.");
|
|
3410
3457
|
} else {
|
|
3411
|
-
return (0, sendRequest_js_1.sendRequest)(method, url, pipeline,
|
|
3458
|
+
return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient);
|
|
3412
3459
|
}
|
|
3413
3460
|
},
|
|
3414
3461
|
async asNodeStream() {
|
|
3415
3462
|
if (checkEnvironment_js_1.isNodeLike) {
|
|
3416
|
-
return (0, sendRequest_js_1.sendRequest)(method, url, pipeline,
|
|
3463
|
+
return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient);
|
|
3417
3464
|
} else {
|
|
3418
3465
|
throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream.");
|
|
3419
3466
|
}
|
|
@@ -3424,22 +3471,22 @@ var require_getClient = __commonJS({
|
|
|
3424
3471
|
}
|
|
3425
3472
|
});
|
|
3426
3473
|
|
|
3427
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3474
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/operationOptionHelpers.js
|
|
3428
3475
|
var require_operationOptionHelpers = __commonJS({
|
|
3429
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3476
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/operationOptionHelpers.js"(exports) {
|
|
3430
3477
|
"use strict";
|
|
3431
3478
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3432
3479
|
exports.operationOptionsToRequestParameters = operationOptionsToRequestParameters;
|
|
3433
3480
|
function operationOptionsToRequestParameters(options) {
|
|
3434
3481
|
var _a, _b, _c, _d, _e, _f;
|
|
3435
3482
|
return {
|
|
3436
|
-
allowInsecureConnection: (_a = options.requestOptions)
|
|
3437
|
-
timeout: (_b = options.requestOptions)
|
|
3438
|
-
skipUrlEncoding: (_c = options.requestOptions)
|
|
3483
|
+
allowInsecureConnection: (_a = options.requestOptions) == null ? void 0 : _a.allowInsecureConnection,
|
|
3484
|
+
timeout: (_b = options.requestOptions) == null ? void 0 : _b.timeout,
|
|
3485
|
+
skipUrlEncoding: (_c = options.requestOptions) == null ? void 0 : _c.skipUrlEncoding,
|
|
3439
3486
|
abortSignal: options.abortSignal,
|
|
3440
|
-
onUploadProgress: (_d = options.requestOptions)
|
|
3441
|
-
onDownloadProgress: (_e = options.requestOptions)
|
|
3442
|
-
headers:
|
|
3487
|
+
onUploadProgress: (_d = options.requestOptions) == null ? void 0 : _d.onUploadProgress,
|
|
3488
|
+
onDownloadProgress: (_e = options.requestOptions) == null ? void 0 : _e.onDownloadProgress,
|
|
3489
|
+
headers: { ...(_f = options.requestOptions) == null ? void 0 : _f.headers },
|
|
3443
3490
|
onResponse: options.onResponse
|
|
3444
3491
|
};
|
|
3445
3492
|
}
|
|
@@ -3447,33 +3494,32 @@ var require_operationOptionHelpers = __commonJS({
|
|
|
3447
3494
|
}
|
|
3448
3495
|
});
|
|
3449
3496
|
|
|
3450
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3497
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/restError.js
|
|
3451
3498
|
var require_restError2 = __commonJS({
|
|
3452
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3499
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/client/restError.js"(exports) {
|
|
3453
3500
|
"use strict";
|
|
3454
3501
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3455
3502
|
exports.createRestError = createRestError;
|
|
3456
3503
|
var restError_js_1 = require_restError();
|
|
3457
3504
|
var httpHeaders_js_1 = require_httpHeaders();
|
|
3458
3505
|
function createRestError(messageOrResponse, response) {
|
|
3459
|
-
var _a
|
|
3506
|
+
var _a;
|
|
3460
3507
|
const resp = typeof messageOrResponse === "string" ? response : messageOrResponse;
|
|
3461
|
-
const internalError = (
|
|
3462
|
-
const message = typeof messageOrResponse === "string" ? messageOrResponse : (
|
|
3508
|
+
const internalError = ((_a = resp.body) == null ? void 0 : _a.error) ?? resp.body;
|
|
3509
|
+
const message = typeof messageOrResponse === "string" ? messageOrResponse : (internalError == null ? void 0 : internalError.message) ?? `Unexpected status code: ${resp.status}`;
|
|
3463
3510
|
return new restError_js_1.RestError(message, {
|
|
3464
3511
|
statusCode: statusCodeToNumber(resp.status),
|
|
3465
|
-
code: internalError
|
|
3512
|
+
code: internalError == null ? void 0 : internalError.code,
|
|
3466
3513
|
request: resp.request,
|
|
3467
3514
|
response: toPipelineResponse(resp)
|
|
3468
3515
|
});
|
|
3469
3516
|
}
|
|
3470
3517
|
__name(createRestError, "createRestError");
|
|
3471
3518
|
function toPipelineResponse(response) {
|
|
3472
|
-
var _a;
|
|
3473
3519
|
return {
|
|
3474
3520
|
headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers),
|
|
3475
3521
|
request: response.request,
|
|
3476
|
-
status:
|
|
3522
|
+
status: statusCodeToNumber(response.status) ?? -1
|
|
3477
3523
|
};
|
|
3478
3524
|
}
|
|
3479
3525
|
__name(toPipelineResponse, "toPipelineResponse");
|
|
@@ -3485,9 +3531,9 @@ var require_restError2 = __commonJS({
|
|
|
3485
3531
|
}
|
|
3486
3532
|
});
|
|
3487
3533
|
|
|
3488
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3534
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/index.js
|
|
3489
3535
|
var require_commonjs5 = __commonJS({
|
|
3490
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3536
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/index.js"(exports) {
|
|
3491
3537
|
"use strict";
|
|
3492
3538
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3493
3539
|
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;
|
|
@@ -3556,9 +3602,9 @@ var require_commonjs5 = __commonJS({
|
|
|
3556
3602
|
}
|
|
3557
3603
|
});
|
|
3558
3604
|
|
|
3559
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3605
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/pipeline.js
|
|
3560
3606
|
var require_pipeline2 = __commonJS({
|
|
3561
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3607
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/pipeline.js"(exports) {
|
|
3562
3608
|
"use strict";
|
|
3563
3609
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3564
3610
|
exports.createEmptyPipeline = createEmptyPipeline;
|
|
@@ -3570,9 +3616,9 @@ var require_pipeline2 = __commonJS({
|
|
|
3570
3616
|
}
|
|
3571
3617
|
});
|
|
3572
3618
|
|
|
3573
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3619
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/log.js
|
|
3574
3620
|
var require_log2 = __commonJS({
|
|
3575
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3621
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/log.js"(exports) {
|
|
3576
3622
|
"use strict";
|
|
3577
3623
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3578
3624
|
exports.logger = void 0;
|
|
@@ -3581,9 +3627,9 @@ var require_log2 = __commonJS({
|
|
|
3581
3627
|
}
|
|
3582
3628
|
});
|
|
3583
3629
|
|
|
3584
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3630
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/exponentialRetryPolicy.js
|
|
3585
3631
|
var require_exponentialRetryPolicy = __commonJS({
|
|
3586
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3632
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/exponentialRetryPolicy.js"(exports) {
|
|
3587
3633
|
"use strict";
|
|
3588
3634
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3589
3635
|
exports.exponentialRetryPolicyName = void 0;
|
|
@@ -3593,20 +3639,22 @@ var require_exponentialRetryPolicy = __commonJS({
|
|
|
3593
3639
|
var constants_js_1 = require_constants();
|
|
3594
3640
|
exports.exponentialRetryPolicyName = "exponentialRetryPolicy";
|
|
3595
3641
|
function exponentialRetryPolicy(options = {}) {
|
|
3596
|
-
var _a;
|
|
3597
3642
|
return (0, retryPolicy_js_1.retryPolicy)([
|
|
3598
|
-
(0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(
|
|
3643
|
+
(0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({
|
|
3644
|
+
...options,
|
|
3645
|
+
ignoreSystemErrors: true
|
|
3646
|
+
})
|
|
3599
3647
|
], {
|
|
3600
|
-
maxRetries:
|
|
3648
|
+
maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT
|
|
3601
3649
|
});
|
|
3602
3650
|
}
|
|
3603
3651
|
__name(exponentialRetryPolicy, "exponentialRetryPolicy");
|
|
3604
3652
|
}
|
|
3605
3653
|
});
|
|
3606
3654
|
|
|
3607
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3655
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/systemErrorRetryPolicy.js
|
|
3608
3656
|
var require_systemErrorRetryPolicy = __commonJS({
|
|
3609
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3657
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports) {
|
|
3610
3658
|
"use strict";
|
|
3611
3659
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3612
3660
|
exports.systemErrorRetryPolicyName = void 0;
|
|
@@ -3616,13 +3664,15 @@ var require_systemErrorRetryPolicy = __commonJS({
|
|
|
3616
3664
|
var constants_js_1 = require_constants();
|
|
3617
3665
|
exports.systemErrorRetryPolicyName = "systemErrorRetryPolicy";
|
|
3618
3666
|
function systemErrorRetryPolicy(options = {}) {
|
|
3619
|
-
var _a;
|
|
3620
3667
|
return {
|
|
3621
3668
|
name: exports.systemErrorRetryPolicyName,
|
|
3622
3669
|
sendRequest: (0, retryPolicy_js_1.retryPolicy)([
|
|
3623
|
-
(0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(
|
|
3670
|
+
(0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({
|
|
3671
|
+
...options,
|
|
3672
|
+
ignoreHttpStatusCodes: true
|
|
3673
|
+
})
|
|
3624
3674
|
], {
|
|
3625
|
-
maxRetries:
|
|
3675
|
+
maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT
|
|
3626
3676
|
}).sendRequest
|
|
3627
3677
|
};
|
|
3628
3678
|
}
|
|
@@ -3630,9 +3680,9 @@ var require_systemErrorRetryPolicy = __commonJS({
|
|
|
3630
3680
|
}
|
|
3631
3681
|
});
|
|
3632
3682
|
|
|
3633
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3683
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/throttlingRetryPolicy.js
|
|
3634
3684
|
var require_throttlingRetryPolicy = __commonJS({
|
|
3635
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3685
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/throttlingRetryPolicy.js"(exports) {
|
|
3636
3686
|
"use strict";
|
|
3637
3687
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3638
3688
|
exports.throttlingRetryPolicyName = void 0;
|
|
@@ -3642,11 +3692,10 @@ var require_throttlingRetryPolicy = __commonJS({
|
|
|
3642
3692
|
var constants_js_1 = require_constants();
|
|
3643
3693
|
exports.throttlingRetryPolicyName = "throttlingRetryPolicy";
|
|
3644
3694
|
function throttlingRetryPolicy(options = {}) {
|
|
3645
|
-
var _a;
|
|
3646
3695
|
return {
|
|
3647
3696
|
name: exports.throttlingRetryPolicyName,
|
|
3648
3697
|
sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], {
|
|
3649
|
-
maxRetries:
|
|
3698
|
+
maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT
|
|
3650
3699
|
}).sendRequest
|
|
3651
3700
|
};
|
|
3652
3701
|
}
|
|
@@ -3654,9 +3703,9 @@ var require_throttlingRetryPolicy = __commonJS({
|
|
|
3654
3703
|
}
|
|
3655
3704
|
});
|
|
3656
3705
|
|
|
3657
|
-
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3706
|
+
// ../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/internal.js
|
|
3658
3707
|
var require_internal2 = __commonJS({
|
|
3659
|
-
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.
|
|
3708
|
+
"../../node_modules/.store/@typespec-ts-http-runtime-npm-0.3.1-3e5b754037/package/dist/commonjs/policies/internal.js"(exports) {
|
|
3660
3709
|
"use strict";
|
|
3661
3710
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3662
3711
|
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;
|
|
@@ -3761,9 +3810,9 @@ var require_internal2 = __commonJS({
|
|
|
3761
3810
|
}
|
|
3762
3811
|
});
|
|
3763
3812
|
|
|
3764
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3813
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/logPolicy.js
|
|
3765
3814
|
var require_logPolicy2 = __commonJS({
|
|
3766
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3815
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/logPolicy.js"(exports) {
|
|
3767
3816
|
"use strict";
|
|
3768
3817
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3769
3818
|
exports.logPolicyName = void 0;
|
|
@@ -3772,15 +3821,18 @@ var require_logPolicy2 = __commonJS({
|
|
|
3772
3821
|
var policies_1 = require_internal2();
|
|
3773
3822
|
exports.logPolicyName = policies_1.logPolicyName;
|
|
3774
3823
|
function logPolicy(options = {}) {
|
|
3775
|
-
return (0, policies_1.logPolicy)(
|
|
3824
|
+
return (0, policies_1.logPolicy)({
|
|
3825
|
+
logger: log_js_1.logger.info,
|
|
3826
|
+
...options
|
|
3827
|
+
});
|
|
3776
3828
|
}
|
|
3777
3829
|
__name(logPolicy, "logPolicy");
|
|
3778
3830
|
}
|
|
3779
3831
|
});
|
|
3780
3832
|
|
|
3781
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3833
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/redirectPolicy.js
|
|
3782
3834
|
var require_redirectPolicy2 = __commonJS({
|
|
3783
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3835
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/redirectPolicy.js"(exports) {
|
|
3784
3836
|
"use strict";
|
|
3785
3837
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3786
3838
|
exports.redirectPolicyName = void 0;
|
|
@@ -3794,23 +3846,23 @@ var require_redirectPolicy2 = __commonJS({
|
|
|
3794
3846
|
}
|
|
3795
3847
|
});
|
|
3796
3848
|
|
|
3797
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3849
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/util/userAgentPlatform.js
|
|
3798
3850
|
var require_userAgentPlatform2 = __commonJS({
|
|
3799
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3851
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/util/userAgentPlatform.js"(exports) {
|
|
3800
3852
|
"use strict";
|
|
3801
3853
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3802
3854
|
exports.getHeaderName = getHeaderName;
|
|
3803
3855
|
exports.setPlatformSpecificData = setPlatformSpecificData;
|
|
3804
3856
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
3805
|
-
var
|
|
3806
|
-
var
|
|
3857
|
+
var node_os_1 = tslib_1.__importDefault(__require("node:os"));
|
|
3858
|
+
var node_process_1 = tslib_1.__importDefault(__require("node:process"));
|
|
3807
3859
|
function getHeaderName() {
|
|
3808
3860
|
return "User-Agent";
|
|
3809
3861
|
}
|
|
3810
3862
|
__name(getHeaderName, "getHeaderName");
|
|
3811
3863
|
async function setPlatformSpecificData(map) {
|
|
3812
|
-
if (
|
|
3813
|
-
const versions =
|
|
3864
|
+
if (node_process_1.default && node_process_1.default.versions) {
|
|
3865
|
+
const versions = node_process_1.default.versions;
|
|
3814
3866
|
if (versions.bun) {
|
|
3815
3867
|
map.set("Bun", versions.bun);
|
|
3816
3868
|
} else if (versions.deno) {
|
|
@@ -3819,26 +3871,26 @@ var require_userAgentPlatform2 = __commonJS({
|
|
|
3819
3871
|
map.set("Node", versions.node);
|
|
3820
3872
|
}
|
|
3821
3873
|
}
|
|
3822
|
-
map.set("OS", `(${
|
|
3874
|
+
map.set("OS", `(${node_os_1.default.arch()}-${node_os_1.default.type()}-${node_os_1.default.release()})`);
|
|
3823
3875
|
}
|
|
3824
3876
|
__name(setPlatformSpecificData, "setPlatformSpecificData");
|
|
3825
3877
|
}
|
|
3826
3878
|
});
|
|
3827
3879
|
|
|
3828
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3880
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/constants.js
|
|
3829
3881
|
var require_constants2 = __commonJS({
|
|
3830
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3882
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/constants.js"(exports) {
|
|
3831
3883
|
"use strict";
|
|
3832
3884
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3833
3885
|
exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0;
|
|
3834
|
-
exports.SDK_VERSION = "1.22.
|
|
3886
|
+
exports.SDK_VERSION = "1.22.1";
|
|
3835
3887
|
exports.DEFAULT_RETRY_POLICY_COUNT = 3;
|
|
3836
3888
|
}
|
|
3837
3889
|
});
|
|
3838
3890
|
|
|
3839
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3891
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/util/userAgent.js
|
|
3840
3892
|
var require_userAgent2 = __commonJS({
|
|
3841
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3893
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/util/userAgent.js"(exports) {
|
|
3842
3894
|
"use strict";
|
|
3843
3895
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3844
3896
|
exports.getUserAgentHeaderName = getUserAgentHeaderName;
|
|
@@ -3870,9 +3922,9 @@ var require_userAgent2 = __commonJS({
|
|
|
3870
3922
|
}
|
|
3871
3923
|
});
|
|
3872
3924
|
|
|
3873
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3925
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/userAgentPolicy.js
|
|
3874
3926
|
var require_userAgentPolicy2 = __commonJS({
|
|
3875
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3927
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/userAgentPolicy.js"(exports) {
|
|
3876
3928
|
"use strict";
|
|
3877
3929
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3878
3930
|
exports.userAgentPolicyName = void 0;
|
|
@@ -3896,9 +3948,9 @@ var require_userAgentPolicy2 = __commonJS({
|
|
|
3896
3948
|
}
|
|
3897
3949
|
});
|
|
3898
3950
|
|
|
3899
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3951
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/util/file.js
|
|
3900
3952
|
var require_file = __commonJS({
|
|
3901
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
3953
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/util/file.js"(exports) {
|
|
3902
3954
|
"use strict";
|
|
3903
3955
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3904
3956
|
exports.hasRawContent = hasRawContent;
|
|
@@ -3938,20 +3990,37 @@ var require_file = __commonJS({
|
|
|
3938
3990
|
}
|
|
3939
3991
|
__name(getRawContent, "getRawContent");
|
|
3940
3992
|
function createFileFromStream(stream, name, options = {}) {
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3993
|
+
return {
|
|
3994
|
+
...unimplementedMethods,
|
|
3995
|
+
type: options.type ?? "",
|
|
3996
|
+
lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(),
|
|
3997
|
+
webkitRelativePath: options.webkitRelativePath ?? "",
|
|
3998
|
+
size: options.size ?? -1,
|
|
3999
|
+
name,
|
|
4000
|
+
stream: /* @__PURE__ */ __name(() => {
|
|
4001
|
+
const s = stream();
|
|
4002
|
+
if (isNodeReadableStream(s)) {
|
|
4003
|
+
throw new Error("Not supported: a Node stream was provided as input to createFileFromStream.");
|
|
4004
|
+
}
|
|
4005
|
+
return s;
|
|
4006
|
+
}, "stream"),
|
|
4007
|
+
[rawContent]: stream
|
|
4008
|
+
};
|
|
3949
4009
|
}
|
|
3950
4010
|
__name(createFileFromStream, "createFileFromStream");
|
|
3951
4011
|
function createFile(content, name, options = {}) {
|
|
3952
|
-
var _a, _b, _c;
|
|
3953
4012
|
if (core_util_1.isNodeLike) {
|
|
3954
|
-
return
|
|
4013
|
+
return {
|
|
4014
|
+
...unimplementedMethods,
|
|
4015
|
+
type: options.type ?? "",
|
|
4016
|
+
lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(),
|
|
4017
|
+
webkitRelativePath: options.webkitRelativePath ?? "",
|
|
4018
|
+
size: content.byteLength,
|
|
4019
|
+
name,
|
|
4020
|
+
arrayBuffer: /* @__PURE__ */ __name(async () => content.buffer, "arrayBuffer"),
|
|
4021
|
+
stream: /* @__PURE__ */ __name(() => new Blob([content]).stream(), "stream"),
|
|
4022
|
+
[rawContent]: () => content
|
|
4023
|
+
};
|
|
3955
4024
|
} else {
|
|
3956
4025
|
return new File([content], name, options);
|
|
3957
4026
|
}
|
|
@@ -3960,9 +4029,9 @@ var require_file = __commonJS({
|
|
|
3960
4029
|
}
|
|
3961
4030
|
});
|
|
3962
4031
|
|
|
3963
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4032
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/multipartPolicy.js
|
|
3964
4033
|
var require_multipartPolicy2 = __commonJS({
|
|
3965
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4034
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/multipartPolicy.js"(exports) {
|
|
3966
4035
|
"use strict";
|
|
3967
4036
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3968
4037
|
exports.multipartPolicyName = void 0;
|
|
@@ -3990,9 +4059,9 @@ var require_multipartPolicy2 = __commonJS({
|
|
|
3990
4059
|
}
|
|
3991
4060
|
});
|
|
3992
4061
|
|
|
3993
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4062
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/decompressResponsePolicy.js
|
|
3994
4063
|
var require_decompressResponsePolicy2 = __commonJS({
|
|
3995
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4064
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/decompressResponsePolicy.js"(exports) {
|
|
3996
4065
|
"use strict";
|
|
3997
4066
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3998
4067
|
exports.decompressResponsePolicyName = void 0;
|
|
@@ -4006,9 +4075,9 @@ var require_decompressResponsePolicy2 = __commonJS({
|
|
|
4006
4075
|
}
|
|
4007
4076
|
});
|
|
4008
4077
|
|
|
4009
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4078
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/defaultRetryPolicy.js
|
|
4010
4079
|
var require_defaultRetryPolicy2 = __commonJS({
|
|
4011
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4080
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/defaultRetryPolicy.js"(exports) {
|
|
4012
4081
|
"use strict";
|
|
4013
4082
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4014
4083
|
exports.defaultRetryPolicyName = void 0;
|
|
@@ -4022,9 +4091,9 @@ var require_defaultRetryPolicy2 = __commonJS({
|
|
|
4022
4091
|
}
|
|
4023
4092
|
});
|
|
4024
4093
|
|
|
4025
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4094
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/formDataPolicy.js
|
|
4026
4095
|
var require_formDataPolicy2 = __commonJS({
|
|
4027
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4096
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/formDataPolicy.js"(exports) {
|
|
4028
4097
|
"use strict";
|
|
4029
4098
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4030
4099
|
exports.formDataPolicyName = void 0;
|
|
@@ -4038,9 +4107,9 @@ var require_formDataPolicy2 = __commonJS({
|
|
|
4038
4107
|
}
|
|
4039
4108
|
});
|
|
4040
4109
|
|
|
4041
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4110
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/proxyPolicy.js
|
|
4042
4111
|
var require_proxyPolicy2 = __commonJS({
|
|
4043
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4112
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/proxyPolicy.js"(exports) {
|
|
4044
4113
|
"use strict";
|
|
4045
4114
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4046
4115
|
exports.proxyPolicyName = void 0;
|
|
@@ -4059,9 +4128,9 @@ var require_proxyPolicy2 = __commonJS({
|
|
|
4059
4128
|
}
|
|
4060
4129
|
});
|
|
4061
4130
|
|
|
4062
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4131
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/setClientRequestIdPolicy.js
|
|
4063
4132
|
var require_setClientRequestIdPolicy = __commonJS({
|
|
4064
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4133
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports) {
|
|
4065
4134
|
"use strict";
|
|
4066
4135
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4067
4136
|
exports.setClientRequestIdPolicyName = void 0;
|
|
@@ -4082,9 +4151,9 @@ var require_setClientRequestIdPolicy = __commonJS({
|
|
|
4082
4151
|
}
|
|
4083
4152
|
});
|
|
4084
4153
|
|
|
4085
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4154
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/agentPolicy.js
|
|
4086
4155
|
var require_agentPolicy2 = __commonJS({
|
|
4087
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4156
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/agentPolicy.js"(exports) {
|
|
4088
4157
|
"use strict";
|
|
4089
4158
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4090
4159
|
exports.agentPolicyName = void 0;
|
|
@@ -4098,9 +4167,9 @@ var require_agentPolicy2 = __commonJS({
|
|
|
4098
4167
|
}
|
|
4099
4168
|
});
|
|
4100
4169
|
|
|
4101
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4170
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/tlsPolicy.js
|
|
4102
4171
|
var require_tlsPolicy2 = __commonJS({
|
|
4103
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4172
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/tlsPolicy.js"(exports) {
|
|
4104
4173
|
"use strict";
|
|
4105
4174
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4106
4175
|
exports.tlsPolicyName = void 0;
|
|
@@ -4114,9 +4183,9 @@ var require_tlsPolicy2 = __commonJS({
|
|
|
4114
4183
|
}
|
|
4115
4184
|
});
|
|
4116
4185
|
|
|
4117
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4186
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/restError.js
|
|
4118
4187
|
var require_restError3 = __commonJS({
|
|
4119
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4188
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/restError.js"(exports) {
|
|
4120
4189
|
"use strict";
|
|
4121
4190
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4122
4191
|
exports.RestError = void 0;
|
|
@@ -4130,9 +4199,9 @@ var require_restError3 = __commonJS({
|
|
|
4130
4199
|
}
|
|
4131
4200
|
});
|
|
4132
4201
|
|
|
4133
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4202
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/tracingPolicy.js
|
|
4134
4203
|
var require_tracingPolicy = __commonJS({
|
|
4135
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4204
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/tracingPolicy.js"(exports) {
|
|
4136
4205
|
"use strict";
|
|
4137
4206
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4138
4207
|
exports.tracingPolicyName = void 0;
|
|
@@ -4154,7 +4223,6 @@ var require_tracingPolicy = __commonJS({
|
|
|
4154
4223
|
return {
|
|
4155
4224
|
name: exports.tracingPolicyName,
|
|
4156
4225
|
async sendRequest(request, next) {
|
|
4157
|
-
var _a;
|
|
4158
4226
|
if (!tracingClient) {
|
|
4159
4227
|
return next(request);
|
|
4160
4228
|
}
|
|
@@ -4168,7 +4236,7 @@ var require_tracingPolicy = __commonJS({
|
|
|
4168
4236
|
if (userAgent) {
|
|
4169
4237
|
spanAttributes["http.user_agent"] = userAgent;
|
|
4170
4238
|
}
|
|
4171
|
-
const { span, tracingContext } =
|
|
4239
|
+
const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {};
|
|
4172
4240
|
if (!span || !tracingContext) {
|
|
4173
4241
|
return next(request);
|
|
4174
4242
|
}
|
|
@@ -4254,9 +4322,9 @@ var require_tracingPolicy = __commonJS({
|
|
|
4254
4322
|
}
|
|
4255
4323
|
});
|
|
4256
4324
|
|
|
4257
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4325
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/util/wrapAbortSignal.js
|
|
4258
4326
|
var require_wrapAbortSignal = __commonJS({
|
|
4259
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4327
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/util/wrapAbortSignal.js"(exports) {
|
|
4260
4328
|
"use strict";
|
|
4261
4329
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4262
4330
|
exports.wrapAbortSignalLike = wrapAbortSignalLike;
|
|
@@ -4288,9 +4356,9 @@ var require_wrapAbortSignal = __commonJS({
|
|
|
4288
4356
|
}
|
|
4289
4357
|
});
|
|
4290
4358
|
|
|
4291
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4359
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/wrapAbortSignalLikePolicy.js
|
|
4292
4360
|
var require_wrapAbortSignalLikePolicy = __commonJS({
|
|
4293
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4361
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports) {
|
|
4294
4362
|
"use strict";
|
|
4295
4363
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4296
4364
|
exports.wrapAbortSignalLikePolicyName = void 0;
|
|
@@ -4309,7 +4377,7 @@ var require_wrapAbortSignalLikePolicy = __commonJS({
|
|
|
4309
4377
|
try {
|
|
4310
4378
|
return await next(request);
|
|
4311
4379
|
} finally {
|
|
4312
|
-
cleanup
|
|
4380
|
+
cleanup == null ? void 0 : cleanup();
|
|
4313
4381
|
}
|
|
4314
4382
|
}, "sendRequest")
|
|
4315
4383
|
};
|
|
@@ -4318,9 +4386,9 @@ var require_wrapAbortSignalLikePolicy = __commonJS({
|
|
|
4318
4386
|
}
|
|
4319
4387
|
});
|
|
4320
4388
|
|
|
4321
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4389
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/createPipelineFromOptions.js
|
|
4322
4390
|
var require_createPipelineFromOptions2 = __commonJS({
|
|
4323
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4391
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/createPipelineFromOptions.js"(exports) {
|
|
4324
4392
|
"use strict";
|
|
4325
4393
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4326
4394
|
exports.createPipelineFromOptions = createPipelineFromOptions;
|
|
@@ -4355,10 +4423,10 @@ var require_createPipelineFromOptions2 = __commonJS({
|
|
|
4355
4423
|
pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)());
|
|
4356
4424
|
pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] });
|
|
4357
4425
|
pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions));
|
|
4358
|
-
pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions)
|
|
4426
|
+
pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) == null ? void 0 : _a.clientRequestIdHeaderName));
|
|
4359
4427
|
pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" });
|
|
4360
4428
|
pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" });
|
|
4361
|
-
pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(
|
|
4429
|
+
pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), {
|
|
4362
4430
|
afterPhase: "Retry"
|
|
4363
4431
|
});
|
|
4364
4432
|
if (core_util_1.isNodeLike) {
|
|
@@ -4371,9 +4439,9 @@ var require_createPipelineFromOptions2 = __commonJS({
|
|
|
4371
4439
|
}
|
|
4372
4440
|
});
|
|
4373
4441
|
|
|
4374
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4442
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/defaultHttpClient.js
|
|
4375
4443
|
var require_defaultHttpClient2 = __commonJS({
|
|
4376
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4444
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/defaultHttpClient.js"(exports) {
|
|
4377
4445
|
"use strict";
|
|
4378
4446
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4379
4447
|
exports.createDefaultHttpClient = createDefaultHttpClient;
|
|
@@ -4388,7 +4456,7 @@ var require_defaultHttpClient2 = __commonJS({
|
|
|
4388
4456
|
request.abortSignal = abortSignal;
|
|
4389
4457
|
return await client.sendRequest(request);
|
|
4390
4458
|
} finally {
|
|
4391
|
-
cleanup
|
|
4459
|
+
cleanup == null ? void 0 : cleanup();
|
|
4392
4460
|
}
|
|
4393
4461
|
}
|
|
4394
4462
|
};
|
|
@@ -4397,9 +4465,9 @@ var require_defaultHttpClient2 = __commonJS({
|
|
|
4397
4465
|
}
|
|
4398
4466
|
});
|
|
4399
4467
|
|
|
4400
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4468
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/httpHeaders.js
|
|
4401
4469
|
var require_httpHeaders2 = __commonJS({
|
|
4402
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4470
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/httpHeaders.js"(exports) {
|
|
4403
4471
|
"use strict";
|
|
4404
4472
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4405
4473
|
exports.createHttpHeaders = createHttpHeaders;
|
|
@@ -4411,9 +4479,9 @@ var require_httpHeaders2 = __commonJS({
|
|
|
4411
4479
|
}
|
|
4412
4480
|
});
|
|
4413
4481
|
|
|
4414
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4482
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/pipelineRequest.js
|
|
4415
4483
|
var require_pipelineRequest2 = __commonJS({
|
|
4416
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4484
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/pipelineRequest.js"(exports) {
|
|
4417
4485
|
"use strict";
|
|
4418
4486
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4419
4487
|
exports.createPipelineRequest = createPipelineRequest;
|
|
@@ -4425,9 +4493,9 @@ var require_pipelineRequest2 = __commonJS({
|
|
|
4425
4493
|
}
|
|
4426
4494
|
});
|
|
4427
4495
|
|
|
4428
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4496
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/exponentialRetryPolicy.js
|
|
4429
4497
|
var require_exponentialRetryPolicy2 = __commonJS({
|
|
4430
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4498
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/exponentialRetryPolicy.js"(exports) {
|
|
4431
4499
|
"use strict";
|
|
4432
4500
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4433
4501
|
exports.exponentialRetryPolicyName = void 0;
|
|
@@ -4441,9 +4509,9 @@ var require_exponentialRetryPolicy2 = __commonJS({
|
|
|
4441
4509
|
}
|
|
4442
4510
|
});
|
|
4443
4511
|
|
|
4444
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4512
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/systemErrorRetryPolicy.js
|
|
4445
4513
|
var require_systemErrorRetryPolicy2 = __commonJS({
|
|
4446
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4514
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports) {
|
|
4447
4515
|
"use strict";
|
|
4448
4516
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4449
4517
|
exports.systemErrorRetryPolicyName = void 0;
|
|
@@ -4457,9 +4525,9 @@ var require_systemErrorRetryPolicy2 = __commonJS({
|
|
|
4457
4525
|
}
|
|
4458
4526
|
});
|
|
4459
4527
|
|
|
4460
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4528
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/throttlingRetryPolicy.js
|
|
4461
4529
|
var require_throttlingRetryPolicy2 = __commonJS({
|
|
4462
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4530
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/throttlingRetryPolicy.js"(exports) {
|
|
4463
4531
|
"use strict";
|
|
4464
4532
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4465
4533
|
exports.throttlingRetryPolicyName = void 0;
|
|
@@ -4473,9 +4541,9 @@ var require_throttlingRetryPolicy2 = __commonJS({
|
|
|
4473
4541
|
}
|
|
4474
4542
|
});
|
|
4475
4543
|
|
|
4476
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4544
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/retryPolicy.js
|
|
4477
4545
|
var require_retryPolicy2 = __commonJS({
|
|
4478
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4546
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/retryPolicy.js"(exports) {
|
|
4479
4547
|
"use strict";
|
|
4480
4548
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4481
4549
|
exports.retryPolicy = retryPolicy;
|
|
@@ -4484,15 +4552,18 @@ var require_retryPolicy2 = __commonJS({
|
|
|
4484
4552
|
var policies_1 = require_internal2();
|
|
4485
4553
|
var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy");
|
|
4486
4554
|
function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) {
|
|
4487
|
-
return (0, policies_1.retryPolicy)(strategies,
|
|
4555
|
+
return (0, policies_1.retryPolicy)(strategies, {
|
|
4556
|
+
logger: retryPolicyLogger,
|
|
4557
|
+
...options
|
|
4558
|
+
});
|
|
4488
4559
|
}
|
|
4489
4560
|
__name(retryPolicy, "retryPolicy");
|
|
4490
4561
|
}
|
|
4491
4562
|
});
|
|
4492
4563
|
|
|
4493
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4564
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/util/tokenCycler.js
|
|
4494
4565
|
var require_tokenCycler = __commonJS({
|
|
4495
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4566
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/util/tokenCycler.js"(exports) {
|
|
4496
4567
|
"use strict";
|
|
4497
4568
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4498
4569
|
exports.DEFAULT_CYCLER_OPTIONS = void 0;
|
|
@@ -4511,7 +4582,7 @@ var require_tokenCycler = __commonJS({
|
|
|
4511
4582
|
if (Date.now() < refreshTimeout) {
|
|
4512
4583
|
try {
|
|
4513
4584
|
return await getAccessToken();
|
|
4514
|
-
} catch
|
|
4585
|
+
} catch {
|
|
4515
4586
|
return null;
|
|
4516
4587
|
}
|
|
4517
4588
|
} else {
|
|
@@ -4535,7 +4606,10 @@ var require_tokenCycler = __commonJS({
|
|
|
4535
4606
|
let refreshWorker = null;
|
|
4536
4607
|
let token = null;
|
|
4537
4608
|
let tenantId;
|
|
4538
|
-
const options =
|
|
4609
|
+
const options = {
|
|
4610
|
+
...exports.DEFAULT_CYCLER_OPTIONS,
|
|
4611
|
+
...tokenCyclerOptions
|
|
4612
|
+
};
|
|
4539
4613
|
const cycler = {
|
|
4540
4614
|
/**
|
|
4541
4615
|
* Produces true if a refresh job is currently in progress.
|
|
@@ -4548,14 +4622,13 @@ var require_tokenCycler = __commonJS({
|
|
|
4548
4622
|
* window and not already refreshing)
|
|
4549
4623
|
*/
|
|
4550
4624
|
get shouldRefresh() {
|
|
4551
|
-
var _a;
|
|
4552
4625
|
if (cycler.isRefreshing) {
|
|
4553
4626
|
return false;
|
|
4554
4627
|
}
|
|
4555
|
-
if ((token
|
|
4628
|
+
if ((token == null ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) {
|
|
4556
4629
|
return true;
|
|
4557
4630
|
}
|
|
4558
|
-
return ((
|
|
4631
|
+
return ((token == null ? void 0 : token.expiresOnTimestamp) ?? 0) - options.refreshWindowInMs < Date.now();
|
|
4559
4632
|
},
|
|
4560
4633
|
/**
|
|
4561
4634
|
* Produces true if the cycler MUST refresh (null or nearly-expired
|
|
@@ -4566,14 +4639,13 @@ var require_tokenCycler = __commonJS({
|
|
|
4566
4639
|
}
|
|
4567
4640
|
};
|
|
4568
4641
|
function refresh(scopes, getTokenOptions) {
|
|
4569
|
-
var _a;
|
|
4570
4642
|
if (!cycler.isRefreshing) {
|
|
4571
4643
|
const tryGetAccessToken = /* @__PURE__ */ __name(() => credential.getToken(scopes, getTokenOptions), "tryGetAccessToken");
|
|
4572
4644
|
refreshWorker = beginRefresh(
|
|
4573
4645
|
tryGetAccessToken,
|
|
4574
4646
|
options.retryIntervalInMs,
|
|
4575
4647
|
// If we don't have a token, then we should timeout immediately
|
|
4576
|
-
(
|
|
4648
|
+
(token == null ? void 0 : token.expiresOnTimestamp) ?? Date.now()
|
|
4577
4649
|
).then((_token) => {
|
|
4578
4650
|
refreshWorker = null;
|
|
4579
4651
|
token = _token;
|
|
@@ -4609,9 +4681,9 @@ var require_tokenCycler = __commonJS({
|
|
|
4609
4681
|
}
|
|
4610
4682
|
});
|
|
4611
4683
|
|
|
4612
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4684
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js
|
|
4613
4685
|
var require_bearerTokenAuthenticationPolicy = __commonJS({
|
|
4614
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4686
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js"(exports) {
|
|
4615
4687
|
"use strict";
|
|
4616
4688
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4617
4689
|
exports.bearerTokenAuthenticationPolicyName = void 0;
|
|
@@ -4651,7 +4723,6 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({
|
|
|
4651
4723
|
}
|
|
4652
4724
|
__name(isChallengeResponse, "isChallengeResponse");
|
|
4653
4725
|
async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) {
|
|
4654
|
-
var _a;
|
|
4655
4726
|
const { scopes } = onChallengeOptions;
|
|
4656
4727
|
const accessToken = await onChallengeOptions.getAccessToken(scopes, {
|
|
4657
4728
|
enableCae: true,
|
|
@@ -4660,17 +4731,17 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({
|
|
|
4660
4731
|
if (!accessToken) {
|
|
4661
4732
|
return false;
|
|
4662
4733
|
}
|
|
4663
|
-
onChallengeOptions.request.headers.set("Authorization", `${
|
|
4734
|
+
onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`);
|
|
4664
4735
|
return true;
|
|
4665
4736
|
}
|
|
4666
4737
|
__name(authorizeRequestOnCaeChallenge, "authorizeRequestOnCaeChallenge");
|
|
4667
4738
|
function bearerTokenAuthenticationPolicy(options) {
|
|
4668
|
-
var _a, _b
|
|
4739
|
+
var _a, _b;
|
|
4669
4740
|
const { credential, scopes, challengeCallbacks } = options;
|
|
4670
4741
|
const logger = options.logger || log_js_1.logger;
|
|
4671
4742
|
const callbacks = {
|
|
4672
|
-
authorizeRequest: (
|
|
4673
|
-
authorizeRequestOnChallenge: (
|
|
4743
|
+
authorizeRequest: ((_a = challengeCallbacks == null ? void 0 : challengeCallbacks.authorizeRequest) == null ? void 0 : _a.bind(challengeCallbacks)) ?? defaultAuthorizeRequest,
|
|
4744
|
+
authorizeRequestOnChallenge: (_b = challengeCallbacks == null ? void 0 : challengeCallbacks.authorizeRequestOnChallenge) == null ? void 0 : _b.bind(challengeCallbacks)
|
|
4674
4745
|
};
|
|
4675
4746
|
const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)(
|
|
4676
4747
|
credential
|
|
@@ -4793,15 +4864,15 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({
|
|
|
4793
4864
|
return;
|
|
4794
4865
|
}
|
|
4795
4866
|
const parsedChallenges = parseChallenges(challenges);
|
|
4796
|
-
return (_a = parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims"))
|
|
4867
|
+
return (_a = parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")) == null ? void 0 : _a.params.claims;
|
|
4797
4868
|
}
|
|
4798
4869
|
__name(getCaeChallengeClaims, "getCaeChallengeClaims");
|
|
4799
4870
|
}
|
|
4800
4871
|
});
|
|
4801
4872
|
|
|
4802
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4873
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/ndJsonPolicy.js
|
|
4803
4874
|
var require_ndJsonPolicy = __commonJS({
|
|
4804
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4875
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/ndJsonPolicy.js"(exports) {
|
|
4805
4876
|
"use strict";
|
|
4806
4877
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4807
4878
|
exports.ndJsonPolicyName = void 0;
|
|
@@ -4825,9 +4896,9 @@ var require_ndJsonPolicy = __commonJS({
|
|
|
4825
4896
|
}
|
|
4826
4897
|
});
|
|
4827
4898
|
|
|
4828
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4899
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/auxiliaryAuthenticationHeaderPolicy.js
|
|
4829
4900
|
var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({
|
|
4830
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4901
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/policies/auxiliaryAuthenticationHeaderPolicy.js"(exports) {
|
|
4831
4902
|
"use strict";
|
|
4832
4903
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4833
4904
|
exports.auxiliaryAuthenticationHeaderPolicyName = void 0;
|
|
@@ -4837,13 +4908,13 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({
|
|
|
4837
4908
|
exports.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy";
|
|
4838
4909
|
var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary";
|
|
4839
4910
|
async function sendAuthorizeRequest(options) {
|
|
4840
|
-
var _a
|
|
4911
|
+
var _a;
|
|
4841
4912
|
const { scopes, getAccessToken, request } = options;
|
|
4842
4913
|
const getTokenOptions = {
|
|
4843
4914
|
abortSignal: request.abortSignal,
|
|
4844
4915
|
tracingOptions: request.tracingOptions
|
|
4845
4916
|
};
|
|
4846
|
-
return (
|
|
4917
|
+
return ((_a = await getAccessToken(scopes, getTokenOptions)) == null ? void 0 : _a.token) ?? "";
|
|
4847
4918
|
}
|
|
4848
4919
|
__name(sendAuthorizeRequest, "sendAuthorizeRequest");
|
|
4849
4920
|
function auxiliaryAuthenticationHeaderPolicy(options) {
|
|
@@ -4888,9 +4959,9 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({
|
|
|
4888
4959
|
}
|
|
4889
4960
|
});
|
|
4890
4961
|
|
|
4891
|
-
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4962
|
+
// ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/index.js
|
|
4892
4963
|
var require_commonjs6 = __commonJS({
|
|
4893
|
-
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.
|
|
4964
|
+
"../../node_modules/.store/@azure-core-rest-pipeline-npm-1.22.1-38824241ab/package/dist/commonjs/index.js"(exports) {
|
|
4894
4965
|
"use strict";
|
|
4895
4966
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4896
4967
|
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;
|
|
@@ -5061,9 +5132,9 @@ var require_commonjs6 = __commonJS({
|
|
|
5061
5132
|
}
|
|
5062
5133
|
});
|
|
5063
5134
|
|
|
5064
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
5135
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/base64.js
|
|
5065
5136
|
var require_base64 = __commonJS({
|
|
5066
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
5137
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/base64.js"(exports) {
|
|
5067
5138
|
"use strict";
|
|
5068
5139
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5069
5140
|
exports.encodeString = encodeString;
|
|
@@ -5090,9 +5161,9 @@ var require_base64 = __commonJS({
|
|
|
5090
5161
|
}
|
|
5091
5162
|
});
|
|
5092
5163
|
|
|
5093
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
5164
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/interfaces.js
|
|
5094
5165
|
var require_interfaces = __commonJS({
|
|
5095
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
5166
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/interfaces.js"(exports) {
|
|
5096
5167
|
"use strict";
|
|
5097
5168
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5098
5169
|
exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0;
|
|
@@ -5101,9 +5172,9 @@ var require_interfaces = __commonJS({
|
|
|
5101
5172
|
}
|
|
5102
5173
|
});
|
|
5103
5174
|
|
|
5104
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
5175
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/utils.js
|
|
5105
5176
|
var require_utils = __commonJS({
|
|
5106
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
5177
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/utils.js"(exports) {
|
|
5107
5178
|
"use strict";
|
|
5108
5179
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5109
5180
|
exports.isPrimitiveBody = isPrimitiveBody;
|
|
@@ -5111,7 +5182,7 @@ var require_utils = __commonJS({
|
|
|
5111
5182
|
exports.isValidUuid = isValidUuid;
|
|
5112
5183
|
exports.flattenResponse = flattenResponse;
|
|
5113
5184
|
function isPrimitiveBody(value, mapperTypeName) {
|
|
5114
|
-
return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName
|
|
5185
|
+
return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName == null ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null);
|
|
5115
5186
|
}
|
|
5116
5187
|
__name(isPrimitiveBody, "isPrimitiveBody");
|
|
5117
5188
|
var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
|
|
@@ -5125,33 +5196,46 @@ var require_utils = __commonJS({
|
|
|
5125
5196
|
}
|
|
5126
5197
|
__name(isValidUuid, "isValidUuid");
|
|
5127
5198
|
function handleNullableResponseAndWrappableBody(responseObject) {
|
|
5128
|
-
const combinedHeadersAndBody =
|
|
5199
|
+
const combinedHeadersAndBody = {
|
|
5200
|
+
...responseObject.headers,
|
|
5201
|
+
...responseObject.body
|
|
5202
|
+
};
|
|
5129
5203
|
if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) {
|
|
5130
5204
|
return responseObject.shouldWrapBody ? { body: null } : null;
|
|
5131
5205
|
} else {
|
|
5132
|
-
return responseObject.shouldWrapBody ?
|
|
5206
|
+
return responseObject.shouldWrapBody ? {
|
|
5207
|
+
...responseObject.headers,
|
|
5208
|
+
body: responseObject.body
|
|
5209
|
+
} : combinedHeadersAndBody;
|
|
5133
5210
|
}
|
|
5134
5211
|
}
|
|
5135
5212
|
__name(handleNullableResponseAndWrappableBody, "handleNullableResponseAndWrappableBody");
|
|
5136
5213
|
function flattenResponse(fullResponse, responseSpec) {
|
|
5137
|
-
var _a
|
|
5214
|
+
var _a;
|
|
5138
5215
|
const parsedHeaders = fullResponse.parsedHeaders;
|
|
5139
5216
|
if (fullResponse.request.method === "HEAD") {
|
|
5140
|
-
return
|
|
5217
|
+
return {
|
|
5218
|
+
...parsedHeaders,
|
|
5219
|
+
body: fullResponse.parsedBody
|
|
5220
|
+
};
|
|
5141
5221
|
}
|
|
5142
5222
|
const bodyMapper = responseSpec && responseSpec.bodyMapper;
|
|
5143
|
-
const isNullable = Boolean(bodyMapper
|
|
5144
|
-
const expectedBodyTypeName = bodyMapper
|
|
5223
|
+
const isNullable = Boolean(bodyMapper == null ? void 0 : bodyMapper.nullable);
|
|
5224
|
+
const expectedBodyTypeName = bodyMapper == null ? void 0 : bodyMapper.type.name;
|
|
5145
5225
|
if (expectedBodyTypeName === "Stream") {
|
|
5146
|
-
return
|
|
5226
|
+
return {
|
|
5227
|
+
...parsedHeaders,
|
|
5228
|
+
blobBody: fullResponse.blobBody,
|
|
5229
|
+
readableStreamBody: fullResponse.readableStreamBody
|
|
5230
|
+
};
|
|
5147
5231
|
}
|
|
5148
5232
|
const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {};
|
|
5149
5233
|
const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === "");
|
|
5150
5234
|
if (expectedBodyTypeName === "Sequence" || isPageableResponse) {
|
|
5151
|
-
const arrayResponse =
|
|
5235
|
+
const arrayResponse = fullResponse.parsedBody ?? [];
|
|
5152
5236
|
for (const key of Object.keys(modelProperties)) {
|
|
5153
5237
|
if (modelProperties[key].serializedName) {
|
|
5154
|
-
arrayResponse[key] = (
|
|
5238
|
+
arrayResponse[key] = (_a = fullResponse.parsedBody) == null ? void 0 : _a[key];
|
|
5155
5239
|
}
|
|
5156
5240
|
}
|
|
5157
5241
|
if (parsedHeaders) {
|
|
@@ -5172,9 +5256,9 @@ var require_utils = __commonJS({
|
|
|
5172
5256
|
}
|
|
5173
5257
|
});
|
|
5174
5258
|
|
|
5175
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
5259
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/serializer.js
|
|
5176
5260
|
var require_serializer = __commonJS({
|
|
5177
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
5261
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/serializer.js"(exports) {
|
|
5178
5262
|
"use strict";
|
|
5179
5263
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5180
5264
|
exports.MapperTypeNames = void 0;
|
|
@@ -5184,6 +5268,8 @@ var require_serializer = __commonJS({
|
|
|
5184
5268
|
var interfaces_js_1 = require_interfaces();
|
|
5185
5269
|
var utils_js_1 = require_utils();
|
|
5186
5270
|
var _SerializerImpl = class _SerializerImpl {
|
|
5271
|
+
modelMappers;
|
|
5272
|
+
isXML;
|
|
5187
5273
|
constructor(modelMappers = {}, isXML = false) {
|
|
5188
5274
|
this.modelMappers = modelMappers;
|
|
5189
5275
|
this.isXML = isXML;
|
|
@@ -5249,12 +5335,11 @@ var require_serializer = __commonJS({
|
|
|
5249
5335
|
* @returns A valid serialized Javascript object
|
|
5250
5336
|
*/
|
|
5251
5337
|
serialize(mapper, object, objectName, options = { xml: {} }) {
|
|
5252
|
-
var _a, _b, _c;
|
|
5253
5338
|
const updatedOptions = {
|
|
5254
5339
|
xml: {
|
|
5255
|
-
rootName:
|
|
5256
|
-
includeRoot:
|
|
5257
|
-
xmlCharKey:
|
|
5340
|
+
rootName: options.xml.rootName ?? "",
|
|
5341
|
+
includeRoot: options.xml.includeRoot ?? false,
|
|
5342
|
+
xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY
|
|
5258
5343
|
}
|
|
5259
5344
|
};
|
|
5260
5345
|
let payload = {};
|
|
@@ -5318,14 +5403,13 @@ var require_serializer = __commonJS({
|
|
|
5318
5403
|
* @returns A valid deserialized Javascript object
|
|
5319
5404
|
*/
|
|
5320
5405
|
deserialize(mapper, responseBody, objectName, options = { xml: {} }) {
|
|
5321
|
-
var _a, _b, _c, _d;
|
|
5322
5406
|
const updatedOptions = {
|
|
5323
5407
|
xml: {
|
|
5324
|
-
rootName:
|
|
5325
|
-
includeRoot:
|
|
5326
|
-
xmlCharKey:
|
|
5408
|
+
rootName: options.xml.rootName ?? "",
|
|
5409
|
+
includeRoot: options.xml.includeRoot ?? false,
|
|
5410
|
+
xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY
|
|
5327
5411
|
},
|
|
5328
|
-
ignoreUnknownProperties:
|
|
5412
|
+
ignoreUnknownProperties: options.ignoreUnknownProperties ?? false
|
|
5329
5413
|
};
|
|
5330
5414
|
if (responseBody === void 0 || responseBody === null) {
|
|
5331
5415
|
if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) {
|
|
@@ -5555,7 +5639,6 @@ var require_serializer = __commonJS({
|
|
|
5555
5639
|
}
|
|
5556
5640
|
__name(serializeDateTypes, "serializeDateTypes");
|
|
5557
5641
|
function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) {
|
|
5558
|
-
var _a;
|
|
5559
5642
|
if (!Array.isArray(object)) {
|
|
5560
5643
|
throw new Error(`${objectName} must be of type Array.`);
|
|
5561
5644
|
}
|
|
@@ -5564,7 +5647,7 @@ var require_serializer = __commonJS({
|
|
|
5564
5647
|
throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`);
|
|
5565
5648
|
}
|
|
5566
5649
|
if (elementType.type.name === "Composite" && elementType.type.className) {
|
|
5567
|
-
elementType =
|
|
5650
|
+
elementType = serializer.modelMappers[elementType.type.className] ?? elementType;
|
|
5568
5651
|
}
|
|
5569
5652
|
const tempArray = [];
|
|
5570
5653
|
for (let i = 0; i < object.length; i++) {
|
|
@@ -5572,7 +5655,7 @@ var require_serializer = __commonJS({
|
|
|
5572
5655
|
if (isXml && elementType.xmlNamespace) {
|
|
5573
5656
|
const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns";
|
|
5574
5657
|
if (elementType.type.name === "Composite") {
|
|
5575
|
-
tempArray[i] =
|
|
5658
|
+
tempArray[i] = { ...serializedValue };
|
|
5576
5659
|
tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace };
|
|
5577
5660
|
} else {
|
|
5578
5661
|
tempArray[i] = {};
|
|
@@ -5612,7 +5695,7 @@ var require_serializer = __commonJS({
|
|
|
5612
5695
|
const additionalProperties = mapper.type.additionalProperties;
|
|
5613
5696
|
if (!additionalProperties && mapper.type.className) {
|
|
5614
5697
|
const modelMapper = resolveReferencedMapper(serializer, mapper, objectName);
|
|
5615
|
-
return modelMapper
|
|
5698
|
+
return modelMapper == null ? void 0 : modelMapper.type.additionalProperties;
|
|
5616
5699
|
}
|
|
5617
5700
|
return additionalProperties;
|
|
5618
5701
|
}
|
|
@@ -5632,7 +5715,7 @@ var require_serializer = __commonJS({
|
|
|
5632
5715
|
if (!modelMapper) {
|
|
5633
5716
|
throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`);
|
|
5634
5717
|
}
|
|
5635
|
-
modelProps = modelMapper
|
|
5718
|
+
modelProps = modelMapper == null ? void 0 : modelMapper.type.modelProperties;
|
|
5636
5719
|
if (!modelProps) {
|
|
5637
5720
|
throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`);
|
|
5638
5721
|
}
|
|
@@ -5674,7 +5757,10 @@ var require_serializer = __commonJS({
|
|
|
5674
5757
|
if (parentObject !== void 0 && parentObject !== null) {
|
|
5675
5758
|
if (isXml && mapper.xmlNamespace) {
|
|
5676
5759
|
const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns";
|
|
5677
|
-
parentObject[interfaces_js_1.XML_ATTRKEY] =
|
|
5760
|
+
parentObject[interfaces_js_1.XML_ATTRKEY] = {
|
|
5761
|
+
...parentObject[interfaces_js_1.XML_ATTRKEY],
|
|
5762
|
+
[xmlnsKey]: mapper.xmlNamespace
|
|
5763
|
+
};
|
|
5678
5764
|
}
|
|
5679
5765
|
const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName;
|
|
5680
5766
|
let toSerialize = object[key];
|
|
@@ -5721,7 +5807,7 @@ var require_serializer = __commonJS({
|
|
|
5721
5807
|
if (serializedValue[interfaces_js_1.XML_ATTRKEY]) {
|
|
5722
5808
|
return serializedValue;
|
|
5723
5809
|
} else {
|
|
5724
|
-
const result2 =
|
|
5810
|
+
const result2 = { ...serializedValue };
|
|
5725
5811
|
result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace;
|
|
5726
5812
|
return result2;
|
|
5727
5813
|
}
|
|
@@ -5737,8 +5823,7 @@ var require_serializer = __commonJS({
|
|
|
5737
5823
|
}
|
|
5738
5824
|
__name(isSpecialXmlProperty, "isSpecialXmlProperty");
|
|
5739
5825
|
function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) {
|
|
5740
|
-
|
|
5741
|
-
const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY;
|
|
5826
|
+
const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY;
|
|
5742
5827
|
if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {
|
|
5743
5828
|
mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName");
|
|
5744
5829
|
}
|
|
@@ -5777,7 +5862,7 @@ var require_serializer = __commonJS({
|
|
|
5777
5862
|
const propertyName = xmlElementName || xmlName || serializedName;
|
|
5778
5863
|
if (propertyMapper.xmlIsWrapped) {
|
|
5779
5864
|
const wrapped = responseBody[xmlName];
|
|
5780
|
-
const elementList = (
|
|
5865
|
+
const elementList = (wrapped == null ? void 0 : wrapped[xmlElementName]) ?? [];
|
|
5781
5866
|
instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options);
|
|
5782
5867
|
handledPropertyNames.push(xmlName);
|
|
5783
5868
|
} else {
|
|
@@ -5862,7 +5947,6 @@ var require_serializer = __commonJS({
|
|
|
5862
5947
|
}
|
|
5863
5948
|
__name(deserializeDictionaryType, "deserializeDictionaryType");
|
|
5864
5949
|
function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) {
|
|
5865
|
-
var _a;
|
|
5866
5950
|
let element = mapper.type.element;
|
|
5867
5951
|
if (!element || typeof element !== "object") {
|
|
5868
5952
|
throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`);
|
|
@@ -5872,7 +5956,7 @@ var require_serializer = __commonJS({
|
|
|
5872
5956
|
responseBody = [responseBody];
|
|
5873
5957
|
}
|
|
5874
5958
|
if (element.type.name === "Composite" && element.type.className) {
|
|
5875
|
-
element =
|
|
5959
|
+
element = serializer.modelMappers[element.type.className] ?? element;
|
|
5876
5960
|
}
|
|
5877
5961
|
const tempArray = [];
|
|
5878
5962
|
for (let i = 0; i < responseBody.length; i++) {
|
|
@@ -5902,7 +5986,6 @@ var require_serializer = __commonJS({
|
|
|
5902
5986
|
}
|
|
5903
5987
|
__name(getIndexDiscriminator, "getIndexDiscriminator");
|
|
5904
5988
|
function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) {
|
|
5905
|
-
var _a;
|
|
5906
5989
|
const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);
|
|
5907
5990
|
if (polymorphicDiscriminator) {
|
|
5908
5991
|
let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName];
|
|
@@ -5911,7 +5994,7 @@ var require_serializer = __commonJS({
|
|
|
5911
5994
|
discriminatorName = discriminatorName.replace(/\\/gi, "");
|
|
5912
5995
|
}
|
|
5913
5996
|
const discriminatorValue = object[discriminatorName];
|
|
5914
|
-
const typeName =
|
|
5997
|
+
const typeName = mapper.type.uberParent ?? mapper.type.className;
|
|
5915
5998
|
if (typeof discriminatorValue === "string" && typeName) {
|
|
5916
5999
|
const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName);
|
|
5917
6000
|
if (polymorphicMapper) {
|
|
@@ -5952,9 +6035,9 @@ var require_serializer = __commonJS({
|
|
|
5952
6035
|
}
|
|
5953
6036
|
});
|
|
5954
6037
|
|
|
5955
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6038
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/operationHelpers.js
|
|
5956
6039
|
var require_operationHelpers = __commonJS({
|
|
5957
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6040
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/operationHelpers.js"(exports) {
|
|
5958
6041
|
"use strict";
|
|
5959
6042
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5960
6043
|
exports.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter;
|
|
@@ -6043,9 +6126,9 @@ var require_operationHelpers = __commonJS({
|
|
|
6043
6126
|
}
|
|
6044
6127
|
});
|
|
6045
6128
|
|
|
6046
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6129
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/deserializationPolicy.js
|
|
6047
6130
|
var require_deserializationPolicy = __commonJS({
|
|
6048
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6131
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/deserializationPolicy.js"(exports) {
|
|
6049
6132
|
"use strict";
|
|
6050
6133
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6051
6134
|
exports.deserializationPolicyName = void 0;
|
|
@@ -6058,16 +6141,16 @@ var require_deserializationPolicy = __commonJS({
|
|
|
6058
6141
|
var defaultXmlContentTypes = ["application/xml", "application/atom+xml"];
|
|
6059
6142
|
exports.deserializationPolicyName = "deserializationPolicy";
|
|
6060
6143
|
function deserializationPolicy(options = {}) {
|
|
6061
|
-
var _a, _b
|
|
6062
|
-
const jsonContentTypes = (
|
|
6063
|
-
const xmlContentTypes = (
|
|
6144
|
+
var _a, _b;
|
|
6145
|
+
const jsonContentTypes = ((_a = options.expectedContentTypes) == null ? void 0 : _a.json) ?? defaultJsonContentTypes;
|
|
6146
|
+
const xmlContentTypes = ((_b = options.expectedContentTypes) == null ? void 0 : _b.xml) ?? defaultXmlContentTypes;
|
|
6064
6147
|
const parseXML = options.parseXML;
|
|
6065
6148
|
const serializerOptions = options.serializerOptions;
|
|
6066
6149
|
const updatedOptions = {
|
|
6067
6150
|
xml: {
|
|
6068
|
-
rootName: (
|
|
6069
|
-
includeRoot: (
|
|
6070
|
-
xmlCharKey: (
|
|
6151
|
+
rootName: (serializerOptions == null ? void 0 : serializerOptions.xml.rootName) ?? "",
|
|
6152
|
+
includeRoot: (serializerOptions == null ? void 0 : serializerOptions.xml.includeRoot) ?? false,
|
|
6153
|
+
xmlCharKey: (serializerOptions == null ? void 0 : serializerOptions.xml.xmlCharKey) ?? interfaces_js_1.XML_CHARKEY
|
|
6071
6154
|
}
|
|
6072
6155
|
};
|
|
6073
6156
|
return {
|
|
@@ -6083,12 +6166,12 @@ var require_deserializationPolicy = __commonJS({
|
|
|
6083
6166
|
let result;
|
|
6084
6167
|
const request = parsedResponse.request;
|
|
6085
6168
|
const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request);
|
|
6086
|
-
const operationSpec = operationInfo
|
|
6169
|
+
const operationSpec = operationInfo == null ? void 0 : operationInfo.operationSpec;
|
|
6087
6170
|
if (operationSpec) {
|
|
6088
|
-
if (!(operationInfo
|
|
6171
|
+
if (!(operationInfo == null ? void 0 : operationInfo.operationResponseGetter)) {
|
|
6089
6172
|
result = operationSpec.responses[parsedResponse.status];
|
|
6090
6173
|
} else {
|
|
6091
|
-
result = operationInfo
|
|
6174
|
+
result = operationInfo == null ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse);
|
|
6092
6175
|
}
|
|
6093
6176
|
}
|
|
6094
6177
|
return result;
|
|
@@ -6097,7 +6180,7 @@ var require_deserializationPolicy = __commonJS({
|
|
|
6097
6180
|
function shouldDeserializeResponse(parsedResponse) {
|
|
6098
6181
|
const request = parsedResponse.request;
|
|
6099
6182
|
const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request);
|
|
6100
|
-
const shouldDeserialize = operationInfo
|
|
6183
|
+
const shouldDeserialize = operationInfo == null ? void 0 : operationInfo.shouldDeserialize;
|
|
6101
6184
|
let result;
|
|
6102
6185
|
if (shouldDeserialize === void 0) {
|
|
6103
6186
|
result = true;
|
|
@@ -6115,7 +6198,7 @@ var require_deserializationPolicy = __commonJS({
|
|
|
6115
6198
|
return parsedResponse;
|
|
6116
6199
|
}
|
|
6117
6200
|
const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request);
|
|
6118
|
-
const operationSpec = operationInfo
|
|
6201
|
+
const operationSpec = operationInfo == null ? void 0 : operationInfo.operationSpec;
|
|
6119
6202
|
if (!operationSpec || !operationSpec.responses) {
|
|
6120
6203
|
return parsedResponse;
|
|
6121
6204
|
}
|
|
@@ -6170,18 +6253,18 @@ var require_deserializationPolicy = __commonJS({
|
|
|
6170
6253
|
return { error: null, shouldReturnResponse: false };
|
|
6171
6254
|
}
|
|
6172
6255
|
}
|
|
6173
|
-
const errorResponseSpec = responseSpec
|
|
6174
|
-
const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes)
|
|
6256
|
+
const errorResponseSpec = responseSpec ?? operationSpec.responses.default;
|
|
6257
|
+
const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) == null ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText;
|
|
6175
6258
|
const error = new core_rest_pipeline_1.RestError(initialErrorMessage, {
|
|
6176
6259
|
statusCode: parsedResponse.status,
|
|
6177
6260
|
request: parsedResponse.request,
|
|
6178
6261
|
response: parsedResponse
|
|
6179
6262
|
});
|
|
6180
|
-
if (!errorResponseSpec && !(((_c = (_b = parsedResponse.parsedBody)
|
|
6263
|
+
if (!errorResponseSpec && !(((_c = (_b = parsedResponse.parsedBody) == null ? void 0 : _b.error) == null ? void 0 : _c.code) && ((_e = (_d = parsedResponse.parsedBody) == null ? void 0 : _d.error) == null ? void 0 : _e.message))) {
|
|
6181
6264
|
throw error;
|
|
6182
6265
|
}
|
|
6183
|
-
const defaultBodyMapper = errorResponseSpec
|
|
6184
|
-
const defaultHeadersMapper = errorResponseSpec
|
|
6266
|
+
const defaultBodyMapper = errorResponseSpec == null ? void 0 : errorResponseSpec.bodyMapper;
|
|
6267
|
+
const defaultHeadersMapper = errorResponseSpec == null ? void 0 : errorResponseSpec.headersMapper;
|
|
6185
6268
|
try {
|
|
6186
6269
|
if (parsedResponse.parsedBody) {
|
|
6187
6270
|
const parsedBody = parsedResponse.parsedBody;
|
|
@@ -6217,7 +6300,7 @@ var require_deserializationPolicy = __commonJS({
|
|
|
6217
6300
|
__name(handleErrorResponse, "handleErrorResponse");
|
|
6218
6301
|
async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) {
|
|
6219
6302
|
var _a;
|
|
6220
|
-
if (!((_a = operationResponse.request.streamResponseStatusCodes)
|
|
6303
|
+
if (!((_a = operationResponse.request.streamResponseStatusCodes) == null ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) {
|
|
6221
6304
|
const text = operationResponse.bodyAsText;
|
|
6222
6305
|
const contentType = operationResponse.headers.get("Content-Type") || "";
|
|
6223
6306
|
const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase());
|
|
@@ -6251,9 +6334,9 @@ var require_deserializationPolicy = __commonJS({
|
|
|
6251
6334
|
}
|
|
6252
6335
|
});
|
|
6253
6336
|
|
|
6254
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6337
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/interfaceHelpers.js
|
|
6255
6338
|
var require_interfaceHelpers = __commonJS({
|
|
6256
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6339
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/interfaceHelpers.js"(exports) {
|
|
6257
6340
|
"use strict";
|
|
6258
6341
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6259
6342
|
exports.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes;
|
|
@@ -6286,9 +6369,9 @@ var require_interfaceHelpers = __commonJS({
|
|
|
6286
6369
|
}
|
|
6287
6370
|
});
|
|
6288
6371
|
|
|
6289
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6372
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/serializationPolicy.js
|
|
6290
6373
|
var require_serializationPolicy = __commonJS({
|
|
6291
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6374
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/serializationPolicy.js"(exports) {
|
|
6292
6375
|
"use strict";
|
|
6293
6376
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6294
6377
|
exports.serializationPolicyName = void 0;
|
|
@@ -6306,8 +6389,8 @@ var require_serializationPolicy = __commonJS({
|
|
|
6306
6389
|
name: exports.serializationPolicyName,
|
|
6307
6390
|
async sendRequest(request, next) {
|
|
6308
6391
|
const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request);
|
|
6309
|
-
const operationSpec = operationInfo
|
|
6310
|
-
const operationArguments = operationInfo
|
|
6392
|
+
const operationSpec = operationInfo == null ? void 0 : operationInfo.operationSpec;
|
|
6393
|
+
const operationArguments = operationInfo == null ? void 0 : operationInfo.operationArguments;
|
|
6311
6394
|
if (operationSpec && operationArguments) {
|
|
6312
6395
|
serializeHeaders(request, operationArguments, operationSpec);
|
|
6313
6396
|
serializeRequestBody(request, operationArguments, operationSpec, stringifyXML);
|
|
@@ -6335,7 +6418,7 @@ var require_serializationPolicy = __commonJS({
|
|
|
6335
6418
|
}
|
|
6336
6419
|
}
|
|
6337
6420
|
}
|
|
6338
|
-
const customHeaders = (_b = (_a = operationArguments.options)
|
|
6421
|
+
const customHeaders = (_b = (_a = operationArguments.options) == null ? void 0 : _a.requestOptions) == null ? void 0 : _b.customHeaders;
|
|
6339
6422
|
if (customHeaders) {
|
|
6340
6423
|
for (const customHeaderName of Object.keys(customHeaders)) {
|
|
6341
6424
|
request.headers.set(customHeaderName, customHeaders[customHeaderName]);
|
|
@@ -6346,13 +6429,13 @@ var require_serializationPolicy = __commonJS({
|
|
|
6346
6429
|
function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() {
|
|
6347
6430
|
throw new Error("XML serialization unsupported!");
|
|
6348
6431
|
}) {
|
|
6349
|
-
var _a, _b
|
|
6350
|
-
const serializerOptions = (_a = operationArguments.options)
|
|
6432
|
+
var _a, _b;
|
|
6433
|
+
const serializerOptions = (_a = operationArguments.options) == null ? void 0 : _a.serializerOptions;
|
|
6351
6434
|
const updatedOptions = {
|
|
6352
6435
|
xml: {
|
|
6353
|
-
rootName: (
|
|
6354
|
-
includeRoot: (
|
|
6355
|
-
xmlCharKey: (
|
|
6436
|
+
rootName: (serializerOptions == null ? void 0 : serializerOptions.xml.rootName) ?? "",
|
|
6437
|
+
includeRoot: (serializerOptions == null ? void 0 : serializerOptions.xml.includeRoot) ?? false,
|
|
6438
|
+
xmlCharKey: (serializerOptions == null ? void 0 : serializerOptions.xml.xmlCharKey) ?? interfaces_js_1.XML_CHARKEY
|
|
6356
6439
|
}
|
|
6357
6440
|
};
|
|
6358
6441
|
const xmlCharKey = updatedOptions.xml.xmlCharKey;
|
|
@@ -6377,7 +6460,7 @@ var require_serializationPolicy = __commonJS({
|
|
|
6377
6460
|
xmlCharKey
|
|
6378
6461
|
});
|
|
6379
6462
|
}
|
|
6380
|
-
} else if (typeName === serializer_js_1.MapperTypeNames.String && (((
|
|
6463
|
+
} else if (typeName === serializer_js_1.MapperTypeNames.String && (((_b = operationSpec.contentType) == null ? void 0 : _b.match("text/plain")) || operationSpec.mediaType === "text")) {
|
|
6381
6464
|
return;
|
|
6382
6465
|
} else if (!isStream) {
|
|
6383
6466
|
request.body = JSON.stringify(request.body);
|
|
@@ -6423,9 +6506,9 @@ var require_serializationPolicy = __commonJS({
|
|
|
6423
6506
|
}
|
|
6424
6507
|
});
|
|
6425
6508
|
|
|
6426
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6509
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/pipeline.js
|
|
6427
6510
|
var require_pipeline3 = __commonJS({
|
|
6428
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6511
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/pipeline.js"(exports) {
|
|
6429
6512
|
"use strict";
|
|
6430
6513
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6431
6514
|
exports.createClientPipeline = createClientPipeline;
|
|
@@ -6433,7 +6516,7 @@ var require_pipeline3 = __commonJS({
|
|
|
6433
6516
|
var core_rest_pipeline_1 = require_commonjs6();
|
|
6434
6517
|
var serializationPolicy_js_1 = require_serializationPolicy();
|
|
6435
6518
|
function createClientPipeline(options = {}) {
|
|
6436
|
-
const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options
|
|
6519
|
+
const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {});
|
|
6437
6520
|
if (options.credentialOptions) {
|
|
6438
6521
|
pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({
|
|
6439
6522
|
credential: options.credentialOptions.credential,
|
|
@@ -6450,9 +6533,9 @@ var require_pipeline3 = __commonJS({
|
|
|
6450
6533
|
}
|
|
6451
6534
|
});
|
|
6452
6535
|
|
|
6453
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6536
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/httpClientCache.js
|
|
6454
6537
|
var require_httpClientCache = __commonJS({
|
|
6455
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6538
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/httpClientCache.js"(exports) {
|
|
6456
6539
|
"use strict";
|
|
6457
6540
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6458
6541
|
exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient;
|
|
@@ -6468,9 +6551,9 @@ var require_httpClientCache = __commonJS({
|
|
|
6468
6551
|
}
|
|
6469
6552
|
});
|
|
6470
6553
|
|
|
6471
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6554
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/urlHelpers.js
|
|
6472
6555
|
var require_urlHelpers2 = __commonJS({
|
|
6473
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6556
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/urlHelpers.js"(exports) {
|
|
6474
6557
|
"use strict";
|
|
6475
6558
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6476
6559
|
exports.getRequestUrl = getRequestUrl;
|
|
@@ -6516,7 +6599,7 @@ var require_urlHelpers2 = __commonJS({
|
|
|
6516
6599
|
function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) {
|
|
6517
6600
|
var _a;
|
|
6518
6601
|
const result = /* @__PURE__ */ new Map();
|
|
6519
|
-
if ((_a = operationSpec.urlParameters)
|
|
6602
|
+
if ((_a = operationSpec.urlParameters) == null ? void 0 : _a.length) {
|
|
6520
6603
|
for (const urlParameter of operationSpec.urlParameters) {
|
|
6521
6604
|
let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject);
|
|
6522
6605
|
const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter);
|
|
@@ -6565,7 +6648,7 @@ var require_urlHelpers2 = __commonJS({
|
|
|
6565
6648
|
var _a;
|
|
6566
6649
|
const result = /* @__PURE__ */ new Map();
|
|
6567
6650
|
const sequenceParams = /* @__PURE__ */ new Set();
|
|
6568
|
-
if ((_a = operationSpec.queryParameters)
|
|
6651
|
+
if ((_a = operationSpec.queryParameters) == null ? void 0 : _a.length) {
|
|
6569
6652
|
for (const queryParameter of operationSpec.queryParameters) {
|
|
6570
6653
|
if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) {
|
|
6571
6654
|
sequenceParams.add(queryParameter.mapper.serializedName);
|
|
@@ -6680,9 +6763,9 @@ var require_urlHelpers2 = __commonJS({
|
|
|
6680
6763
|
}
|
|
6681
6764
|
});
|
|
6682
6765
|
|
|
6683
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6766
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/log.js
|
|
6684
6767
|
var require_log3 = __commonJS({
|
|
6685
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6768
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/log.js"(exports) {
|
|
6686
6769
|
"use strict";
|
|
6687
6770
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6688
6771
|
exports.logger = void 0;
|
|
@@ -6691,9 +6774,9 @@ var require_log3 = __commonJS({
|
|
|
6691
6774
|
}
|
|
6692
6775
|
});
|
|
6693
6776
|
|
|
6694
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6777
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/serviceClient.js
|
|
6695
6778
|
var require_serviceClient = __commonJS({
|
|
6696
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6779
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/serviceClient.js"(exports) {
|
|
6697
6780
|
"use strict";
|
|
6698
6781
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6699
6782
|
exports.ServiceClient = void 0;
|
|
@@ -6706,21 +6789,43 @@ var require_serviceClient = __commonJS({
|
|
|
6706
6789
|
var interfaceHelpers_js_1 = require_interfaceHelpers();
|
|
6707
6790
|
var log_js_1 = require_log3();
|
|
6708
6791
|
var _ServiceClient = class _ServiceClient {
|
|
6792
|
+
/**
|
|
6793
|
+
* If specified, this is the base URI that requests will be made against for this ServiceClient.
|
|
6794
|
+
* If it is not specified, then all OperationSpecs must contain a baseUrl property.
|
|
6795
|
+
*/
|
|
6796
|
+
_endpoint;
|
|
6797
|
+
/**
|
|
6798
|
+
* The default request content type for the service.
|
|
6799
|
+
* Used if no requestContentType is present on an OperationSpec.
|
|
6800
|
+
*/
|
|
6801
|
+
_requestContentType;
|
|
6802
|
+
/**
|
|
6803
|
+
* Set to true if the request is sent over HTTP instead of HTTPS
|
|
6804
|
+
*/
|
|
6805
|
+
_allowInsecureConnection;
|
|
6806
|
+
/**
|
|
6807
|
+
* The HTTP client that will be used to send requests.
|
|
6808
|
+
*/
|
|
6809
|
+
_httpClient;
|
|
6810
|
+
/**
|
|
6811
|
+
* The pipeline used by this client to make requests
|
|
6812
|
+
*/
|
|
6813
|
+
pipeline;
|
|
6709
6814
|
/**
|
|
6710
6815
|
* The ServiceClient constructor
|
|
6711
6816
|
* @param options - The service client options that govern the behavior of the client.
|
|
6712
6817
|
*/
|
|
6713
6818
|
constructor(options = {}) {
|
|
6714
|
-
var _a
|
|
6819
|
+
var _a;
|
|
6715
6820
|
this._requestContentType = options.requestContentType;
|
|
6716
|
-
this._endpoint =
|
|
6821
|
+
this._endpoint = options.endpoint ?? options.baseUri;
|
|
6717
6822
|
if (options.baseUri) {
|
|
6718
6823
|
log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead.");
|
|
6719
6824
|
}
|
|
6720
6825
|
this._allowInsecureConnection = options.allowInsecureConnection;
|
|
6721
6826
|
this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)();
|
|
6722
6827
|
this.pipeline = options.pipeline || createDefaultPipeline(options);
|
|
6723
|
-
if ((
|
|
6828
|
+
if ((_a = options.additionalPolicies) == null ? void 0 : _a.length) {
|
|
6724
6829
|
for (const { policy, position } of options.additionalPolicies) {
|
|
6725
6830
|
const afterPhase = position === "perRetry" ? "Sign" : void 0;
|
|
6726
6831
|
this.pipeline.addPolicy(policy, {
|
|
@@ -6794,16 +6899,16 @@ var require_serviceClient = __commonJS({
|
|
|
6794
6899
|
try {
|
|
6795
6900
|
const rawResponse = await this.sendRequest(request);
|
|
6796
6901
|
const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]);
|
|
6797
|
-
if (options
|
|
6902
|
+
if (options == null ? void 0 : options.onResponse) {
|
|
6798
6903
|
options.onResponse(rawResponse, flatResponse);
|
|
6799
6904
|
}
|
|
6800
6905
|
return flatResponse;
|
|
6801
6906
|
} catch (error) {
|
|
6802
|
-
if (typeof error === "object" && (error
|
|
6907
|
+
if (typeof error === "object" && (error == null ? void 0 : error.response)) {
|
|
6803
6908
|
const rawResponse = error.response;
|
|
6804
6909
|
const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error.statusCode] || operationSpec.responses["default"]);
|
|
6805
6910
|
error.details = flatResponse;
|
|
6806
|
-
if (options
|
|
6911
|
+
if (options == null ? void 0 : options.onResponse) {
|
|
6807
6912
|
options.onResponse(rawResponse, flatResponse, error);
|
|
6808
6913
|
}
|
|
6809
6914
|
}
|
|
@@ -6817,7 +6922,10 @@ var require_serviceClient = __commonJS({
|
|
|
6817
6922
|
function createDefaultPipeline(options) {
|
|
6818
6923
|
const credentialScopes = getCredentialScopes(options);
|
|
6819
6924
|
const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0;
|
|
6820
|
-
return (0, pipeline_js_1.createClientPipeline)(
|
|
6925
|
+
return (0, pipeline_js_1.createClientPipeline)({
|
|
6926
|
+
...options,
|
|
6927
|
+
credentialOptions
|
|
6928
|
+
});
|
|
6821
6929
|
}
|
|
6822
6930
|
__name(createDefaultPipeline, "createDefaultPipeline");
|
|
6823
6931
|
function getCredentialScopes(options) {
|
|
@@ -6839,9 +6947,9 @@ var require_serviceClient = __commonJS({
|
|
|
6839
6947
|
}
|
|
6840
6948
|
});
|
|
6841
6949
|
|
|
6842
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6950
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/authorizeRequestOnClaimChallenge.js
|
|
6843
6951
|
var require_authorizeRequestOnClaimChallenge = __commonJS({
|
|
6844
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6952
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports) {
|
|
6845
6953
|
"use strict";
|
|
6846
6954
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6847
6955
|
exports.parseCAEChallenge = parseCAEChallenge;
|
|
@@ -6853,12 +6961,11 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({
|
|
|
6853
6961
|
return bearerChallenges.map((challenge) => {
|
|
6854
6962
|
const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x);
|
|
6855
6963
|
const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="')));
|
|
6856
|
-
return keyValuePairs.reduce((a, b) =>
|
|
6964
|
+
return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {});
|
|
6857
6965
|
});
|
|
6858
6966
|
}
|
|
6859
6967
|
__name(parseCAEChallenge, "parseCAEChallenge");
|
|
6860
6968
|
async function authorizeRequestOnClaimChallenge(onChallengeOptions) {
|
|
6861
|
-
var _a;
|
|
6862
6969
|
const { scopes, response } = onChallengeOptions;
|
|
6863
6970
|
const logger = onChallengeOptions.logger || log_js_1.logger;
|
|
6864
6971
|
const challenge = response.headers.get("WWW-Authenticate");
|
|
@@ -6878,16 +6985,16 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({
|
|
|
6878
6985
|
if (!accessToken) {
|
|
6879
6986
|
return false;
|
|
6880
6987
|
}
|
|
6881
|
-
onChallengeOptions.request.headers.set("Authorization", `${
|
|
6988
|
+
onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`);
|
|
6882
6989
|
return true;
|
|
6883
6990
|
}
|
|
6884
6991
|
__name(authorizeRequestOnClaimChallenge, "authorizeRequestOnClaimChallenge");
|
|
6885
6992
|
}
|
|
6886
6993
|
});
|
|
6887
6994
|
|
|
6888
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6995
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/authorizeRequestOnTenantChallenge.js
|
|
6889
6996
|
var require_authorizeRequestOnTenantChallenge = __commonJS({
|
|
6890
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
6997
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/authorizeRequestOnTenantChallenge.js"(exports) {
|
|
6891
6998
|
"use strict";
|
|
6892
6999
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6893
7000
|
exports.authorizeRequestOnTenantChallenge = void 0;
|
|
@@ -6908,7 +7015,6 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({
|
|
|
6908
7015
|
}
|
|
6909
7016
|
__name(isUuid, "isUuid");
|
|
6910
7017
|
var authorizeRequestOnTenantChallenge = /* @__PURE__ */ __name(async (challengeOptions) => {
|
|
6911
|
-
var _a;
|
|
6912
7018
|
const requestOptions = requestToOptions(challengeOptions.request);
|
|
6913
7019
|
const challenge = getChallenge(challengeOptions.response);
|
|
6914
7020
|
if (challenge) {
|
|
@@ -6918,11 +7024,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({
|
|
|
6918
7024
|
if (!tenantId) {
|
|
6919
7025
|
return false;
|
|
6920
7026
|
}
|
|
6921
|
-
const accessToken = await challengeOptions.getAccessToken(challengeScopes,
|
|
7027
|
+
const accessToken = await challengeOptions.getAccessToken(challengeScopes, {
|
|
7028
|
+
...requestOptions,
|
|
7029
|
+
tenantId
|
|
7030
|
+
});
|
|
6922
7031
|
if (!accessToken) {
|
|
6923
7032
|
return false;
|
|
6924
7033
|
}
|
|
6925
|
-
challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${
|
|
7034
|
+
challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`);
|
|
6926
7035
|
return true;
|
|
6927
7036
|
}
|
|
6928
7037
|
return false;
|
|
@@ -6963,7 +7072,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({
|
|
|
6963
7072
|
const bearerChallenge = challenge.slice("Bearer ".length);
|
|
6964
7073
|
const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x);
|
|
6965
7074
|
const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("=")));
|
|
6966
|
-
return keyValuePairs.reduce((a, b) =>
|
|
7075
|
+
return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {});
|
|
6967
7076
|
}
|
|
6968
7077
|
__name(parseChallenge, "parseChallenge");
|
|
6969
7078
|
function requestToOptions(request) {
|
|
@@ -6979,9 +7088,9 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({
|
|
|
6979
7088
|
}
|
|
6980
7089
|
});
|
|
6981
7090
|
|
|
6982
|
-
// ../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
7091
|
+
// ../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/index.js
|
|
6983
7092
|
var require_commonjs7 = __commonJS({
|
|
6984
|
-
"../../node_modules/.store/@azure-core-client-npm-1.10.
|
|
7093
|
+
"../../node_modules/.store/@azure-core-client-npm-1.10.1-c6f6d34e9a/package/dist/commonjs/index.js"(exports) {
|
|
6985
7094
|
"use strict";
|
|
6986
7095
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6987
7096
|
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;
|