@eventcatalog/generator-openapi 7.5.1 → 7.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -5,7 +5,13 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __commonJS = (cb, mod) => function __require() {
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __commonJS = (cb, mod) => function __require2() {
9
15
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
16
  };
11
17
  var __copyProps = (to, from, except, desc) => {
@@ -279,6 +285,1246 @@ var require_ansi_align = __commonJS({
279
285
  }
280
286
  });
281
287
 
288
+ // ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
289
+ var require_ms = __commonJS({
290
+ "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module) {
291
+ "use strict";
292
+ var s = 1e3;
293
+ var m = s * 60;
294
+ var h = m * 60;
295
+ var d = h * 24;
296
+ var w = d * 7;
297
+ var y = d * 365.25;
298
+ module.exports = function(val, options) {
299
+ options = options || {};
300
+ var type = typeof val;
301
+ if (type === "string" && val.length > 0) {
302
+ return parse2(val);
303
+ } else if (type === "number" && isFinite(val)) {
304
+ return options.long ? fmtLong(val) : fmtShort(val);
305
+ }
306
+ throw new Error(
307
+ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
308
+ );
309
+ };
310
+ function parse2(str) {
311
+ str = String(str);
312
+ if (str.length > 100) {
313
+ return;
314
+ }
315
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
316
+ str
317
+ );
318
+ if (!match) {
319
+ return;
320
+ }
321
+ var n = parseFloat(match[1]);
322
+ var type = (match[2] || "ms").toLowerCase();
323
+ switch (type) {
324
+ case "years":
325
+ case "year":
326
+ case "yrs":
327
+ case "yr":
328
+ case "y":
329
+ return n * y;
330
+ case "weeks":
331
+ case "week":
332
+ case "w":
333
+ return n * w;
334
+ case "days":
335
+ case "day":
336
+ case "d":
337
+ return n * d;
338
+ case "hours":
339
+ case "hour":
340
+ case "hrs":
341
+ case "hr":
342
+ case "h":
343
+ return n * h;
344
+ case "minutes":
345
+ case "minute":
346
+ case "mins":
347
+ case "min":
348
+ case "m":
349
+ return n * m;
350
+ case "seconds":
351
+ case "second":
352
+ case "secs":
353
+ case "sec":
354
+ case "s":
355
+ return n * s;
356
+ case "milliseconds":
357
+ case "millisecond":
358
+ case "msecs":
359
+ case "msec":
360
+ case "ms":
361
+ return n;
362
+ default:
363
+ return void 0;
364
+ }
365
+ }
366
+ function fmtShort(ms) {
367
+ var msAbs = Math.abs(ms);
368
+ if (msAbs >= d) {
369
+ return Math.round(ms / d) + "d";
370
+ }
371
+ if (msAbs >= h) {
372
+ return Math.round(ms / h) + "h";
373
+ }
374
+ if (msAbs >= m) {
375
+ return Math.round(ms / m) + "m";
376
+ }
377
+ if (msAbs >= s) {
378
+ return Math.round(ms / s) + "s";
379
+ }
380
+ return ms + "ms";
381
+ }
382
+ function fmtLong(ms) {
383
+ var msAbs = Math.abs(ms);
384
+ if (msAbs >= d) {
385
+ return plural(ms, msAbs, d, "day");
386
+ }
387
+ if (msAbs >= h) {
388
+ return plural(ms, msAbs, h, "hour");
389
+ }
390
+ if (msAbs >= m) {
391
+ return plural(ms, msAbs, m, "minute");
392
+ }
393
+ if (msAbs >= s) {
394
+ return plural(ms, msAbs, s, "second");
395
+ }
396
+ return ms + " ms";
397
+ }
398
+ function plural(ms, msAbs, n, name) {
399
+ var isPlural = msAbs >= n * 1.5;
400
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
401
+ }
402
+ }
403
+ });
404
+
405
+ // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
406
+ var require_common = __commonJS({
407
+ "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports, module) {
408
+ "use strict";
409
+ function setup(env) {
410
+ createDebug.debug = createDebug;
411
+ createDebug.default = createDebug;
412
+ createDebug.coerce = coerce;
413
+ createDebug.disable = disable;
414
+ createDebug.enable = enable;
415
+ createDebug.enabled = enabled;
416
+ createDebug.humanize = require_ms();
417
+ createDebug.destroy = destroy;
418
+ Object.keys(env).forEach((key) => {
419
+ createDebug[key] = env[key];
420
+ });
421
+ createDebug.names = [];
422
+ createDebug.skips = [];
423
+ createDebug.formatters = {};
424
+ function selectColor(namespace) {
425
+ let hash = 0;
426
+ for (let i = 0; i < namespace.length; i++) {
427
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
428
+ hash |= 0;
429
+ }
430
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
431
+ }
432
+ createDebug.selectColor = selectColor;
433
+ function createDebug(namespace) {
434
+ let prevTime;
435
+ let enableOverride = null;
436
+ let namespacesCache;
437
+ let enabledCache;
438
+ function debug(...args) {
439
+ if (!debug.enabled) {
440
+ return;
441
+ }
442
+ const self = debug;
443
+ const curr = Number(/* @__PURE__ */ new Date());
444
+ const ms = curr - (prevTime || curr);
445
+ self.diff = ms;
446
+ self.prev = prevTime;
447
+ self.curr = curr;
448
+ prevTime = curr;
449
+ args[0] = createDebug.coerce(args[0]);
450
+ if (typeof args[0] !== "string") {
451
+ args.unshift("%O");
452
+ }
453
+ let index = 0;
454
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
455
+ if (match === "%%") {
456
+ return "%";
457
+ }
458
+ index++;
459
+ const formatter = createDebug.formatters[format];
460
+ if (typeof formatter === "function") {
461
+ const val = args[index];
462
+ match = formatter.call(self, val);
463
+ args.splice(index, 1);
464
+ index--;
465
+ }
466
+ return match;
467
+ });
468
+ createDebug.formatArgs.call(self, args);
469
+ const logFn = self.log || createDebug.log;
470
+ logFn.apply(self, args);
471
+ }
472
+ debug.namespace = namespace;
473
+ debug.useColors = createDebug.useColors();
474
+ debug.color = createDebug.selectColor(namespace);
475
+ debug.extend = extend;
476
+ debug.destroy = createDebug.destroy;
477
+ Object.defineProperty(debug, "enabled", {
478
+ enumerable: true,
479
+ configurable: false,
480
+ get: () => {
481
+ if (enableOverride !== null) {
482
+ return enableOverride;
483
+ }
484
+ if (namespacesCache !== createDebug.namespaces) {
485
+ namespacesCache = createDebug.namespaces;
486
+ enabledCache = createDebug.enabled(namespace);
487
+ }
488
+ return enabledCache;
489
+ },
490
+ set: (v) => {
491
+ enableOverride = v;
492
+ }
493
+ });
494
+ if (typeof createDebug.init === "function") {
495
+ createDebug.init(debug);
496
+ }
497
+ return debug;
498
+ }
499
+ function extend(namespace, delimiter) {
500
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
501
+ newDebug.log = this.log;
502
+ return newDebug;
503
+ }
504
+ function enable(namespaces) {
505
+ createDebug.save(namespaces);
506
+ createDebug.namespaces = namespaces;
507
+ createDebug.names = [];
508
+ createDebug.skips = [];
509
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
510
+ for (const ns of split) {
511
+ if (ns[0] === "-") {
512
+ createDebug.skips.push(ns.slice(1));
513
+ } else {
514
+ createDebug.names.push(ns);
515
+ }
516
+ }
517
+ }
518
+ function matchesTemplate(search, template) {
519
+ let searchIndex = 0;
520
+ let templateIndex = 0;
521
+ let starIndex = -1;
522
+ let matchIndex = 0;
523
+ while (searchIndex < search.length) {
524
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
525
+ if (template[templateIndex] === "*") {
526
+ starIndex = templateIndex;
527
+ matchIndex = searchIndex;
528
+ templateIndex++;
529
+ } else {
530
+ searchIndex++;
531
+ templateIndex++;
532
+ }
533
+ } else if (starIndex !== -1) {
534
+ templateIndex = starIndex + 1;
535
+ matchIndex++;
536
+ searchIndex = matchIndex;
537
+ } else {
538
+ return false;
539
+ }
540
+ }
541
+ while (templateIndex < template.length && template[templateIndex] === "*") {
542
+ templateIndex++;
543
+ }
544
+ return templateIndex === template.length;
545
+ }
546
+ function disable() {
547
+ const namespaces = [
548
+ ...createDebug.names,
549
+ ...createDebug.skips.map((namespace) => "-" + namespace)
550
+ ].join(",");
551
+ createDebug.enable("");
552
+ return namespaces;
553
+ }
554
+ function enabled(name) {
555
+ for (const skip of createDebug.skips) {
556
+ if (matchesTemplate(name, skip)) {
557
+ return false;
558
+ }
559
+ }
560
+ for (const ns of createDebug.names) {
561
+ if (matchesTemplate(name, ns)) {
562
+ return true;
563
+ }
564
+ }
565
+ return false;
566
+ }
567
+ function coerce(val) {
568
+ if (val instanceof Error) {
569
+ return val.stack || val.message;
570
+ }
571
+ return val;
572
+ }
573
+ function destroy() {
574
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
575
+ }
576
+ createDebug.enable(createDebug.load());
577
+ return createDebug;
578
+ }
579
+ module.exports = setup;
580
+ }
581
+ });
582
+
583
+ // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
584
+ var require_browser = __commonJS({
585
+ "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports, module) {
586
+ "use strict";
587
+ exports.formatArgs = formatArgs;
588
+ exports.save = save;
589
+ exports.load = load;
590
+ exports.useColors = useColors;
591
+ exports.storage = localstorage();
592
+ exports.destroy = /* @__PURE__ */ (() => {
593
+ let warned = false;
594
+ return () => {
595
+ if (!warned) {
596
+ warned = true;
597
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
598
+ }
599
+ };
600
+ })();
601
+ exports.colors = [
602
+ "#0000CC",
603
+ "#0000FF",
604
+ "#0033CC",
605
+ "#0033FF",
606
+ "#0066CC",
607
+ "#0066FF",
608
+ "#0099CC",
609
+ "#0099FF",
610
+ "#00CC00",
611
+ "#00CC33",
612
+ "#00CC66",
613
+ "#00CC99",
614
+ "#00CCCC",
615
+ "#00CCFF",
616
+ "#3300CC",
617
+ "#3300FF",
618
+ "#3333CC",
619
+ "#3333FF",
620
+ "#3366CC",
621
+ "#3366FF",
622
+ "#3399CC",
623
+ "#3399FF",
624
+ "#33CC00",
625
+ "#33CC33",
626
+ "#33CC66",
627
+ "#33CC99",
628
+ "#33CCCC",
629
+ "#33CCFF",
630
+ "#6600CC",
631
+ "#6600FF",
632
+ "#6633CC",
633
+ "#6633FF",
634
+ "#66CC00",
635
+ "#66CC33",
636
+ "#9900CC",
637
+ "#9900FF",
638
+ "#9933CC",
639
+ "#9933FF",
640
+ "#99CC00",
641
+ "#99CC33",
642
+ "#CC0000",
643
+ "#CC0033",
644
+ "#CC0066",
645
+ "#CC0099",
646
+ "#CC00CC",
647
+ "#CC00FF",
648
+ "#CC3300",
649
+ "#CC3333",
650
+ "#CC3366",
651
+ "#CC3399",
652
+ "#CC33CC",
653
+ "#CC33FF",
654
+ "#CC6600",
655
+ "#CC6633",
656
+ "#CC9900",
657
+ "#CC9933",
658
+ "#CCCC00",
659
+ "#CCCC33",
660
+ "#FF0000",
661
+ "#FF0033",
662
+ "#FF0066",
663
+ "#FF0099",
664
+ "#FF00CC",
665
+ "#FF00FF",
666
+ "#FF3300",
667
+ "#FF3333",
668
+ "#FF3366",
669
+ "#FF3399",
670
+ "#FF33CC",
671
+ "#FF33FF",
672
+ "#FF6600",
673
+ "#FF6633",
674
+ "#FF9900",
675
+ "#FF9933",
676
+ "#FFCC00",
677
+ "#FFCC33"
678
+ ];
679
+ function useColors() {
680
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
681
+ return true;
682
+ }
683
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
684
+ return false;
685
+ }
686
+ let m;
687
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
688
+ typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
689
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
690
+ 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
691
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
692
+ }
693
+ function formatArgs(args) {
694
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
695
+ if (!this.useColors) {
696
+ return;
697
+ }
698
+ const c = "color: " + this.color;
699
+ args.splice(1, 0, c, "color: inherit");
700
+ let index = 0;
701
+ let lastC = 0;
702
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
703
+ if (match === "%%") {
704
+ return;
705
+ }
706
+ index++;
707
+ if (match === "%c") {
708
+ lastC = index;
709
+ }
710
+ });
711
+ args.splice(lastC, 0, c);
712
+ }
713
+ exports.log = console.debug || console.log || (() => {
714
+ });
715
+ function save(namespaces) {
716
+ try {
717
+ if (namespaces) {
718
+ exports.storage.setItem("debug", namespaces);
719
+ } else {
720
+ exports.storage.removeItem("debug");
721
+ }
722
+ } catch (error) {
723
+ }
724
+ }
725
+ function load() {
726
+ let r;
727
+ try {
728
+ r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
729
+ } catch (error) {
730
+ }
731
+ if (!r && typeof process !== "undefined" && "env" in process) {
732
+ r = process.env.DEBUG;
733
+ }
734
+ return r;
735
+ }
736
+ function localstorage() {
737
+ try {
738
+ return localStorage;
739
+ } catch (error) {
740
+ }
741
+ }
742
+ module.exports = require_common()(exports);
743
+ var { formatters } = module.exports;
744
+ formatters.j = function(v) {
745
+ try {
746
+ return JSON.stringify(v);
747
+ } catch (error) {
748
+ return "[UnexpectedJSONParseError]: " + error.message;
749
+ }
750
+ };
751
+ }
752
+ });
753
+
754
+ // ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
755
+ var require_has_flag = __commonJS({
756
+ "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module) {
757
+ "use strict";
758
+ module.exports = (flag, argv = process.argv) => {
759
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
760
+ const position = argv.indexOf(prefix + flag);
761
+ const terminatorPosition = argv.indexOf("--");
762
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
763
+ };
764
+ }
765
+ });
766
+
767
+ // ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
768
+ var require_supports_color = __commonJS({
769
+ "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) {
770
+ "use strict";
771
+ var os = __require("os");
772
+ var tty = __require("tty");
773
+ var hasFlag = require_has_flag();
774
+ var { env } = process;
775
+ var forceColor;
776
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
777
+ forceColor = 0;
778
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
779
+ forceColor = 1;
780
+ }
781
+ if ("FORCE_COLOR" in env) {
782
+ if (env.FORCE_COLOR === "true") {
783
+ forceColor = 1;
784
+ } else if (env.FORCE_COLOR === "false") {
785
+ forceColor = 0;
786
+ } else {
787
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
788
+ }
789
+ }
790
+ function translateLevel(level) {
791
+ if (level === 0) {
792
+ return false;
793
+ }
794
+ return {
795
+ level,
796
+ hasBasic: true,
797
+ has256: level >= 2,
798
+ has16m: level >= 3
799
+ };
800
+ }
801
+ function supportsColor(haveStream, streamIsTTY) {
802
+ if (forceColor === 0) {
803
+ return 0;
804
+ }
805
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
806
+ return 3;
807
+ }
808
+ if (hasFlag("color=256")) {
809
+ return 2;
810
+ }
811
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
812
+ return 0;
813
+ }
814
+ const min = forceColor || 0;
815
+ if (env.TERM === "dumb") {
816
+ return min;
817
+ }
818
+ if (process.platform === "win32") {
819
+ const osRelease = os.release().split(".");
820
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
821
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
822
+ }
823
+ return 1;
824
+ }
825
+ if ("CI" in env) {
826
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign3) => sign3 in env) || env.CI_NAME === "codeship") {
827
+ return 1;
828
+ }
829
+ return min;
830
+ }
831
+ if ("TEAMCITY_VERSION" in env) {
832
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
833
+ }
834
+ if (env.COLORTERM === "truecolor") {
835
+ return 3;
836
+ }
837
+ if ("TERM_PROGRAM" in env) {
838
+ const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
839
+ switch (env.TERM_PROGRAM) {
840
+ case "iTerm.app":
841
+ return version >= 3 ? 3 : 2;
842
+ case "Apple_Terminal":
843
+ return 2;
844
+ }
845
+ }
846
+ if (/-256(color)?$/i.test(env.TERM)) {
847
+ return 2;
848
+ }
849
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
850
+ return 1;
851
+ }
852
+ if ("COLORTERM" in env) {
853
+ return 1;
854
+ }
855
+ return min;
856
+ }
857
+ function getSupportLevel(stream) {
858
+ const level = supportsColor(stream, stream && stream.isTTY);
859
+ return translateLevel(level);
860
+ }
861
+ module.exports = {
862
+ supportsColor: getSupportLevel,
863
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
864
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
865
+ };
866
+ }
867
+ });
868
+
869
+ // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
870
+ var require_node = __commonJS({
871
+ "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports, module) {
872
+ "use strict";
873
+ var tty = __require("tty");
874
+ var util3 = __require("util");
875
+ exports.init = init;
876
+ exports.log = log;
877
+ exports.formatArgs = formatArgs;
878
+ exports.save = save;
879
+ exports.load = load;
880
+ exports.useColors = useColors;
881
+ exports.destroy = util3.deprecate(
882
+ () => {
883
+ },
884
+ "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
885
+ );
886
+ exports.colors = [6, 2, 3, 4, 5, 1];
887
+ try {
888
+ const supportsColor = require_supports_color();
889
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
890
+ exports.colors = [
891
+ 20,
892
+ 21,
893
+ 26,
894
+ 27,
895
+ 32,
896
+ 33,
897
+ 38,
898
+ 39,
899
+ 40,
900
+ 41,
901
+ 42,
902
+ 43,
903
+ 44,
904
+ 45,
905
+ 56,
906
+ 57,
907
+ 62,
908
+ 63,
909
+ 68,
910
+ 69,
911
+ 74,
912
+ 75,
913
+ 76,
914
+ 77,
915
+ 78,
916
+ 79,
917
+ 80,
918
+ 81,
919
+ 92,
920
+ 93,
921
+ 98,
922
+ 99,
923
+ 112,
924
+ 113,
925
+ 128,
926
+ 129,
927
+ 134,
928
+ 135,
929
+ 148,
930
+ 149,
931
+ 160,
932
+ 161,
933
+ 162,
934
+ 163,
935
+ 164,
936
+ 165,
937
+ 166,
938
+ 167,
939
+ 168,
940
+ 169,
941
+ 170,
942
+ 171,
943
+ 172,
944
+ 173,
945
+ 178,
946
+ 179,
947
+ 184,
948
+ 185,
949
+ 196,
950
+ 197,
951
+ 198,
952
+ 199,
953
+ 200,
954
+ 201,
955
+ 202,
956
+ 203,
957
+ 204,
958
+ 205,
959
+ 206,
960
+ 207,
961
+ 208,
962
+ 209,
963
+ 214,
964
+ 215,
965
+ 220,
966
+ 221
967
+ ];
968
+ }
969
+ } catch (error) {
970
+ }
971
+ exports.inspectOpts = Object.keys(process.env).filter((key) => {
972
+ return /^debug_/i.test(key);
973
+ }).reduce((obj, key) => {
974
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
975
+ return k.toUpperCase();
976
+ });
977
+ let val = process.env[key];
978
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
979
+ val = true;
980
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
981
+ val = false;
982
+ } else if (val === "null") {
983
+ val = null;
984
+ } else {
985
+ val = Number(val);
986
+ }
987
+ obj[prop] = val;
988
+ return obj;
989
+ }, {});
990
+ function useColors() {
991
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
992
+ }
993
+ function formatArgs(args) {
994
+ const { namespace: name, useColors: useColors2 } = this;
995
+ if (useColors2) {
996
+ const c = this.color;
997
+ const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
998
+ const prefix = ` ${colorCode};1m${name} \x1B[0m`;
999
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
1000
+ args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
1001
+ } else {
1002
+ args[0] = getDate() + name + " " + args[0];
1003
+ }
1004
+ }
1005
+ function getDate() {
1006
+ if (exports.inspectOpts.hideDate) {
1007
+ return "";
1008
+ }
1009
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
1010
+ }
1011
+ function log(...args) {
1012
+ return process.stderr.write(util3.formatWithOptions(exports.inspectOpts, ...args) + "\n");
1013
+ }
1014
+ function save(namespaces) {
1015
+ if (namespaces) {
1016
+ process.env.DEBUG = namespaces;
1017
+ } else {
1018
+ delete process.env.DEBUG;
1019
+ }
1020
+ }
1021
+ function load() {
1022
+ return process.env.DEBUG;
1023
+ }
1024
+ function init(debug) {
1025
+ debug.inspectOpts = {};
1026
+ const keys = Object.keys(exports.inspectOpts);
1027
+ for (let i = 0; i < keys.length; i++) {
1028
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
1029
+ }
1030
+ }
1031
+ module.exports = require_common()(exports);
1032
+ var { formatters } = module.exports;
1033
+ formatters.o = function(v) {
1034
+ this.inspectOpts.colors = this.useColors;
1035
+ return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
1036
+ };
1037
+ formatters.O = function(v) {
1038
+ this.inspectOpts.colors = this.useColors;
1039
+ return util3.inspect(v, this.inspectOpts);
1040
+ };
1041
+ }
1042
+ });
1043
+
1044
+ // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
1045
+ var require_src = __commonJS({
1046
+ "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports, module) {
1047
+ "use strict";
1048
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
1049
+ module.exports = require_browser();
1050
+ } else {
1051
+ module.exports = require_node();
1052
+ }
1053
+ }
1054
+ });
1055
+
1056
+ // ../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js
1057
+ var require_helpers = __commonJS({
1058
+ "../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js"(exports) {
1059
+ "use strict";
1060
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
1061
+ if (k2 === void 0) k2 = k;
1062
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1063
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1064
+ desc = { enumerable: true, get: function() {
1065
+ return m[k];
1066
+ } };
1067
+ }
1068
+ Object.defineProperty(o, k2, desc);
1069
+ }) : (function(o, m, k, k2) {
1070
+ if (k2 === void 0) k2 = k;
1071
+ o[k2] = m[k];
1072
+ }));
1073
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
1074
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1075
+ }) : function(o, v) {
1076
+ o["default"] = v;
1077
+ });
1078
+ var __importStar = exports && exports.__importStar || function(mod) {
1079
+ if (mod && mod.__esModule) return mod;
1080
+ var result = {};
1081
+ if (mod != null) {
1082
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1083
+ }
1084
+ __setModuleDefault(result, mod);
1085
+ return result;
1086
+ };
1087
+ Object.defineProperty(exports, "__esModule", { value: true });
1088
+ exports.req = exports.json = exports.toBuffer = void 0;
1089
+ var http2 = __importStar(__require("http"));
1090
+ var https2 = __importStar(__require("https"));
1091
+ async function toBuffer(stream) {
1092
+ let length = 0;
1093
+ const chunks = [];
1094
+ for await (const chunk of stream) {
1095
+ length += chunk.length;
1096
+ chunks.push(chunk);
1097
+ }
1098
+ return Buffer.concat(chunks, length);
1099
+ }
1100
+ exports.toBuffer = toBuffer;
1101
+ async function json(stream) {
1102
+ const buf = await toBuffer(stream);
1103
+ const str = buf.toString("utf8");
1104
+ try {
1105
+ return JSON.parse(str);
1106
+ } catch (_err) {
1107
+ const err = _err;
1108
+ err.message += ` (input: ${str})`;
1109
+ throw err;
1110
+ }
1111
+ }
1112
+ exports.json = json;
1113
+ function req(url, opts = {}) {
1114
+ const href = typeof url === "string" ? url : url.href;
1115
+ const req2 = (href.startsWith("https:") ? https2 : http2).request(url, opts);
1116
+ const promise = new Promise((resolve, reject) => {
1117
+ req2.once("response", resolve).once("error", reject).end();
1118
+ });
1119
+ req2.then = promise.then.bind(promise);
1120
+ return req2;
1121
+ }
1122
+ exports.req = req;
1123
+ }
1124
+ });
1125
+
1126
+ // ../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/index.js
1127
+ var require_dist = __commonJS({
1128
+ "../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/index.js"(exports) {
1129
+ "use strict";
1130
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
1131
+ if (k2 === void 0) k2 = k;
1132
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1133
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1134
+ desc = { enumerable: true, get: function() {
1135
+ return m[k];
1136
+ } };
1137
+ }
1138
+ Object.defineProperty(o, k2, desc);
1139
+ }) : (function(o, m, k, k2) {
1140
+ if (k2 === void 0) k2 = k;
1141
+ o[k2] = m[k];
1142
+ }));
1143
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
1144
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1145
+ }) : function(o, v) {
1146
+ o["default"] = v;
1147
+ });
1148
+ var __importStar = exports && exports.__importStar || function(mod) {
1149
+ if (mod && mod.__esModule) return mod;
1150
+ var result = {};
1151
+ if (mod != null) {
1152
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1153
+ }
1154
+ __setModuleDefault(result, mod);
1155
+ return result;
1156
+ };
1157
+ var __exportStar = exports && exports.__exportStar || function(m, exports2) {
1158
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
1159
+ };
1160
+ Object.defineProperty(exports, "__esModule", { value: true });
1161
+ exports.Agent = void 0;
1162
+ var net = __importStar(__require("net"));
1163
+ var http2 = __importStar(__require("http"));
1164
+ var https_1 = __require("https");
1165
+ __exportStar(require_helpers(), exports);
1166
+ var INTERNAL = Symbol("AgentBaseInternalState");
1167
+ var Agent = class extends http2.Agent {
1168
+ constructor(opts) {
1169
+ super(opts);
1170
+ this[INTERNAL] = {};
1171
+ }
1172
+ /**
1173
+ * Determine whether this is an `http` or `https` request.
1174
+ */
1175
+ isSecureEndpoint(options) {
1176
+ if (options) {
1177
+ if (typeof options.secureEndpoint === "boolean") {
1178
+ return options.secureEndpoint;
1179
+ }
1180
+ if (typeof options.protocol === "string") {
1181
+ return options.protocol === "https:";
1182
+ }
1183
+ }
1184
+ const { stack } = new Error();
1185
+ if (typeof stack !== "string")
1186
+ return false;
1187
+ return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
1188
+ }
1189
+ // In order to support async signatures in `connect()` and Node's native
1190
+ // connection pooling in `http.Agent`, the array of sockets for each origin
1191
+ // has to be updated synchronously. This is so the length of the array is
1192
+ // accurate when `addRequest()` is next called. We achieve this by creating a
1193
+ // fake socket and adding it to `sockets[origin]` and incrementing
1194
+ // `totalSocketCount`.
1195
+ incrementSockets(name) {
1196
+ if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
1197
+ return null;
1198
+ }
1199
+ if (!this.sockets[name]) {
1200
+ this.sockets[name] = [];
1201
+ }
1202
+ const fakeSocket = new net.Socket({ writable: false });
1203
+ this.sockets[name].push(fakeSocket);
1204
+ this.totalSocketCount++;
1205
+ return fakeSocket;
1206
+ }
1207
+ decrementSockets(name, socket) {
1208
+ if (!this.sockets[name] || socket === null) {
1209
+ return;
1210
+ }
1211
+ const sockets = this.sockets[name];
1212
+ const index = sockets.indexOf(socket);
1213
+ if (index !== -1) {
1214
+ sockets.splice(index, 1);
1215
+ this.totalSocketCount--;
1216
+ if (sockets.length === 0) {
1217
+ delete this.sockets[name];
1218
+ }
1219
+ }
1220
+ }
1221
+ // In order to properly update the socket pool, we need to call `getName()` on
1222
+ // the core `https.Agent` if it is a secureEndpoint.
1223
+ getName(options) {
1224
+ const secureEndpoint = this.isSecureEndpoint(options);
1225
+ if (secureEndpoint) {
1226
+ return https_1.Agent.prototype.getName.call(this, options);
1227
+ }
1228
+ return super.getName(options);
1229
+ }
1230
+ createSocket(req, options, cb) {
1231
+ const connectOpts = {
1232
+ ...options,
1233
+ secureEndpoint: this.isSecureEndpoint(options)
1234
+ };
1235
+ const name = this.getName(connectOpts);
1236
+ const fakeSocket = this.incrementSockets(name);
1237
+ Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
1238
+ this.decrementSockets(name, fakeSocket);
1239
+ if (socket instanceof http2.Agent) {
1240
+ try {
1241
+ return socket.addRequest(req, connectOpts);
1242
+ } catch (err) {
1243
+ return cb(err);
1244
+ }
1245
+ }
1246
+ this[INTERNAL].currentSocket = socket;
1247
+ super.createSocket(req, options, cb);
1248
+ }, (err) => {
1249
+ this.decrementSockets(name, fakeSocket);
1250
+ cb(err);
1251
+ });
1252
+ }
1253
+ createConnection() {
1254
+ const socket = this[INTERNAL].currentSocket;
1255
+ this[INTERNAL].currentSocket = void 0;
1256
+ if (!socket) {
1257
+ throw new Error("No socket was returned in the `connect()` function");
1258
+ }
1259
+ return socket;
1260
+ }
1261
+ get defaultPort() {
1262
+ return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
1263
+ }
1264
+ set defaultPort(v) {
1265
+ if (this[INTERNAL]) {
1266
+ this[INTERNAL].defaultPort = v;
1267
+ }
1268
+ }
1269
+ get protocol() {
1270
+ return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
1271
+ }
1272
+ set protocol(v) {
1273
+ if (this[INTERNAL]) {
1274
+ this[INTERNAL].protocol = v;
1275
+ }
1276
+ }
1277
+ };
1278
+ exports.Agent = Agent;
1279
+ }
1280
+ });
1281
+
1282
+ // ../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/parse-proxy-response.js
1283
+ var require_parse_proxy_response = __commonJS({
1284
+ "../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
1285
+ "use strict";
1286
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1287
+ return mod && mod.__esModule ? mod : { "default": mod };
1288
+ };
1289
+ Object.defineProperty(exports, "__esModule", { value: true });
1290
+ exports.parseProxyResponse = void 0;
1291
+ var debug_1 = __importDefault(require_src());
1292
+ var debug = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
1293
+ function parseProxyResponse(socket) {
1294
+ return new Promise((resolve, reject) => {
1295
+ let buffersLength = 0;
1296
+ const buffers = [];
1297
+ function read() {
1298
+ const b = socket.read();
1299
+ if (b)
1300
+ ondata(b);
1301
+ else
1302
+ socket.once("readable", read);
1303
+ }
1304
+ function cleanup() {
1305
+ socket.removeListener("end", onend);
1306
+ socket.removeListener("error", onerror);
1307
+ socket.removeListener("readable", read);
1308
+ }
1309
+ function onend() {
1310
+ cleanup();
1311
+ debug("onend");
1312
+ reject(new Error("Proxy connection ended before receiving CONNECT response"));
1313
+ }
1314
+ function onerror(err) {
1315
+ cleanup();
1316
+ debug("onerror %o", err);
1317
+ reject(err);
1318
+ }
1319
+ function ondata(b) {
1320
+ buffers.push(b);
1321
+ buffersLength += b.length;
1322
+ const buffered = Buffer.concat(buffers, buffersLength);
1323
+ const endOfHeaders = buffered.indexOf("\r\n\r\n");
1324
+ if (endOfHeaders === -1) {
1325
+ debug("have not received end of HTTP headers yet...");
1326
+ read();
1327
+ return;
1328
+ }
1329
+ const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n");
1330
+ const firstLine = headerParts.shift();
1331
+ if (!firstLine) {
1332
+ socket.destroy();
1333
+ return reject(new Error("No header received from proxy CONNECT response"));
1334
+ }
1335
+ const firstLineParts = firstLine.split(" ");
1336
+ const statusCode = +firstLineParts[1];
1337
+ const statusText = firstLineParts.slice(2).join(" ");
1338
+ const headers = {};
1339
+ for (const header of headerParts) {
1340
+ if (!header)
1341
+ continue;
1342
+ const firstColon = header.indexOf(":");
1343
+ if (firstColon === -1) {
1344
+ socket.destroy();
1345
+ return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
1346
+ }
1347
+ const key = header.slice(0, firstColon).toLowerCase();
1348
+ const value = header.slice(firstColon + 1).trimStart();
1349
+ const current = headers[key];
1350
+ if (typeof current === "string") {
1351
+ headers[key] = [current, value];
1352
+ } else if (Array.isArray(current)) {
1353
+ current.push(value);
1354
+ } else {
1355
+ headers[key] = value;
1356
+ }
1357
+ }
1358
+ debug("got proxy server response: %o %o", firstLine, headers);
1359
+ cleanup();
1360
+ resolve({
1361
+ connect: {
1362
+ statusCode,
1363
+ statusText,
1364
+ headers
1365
+ },
1366
+ buffered
1367
+ });
1368
+ }
1369
+ socket.on("error", onerror);
1370
+ socket.on("end", onend);
1371
+ read();
1372
+ });
1373
+ }
1374
+ exports.parseProxyResponse = parseProxyResponse;
1375
+ }
1376
+ });
1377
+
1378
+ // ../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js
1379
+ var require_dist2 = __commonJS({
1380
+ "../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js"(exports) {
1381
+ "use strict";
1382
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
1383
+ if (k2 === void 0) k2 = k;
1384
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1385
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1386
+ desc = { enumerable: true, get: function() {
1387
+ return m[k];
1388
+ } };
1389
+ }
1390
+ Object.defineProperty(o, k2, desc);
1391
+ }) : (function(o, m, k, k2) {
1392
+ if (k2 === void 0) k2 = k;
1393
+ o[k2] = m[k];
1394
+ }));
1395
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
1396
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1397
+ }) : function(o, v) {
1398
+ o["default"] = v;
1399
+ });
1400
+ var __importStar = exports && exports.__importStar || function(mod) {
1401
+ if (mod && mod.__esModule) return mod;
1402
+ var result = {};
1403
+ if (mod != null) {
1404
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1405
+ }
1406
+ __setModuleDefault(result, mod);
1407
+ return result;
1408
+ };
1409
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1410
+ return mod && mod.__esModule ? mod : { "default": mod };
1411
+ };
1412
+ Object.defineProperty(exports, "__esModule", { value: true });
1413
+ exports.HttpsProxyAgent = void 0;
1414
+ var net = __importStar(__require("net"));
1415
+ var tls = __importStar(__require("tls"));
1416
+ var assert_1 = __importDefault(__require("assert"));
1417
+ var debug_1 = __importDefault(require_src());
1418
+ var agent_base_1 = require_dist();
1419
+ var url_1 = __require("url");
1420
+ var parse_proxy_response_1 = require_parse_proxy_response();
1421
+ var debug = (0, debug_1.default)("https-proxy-agent");
1422
+ var setServernameFromNonIpHost = (options) => {
1423
+ if (options.servername === void 0 && options.host && !net.isIP(options.host)) {
1424
+ return {
1425
+ ...options,
1426
+ servername: options.host
1427
+ };
1428
+ }
1429
+ return options;
1430
+ };
1431
+ var HttpsProxyAgent2 = class extends agent_base_1.Agent {
1432
+ constructor(proxy, opts) {
1433
+ super(opts);
1434
+ this.options = { path: void 0 };
1435
+ this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy;
1436
+ this.proxyHeaders = opts?.headers ?? {};
1437
+ debug("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
1438
+ const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, "");
1439
+ const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
1440
+ this.connectOpts = {
1441
+ // Attempt to negotiate http/1.1 for proxy servers that support http/2
1442
+ ALPNProtocols: ["http/1.1"],
1443
+ ...opts ? omit(opts, "headers") : null,
1444
+ host,
1445
+ port
1446
+ };
1447
+ }
1448
+ /**
1449
+ * Called when the node-core HTTP client library is creating a
1450
+ * new HTTP request.
1451
+ */
1452
+ async connect(req, opts) {
1453
+ const { proxy } = this;
1454
+ if (!opts.host) {
1455
+ throw new TypeError('No "host" provided');
1456
+ }
1457
+ let socket;
1458
+ if (proxy.protocol === "https:") {
1459
+ debug("Creating `tls.Socket`: %o", this.connectOpts);
1460
+ socket = tls.connect(setServernameFromNonIpHost(this.connectOpts));
1461
+ } else {
1462
+ debug("Creating `net.Socket`: %o", this.connectOpts);
1463
+ socket = net.connect(this.connectOpts);
1464
+ }
1465
+ const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders };
1466
+ const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
1467
+ let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r
1468
+ `;
1469
+ if (proxy.username || proxy.password) {
1470
+ const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
1471
+ headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`;
1472
+ }
1473
+ headers.Host = `${host}:${opts.port}`;
1474
+ if (!headers["Proxy-Connection"]) {
1475
+ headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close";
1476
+ }
1477
+ for (const name of Object.keys(headers)) {
1478
+ payload += `${name}: ${headers[name]}\r
1479
+ `;
1480
+ }
1481
+ const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);
1482
+ socket.write(`${payload}\r
1483
+ `);
1484
+ const { connect, buffered } = await proxyResponsePromise;
1485
+ req.emit("proxyConnect", connect);
1486
+ this.emit("proxyConnect", connect, req);
1487
+ if (connect.statusCode === 200) {
1488
+ req.once("socket", resume);
1489
+ if (opts.secureEndpoint) {
1490
+ debug("Upgrading socket connection to TLS");
1491
+ return tls.connect({
1492
+ ...omit(setServernameFromNonIpHost(opts), "host", "path", "port"),
1493
+ socket
1494
+ });
1495
+ }
1496
+ return socket;
1497
+ }
1498
+ socket.destroy();
1499
+ const fakeSocket = new net.Socket({ writable: false });
1500
+ fakeSocket.readable = true;
1501
+ req.once("socket", (s) => {
1502
+ debug("Replaying proxy buffer for failed request");
1503
+ (0, assert_1.default)(s.listenerCount("data") > 0);
1504
+ s.push(buffered);
1505
+ s.push(null);
1506
+ });
1507
+ return fakeSocket;
1508
+ }
1509
+ };
1510
+ HttpsProxyAgent2.protocols = ["http", "https"];
1511
+ exports.HttpsProxyAgent = HttpsProxyAgent2;
1512
+ function resume(socket) {
1513
+ socket.resume();
1514
+ }
1515
+ function omit(obj, ...keys) {
1516
+ const ret = {};
1517
+ let key;
1518
+ for (key in obj) {
1519
+ if (!keys.includes(key)) {
1520
+ ret[key] = obj[key];
1521
+ }
1522
+ }
1523
+ return ret;
1524
+ }
1525
+ }
1526
+ });
1527
+
282
1528
  // src/index.ts
