@kubb/core 2.0.0-beta.12 → 2.0.0-beta.13

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.
Files changed (49) hide show
  1. package/dist/chunk-56YH3VX6.js +239 -0
  2. package/dist/chunk-56YH3VX6.js.map +1 -0
  3. package/dist/chunk-6N4JBFFS.js +79 -0
  4. package/dist/chunk-6N4JBFFS.js.map +1 -0
  5. package/dist/chunk-72O327DC.cjs +247 -0
  6. package/dist/chunk-72O327DC.cjs.map +1 -0
  7. package/dist/chunk-77QZQ377.cjs +155 -0
  8. package/dist/chunk-77QZQ377.cjs.map +1 -0
  9. package/dist/chunk-ABFPJZJL.cjs +131 -0
  10. package/dist/chunk-ABFPJZJL.cjs.map +1 -0
  11. package/dist/chunk-FOQFLMOC.js +2336 -0
  12. package/dist/chunk-FOQFLMOC.js.map +1 -0
  13. package/dist/chunk-I7UUR5MZ.cjs +91 -0
  14. package/dist/chunk-I7UUR5MZ.cjs.map +1 -0
  15. package/dist/chunk-L6F5QUH2.js +129 -0
  16. package/dist/chunk-L6F5QUH2.js.map +1 -0
  17. package/dist/chunk-PY7I7OEN.cjs +92 -0
  18. package/dist/chunk-PY7I7OEN.cjs.map +1 -0
  19. package/dist/chunk-SX2AYX5F.js +18 -0
  20. package/dist/chunk-SX2AYX5F.js.map +1 -0
  21. package/dist/chunk-WFDR7OMY.js +148 -0
  22. package/dist/chunk-WFDR7OMY.js.map +1 -0
  23. package/dist/chunk-Z7XZQBAK.cjs +2339 -0
  24. package/dist/chunk-Z7XZQBAK.cjs.map +1 -0
  25. package/dist/fs.cjs +19 -2372
  26. package/dist/fs.cjs.map +1 -1
  27. package/dist/fs.js +3 -2373
  28. package/dist/fs.js.map +1 -1
  29. package/dist/index.cjs +209 -3251
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.js +139 -3473
  32. package/dist/index.js.map +1 -1
  33. package/dist/logger.cjs +18 -141
  34. package/dist/logger.cjs.map +1 -1
  35. package/dist/logger.js +2 -135
  36. package/dist/logger.js.map +1 -1
  37. package/dist/transformers.cjs +40 -208
  38. package/dist/transformers.cjs.map +1 -1
  39. package/dist/transformers.js +15 -201
  40. package/dist/transformers.js.map +1 -1
  41. package/dist/utils.cjs +29 -534
  42. package/dist/utils.cjs.map +1 -1
  43. package/dist/utils.js +10 -526
  44. package/dist/utils.js.map +1 -1
  45. package/package.json +5 -5
  46. package/src/BarrelManager.ts +3 -3
  47. package/src/FileManager.ts +6 -5
  48. package/src/utils/FunctionParams.ts +2 -2
  49. package/src/utils/URLPath.ts +5 -5
package/dist/logger.cjs CHANGED
@@ -1,148 +1,25 @@
1
1
  'use strict';
2
2
 
3
- var seedrandom = require('seedrandom');
4
- var tty = require('tty');
3
+ var chunk77QZQ377_cjs = require('./chunk-77QZQ377.cjs');
4
+ require('./chunk-I7UUR5MZ.cjs');
5
5
 
6
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
6
 
8
- var seedrandom__default = /*#__PURE__*/_interopDefault(seedrandom);
9
7
 
