@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
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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
+ var _chunkWXOSG64Cjs = require('./chunk-WXOSG64C.js');
4
+
5
+
6
+ var _chunkH6XXDZ7Ajs = require('./chunk-H6XXDZ7A.js');
7
+
8
+
9
+ var _chunk6WPG3DXVjs = require('./chunk-6WPG3DXV.js');
10
+
11
+
12
+
13
+ var _chunkXJEQHMOEjs = require('./chunk-XJEQHMOE.js');
14
+
15
+ // src/env/set-env.ts
16
+ _chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
17
+ var setExtensionEnv = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (extensionName, extension) => {
18
+ for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
19
+ if (extension[key]) {
20
+ const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _ => _.replace, 'call', _2 => _2(/([A-Z])+/g, (input) => input ? _optionalChain([input, 'access', _3 => _3[0], 'optionalAccess', _4 => _4.toUpperCase, 'call', _5 => _5()]) + input.slice(1) : ""), 'access', _6 => _6.split, 'call', _7 => _7(/(?=[A-Z])|[.\-\s_]/), 'access', _8 => _8.map, 'call', _9 => _9((x) => x.toLowerCase())]), () => ( []));
21
+ let extensionKey;
22
+ if (result.length === 0) {
23
+ return;
24
+ }
25
+ if (result.length === 1) {
26
+ extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _10 => _10[0], 'optionalAccess', _11 => _11.toUpperCase, 'call', _12 => _12()]), () => ( ""));
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__ */ _chunkXJEQHMOEjs.__name.call(void 0, (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`] = _chunkH6XXDZ7Ajs.correctPaths.call(void 0, config.configFile);
85
+ }
86
+ if (config.workspaceRoot) {
87
+ process.env[`${prefix}WORKSPACE_ROOT`] = _chunkH6XXDZ7Ajs.correctPaths.call(void 0, config.workspaceRoot);
88
+ process.env.NX_WORKSPACE_ROOT = _chunkH6XXDZ7Ajs.correctPaths.call(void 0, config.workspaceRoot);
89
+ process.env.NX_WORKSPACE_ROOT_PATH = _chunkH6XXDZ7Ajs.correctPaths.call(void 0, config.workspaceRoot);
90
+ }
91
+ if (config.directories) {
92
+ if (!config.skipCache && config.directories.cache) {
93
+ process.env[`${prefix}CACHE_DIR`] = _chunkH6XXDZ7Ajs.correctPaths.call(void 0, config.directories.cache);
94
+ }
95
+ if (config.directories.data) {
96
+ process.env[`${prefix}DATA_DIR`] = _chunkH6XXDZ7Ajs.correctPaths.call(void 0, config.directories.data);
97
+ }
98
+ if (config.directories.config) {
99
+ process.env[`${prefix}CONFIG_DIR`] = _chunkH6XXDZ7Ajs.correctPaths.call(void 0, config.directories.config);
100
+ }
101
+ if (config.directories.temp) {
102
+ process.env[`${prefix}TEMP_DIR`] = _chunkH6XXDZ7Ajs.correctPaths.call(void 0, config.directories.temp);
103
+ }
104
+ if (config.directories.log) {
105
+ process.env[`${prefix}LOG_DIR`] = _chunkH6XXDZ7Ajs.correctPaths.call(void 0, config.directories.log);
106
+ }
107
+ if (config.directories.build) {
108
+ process.env[`${prefix}BUILD_DIR`] = _chunkH6XXDZ7Ajs.correctPaths.call(void 0, 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 (_optionalChain([config, 'access', _13 => _13.colors, 'optionalAccess', _14 => _14.base, 'optionalAccess', _15 => _15.light]) || _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17.base, 'optionalAccess', _18 => _18.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(_chunkWXOSG64Cjs.getLogLevel.call(void 0, config.logLevel) >= _chunk6WPG3DXVjs.LogLevel.DEBUG ? true : false);
163
+ process.env.RUST_BACKTRACE = _chunkWXOSG64Cjs.getLogLevel.call(void 0, config.logLevel) >= _chunk6WPG3DXVjs.LogLevel.DEBUG ? "full" : "none";
164
+ }
165
+ process.env[`${prefix}CONFIG`] = JSON.stringify(config);
166
+ for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
167
+ config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
168
+ }
169
+ }, "setConfigEnv");
170
+ var setThemeColorConfigEnv = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (prefix, config) => {
171
+ return _optionalChain([config, 'optionalAccess', _19 => _19.light, 'optionalAccess', _20 => _20.brand]) || _optionalChain([config, 'optionalAccess', _21 => _21.dark, 'optionalAccess', _22 => _22.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
172
+ }, "setThemeColorConfigEnv");
173
+ var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (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__ */ _chunkXJEQHMOEjs.__name.call(void 0, (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__ */ _chunkXJEQHMOEjs.__name.call(void 0, (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
+
269
+
270
+
271
+ exports.setExtensionEnv = setExtensionEnv; exports.setConfigEnv = setConfigEnv;
@@ -0,0 +1,90 @@
1
+ import {
2
+ findWorkspaceRoot
3
+ } from "./chunk-TEKFJAJJ.mjs";
4
+ import {
5
+ STORM_DEFAULT_HOMEPAGE,
6
+ STORM_DEFAULT_LICENSE
7
+ } from "./chunk-RAWSXKTG.mjs";
8
+ import {
9
+ __name,
10
+ init_esm_shims
11
+ } from "./chunk-WRFJFYOU.mjs";
12
+
13
+ // src/utilities/get-default-config.ts
14
+ init_esm_shims();
15
+ import { existsSync, readFileSync } from "node:fs";
16
+ import { join } from "node:path";
17
+ var DEFAULT_COLOR_CONFIG = {
18
+ "light": {
19
+ "background": "#fafafa",
20
+ "foreground": "#1d1e22",
21
+ "brand": "#1fb2a6",
22
+ "alternate": "#db2777",
23
+ "help": "#5C4EE5",
24
+ "success": "#087f5b",
25
+ "info": "#0550ae",
26
+ "warning": "#e3b341",
27
+ "danger": "#D8314A",
28
+ "positive": "#22c55e",
29
+ "negative": "#dc2626"
30
+ },
31
+ "dark": {
32
+ "background": "#1d1e22",
33
+ "foreground": "#cbd5e1",
34
+ "brand": "#2dd4bf",
35
+ "alternate": "#db2777",
36
+ "help": "#818cf8",
37
+ "success": "#10b981",
38
+ "info": "#58a6ff",
39
+ "warning": "#f3d371",
40
+ "danger": "#D8314A",
41
+ "positive": "#22c55e",
42
+ "negative": "#dc2626"
43
+ }
44
+ };
45
+ var getDefaultConfig = /* @__PURE__ */ __name((root) => {
46
+ let license = STORM_DEFAULT_LICENSE;
47
+ let homepage = STORM_DEFAULT_HOMEPAGE;
48
+ let name;
49
+ let namespace;
50
+ let repository;
51
+ const workspaceRoot = findWorkspaceRoot(root);
52
+ if (existsSync(join(workspaceRoot, "package.json"))) {
53
+ const file = readFileSync(join(workspaceRoot, "package.json"), {
54
+ encoding: "utf8"
55
+ });
56
+ if (file) {
57
+ const packageJson = JSON.parse(file);
58
+ if (packageJson.name) {
59
+ name = packageJson.name;
60
+ }
61
+ if (packageJson.namespace) {
62
+ namespace = packageJson.namespace;
63
+ }
64
+ if (packageJson.repository?.url) {
65
+ repository = packageJson.repository?.url;
66
+ }
67
+ if (packageJson.license) {
68
+ license = packageJson.license;
69
+ }
70
+ if (packageJson.homepage) {
71
+ homepage = packageJson.homepage;
72
+ }
73
+ }
74
+ }
75
+ return {
76
+ workspaceRoot,
77
+ name,
78
+ namespace,
79
+ repository,
80
+ license,
81
+ homepage,
82
+ docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
83
+ licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`
84
+ };
85
+ }, "getDefaultConfig");
86
+
87
+ export {
88
+ DEFAULT_COLOR_CONFIG,
89
+ getDefaultConfig
90
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ var _chunkXJEQHMOEjs = require('./chunk-XJEQHMOE.js');
4
+
5
+ // src/config-file/index.ts
6
+ _chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
@@ -0,0 +1,6 @@
1
+ import {
2
+ init_esm_shims
3
+ } from "./chunk-WRFJFYOU.mjs";
4
+
5
+ // src/env/index.ts
6
+ init_esm_shims();
@@ -0,0 +1,189 @@
1
+ import {
2
+ init_esm_shims
3
+ } from "./chunk-WRFJFYOU.mjs";
4
+
5
+ // ../config/src/constants.ts
6
+ init_esm_shims();
7
+ var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
8
+ var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
9
+ var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
10
+ var STORM_DEFAULT_LICENSE = "Apache-2.0";
11
+
12
+ // ../config/src/schema.ts
13
+ init_esm_shims();
14
+ import z from "zod";
15
+ var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
16
+ var LightColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
17
+ var BrandColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary brand specific color of the workspace");
18
+ var AlternateColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The alternate brand specific color of the workspace");
19
+ var AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The secondary brand specific color of the workspace");
20
+ var LinkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The color used to display hyperlink text");
21
+ var HelpColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
22
+ var SuccessColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#12B66A").describe("The success color of the workspace");
23
+ var InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0070E0").describe("The informational color of the workspace");
24
+ var WarningColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
25
+ var DangerColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#D8314A").describe("The danger color of the workspace");
26
+ var FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The fatal color of the workspace");
27
+ var PositiveColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#4ade80").describe("The positive number color of the workspace");
28
+ var NegativeColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ef4444").describe("The negative number color of the workspace");
29
+ var DarkThemeColorConfigSchema = z.object({
30
+ foreground: LightColorSchema,
31
+ background: DarkColorSchema,
32
+ brand: BrandColorSchema,
33
+ alternate: AlternateColorSchema,
34
+ accent: AccentColorSchema,
35
+ link: LinkColorSchema,
36
+ help: HelpColorSchema,
37
+ success: SuccessColorSchema,
38
+ info: InfoColorSchema,
39
+ warning: WarningColorSchema,
40
+ danger: DangerColorSchema,
41
+ fatal: FatalColorSchema,
42
+ positive: PositiveColorSchema,
43
+ negative: NegativeColorSchema
44
+ });
45
+ var LightThemeColorConfigSchema = z.object({
46
+ foreground: DarkColorSchema,
47
+ background: LightColorSchema,
48
+ brand: BrandColorSchema,
49
+ alternate: AlternateColorSchema,
50
+ accent: AccentColorSchema,
51
+ link: LinkColorSchema,
52
+ help: HelpColorSchema,
53
+ success: SuccessColorSchema,
54
+ info: InfoColorSchema,
55
+ warning: WarningColorSchema,
56
+ danger: DangerColorSchema,
57
+ fatal: FatalColorSchema,
58
+ positive: PositiveColorSchema,
59
+ negative: NegativeColorSchema
60
+ });
61
+ var MultiThemeColorConfigSchema = z.object({
62
+ dark: DarkThemeColorConfigSchema,
63
+ light: LightThemeColorConfigSchema
64
+ });
65
+ var SingleThemeColorConfigSchema = z.object({
66
+ dark: DarkColorSchema,
67
+ light: LightColorSchema,
68
+ brand: BrandColorSchema,
69
+ alternate: AlternateColorSchema,
70
+ accent: AccentColorSchema,
71
+ link: LinkColorSchema,
72
+ help: HelpColorSchema,
73
+ success: SuccessColorSchema,
74
+ info: InfoColorSchema,
75
+ warning: WarningColorSchema,
76
+ danger: DangerColorSchema,
77
+ fatal: FatalColorSchema,
78
+ positive: PositiveColorSchema,
79
+ negative: NegativeColorSchema
80
+ });
81
+ var RegistryUrlConfigSchema = z.string().trim().toLowerCase().url().optional().describe("A remote registry URL used to publish distributable packages");
82
+ var RegistryConfigSchema = z.object({
83
+ github: RegistryUrlConfigSchema,
84
+ npm: RegistryUrlConfigSchema,
85
+ cargo: RegistryUrlConfigSchema,
86
+ cyclone: RegistryUrlConfigSchema,
87
+ container: RegistryUrlConfigSchema
88
+ }).default({}).describe("A list of remote registry URLs used by Storm Software");
89
+ var ColorConfigSchema = SingleThemeColorConfigSchema.or(MultiThemeColorConfigSchema).describe("Colors used for various workspace elements");
90
+ var ColorConfigMapSchema = z.union([
91
+ z.object({
92
+ "base": ColorConfigSchema
93
+ }),
94
+ z.record(z.string(), ColorConfigSchema)
95
+ ]);
96
+ var WorkspaceBotConfigSchema = z.object({
97
+ name: z.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
98
+ email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
99
+ }).describe("The workspace's bot user's config used to automated various operations tasks");
100
+ var WorkspaceDirectoryConfigSchema = z.object({
101
+ cache: z.string().trim().optional().describe("The directory used to store the environment's cached file data"),
102
+ data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
103
+ config: z.string().trim().optional().describe("The directory used to store the environment's configuration files"),
104
+ temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
105
+ log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
106
+ build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
107
+ }).describe("Various directories used by the workspace to store data, cache, and configuration files");
108
+ var StormConfigSchema = z.object({
109
+ $schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
110
+ extends: z.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
111
+ name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
112
+ namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
113
+ organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
114
+ repository: z.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
115
+ license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
116
+ homepage: z.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
117
+ docs: z.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
118
+ licensing: z.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
119
+ branch: z.string().trim().default("main").describe("The branch of the workspace"),
120
+ preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
121
+ owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
122
+ bot: WorkspaceBotConfigSchema,
123
+ env: z.enum([
124
+ "development",
125
+ "staging",
126
+ "production"
127
+ ]).default("production").describe("The current runtime environment name for the package"),
128
+ workspaceRoot: z.string().trim().default("").describe("The root directory of the workspace"),
129
+ externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
130
+ skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
131
+ directories: WorkspaceDirectoryConfigSchema,
132
+ packageManager: z.enum([
133
+ "npm",
134
+ "yarn",
135
+ "pnpm",
136
+ "bun"
137
+ ]).default("npm").describe("The JavaScript/TypeScript package manager used by the repository"),
138
+ timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
139
+ locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
140
+ logLevel: z.enum([
141
+ "silent",
142
+ "fatal",
143
+ "error",
144
+ "warn",
145
+ "info",
146
+ "debug",
147
+ "trace",
148
+ "all"
149
+ ]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
150
+ registry: RegistryConfigSchema,
151
+ configFile: z.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
152
+ colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
153
+ extensions: z.record(z.any()).optional().default({}).describe("Configuration of each used extension")
154
+ }).describe("Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo.");
155
+
156
+ // ../config/src/types.ts
157
+ init_esm_shims();
158
+ var COLOR_KEYS = [
159
+ "dark",
160
+ "light",
161
+ "base",
162
+ "brand",
163
+ "alternate",
164
+ "accent",
165
+ "link",
166
+ "success",
167
+ "help",
168
+ "info",
169
+ "warning",
170
+ "danger",
171
+ "fatal",
172
+ "positive",
173
+ "negative"
174
+ ];
175
+
176
+ // ../config/src/index.ts
177
+ init_esm_shims();
178
+
179
+ // ../config/src/define-config.ts
180
+ init_esm_shims();
181
+
182
+ export {
183
+ STORM_DEFAULT_DOCS,
184
+ STORM_DEFAULT_HOMEPAGE,
185
+ STORM_DEFAULT_LICENSING,
186
+ STORM_DEFAULT_LICENSE,
187
+ StormConfigSchema,
188
+ COLOR_KEYS
189
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ var _chunkXJEQHMOEjs = require('./chunk-XJEQHMOE.js');
4
+
5
+ // src/logger/index.ts
6
+ _chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
@@ -0,0 +1,70 @@
1
+ import {
2
+ findFolderUp
3
+ } from "./chunk-TTCXDK6S.mjs";
4
+ import {
5
+ correctPaths
6
+ } from "./chunk-GOQAHXJF.mjs";
7
+ import {
8
+ __name,
9
+ init_esm_shims
10
+ } from "./chunk-WRFJFYOU.mjs";
11
+
12
+ // src/utilities/find-workspace-root.ts
13
+ init_esm_shims();
14
+ var rootFiles = [
15
+ "storm.json",
16
+ "storm.json",
17
+ "storm.yaml",
18
+ "storm.yml",
19
+ "storm.js",
20
+ "storm.ts",
21
+ ".storm.json",
22
+ ".storm.yaml",
23
+ ".storm.yml",
24
+ ".storm.js",
25
+ ".storm.ts",
26
+ "lerna.json",
27
+ "nx.json",
28
+ "turbo.json",
29
+ "npm-workspace.json",
30
+ "yarn-workspace.json",
31
+ "pnpm-workspace.json",
32
+ "npm-workspace.yaml",
33
+ "yarn-workspace.yaml",
34
+ "pnpm-workspace.yaml",
35
+ "npm-workspace.yml",
36
+ "yarn-workspace.yml",
37
+ "pnpm-workspace.yml",
38
+ "npm-lock.json",
39
+ "yarn-lock.json",
40
+ "pnpm-lock.json",
41
+ "npm-lock.yaml",
42
+ "yarn-lock.yaml",
43
+ "pnpm-lock.yaml",
44
+ "npm-lock.yml",
45
+ "yarn-lock.yml",
46
+ "pnpm-lock.yml",
47
+ "bun.lockb"
48
+ ];
49
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
50
+ if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
51
+ return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
52
+ }
53
+ return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
54
+ }
55
+ __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
56
+ function findWorkspaceRoot(pathInsideMonorepo) {
57
+ const result = findWorkspaceRootSafe(pathInsideMonorepo);
58
+ if (!result) {
59
+ throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
60
+ ${rootFiles.join("\n")}
61
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
62
+ }
63
+ return result;
64
+ }
65
+ __name(findWorkspaceRoot, "findWorkspaceRoot");
66
+
67
+ export {
68
+ findWorkspaceRootSafe,
69
+ findWorkspaceRoot
70
+ };
@@ -0,0 +1,27 @@
1
+ import {
2
+ __name,
3
+ init_esm_shims
4
+ } from "./chunk-WRFJFYOU.mjs";
5
+
6
+ // src/utilities/find-up.ts
7
+ init_esm_shims();
8
+ import { existsSync } from "node:fs";
9
+ import { join } from "node:path";
10
+ var MAX_PATH_SEARCH_DEPTH = 30;
11
+ var depth = 0;
12
+ function findFolderUp(startPath, endFileNames) {
13
+ const _startPath = startPath ?? process.cwd();
14
+ if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
15
+ return _startPath;
16
+ }
17
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
18
+ const parent = join(_startPath, "..");
19
+ return findFolderUp(parent, endFileNames);
20
+ }
21
+ return void 0;
22
+ }
23
+ __name(findFolderUp, "findFolderUp");
24
+
25
+ export {
26
+ findFolderUp
27
+ };