283
1529
  import utils2 from "@eventcatalog/sdk";
284
1530
  import { readFile } from "fs/promises";
@@ -298,40 +1544,40 @@ var defaultMarkdown = () => {
298
1544
  // src/utils/services.ts
299
1545
  import slugify from "slugify";
300
1546
  import path from "path";
301
- var defaultMarkdown2 = (document, fileName) => {
1547
+ var defaultMarkdown2 = (document2, fileName) => {
302
1548
  return `
303
1549
 
304
- ${document.info.description ? `${document.info.description}` : ""}
1550
+ ${document2.info.description ? `${document2.info.description}` : ""}
305
1551
 
306
1552
  ## Architecture diagram
307
1553
  <NodeGraph />
308
1554
 
309
- ${document.externalDocs ? `
1555
+ ${document2.externalDocs ? `
310
1556
  ## External documentation
311
- - [${document.externalDocs.description}](${document.externalDocs.url})
1557
+ - [${document2.externalDocs.description}](${document2.externalDocs.url})
312
1558
  ` : ""}
313
1559
 
314
1560
  `;
315
1561
  };
316
- var getSummary = (document) => {
317
- const summary = document.info.description ? document.info.description : "";
1562
+ var getSummary = (document2) => {
1563
+ const summary = document2.info.description ? document2.info.description : "";
318
1564
  return summary && summary.length < 150 ? summary : "";
319
1565
  };
320
- var buildService = (serviceOptions, document, generateMarkdown) => {
1566
+ var buildService = (serviceOptions, document2, generateMarkdown) => {
321
1567
  const schemaPath = path.basename(serviceOptions.path) || "openapi.yml";
322
- const documentTags = document.tags || [];
323
- const serviceId = serviceOptions.id || slugify(document.info.title, { lower: true, strict: true });
324
- const generatedMarkdownForService = defaultMarkdown2(document, schemaPath);
1568
+ const documentTags = document2.tags || [];
1569
+ const serviceId = serviceOptions.id || slugify(document2.info.title, { lower: true, strict: true });
1570
+ const generatedMarkdownForService = defaultMarkdown2(document2, schemaPath);
325
1571
  return {
326
1572
  id: serviceId,
327
- version: document.info.version,
328
- name: document.info.title,
329
- summary: getSummary(document),
1573
+ version: document2.info.version,
1574
+ name: document2.info.title,
1575
+ summary: getSummary(document2),
330
1576
  schemaPath,
331
1577
  specifications: {
332
1578
  openapiPath: schemaPath
333
1579
  },
334
- markdown: generateMarkdown ? generateMarkdown({ service: serviceOptions, document, markdown: generatedMarkdownForService }) : generatedMarkdownForService,
1580
+ markdown: generateMarkdown ? generateMarkdown({ service: serviceOptions, document: document2, markdown: generatedMarkdownForService }) : generatedMarkdownForService,
335
1581
  badges: documentTags.map((tag2) => ({ content: tag2.name, textColor: "blue", backgroundColor: "blue" })),
336
1582
  owners: serviceOptions.owners || [],
337
1583
  setMessageOwnersToServiceOwners: serviceOptions.setMessageOwnersToServiceOwners || true,
@@ -563,7 +1809,7 @@ var getSummary2 = (message2) => {
563
1809
  }
564
1810
  return escapeSpecialCharactersThatBreakMarkdown(eventCatalogMessageSummary);
565
1811
  };
566
- var buildMessage = async (pathToFile, document, operation, generateMarkdown, messageIdConfig, serviceId) => {
1812
+ var buildMessage = async (pathToFile, document2, operation, generateMarkdown, messageIdConfig, serviceId) => {
567
1813
  const requestBodiesAndResponses = await getSchemasByOperationId(pathToFile, operation.operationId);
568
1814
  const extensions = operation.extensions || {};
569
1815
  const operationTags = operation.tags.map((badge) => ({
@@ -572,7 +1818,7 @@ var buildMessage = async (pathToFile, document, operation, generateMarkdown, mes
572
1818
  backgroundColor: "blue"
573
1819
  }));
574
1820
  const badges = [{ content: operation.method.toUpperCase(), textColor: "blue", backgroundColor: "blue" }, ...operationTags];
575
- const apiName = slugify2(document.info.title, { lower: true });
1821
+ const apiName = slugify2(document2.info.title, { lower: true });
576
1822
  const path4 = operation.path.replace(/\//, "").replace(/\//g, "_");
577
1823
  let uniqueIdentifier = operation.operationId || `${apiName}_${operation.method}`;
578
1824
  if (!operation.operationId && path4) {
@@ -591,7 +1837,7 @@ var buildMessage = async (pathToFile, document, operation, generateMarkdown, mes
591
1837
  }
592
1838
  return {
593
1839
  id: extensions["x-eventcatalog-message-id"] || uniqueIdentifier,
594
- version: extensions["x-eventcatalog-message-version"] || document.info.version,
1840
+ version: extensions["x-eventcatalog-message-version"] || document2.info.version,
595
1841
  name: extensions["x-eventcatalog-message-name"] || messageName,
596
1842
  summary: getSummary2(operation),
597
1843
  markdown: generateMarkdown ? generateMarkdown({ operation, markdown: generatedMarkdownForMessage }) : generatedMarkdownForMessage,
@@ -659,7 +1905,7 @@ var getMessageTypeUtils = (projectDirectory, messageType) => {
659
1905
  // ../../shared/checkLicense.ts
660
1906
  import chalk3 from "chalk";
661
1907
 
662
- // ../../node_modules/.pnpm/@eventcatalog+license@0.0.5/node_modules/@eventcatalog/license/dist/verify.js
1908
+ // ../../node_modules/.pnpm/@eventcatalog+license@0.0.7/node_modules/@eventcatalog/license/dist/verify.js
663
1909
  import { readFileSync, existsSync } from "fs";
664
1910
 
665
1911
  // ../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/base64url.js
@@ -1714,7 +2960,7 @@ async function jwtVerify(jwt, key, options) {
1714
2960
  return result;
1715
2961
  }
1716
2962
 
1717
- // ../../node_modules/.pnpm/@eventcatalog+license@0.0.5/node_modules/@eventcatalog/license/dist/key.js
2963
+ // ../../node_modules/.pnpm/@eventcatalog+license@0.0.7/node_modules/@eventcatalog/license/dist/key.js
1718
2964
  var PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
1719
2965
  MCowBQYDK2VwAyEA599maqjKG7VW5bnj9fFA3msK691iHUYd+PkiZ7h9LpI=
1720
2966
  -----END PUBLIC KEY-----`;
@@ -1722,7 +2968,7 @@ async function loadPublicPem() {
1722
2968
  return PUBLIC_KEY;
1723
2969
  }
1724
2970
 
1725
- // ../../node_modules/.pnpm/@eventcatalog+license@0.0.5/node_modules/@eventcatalog/license/dist/verify.js
2971
+ // ../../node_modules/.pnpm/@eventcatalog+license@0.0.7/node_modules/@eventcatalog/license/dist/verify.js
1726
2972
  import path2 from "path";
1727
2973
  import chalk2 from "chalk";
1728
2974
 
@@ -2537,7 +3783,8 @@ function boxen(text, options) {
2537
3783
  return boxContent(text, options.width, options);
2538
3784
  }
2539
3785
 
2540
- // ../../node_modules/.pnpm/@eventcatalog+license@0.0.5/node_modules/@eventcatalog/license/dist/verify.js
3786
+ // ../../node_modules/.pnpm/@eventcatalog+license@0.0.7/node_modules/@eventcatalog/license/dist/verify.js
3787
+ var import_https_proxy_agent = __toESM(require_dist2(), 1);
2541
3788
  import https from "https";
2542
3789
  import http from "http";
2543
3790
  import { URL } from "url";
@@ -2556,14 +3803,7 @@ function makeHttpRequest(url, options) {
2556
3803
  };
2557
3804
  const proxyUrl = process.env.PROXY_SERVER_URI || process.env.HTTPS_PROXY || process.env.HTTP_PROXY;
2558
3805
  if (proxyUrl) {
2559
- const proxy = new URL(proxyUrl);
2560
- requestOptions.hostname = proxy.hostname;
2561
- requestOptions.port = proxy.port || (proxy.protocol === "https:" ? 443 : 80);
2562
- requestOptions.path = url;
2563
- requestOptions.headers = {
2564
- ...requestOptions.headers,
2565
- Host: urlObj.hostname
2566
- };
3806
+ requestOptions.agent = new import_https_proxy_agent.HttpsProxyAgent(proxyUrl);
2567
3807
  }
2568
3808
  const req = client.request(requestOptions, (res) => {
2569
3809
  let data = "";
@@ -2781,7 +4021,7 @@ function isValidLicenseKeyFormat(key) {
2781
4021
  return true;
2782
4022
  }
2783
4023
 
2784
- // ../../node_modules/.pnpm/@eventcatalog+license@0.0.5/node_modules/@eventcatalog/license/dist/plans.js
4024
+ // ../../node_modules/.pnpm/@eventcatalog+license@0.0.7/node_modules/@eventcatalog/license/dist/plans.js
2785
4025
  var isFeatureEnabled2 = async (feature, key) => {
2786
4026
  if (hasOfflineLicenseKey()) {
2787
4027
  await verifyOfflineLicense();
@@ -2826,7 +4066,7 @@ import { join } from "path";
2826
4066
  // package.json
2827
4067
  var package_default = {
2828
4068
  name: "@eventcatalog/generator-openapi",
2829
- version: "7.5.1",
4069
+ version: "7.5.2",
2830
4070
  description: "OpenAPI generator for EventCatalog",
2831
4071
  scripts: {
2832
4072
  build: "tsup",
@@ -2958,9 +4198,9 @@ var index_default = async (_, options) => {
2958
4198
  const specs = specFiles.map(async (specFile) => {
2959
4199
  try {
2960
4200
  await SwaggerParser2.validate(specFile);
2961
- const document = await SwaggerParser2.dereference(specFile);
4201
+ const document2 = await SwaggerParser2.dereference(specFile);
2962
4202
  return {
2963
- document,
4203
+ document: document2,
2964
4204
  path: specFile
2965
4205
  };
2966
4206
  } catch (error) {
@@ -2977,10 +4217,10 @@ var index_default = async (_, options) => {
2977
4217
  return versionA.localeCompare(versionB);
2978
4218
  });
2979
4219
  for (const specification of orderedSpecs) {
2980
- const document = specification.document;
2981
- const version = document.info.version;
4220
+ const document2 = specification.document;
4221
+ const version = document2.info.version;
2982
4222
  const specPath = specification.path;
2983
- const service = buildService({ ...serviceSpec, path: specPath }, document, serviceSpec.generateMarkdown);
4223
+ const service = buildService({ ...serviceSpec, path: specPath }, document2, serviceSpec.generateMarkdown);
2984
4224
  let serviceMarkdown = service.markdown;
2985
4225
  let serviceSpecificationsFiles = [];
2986
4226
  let serviceSpecifications = service.specifications;
@@ -2989,7 +4229,7 @@ var index_default = async (_, options) => {
2989
4229
  const isDomainMarkedAsDraft = options.domain?.draft || null;
2990
4230
  const isServiceMarkedAsDraft = (
2991
4231
  // @ts-ignore
2992
- isDomainMarkedAsDraft || document.info?.["x-eventcatalog-draft"] || serviceSpec.draft || null
4232
+ isDomainMarkedAsDraft || document2.info?.["x-eventcatalog-draft"] || serviceSpec.draft || null
2993
4233
  );
2994
4234
  let servicePath = options.domain ? join("../", "domains", options.domain.id, "services", service.id) : join("../", "services", service.id);
2995
4235
  if (options.writeFilesToRoot) {
@@ -3024,7 +4264,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
3024
4264
  }
3025
4265
  const latestServiceInCatalog = await getService(service.id, "latest");
3026
4266
  const versionTheService = latestServiceInCatalog && isVersionGreaterThan(version, latestServiceInCatalog.version);
3027
- console.log(chalk4.blue(`Processing service: ${document.info.title} (v${version})`));
4267
+ console.log(chalk4.blue(`Processing service: ${document2.info.title} (v${version})`));
3028
4268
  if (latestServiceInCatalog && isVersionLessThan(version, latestServiceInCatalog.version)) {
3029
4269
  servicePath = join(servicePath, "versioned", version);
3030
4270
  }
@@ -3032,7 +4272,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
3032
4272
  await versionService(service.id);
3033
4273
  console.log(chalk4.cyan(` - Versioned previous service (v${latestServiceInCatalog.version})`));
3034
4274
  }
3035
- let { sends, receives } = await processMessagesForOpenAPISpec(specPath, document, servicePath, {
4275
+ let { sends, receives } = await processMessagesForOpenAPISpec(specPath, document2, servicePath, {
3036
4276
  ...options,
3037
4277
  owners: service.setMessageOwnersToServiceOwners ? service.owners : [],
3038
4278
  serviceHasMultipleSpecFiles: Array.isArray(serviceSpec.path),
@@ -3084,7 +4324,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
3084
4324
  // add any previous spec files to the list
3085
4325
  ...persistPreviousSpecificationFiles ? serviceSpecificationsFiles : [],
3086
4326
  {
3087
- content: saveParsedSpecFile ? getParsedSpecFile({ ...serviceSpec, path: specPath }, document) : await getRawSpecFile({ ...serviceSpec, path: specPath }),
4327
+ content: saveParsedSpecFile ? getParsedSpecFile({ ...serviceSpec, path: specPath }, document2) : await getRawSpecFile({ ...serviceSpec, path: specPath }),
3088
4328
  fileName: service.schemaPath
3089
4329
  }
3090
4330
  ];
@@ -3102,17 +4342,17 @@ Processing domain: ${domainName} (v${domainVersion})`));
3102
4342
  }
3103
4343
  }
3104
4344
  };
3105
- var processMessagesForOpenAPISpec = async (pathToSpec, document, servicePath, options) => {
4345
+ var processMessagesForOpenAPISpec = async (pathToSpec, document2, servicePath, options) => {
3106
4346
  const operations = await getOperationsByType(pathToSpec, options.httpMethodsToMessages);
3107
4347
  const sidebarBadgeType = options.sidebarBadgeType || "HTTP_METHOD";
3108
- const version = document.info.version;
4348
+ const version = document2.info.version;
3109
4349
  const preserveExistingMessages = options.preserveExistingMessages ?? true;
3110
4350
  const isDraft = options.isDraft ?? null;
3111
4351
  let receives = [], sends = [];
3112
4352
  for (const operation of operations) {
3113
4353
  const { requestBodiesAndResponses, sidebar, messageName, ...message2 } = await buildMessage(
3114
4354
  pathToSpec,
3115
- document,
4355
+ document2,
3116
4356
  operation,
3117
4357
  options.messages?.generateMarkdown,
3118
4358
  options.messages?.id,
@@ -3222,10 +4462,10 @@ var processMessagesForOpenAPISpec = async (pathToSpec, document, servicePath, op
3222
4462
  }
3223
4463
  return { receives, sends };
3224
4464
  };
3225
- var getParsedSpecFile = (service, document) => {
4465
+ var getParsedSpecFile = (service, document2) => {
3226
4466
  const specPath = service.path;
3227
4467
  const isSpecFileJSON = specPath.endsWith(".json");
3228
- return isSpecFileJSON ? JSON.stringify(document, null, 2) : yaml.dump(document, { noRefs: true });
4468
+ return isSpecFileJSON ? JSON.stringify(document2, null, 2) : yaml.dump(document2, { noRefs: true });
3229
4469
  };
3230
4470
  var getRawSpecFile = async (service) => {
3231
4471
  const specPath = service.path;