10
- // src/logger.ts
11
-
12
- // ../../node_modules/.pnpm/tinyrainbow@1.1.1/node_modules/tinyrainbow/dist/chunk-5WCZOS7T.js
13
- var b = {
14
- reset: [0, 0],
15
- bold: [1, 22, "\x1B[22m\x1B[1m"],
16
- dim: [2, 22, "\x1B[22m\x1B[2m"],
17
- italic: [3, 23],
18
- underline: [4, 24],
19
- inverse: [7, 27],
20
- hidden: [8, 28],
21
- strikethrough: [9, 29],
22
- black: [30, 39],
23
- red: [31, 39],
24
- green: [32, 39],
25
- yellow: [33, 39],
26
- blue: [34, 39],
27
- magenta: [35, 39],
28
- cyan: [36, 39],
29
- white: [37, 39],
30
- gray: [90, 39],
31
- bgBlack: [40, 49],
32
- bgRed: [41, 49],
33
- bgGreen: [42, 49],
34
- bgYellow: [43, 49],
35
- bgBlue: [44, 49],
36
- bgMagenta: [45, 49],
37
- bgCyan: [46, 49],
38
- bgWhite: [47, 49]
39
- };
40
- var C = Object.entries(b);
41
- function d(r2) {
42
- return String(r2);
43
- }
44
- d.open = "";
45
- d.close = "";
46
- function p(r2 = false) {
47
- let n = typeof process != "undefined" ? process : void 0, t = (n == null ? void 0 : n.env) || {}, a = (n == null ? void 0 : n.argv) || [];
48
- return !("NO_COLOR" in t || a.includes("--no-color")) && !("GITHUB_ACTIONS" in t) && ("FORCE_COLOR" in t || a.includes("--color") || (n == null ? void 0 : n.platform) === "win32" || r2 && t.TERM !== "dumb" || "CI" in t) || typeof window != "undefined" && !!window.chrome;
49
- }
50
- function w(r2 = false) {
51
- let n = p(r2), t = (e, o, c, i) => {
52
- let u = e.substring(0, i) + c, s = e.substring(i + o.length), l = s.indexOf(o);
53
- return ~l ? u + t(s, o, c, l) : u + s;
54
- }, a = (e, o, c = e) => {
55
- let i = (u) => {
56
- let s = String(u), l = s.indexOf(o, e.length);
57
- return ~l ? e + t(s, o, c, l) + o : e + s + o;
58
- };
59
- return i.open = e, i.close = o, i;
60
- }, g = {
61
- isColorSupported: n
62
- }, f = (e) => `\x1B[${e}m`;
63
- for (let [e, o] of C)
64
- g[e] = n ? a(
65
- f(o[0]),
66
- f(o[1]),
67
- o[2]
68
- ) : d;
69
- return g;
70
- }
71
- var p2 = w(tty.isatty(1));
72
-
73
- // src/logger.ts
74
- var LogLevel = {
75
- silent: "silent",
76
- info: "info",
77
- debug: "debug"
78
- };
79
- function createLogger({ logLevel, name, spinner }) {
80
- const logs = [];
81
- const log = (message) => {
82
- if (message && spinner) {
83
- spinner.text = message;
84
- logs.push(message);
85
- }
86
- };
87
- const error = (message) => {
88
- if (message) {
89
- throw new Error(message || "Something went wrong");
90
- }
91
- };
92
- const warn = (message) => {
93
- if (message && spinner) {
94
- spinner.warn(p2.yellow(message));
95
- logs.push(message);
96
- }
97
- };
98
- const info = (message) => {
99
- if (message && spinner && logLevel !== LogLevel.silent) {
100
- spinner.info(message);
101
- logs.push(message);
102
- }
103
- };
104
- const logger = {
105
- name,
106
- logLevel,
107
- log,
108
- error,
109
- warn,
110
- info,
111
- spinner,
112
- logs
113
- };
114
- return logger;
115
- }
116
- var defaultColours = ["black", "blue", "darkBlue", "cyan", "gray", "green", "darkGreen", "magenta", "red", "darkRed", "yellow", "darkYellow"];
117
- function randomColour(text, colours = defaultColours) {
118
- if (!text) {
119
- return "white";
120
- }
121
- const random = seedrandom__default.default(text);
122
- const colour = colours.at(Math.floor(random() * colours.length)) || "white";
123
- return colour;
124
- }
125
- function randomCliColour(text, colors = defaultColours) {
126
- const colours = w(true);
127
- if (!text) {
128
- return colours.white(text);
129
- }
130
- const colour = randomColour(text, colors);
131
- const isDark = colour.includes("dark");
132
- const key = colour.replace("dark", "").toLowerCase();
133
- const formatter = colours[key];
134
- if (isDark) {
135
- return p2.bold(formatter(text));
136
- }
137
- if (typeof formatter !== "function") {
138
- throw new Error("Formatter for picoColor is not of type function/Formatter");
139
- }
140
- return formatter(text);
141
- }
142
-
143
- exports.LogLevel = LogLevel;
144
- exports.createLogger = createLogger;
145
- exports.randomCliColour = randomCliColour;
146
- exports.randomColour = randomColour;
8
+ Object.defineProperty(exports, 'LogLevel', {
9
+ enumerable: true,
10
+ get: function () { return chunk77QZQ377_cjs.LogLevel; }
11
+ });
12
+ Object.defineProperty(exports, 'createLogger', {
13
+ enumerable: true,
14
+ get: function () { return chunk77QZQ377_cjs.createLogger; }
15
+ });
16
+ Object.defineProperty(exports, 'randomCliColour', {
17
+ enumerable: true,
18
+ get: function () { return chunk77QZQ377_cjs.randomCliColour; }
19
+ });
20
+ Object.defineProperty(exports, 'randomColour', {
21
+ enumerable: true,
22
+ get: function () { return chunk77QZQ377_cjs.randomColour; }
23
+ });
147
24
  //# sourceMappingURL=out.js.map
