@storm-software/config-tools 1.119.0 → 1.130.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.
Files changed (157) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-4IYEDNYJ.mjs +426 -0
  3. package/dist/chunk-5QZ7AV2J.js +27 -0
  4. package/dist/chunk-64RYHF5D.mjs +51 -0
  5. package/dist/chunk-66ACWURQ.mjs +125 -0
  6. package/dist/chunk-6OYLNZFT.mjs +169 -0
  7. package/dist/chunk-6SJLAEJ3.js +70 -0
  8. package/dist/chunk-6WPG3DXV.js +32 -0
  9. package/dist/chunk-7KVSSDMX.mjs +545 -0
  10. package/dist/chunk-7XY63NME.js +44 -0
  11. package/dist/chunk-A7VLTBS6.mjs +271 -0
  12. package/dist/chunk-BS5OC5E6.js +426 -0
  13. package/dist/chunk-E3IN3SQD.mjs +6 -0
  14. package/dist/chunk-FW22KPOW.mjs +27 -0
  15. package/dist/chunk-GIZ23UUE.js +189 -0
  16. package/dist/chunk-GOQAHXJF.mjs +28 -0
  17. package/dist/chunk-H6XXDZ7A.js +28 -0
  18. package/dist/chunk-HCF3QA4H.js +102 -0
  19. package/dist/chunk-JDK3PXQR.js +545 -0
  20. package/dist/chunk-K6TQN2LZ.js +6 -0
  21. package/dist/chunk-LKZSRXS7.js +169 -0
  22. package/dist/chunk-MGI2M3SX.js +6 -0
  23. package/dist/chunk-N32EGEJB.js +90 -0
  24. package/dist/chunk-N4BRCEYB.js +27 -0
  25. package/dist/chunk-OXK45X3L.js +125 -0
  26. package/dist/chunk-PEHVR33I.js +67 -0
  27. package/dist/chunk-PQNCKJAR.js +271 -0
  28. package/dist/chunk-PVPSTJNJ.mjs +90 -0
  29. package/dist/chunk-QHVHX67K.js +6 -0
  30. package/dist/chunk-QUVGIEZZ.mjs +6 -0
  31. package/dist/chunk-RAWSXKTG.mjs +189 -0
  32. package/dist/chunk-SJO5XZQA.js +6 -0
  33. package/dist/chunk-TEKFJAJJ.mjs +70 -0
  34. package/dist/chunk-TTCXDK6S.mjs +27 -0
  35. package/dist/chunk-UCUOC6LA.mjs +70 -0
  36. package/dist/chunk-VQLOUFMG.mjs +32 -0
  37. package/dist/chunk-WRFJFYOU.mjs +51 -0
  38. package/dist/chunk-WXOSG64C.js +70 -0
  39. package/dist/chunk-WXYJGX4C.mjs +6 -0
  40. package/dist/chunk-X6VIYUJR.mjs +6 -0
  41. package/dist/chunk-XJEQHMOE.js +49 -0
  42. package/dist/chunk-XLMGW4ZW.mjs +67 -0
  43. package/dist/chunk-XXHENMLT.mjs +44 -0
  44. package/dist/chunk-Z2EXWNIQ.mjs +102 -0
  45. package/dist/chunk-ZVXEYJQO.js +51 -0
  46. package/dist/config-file/get-config-file.d.mts +20 -0
  47. package/dist/config-file/get-config-file.d.ts +20 -0
  48. package/dist/config-file/get-config-file.js +23 -0
  49. package/dist/config-file/get-config-file.mjs +23 -0
  50. package/dist/config-file/index.d.mts +4 -0
  51. package/dist/config-file/index.d.ts +4 -0
  52. package/dist/config-file/index.js +24 -0
  53. package/dist/config-file/index.mjs +24 -0
  54. package/dist/create-storm-config.d.mts +29 -0
  55. package/dist/create-storm-config.d.ts +29 -0
  56. package/dist/create-storm-config.js +30 -0
  57. package/dist/create-storm-config.mjs +30 -0
  58. package/dist/env/get-env.d.mts +19 -0
  59. package/dist/env/get-env.d.ts +19 -0
  60. package/dist/env/get-env.js +13 -0
  61. package/dist/env/get-env.mjs +13 -0
  62. package/dist/env/index.d.mts +5 -0
  63. package/dist/env/index.d.ts +5 -0
  64. package/dist/env/index.js +20 -0
  65. package/dist/env/index.mjs +20 -0
  66. package/{src/env/get-env.d.ts → dist/env/set-env.d.mts} +7 -4
  67. package/{src → dist}/env/set-env.d.ts +7 -3
  68. package/dist/env/set-env.js +12 -0
  69. package/dist/env/set-env.mjs +12 -0
  70. package/dist/index.d.mts +19 -0
  71. package/dist/index.d.ts +19 -0
  72. package/dist/index.js +132 -0
  73. package/dist/index.mjs +132 -0
  74. package/dist/logger/chalk.d.mts +25 -0
  75. package/{src/utilities → dist/logger}/chalk.d.ts +4 -2
  76. package/dist/logger/chalk.js +7 -0
  77. package/dist/logger/chalk.mjs +7 -0
  78. package/dist/logger/console.d.mts +82 -0
  79. package/{src/utilities/logger.d.ts → dist/logger/console.d.ts} +18 -14
  80. package/dist/logger/console.js +35 -0
  81. package/dist/logger/console.mjs +35 -0
  82. package/dist/logger/get-log-level.d.mts +27 -0
  83. package/{src/utilities → dist/logger}/get-log-level.d.ts +9 -4
  84. package/dist/logger/get-log-level.js +12 -0
  85. package/dist/logger/get-log-level.mjs +12 -0
  86. package/dist/logger/index.d.mts +6 -0
  87. package/dist/logger/index.d.ts +6 -0
  88. package/dist/logger/index.js +46 -0
  89. package/dist/logger/index.mjs +46 -0
  90. package/dist/types-DGWqy1xb.d.mts +1395 -0
  91. package/dist/types-DGWqy1xb.d.ts +1395 -0
  92. package/dist/types.d.mts +40 -0
  93. package/{src → dist}/types.d.ts +14 -7
  94. package/dist/types.js +9 -0
  95. package/dist/types.mjs +9 -0
  96. package/dist/utilities/apply-workspace-tokens.d.mts +9 -0
  97. package/dist/utilities/apply-workspace-tokens.d.ts +9 -0
  98. package/dist/utilities/apply-workspace-tokens.js +14 -0
  99. package/dist/utilities/apply-workspace-tokens.mjs +14 -0
  100. package/dist/utilities/correct-paths.d.mts +19 -0
  101. package/dist/utilities/correct-paths.d.ts +19 -0
  102. package/dist/utilities/correct-paths.js +9 -0
  103. package/dist/utilities/correct-paths.mjs +9 -0
  104. package/dist/utilities/file-path-utils.d.mts +4 -0
  105. package/dist/utilities/file-path-utils.d.ts +4 -0
  106. package/dist/utilities/file-path-utils.js +9 -0
  107. package/dist/utilities/file-path-utils.mjs +9 -0
  108. package/dist/utilities/find-up.d.mts +6 -0
  109. package/dist/utilities/find-up.d.ts +6 -0
  110. package/dist/utilities/find-up.js +7 -0
  111. package/dist/utilities/find-up.mjs +7 -0
  112. package/dist/utilities/find-workspace-root.d.mts +16 -0
  113. package/{src → dist}/utilities/find-workspace-root.d.ts +4 -2
  114. package/dist/utilities/find-workspace-root.js +11 -0
  115. package/dist/utilities/find-workspace-root.mjs +11 -0
  116. package/dist/utilities/get-default-config.d.mts +15 -0
  117. package/dist/utilities/get-default-config.d.ts +15 -0
  118. package/dist/utilities/get-default-config.js +13 -0
  119. package/dist/utilities/get-default-config.mjs +13 -0
  120. package/dist/utilities/index.d.mts +11 -0
  121. package/dist/utilities/index.d.ts +11 -0
  122. package/dist/utilities/index.js +58 -0
  123. package/dist/utilities/index.mjs +58 -0
  124. package/dist/utilities/process-handler.d.mts +8 -0
  125. package/dist/utilities/process-handler.d.ts +8 -0
  126. package/dist/utilities/process-handler.js +20 -0
  127. package/dist/utilities/process-handler.mjs +20 -0
  128. package/dist/utilities/run.d.mts +36 -0
  129. package/dist/utilities/run.d.ts +36 -0
  130. package/dist/utilities/run.js +11 -0
  131. package/dist/utilities/run.mjs +11 -0
  132. package/package.json +1 -24
  133. package/CHANGELOG.md +0 -3122
  134. package/declarations.d.ts +0 -304
  135. package/index.cjs +0 -67508
  136. package/index.js +0 -67463
  137. package/meta.cjs.json +0 -5352
  138. package/meta.esm.json +0 -5413
  139. package/src/config-file/get-config-file.d.ts +0 -16
  140. package/src/config-file/index.d.ts +0 -1
  141. package/src/create-storm-config.d.ts +0 -26
  142. package/src/env/index.d.ts +0 -2
  143. package/src/index.d.ts +0 -13
  144. package/src/utilities/apply-workspace-tokens.d.ts +0 -4
  145. package/src/utilities/correct-paths.d.ts +0 -1
  146. package/src/utilities/file-path-utils.d.ts +0 -2
  147. package/src/utilities/find-up.d.ts +0 -4
  148. package/src/utilities/get-default-config.d.ts +0 -15
  149. package/src/utilities/index.d.ts +0 -10
  150. package/src/utilities/process-handler.d.ts +0 -4
  151. package/src/utilities/run.d.ts +0 -18
  152. package/utilities/chalk.cjs +0 -1610
  153. package/utilities/chalk.js +0 -1605
  154. package/utilities/find-workspace-root.cjs +0 -118
  155. package/utilities/find-workspace-root.js +0 -91
  156. package/utilities/logger.cjs +0 -5914
  157. package/utilities/logger.js +0 -5897
