@storm-software/config-tools 1.169.8 → 1.170.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 +1 -1
- package/bin/config.cjs +50 -11
- package/bin/config.js +56 -17
- package/dist/{chunk-WITKEKZ5.js → chunk-26BPJW3I.js} +12 -9
- package/dist/{chunk-J2LCTMCI.cjs → chunk-26LV7S6Z.cjs} +9 -9
- package/dist/{chunk-BJ2W75ZO.cjs → chunk-2CVNUZFW.cjs} +22 -19
- package/dist/{chunk-XBNXWUW3.cjs → chunk-2IEYYP2I.cjs} +2 -2
- package/dist/{chunk-JX5NLB4S.js → chunk-4KZ3BMNG.js} +44 -10
- package/dist/{chunk-GIXUQACB.cjs → chunk-4PAEA5KV.cjs} +44 -10
- package/dist/chunk-4VJPNKRP.cjs +40 -0
- package/dist/{chunk-H425P7G5.cjs → chunk-5XVUNKW6.cjs} +5 -2
- package/dist/{chunk-56NGBR4S.cjs → chunk-6LO4SCE6.cjs} +1 -0
- package/dist/{chunk-BAWQ37NK.js → chunk-6YK3KZIF.js} +1 -1
- package/dist/{chunk-FCWF3I34.cjs → chunk-7BVMJTE2.cjs} +9 -9
- package/dist/{chunk-QDJMKPQQ.js → chunk-7OSBTSCE.js} +1 -1
- package/dist/{chunk-RSKVXFI5.js → chunk-BKQBZMGO.js} +4 -3
- package/dist/{chunk-7HCUD67D.cjs → chunk-BMDGKEGP.cjs} +3 -3
- package/dist/{chunk-7SIKKF62.cjs → chunk-DX767CQS.cjs} +2 -2
- package/dist/chunk-E5XT5FVB.cjs +193 -0
- package/dist/chunk-F7MZXFL2.cjs +334 -0
- package/dist/{chunk-PORZT4W3.js → chunk-FRM3M54F.js} +1 -1
- package/dist/chunk-JRKB77S5.js +47 -0
- package/dist/{chunk-H2GU4JMJ.cjs → chunk-KX7CIRN3.cjs} +3 -3
- package/dist/chunk-MN6CU3TR.js +138 -0
- package/dist/chunk-MNLUPWAB.cjs +158 -0
- package/dist/chunk-NUOCEMFW.js +40 -0
- package/dist/chunk-OD7DEEL5.cjs +55 -0
- package/dist/{chunk-QJUAU656.js → chunk-OUYYXBZX.js} +1 -1
- package/dist/chunk-QWVC3UD5.cjs +40 -0
- package/dist/chunk-RJVVMUQK.cjs +138 -0
- package/dist/{chunk-ELNIDXR5.js → chunk-STYJJA3M.js} +1 -1
- package/dist/{chunk-XS7LVKAI.js → chunk-TCSDVRRN.js} +6 -3
- package/dist/chunk-TGDG6POD.cjs +47 -0
- package/dist/chunk-TRI5HQQN.js +334 -0
- package/dist/chunk-U74E4EM6.js +55 -0
- package/dist/chunk-UPV2R6VP.cjs +92 -0
- package/dist/{chunk-XO6ICAFH.js → chunk-VSPBZRTR.js} +1 -1
- package/dist/chunk-WT2BVWII.js +40 -0
- package/dist/chunk-XT2XO7TR.js +92 -0
- package/dist/chunk-YPBNOKK2.js +158 -0
- package/dist/chunk-Z3RQ7QQH.js +193 -0
- 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 +13 -11
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -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/get-default-config.cjs +4 -2
- package/dist/utilities/get-default-config.d.cts +9 -4
- package/dist/utilities/get-default-config.d.ts +9 -4
- package/dist/utilities/get-default-config.js +5 -3
- package/dist/utilities/index.cjs +8 -6
- package/dist/utilities/index.d.cts +1 -1
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +9 -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 +2 -2
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getChalk
|
|
3
|
+
} from "./chunk-T3MUE32G.js";
|
|
4
|
+
import {
|
|
5
|
+
CONSOLE_ICONS
|
|
6
|
+
} from "./chunk-OJP4XIBV.js";
|
|
7
|
+
import {
|
|
8
|
+
formatTimestamp
|
|
9
|
+
} from "./chunk-XEZGYUS2.js";
|
|
10
|
+
import {
|
|
11
|
+
DEFAULT_COLOR_CONFIG
|
|
12
|
+
} from "./chunk-4KZ3BMNG.js";
|
|
13
|
+
import {
|
|
14
|
+
getLogLevel
|
|
15
|
+
} from "./chunk-4XRV4CVP.js";
|
|
16
|
+
import {
|
|
17
|
+
LogLevel,
|
|
18
|
+
LogLevelLabel
|
|
19
|
+
} from "./chunk-3QAWRU2B.js";
|
|
20
|
+
|
|
21
|
+
// src/logger/console.ts
|
|
22
|
+
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
23
|
+
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
24
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
25
|
+
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
26
|
+
return (_) => {
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
30
|
+
return (message) => {
|
|
31
|
+
console.error(
|
|
32
|
+
`
|
|
33
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
34
|
+
`
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
|
|
39
|
+
return (message) => {
|
|
40
|
+
console.error(
|
|
41
|
+
`
|
|
42
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
43
|
+
`
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
|
|
48
|
+
return (message) => {
|
|
49
|
+
console.warn(
|
|
50
|
+
`
|
|
51
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
52
|
+
`
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
|
|
57
|
+
return (message) => {
|
|
58
|
+
console.info(
|
|
59
|
+
`
|
|
60
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
61
|
+
`
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
|
|
66
|
+
return (message) => {
|
|
67
|
+
console.info(
|
|
68
|
+
`
|
|
69
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
70
|
+
`
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
|
|
75
|
+
return (message) => {
|
|
76
|
+
console.debug(
|
|
77
|
+
`
|
|
78
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
79
|
+
`
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
|
|
84
|
+
return (message) => {
|
|
85
|
+
console.debug(
|
|
86
|
+
`
|
|
87
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
88
|
+
`
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
return (message) => {
|
|
93
|
+
console.log(
|
|
94
|
+
`
|
|
95
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
96
|
+
`
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
var writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
|
|
101
|
+
var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
|
|
102
|
+
var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
|
|
103
|
+
var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
104
|
+
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
105
|
+
var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
|
|
106
|
+
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
107
|
+
var writeSystem = (message, config) => getLogFn(LogLevel.ALL, config)(message);
|
|
108
|
+
var getStopwatch = (name) => {
|
|
109
|
+
const start = process.hrtime();
|
|
110
|
+
return () => {
|
|
111
|
+
const end = process.hrtime(start);
|
|
112
|
+
console.info(
|
|
113
|
+
`
|
|
114
|
+
> \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
115
|
+
end[0] * 1e3 + end[1] / 1e6
|
|
116
|
+
)}ms to complete
|
|
117
|
+
`
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
var MAX_DEPTH = 4;
|
|
122
|
+
var formatLogMessage = (message, options = {}, depth = 0) => {
|
|
123
|
+
if (depth > MAX_DEPTH) {
|
|
124
|
+
return "<max depth>";
|
|
125
|
+
}
|
|
126
|
+
const prefix = options.prefix ?? "-";
|
|
127
|
+
const skip = options.skip ?? [];
|
|
128
|
+
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
|
|
129
|
+
${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth + 1)}`).join("\n")}` : typeof message === "object" ? `
|
|
130
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
131
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(
|
|
132
|
+
message[key],
|
|
133
|
+
{ prefix: `${prefix}-`, skip },
|
|
134
|
+
depth + 1
|
|
135
|
+
) : message[key]}`
|
|
136
|
+
).join("\n")}` : message;
|
|
137
|
+
};
|
|
138
|
+
var _isFunction = (value) => {
|
|
139
|
+
try {
|
|
140
|
+
return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
|
|
141
|
+
} catch (e) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export {
|
|
147
|
+
getLogFn,
|
|
148
|
+
writeFatal,
|
|
149
|
+
writeError,
|
|
150
|
+
writeWarning,
|
|
151
|
+
writeInfo,
|
|
152
|
+
writeSuccess,
|
|
153
|
+
writeDebug,
|
|
154
|
+
writeTrace,
|
|
155
|
+
writeSystem,
|
|
156
|
+
getStopwatch,
|
|
157
|
+
formatLogMessage
|
|
158
|
+
};
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import {
|
|
2
|
+
correctPaths
|
|
3
|
+
} from "./chunk-FRR2ZRWD.js";
|
|
4
|
+
import {
|
|
5
|
+
getLogLevelLabel
|
|
6
|
+
} from "./chunk-4XRV4CVP.js";
|
|
7
|
+
|
|
8
|
+
// src/env/get-env.ts
|
|
9
|
+
import {
|
|
10
|
+
COLOR_KEYS,
|
|
11
|
+
STORM_DEFAULT_DOCS,
|
|
12
|
+
STORM_DEFAULT_HOMEPAGE,
|
|
13
|
+
STORM_DEFAULT_LICENSING
|
|
14
|
+
} from "@storm-software/config";
|
|
15
|
+
var getExtensionEnv = (extensionName) => {
|
|
16
|
+
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
17
|
+
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
18
|
+
const name = key.replace(prefix, "").split("_").map(
|
|
19
|
+
(i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
|
|
20
|
+
).join("");
|
|
21
|
+
if (name) {
|
|
22
|
+
ret[name] = process.env[key];
|
|
23
|
+
}
|
|
24
|
+
return ret;
|
|
25
|
+
}, {});
|
|
26
|
+
};
|
|
27
|
+
var getConfigEnv = () => {
|
|
28
|
+
const prefix = "STORM_";
|
|
29
|
+
let config = {
|
|
30
|
+
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
31
|
+
name: process.env[`${prefix}NAME`] || void 0,
|
|
32
|
+
namespace: process.env[`${prefix}NAMESPACE`] || void 0,
|
|
33
|
+
owner: process.env[`${prefix}OWNER`] || void 0,
|
|
34
|
+
bot: {
|
|
35
|
+
name: process.env[`${prefix}BOT_NAME`] || void 0,
|
|
36
|
+
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
37
|
+
},
|
|
38
|
+
release: {
|
|
39
|
+
banner: process.env[`${prefix}RELEASE_BANNER`] || void 0,
|
|
40
|
+
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
41
|
+
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
42
|
+
},
|
|
43
|
+
error: {
|
|
44
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
45
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
46
|
+
},
|
|
47
|
+
account: {
|
|
48
|
+
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
49
|
+
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
50
|
+
telegram: process.env[`${prefix}ACCOUNT_TELEGRAM`] || void 0,
|
|
51
|
+
slack: process.env[`${prefix}ACCOUNT_SLACK`] || void 0,
|
|
52
|
+
medium: process.env[`${prefix}ACCOUNT_MEDIUM`] || void 0,
|
|
53
|
+
github: process.env[`${prefix}ACCOUNT_GITHUB`] || void 0
|
|
54
|
+
},
|
|
55
|
+
organization: process.env[`${prefix}ORGANIZATION`] || void 0,
|
|
56
|
+
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
57
|
+
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
58
|
+
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
59
|
+
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
60
|
+
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
61
|
+
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
62
|
+
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
63
|
+
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
64
|
+
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
65
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
66
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
67
|
+
directories: {
|
|
68
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
69
|
+
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
70
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
71
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
72
|
+
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
73
|
+
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
74
|
+
},
|
|
75
|
+
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
76
|
+
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
77
|
+
// ci:
|
|
78
|
+
// process.env[`${prefix}CI`] !== undefined
|
|
79
|
+
// ? Boolean(
|
|
80
|
+
// process.env[`${prefix}CI`] ??
|
|
81
|
+
// process.env.CI ??
|
|
82
|
+
// process.env.CONTINUOUS_INTEGRATION
|
|
83
|
+
// )
|
|
84
|
+
// : undefined,
|
|
85
|
+
repository: process.env[`${prefix}REPOSITORY`] || void 0,
|
|
86
|
+
branch: process.env[`${prefix}BRANCH`] || void 0,
|
|
87
|
+
preid: process.env[`${prefix}PRE_ID`] || void 0,
|
|
88
|
+
externalPackagePatterns: process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] ? JSON.parse(process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`]) : [],
|
|
89
|
+
registry: {
|
|
90
|
+
github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
|
|
91
|
+
npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
|
|
92
|
+
cargo: process.env[`${prefix}REGISTRY_CARGO`] || void 0,
|
|
93
|
+
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
94
|
+
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
95
|
+
},
|
|
96
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
97
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
98
|
+
) ? getLogLevelLabel(
|
|
99
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
100
|
+
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
101
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
102
|
+
};
|
|
103
|
+
const themeNames = Object.keys(process.env).filter(
|
|
104
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
|
|
105
|
+
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
106
|
+
)
|
|
107
|
+
);
|
|
108
|
+
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
109
|
+
(ret, themeName) => {
|
|
110
|
+
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
111
|
+
return ret;
|
|
112
|
+
},
|
|
113
|
+
{}
|
|
114
|
+
) : getThemeColorConfigEnv(prefix);
|
|
115
|
+
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
116
|
+
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
117
|
+
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
118
|
+
} else {
|
|
119
|
+
config.docs = `${config.homepage}/docs`;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (config.licensing === STORM_DEFAULT_LICENSING) {
|
|
123
|
+
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
124
|
+
config.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
125
|
+
} else {
|
|
126
|
+
config.licensing = `${config.homepage}/docs`;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
130
|
+
if (serializedConfig) {
|
|
131
|
+
const parsed = JSON.parse(serializedConfig);
|
|
132
|
+
config = {
|
|
133
|
+
...config,
|
|
134
|
+
...parsed,
|
|
135
|
+
colors: { ...config.colors, ...parsed.colors },
|
|
136
|
+
extensions: { ...config.extensions, ...parsed.extensions }
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
return config;
|
|
140
|
+
};
|
|
141
|
+
var getThemeColorConfigEnv = (prefix, theme) => {
|
|
142
|
+
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
143
|
+
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
|
|
144
|
+
};
|
|
145
|
+
var getSingleThemeColorConfigEnv = (prefix) => {
|
|
146
|
+
return {
|
|
147
|
+
dark: process.env[`${prefix}DARK`],
|
|
148
|
+
light: process.env[`${prefix}LIGHT`],
|
|
149
|
+
brand: process.env[`${prefix}BRAND`],
|
|
150
|
+
alternate: process.env[`${prefix}ALTERNATE`],
|
|
151
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
152
|
+
link: process.env[`${prefix}LINK`],
|
|
153
|
+
help: process.env[`${prefix}HELP`],
|
|
154
|
+
success: process.env[`${prefix}SUCCESS`],
|
|
155
|
+
info: process.env[`${prefix}INFO`],
|
|
156
|
+
warning: process.env[`${prefix}WARNING`],
|
|
157
|
+
danger: process.env[`${prefix}DANGER`],
|
|
158
|
+
fatal: process.env[`${prefix}FATAL`],
|
|
159
|
+
positive: process.env[`${prefix}POSITIVE`],
|
|
160
|
+
negative: process.env[`${prefix}NEGATIVE`]
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
var getMultiThemeColorConfigEnv = (prefix) => {
|
|
164
|
+
return {
|
|
165
|
+
light: getBaseThemeColorConfigEnv(
|
|
166
|
+
`${prefix}_LIGHT_`
|
|
167
|
+
),
|
|
168
|
+
dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
var getBaseThemeColorConfigEnv = (prefix) => {
|
|
172
|
+
return {
|
|
173
|
+
foreground: process.env[`${prefix}FOREGROUND`],
|
|
174
|
+
background: process.env[`${prefix}BACKGROUND`],
|
|
175
|
+
brand: process.env[`${prefix}BRAND`],
|
|
176
|
+
alternate: process.env[`${prefix}ALTERNATE`],
|
|
177
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
178
|
+
link: process.env[`${prefix}LINK`],
|
|
179
|
+
help: process.env[`${prefix}HELP`],
|
|
180
|
+
success: process.env[`${prefix}SUCCESS`],
|
|
181
|
+
info: process.env[`${prefix}INFO`],
|
|
182
|
+
warning: process.env[`${prefix}WARNING`],
|
|
183
|
+
danger: process.env[`${prefix}DANGER`],
|
|
184
|
+
fatal: process.env[`${prefix}FATAL`],
|
|
185
|
+
positive: process.env[`${prefix}POSITIVE`],
|
|
186
|
+
negative: process.env[`${prefix}NEGATIVE`]
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export {
|
|
191
|
+
getExtensionEnv,
|
|
192
|
+
getConfigEnv
|
|
193
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkBMDGKEGPcjs = require('../chunk-BMDGKEGP.cjs');
|
|
5
5
|
require('../chunk-KT6HSF26.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-7BVMJTE2.cjs');
|
|
7
7
|
require('../chunk-ZGLOKOL3.cjs');
|
|
8
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-TGDG6POD.cjs');
|
|
9
9
|
require('../chunk-AQ2NOVJF.cjs');
|
|
10
10
|
require('../chunk-T4ZMKMEG.cjs');
|
|
11
11
|
require('../chunk-6D6DEG6Z.cjs');
|
|
12
|
-
require('../chunk-
|
|
13
|
-
require('../chunk-
|
|
14
|
-
require('../chunk-
|
|
12
|
+
require('../chunk-26LV7S6Z.cjs');
|
|
13
|
+
require('../chunk-DX767CQS.cjs');
|
|
14
|
+
require('../chunk-4PAEA5KV.cjs');
|
|
15
15
|
require('../chunk-AEZINHEA.cjs');
|
|
16
16
|
require('../chunk-RKGXITNB.cjs');
|
|
17
17
|
require('../chunk-NS5PJ2RM.cjs');
|
|
@@ -24,4 +24,4 @@ require('../chunk-C5OTFOQB.cjs');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
exports.getConfigFile =
|
|
27
|
+
exports.getConfigFile = _chunkBMDGKEGPcjs.getConfigFile; exports.getConfigFileByName = _chunkBMDGKEGPcjs.getConfigFileByName;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfigFile,
|
|
3
3
|
getConfigFileByName
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-XT2XO7TR.js";
|
|
5
5
|
import "../chunk-3EVEDCXL.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-U74E4EM6.js";
|
|
7
7
|
import "../chunk-64DXC5WM.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-JRKB77S5.js";
|
|
9
9
|
import "../chunk-IETV2DPL.js";
|
|
10
10
|
import "../chunk-42TCRG4H.js";
|
|
11
11
|
import "../chunk-XIA6NF6N.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-WT2BVWII.js";
|
|
13
|
+
import "../chunk-OUYYXBZX.js";
|
|
14
|
+
import "../chunk-4KZ3BMNG.js";
|
|
15
15
|
import "../chunk-VLWSWYG7.js";
|
|
16
16
|
import "../chunk-RWBPUJIZ.js";
|
|
17
17
|
import "../chunk-T3MUE32G.js";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkBMDGKEGPcjs = require('../chunk-BMDGKEGP.cjs');
|
|
6
6
|
require('../chunk-KT6HSF26.cjs');
|
|
7
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-7BVMJTE2.cjs');
|
|
8
8
|
require('../chunk-ZGLOKOL3.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-TGDG6POD.cjs');
|
|
10
10
|
require('../chunk-AQ2NOVJF.cjs');
|
|
11
11
|
require('../chunk-T4ZMKMEG.cjs');
|
|
12
12
|
require('../chunk-6D6DEG6Z.cjs');
|
|
13
|
-
require('../chunk-
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-
|
|
13
|
+
require('../chunk-26LV7S6Z.cjs');
|
|
14
|
+
require('../chunk-DX767CQS.cjs');
|
|
15
|
+
require('../chunk-4PAEA5KV.cjs');
|
|
16
16
|
require('../chunk-AEZINHEA.cjs');
|
|
17
17
|
require('../chunk-RKGXITNB.cjs');
|
|
18
18
|
require('../chunk-NS5PJ2RM.cjs');
|
|
@@ -25,4 +25,4 @@ require('../chunk-C5OTFOQB.cjs');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.getConfigFile =
|
|
28
|
+
exports.getConfigFile = _chunkBMDGKEGPcjs.getConfigFile; exports.getConfigFileByName = _chunkBMDGKEGPcjs.getConfigFileByName;
|
|
@@ -2,17 +2,17 @@ import "../chunk-SABD7NYM.js";
|
|
|
2
2
|
import {
|
|
3
3
|
getConfigFile,
|
|
4
4
|
getConfigFileByName
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-XT2XO7TR.js";
|
|
6
6
|
import "../chunk-3EVEDCXL.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-U74E4EM6.js";
|
|
8
8
|
import "../chunk-64DXC5WM.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-JRKB77S5.js";
|
|
10
10
|
import "../chunk-IETV2DPL.js";
|
|
11
11
|
import "../chunk-42TCRG4H.js";
|
|
12
12
|
import "../chunk-XIA6NF6N.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-WT2BVWII.js";
|
|
14
|
+
import "../chunk-OUYYXBZX.js";
|
|
15
|
+
import "../chunk-4KZ3BMNG.js";
|
|
16
16
|
import "../chunk-VLWSWYG7.js";
|
|
17
17
|
import "../chunk-RWBPUJIZ.js";
|
|
18
18
|
import "../chunk-T3MUE32G.js";
|
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
require('./chunk-
|
|
6
|
+
var _chunk2CVNUZFWcjs = require('./chunk-2CVNUZFW.cjs');
|
|
7
|
+
require('./chunk-BMDGKEGP.cjs');
|
|
8
8
|
require('./chunk-KT6HSF26.cjs');
|
|
9
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-7BVMJTE2.cjs');
|
|
10
10
|
require('./chunk-ZGLOKOL3.cjs');
|
|
11
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-TGDG6POD.cjs');
|
|
12
12
|
require('./chunk-AQ2NOVJF.cjs');
|
|
13
13
|
require('./chunk-T4ZMKMEG.cjs');
|
|
14
14
|
require('./chunk-6D6DEG6Z.cjs');
|
|
15
|
-
require('./chunk-
|
|
16
|
-
require('./chunk-
|
|
17
|
-
require('./chunk-
|
|
15
|
+
require('./chunk-26LV7S6Z.cjs');
|
|
16
|
+
require('./chunk-DX767CQS.cjs');
|
|
17
|
+
require('./chunk-4PAEA5KV.cjs');
|
|
18
18
|
require('./chunk-AEZINHEA.cjs');
|
|
19
19
|
require('./chunk-RKGXITNB.cjs');
|
|
20
20
|
require('./chunk-NS5PJ2RM.cjs');
|
|
21
21
|
require('./chunk-PSHJQ2NP.cjs');
|
|
22
22
|
require('./chunk-PLLCZVZO.cjs');
|
|
23
23
|
require('./chunk-QNDF3RQL.cjs');
|
|
24
|
-
require('./chunk-
|
|
25
|
-
require('./chunk-
|
|
24
|
+
require('./chunk-F7MZXFL2.cjs');
|
|
25
|
+
require('./chunk-6LO4SCE6.cjs');
|
|
26
26
|
require('./chunk-4JREL2GQ.cjs');
|
|
27
27
|
require('./chunk-7BZWQZUV.cjs');
|
|
28
28
|
require('./chunk-C5OTFOQB.cjs');
|
|
@@ -31,4 +31,4 @@ require('./chunk-C5OTFOQB.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
exports.createConfigExtension =
|
|
34
|
+
exports.createConfigExtension = _chunk2CVNUZFWcjs.createConfigExtension; exports.createStormWorkspaceConfig = _chunk2CVNUZFWcjs.createStormWorkspaceConfig; exports.loadStormWorkspaceConfig = _chunk2CVNUZFWcjs.loadStormWorkspaceConfig; exports.tryLoadStormWorkspaceConfig = _chunk2CVNUZFWcjs.tryLoadStormWorkspaceConfig;
|
|
@@ -3,26 +3,26 @@ import {
|
|
|
3
3
|
createStormWorkspaceConfig,
|
|
4
4
|
loadStormWorkspaceConfig,
|
|
5
5
|
tryLoadStormWorkspaceConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-26BPJW3I.js";
|
|
7
|
+
import "./chunk-XT2XO7TR.js";
|
|
8
8
|
import "./chunk-3EVEDCXL.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-U74E4EM6.js";
|
|
10
10
|
import "./chunk-64DXC5WM.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-JRKB77S5.js";
|
|
12
12
|
import "./chunk-IETV2DPL.js";
|
|
13
13
|
import "./chunk-42TCRG4H.js";
|
|
14
14
|
import "./chunk-XIA6NF6N.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-WT2BVWII.js";
|
|
16
|
+
import "./chunk-OUYYXBZX.js";
|
|
17
|
+
import "./chunk-4KZ3BMNG.js";
|
|
18
18
|
import "./chunk-VLWSWYG7.js";
|
|
19
19
|
import "./chunk-RWBPUJIZ.js";
|
|
20
20
|
import "./chunk-T3MUE32G.js";
|
|
21
21
|
import "./chunk-OJP4XIBV.js";
|
|
22
22
|
import "./chunk-R6A4VPC4.js";
|
|
23
23
|
import "./chunk-XEZGYUS2.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-TRI5HQQN.js";
|
|
25
|
+
import "./chunk-Z3RQ7QQH.js";
|
|
26
26
|
import "./chunk-FRR2ZRWD.js";
|
|
27
27
|
import "./chunk-4XRV4CVP.js";
|
|
28
28
|
import "./chunk-3QAWRU2B.js";
|
package/dist/env/get-env.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk6LO4SCE6cjs = require('../chunk-6LO4SCE6.cjs');
|
|
5
5
|
require('../chunk-4JREL2GQ.cjs');
|
|
6
6
|
require('../chunk-7BZWQZUV.cjs');
|
|
7
7
|
require('../chunk-C5OTFOQB.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.getConfigEnv =
|
|
11
|
+
exports.getConfigEnv = _chunk6LO4SCE6cjs.getConfigEnv; exports.getExtensionEnv = _chunk6LO4SCE6cjs.getExtensionEnv;
|
package/dist/env/get-env.js
CHANGED
package/dist/env/index.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkF7MZXFL2cjs = require('../chunk-F7MZXFL2.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk6LO4SCE6cjs = require('../chunk-6LO4SCE6.cjs');
|
|
10
10
|
require('../chunk-4JREL2GQ.cjs');
|
|
11
11
|
require('../chunk-7BZWQZUV.cjs');
|
|
12
12
|
require('../chunk-C5OTFOQB.cjs');
|
|
@@ -15,4 +15,4 @@ require('../chunk-C5OTFOQB.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.getConfigEnv =
|
|
18
|
+
exports.getConfigEnv = _chunk6LO4SCE6cjs.getConfigEnv; exports.getExtensionEnv = _chunk6LO4SCE6cjs.getExtensionEnv; exports.setConfigEnv = _chunkF7MZXFL2cjs.setConfigEnv; exports.setExtensionEnv = _chunkF7MZXFL2cjs.setExtensionEnv;
|
package/dist/env/index.js
CHANGED
|
@@ -2,11 +2,11 @@ import "../chunk-GSK6EGCB.js";
|
|
|
2
2
|
import {
|
|
3
3
|
setConfigEnv,
|
|
4
4
|
setExtensionEnv
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-TRI5HQQN.js";
|
|
6
6
|
import {
|
|
7
7
|
getConfigEnv,
|
|
8
8
|
getExtensionEnv
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-Z3RQ7QQH.js";
|
|
10
10
|
import "../chunk-FRR2ZRWD.js";
|
|
11
11
|
import "../chunk-4XRV4CVP.js";
|
|
12
12
|
import "../chunk-3QAWRU2B.js";
|
package/dist/env/set-env.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkF7MZXFL2cjs = require('../chunk-F7MZXFL2.cjs');
|
|
5
5
|
require('../chunk-4JREL2GQ.cjs');
|
|
6
6
|
require('../chunk-7BZWQZUV.cjs');
|
|
7
7
|
require('../chunk-C5OTFOQB.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.setConfigEnv =
|
|
11
|
+
exports.setConfigEnv = _chunkF7MZXFL2cjs.setConfigEnv; exports.setExtensionEnv = _chunkF7MZXFL2cjs.setExtensionEnv;
|