148
25
  //# sourceMappingURL=logger.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/logger.ts","../../../node_modules/.pnpm/tinyrainbow@1.1.1/node_modules/tinyrainbow/dist/chunk-5WCZOS7T.js","../../../node_modules/.pnpm/tinyrainbow@1.1.1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IAAI;AAEjC,MAAI,CAAC,MAAM;AACT,WAAO,QAAQ,MAAM,IAAI;AAAA,EAC3B;AAEA,QAAM,SAAS,aAAa,MAAM,MAAM;AACxC,QAAM,SAAS,OAAO,SAAS,MAAM;AACrC,QAAM,MAAM,OAAO,QAAQ,QAAQ,EAAE,EAAE,YAAY;AACnD,QAAM,YAAuB,QAAQ,GAAG;AAExC,MAAI,QAAQ;AACV,WAAOA,GAAE,KAAK,UAAU,IAAI,CAAC;AAAA,EAC/B;AAEA,MAAI,OAAO,cAAc,YAAY;AACnC,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAC7E;AACA,SAAO,UAAU,IAAI;AACvB","sourcesContent":["import seedrandom from 'seedrandom'\nimport c, { createColors } from 'tinyrainbow'\n\nimport type { Ora } from 'ora'\nimport type { Formatter } from 'tinyrainbow'\n\nexport const LogLevel = {\n silent: 'silent',\n info: 'info',\n debug: 'debug',\n} as const\n\nexport type LogLevel = keyof typeof LogLevel\n\nexport type Logger = {\n /**\n * Optional config name to show in CLI output\n */\n name?: string\n logLevel: LogLevel\n log: (message: string | null) => void\n error: (message: string | null) => void\n info: (message: string | null) => void\n warn: (message: string | null) => void\n spinner?: Ora\n logs: string[]\n}\n\ntype Props = {\n name?: string\n logLevel: LogLevel\n spinner?: Ora\n}\n\nexport function createLogger({ logLevel, name, spinner }: Props): Logger {\n const logs: string[] = []\n const log: Logger['log'] = (message) => {\n if (message && spinner) {\n spinner.text = message\n logs.push(message)\n }\n }\n\n const error: Logger['error'] = (message) => {\n if (message) {\n throw new Error(message || 'Something went wrong')\n }\n }\n\n const warn: Logger['warn'] = (message) => {\n if (message && spinner) {\n spinner.warn(c.yellow(message))\n logs.push(message)\n }\n }\n\n const info: Logger['warn'] = (message) => {\n if (message && spinner && logLevel !== LogLevel.silent) {\n spinner.info(message)\n logs.push(message)\n }\n }\n\n const logger: Logger = {\n name,\n logLevel,\n log,\n error,\n warn,\n info,\n spinner,\n logs,\n }\n\n return logger\n}\n\nconst defaultColours = ['black', 'blue', 'darkBlue', 'cyan', 'gray', 'green', 'darkGreen', 'magenta', 'red', 'darkRed', 'yellow', 'darkYellow'] as const\n\nexport function randomColour(text?: string, colours = defaultColours): string {\n if (!text) {\n return 'white'\n }\n\n const random = seedrandom(text)\n const colour = colours.at(Math.floor(random() * colours.length)) || 'white'\n\n return colour\n}\n\nexport function randomCliColour(text?: string, colors = defaultColours): string {\n const colours = createColors(true)\n\n if (!text) {\n return colours.white(text)\n }\n\n const colour = randomColour(text, colors)\n const isDark = colour.includes('dark')\n const key = colour.replace('dark', '').toLowerCase() as keyof typeof colours\n const formatter: Formatter = colours[key] as Formatter\n\n if (isDark) {\n return c.bold(formatter(text))\n }\n\n if (typeof formatter !== 'function') {\n throw new Error('Formatter for picoColor is not of type function/Formatter')\n }\n return formatter(text)\n}\n","// src/index.ts\nvar b = {\n reset: [0, 0],\n bold: [1, 22, \"\\x1B[22m\\x1B[1m\"],\n dim: [2, 22, \"\\x1B[22m\\x1B[2m\"],\n italic: [3, 23],\n underline: [4, 24],\n inverse: [7, 27],\n hidden: [8, 28],\n strikethrough: [9, 29],\n black: [30, 39],\n red: [31, 39],\n green: [32, 39],\n yellow: [33, 39],\n blue: [34, 39],\n magenta: [35, 39],\n cyan: [36, 39],\n white: [37, 39],\n gray: [90, 39],\n bgBlack: [40, 49],\n bgRed: [41, 49],\n bgGreen: [42, 49],\n bgYellow: [43, 49],\n bgBlue: [44, 49],\n bgMagenta: [45, 49],\n bgCyan: [46, 49],\n bgWhite: [47, 49]\n}, C = Object.entries(b);\nfunction d(r) {\n return String(r);\n}\nd.open = \"\";\nd.close = \"\";\nvar m = /* @__PURE__ */ C.reduce(\n (r, [n]) => (r[n] = d, r),\n { isColorSupported: !1 }\n);\nfunction x() {\n return { ...m };\n}\nfunction p(r = !1) {\n let n = typeof process != \"undefined\" ? process : void 0, t = (n == null ? void 0 : n.env) || {}, a = (n == null ? void 0 : n.argv) || [];\n return !(\"NO_COLOR\" in t || a.includes(\"--no-color\")) && !(\"GITHUB_ACTIONS\" in t) && (\"FORCE_COLOR\" in t || a.includes(\"--color\") || (n == null ? void 0 : n.platform) === \"win32\" || r && t.TERM !== \"dumb\" || \"CI\" in t) || typeof window != \"undefined\" && !!window.chrome;\n}\nfunction w(r = !1) {\n let n = p(r), t = (e, o, c, i) => {\n let u = e.substring(0, i) + c, s = e.substring(i + o.length), l = s.indexOf(o);\n return ~l ? u + t(s, o, c, l) : u + s;\n }, a = (e, o, c = e) => {\n let i = (u) => {\n let s = String(u), l = s.indexOf(o, e.length);\n return ~l ? e + t(s, o, c, l) + o : e + s + o;\n };\n return i.open = e, i.close = o, i;\n }, g = {\n isColorSupported: n\n }, f = (e) => `\\x1B[${e}m`;\n for (let [e, o] of C)\n g[e] = n ? a(\n f(o[0]),\n f(o[1]),\n o[2]\n ) : d;\n return g;\n}\n\nexport {\n x as a,\n p as b,\n w as c\n};\n","import {\n a as t,\n b as e,\n c as o\n} from \"./chunk-5WCZOS7T.js\";\n\n// src/node.ts\nimport { isatty as r } from \"tty\";\nvar p = o(r(1));\nexport {\n o as createColors,\n p as default,\n t as getDefaultColors,\n e as isSupported\n};\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