@@ -0,0 +1,271 @@
1
+ import {
2
+ getLogLevel
3
+ } from "./chunk-UCUOC6LA.mjs";
4
+ import {
5
+ correctPaths
6
+ } from "./chunk-GOQAHXJF.mjs";
7
+ import {
8
+ LogLevel
9
+ } from "./chunk-VQLOUFMG.mjs";
10
+ import {
11
+ __name,
12
+ init_esm_shims
13
+ } from "./chunk-WRFJFYOU.mjs";
14
+
15
+ // src/env/set-env.ts
16
+ init_esm_shims();
17
+ var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
18
+ for (const key of Object.keys(extension ?? {})) {
19
+ if (extension[key]) {
20
+ const result = key?.replace(/([A-Z])+/g, (input) => input ? input[0]?.toUpperCase() + input.slice(1) : "").split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
21
+ let extensionKey;
22
+ if (result.length === 0) {
23
+ return;
24
+ }
25
+ if (result.length === 1) {
26
+ extensionKey = result[0]?.toUpperCase() ?? "";
27
+ } else {
28
+ extensionKey = result.reduce((ret, part) => {
29
+ return `${ret}_${part.toLowerCase()}`;
30
+ });
31
+ }
32
+ process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
33
+ }
34
+ }
35
+ }, "setExtensionEnv");
36
+ var setConfigEnv = /* @__PURE__ */ __name((config) => {
37
+ const prefix = "STORM_";
38
+ if (config.extends) {
39
+ process.env[`${prefix}EXTENDS`] = config.extends;
40
+ }
41
+ if (config.name) {
42
+ process.env[`${prefix}NAME`] = config.name;
43
+ }
44
+ if (config.namespace) {
45
+ process.env[`${prefix}NAMESPACE`] = config.namespace;
46
+ }
47
+ if (config.owner) {
48
+ process.env[`${prefix}OWNER`] = config.owner;
49
+ }
50
+ if (config.bot) {
51
+ process.env[`${prefix}BOT_NAME`] = config.bot.name;
52
+ process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
53
+ }
54
+ if (config.organization) {
55
+ process.env[`${prefix}ORGANIZATION`] = config.organization;
56
+ }
57
+ if (config.packageManager) {
58
+ process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
59
+ }
60
+ if (config.license) {
61
+ process.env[`${prefix}LICENSE`] = config.license;
62
+ }
63
+ if (config.homepage) {
64
+ process.env[`${prefix}HOMEPAGE`] = config.homepage;
65
+ }
66
+ if (config.docs) {
67
+ process.env[`${prefix}DOCS`] = config.docs;
68
+ }
69
+ if (config.licensing) {
70
+ process.env[`${prefix}LICENSING`] = config.licensing;
71
+ }
72
+ if (config.timezone) {
73
+ process.env[`${prefix}TIMEZONE`] = config.timezone;
74
+ process.env.TZ = config.timezone;
75
+ process.env.DEFAULT_TIMEZONE = config.timezone;
76
+ }
77
+ if (config.locale) {
78
+ process.env[`${prefix}LOCALE`] = config.locale;
79
+ process.env.LOCALE = config.locale;
80
+ process.env.DEFAULT_LOCALE = config.locale;
81
+ process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
82
+ }
83
+ if (config.configFile) {
84
+ process.env[`${prefix}CONFIG_FILE`] = correctPaths(config.configFile);
85
+ }
86
+ if (config.workspaceRoot) {
87
+ process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config.workspaceRoot);
88
+ process.env.NX_WORKSPACE_ROOT = correctPaths(config.workspaceRoot);
89
+ process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config.workspaceRoot);
90
+ }
91
+ if (config.directories) {
92
+ if (!config.skipCache && config.directories.cache) {
93
+ process.env[`${prefix}CACHE_DIR`] = correctPaths(config.directories.cache);
94
+ }
95
+ if (config.directories.data) {
96
+ process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
97
+ }
98
+ if (config.directories.config) {
99
+ process.env[`${prefix}CONFIG_DIR`] = correctPaths(config.directories.config);
100
+ }
101
+ if (config.directories.temp) {
102
+ process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
103
+ }
104
+ if (config.directories.log) {
105
+ process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
106
+ }
107
+ if (config.directories.build) {
108
+ process.env[`${prefix}BUILD_DIR`] = correctPaths(config.directories.build);
109
+ }
110
+ }
111
+ if (config.skipCache !== void 0) {
112
+ process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
113
+ if (config.skipCache) {
114
+ process.env.NX_SKIP_NX_CACHE ??= String(config.skipCache);
115
+ process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
116
+ }
117
+ }
118
+ if (config.env) {
119
+ process.env[`${prefix}ENV`] = config.env;
120
+ process.env.NODE_ENV = config.env;
121
+ process.env.ENVIRONMENT = config.env;
122
+ }
123
+ if (config.colors?.base?.light || config.colors?.base?.dark) {
124
+ for (const key of Object.keys(config.colors)) {
125
+ setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
126
+ }
127
+ } else {
128
+ setThemeColorConfigEnv(`${prefix}COLOR_`, config.colors);
129
+ }
130
+ if (config.repository) {
131
+ process.env[`${prefix}REPOSITORY`] = config.repository;
132
+ }
133
+ if (config.branch) {
134
+ process.env[`${prefix}BRANCH`] = config.branch;
135
+ }
136
+ if (config.preid) {
137
+ process.env[`${prefix}PRE_ID`] = String(config.preid);
138
+ }
139
+ if (config.externalPackagePatterns) {
140
+ process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(config.externalPackagePatterns);
141
+ }
142
+ if (config.registry) {
143
+ if (config.registry.github) {
144
+ process.env[`${prefix}REGISTRY_GITHUB`] = String(config.registry.github);
145
+ }
146
+ if (config.registry.npm) {
147
+ process.env[`${prefix}REGISTRY_NPM`] = String(config.registry.npm);
148
+ }
149
+ if (config.registry.cargo) {
150
+ process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
151
+ }
152
+ if (config.registry.cyclone) {
153
+ process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
154
+ }
155
+ if (config.registry.container) {
156
+ process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.cyclone);
157
+ }
158
+ }
159
+ if (config.logLevel) {
160
+ process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
161
+ process.env.LOG_LEVEL = String(config.logLevel);
162
+ process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
163
+ process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
164
+ }
165
+ process.env[`${prefix}CONFIG`] = JSON.stringify(config);
166
+ for (const key of Object.keys(config.extensions ?? {})) {
167
+ config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
168
+ }
169
+ }, "setConfigEnv");
170
+ var setThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
171
+ return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
172
+ }, "setThemeColorConfigEnv");
173
+ var setSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
174
+ if (config.dark) {
175
+ process.env[`${prefix}DARK`] = config.dark;
176
+ }
177
+ if (config.light) {
178
+ process.env[`${prefix}LIGHT`] = config.light;
179
+ }
180
+ if (config.brand) {
181
+ process.env[`${prefix}BRAND`] = config.brand;
182
+ }
183
+ if (config.alternate) {
184
+ process.env[`${prefix}ALTERNATE`] = config.alternate;
185
+ }
186
+ if (config.accent) {
187
+ process.env[`${prefix}ACCENT`] = config.accent;
188
+ }
189
+ if (config.link) {
190
+ process.env[`${prefix}LINK`] = config.link;
191
+ }
192
+ if (config.help) {
193
+ process.env[`${prefix}HELP`] = config.help;
194
+ }
195
+ if (config.success) {
196
+ process.env[`${prefix}SUCCESS`] = config.success;
197
+ }
198
+ if (config.info) {
199
+ process.env[`${prefix}INFO`] = config.info;
200
+ }
201
+ if (config.warning) {
202
+ process.env[`${prefix}WARNING`] = config.warning;
203
+ }
204
+ if (config.danger) {
205
+ process.env[`${prefix}DANGER`] = config.danger;
206
+ }
207
+ if (config.fatal) {
208
+ process.env[`${prefix}FATAL`] = config.fatal;
209
+ }
210
+ if (config.positive) {
211
+ process.env[`${prefix}POSITIVE`] = config.positive;
212
+ }
213
+ if (config.negative) {
214
+ process.env[`${prefix}NEGATIVE`] = config.negative;
215
+ }
216
+ }, "setSingleThemeColorConfigEnv");
217
+ var setMultiThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
218
+ return {
219
+ light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
220
+ dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
221
+ };
222
+ }, "setMultiThemeColorConfigEnv");
223
+ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
224
+ if (config.foreground) {
225
+ process.env[`${prefix}FOREGROUND`] = config.foreground;
226
+ }
227
+ if (config.background) {
228
+ process.env[`${prefix}BACKGROUND`] = config.background;
229
+ }
230
+ if (config.brand) {
231
+ process.env[`${prefix}BRAND`] = config.brand;
232
+ }
233
+ if (config.alternate) {
234
+ process.env[`${prefix}ALTERNATE`] = config.alternate;
235
+ }
236
+ if (config.accent) {
237
+ process.env[`${prefix}ACCENT`] = config.accent;
238
+ }
239
+ if (config.link) {
240
+ process.env[`${prefix}LINK`] = config.link;
241
+ }
242
+ if (config.help) {
243
+ process.env[`${prefix}HELP`] = config.help;
244
+ }
245
+ if (config.success) {
246
+ process.env[`${prefix}SUCCESS`] = config.success;
247
+ }
248
+ if (config.info) {
249
+ process.env[`${prefix}INFO`] = config.info;
250
+ }
251
+ if (config.warning) {
252
+ process.env[`${prefix}WARNING`] = config.warning;
253
+ }
254
+ if (config.danger) {
255
+ process.env[`${prefix}DANGER`] = config.danger;
256
+ }
257
+ if (config.fatal) {
258
+ process.env[`${prefix}FATAL`] = config.fatal;
259
+ }
260
+ if (config.positive) {
261
+ process.env[`${prefix}POSITIVE`] = config.positive;
262
+ }
263
+ if (config.negative) {
264
+ process.env[`${prefix}NEGATIVE`] = config.negative;
265
+ }
266
+ }, "setBaseThemeColorConfigEnv");
267
+
268
+ export {
269
+ setExtensionEnv,
270
+ setConfigEnv
271
+ };
@@ -0,0 +1,426 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+
5
+
6
+
7
+ var _chunkXJEQHMOEjs = require('./chunk-XJEQHMOE.js');
8
+
9
+ // ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js
10
+ var require_util = _chunkXJEQHMOEjs.__commonJS.call(void 0, {
11
+ "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports, module) {
12
+ "use strict";
13
+ _chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
14
+ var stringReplaceAll = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (string, substring, replacer) => {
15
+ let index = string.indexOf(substring);
16
+ if (index === -1) {
17
+ return string;
18
+ }
19
+ const substringLength = substring.length;
20
+ let endIndex = 0;
21
+ let returnValue = "";
22
+ do {
23
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
24
+ endIndex = index + substringLength;
25
+ index = string.indexOf(substring, endIndex);
26
+ } while (index !== -1);
27
+ returnValue += string.substr(endIndex);
28
+ return returnValue;
29
+ }, "stringReplaceAll");
30
+ var stringEncaseCRLFWithFirstIndex = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (string, prefix, postfix, index) => {
31
+ let endIndex = 0;
32
+ let returnValue = "";
33
+ do {
34
+ const gotCR = string[index - 1] === "\r";
35
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
36
+ endIndex = index + 1;
37
+ index = string.indexOf("\n", endIndex);
38
+ } while (index !== -1);
39
+ returnValue += string.substr(endIndex);
40
+ return returnValue;
41
+ }, "stringEncaseCRLFWithFirstIndex");
42
+ module.exports = {
43
+ stringReplaceAll,
44
+ stringEncaseCRLFWithFirstIndex
45
+ };
46
+ }
47
+ });
48
+
49
+ // ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js
50
+ var require_templates = _chunkXJEQHMOEjs.__commonJS.call(void 0, {
51
+ "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports, module) {
52
+ "use strict";
53
+ _chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
54
+ var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
55
+ var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
56
+ var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
57
+ var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
58
+ var ESCAPES = /* @__PURE__ */ new Map([
59
+ [
60
+ "n",
61
+ "\n"
62
+ ],
63
+ [
64
+ "r",
65
+ "\r"
66
+ ],
67
+ [
68
+ "t",
69
+ " "
70
+ ],
71
+ [
72
+ "b",
73
+ "\b"
74
+ ],
75
+ [
76
+ "f",
77
+ "\f"
78
+ ],
79
+ [
80
+ "v",
81
+ "\v"
82
+ ],
83
+ [
84
+ "0",
85
+ "\0"
86
+ ],
87
+ [
88
+ "\\",
89
+ "\\"
90
+ ],
91
+ [
92
+ "e",
93
+ "\x1B"
94
+ ],
95
+ [
96
+ "a",
97
+ "\x07"
98
+ ]
99
+ ]);
100
+ function unescape(c) {
101
+ const u = c[0] === "u";
102
+ const bracket = c[1] === "{";
103
+ if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
104
+ return String.fromCharCode(parseInt(c.slice(1), 16));
105
+ }
106
+ if (u && bracket) {
107
+ return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
108
+ }
109
+ return ESCAPES.get(c) || c;
110
+ }
111
+ _chunkXJEQHMOEjs.__name.call(void 0, unescape, "unescape");
112
+ function parseArguments(name, arguments_) {
113
+ const results = [];
114
+ const chunks = arguments_.trim().split(/\s*,\s*/g);
115
+ let matches;
116
+ for (const chunk of chunks) {
117
+ const number = Number(chunk);
118
+ if (!Number.isNaN(number)) {
119
+ results.push(number);
120
+ } else if (matches = chunk.match(STRING_REGEX)) {
121
+ results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
122
+ } else {
123
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
124
+ }
125
+ }
126
+ return results;
127
+ }
128
+ _chunkXJEQHMOEjs.__name.call(void 0, parseArguments, "parseArguments");
129
+ function parseStyle(style) {
130
+ STYLE_REGEX.lastIndex = 0;
131
+ const results = [];
132
+ let matches;
133
+ while ((matches = STYLE_REGEX.exec(style)) !== null) {
134
+ const name = matches[1];
135
+ if (matches[2]) {
136
+ const args = parseArguments(name, matches[2]);
137
+ results.push([
138
+ name
139
+ ].concat(args));
140
+ } else {
141
+ results.push([
142
+ name
143
+ ]);
144
+ }
145
+ }
146
+ return results;
147
+ }
148
+ _chunkXJEQHMOEjs.__name.call(void 0, parseStyle, "parseStyle");
149
+ function buildStyle(chalk2, styles) {
150
+ const enabled = {};
151
+ for (const layer of styles) {
152
+ for (const style of layer.styles) {
153
+ enabled[style[0]] = layer.inverse ? null : style.slice(1);
154
+ }
155
+ }
156
+ let current = chalk2;
157
+ for (const [styleName, styles2] of Object.entries(enabled)) {
158
+ if (!Array.isArray(styles2)) {
159
+ continue;
160
+ }
161
+ if (!(styleName in current)) {
162
+ throw new Error(`Unknown Chalk style: ${styleName}`);
163
+ }
164
+ current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
165
+ }
166
+ return current;
167
+ }
168
+ _chunkXJEQHMOEjs.__name.call(void 0, buildStyle, "buildStyle");
169
+ module.exports = (chalk2, temporary) => {
170
+ const styles = [];
171
+ const chunks = [];
172
+ let chunk = [];
173
+ temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
174
+ if (escapeCharacter) {
175
+ chunk.push(unescape(escapeCharacter));
176
+ } else if (style) {
177
+ const string = chunk.join("");
178
+ chunk = [];
179
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
180
+ styles.push({
181
+ inverse,
182
+ styles: parseStyle(style)
183
+ });
184
+ } else if (close) {
185
+ if (styles.length === 0) {
186
+ throw new Error("Found extraneous } in Chalk template literal");
187
+ }
188
+ chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
189
+ chunk = [];
190
+ styles.pop();
191
+ } else {
192
+ chunk.push(character);
193
+ }
194
+ });
195
+ chunks.push(chunk.join(""));
196
+ if (styles.length > 0) {
197
+ const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
198
+ throw new Error(errMessage);
199
+ }
200
+ return chunks.join("");
201
+ };
202
+ }
203
+ });
204
+
205
+ // ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js
206
+ var require_source = _chunkXJEQHMOEjs.__commonJS.call(void 0, {
207
+ "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports, module) {
208
+ "use strict";
209
+ _chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
210
+ var ansiStyles = _chunkXJEQHMOEjs.__require.call(void 0, "ansi-styles");
211
+ var { stdout: stdoutColor, stderr: stderrColor } = _chunkXJEQHMOEjs.__require.call(void 0, "supports-color");
212
+ var { stringReplaceAll, stringEncaseCRLFWithFirstIndex } = require_util();
213
+ var { isArray } = Array;
214
+ var levelMapping = [
215
+ "ansi",
216
+ "ansi",
217
+ "ansi256",
218
+ "ansi16m"
219
+ ];
220
+ var styles = /* @__PURE__ */ Object.create(null);
221
+ var applyOptions = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (object, options = {}) => {
222
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
223
+ throw new Error("The `level` option should be an integer from 0 to 3");
224
+ }
225
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
226
+ object.level = options.level === void 0 ? colorLevel : options.level;
227
+ }, "applyOptions");
228
+ var ChalkClass = class ChalkClass {
229
+ static {
230
+ _chunkXJEQHMOEjs.__name.call(void 0, this, "ChalkClass");
231
+ }
232
+ constructor(options) {
233
+ return chalkFactory(options);
234
+ }
235
+ };
236
+ var chalkFactory = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (options) => {
237
+ const chalk3 = {};
238
+ applyOptions(chalk3, options);
239
+ chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
240
+ Object.setPrototypeOf(chalk3, Chalk.prototype);
241
+ Object.setPrototypeOf(chalk3.template, chalk3);
242
+ chalk3.template.constructor = () => {
243
+ throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
244
+ };
245
+ chalk3.template.Instance = ChalkClass;
246
+ return chalk3.template;
247
+ }, "chalkFactory");
248
+ function Chalk(options) {
249
+ return chalkFactory(options);
250
+ }
251
+ _chunkXJEQHMOEjs.__name.call(void 0, Chalk, "Chalk");
252
+ for (const [styleName, style] of Object.entries(ansiStyles)) {
253
+ styles[styleName] = {
254
+ get() {
255
+ const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
256
+ Object.defineProperty(this, styleName, {
257
+ value: builder
258
+ });
259
+ return builder;
260
+ }
261
+ };
262
+ }
263
+ styles.visible = {
264
+ get() {
265
+ const builder = createBuilder(this, this._styler, true);
266
+ Object.defineProperty(this, "visible", {
267
+ value: builder
268
+ });
269
+ return builder;
270
+ }
271
+ };
272
+ var usedModels = [
273
+ "rgb",
274
+ "hex",
275
+ "keyword",
276
+ "hsl",
277
+ "hsv",
278
+ "hwb",
279
+ "ansi",
280
+ "ansi256"
281
+ ];
282
+ for (const model of usedModels) {
283
+ styles[model] = {
284
+ get() {
285
+ const { level } = this;
286
+ return function(...arguments_) {
287
+ const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
288
+ return createBuilder(this, styler, this._isEmpty);
289
+ };
290
+ }
291
+ };
292
+ }
293
+ for (const model of usedModels) {
294
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
295
+ styles[bgModel] = {
296
+ get() {
297
+ const { level } = this;
298
+ return function(...arguments_) {
299
+ const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
300
+ return createBuilder(this, styler, this._isEmpty);
301
+ };
302
+ }
303
+ };
304
+ }
305
+ var proto = Object.defineProperties(() => {
306
+ }, {
307
+ ...styles,
308
+ level: {
309
+ enumerable: true,
310
+ get() {
311
+ return this._generator.level;
312
+ },
313
+ set(level) {
314
+ this._generator.level = level;
315
+ }
316
+ }
317
+ });
318
+ var createStyler = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (open, close, parent) => {
319
+ let openAll;
320
+ let closeAll;
321
+ if (parent === void 0) {
322
+ openAll = open;
323
+ closeAll = close;
324
+ } else {
325
+ openAll = parent.openAll + open;
326
+ closeAll = close + parent.closeAll;
327
+ }
328
+ return {
329
+ open,
330
+ close,
331
+ openAll,
332
+ closeAll,
333
+ parent
334
+ };
335
+ }, "createStyler");
336
+ var createBuilder = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (self, _styler, _isEmpty) => {
337
+ const builder = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (...arguments_) => {
338
+ if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
339
+ return applyStyle(builder, chalkTag(builder, ...arguments_));
340
+ }
341
+ return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
342
+ }, "builder");
343
+ Object.setPrototypeOf(builder, proto);
344
+ builder._generator = self;
345
+ builder._styler = _styler;
346
+ builder._isEmpty = _isEmpty;
347
+ return builder;
348
+ }, "createBuilder");
349
+ var applyStyle = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (self, string) => {
350
+ if (self.level <= 0 || !string) {
351
+ return self._isEmpty ? "" : string;
352
+ }
353
+ let styler = self._styler;
354
+ if (styler === void 0) {
355
+ return string;
356
+ }
357
+ const { openAll, closeAll } = styler;
358
+ if (string.indexOf("\x1B") !== -1) {
359
+ while (styler !== void 0) {
360
+ string = stringReplaceAll(string, styler.close, styler.open);
361
+ styler = styler.parent;
362
+ }
363
+ }
364
+ const lfIndex = string.indexOf("\n");
365
+ if (lfIndex !== -1) {
366
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
367
+ }
368
+ return openAll + string + closeAll;
369
+ }, "applyStyle");
370
+ var template;
371
+ var chalkTag = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (chalk3, ...strings) => {
372
+ const [firstString] = strings;
373
+ if (!isArray(firstString) || !isArray(firstString.raw)) {
374
+ return strings.join(" ");
375
+ }
376
+ const arguments_ = strings.slice(1);
377
+ const parts = [
378
+ firstString.raw[0]
379
+ ];
380
+ for (let i = 1; i < firstString.length; i++) {
381
+ parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
382
+ }
383
+ if (template === void 0) {
384
+ template = require_templates();
385
+ }
386
+ return template(chalk3, parts.join(""));
387
+ }, "chalkTag");
388
+ Object.defineProperties(Chalk.prototype, styles);
389
+ var chalk2 = Chalk();
390
+ chalk2.supportsColor = stdoutColor;
391
+ chalk2.stderr = Chalk({
392
+ level: stderrColor ? stderrColor.level : 0
393
+ });
394
+ chalk2.stderr.supportsColor = stderrColor;
395
+ module.exports = chalk2;
396
+ }
397
+ });
398
+
399
+ // src/logger/chalk.ts
400
+ _chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
401
+ var import_chalk = _chunkXJEQHMOEjs.__toESM.call(void 0, require_source());
402
+ var chalkDefault = {
403
+ hex: /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (_) => (message) => message, "hex"),
404
+ bgHex: /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (_) => ({
405
+ whiteBright: /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (message) => message, "whiteBright")
406
+ }), "bgHex"),
407
+ whiteBright: /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (message) => message, "whiteBright"),
408
+ bold: {
409
+ hex: /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (_) => (message) => message, "hex"),
410
+ bgHex: /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (_) => ({
411
+ whiteBright: /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (message) => message, "whiteBright")
412
+ }), "bgHex"),
413
+ whiteBright: /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (message) => message, "whiteBright")
414
+ }
415
+ };
416
+ var getChalk = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, () => {
417
+ let _chalk = import_chalk.default;
418
+ if (!_optionalChain([_chalk, 'optionalAccess', _2 => _2.hex]) || !_optionalChain([_chalk, 'optionalAccess', _3 => _3.bold, 'optionalAccess', _4 => _4.hex]) || !_optionalChain([_chalk, 'optionalAccess', _5 => _5.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _6 => _6.whiteBright])) {
419
+ _chalk = chalkDefault;
420
+ }
421
+ return _chalk;
422
+ }, "getChalk");
423
+
424
+
425
+
426
+ exports.getChalk = getChalk;
@@ -0,0 +1,6 @@
1
+ import {
2
+ init_esm_shims
3
+ } from "./chunk-WRFJFYOU.mjs";
4
+
5
+ // src/utilities/index.ts
6
+ init_esm_shims();