@storm-software/config-tools 1.178.7 → 1.180.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/bin/config.cjs +48 -26
- package/bin/config.js +49 -27
- package/dist/{chunk-2LK4ZGLW.cjs → chunk-363CTBPH.cjs} +2 -2
- package/dist/{chunk-XA4G3MSV.cjs → chunk-72EOBSKW.cjs} +10 -10
- package/dist/{chunk-PQATN7O6.cjs → chunk-7AZCYZH3.cjs} +17 -17
- package/dist/{chunk-EK7IXIHA.js → chunk-7L77OWOV.js} +1 -1
- package/dist/{chunk-ZTCEXE7T.cjs → chunk-ADFY75XS.cjs} +3 -3
- package/dist/{chunk-2FH55GER.js → chunk-ATECARIE.js} +13 -12
- package/dist/{chunk-TTT5G3NU.js → chunk-BCAYP4JB.js} +1 -1
- package/dist/{chunk-UMSUK27E.js → chunk-C3ZWMMO4.js} +19 -10
- package/dist/{chunk-GJ7QM6FN.cjs → chunk-CRQ64CT5.cjs} +9 -9
- package/dist/{chunk-CO4ZADWX.cjs → chunk-D5MVYNCS.cjs} +19 -10
- package/dist/{chunk-3235YC2J.cjs → chunk-ESUPAI3Y.cjs} +9 -9
- package/dist/{chunk-X56PD6LB.js → chunk-FVKBGSDE.js} +1 -1
- package/dist/{chunk-TFYMXKIT.js → chunk-HMDBPXJC.js} +1 -1
- package/dist/{chunk-BTZVY4J2.js → chunk-L72FV3TP.js} +1 -1
- package/dist/{chunk-3TO7MEJT.js → chunk-LA3S35UI.js} +4 -4
- package/dist/{chunk-FBMPJNMM.js → chunk-LCK7XQJ3.js} +6 -6
- package/dist/{chunk-CLT4IIBS.cjs → chunk-LRSCRZFN.cjs} +13 -12
- package/dist/{chunk-YGJGYNZL.cjs → chunk-MKPH762O.cjs} +4 -4
- package/dist/{chunk-NYDB5GIZ.js → chunk-VDG3JG4I.js} +1 -1
- package/dist/{chunk-EDQ2BMIV.cjs → chunk-VWNMWYHQ.cjs} +3 -3
- package/dist/config-file/get-config-file.cjs +7 -7
- package/dist/config-file/get-config-file.js +6 -6
- package/dist/config-file/index.cjs +7 -7
- package/dist/config-file/index.js +6 -6
- package/dist/create-storm-config.cjs +10 -10
- package/dist/create-storm-config.js +9 -9
- package/dist/env/get-env.cjs +2 -2
- package/dist/env/get-env.js +1 -1
- package/dist/env/index.cjs +3 -3
- package/dist/env/index.js +2 -2
- package/dist/env/set-env.cjs +2 -2
- package/dist/env/set-env.js +1 -1
- package/dist/get-config.cjs +11 -11
- package/dist/get-config.js +10 -10
- package/dist/index.cjs +11 -11
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -12
- package/dist/logger/console.cjs +3 -3
- package/dist/logger/console.js +2 -2
- package/dist/logger/create-logger.cjs +4 -4
- package/dist/logger/create-logger.js +3 -3
- package/dist/logger/index.cjs +4 -4
- package/dist/logger/index.js +3 -3
- package/dist/utilities/colors.cjs +2 -2
- package/dist/utilities/colors.d.cts +4 -44
- package/dist/utilities/colors.d.ts +4 -44
- package/dist/utilities/colors.js +3 -3
- package/dist/utilities/get-default-config.d.cts +1 -1
- package/dist/utilities/get-default-config.d.ts +1 -1
- package/dist/utilities/index.cjs +6 -6
- package/dist/utilities/index.d.cts +1 -2
- package/dist/utilities/index.d.ts +1 -2
- package/dist/utilities/index.js +7 -7
- package/dist/utilities/process-handler.cjs +4 -4
- package/dist/utilities/process-handler.js +3 -3
- package/dist/utilities/toml.cjs +5 -5
- package/dist/utilities/toml.js +4 -4
- package/package.json +3 -3
|
@@ -36,7 +36,10 @@ var getConfigEnv = () => {
|
|
|
36
36
|
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
37
37
|
},
|
|
38
38
|
release: {
|
|
39
|
-
banner:
|
|
39
|
+
banner: {
|
|
40
|
+
url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
|
|
41
|
+
alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
|
|
42
|
+
},
|
|
40
43
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
41
44
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
42
45
|
},
|
|
@@ -113,11 +116,11 @@ var getConfigEnv = () => {
|
|
|
113
116
|
);
|
|
114
117
|
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
115
118
|
(ret, themeName) => {
|
|
116
|
-
ret[themeName] =
|
|
119
|
+
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
117
120
|
return ret;
|
|
118
121
|
},
|
|
119
122
|
{}
|
|
120
|
-
) :
|
|
123
|
+
) : getThemeColorsEnv(prefix);
|
|
121
124
|
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
122
125
|
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
123
126
|
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
@@ -144,11 +147,11 @@ var getConfigEnv = () => {
|
|
|
144
147
|
}
|
|
145
148
|
return config;
|
|
146
149
|
};
|
|
147
|
-
var
|
|
150
|
+
var getThemeColorsEnv = (prefix, theme) => {
|
|
148
151
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
149
|
-
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ?
|
|
152
|
+
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
|
|
150
153
|
};
|
|
151
|
-
var
|
|
154
|
+
var getSingleThemeColorsEnv = (prefix) => {
|
|
152
155
|
const gradient = [];
|
|
153
156
|
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
154
157
|
gradient.push(
|
|
@@ -180,15 +183,13 @@ var getSingleThemeColorConfigEnv = (prefix) => {
|
|
|
180
183
|
gradient
|
|
181
184
|
};
|
|
182
185
|
};
|
|
183
|
-
var
|
|
186
|
+
var getMultiThemeColorsEnv = (prefix) => {
|
|
184
187
|
return {
|
|
185
|
-
light:
|
|
186
|
-
|
|
187
|
-
),
|
|
188
|
-
dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
|
|
188
|
+
light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
|
|
189
|
+
dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
|
|
189
190
|
};
|
|
190
191
|
};
|
|
191
|
-
var
|
|
192
|
+
var getBaseThemeColorsEnv = (prefix) => {
|
|
192
193
|
const gradient = [];
|
|
193
194
|
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
194
195
|
gradient.push(
|
|
@@ -54,7 +54,16 @@ var setConfigEnv = (config) => {
|
|
|
54
54
|
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
55
55
|
}
|
|
56
56
|
if (config.release) {
|
|
57
|
-
|
|
57
|
+
if (config.release.banner) {
|
|
58
|
+
if (typeof config.release.banner === "string") {
|
|
59
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
60
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
|
|
61
|
+
} else {
|
|
62
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
|
|
63
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
|
|
64
|
+
process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
58
67
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
59
68
|
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
60
69
|
}
|
|
@@ -197,10 +206,10 @@ var setConfigEnv = (config) => {
|
|
|
197
206
|
}
|
|
198
207
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
199
208
|
for (const key of Object.keys(config.colors)) {
|
|
200
|
-
|
|
209
|
+
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
201
210
|
}
|
|
202
211
|
} else {
|
|
203
|
-
|
|
212
|
+
setThemeColorsEnv(
|
|
204
213
|
`${prefix}COLOR_`,
|
|
205
214
|
config.colors
|
|
206
215
|
);
|
|
@@ -255,10 +264,10 @@ var setConfigEnv = (config) => {
|
|
|
255
264
|
}
|
|
256
265
|
}
|
|
257
266
|
};
|
|
258
|
-
var
|
|
259
|
-
return config?.light?.brand || config?.dark?.brand ?
|
|
267
|
+
var setThemeColorsEnv = (prefix, config) => {
|
|
268
|
+
return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
|
|
260
269
|
};
|
|
261
|
-
var
|
|
270
|
+
var setSingleThemeColorsEnv = (prefix, config) => {
|
|
262
271
|
if (config.dark) {
|
|
263
272
|
process.env[`${prefix}DARK`] = config.dark;
|
|
264
273
|
}
|
|
@@ -307,13 +316,13 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
|
307
316
|
}
|
|
308
317
|
}
|
|
309
318
|
};
|
|
310
|
-
var
|
|
319
|
+
var setMultiThemeColorsEnv = (prefix, config) => {
|
|
311
320
|
return {
|
|
312
|
-
light:
|
|
313
|
-
dark:
|
|
321
|
+
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
|
|
322
|
+
dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
|
|
314
323
|
};
|
|
315
324
|
};
|
|
316
|
-
var
|
|
325
|
+
var setBaseThemeColorsEnv = (prefix, config) => {
|
|
317
326
|
if (config.foreground) {
|
|
318
327
|
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
319
328
|
}
|
|
@@ -3,31 +3,31 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk72EOBSKWcjs = require('./chunk-72EOBSKW.cjs');
|
|
7
7
|
|
|
8
8
|
// src/utilities/process-handler.ts
|
|
9
9
|
var exitWithError = (config) => {
|
|
10
|
-
|
|
10
|
+
_chunk72EOBSKWcjs.writeFatal.call(void 0, "Exiting script with an error status...", config);
|
|
11
11
|
process.exit(1);
|
|
12
12
|
};
|
|
13
13
|
var exitWithSuccess = (config) => {
|
|
14
|
-
|
|
14
|
+
_chunk72EOBSKWcjs.writeSuccess.call(void 0, "Script completed successfully. Exiting...", config);
|
|
15
15
|
process.exit(0);
|
|
16
16
|
};
|
|
17
17
|
var handleProcess = (config) => {
|
|
18
|
-
|
|
18
|
+
_chunk72EOBSKWcjs.writeTrace.call(void 0,
|
|
19
19
|
`Using the following arguments to process the script: ${process.argv.join(", ")}`,
|
|
20
20
|
config
|
|
21
21
|
);
|
|
22
22
|
process.on("unhandledRejection", (error) => {
|
|
23
|
-
|
|
23
|
+
_chunk72EOBSKWcjs.writeError.call(void 0,
|
|
24
24
|
`An Unhandled Rejection occurred while running the program: ${error}`,
|
|
25
25
|
config
|
|
26
26
|
);
|
|
27
27
|
exitWithError(config);
|
|
28
28
|
});
|
|
29
29
|
process.on("uncaughtException", (error) => {
|
|
30
|
-
|
|
30
|
+
_chunk72EOBSKWcjs.writeError.call(void 0,
|
|
31
31
|
`An Uncaught Exception occurred while running the program: ${error.message}
|
|
32
32
|
Stacktrace: ${error.stack}`,
|
|
33
33
|
config
|
|
@@ -35,15 +35,15 @@ Stacktrace: ${error.stack}`,
|
|
|
35
35
|
exitWithError(config);
|
|
36
36
|
});
|
|
37
37
|
process.on("SIGTERM", (signal) => {
|
|
38
|
-
|
|
38
|
+
_chunk72EOBSKWcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
39
39
|
exitWithError(config);
|
|
40
40
|
});
|
|
41
41
|
process.on("SIGINT", (signal) => {
|
|
42
|
-
|
|
42
|
+
_chunk72EOBSKWcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
43
43
|
exitWithError(config);
|
|
44
44
|
});
|
|
45
45
|
process.on("SIGHUP", (signal) => {
|
|
46
|
-
|
|
46
|
+
_chunk72EOBSKWcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
47
47
|
exitWithError(config);
|
|
48
48
|
});
|
|
49
49
|
};
|
|
@@ -54,7 +54,16 @@ var setConfigEnv = (config) => {
|
|
|
54
54
|
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
55
55
|
}
|
|
56
56
|
if (config.release) {
|
|
57
|
-
|
|
57
|
+
if (config.release.banner) {
|
|
58
|
+
if (typeof config.release.banner === "string") {
|
|
59
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
60
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
|
|
61
|
+
} else {
|
|
62
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
|
|
63
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
|
|
64
|
+
process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
58
67
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
59
68
|
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
60
69
|
}
|
|
@@ -197,10 +206,10 @@ var setConfigEnv = (config) => {
|
|
|
197
206
|
}
|
|
198
207
|
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])) {
|
|
199
208
|
for (const key of Object.keys(config.colors)) {
|
|
200
|
-
|
|
209
|
+
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
201
210
|
}
|
|
202
211
|
} else {
|
|
203
|
-
|
|
212
|
+
setThemeColorsEnv(
|
|
204
213
|
`${prefix}COLOR_`,
|
|
205
214
|
config.colors
|
|
206
215
|
);
|
|
@@ -255,10 +264,10 @@ var setConfigEnv = (config) => {
|
|
|
255
264
|
}
|
|
256
265
|
}
|
|
257
266
|
};
|
|
258
|
-
var
|
|
259
|
-
return _optionalChain([config, 'optionalAccess', _19 => _19.light, 'optionalAccess', _20 => _20.brand]) || _optionalChain([config, 'optionalAccess', _21 => _21.dark, 'optionalAccess', _22 => _22.brand]) ?
|
|
267
|
+
var setThemeColorsEnv = (prefix, config) => {
|
|
268
|
+
return _optionalChain([config, 'optionalAccess', _19 => _19.light, 'optionalAccess', _20 => _20.brand]) || _optionalChain([config, 'optionalAccess', _21 => _21.dark, 'optionalAccess', _22 => _22.brand]) ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
|
|
260
269
|
};
|
|
261
|
-
var
|
|
270
|
+
var setSingleThemeColorsEnv = (prefix, config) => {
|
|
262
271
|
if (config.dark) {
|
|
263
272
|
process.env[`${prefix}DARK`] = config.dark;
|
|
264
273
|
}
|
|
@@ -307,13 +316,13 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
|
307
316
|
}
|
|
308
317
|
}
|
|
309
318
|
};
|
|
310
|
-
var
|
|
319
|
+
var setMultiThemeColorsEnv = (prefix, config) => {
|
|
311
320
|
return {
|
|
312
|
-
light:
|
|
313
|
-
dark:
|
|
321
|
+
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
|
|
322
|
+
dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
|
|
314
323
|
};
|
|
315
324
|
};
|
|
316
|
-
var
|
|
325
|
+
var setBaseThemeColorsEnv = (prefix, config) => {
|
|
317
326
|
if (config.foreground) {
|
|
318
327
|
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
319
328
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk72EOBSKWcjs = require('./chunk-72EOBSKW.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
@@ -9,13 +9,13 @@ var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
|
9
9
|
// src/logger/create-logger.ts
|
|
10
10
|
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
11
11
|
async function createLogger(config) {
|
|
12
|
-
const writeFatal =
|
|
13
|
-
const writeError =
|
|
14
|
-
const writeWarning =
|
|
15
|
-
const writeInfo =
|
|
16
|
-
const writeSuccess =
|
|
17
|
-
const writeDebug =
|
|
18
|
-
const writeTrace =
|
|
12
|
+
const writeFatal = _chunk72EOBSKWcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.FATAL, config, _chalk2.default);
|
|
13
|
+
const writeError = _chunk72EOBSKWcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.ERROR, config, _chalk2.default);
|
|
14
|
+
const writeWarning = _chunk72EOBSKWcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.WARN, config, _chalk2.default);
|
|
15
|
+
const writeInfo = _chunk72EOBSKWcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.INFO, config, _chalk2.default);
|
|
16
|
+
const writeSuccess = _chunk72EOBSKWcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.SUCCESS, config, _chalk2.default);
|
|
17
|
+
const writeDebug = _chunk72EOBSKWcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.DEBUG, config, _chalk2.default);
|
|
18
|
+
const writeTrace = _chunk72EOBSKWcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.DEBUG, config, _chalk2.default);
|
|
19
19
|
return {
|
|
20
20
|
fatal: writeFatal,
|
|
21
21
|
error: writeError,
|
|
@@ -24,7 +24,7 @@ async function createLogger(config) {
|
|
|
24
24
|
success: writeSuccess,
|
|
25
25
|
debug: writeDebug,
|
|
26
26
|
trace: writeTrace,
|
|
27
|
-
getStopwatch:
|
|
27
|
+
getStopwatch: _chunk72EOBSKWcjs.getStopwatch
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -33,7 +33,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
33
33
|
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
function
|
|
36
|
+
function getColors(config) {
|
|
37
37
|
if (!config?.colors || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !config.colors["base"]?.["dark"])) {
|
|
38
38
|
return DEFAULT_COLOR_CONFIG;
|
|
39
39
|
}
|
|
@@ -50,7 +50,7 @@ function getColorConfig(config) {
|
|
|
50
50
|
return config.colors ?? DEFAULT_COLOR_CONFIG;
|
|
51
51
|
}
|
|
52
52
|
function getColor(key, config) {
|
|
53
|
-
const colors =
|
|
53
|
+
const colors = getColors(config);
|
|
54
54
|
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
|
|
55
55
|
if (result) {
|
|
56
56
|
return result;
|
|
@@ -63,7 +63,7 @@ function getColor(key, config) {
|
|
|
63
63
|
return getColor("brand", config);
|
|
64
64
|
}
|
|
65
65
|
function getGradient(config) {
|
|
66
|
-
const colors =
|
|
66
|
+
const colors = getColors(config);
|
|
67
67
|
const result = (typeof colors["dark"] === "object" ? colors["dark"].gradient : colors.gradient) || DEFAULT_COLOR_CONFIG["dark"].gradient;
|
|
68
68
|
if (result && Array.isArray(result) && result.length > 0) {
|
|
69
69
|
return result;
|
|
@@ -73,7 +73,7 @@ function getGradient(config) {
|
|
|
73
73
|
|
|
74
74
|
export {
|
|
75
75
|
DEFAULT_COLOR_CONFIG,
|
|
76
|
-
|
|
76
|
+
getColors,
|
|
77
77
|
getColor,
|
|
78
78
|
getGradient
|
|
79
79
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VDG3JG4I.js";
|
|
4
4
|
import {
|
|
5
5
|
applyDefaultConfig,
|
|
6
6
|
getPackageJsonConfig
|
|
@@ -12,17 +12,17 @@ import {
|
|
|
12
12
|
formatLogMessage,
|
|
13
13
|
writeTrace,
|
|
14
14
|
writeWarning
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7L77OWOV.js";
|
|
16
16
|
import {
|
|
17
17
|
setConfigEnv
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-C3ZWMMO4.js";
|
|
19
19
|
import {
|
|
20
20
|
getConfigEnv,
|
|
21
21
|
getExtensionEnv
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ATECARIE.js";
|
|
23
23
|
|
|
24
24
|
// src/create-storm-config.ts
|
|
25
|
-
import {
|
|
25
|
+
import { workspaceConfigSchema } from "@storm-software/config/schema";
|
|
26
26
|
import defu from "defu";
|
|
27
27
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
28
28
|
var _static_cache = void 0;
|
|
@@ -54,7 +54,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
54
54
|
);
|
|
55
55
|
try {
|
|
56
56
|
result = applyDefaultConfig(
|
|
57
|
-
await
|
|
57
|
+
await workspaceConfigSchema.parseAsync(configInput)
|
|
58
58
|
);
|
|
59
59
|
result.workspaceRoot ??= _workspaceRoot;
|
|
60
60
|
} catch (error) {
|
|
@@ -36,7 +36,10 @@ var getConfigEnv = () => {
|
|
|
36
36
|
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
37
37
|
},
|
|
38
38
|
release: {
|
|
39
|
-
banner:
|
|
39
|
+
banner: {
|
|
40
|
+
url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
|
|
41
|
+
alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
|
|
42
|
+
},
|
|
40
43
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
41
44
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
42
45
|
},
|
|
@@ -113,11 +116,11 @@ var getConfigEnv = () => {
|
|
|
113
116
|
);
|
|
114
117
|
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
115
118
|
(ret, themeName) => {
|
|
116
|
-
ret[themeName] =
|
|
119
|
+
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
117
120
|
return ret;
|
|
118
121
|
},
|
|
119
122
|
{}
|
|
120
|
-
) :
|
|
123
|
+
) : getThemeColorsEnv(prefix);
|
|
121
124
|
if (config.docs === _config.STORM_DEFAULT_DOCS) {
|
|
122
125
|
if (config.homepage === _config.STORM_DEFAULT_HOMEPAGE) {
|
|
123
126
|
config.docs = `${_config.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
@@ -144,11 +147,11 @@ var getConfigEnv = () => {
|
|
|
144
147
|
}
|
|
145
148
|
return config;
|
|
146
149
|
};
|
|
147
|
-
var
|
|
150
|
+
var getThemeColorsEnv = (prefix, theme) => {
|
|
148
151
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
149
|
-
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ?
|
|
152
|
+
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
|
|
150
153
|
};
|
|
151
|
-
var
|
|
154
|
+
var getSingleThemeColorsEnv = (prefix) => {
|
|
152
155
|
const gradient = [];
|
|
153
156
|
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
154
157
|
gradient.push(
|
|
@@ -180,15 +183,13 @@ var getSingleThemeColorConfigEnv = (prefix) => {
|
|
|
180
183
|
gradient
|
|
181
184
|
};
|
|
182
185
|
};
|
|
183
|
-
var
|
|
186
|
+
var getMultiThemeColorsEnv = (prefix) => {
|
|
184
187
|
return {
|
|
185
|
-
light:
|
|
186
|
-
|
|
187
|
-
),
|
|
188
|
-
dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
|
|
188
|
+
light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
|
|
189
|
+
dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
|
|
189
190
|
};
|
|
190
191
|
};
|
|
191
|
-
var
|
|
192
|
+
var getBaseThemeColorsEnv = (prefix) => {
|
|
192
193
|
const gradient = [];
|
|
193
194
|
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
194
195
|
gradient.push(
|
|
@@ -33,7 +33,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
33
33
|
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
function
|
|
36
|
+
function getColors(config) {
|
|
37
37
|
if (!_optionalChain([config, 'optionalAccess', _ => _.colors]) || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !_optionalChain([config, 'access', _2 => _2.colors, 'access', _3 => _3["base"], 'optionalAccess', _4 => _4["dark"]]))) {
|
|
38
38
|
return DEFAULT_COLOR_CONFIG;
|
|
39
39
|
}
|
|
@@ -50,7 +50,7 @@ function getColorConfig(config) {
|
|
|
50
50
|
return _nullishCoalesce(config.colors, () => ( DEFAULT_COLOR_CONFIG));
|
|
51
51
|
}
|
|
52
52
|
function getColor(key, config) {
|
|
53
|
-
const colors =
|
|
53
|
+
const colors = getColors(config);
|
|
54
54
|
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
|
|
55
55
|
if (result) {
|
|
56
56
|
return result;
|
|
@@ -63,7 +63,7 @@ function getColor(key, config) {
|
|
|
63
63
|
return getColor("brand", config);
|
|
64
64
|
}
|
|
65
65
|
function getGradient(config) {
|
|
66
|
-
const colors =
|
|
66
|
+
const colors = getColors(config);
|
|
67
67
|
const result = (typeof colors["dark"] === "object" ? colors["dark"].gradient : colors.gradient) || DEFAULT_COLOR_CONFIG["dark"].gradient;
|
|
68
68
|
if (result && Array.isArray(result) && result.length > 0) {
|
|
69
69
|
return result;
|
|
@@ -76,4 +76,4 @@ function getGradient(config) {
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
exports.DEFAULT_COLOR_CONFIG = DEFAULT_COLOR_CONFIG; exports.
|
|
79
|
+
exports.DEFAULT_COLOR_CONFIG = DEFAULT_COLOR_CONFIG; exports.getColors = getColors; exports.getColor = getColor; exports.getGradient = getGradient;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk7AZCYZH3cjs = require('./chunk-7AZCYZH3.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkNOTWBXXMcjs = require('./chunk-NOTWBXXM.cjs');
|
|
8
8
|
|
|
9
9
|
// src/get-config.ts
|
|
10
10
|
var getConfig = (workspaceRoot, skipLogs = false) => {
|
|
11
|
-
return
|
|
11
|
+
return _chunk7AZCYZH3cjs.loadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs);
|
|
12
12
|
};
|
|
13
13
|
var getWorkspaceConfig = (skipLogs = true, options = {}) => {
|
|
14
14
|
let workspaceRoot = options.workspaceRoot;
|
|
@@ -23,7 +23,7 @@ var tryGetWorkspaceConfig = async (skipLogs = true, options = {}) => {
|
|
|
23
23
|
if (!workspaceRoot) {
|
|
24
24
|
workspaceRoot = _chunkNOTWBXXMcjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return _chunk7AZCYZH3cjs.tryLoadStormWorkspaceConfig.call(void 0,
|
|
27
27
|
workspaceRoot,
|
|
28
28
|
skipLogs,
|
|
29
29
|
options.useDefault
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkADFY75XScjs = require('../chunk-ADFY75XS.cjs');
|
|
5
5
|
require('../chunk-3COHMHPU.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-CRQ64CT5.cjs');
|
|
7
7
|
require('../chunk-DQT6QJRQ.cjs');
|
|
8
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-363CTBPH.cjs');
|
|
9
9
|
require('../chunk-J7BFGUIX.cjs');
|
|
10
10
|
require('../chunk-JMI7BRL7.cjs');
|
|
11
11
|
require('../chunk-MBEJXPRQ.cjs');
|
|
12
12
|
require('../chunk-NOTWBXXM.cjs');
|
|
13
13
|
require('../chunk-N3UX6L7X.cjs');
|
|
14
14
|
require('../chunk-7PV6L7I7.cjs');
|
|
15
|
-
require('../chunk-
|
|
16
|
-
require('../chunk-
|
|
17
|
-
require('../chunk-
|
|
15
|
+
require('../chunk-ESUPAI3Y.cjs');
|
|
16
|
+
require('../chunk-72EOBSKW.cjs');
|
|
17
|
+
require('../chunk-MKPH762O.cjs');
|
|
18
18
|
require('../chunk-LOY6ICHZ.cjs');
|
|
19
19
|
require('../chunk-WBQ4VS7E.cjs');
|
|
20
20
|
require('../chunk-DTGT4OI3.cjs');
|
|
@@ -25,4 +25,4 @@ require('../chunk-IRCFHYKZ.cjs');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.getConfigFile =
|
|
28
|
+
exports.getConfigFile = _chunkADFY75XScjs.getConfigFile; exports.getConfigFileByName = _chunkADFY75XScjs.getConfigFileByName;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfigFile,
|
|
3
3
|
getConfigFileByName
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-VDG3JG4I.js";
|
|
5
5
|
import "../chunk-UKGRDKIH.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-FVKBGSDE.js";
|
|
7
7
|
import "../chunk-6RVIJKY3.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-L72FV3TP.js";
|
|
9
9
|
import "../chunk-ZVT775K3.js";
|
|
10
10
|
import "../chunk-WYQYWPLE.js";
|
|
11
11
|
import "../chunk-5BZL5JNY.js";
|
|
12
12
|
import "../chunk-SZXSPLS6.js";
|
|
13
13
|
import "../chunk-6JBGUE4A.js";
|
|
14
14
|
import "../chunk-RRKB32OH.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-BCAYP4JB.js";
|
|
16
|
+
import "../chunk-7L77OWOV.js";
|
|
17
|
+
import "../chunk-LA3S35UI.js";
|
|
18
18
|
import "../chunk-HVVJHTFS.js";
|
|
19
19
|
import "../chunk-LM2UMGYA.js";
|
|
20
20
|
import "../chunk-G2MK47WL.js";
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkADFY75XScjs = require('../chunk-ADFY75XS.cjs');
|
|
6
6
|
require('../chunk-3COHMHPU.cjs');
|
|
7
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-CRQ64CT5.cjs');
|
|
8
8
|
require('../chunk-DQT6QJRQ.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-363CTBPH.cjs');
|
|
10
10
|
require('../chunk-J7BFGUIX.cjs');
|
|
11
11
|
require('../chunk-JMI7BRL7.cjs');
|
|
12
12
|
require('../chunk-MBEJXPRQ.cjs');
|
|
13
13
|
require('../chunk-NOTWBXXM.cjs');
|
|
14
14
|
require('../chunk-N3UX6L7X.cjs');
|
|
15
15
|
require('../chunk-7PV6L7I7.cjs');
|
|
16
|
-
require('../chunk-
|
|
17
|
-
require('../chunk-
|
|
18
|
-
require('../chunk-
|
|
16
|
+
require('../chunk-ESUPAI3Y.cjs');
|
|
17
|
+
require('../chunk-72EOBSKW.cjs');
|
|
18
|
+
require('../chunk-MKPH762O.cjs');
|
|
19
19
|
require('../chunk-LOY6ICHZ.cjs');
|
|
20
20
|
require('../chunk-WBQ4VS7E.cjs');
|
|
21
21
|
require('../chunk-DTGT4OI3.cjs');
|
|
@@ -26,4 +26,4 @@ require('../chunk-IRCFHYKZ.cjs');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
exports.getConfigFile =
|
|
29
|
+
exports.getConfigFile = _chunkADFY75XScjs.getConfigFile; exports.getConfigFileByName = _chunkADFY75XScjs.getConfigFileByName;
|
|
@@ -2,20 +2,20 @@ import "../chunk-2AVLCXLT.js";
|
|
|
2
2
|
import {
|
|
3
3
|
getConfigFile,
|
|
4
4
|
getConfigFileByName
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-VDG3JG4I.js";
|
|
6
6
|
import "../chunk-UKGRDKIH.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-FVKBGSDE.js";
|
|
8
8
|
import "../chunk-6RVIJKY3.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-L72FV3TP.js";
|
|
10
10
|
import "../chunk-ZVT775K3.js";
|
|
11
11
|
import "../chunk-WYQYWPLE.js";
|
|
12
12
|
import "../chunk-5BZL5JNY.js";
|
|
13
13
|
import "../chunk-SZXSPLS6.js";
|
|
14
14
|
import "../chunk-6JBGUE4A.js";
|
|
15
15
|
import "../chunk-RRKB32OH.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-BCAYP4JB.js";
|
|
17
|
+
import "../chunk-7L77OWOV.js";
|
|
18
|
+
import "../chunk-LA3S35UI.js";
|
|
19
19
|
import "../chunk-HVVJHTFS.js";
|
|
20
20
|
import "../chunk-LM2UMGYA.js";
|
|
21
21
|
import "../chunk-G2MK47WL.js";
|