package/dist/logger.js CHANGED
@@ -1,140 +1,7 @@
1
1
  import { createRequire } from 'module';
2
- import seedrandom from 'seedrandom';
3
- import { isatty } from 'tty';
2
+ export { LogLevel, createLogger, randomCliColour, randomColour } from './chunk-WFDR7OMY.js';
3
+ import './chunk-6N4JBFFS.js';
4
4
 
5
5
  createRequire(import.meta.url);
6
-
7
- // ../../node_modules/.pnpm/tinyrainbow@1.1.1/node_modules/tinyrainbow/dist/chunk-5WCZOS7T.js
8
- var b = {
9
- reset: [0, 0],
10
- bold: [1, 22, "\x1B[22m\x1B[1m"],
11
- dim: [2, 22, "\x1B[22m\x1B[2m"],
12
- italic: [3, 23],
13
- underline: [4, 24],
14
- inverse: [7, 27],
15
- hidden: [8, 28],
16
- strikethrough: [9, 29],
17
- black: [30, 39],
18
- red: [31, 39],
19
- green: [32, 39],
20
- yellow: [33, 39],
21
- blue: [34, 39],
22
- magenta: [35, 39],
23
- cyan: [36, 39],
24
- white: [37, 39],
25
- gray: [90, 39],
26
- bgBlack: [40, 49],
27
- bgRed: [41, 49],
28
- bgGreen: [42, 49],
29
- bgYellow: [43, 49],
30
- bgBlue: [44, 49],
31
- bgMagenta: [45, 49],
32
- bgCyan: [46, 49],
33
- bgWhite: [47, 49]
34
- };
35
- var C = Object.entries(b);
36
- function d(r2) {
37
- return String(r2);
38
- }
39
- d.open = "";
40
- d.close = "";
41
- function p(r2 = false) {
42
- let n = typeof process != "undefined" ? process : void 0, t = (n == null ? void 0 : n.env) || {}, a = (n == null ? void 0 : n.argv) || [];
43
- return !("NO_COLOR" in t || a.includes("--no-color")) && !("GITHUB_ACTIONS" in t) && ("FORCE_COLOR" in t || a.includes("--color") || (n == null ? void 0 : n.platform) === "win32" || r2 && t.TERM !== "dumb" || "CI" in t) || typeof window != "undefined" && !!window.chrome;
44
- }
45
- function w(r2 = false) {
46
- let n = p(r2), t = (e, o, c, i) => {
47
- let u = e.substring(0, i) + c, s = e.substring(i + o.length), l = s.indexOf(o);
48
- return ~l ? u + t(s, o, c, l) : u + s;
49
- }, a = (e, o, c = e) => {
50
- let i = (u) => {
51
- let s = String(u), l = s.indexOf(o, e.length);
52
- return ~l ? e + t(s, o, c, l) + o : e + s + o;
53
- };
54
- return i.open = e, i.close = o, i;
55
- }, g = {
56
- isColorSupported: n
57
- }, f = (e) => `\x1B[${e}m`;
58
- for (let [e, o] of C)
59
- g[e] = n ? a(
60
- f(o[0]),
61
- f(o[1]),
62
- o[2]
63
- ) : d;
64
- return g;
65
- }
66
- var p2 = w(isatty(1));
67
-
68
- // src/logger.ts
69
- var LogLevel = {
70
- silent: "silent",
71
- info: "info",
72
- debug: "debug"
73
- };
74
- function createLogger({ logLevel, name, spinner }) {
75
- const logs = [];
76
- const log = (message) => {
77
- if (message && spinner) {
78
- spinner.text = message;
79
- logs.push(message);
80
- }
81
- };
82
- const error = (message) => {
83
- if (message) {
84
- throw new Error(message || "Something went wrong");
85
- }
86
- };
87
- const warn = (message) => {
88
- if (message && spinner) {
89
- spinner.warn(p2.yellow(message));
90
- logs.push(message);
91
- }
92
- };
93
- const info = (message) => {
94
- if (message && spinner && logLevel !== LogLevel.silent) {
95
- spinner.info(message);
96
- logs.push(message);
97
- }
98
- };
99
- const logger = {
100
- name,
101
- logLevel,
102
- log,
103
- error,
104
- warn,
105
- info,
106
- spinner,
107
- logs
108
- };
109
- return logger;
110
- }
111
- var defaultColours = ["black", "blue", "darkBlue", "cyan", "gray", "green", "darkGreen", "magenta", "red", "darkRed", "yellow", "darkYellow"];
112
- function randomColour(text, colours = defaultColours) {
113
- if (!text) {
114
- return "white";
115
- }
116
- const random = seedrandom(text);
117
- const colour = colours.at(Math.floor(random() * colours.length)) || "white";
118
- return colour;
119
- }
120
- function randomCliColour(text, colors = defaultColours) {
121
- const colours = w(true);
122
- if (!text) {
123
- return colours.white(text);
124
- }
125
- const colour = randomColour(text, colors);
126
- const isDark = colour.includes("dark");
127
- const key = colour.replace("dark", "").toLowerCase();
128
- const formatter = colours[key];
129
- if (isDark) {
130
- return p2.bold(formatter(text));
131
- }
132
- if (typeof formatter !== "function") {
133
- throw new Error("Formatter for picoColor is not of type function/Formatter");
134
- }
135
- return formatter(text);
136
- }
137
-
138
- export { LogLevel, createLogger, randomCliColour, randomColour };
139
6
  //# sourceMappingURL=out.js.map
