@kubb/core 3.7.1 → 3.7.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.
@@ -36,89 +36,244 @@ var g$1__default = /*#__PURE__*/_interopDefault(g$1);
36
36
  // src/logger.ts
37
37
  chunkKEDZU7VZ_cjs.init_cjs_shims();
38
38
 
39
- // ../../node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/node.js
39
+ // ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/utils.mjs
40
40
  chunkKEDZU7VZ_cjs.init_cjs_shims();
41
41
 
42
- // ../../node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js
42
+ // ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
43
43
  chunkKEDZU7VZ_cjs.init_cjs_shims();
44
- var f = {
45
- reset: [0, 0],
46
- bold: [1, 22, "\x1B[22m\x1B[1m"],
47
- dim: [2, 22, "\x1B[22m\x1B[2m"],
48
- italic: [3, 23],
49
- underline: [4, 24],
50
- inverse: [7, 27],
51
- hidden: [8, 28],
52
- strikethrough: [9, 29],
53
- black: [30, 39],
54
- red: [31, 39],
55
- green: [32, 39],
56
- yellow: [33, 39],
57
- blue: [34, 39],
58
- magenta: [35, 39],
59
- cyan: [36, 39],
60
- white: [37, 39],
61
- gray: [90, 39],
62
- bgBlack: [40, 49],
63
- bgRed: [41, 49],
64
- bgGreen: [42, 49],
65
- bgYellow: [43, 49],
66
- bgBlue: [44, 49],
67
- bgMagenta: [45, 49],
68
- bgCyan: [46, 49],
69
- bgWhite: [47, 49],
70
- blackBright: [90, 39],
71
- redBright: [91, 39],
72
- greenBright: [92, 39],
73
- yellowBright: [93, 39],
74
- blueBright: [94, 39],
75
- magentaBright: [95, 39],
76
- cyanBright: [96, 39],
77
- whiteBright: [97, 39],
78
- bgBlackBright: [100, 49],
79
- bgRedBright: [101, 49],
80
- bgGreenBright: [102, 49],
81
- bgYellowBright: [103, 49],
82
- bgBlueBright: [104, 49],
83
- bgMagentaBright: [105, 49],
84
- bgCyanBright: [106, 49],
85
- bgWhiteBright: [107, 49]
44
+ var {
45
+ env = {},
46
+ argv = [],
47
+ platform = ""
48
+ } = typeof process === "undefined" ? {} : process;
49
+ var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
50
+ var isForced = "FORCE_COLOR" in env || argv.includes("--color");
51
+ var isWindows = platform === "win32";
52
+ var isDumbTerminal = env.TERM === "dumb";
53
+ var isCompatibleTerminal = tty__namespace && tty__namespace.isatty && tty__namespace.isatty(1) && env.TERM && !isDumbTerminal;
54
+ var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
55
+ var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
56
+ function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
57
+ return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
58
+ }
59
+ function clearBleed(index, string, open, close, replace) {
60
+ return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
61
+ }
62
+ function filterEmpty(open, close, replace = open, at = open.length + 1) {
63
+ return (string) => string || !(string === "" || string === void 0) ? clearBleed(
64
+ ("" + string).indexOf(close, at),
65
+ string,
66
+ open,
67
+ close,
68
+ replace
69
+ ) : "";
70
+ }
71
+ function init(open, close, replace) {
72
+ return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
73
+ }
74
+ var colorDefs = {
75
+ reset: init(0, 0),
76
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
77
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
78
+ italic: init(3, 23),
79
+ underline: init(4, 24),
80
+ inverse: init(7, 27),
81
+ hidden: init(8, 28),
82
+ strikethrough: init(9, 29),
83
+ black: init(30, 39),
84
+ red: init(31, 39),
85
+ green: init(32, 39),
86
+ yellow: init(33, 39),
87
+ blue: init(34, 39),
88
+ magenta: init(35, 39),
89
+ cyan: init(36, 39),
90
+ white: init(37, 39),
91
+ gray: init(90, 39),
92
+ bgBlack: init(40, 49),
93
+ bgRed: init(41, 49),
94
+ bgGreen: init(42, 49),
95
+ bgYellow: init(43, 49),
96
+ bgBlue: init(44, 49),
97
+ bgMagenta: init(45, 49),
98
+ bgCyan: init(46, 49),
99
+ bgWhite: init(47, 49),
100
+ blackBright: init(90, 39),
101
+ redBright: init(91, 39),
102
+ greenBright: init(92, 39),
103
+ yellowBright: init(93, 39),
104
+ blueBright: init(94, 39),
105
+ magentaBright: init(95, 39),
106
+ cyanBright: init(96, 39),
107
+ whiteBright: init(97, 39),
108
+ bgBlackBright: init(100, 49),
109
+ bgRedBright: init(101, 49),
110
+ bgGreenBright: init(102, 49),
111
+ bgYellowBright: init(103, 49),
112
+ bgBlueBright: init(104, 49),
113
+ bgMagentaBright: init(105, 49),
114
+ bgCyanBright: init(106, 49),
115
+ bgWhiteBright: init(107, 49)
86
116
  };
