@prisma/migrate 7.3.0-dev.15 → 7.3.0-dev.17

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.
@@ -33,7 +33,7 @@ __export(setupMSSQL_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(setupMSSQL_exports);
35
35
  var import_chunk_5R44VVVX = require("../chunk-5R44VVVX.js");
36
- var import_chunk_3EF3YJPJ = require("../chunk-3EF3YJPJ.js");
36
+ var import_chunk_T3SJN3YL = require("../chunk-T3SJN3YL.js");
37
37
  var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
38
38
  var import_util = __toESM(require("util"));
39
39
  var import_os = require("os");
@@ -69,6 +69,534 @@ var import_fs3 = require("fs");
69
69
  var import_fs4 = __toESM(require("fs"));
70
70
  var import_path3 = __toESM(require("path"));
71
71
  var import_url = require("url");
72
+ var require_common = (0, import_chunk_2ESYSVXG.__commonJS)({
73
+ "../../node_modules/.pnpm/debug@4.4.0_supports-color@10.2.2/node_modules/debug/src/common.js"(exports, module2) {
74
+ "use strict";
75
+ function setup(env) {
76
+ createDebug.debug = createDebug;
77
+ createDebug.default = createDebug;
78
+ createDebug.coerce = coerce;
79
+ createDebug.disable = disable2;
80
+ createDebug.enable = enable2;
81
+ createDebug.enabled = enabled2;
82
+ createDebug.humanize = (0, import_chunk_T3SJN3YL.require_ms)();
83
+ createDebug.destroy = destroy2;
84
+ Object.keys(env).forEach((key) => {
85
+ createDebug[key] = env[key];
86
+ });
87
+ createDebug.names = [];
88
+ createDebug.skips = [];
89
+ createDebug.formatters = {};
90
+ function selectColor(namespace) {
91
+ let hash = 0;
92
+ for (let i = 0; i < namespace.length; i++) {
93
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
94
+ hash |= 0;
95
+ }
96
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
97
+ }
98
+ createDebug.selectColor = selectColor;
99
+ function createDebug(namespace) {
100
+ let prevTime;
101
+ let enableOverride = null;
102
+ let namespacesCache;
103
+ let enabledCache;
104
+ function debug(...args) {
105
+ if (!debug.enabled) {
106
+ return;
107
+ }
108
+ const self2 = debug;
109
+ const curr = Number(/* @__PURE__ */ new Date());
110
+ const ms = curr - (prevTime || curr);
111
+ self2.diff = ms;
112
+ self2.prev = prevTime;
113
+ self2.curr = curr;
114
+ prevTime = curr;
115
+ args[0] = createDebug.coerce(args[0]);
116
+ if (typeof args[0] !== "string") {
117
+ args.unshift("%O");
118
+ }
119
+ let index = 0;
120
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
121
+ if (match === "%%") {
122
+ return "%";
123
+ }
124
+ index++;
125
+ const formatter = createDebug.formatters[format];
126
+ if (typeof formatter === "function") {
127
+ const val = args[index];
128
+ match = formatter.call(self2, val);
129
+ args.splice(index, 1);
130
+ index--;
131
+ }
132
+ return match;
133
+ });
134
+ createDebug.formatArgs.call(self2, args);
135
+ const logFn = self2.log || createDebug.log;
136
+ logFn.apply(self2, args);
137
+ }
138
+ debug.namespace = namespace;
139
+ debug.useColors = createDebug.useColors();
140
+ debug.color = createDebug.selectColor(namespace);
141
+ debug.extend = extend2;
142
+ debug.destroy = createDebug.destroy;
143
+ Object.defineProperty(debug, "enabled", {
144
+ enumerable: true,
145
+ configurable: false,
146
+ get: () => {
147
+ if (enableOverride !== null) {
148
+ return enableOverride;
149
+ }
150
+ if (namespacesCache !== createDebug.namespaces) {
151
+ namespacesCache = createDebug.namespaces;
152
+ enabledCache = createDebug.enabled(namespace);
153
+ }
154
+ return enabledCache;
155
+ },
156
+ set: (v) => {
157
+ enableOverride = v;
158
+ }
159
+ });
160
+ if (typeof createDebug.init === "function") {
161
+ createDebug.init(debug);
162
+ }
163
+ return debug;
164
+ }
165
+ function extend2(namespace, delimiter) {
166
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
167
+ newDebug.log = this.log;
168
+ return newDebug;
169
+ }
170
+ function enable2(namespaces) {
171
+ createDebug.save(namespaces);
172
+ createDebug.namespaces = namespaces;
173
+ createDebug.names = [];
174
+ createDebug.skips = [];
175
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
176
+ for (const ns of split) {
177
+ if (ns[0] === "-") {
178
+ createDebug.skips.push(ns.slice(1));
179
+ } else {
180
+ createDebug.names.push(ns);
181
+ }
182
+ }
183
+ }
184
+ function matchesTemplate(search, template) {
185
+ let searchIndex = 0;
186
+ let templateIndex = 0;
187
+ let starIndex = -1;
188
+ let matchIndex = 0;
189
+ while (searchIndex < search.length) {
190
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
191
+ if (template[templateIndex] === "*") {
192
+ starIndex = templateIndex;
193
+ matchIndex = searchIndex;
194
+ templateIndex++;
195
+ } else {
196
+ searchIndex++;
197
+ templateIndex++;
198
+ }
199
+ } else if (starIndex !== -1) {
200
+ templateIndex = starIndex + 1;
201
+ matchIndex++;
202
+ searchIndex = matchIndex;
203
+ } else {
204
+ return false;
205
+ }
206
+ }
207
+ while (templateIndex < template.length && template[templateIndex] === "*") {
208
+ templateIndex++;
209
+ }
210
+ return templateIndex === template.length;
211
+ }
212
+ function disable2() {
213
+ const namespaces = [
214
+ ...createDebug.names,
215
+ ...createDebug.skips.map((namespace) => "-" + namespace)
216
+ ].join(",");
217
+ createDebug.enable("");
218
+ return namespaces;
219
+ }
220
+ function enabled2(name3) {
221
+ for (const skip of createDebug.skips) {
222
+ if (matchesTemplate(name3, skip)) {
223
+ return false;
224
+ }
225
+ }
226
+ for (const ns of createDebug.names) {
227
+ if (matchesTemplate(name3, ns)) {
228
+ return true;
229
+ }
230
+ }
231
+ return false;
232
+ }
233
+ function coerce(val) {
234
+ if (val instanceof Error) {
235
+ return val.stack || val.message;
236
+ }
237
+ return val;
238
+ }
239
+ function destroy2() {
240
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
241
+ }
242
+ createDebug.enable(createDebug.load());
243
+ return createDebug;
244
+ }
245
+ module2.exports = setup;
246
+ }
247
+ });
248
+ var require_browser = (0, import_chunk_2ESYSVXG.__commonJS)({
249
+ "../../node_modules/.pnpm/debug@4.4.0_supports-color@10.2.2/node_modules/debug/src/browser.js"(exports, module2) {
250
+ "use strict";
251
+ exports.formatArgs = formatArgs;
252
+ exports.save = save;
253
+ exports.load = load;
254
+ exports.useColors = useColors;
255
+ exports.storage = localstorage();
256
+ exports.destroy = /* @__PURE__ */ (() => {
257
+ let warned = false;
258
+ return () => {
259
+ if (!warned) {
260
+ warned = true;
261
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
262
+ }
263
+ };
264
+ })();
265
+ exports.colors = [
266
+ "#0000CC",
267
+ "#0000FF",
268
+ "#0033CC",
269
+ "#0033FF",
270
+ "#0066CC",
271
+ "#0066FF",
272
+ "#0099CC",
273
+ "#0099FF",
274
+ "#00CC00",
275
+ "#00CC33",
276
+ "#00CC66",
277
+ "#00CC99",
278
+ "#00CCCC",
279
+ "#00CCFF",
280
+ "#3300CC",
281
+ "#3300FF",
282
+ "#3333CC",
283
+ "#3333FF",
284
+ "#3366CC",
285
+ "#3366FF",
286
+ "#3399CC",
287
+ "#3399FF",
288
+ "#33CC00",
289
+ "#33CC33",
290
+ "#33CC66",
291
+ "#33CC99",
292
+ "#33CCCC",
293
+ "#33CCFF",
294
+ "#6600CC",
295
+ "#6600FF",
296
+ "#6633CC",
297
+ "#6633FF",
298
+ "#66CC00",
299
+ "#66CC33",
300
+ "#9900CC",
301
+ "#9900FF",
302
+ "#9933CC",
303
+ "#9933FF",
304
+ "#99CC00",
305
+ "#99CC33",
306
+ "#CC0000",
307
+ "#CC0033",
308
+ "#CC0066",
309
+ "#CC0099",
310
+ "#CC00CC",
311
+ "#CC00FF",
312
+ "#CC3300",
313
+ "#CC3333",
314
+ "#CC3366",
315
+ "#CC3399",
316
+ "#CC33CC",
317
+ "#CC33FF",
318
+ "#CC6600",
319
+ "#CC6633",
320
+ "#CC9900",
321
+ "#CC9933",
322
+ "#CCCC00",
323
+ "#CCCC33",
324
+ "#FF0000",
325
+ "#FF0033",
326
+ "#FF0066",
327
+ "#FF0099",
328
+ "#FF00CC",
329
+ "#FF00FF",
330
+ "#FF3300",
331
+ "#FF3333",
332
+ "#FF3366",
333
+ "#FF3399",
334
+ "#FF33CC",
335
+ "#FF33FF",
336
+ "#FF6600",
337
+ "#FF6633",
338
+ "#FF9900",
339
+ "#FF9933",
340
+ "#FFCC00",
341
+ "#FFCC33"
342
+ ];
343
+ function useColors() {
344
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
345
+ return true;
346
+ }
347
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
348
+ return false;
349
+ }
350
+ let m;
351
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
352
+ typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
353
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
354
+ typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
355
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
356
+ }
357
+ function formatArgs(args) {
358
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
359
+ if (!this.useColors) {
360
+ return;
361
+ }
362
+ const c = "color: " + this.color;
363
+ args.splice(1, 0, c, "color: inherit");
364
+ let index = 0;
365
+ let lastC = 0;
366
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
367
+ if (match === "%%") {
368
+ return;
369
+ }
370
+ index++;
371
+ if (match === "%c") {
372
+ lastC = index;
373
+ }
374
+ });
375
+ args.splice(lastC, 0, c);
376
+ }
377
+ exports.log = console.debug || console.log || (() => {
378
+ });
379
+ function save(namespaces) {
380
+ try {
381
+ if (namespaces) {
382
+ exports.storage.setItem("debug", namespaces);
383
+ } else {
384
+ exports.storage.removeItem("debug");
385
+ }
386
+ } catch (error) {
387
+ }
388
+ }
389
+ function load() {
390
+ let r;
391
+ try {
392
+ r = exports.storage.getItem("debug");
393
+ } catch (error) {
394
+ }
395
+ if (!r && typeof process !== "undefined" && "env" in process) {
396
+ r = process.env.DEBUG;
397
+ }
398
+ return r;
399
+ }
400
+ function localstorage() {
401
+ try {
402
+ return localStorage;
403
+ } catch (error) {
404
+ }
405
+ }
406
+ module2.exports = require_common()(exports);
407
+ var { formatters } = module2.exports;
408
+ formatters.j = function(v) {
409
+ try {
410
+ return JSON.stringify(v);
411
+ } catch (error) {
412
+ return "[UnexpectedJSONParseError]: " + error.message;
413
+ }
414
+ };
415
+ }
416
+ });
417
+ var require_node = (0, import_chunk_2ESYSVXG.__commonJS)({
418
+ "../../node_modules/.pnpm/debug@4.4.0_supports-color@10.2.2/node_modules/debug/src/node.js"(exports, module2) {
419
+ "use strict";
420
+ var tty = (0, import_chunk_2ESYSVXG.__require)("tty");
421
+ var util2 = (0, import_chunk_2ESYSVXG.__require)("util");
422
+ exports.init = init2;
423
+ exports.log = log2;
424
+ exports.formatArgs = formatArgs;
425
+ exports.save = save;
426
+ exports.load = load;
427
+ exports.useColors = useColors;
428
+ exports.destroy = util2.deprecate(
429
+ () => {
430
+ },
431
+ "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
432
+ );
433
+ exports.colors = [6, 2, 3, 4, 5, 1];
434
+ try {
435
+ const supportsColor = ((0, import_chunk_T3SJN3YL.init_supports_color)(), (0, import_chunk_2ESYSVXG.__toCommonJS)(import_chunk_T3SJN3YL.supports_color_exports));
436
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
437
+ exports.colors = [
438
+ 20,
439
+ 21,
440
+ 26,
441
+ 27,
442
+ 32,
443
+ 33,
444
+ 38,
445
+ 39,
446
+ 40,
447
+ 41,
448
+ 42,
449
+ 43,
450
+ 44,
451
+ 45,
452
+ 56,
453
+ 57,
454
+ 62,
455
+ 63,
456
+ 68,
457
+ 69,
458
+ 74,
459
+ 75,
460
+ 76,
461
+ 77,
462
+ 78,
463
+ 79,
464
+ 80,
465
+ 81,
466
+ 92,
467
+ 93,
468
+ 98,
469
+ 99,
470
+ 112,
471
+ 113,
472
+ 128,
473
+ 129,
474
+ 134,
475
+ 135,
476
+ 148,
477
+ 149,
478
+ 160,
479
+ 161,
480
+ 162,
481
+ 163,
482
+ 164,
483
+ 165,
484
+ 166,
485
+ 167,
486
+ 168,
487
+ 169,
488
+ 170,
489
+ 171,
490
+ 172,
491
+ 173,
492
+ 178,
493
+ 179,
494
+ 184,
495
+ 185,
496
+ 196,
497
+ 197,
498
+ 198,
499
+ 199,
500
+ 200,
501
+ 201,
502
+ 202,
503
+ 203,
504
+ 204,
505
+ 205,
506
+ 206,
507
+ 207,
508
+ 208,
509
+ 209,
510
+ 214,
511
+ 215,
512
+ 220,
513
+ 221
514
+ ];
515
+ }
516
+ } catch (error) {
517
+ }
518
+ exports.inspectOpts = Object.keys(process.env).filter((key) => {
519
+ return /^debug_/i.test(key);
520
+ }).reduce((obj, key) => {
521
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k) => {
522
+ return k.toUpperCase();
523
+ });
524
+ let val = process.env[key];
525
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
526
+ val = true;
527
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
528
+ val = false;
529
+ } else if (val === "null") {
530
+ val = null;
531
+ } else {
532
+ val = Number(val);
533
+ }
534
+ obj[prop] = val;
535
+ return obj;
536
+ }, {});
537
+ function useColors() {
538
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
539
+ }
540
+ function formatArgs(args) {
541
+ const { namespace: name3, useColors: useColors2 } = this;
542
+ if (useColors2) {
543
+ const c = this.color;
544
+ const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
545
+ const prefix = ` ${colorCode};1m${name3} \x1B[0m`;
546
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
547
+ args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
548
+ } else {
549
+ args[0] = getDate() + name3 + " " + args[0];
550
+ }
551
+ }
552
+ function getDate() {
553
+ if (exports.inspectOpts.hideDate) {
554
+ return "";
555
+ }
556
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
557
+ }
558
+ function log2(...args) {
559
+ return process.stderr.write(util2.formatWithOptions(exports.inspectOpts, ...args) + "\n");
560
+ }
561
+ function save(namespaces) {
562
+ if (namespaces) {
563
+ process.env.DEBUG = namespaces;
564
+ } else {
565
+ delete process.env.DEBUG;
566
+ }
567
+ }
568
+ function load() {
569
+ return process.env.DEBUG;
570
+ }
571
+ function init2(debug) {
572
+ debug.inspectOpts = {};
573
+ const keys = Object.keys(exports.inspectOpts);
574
+ for (let i = 0; i < keys.length; i++) {
575
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
576
+ }
577
+ }
578
+ module2.exports = require_common()(exports);
579
+ var { formatters } = module2.exports;
580
+ formatters.o = function(v) {
581
+ this.inspectOpts.colors = this.useColors;
582
+ return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
583
+ };
584
+ formatters.O = function(v) {
585
+ this.inspectOpts.colors = this.useColors;
586
+ return util2.inspect(v, this.inspectOpts);
587
+ };
588
+ }
589
+ });
590
+ var require_src2 = (0, import_chunk_2ESYSVXG.__commonJS)({
591
+ "../../node_modules/.pnpm/debug@4.4.0_supports-color@10.2.2/node_modules/debug/src/index.js"(exports, module2) {
592
+ "use strict";
593
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
594
+ module2.exports = require_browser();
595
+ } else {
596
+ module2.exports = require_node();
597
+ }
598
+ }
599
+ });
72
600
  var require_connection_string = (0, import_chunk_2ESYSVXG.__commonJS)({
73
601
  "../../node_modules/.pnpm/@tediousjs+connection-string@0.5.0/node_modules/@tediousjs/connection-string/lib/parser/connection-string.js"(exports) {
74
602
  "use strict";
@@ -2006,7 +2534,7 @@ var require_connection_pool = (0, import_chunk_2ESYSVXG.__commonJS)({
2006
2534
  "../../node_modules/.pnpm/mssql@11.0.1/node_modules/mssql/lib/base/connection-pool.js"(exports, module2) {
2007
2535
  "use strict";
2008
2536
  var { EventEmitter } = (0, import_chunk_2ESYSVXG.__require)("node:events");
2009
- var debug = (0, import_chunk_3EF3YJPJ.require_src)()("mssql:base");
2537
+ var debug = require_src2()("mssql:base");
2010
2538
  var { parseSqlConnectionString } = require_lib2();
2011
2539
  var tarn = require_tarn();
2012
2540
  var { IDS } = require_utils2();
@@ -2680,7 +3208,7 @@ var require_global_connection = (0, import_chunk_2ESYSVXG.__commonJS)({
2680
3208
  var require_prepared_statement = (0, import_chunk_2ESYSVXG.__commonJS)({
2681
3209
  "../../node_modules/.pnpm/mssql@11.0.1/node_modules/mssql/lib/base/prepared-statement.js"(exports, module2) {
2682
3210
  "use strict";
2683
- var debug = (0, import_chunk_3EF3YJPJ.require_src)()("mssql:base");
3211
+ var debug = require_src2()("mssql:base");
2684
3212
  var { EventEmitter } = (0, import_chunk_2ESYSVXG.__require)("node:events");
2685
3213
  var { IDS, objectHasProperty: objectHasProperty2 } = require_utils2();
2686
3214
  var globalConnection = require_global_connection();
@@ -2989,7 +3517,7 @@ var require_prepared_statement = (0, import_chunk_2ESYSVXG.__commonJS)({
2989
3517
  var require_request = (0, import_chunk_2ESYSVXG.__commonJS)({
2990
3518
  "../../node_modules/.pnpm/mssql@11.0.1/node_modules/mssql/lib/base/request.js"(exports, module2) {
2991
3519
  "use strict";
2992
- var debug = (0, import_chunk_3EF3YJPJ.require_src)()("mssql:base");
3520
+ var debug = require_src2()("mssql:base");
2993
3521
  var { EventEmitter } = (0, import_chunk_2ESYSVXG.__require)("node:events");
2994
3522
  var { Readable } = (0, import_chunk_2ESYSVXG.__require)("node:stream");
2995
3523
  var { IDS, objectHasProperty: objectHasProperty2 } = require_utils2();
@@ -3537,7 +4065,7 @@ var require_isolationlevel = (0, import_chunk_2ESYSVXG.__commonJS)({
3537
4065
  var require_transaction = (0, import_chunk_2ESYSVXG.__commonJS)({
3538
4066
  "../../node_modules/.pnpm/mssql@11.0.1/node_modules/mssql/lib/base/transaction.js"(exports, module2) {
3539
4067
  "use strict";
3540
- var debug = (0, import_chunk_3EF3YJPJ.require_src)()("mssql:base");
4068
+ var debug = require_src2()("mssql:base");
3541
4069
  var { EventEmitter } = (0, import_chunk_2ESYSVXG.__require)("node:events");
3542
4070
  var { IDS } = require_utils2();
3543
4071
  var globalConnection = require_global_connection();
@@ -16490,730 +17018,202 @@ var require_form_data = (0, import_chunk_2ESYSVXG.__commonJS)({
16490
17018
  };
16491
17019
  FormData2.prototype.setBoundary = function(boundary) {
16492
17020
  if (typeof boundary !== "string") {
16493
- throw new TypeError("FormData boundary must be a string");
16494
- }
16495
- this._boundary = boundary;
16496
- };
16497
- FormData2.prototype.getBoundary = function() {
16498
- if (!this._boundary) {
16499
- this._generateBoundary();
16500
- }
16501
- return this._boundary;
16502
- };
16503
- FormData2.prototype.getBuffer = function() {
16504
- var dataBuffer = new Buffer.alloc(0);
16505
- var boundary = this.getBoundary();
16506
- for (var i = 0, len = this._streams.length; i < len; i++) {
16507
- if (typeof this._streams[i] !== "function") {
16508
- if (Buffer.isBuffer(this._streams[i])) {
16509
- dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]);
16510
- } else {
16511
- dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]);
16512
- }
16513
- if (typeof this._streams[i] !== "string" || this._streams[i].substring(2, boundary.length + 2) !== boundary) {
16514
- dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData2.LINE_BREAK)]);
16515
- }
16516
- }
16517
- }
16518
- return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
16519
- };
16520
- FormData2.prototype._generateBoundary = function() {
16521
- this._boundary = "--------------------------" + crypto4.randomBytes(12).toString("hex");
16522
- };
16523
- FormData2.prototype.getLengthSync = function() {
16524
- var knownLength = this._overheadLength + this._valueLength;
16525
- if (this._streams.length) {
16526
- knownLength += this._lastBoundary().length;
16527
- }
16528
- if (!this.hasKnownLength()) {
16529
- this._error(new Error("Cannot calculate proper length in synchronous way."));
16530
- }
16531
- return knownLength;
16532
- };
16533
- FormData2.prototype.hasKnownLength = function() {
16534
- var hasKnownLength = true;
16535
- if (this._valuesToMeasure.length) {
16536
- hasKnownLength = false;
16537
- }
16538
- return hasKnownLength;
16539
- };
16540
- FormData2.prototype.getLength = function(cb) {
16541
- var knownLength = this._overheadLength + this._valueLength;
16542
- if (this._streams.length) {
16543
- knownLength += this._lastBoundary().length;
16544
- }
16545
- if (!this._valuesToMeasure.length) {
16546
- process.nextTick(cb.bind(this, null, knownLength));
16547
- return;
16548
- }
16549
- asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
16550
- if (err) {
16551
- cb(err);
16552
- return;
16553
- }
16554
- values.forEach(function(length) {
16555
- knownLength += length;
16556
- });
16557
- cb(null, knownLength);
16558
- });
16559
- };
16560
- FormData2.prototype.submit = function(params, cb) {
16561
- var request3;
16562
- var options;
16563
- var defaults = { method: "post" };
16564
- if (typeof params === "string") {
16565
- params = parseUrl(params);
16566
- options = populate({
16567
- port: params.port,
16568
- path: params.pathname,
16569
- host: params.hostname,
16570
- protocol: params.protocol
16571
- }, defaults);
16572
- } else {
16573
- options = populate(params, defaults);
16574
- if (!options.port) {
16575
- options.port = options.protocol === "https:" ? 443 : 80;
16576
- }
16577
- }
16578
- options.headers = this.getHeaders(params.headers);
16579
- if (options.protocol === "https:") {
16580
- request3 = https4.request(options);
16581
- } else {
16582
- request3 = http4.request(options);
16583
- }
16584
- this.getLength(function(err, length) {
16585
- if (err && err !== "Unknown stream") {
16586
- this._error(err);
16587
- return;
16588
- }
16589
- if (length) {
16590
- request3.setHeader("Content-Length", length);
16591
- }
16592
- this.pipe(request3);
16593
- if (cb) {
16594
- var onResponse;
16595
- var callback = function(error, responce) {
16596
- request3.removeListener("error", callback);
16597
- request3.removeListener("response", onResponse);
16598
- return cb.call(this, error, responce);
16599
- };
16600
- onResponse = callback.bind(this, null);
16601
- request3.on("error", callback);
16602
- request3.on("response", onResponse);
16603
- }
16604
- }.bind(this));
16605
- return request3;
16606
- };
16607
- FormData2.prototype._error = function(err) {
16608
- if (!this.error) {
16609
- this.error = err;
16610
- this.pause();
16611
- this.emit("error", err);
16612
- }
16613
- };
16614
- FormData2.prototype.toString = function() {
16615
- return "[object FormData]";
16616
- };
16617
- setToStringTag(FormData2.prototype, "FormData");
16618
- module2.exports = FormData2;
16619
- }
16620
- });
16621
- function formDataPolicy() {
16622
- return {
16623
- name: formDataPolicyName,
16624
- async sendRequest(request3, next) {
16625
- if (request3.formData) {
16626
- const contentType = request3.headers.get("Content-Type");
16627
- if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) {
16628
- request3.body = wwwFormUrlEncode(request3.formData);
16629
- request3.formData = void 0;
16630
- } else {
16631
- prepareFormData(request3.formData, request3);
16632
- }
16633
- }
16634
- return next(request3);
16635
- }
16636
- };
16637
- }
16638
- function wwwFormUrlEncode(formData) {
16639
- const urlSearchParams = new URLSearchParams();
16640
- for (const [key, value] of Object.entries(formData)) {
16641
- if (Array.isArray(value)) {
16642
- for (const subValue of value) {
16643
- urlSearchParams.append(key, subValue.toString());
16644
- }
16645
- } else {
16646
- urlSearchParams.append(key, value.toString());
16647
- }
16648
- }
16649
- return urlSearchParams.toString();
16650
- }
16651
- async function prepareFormData(formData, request3) {
16652
- const requestForm = new import_form_data.default();
16653
- for (const formKey of Object.keys(formData)) {
16654
- const formValue = formData[formKey];
16655
- if (Array.isArray(formValue)) {
16656
- for (const subValue of formValue) {
16657
- requestForm.append(formKey, subValue);
16658
- }
16659
- } else {
16660
- requestForm.append(formKey, formValue);
16661
- }
16662
- }
16663
- request3.body = requestForm;
16664
- request3.formData = void 0;
16665
- const contentType = request3.headers.get("Content-Type");
16666
- if (contentType && contentType.indexOf("multipart/form-data") !== -1) {
16667
- request3.headers.set("Content-Type", `multipart/form-data; boundary=${requestForm.getBoundary()}`);
16668
- }
16669
- try {
16670
- const contentLength = await new Promise((resolve, reject) => {
16671
- requestForm.getLength((err, length) => {
16672
- if (err) {
16673
- reject(err);
16674
- } else {
16675
- resolve(length);
16676
- }
16677
- });
16678
- });
16679
- request3.headers.set("Content-Length", contentLength);
16680
- } catch (e) {
16681
- }
16682
- }
16683
- var import_form_data, formDataPolicyName;
16684
- var init_formDataPolicy = (0, import_chunk_2ESYSVXG.__esm)({
16685
- "../../node_modules/.pnpm/@azure+core-rest-pipeline@1.9.2/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.js"() {
16686
- "use strict";
16687
- import_form_data = (0, import_chunk_2ESYSVXG.__toESM)(require_form_data());
16688
- formDataPolicyName = "formDataPolicy";
16689
- }
16690
- });
16691
- var require_common = (0, import_chunk_2ESYSVXG.__commonJS)({
16692
- "../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js"(exports, module2) {
16693
- "use strict";
16694
- function setup(env) {
16695
- createDebug.debug = createDebug;
16696
- createDebug.default = createDebug;
16697
- createDebug.coerce = coerce;
16698
- createDebug.disable = disable2;
16699
- createDebug.enable = enable2;
16700
- createDebug.enabled = enabled2;
16701
- createDebug.humanize = (0, import_chunk_3EF3YJPJ.require_ms)();
16702
- createDebug.destroy = destroy2;
16703
- Object.keys(env).forEach((key) => {
16704
- createDebug[key] = env[key];
16705
- });
16706
- createDebug.names = [];
16707
- createDebug.skips = [];
16708
- createDebug.formatters = {};
16709
- function selectColor(namespace) {
16710
- let hash = 0;
16711
- for (let i = 0; i < namespace.length; i++) {
16712
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
16713
- hash |= 0;
16714
- }
16715
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
16716
- }
16717
- createDebug.selectColor = selectColor;
16718
- function createDebug(namespace) {
16719
- let prevTime;
16720
- let enableOverride = null;
16721
- let namespacesCache;
16722
- let enabledCache;
16723
- function debug(...args) {
16724
- if (!debug.enabled) {
16725
- return;
16726
- }
16727
- const self2 = debug;
16728
- const curr = Number(/* @__PURE__ */ new Date());
16729
- const ms = curr - (prevTime || curr);
16730
- self2.diff = ms;
16731
- self2.prev = prevTime;
16732
- self2.curr = curr;
16733
- prevTime = curr;
16734
- args[0] = createDebug.coerce(args[0]);
16735
- if (typeof args[0] !== "string") {
16736
- args.unshift("%O");
16737
- }
16738
- let index = 0;
16739
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
16740
- if (match === "%%") {
16741
- return "%";
16742
- }
16743
- index++;
16744
- const formatter = createDebug.formatters[format];
16745
- if (typeof formatter === "function") {
16746
- const val = args[index];
16747
- match = formatter.call(self2, val);
16748
- args.splice(index, 1);
16749
- index--;
16750
- }
16751
- return match;
16752
- });
16753
- createDebug.formatArgs.call(self2, args);
16754
- const logFn = self2.log || createDebug.log;
16755
- logFn.apply(self2, args);
16756
- }
16757
- debug.namespace = namespace;
16758
- debug.useColors = createDebug.useColors();
16759
- debug.color = createDebug.selectColor(namespace);
16760
- debug.extend = extend2;
16761
- debug.destroy = createDebug.destroy;
16762
- Object.defineProperty(debug, "enabled", {
16763
- enumerable: true,
16764
- configurable: false,
16765
- get: () => {
16766
- if (enableOverride !== null) {
16767
- return enableOverride;
16768
- }
16769
- if (namespacesCache !== createDebug.namespaces) {
16770
- namespacesCache = createDebug.namespaces;
16771
- enabledCache = createDebug.enabled(namespace);
16772
- }
16773
- return enabledCache;
16774
- },
16775
- set: (v) => {
16776
- enableOverride = v;
16777
- }
16778
- });
16779
- if (typeof createDebug.init === "function") {
16780
- createDebug.init(debug);
16781
- }
16782
- return debug;
16783
- }
16784
- function extend2(namespace, delimiter) {
16785
- const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
16786
- newDebug.log = this.log;
16787
- return newDebug;
16788
- }
16789
- function enable2(namespaces) {
16790
- createDebug.save(namespaces);
16791
- createDebug.namespaces = namespaces;
16792
- createDebug.names = [];
16793
- createDebug.skips = [];
16794
- const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
16795
- for (const ns of split) {
16796
- if (ns[0] === "-") {
16797
- createDebug.skips.push(ns.slice(1));
16798
- } else {
16799
- createDebug.names.push(ns);
16800
- }
16801
- }
16802
- }
16803
- function matchesTemplate(search, template) {
16804
- let searchIndex = 0;
16805
- let templateIndex = 0;
16806
- let starIndex = -1;
16807
- let matchIndex = 0;
16808
- while (searchIndex < search.length) {
16809
- if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
16810
- if (template[templateIndex] === "*") {
16811
- starIndex = templateIndex;
16812
- matchIndex = searchIndex;
16813
- templateIndex++;
16814
- } else {
16815
- searchIndex++;
16816
- templateIndex++;
16817
- }
16818
- } else if (starIndex !== -1) {
16819
- templateIndex = starIndex + 1;
16820
- matchIndex++;
16821
- searchIndex = matchIndex;
16822
- } else {
16823
- return false;
16824
- }
16825
- }
16826
- while (templateIndex < template.length && template[templateIndex] === "*") {
16827
- templateIndex++;
16828
- }
16829
- return templateIndex === template.length;
16830
- }
16831
- function disable2() {
16832
- const namespaces = [
16833
- ...createDebug.names,
16834
- ...createDebug.skips.map((namespace) => "-" + namespace)
16835
- ].join(",");
16836
- createDebug.enable("");
16837
- return namespaces;
17021
+ throw new TypeError("FormData boundary must be a string");
16838
17022
  }
16839
- function enabled2(name3) {
16840
- for (const skip of createDebug.skips) {
16841
- if (matchesTemplate(name3, skip)) {
16842
- return false;
17023
+ this._boundary = boundary;
17024
+ };
17025
+ FormData2.prototype.getBoundary = function() {
17026
+ if (!this._boundary) {
17027
+ this._generateBoundary();
17028
+ }
17029
+ return this._boundary;
17030
+ };
17031
+ FormData2.prototype.getBuffer = function() {
17032
+ var dataBuffer = new Buffer.alloc(0);
17033
+ var boundary = this.getBoundary();
17034
+ for (var i = 0, len = this._streams.length; i < len; i++) {
17035
+ if (typeof this._streams[i] !== "function") {
17036
+ if (Buffer.isBuffer(this._streams[i])) {
17037
+ dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]);
17038
+ } else {
17039
+ dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]);
16843
17040
  }
16844
- }
16845
- for (const ns of createDebug.names) {
16846
- if (matchesTemplate(name3, ns)) {
16847
- return true;
17041
+ if (typeof this._streams[i] !== "string" || this._streams[i].substring(2, boundary.length + 2) !== boundary) {
17042
+ dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData2.LINE_BREAK)]);
16848
17043
  }
16849
17044
  }
16850
- return false;
16851
17045
  }
16852
- function coerce(val) {
16853
- if (val instanceof Error) {
16854
- return val.stack || val.message;
16855
- }
16856
- return val;
17046
+ return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
17047
+ };
17048
+ FormData2.prototype._generateBoundary = function() {
17049
+ this._boundary = "--------------------------" + crypto4.randomBytes(12).toString("hex");
17050
+ };
17051
+ FormData2.prototype.getLengthSync = function() {
17052
+ var knownLength = this._overheadLength + this._valueLength;
17053
+ if (this._streams.length) {
17054
+ knownLength += this._lastBoundary().length;
16857
17055
  }
16858
- function destroy2() {
16859
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
17056
+ if (!this.hasKnownLength()) {
17057
+ this._error(new Error("Cannot calculate proper length in synchronous way."));
16860
17058
  }
16861
- createDebug.enable(createDebug.load());
16862
- return createDebug;
16863
- }
16864
- module2.exports = setup;
16865
- }
16866
- });
16867
- var require_browser = (0, import_chunk_2ESYSVXG.__commonJS)({
16868
- "../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js"(exports, module2) {
16869
- "use strict";
16870
- exports.formatArgs = formatArgs;
16871
- exports.save = save;
16872
- exports.load = load;
16873
- exports.useColors = useColors;
16874
- exports.storage = localstorage();
16875
- exports.destroy = /* @__PURE__ */ (() => {
16876
- let warned = false;
16877
- return () => {
16878
- if (!warned) {
16879
- warned = true;
16880
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
16881
- }
16882
- };
16883
- })();
16884
- exports.colors = [
16885
- "#0000CC",
16886
- "#0000FF",
16887
- "#0033CC",
16888
- "#0033FF",
16889
- "#0066CC",
16890
- "#0066FF",
16891
- "#0099CC",
16892
- "#0099FF",
16893
- "#00CC00",
16894
- "#00CC33",
16895
- "#00CC66",
16896
- "#00CC99",
16897
- "#00CCCC",
16898
- "#00CCFF",
16899
- "#3300CC",
16900
- "#3300FF",
16901
- "#3333CC",
16902
- "#3333FF",
16903
- "#3366CC",
16904
- "#3366FF",
16905
- "#3399CC",
16906
- "#3399FF",
16907
- "#33CC00",
16908
- "#33CC33",
16909
- "#33CC66",
16910
- "#33CC99",
16911
- "#33CCCC",
16912
- "#33CCFF",
16913
- "#6600CC",
16914
- "#6600FF",
16915
- "#6633CC",
16916
- "#6633FF",
16917
- "#66CC00",
16918
- "#66CC33",
16919
- "#9900CC",
16920
- "#9900FF",
16921
- "#9933CC",
16922
- "#9933FF",
16923
- "#99CC00",
16924
- "#99CC33",
16925
- "#CC0000",
16926
- "#CC0033",
16927
- "#CC0066",
16928
- "#CC0099",
16929
- "#CC00CC",
16930
- "#CC00FF",
16931
- "#CC3300",
16932
- "#CC3333",
16933
- "#CC3366",
16934
- "#CC3399",
16935
- "#CC33CC",
16936
- "#CC33FF",
16937
- "#CC6600",
16938
- "#CC6633",
16939
- "#CC9900",
16940
- "#CC9933",
16941
- "#CCCC00",
16942
- "#CCCC33",
16943
- "#FF0000",
16944
- "#FF0033",
16945
- "#FF0066",
16946
- "#FF0099",
16947
- "#FF00CC",
16948
- "#FF00FF",
16949
- "#FF3300",
16950
- "#FF3333",
16951
- "#FF3366",
16952
- "#FF3399",
16953
- "#FF33CC",
16954
- "#FF33FF",
16955
- "#FF6600",
16956
- "#FF6633",
16957
- "#FF9900",
16958
- "#FF9933",
16959
- "#FFCC00",
16960
- "#FFCC33"
16961
- ];
16962
- function useColors() {
16963
- if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
16964
- return true;
17059
+ return knownLength;
17060
+ };
17061
+ FormData2.prototype.hasKnownLength = function() {
17062
+ var hasKnownLength = true;
17063
+ if (this._valuesToMeasure.length) {
17064
+ hasKnownLength = false;
16965
17065
  }
16966
- if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
16967
- return false;
17066
+ return hasKnownLength;
17067
+ };
17068
+ FormData2.prototype.getLength = function(cb) {
17069
+ var knownLength = this._overheadLength + this._valueLength;
17070
+ if (this._streams.length) {
17071
+ knownLength += this._lastBoundary().length;
16968
17072
  }
16969
- let m;
16970
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
16971
- typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
16972
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
16973
- typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
16974
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
16975
- }
16976
- function formatArgs(args) {
16977
- args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
16978
- if (!this.useColors) {
17073
+ if (!this._valuesToMeasure.length) {
17074
+ process.nextTick(cb.bind(this, null, knownLength));
16979
17075
  return;
16980
17076
  }
16981
- const c = "color: " + this.color;
16982
- args.splice(1, 0, c, "color: inherit");
16983
- let index = 0;
16984
- let lastC = 0;
16985
- args[0].replace(/%[a-zA-Z%]/g, (match) => {
16986
- if (match === "%%") {
17077
+ asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
17078
+ if (err) {
17079
+ cb(err);
16987
17080
  return;
16988
17081
  }
16989
- index++;
16990
- if (match === "%c") {
16991
- lastC = index;
16992
- }
17082
+ values.forEach(function(length) {
17083
+ knownLength += length;
17084
+ });
17085
+ cb(null, knownLength);
16993
17086
  });
16994
- args.splice(lastC, 0, c);
16995
- }
16996
- exports.log = console.debug || console.log || (() => {
16997
- });
16998
- function save(namespaces) {
16999
- try {
17000
- if (namespaces) {
17001
- exports.storage.setItem("debug", namespaces);
17002
- } else {
17003
- exports.storage.removeItem("debug");
17087
+ };
17088
+ FormData2.prototype.submit = function(params, cb) {
17089
+ var request3;
17090
+ var options;
17091
+ var defaults = { method: "post" };
17092
+ if (typeof params === "string") {
17093
+ params = parseUrl(params);
17094
+ options = populate({
17095
+ port: params.port,
17096
+ path: params.pathname,
17097
+ host: params.hostname,
17098
+ protocol: params.protocol
17099
+ }, defaults);
17100
+ } else {
17101
+ options = populate(params, defaults);
17102
+ if (!options.port) {
17103
+ options.port = options.protocol === "https:" ? 443 : 80;
17004
17104
  }
17005
- } catch (error) {
17006
- }
17007
- }
17008
- function load() {
17009
- let r;
17010
- try {
17011
- r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
17012
- } catch (error) {
17013
- }
17014
- if (!r && typeof process !== "undefined" && "env" in process) {
17015
- r = process.env.DEBUG;
17016
17105
  }
17017
- return r;
17018
- }
17019
- function localstorage() {
17020
- try {
17021
- return localStorage;
17022
- } catch (error) {
17106
+ options.headers = this.getHeaders(params.headers);
17107
+ if (options.protocol === "https:") {
17108
+ request3 = https4.request(options);
17109
+ } else {
17110
+ request3 = http4.request(options);
17023
17111
  }
17024
- }
17025
- module2.exports = require_common()(exports);
17026
- var { formatters } = module2.exports;
17027
- formatters.j = function(v) {
17028
- try {
17029
- return JSON.stringify(v);
17030
- } catch (error) {
17031
- return "[UnexpectedJSONParseError]: " + error.message;
17112
+ this.getLength(function(err, length) {
17113
+ if (err && err !== "Unknown stream") {
17114
+ this._error(err);
17115
+ return;
17116
+ }
17117
+ if (length) {
17118
+ request3.setHeader("Content-Length", length);
17119
+ }
17120
+ this.pipe(request3);
17121
+ if (cb) {
17122
+ var onResponse;
17123
+ var callback = function(error, responce) {
17124
+ request3.removeListener("error", callback);
17125
+ request3.removeListener("response", onResponse);
17126
+ return cb.call(this, error, responce);
17127
+ };
17128
+ onResponse = callback.bind(this, null);
17129
+ request3.on("error", callback);
17130
+ request3.on("response", onResponse);
17131
+ }
17132
+ }.bind(this));
17133
+ return request3;
17134
+ };
17135
+ FormData2.prototype._error = function(err) {
17136
+ if (!this.error) {
17137
+ this.error = err;
17138
+ this.pause();
17139
+ this.emit("error", err);
17032
17140
  }
17033
17141
  };
17142
+ FormData2.prototype.toString = function() {
17143
+ return "[object FormData]";
17144
+ };
17145
+ setToStringTag(FormData2.prototype, "FormData");
17146
+ module2.exports = FormData2;
17034
17147
  }
17035
17148
  });
17036
- var require_node = (0, import_chunk_2ESYSVXG.__commonJS)({
17037
- "../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js"(exports, module2) {
17038
- "use strict";
17039
- var tty = (0, import_chunk_2ESYSVXG.__require)("tty");
17040
- var util2 = (0, import_chunk_2ESYSVXG.__require)("util");
17041
- exports.init = init2;
17042
- exports.log = log2;
17043
- exports.formatArgs = formatArgs;
17044
- exports.save = save;
17045
- exports.load = load;
17046
- exports.useColors = useColors;
17047
- exports.destroy = util2.deprecate(
17048
- () => {
17049
- },
17050
- "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
17051
- );
17052
- exports.colors = [6, 2, 3, 4, 5, 1];
17053
- try {
17054
- const supportsColor = ((0, import_chunk_3EF3YJPJ.init_supports_color)(), (0, import_chunk_2ESYSVXG.__toCommonJS)(import_chunk_3EF3YJPJ.supports_color_exports));
17055
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
17056
- exports.colors = [
17057
- 20,
17058
- 21,
17059
- 26,
17060
- 27,
17061
- 32,
17062
- 33,
17063
- 38,
17064
- 39,
17065
- 40,
17066
- 41,
17067
- 42,
17068
- 43,
17069
- 44,
17070
- 45,
17071
- 56,
17072
- 57,
17073
- 62,
17074
- 63,
17075
- 68,
17076
- 69,
17077
- 74,
17078
- 75,
17079
- 76,
17080
- 77,
17081
- 78,
17082
- 79,
17083
- 80,
17084
- 81,
17085
- 92,
17086
- 93,
17087
- 98,
17088
- 99,
17089
- 112,
17090
- 113,
17091
- 128,
17092
- 129,
17093
- 134,
17094
- 135,
17095
- 148,
17096
- 149,
17097
- 160,
17098
- 161,
17099
- 162,
17100
- 163,
17101
- 164,
17102
- 165,
17103
- 166,
17104
- 167,
17105
- 168,
17106
- 169,
17107
- 170,
17108
- 171,
17109
- 172,
17110
- 173,
17111
- 178,
17112
- 179,
17113
- 184,
17114
- 185,
17115
- 196,
17116
- 197,
17117
- 198,
17118
- 199,
17119
- 200,
17120
- 201,
17121
- 202,
17122
- 203,
17123
- 204,
17124
- 205,
17125
- 206,
17126
- 207,
17127
- 208,
17128
- 209,
17129
- 214,
17130
- 215,
17131
- 220,
17132
- 221
17133
- ];
17134
- }
17135
- } catch (error) {
17136
- }
17137
- exports.inspectOpts = Object.keys(process.env).filter((key) => {
17138
- return /^debug_/i.test(key);
17139
- }).reduce((obj, key) => {
17140
- const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k) => {
17141
- return k.toUpperCase();
17142
- });
17143
- let val = process.env[key];
17144
- if (/^(yes|on|true|enabled)$/i.test(val)) {
17145
- val = true;
17146
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
17147
- val = false;
17148
- } else if (val === "null") {
17149
- val = null;
17150
- } else {
17151
- val = Number(val);
17152
- }
17153
- obj[prop] = val;
17154
- return obj;
17155
- }, {});
17156
- function useColors() {
17157
- return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
17158
- }
17159
- function formatArgs(args) {
17160
- const { namespace: name3, useColors: useColors2 } = this;
17161
- if (useColors2) {
17162
- const c = this.color;
17163
- const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
17164
- const prefix = ` ${colorCode};1m${name3} \x1B[0m`;
17165
- args[0] = prefix + args[0].split("\n").join("\n" + prefix);
17166
- args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
17167
- } else {
17168
- args[0] = getDate() + name3 + " " + args[0];
17169
- }
17170
- }
17171
- function getDate() {
17172
- if (exports.inspectOpts.hideDate) {
17173
- return "";
17149
+ function formDataPolicy() {
17150
+ return {
17151
+ name: formDataPolicyName,
17152
+ async sendRequest(request3, next) {
17153
+ if (request3.formData) {
17154
+ const contentType = request3.headers.get("Content-Type");
17155
+ if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) {
17156
+ request3.body = wwwFormUrlEncode(request3.formData);
17157
+ request3.formData = void 0;
17158
+ } else {
17159
+ prepareFormData(request3.formData, request3);
17160
+ }
17174
17161
  }
17175
- return (/* @__PURE__ */ new Date()).toISOString() + " ";
17176
- }
17177
- function log2(...args) {
17178
- return process.stderr.write(util2.formatWithOptions(exports.inspectOpts, ...args) + "\n");
17162
+ return next(request3);
17179
17163
  }
17180
- function save(namespaces) {
17181
- if (namespaces) {
17182
- process.env.DEBUG = namespaces;
17183
- } else {
17184
- delete process.env.DEBUG;
17164
+ };
17165
+ }
17166
+ function wwwFormUrlEncode(formData) {
17167
+ const urlSearchParams = new URLSearchParams();
17168
+ for (const [key, value] of Object.entries(formData)) {
17169
+ if (Array.isArray(value)) {
17170
+ for (const subValue of value) {
17171
+ urlSearchParams.append(key, subValue.toString());
17185
17172
  }
17173
+ } else {
17174
+ urlSearchParams.append(key, value.toString());
17186
17175
  }
17187
- function load() {
17188
- return process.env.DEBUG;
17189
- }
17190
- function init2(debug) {
17191
- debug.inspectOpts = {};
17192
- const keys = Object.keys(exports.inspectOpts);
17193
- for (let i = 0; i < keys.length; i++) {
17194
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
17176
+ }
17177
+ return urlSearchParams.toString();
17178
+ }
17179
+ async function prepareFormData(formData, request3) {
17180
+ const requestForm = new import_form_data.default();
17181
+ for (const formKey of Object.keys(formData)) {
17182
+ const formValue = formData[formKey];
17183
+ if (Array.isArray(formValue)) {
17184
+ for (const subValue of formValue) {
17185
+ requestForm.append(formKey, subValue);
17195
17186
  }
17187
+ } else {
17188
+ requestForm.append(formKey, formValue);
17196
17189
  }
17197
- module2.exports = require_common()(exports);
17198
- var { formatters } = module2.exports;
17199
- formatters.o = function(v) {
17200
- this.inspectOpts.colors = this.useColors;
17201
- return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
17202
- };
17203
- formatters.O = function(v) {
17204
- this.inspectOpts.colors = this.useColors;
17205
- return util2.inspect(v, this.inspectOpts);
17206
- };
17207
17190
  }
17208
- });
17209
- var require_src2 = (0, import_chunk_2ESYSVXG.__commonJS)({
17210
- "../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js"(exports, module2) {
17191
+ request3.body = requestForm;
17192
+ request3.formData = void 0;
17193
+ const contentType = request3.headers.get("Content-Type");
17194
+ if (contentType && contentType.indexOf("multipart/form-data") !== -1) {
17195
+ request3.headers.set("Content-Type", `multipart/form-data; boundary=${requestForm.getBoundary()}`);
17196
+ }
17197
+ try {
17198
+ const contentLength = await new Promise((resolve, reject) => {
17199
+ requestForm.getLength((err, length) => {
17200
+ if (err) {
17201
+ reject(err);
17202
+ } else {
17203
+ resolve(length);
17204
+ }
17205
+ });
17206
+ });
17207
+ request3.headers.set("Content-Length", contentLength);
17208
+ } catch (e) {
17209
+ }
17210
+ }
17211
+ var import_form_data, formDataPolicyName;
17212
+ var init_formDataPolicy = (0, import_chunk_2ESYSVXG.__esm)({
17213
+ "../../node_modules/.pnpm/@azure+core-rest-pipeline@1.9.2/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.js"() {
17211
17214
  "use strict";
17212
- if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
17213
- module2.exports = require_browser();
17214
- } else {
17215
- module2.exports = require_node();
17216
- }
17215
+ import_form_data = (0, import_chunk_2ESYSVXG.__toESM)(require_form_data());
17216
+ formDataPolicyName = "formDataPolicy";
17217
17217
  }
17218
17218
  });
17219
17219
  var require_promisify = (0, import_chunk_2ESYSVXG.__commonJS)({
@@ -17243,7 +17243,7 @@ var require_src3 = (0, import_chunk_2ESYSVXG.__commonJS)({
17243
17243
  return mod && mod.__esModule ? mod : { "default": mod };
17244
17244
  };
17245
17245
  var events_1 = (0, import_chunk_2ESYSVXG.__require)("events");
17246
- var debug_1 = __importDefault(require_src2());
17246
+ var debug_1 = __importDefault((0, import_chunk_T3SJN3YL.require_src)());
17247
17247
  var promisify_1 = __importDefault(require_promisify());
17248
17248
  var debug = debug_1.default("agent-base");
17249
17249
  function isAgent(v) {
@@ -17424,7 +17424,7 @@ var require_parse_proxy_response = (0, import_chunk_2ESYSVXG.__commonJS)({
17424
17424
  return mod && mod.__esModule ? mod : { "default": mod };
17425
17425
  };
17426
17426
  Object.defineProperty(exports, "__esModule", { value: true });
17427
- var debug_1 = __importDefault(require_src2());
17427
+ var debug_1 = __importDefault((0, import_chunk_T3SJN3YL.require_src)());
17428
17428
  var debug = debug_1.default("https-proxy-agent:parse-proxy-response");
17429
17429
  function parseProxyResponse(socket) {
17430
17430
  return new Promise((resolve, reject) => {
@@ -17519,7 +17519,7 @@ var require_agent = (0, import_chunk_2ESYSVXG.__commonJS)({
17519
17519
  var tls_1 = __importDefault((0, import_chunk_2ESYSVXG.__require)("tls"));
17520
17520
  var url_1 = __importDefault((0, import_chunk_2ESYSVXG.__require)("url"));
17521
17521
  var assert_1 = __importDefault((0, import_chunk_2ESYSVXG.__require)("assert"));
17522
- var debug_1 = __importDefault(require_src2());
17522
+ var debug_1 = __importDefault((0, import_chunk_T3SJN3YL.require_src)());
17523
17523
  var agent_base_1 = require_src3();
17524
17524
  var parse_proxy_response_1 = __importDefault(require_parse_proxy_response());
17525
17525
  var debug = debug_1.default("https-proxy-agent:agent");
@@ -17720,7 +17720,7 @@ var require_agent2 = (0, import_chunk_2ESYSVXG.__commonJS)({
17720
17720
  var net_1 = __importDefault((0, import_chunk_2ESYSVXG.__require)("net"));
17721
17721
  var tls_1 = __importDefault((0, import_chunk_2ESYSVXG.__require)("tls"));
17722
17722
  var url_1 = __importDefault((0, import_chunk_2ESYSVXG.__require)("url"));
17723
- var debug_1 = __importDefault(require_src2());
17723
+ var debug_1 = __importDefault((0, import_chunk_T3SJN3YL.require_src)());
17724
17724
  var once_1 = __importDefault(require_dist2());
17725
17725
  var agent_base_1 = require_src3();
17726
17726
  var debug = (0, debug_1.default)("http-proxy-agent");
@@ -30158,7 +30158,7 @@ var require_TokenExpiredError = (0, import_chunk_2ESYSVXG.__commonJS)({
30158
30158
  var require_timespan = (0, import_chunk_2ESYSVXG.__commonJS)({
30159
30159
  "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/timespan.js"(exports, module2) {
30160
30160
  "use strict";
30161
- var ms = (0, import_chunk_3EF3YJPJ.require_ms)();
30161
+ var ms = (0, import_chunk_T3SJN3YL.require_ms)();
30162
30162
  module2.exports = function(time, iat) {
30163
30163
  var timestamp = iat || Math.floor(Date.now() / 1e3);
30164
30164
  if (typeof time === "string") {
@@ -67634,7 +67634,7 @@ var require_connection_pool2 = (0, import_chunk_2ESYSVXG.__commonJS)({
67634
67634
  "../../node_modules/.pnpm/mssql@11.0.1/node_modules/mssql/lib/tedious/connection-pool.js"(exports, module2) {
67635
67635
  "use strict";
67636
67636
  var tds = require_tedious();
67637
- var debug = (0, import_chunk_3EF3YJPJ.require_src)()("mssql:tedi");
67637
+ var debug = require_src2()("mssql:tedi");
67638
67638
  var BaseConnectionPool = require_connection_pool();
67639
67639
  var { IDS } = require_utils2();
67640
67640
  var shared = require_shared();
@@ -67777,7 +67777,7 @@ var require_connection_pool2 = (0, import_chunk_2ESYSVXG.__commonJS)({
67777
67777
  var require_transaction3 = (0, import_chunk_2ESYSVXG.__commonJS)({
67778
67778
  "../../node_modules/.pnpm/mssql@11.0.1/node_modules/mssql/lib/tedious/transaction.js"(exports, module2) {
67779
67779
  "use strict";
67780
- var debug = (0, import_chunk_3EF3YJPJ.require_src)()("mssql:tedi");
67780
+ var debug = require_src2()("mssql:tedi");
67781
67781
  var BaseTransaction = require_transaction();
67782
67782
  var { IDS } = require_utils2();
67783
67783
  var TransactionError = require_transaction_error();
@@ -68056,7 +68056,7 @@ var require_request3 = (0, import_chunk_2ESYSVXG.__commonJS)({
68056
68056
  "../../node_modules/.pnpm/mssql@11.0.1/node_modules/mssql/lib/tedious/request.js"(exports, module2) {
68057
68057
  "use strict";
68058
68058
  var tds = require_tedious();
68059
- var debug = (0, import_chunk_3EF3YJPJ.require_src)()("mssql:tedi");
68059
+ var debug = require_src2()("mssql:tedi");
68060
68060
  var BaseRequest = require_request();
68061
68061
  var RequestError = require_request_error();
68062
68062
  var { IDS, objectHasProperty: objectHasProperty2 } = require_utils2();