140
7
  //# sourceMappingURL=logger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/logger.ts","../../../node_modules/.pnpm/tinyrainbow@1.1.1/node_modules/tinyrainbow/dist/chunk-5WCZOS7T.js","../../../node_modules/.pnpm/tinyrainbow@1.1.1/node_modules/tinyrainbow/dist/node.js"],"names":["r","p"],"mappings":";;;;;;AAAA,OAAO,gBAAgB;;;ACCvB,IAAI,IAAI;AAAA,EACN,OAAO,CAAC,GAAG,CAA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AM,SAAS,OAAO,SAAS,MAAM;AACrC,QAAM,MAAM,OAAO,QAAQ,QAAQ,EAAE,EAAE,YAAY;AACnD,QAAM,YAAuB,QAAQ,GAAG;AAExC,MAAI,QAAQ;AACV,WAAOA,GAAE,KAAK,UAAU,IAAI,CAAC;AAAA,EAC/B;AAEA,MAAI,OAAO,cAAc,YAAY;AACnC,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAC7E;AACA,SAAO,UAAU,IAAI;AACvB","sourcesContent":["import seedrandom from 'seedrandom'\nimport c, { createColors } from 'tinyrainbow'\n\nimport type { Ora } from 'ora'\nimport type { Formatter } from 'tinyrainbow'\n\nexport const LogLevel = {\n silent: 'silent',\n info: 'info',\n debug: 'debug',\n} as const\n\nexport type LogLevel = keyof typeof LogLevel\n\nexport type Logger = {\n /**\n * Optional config name to show in CLI output\n */\n name?: string\n logLevel: LogLevel\n log: (message: string | null) => void\n error: (message: string | null) => void\n info: (message: string | null) => void\n warn: (message: string | null) => void\n spinner?: Ora\n logs: string[]\n}\n\ntype Props = {\n name?: string\n logLevel: LogLevel\n spinner?: Ora\n}\n\nexport function createLogger({ logLevel, name, spinner }: Props): Logger {\n const logs: string[] = []\n const log: Logger['log'] = (message) => {\n if (message && spinner) {\n spinner.text = message\n logs.push(message)\n }\n }\n\n const error: Logger['error'] = (message) => {\n if (message) {\n throw new Error(message || 'Something went wrong')\n }\n }\n\n const warn: Logger['warn'] = (message) => {\n if (message && spinner) {\n spinner.warn(c.yellow(message))\n logs.push(message)\n }\n }\n\n const info: Logger['warn'] = (message) => {\n if (message && spinner && logLevel !== LogLevel.silent) {\n spinner.info(message)\n logs.push(message)\n }\n }\n\n const logger: Logger = {\n name,\n logLevel,\n log,\n error,\n warn,\n info,\n spinner,\n logs,\n }\n\n return logger\n}\n\nconst defaultColours = ['black', 'blue', 'darkBlue', 'cyan', 'gray', 'green', 'darkGreen', 'magenta', 'red', 'darkRed', 'yellow', 'darkYellow'] as const\n\nexport function randomColour(text?: string, colours = defaultColours): string {\n if (!text) {\n return 'white'\n }\n\n const random = seedrandom(text)\n const colour = colours.at(Math.floor(random() * colours.length)) || 'white'\n\n return colour\n}\n\nexport function randomCliColour(text?: string, colors = defaultColours): string {\n const colours = createColors(true)\n\n if (!text) {\n return colours.white(text)\n }\n\n const colour = randomColour(text, colors)\n const isDark = colour.includes('dark')\n const key = colour.replace('dark', '').toLowerCase() as keyof typeof colours\n const formatter: Formatter = colours[key] as Formatter\n\n if (isDark) {\n return c.bold(formatter(text))\n }\n\n if (typeof formatter !== 'function') {\n throw new Error('Formatter for picoColor is not of type function/Formatter')\n }\n return formatter(text)\n}\n","// src/index.ts\nvar b = {\n reset: [0, 0],\n bold: [1, 22, \"\\x1B[22m\\x1B[1m\"],\n dim: [2, 22, \"\\x1B[22m\\x1B[2m\"],\n italic: [3, 23],\n underline: [4, 24],\n inverse: [7, 27],\n hidden: [8, 28],\n strikethrough: [9, 29],\n black: [30, 39],\n red: [31, 39],\n green: [32, 39],\n yellow: [33, 39],\n blue: [34, 39],\n magenta: [35, 39],\n cyan: [36, 39],\n white: [37, 39],\n gray: [90, 39],\n bgBlack: [40, 49],\n bgRed: [41, 49],\n bgGreen: [42, 49],\n bgYellow: [43, 49],\n bgBlue: [44, 49],\n bgMagenta: [45, 49],\n bgCyan: [46, 49],\n bgWhite: [47, 49]\n}, C = Object.entries(b);\nfunction d(r) {\n return String(r);\n}\nd.open = \"\";\nd.close = \"\";\nvar m = /* @__PURE__ */ C.reduce(\n (r, [n]) => (r[n] = d, r),\n { isColorSupported: !1 }\n);\nfunction x() {\n return { ...m };\n}\nfunction p(r = !1) {\n let n = typeof process != \"undefined\" ? process : void 0, t = (n == null ? void 0 : n.env) || {}, a = (n == null ? void 0 : n.argv) || [];\n return !(\"NO_COLOR\" in t || a.includes(\"--no-color\")) && !(\"GITHUB_ACTIONS\" in t) && (\"FORCE_COLOR\" in t || a.includes(\"--color\") || (n == null ? void 0 : n.platform) === \"win32\" || r && t.TERM !== \"dumb\" || \"CI\" in t) || typeof window != \"undefined\" && !!window.chrome;\n}\nfunction w(r = !1) {\n let n = p(r), t = (e, o, c, i) => {\n let u = e.substring(0, i) + c, s = e.substring(i + o.length), l = s.indexOf(o);\n return ~l ? u + t(s, o, c, l) : u + s;\n }, a = (e, o, c = e) => {\n let i = (u) => {\n let s = String(u), l = s.indexOf(o, e.length);\n return ~l ? e + t(s, o, c, l) + o : e + s + o;\n };\n return i.open = e, i.close = o, i;\n }, g = {\n isColorSupported: n\n }, f = (e) => `\\x1B[${e}m`;\n for (let [e, o] of C)\n g[e] = n ? a(\n f(o[0]),\n f(o[1]),\n o[2]\n ) : d;\n return g;\n}\n\nexport {\n x as a,\n p as b,\n w as c\n};\n","import {\n a as t,\n b as e,\n c as o\n} from \"./chunk-5WCZOS7T.js\";\n\n// src/node.ts\nimport { isatty as r } from \"tty\";\nvar p = o(r(1));\nexport {\n o as createColors,\n p as default,\n t as getDefaultColors,\n e as isSupported\n};\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -2,92 +2,21 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- // ../../node_modules/.pnpm/change-case@5.2.0/node_modules/change-case/dist/index.js