87
- var h = Object.entries(f);
88
- function a(n2) {
89
- return String(n2);
117
+ function createColors(useColor = isColorSupported) {
118
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
90
119
  }
91
- a.open = "";
92
- a.close = "";
93
- function C(n2 = false) {
94
- let e = typeof process != "undefined" ? process : void 0, i2 = (e == null ? void 0 : e.env) || {}, g2 = (e == null ? void 0 : e.argv) || [];
95
- return !("NO_COLOR" in i2 || g2.includes("--no-color")) && ("FORCE_COLOR" in i2 || g2.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || n2 && i2.TERM !== "dumb" || "CI" in i2) || typeof window != "undefined" && !!window.chrome;
120
+ var colors = createColors();
121
+ function getColor(color, fallback = "reset") {
122
+ return colors[color] || colors[fallback];
96
123
  }
97
- function p(n2 = false) {
98
- let e = C(n2), i2 = (r3, t2, c2, o2) => {
99
- let l2 = "", s2 = 0;
100
- do
101
- l2 += r3.substring(s2, o2) + c2, s2 = o2 + t2.length, o2 = r3.indexOf(t2, s2);
102
- while (~o2);
103
- return l2 + r3.substring(s2);
104
- }, g2 = (r3, t2, c2 = r3) => {
105
- let o2 = (l2) => {
106
- let s2 = String(l2), b2 = s2.indexOf(t2, r3.length);
107
- return ~b2 ? r3 + i2(s2, t2, c2, b2) + t2 : r3 + s2 + t2;
108
- };
109
- return o2.open = r3, o2.close = t2, o2;
110
- }, u2 = {
111
- isColorSupported: e
112
- }, d = (r3) => `\x1B[${r3}m`;
113
- for (let [r3, t2] of h)
114
- u2[r3] = e ? g2(
115
- d(t2[0]),
116
- d(t2[1]),
117
- t2[2]
118
- ) : a;
119
- return u2;
124
+ var ansiRegex = [
125
+ String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,
126
+ String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`
127
+ ].join("|");
128
+ function stripAnsi(text) {
129
+ return text.replace(new RegExp(ansiRegex, "g"), "");
130
+ }
131
+ var boxStylePresets = {
132
+ solid: {
133
+ tl: "\u250C",
134
+ tr: "\u2510",
135
+ bl: "\u2514",
136
+ br: "\u2518",
137
+ h: "\u2500",
138
+ v: "\u2502"
139
+ },
140
+ double: {
141
+ tl: "\u2554",
142
+ tr: "\u2557",
143
+ bl: "\u255A",
144
+ br: "\u255D",
145
+ h: "\u2550",
146
+ v: "\u2551"
147
+ },
148
+ doubleSingle: {
149
+ tl: "\u2553",
150
+ tr: "\u2556",
151
+ bl: "\u2559",
152
+ br: "\u255C",
153
+ h: "\u2500",
154
+ v: "\u2551"
155
+ },
156
+ doubleSingleRounded: {
157
+ tl: "\u256D",
158
+ tr: "\u256E",
159
+ bl: "\u2570",
160
+ br: "\u256F",
161
+ h: "\u2500",
162
+ v: "\u2551"
163
+ },
164
+ singleThick: {
165
+ tl: "\u250F",
166
+ tr: "\u2513",
167
+ bl: "\u2517",
168
+ br: "\u251B",
169
+ h: "\u2501",
170
+ v: "\u2503"
171
+ },
172
+ singleDouble: {
173
+ tl: "\u2552",
174
+ tr: "\u2555",
175
+ bl: "\u2558",
176
+ br: "\u255B",
177
+ h: "\u2550",
178
+ v: "\u2502"
179
+ },
180
+ singleDoubleRounded: {
181
+ tl: "\u256D",
182
+ tr: "\u256E",
183
+ bl: "\u2570",
184
+ br: "\u256F",
185
+ h: "\u2550",
186
+ v: "\u2502"
187
+ },
188
+ rounded: {
189
+ tl: "\u256D",
190
+ tr: "\u256E",
191
+ bl: "\u2570",
192
+ br: "\u256F",
193
+ h: "\u2500",
194
+ v: "\u2502"
195
+ }
196
+ };
197
+ var defaultStyle = {
198
+ borderColor: "white",
199
+ borderStyle: "rounded",
200
+ valign: "center",
201
+ padding: 2,
202
+ marginLeft: 1,
203
+ marginTop: 1,
204
+ marginBottom: 1
205
+ };
206
+ function box(text, _opts = {}) {
207
+ const opts = {
208
+ ..._opts,
209
+ style: {
210
+ ...defaultStyle,
211
+ ..._opts.style
212
+ }
213
+ };
214
+ const textLines = text.split("\n");
215
+ const boxLines = [];
216
+ const _color = getColor(opts.style.borderColor);
217
+ const borderStyle = {
218
+ ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
219
+ };
220
+ if (_color) {
221
+ for (const key in borderStyle) {
222
+ borderStyle[key] = _color(
223
+ borderStyle[key]
224
+ );
225
+ }
226
+ }
227
+ const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
228
+ const height = textLines.length + paddingOffset;
229
+ const width = Math.max(
230
+ ...textLines.map((line) => stripAnsi(line).length),
231
+ opts.title ? stripAnsi(opts.title).length : 0
232
+ ) + paddingOffset;
233
+ const widthOffset = width + paddingOffset;
234
+ const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
235
+ if (opts.style.marginTop > 0) {
236
+ boxLines.push("".repeat(opts.style.marginTop));
237
+ }
238
+ if (opts.title) {
239
+ const title = _color ? _color(opts.title) : opts.title;
240
+ const left = borderStyle.h.repeat(
241
+ Math.floor((width - stripAnsi(opts.title).length) / 2)
242
+ );
243
+ const right = borderStyle.h.repeat(
244
+ width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset
245
+ );
246
+ boxLines.push(
247
+ `${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`
248
+ );
249
+ } else {
250
+ boxLines.push(
251
+ `${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`
252
+ );
253
+ }
254
+ const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
255
+ for (let i2 = 0; i2 < height; i2++) {
256
+ if (i2 < valignOffset || i2 >= valignOffset + textLines.length) {
257
+ boxLines.push(
258
+ `${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`
259
+ );
260
+ } else {
261
+ const line = textLines[i2 - valignOffset];
262
+ const left = " ".repeat(paddingOffset);
263
+ const right = " ".repeat(width - stripAnsi(line).length);
264
+ boxLines.push(
265
+ `${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`
266
+ );
267
+ }
268
+ }
269
+ boxLines.push(
270
+ `${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`
271
+ );
272
+ if (opts.style.marginBottom > 0) {
273
+ boxLines.push("".repeat(opts.style.marginBottom));
274
+ }
275
+ return boxLines.join("\n");
120
276
  }
121
- var p2 = p(tty.isatty(1));
122
277
 
123
278
  // src/utils/EventEmitter.ts
124
279
  chunkKEDZU7VZ_cjs.init_cjs_shims();
@@ -255,7 +410,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
255
410
  function createDefu(merger) {
256
411
  return (...arguments_) => (
257
412
  // eslint-disable-next-line unicorn/no-array-reduce
258
- arguments_.reduce((p3, c2) => _defu(p3, c2, ""), {})
413
+ arguments_.reduce((p, c2) => _defu(p, c2, ""), {})
259
414
  );
260
415
  }
261
416
  var defu = createDefu();
@@ -711,249 +866,13 @@ ${indent}`);
711
866
  );
712
867
  }
713
868
  };
714
-
715
- // ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
716
- chunkKEDZU7VZ_cjs.init_cjs_shims();
717
- var {
718
- env = {},
719
- argv = [],
720
- platform = ""
721
- } = typeof process === "undefined" ? {} : process;
722
- var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
723
- var isForced = "FORCE_COLOR" in env || argv.includes("--color");
724
- var isWindows = platform === "win32";
725
- var isDumbTerminal = env.TERM === "dumb";
726
- var isCompatibleTerminal = tty__namespace && tty__namespace.isatty && tty__namespace.isatty(1) && env.TERM && !isDumbTerminal;
727
- var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
728
- var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
729
- function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
730
- return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
731
- }
732
- function clearBleed(index, string, open, close, replace) {
733
- return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
734
- }
735
- function filterEmpty(open, close, replace = open, at = open.length + 1) {
736
- return (string) => string || !(string === "" || string === void 0) ? clearBleed(
737
- ("" + string).indexOf(close, at),
738
- string,
739
- open,
740
- close,
741
- replace
742
- ) : "";
743
- }
744
- function init(open, close, replace) {
745
- return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
746
- }
747
- var colorDefs = {
748
- reset: init(0, 0),
749
- bold: init(1, 22, "\x1B[22m\x1B[1m"),
750
- dim: init(2, 22, "\x1B[22m\x1B[2m"),
751
- italic: init(3, 23),
752
- underline: init(4, 24),
753
- inverse: init(7, 27),
754
- hidden: init(8, 28),
755
- strikethrough: init(9, 29),
756
- black: init(30, 39),
757
- red: init(31, 39),
758
- green: init(32, 39),
759
- yellow: init(33, 39),
760
- blue: init(34, 39),
761
- magenta: init(35, 39),
762
- cyan: init(36, 39),
763
- white: init(37, 39),
764
- gray: init(90, 39),
765
- bgBlack: init(40, 49),
766
- bgRed: init(41, 49),
767
- bgGreen: init(42, 49),
768
- bgYellow: init(43, 49),
769
- bgBlue: init(44, 49),
770
- bgMagenta: init(45, 49),
771
- bgCyan: init(46, 49),
772
- bgWhite: init(47, 49),
773
- blackBright: init(90, 39),
774
- redBright: init(91, 39),
775
- greenBright: init(92, 39),
776
- yellowBright: init(93, 39),
777
- blueBright: init(94, 39),
778
- magentaBright: init(95, 39),
779
- cyanBright: init(96, 39),
780
- whiteBright: init(97, 39),
781
- bgBlackBright: init(100, 49),
782
- bgRedBright: init(101, 49),
783
- bgGreenBright: init(102, 49),
784
- bgYellowBright: init(103, 49),
785
- bgBlueBright: init(104, 49),
786
- bgMagentaBright: init(105, 49),
787
- bgCyanBright: init(106, 49),
788
- bgWhiteBright: init(107, 49)
789
- };
790
- function createColors(useColor = isColorSupported) {
791
- return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
792
- }
793
- var colors = createColors();
794
- function getColor(color, fallback = "reset") {
795
- return colors[color] || colors[fallback];
796
- }
797
- var ansiRegex = [
798
- String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,
799
- String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`
800
- ].join("|");
801
- function stripAnsi(text) {
802
- return text.replace(new RegExp(ansiRegex, "g"), "");
803
- }
804
- var boxStylePresets = {
805
- solid: {
806
- tl: "\u250C",
807
- tr: "\u2510",
808
- bl: "\u2514",
809
- br: "\u2518",
810
- h: "\u2500",
811
- v: "\u2502"
812
- },
813
- double: {
814
- tl: "\u2554",
815
- tr: "\u2557",
816
- bl: "\u255A",
817
- br: "\u255D",
818
- h: "\u2550",
819
- v: "\u2551"
820
- },
821
- doubleSingle: {
822
- tl: "\u2553",
823
- tr: "\u2556",
824
- bl: "\u2559",
825
- br: "\u255C",
826
- h: "\u2500",
827
- v: "\u2551"
828
- },
829
- doubleSingleRounded: {
830
- tl: "\u256D",
831
- tr: "\u256E",
832
- bl: "\u2570",
833
- br: "\u256F",
834
- h: "\u2500",
835
- v: "\u2551"
836
- },
837
- singleThick: {
838
- tl: "\u250F",
839
- tr: "\u2513",
840
- bl: "\u2517",
841
- br: "\u251B",
842
- h: "\u2501",
843
- v: "\u2503"
844
- },
845
- singleDouble: {
846
- tl: "\u2552",
847
- tr: "\u2555",
848
- bl: "\u2558",
849
- br: "\u255B",
850
- h: "\u2550",
851
- v: "\u2502"
852
- },
853
- singleDoubleRounded: {
854
- tl: "\u256D",
855
- tr: "\u256E",
856
- bl: "\u2570",
857
- br: "\u256F",
858
- h: "\u2550",
859
- v: "\u2502"
860
- },
861
- rounded: {
862
- tl: "\u256D",
863
- tr: "\u256E",
864
- bl: "\u2570",
865
- br: "\u256F",
866
- h: "\u2500",
867
- v: "\u2502"
868
- }
869
- };
870
- var defaultStyle = {
871
- borderColor: "white",
872
- borderStyle: "rounded",
873
- valign: "center",
874
- padding: 2,
875
- marginLeft: 1,
876
- marginTop: 1,
877
- marginBottom: 1
878
- };
879
- function box(text, _opts = {}) {
880
- const opts = {
881
- ..._opts,
882
- style: {
883
- ...defaultStyle,
884
- ..._opts.style
885
- }
886
- };
887
- const textLines = text.split("\n");
888
- const boxLines = [];
889
- const _color = getColor(opts.style.borderColor);
890
- const borderStyle = {
891
- ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
892
- };
893
- if (_color) {
894
- for (const key in borderStyle) {
895
- borderStyle[key] = _color(
896
- borderStyle[key]
897
- );
898
- }
899
- }
900
- const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
901
- const height = textLines.length + paddingOffset;
902
- const width = Math.max(
903
- ...textLines.map((line) => stripAnsi(line).length),
904
- opts.title ? stripAnsi(opts.title).length : 0
905
- ) + paddingOffset;
906
- const widthOffset = width + paddingOffset;
907
- const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
908
- if (opts.style.marginTop > 0) {
909
- boxLines.push("".repeat(opts.style.marginTop));
910
- }
911
- if (opts.title) {
912
- const title = _color ? _color(opts.title) : opts.title;
913
- const left = borderStyle.h.repeat(
914
- Math.floor((width - stripAnsi(opts.title).length) / 2)
915
- );
916
- const right = borderStyle.h.repeat(
917
- width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset
918
- );
919
- boxLines.push(
920
- `${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`
921
- );
922
- } else {
923
- boxLines.push(
924
- `${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`
925
- );
926
- }
927
- const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
928
- for (let i2 = 0; i2 < height; i2++) {
929
- if (i2 < valignOffset || i2 >= valignOffset + textLines.length) {
930
- boxLines.push(
931
- `${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`
932
- );
933
- } else {
934
- const line = textLines[i2 - valignOffset];
935
- const left = " ".repeat(paddingOffset);
936
- const right = " ".repeat(width - stripAnsi(line).length);
937
- boxLines.push(
938
- `${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`
939
- );
940
- }
941
- }
942
- boxLines.push(
943
- `${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`
944
- );
945
- if (opts.style.marginBottom > 0) {
946
- boxLines.push("".repeat(opts.style.marginBottom));
947
- }
948
- return boxLines.join("\n");
949
- }
950
- var r2 = /* @__PURE__ */ Object.create(null);
951
- var i = (e) => globalThis.process?.env || undefined || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r2 : globalThis);
952
- var o = new Proxy(r2, { get(e, s2) {
953
- return i()[s2] ?? r2[s2];
869
+ var r = /* @__PURE__ */ Object.create(null);
870
+ var i = (e) => globalThis.process?.env || undefined || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis);
871
+ var o = new Proxy(r, { get(e, s2) {
872
+ return i()[s2] ?? r[s2];
954
873
  }, has(e, s2) {
955
874
  const E = i();
956
- return s2 in E || s2 in r2;
875
+ return s2 in E || s2 in r;
957
876
  }, set(e, s2, E) {
958
877
  const B = i(true);
959
878
  return B[s2] = E, true;
@@ -966,9 +885,9 @@ var o = new Proxy(r2, { get(e, s2) {
966
885
  return Object.keys(e);
967
886
  } });
968
887
  var t = typeof process < "u" && process.env && process.env.NODE_ENV || "";
969
- var f2 = [["APPVEYOR"], ["AWS_AMPLIFY", "AWS_APP_ID", { ci: true }], ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"], ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"], ["APPCIRCLE", "AC_APPCIRCLE"], ["BAMBOO", "bamboo_planKey"], ["BITBUCKET", "BITBUCKET_COMMIT"], ["BITRISE", "BITRISE_IO"], ["BUDDY", "BUDDY_WORKSPACE_ID"], ["BUILDKITE"], ["CIRCLE", "CIRCLECI"], ["CIRRUS", "CIRRUS_CI"], ["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }], ["CODEBUILD", "CODEBUILD_BUILD_ARN"], ["CODEFRESH", "CF_BUILD_ID"], ["DRONE"], ["DRONE", "DRONE_BUILD_EVENT"], ["DSARI"], ["GITHUB_ACTIONS"], ["GITLAB", "GITLAB_CI"], ["GITLAB", "CI_MERGE_REQUEST_ID"], ["GOCD", "GO_PIPELINE_LABEL"], ["LAYERCI"], ["HUDSON", "HUDSON_URL"], ["JENKINS", "JENKINS_URL"], ["MAGNUM"], ["NETLIFY"], ["NETLIFY", "NETLIFY_LOCAL", { ci: false }], ["NEVERCODE"], ["RENDER"], ["SAIL", "SAILCI"], ["SEMAPHORE"], ["SCREWDRIVER"], ["SHIPPABLE"], ["SOLANO", "TDDIUM"], ["STRIDER"], ["TEAMCITY", "TEAMCITY_VERSION"], ["TRAVIS"], ["VERCEL", "NOW_BUILDER"], ["VERCEL", "VERCEL", { ci: false }], ["VERCEL", "VERCEL_ENV", { ci: false }], ["APPCENTER", "APPCENTER_BUILD_ID"], ["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }], ["CODESANDBOX", "CODESANDBOX_HOST", { ci: false }], ["STACKBLITZ"], ["STORMKIT"], ["CLEAVR"], ["ZEABUR"], ["CODESPHERE", "CODESPHERE_APP_ID", { ci: true }], ["RAILWAY", "RAILWAY_PROJECT_ID"], ["RAILWAY", "RAILWAY_SERVICE_ID"], ["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"], ["FIREBASE_APP_HOSTING", "FIREBASE_APP_HOSTING", { ci: true }]];
888
+ var f = [["APPVEYOR"], ["AWS_AMPLIFY", "AWS_APP_ID", { ci: true }], ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"], ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"], ["APPCIRCLE", "AC_APPCIRCLE"], ["BAMBOO", "bamboo_planKey"], ["BITBUCKET", "BITBUCKET_COMMIT"], ["BITRISE", "BITRISE_IO"], ["BUDDY", "BUDDY_WORKSPACE_ID"], ["BUILDKITE"], ["CIRCLE", "CIRCLECI"], ["CIRRUS", "CIRRUS_CI"], ["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }], ["CODEBUILD", "CODEBUILD_BUILD_ARN"], ["CODEFRESH", "CF_BUILD_ID"], ["DRONE"], ["DRONE", "DRONE_BUILD_EVENT"], ["DSARI"], ["GITHUB_ACTIONS"], ["GITLAB", "GITLAB_CI"], ["GITLAB", "CI_MERGE_REQUEST_ID"], ["GOCD", "GO_PIPELINE_LABEL"], ["LAYERCI"], ["HUDSON", "HUDSON_URL"], ["JENKINS", "JENKINS_URL"], ["MAGNUM"], ["NETLIFY"], ["NETLIFY", "NETLIFY_LOCAL", { ci: false }], ["NEVERCODE"], ["RENDER"], ["SAIL", "SAILCI"], ["SEMAPHORE"], ["SCREWDRIVER"], ["SHIPPABLE"], ["SOLANO", "TDDIUM"], ["STRIDER"], ["TEAMCITY", "TEAMCITY_VERSION"], ["TRAVIS"], ["VERCEL", "NOW_BUILDER"], ["VERCEL", "VERCEL", { ci: false }], ["VERCEL", "VERCEL_ENV", { ci: false }], ["APPCENTER", "APPCENTER_BUILD_ID"], ["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }], ["CODESANDBOX", "CODESANDBOX_HOST", { ci: false }], ["STACKBLITZ"], ["STORMKIT"], ["CLEAVR"], ["ZEABUR"], ["CODESPHERE", "CODESPHERE_APP_ID", { ci: true }], ["RAILWAY", "RAILWAY_PROJECT_ID"], ["RAILWAY", "RAILWAY_SERVICE_ID"], ["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"], ["FIREBASE_APP_HOSTING", "FIREBASE_APP_HOSTING", { ci: true }]];
970
889
  function b() {
971
- if (globalThis.process?.env) for (const e of f2) {
890
+ if (globalThis.process?.env) for (const e of f) {
972
891
  const s2 = e[1] || e[0];
973
892
  if (globalThis.process?.env[s2]) return { name: e[0].toLowerCase(), ...e[2] };
974
893
  }
@@ -981,14 +900,14 @@ function n(e) {
981
900
  }
982
901
  var I = globalThis.process?.platform || "";
983
902
  var T = n(o.CI) || l.ci !== false;
984
- var a2 = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
903
+ var a = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
985
904
  var g = n(o.DEBUG);
986
905
  var R = t === "test" || n(o.TEST);
987
- n(o.MINIMAL) || T || R || !a2;
906
+ n(o.MINIMAL) || T || R || !a;
988
907
  var A = /^win/i.test(I);
989
- !n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (a2 || A) && o.TERM !== "dumb" || T);
990
- var C2 = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
991
- Number(C2?.split(".")[0]) || null;
908
+ !n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (a || A) && o.TERM !== "dumb" || T);
909
+ var C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
910
+ Number(C?.split(".")[0]) || null;
992
911
  var y = globalThis.process || /* @__PURE__ */ Object.create(null);
993
912
  var _ = { versions: {} };
994
913
  new Proxy(y, { get(e, s2) {
@@ -1141,7 +1060,7 @@ var FancyReporter = class extends BasicReporter {
1141
1060
  const indent = " ".repeat((opts?.errorLevel || 0) + 1);
1142
1061
  return `
1143
1062
  ${indent}` + parseStack(stack, message).map(
1144
- (line) => " " + line.replace(/^at +/, (m2) => colors.gray(m2)).replace(/\((.+)\)/, (_2, m2) => `(${colors.cyan(m2)})`)
1063
+ (line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_2, m) => `(${colors.cyan(m)})`)
1145
1064
  ).join(`
1146
1065
  ${indent}`);
1147
1066
  }
@@ -1191,7 +1110,7 @@ ${indent}`);
1191
1110
  }
1192
1111
  };
1193
1112
  function characterFormat(str) {
1194
- return str.replace(/`([^`]+)`/gm, (_2, m2) => colors.cyan(m2)).replace(/\s+_([^_]+)_\s+/gm, (_2, m2) => ` ${colors.underline(m2)} `);
1113
+ return str.replace(/`([^`]+)`/gm, (_2, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_2, m) => ` ${colors.underline(m)} `);
1195
1114
  }
1196
1115
  function getColor2(color = "white") {
1197
1116
  return colors[color] || colors.white;
@@ -1209,7 +1128,7 @@ function createConsola2(options = {}) {
1209
1128
  defaults: { level },
1210
1129
  stdout: process.stdout,
1211
1130
  stderr: process.stderr,
1212
- prompt: (...args) => import('./prompt-OGHA3VNC.cjs').then((m2) => m2.prompt(...args)),
1131
+ prompt: (...args) => import('./prompt-OGHA3VNC.cjs').then((m) => m.prompt(...args)),
1213
1132
  reporters: options.reporters || [
1214
1133
  options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()
1215
1134
  ],
@@ -1255,10 +1174,10 @@ function createLogger({ logLevel = 3, name, consola: _consola } = {}) {
1255
1174
  consola2.success(message);
1256
1175
  });
1257
1176
  events.on("warning", (message) => {
1258
- consola2.warn(p2.yellow(message));
1177
+ consola2.warn(colors.yellow(message));
1259
1178
  });
1260
1179
  events.on("info", (message) => {
1261
- consola2.info(p2.yellow(message));
1180
+ consola2.info(colors.yellow(message));
1262
1181
  });
1263
1182
  events.on("debug", (message) => {
1264
1183
  if (message.logs.join("\n\n").length <= 100 && logLevel === LogMapper.debug) {
@@ -1303,31 +1222,21 @@ function createLogger({ logLevel = 3, name, consola: _consola } = {}) {
1303
1222
  };
1304
1223
  return logger;
1305
1224
  }
1306
- var defaultColours = ["black", "blue", "darkBlue", "cyan", "gray", "green", "darkGreen", "magenta", "red", "darkRed", "yellow", "darkYellow"];
1307
- function randomColour(text, colours = defaultColours) {
1225
+ function randomColour(text) {
1308
1226
  if (!text) {
1309
1227
  return "white";
1310
1228
  }
1229
+ const defaultColours = ["black", "red", "green", "yellow", "blue", "red", "green", "magenta", "cyan", "gray"];
1311
1230
  const random = seedrandom__default.default(text);
1312
- const colour = colours.at(Math.floor(random() * colours.length)) || "white";
1231
+ const colour = defaultColours.at(Math.floor(random() * defaultColours.length)) || "white";
1313
1232
  return colour;
1314
1233
  }
1315
- function randomCliColour(text, colors2 = defaultColours) {
1316
- const colours = p(true);
1234
+ function randomCliColour(text) {
1317
1235
  if (!text) {
1318
- return colours.white(text);
1319
- }
1320
- const colour = randomColour(text, colors2);
1321
- const isDark = colour.includes("dark");
1322
- const key = colour.replace("dark", "").toLowerCase();
1323
- const formatter = colours[key];
1324
- if (isDark) {
1325
- return p2.bold(formatter(text));
1326
- }
1327
- if (typeof formatter !== "function") {
1328
- throw new Error("Formatter for picoColor is not of type function/Formatter");
1236
+ return "";
1329
1237
  }
1330
- return formatter(text);
1238
+ const colour = randomColour(text);
1239
+ return colors[colour]?.(text);
1331
1240
  }
1332
1241
 
1333
1242
  exports.EventEmitter = EventEmitter;
@@ -1335,5 +1244,5 @@ exports.LogMapper = LogMapper;
1335
1244
  exports.createLogger = createLogger;
1336
1245
  exports.randomCliColour = randomCliColour;
1337
1246
  exports.randomColour = randomColour;
1338
- //# sourceMappingURL=chunk-PM6MZZRD.cjs.map
1339
- //# sourceMappingURL=chunk-PM6MZZRD.cjs.map
1247
+ //# sourceMappingURL=chunk-UKZDPZZN.cjs.map
1248
+ //# sourceMappingURL=chunk-UKZDPZZN.cjs.map