6
- var SPLIT_LOWER_UPPER_RE = /([\p{Ll}\d])(\p{Lu})/gu;
7
- var SPLIT_UPPER_UPPER_RE = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
8
- var SPLIT_NUMBER_LOWER_RE = /(\d)(\p{Ll})/gu;
9
- var SPLIT_LETTER_NUMBER_RE = /(\p{L})(\d)/gu;
10
- var DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
11
- var SPLIT_REPLACE_VALUE = "$1\0$2";
12
- var DEFAULT_PREFIX_CHARACTERS = "";
13
- function split(input, options) {
14
- let result = input.trim();
15
- result = result.replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
16
- if (options?.separateNumbers) {
17
- result = result.replace(SPLIT_NUMBER_LOWER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_LETTER_NUMBER_RE, SPLIT_REPLACE_VALUE);
18
- }
19
- result = result.replace(DEFAULT_STRIP_REGEXP, "\0");
20
- let start = 0;
21
- let end = result.length;
22
- while (result.charAt(start) === "\0")
23
- start++;
24
- if (start === end)
25
- return [];
26
- while (result.charAt(end - 1) === "\0")
27
- end--;
28
- return result.slice(start, end).split(/\0/g);
29
- }
30
- function camelCase(input, options) {
31
- const prefix = getPrefix(input, options?.prefixCharacters);
32
- const lower = lowerFactory(options?.locale);
33
- const upper = upperFactory(options?.locale);
34
- const transform = options?.mergeAmbiguousCharacters ? capitalCaseTransformFactory(lower, upper) : pascalCaseTransformFactory(lower, upper);
35
- return prefix + split(input, options).map((word, index) => {
36
- if (index === 0)
37
- return lower(word);
38
- return transform(word, index);
39
- }).join(options?.delimiter ?? "");
40
- }
41
- function pascalCase(input, options) {
42
- const prefix = getPrefix(input, options?.prefixCharacters);
43
- const lower = lowerFactory(options?.locale);
44
- const upper = upperFactory(options?.locale);
45
- const transform = options?.mergeAmbiguousCharacters ? capitalCaseTransformFactory(lower, upper) : pascalCaseTransformFactory(lower, upper);
46
- return prefix + split(input, options).map(transform).join(options?.delimiter ?? "");
47
- }
48
- function lowerFactory(locale) {
49
- return locale === false ? (input) => input.toLowerCase() : (input) => input.toLocaleLowerCase(locale);
50
- }
51
- function upperFactory(locale) {
52
- return locale === false ? (input) => input.toUpperCase() : (input) => input.toLocaleUpperCase(locale);
53
- }
54
- function capitalCaseTransformFactory(lower, upper) {
55
- return (word) => `${upper(word[0])}${lower(word.slice(1))}`;
56
- }
57
- function pascalCaseTransformFactory(lower, upper) {
58
- return (word, index) => {
59
- const char0 = word[0];
60
- const initial = index > 0 && char0 >= "0" && char0 <= "9" ? "_" + char0 : upper(char0);
61
- return initial + lower(word.slice(1));
62
- };
63
- }
64
- function getPrefix(input, prefixCharacters = DEFAULT_PREFIX_CHARACTERS) {
65
- let prefix = "";
66
- for (let i = 0; i < input.length; i++) {
67
- const char = input.charAt(i);
68
- if (prefixCharacters.includes(char)) {
69
- prefix += char;
70
- } else {
71
- break;
72
- }
73
- }
74
- return prefix;
75
- }
5
+ var chunkABFPJZJL_cjs = require('./chunk-ABFPJZJL.cjs');
6
+ var chunkPY7I7OEN_cjs = require('./chunk-PY7I7OEN.cjs');
7
+ var chunkI7UUR5MZ_cjs = require('./chunk-I7UUR5MZ.cjs');
76
8
 
77
- // src/transformers/casing.ts
78
- function camelCase2(text) {
79
- return camelCase(text, { delimiter: "", mergeAmbiguousCharacters: true });
80
- }
81
- function pascalCase2(text) {
82
- return pascalCase(text, { delimiter: "", mergeAmbiguousCharacters: true });
83
- }
9
+ // src/transformers/index.ts
10
+ chunkI7UUR5MZ_cjs.init_cjs_shims();
84
11
 
85
12
  // src/transformers/combineCodes.ts
13
+ chunkI7UUR5MZ_cjs.init_cjs_shims();
86
14
  function combineCodes(codes) {
87
15
  return codes.join("\n");
88
16
  }
89
17
 
90
18
  // src/transformers/createJSDocBlockText.ts
19
+ chunkI7UUR5MZ_cjs.init_cjs_shims();
91
20
  function createJSDocBlockText({ comments }) {
92
21
  const filteredComments = comments.filter(Boolean);
93
22
  if (!filteredComments.length) {
@@ -99,6 +28,7 @@ function createJSDocBlockText({ comments }) {
99
28
  }
100
29
 
101
30
  // src/transformers/escape.ts
31
+ chunkI7UUR5MZ_cjs.init_cjs_shims();
102
32
  function escape(text) {
103
33
  return text ? text.replaceAll("`", "\\`") : "";
104
34
  }
@@ -124,11 +54,13 @@ function jsStringEscape(input) {
124
54
  }
125
55
 
126
56
  // src/transformers/indent.ts
57
+ chunkI7UUR5MZ_cjs.init_cjs_shims();
127
58
  function createIndent(size) {
128
59
  return Array.from({ length: size + 1 }).join(" ");
129
60
  }
130
61
 
131
62
  // src/transformers/nameSorter.ts
63
+ chunkI7UUR5MZ_cjs.init_cjs_shims();
132
64
  function nameSorter(a, b) {
133
65
  if (a.name < b.name) {
134
66
  return -1;
@@ -139,143 +71,48 @@ function nameSorter(a, b) {
139
71
  return 0;
140
72
  }
141
73
 
142
- // src/transformers/searchAndReplace.ts
143
- function searchAndReplace(options) {
144
- const { text, replaceBy, prefix = "", key } = options;
145
- const searchValues = options.searchValues?.(prefix, key) || [
146
- `${prefix}["${key}"]`,
147
- `${prefix}['${key}']`,
148
- `${prefix}[\`${key}\`]`,
149
- `${prefix}"${key}"`,
150
- `${prefix}'${key}'`,
151
- `${prefix}\`${key}\``,
152
- new RegExp(`${prefix}${key}`, "g")
153
- ];
154
- return searchValues.reduce((prev, searchValue) => {
155
- return prev.toString().replaceAll(searchValue, replaceBy);
156
- }, text);
157
- }
158
-
159
- // src/transformers/transformReservedWord.ts
160
- var reservedWords = [
161
- "abstract",
162
- "arguments",
163
- "boolean",
164
- "break",
165
- "byte",
166
- "case",
167
- "catch",
168
- "char",
169
- "class",
170
- "const",
171
- "continue",
172
- "debugger",
173
- "default",
174
- "delete",
175
- "do",
176
- "double",
177
- "else",
178
- "enum",
179
- "eval",
180
- "export",
181
- "extends",
182
- "false",
183
- "final",
184
- "finally",
185
- "float",
186
- "for",
187
- "function",
188
- "goto",
189
- "if",
190
- "implements",
191
- "import",
192
- "in",
193
- "instanceof",
194
- "int",
195
- "interface",
196
- "let",
197
- "long",
198
- "native",
199
- "new",
200
- "null",
201
- "package",
202
- "private",
203
- "protected",
204
- "public",
205
- "return",
206
- "short",
207
- "static",
208
- "super",
209
- "switch",
210
- "synchronized",
211
- "this",
212
- "throw",
213
- "throws",
214
- "transient",
215
- "true",
216
- "try",
217
- "typeof",
218
- "var",
219
- "void",
220
- "volatile",
221
- "while",
222
- "with",
223
- "yield",
224
- "Array",
225
- "Date",
226
- "eval",
227
- "function",
228
- "hasOwnProperty",
229
- "Infinity",
230
- "isFinite",
231
- "isNaN",
232
- "isPrototypeOf",
233
- "length",
234
- "Math",
235
- "name",
236
- "NaN",
237
- "Number",
238
- "Object",
239
- "prototype",
240
- "String",
241
- "toString",
242
- "undefined",
243
- "valueOf"
244
- ];
245
- function transformReservedWord(word) {
246
- if (word && reservedWords.includes(word) || word?.match(/^\d/)) {
247
- return `_${word}`;
248
- }
249
- return word;
250
- }
251
-
252
- // src/transformers/trim.ts
253
- function trim(text) {
254
- return text.replaceAll(/\n/g, "").trim();
255
- }
256
- function trimExtName(text) {
257
- return text.replace(/\.[^/.]+$/, "");
258
- }
259
-
260
74
  // src/transformers/index.ts
261
75
  var transformers_default = {
262
76
  combineCodes,
263
77
  escape,
264
78
  jsStringEscape,
265
79
  createIndent,
266
- transformReservedWord,
80
+ transformReservedWord: chunkABFPJZJL_cjs.transformReservedWord,
267
81
  nameSorter,
268
- searchAndReplace,
269
- trim,
270
- trimExtName,
82
+ searchAndReplace: chunkABFPJZJL_cjs.searchAndReplace,
83
+ trim: chunkABFPJZJL_cjs.trim,
84
+ trimExtName: chunkABFPJZJL_cjs.trimExtName,
271
85
  JSDoc: {
272
86
  createJSDocBlockText
273
87
  },
274
- camelCase: camelCase2,
275
- pascalCase: pascalCase2
88
+ camelCase: chunkPY7I7OEN_cjs.camelCase,
89
+ pascalCase: chunkPY7I7OEN_cjs.pascalCase
276
90
  };
277
91
 
278
- exports.camelCase = camelCase2;
92
+ Object.defineProperty(exports, 'searchAndReplace', {
93
+ enumerable: true,
94
+ get: function () { return chunkABFPJZJL_cjs.searchAndReplace; }
95
+ });
96
+ Object.defineProperty(exports, 'transformReservedWord', {
97
+ enumerable: true,
98
+ get: function () { return chunkABFPJZJL_cjs.transformReservedWord; }
99
+ });
100
+ Object.defineProperty(exports, 'trim', {
101
+ enumerable: true,
102
+ get: function () { return chunkABFPJZJL_cjs.trim; }
103
+ });
104
+ Object.defineProperty(exports, 'trimExtName', {
105
+ enumerable: true,
106
+ get: function () { return chunkABFPJZJL_cjs.trimExtName; }
107
+ });
108
+ Object.defineProperty(exports, 'camelCase', {
109
+ enumerable: true,
110
+ get: function () { return chunkPY7I7OEN_cjs.camelCase; }
111
+ });
112
+ Object.defineProperty(exports, 'pascalCase', {
113
+ enumerable: true,
114
+ get: function () { return chunkPY7I7OEN_cjs.pascalCase; }
115
+ });
279
116
  exports.combineCodes = combineCodes;
280
117
  exports.createIndent = createIndent;
281
118
  exports.createJSDocBlockText = createJSDocBlockText;
@@ -283,10 +120,5 @@ exports.default = transformers_default;
283
120
  exports.escape = escape;
284
121
  exports.jsStringEscape = jsStringEscape;
285
122
  exports.nameSorter = nameSorter;
286
- exports.pascalCase = pascalCase2;
287
- exports.searchAndReplace = searchAndReplace;
288
- exports.transformReservedWord = transformReservedWord;
289
- exports.trim = trim;
290
- exports.trimExtName = trimExtName;
291
123
  //# sourceMappingURL=out.js.map
292
124
  //# sourceMappingURL=transformers.cjs.map