@storm-software/config-tools 1.190.44 → 1.190.45
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/package.json +3 -3
- package/dist/chunk-34ZTLNLC.js +0 -92
- package/dist/chunk-3GSCLSH5.cjs +0 -395
- package/dist/chunk-3RYQHUSV.cjs +0 -233
- package/dist/chunk-A5XFS6G4.cjs +0 -82
- package/dist/chunk-CHETDXSD.js +0 -947
- package/dist/chunk-CRCW3XXJ.cjs +0 -35
- package/dist/chunk-G6BYLVKW.js +0 -102
- package/dist/chunk-GHF4KYQK.js +0 -47
- package/dist/chunk-GHMHUDMO.cjs +0 -92
- package/dist/chunk-ILDSKL5B.js +0 -35
- package/dist/chunk-ILS6EHAY.js +0 -55
- package/dist/chunk-JLBXABMA.cjs +0 -40
- package/dist/chunk-MAZTXSVY.cjs +0 -47
- package/dist/chunk-MKPGN5UT.cjs +0 -947
- package/dist/chunk-MMYJT6VX.js +0 -40
- package/dist/chunk-MPA47MI6.js +0 -165
- package/dist/chunk-P3HKEFX7.cjs +0 -102
- package/dist/chunk-PEXQLPTN.cjs +0 -165
- package/dist/chunk-PGNCTFVB.cjs +0 -81
- package/dist/chunk-RA4PPQNI.js +0 -81
- package/dist/chunk-RUM7ZT5L.js +0 -395
- package/dist/chunk-S4V6UG5D.js +0 -82
- package/dist/chunk-TAUBUQTU.js +0 -233
- package/dist/chunk-ZDEVZTVT.cjs +0 -55
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/config-tools",
|
|
3
|
-
"version": "1.190.
|
|
3
|
+
"version": "1.190.45",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing various utilities to support custom workspace configurations and environment management for Storm Software projects, including configuration file handling, environment variable management, and logging utilities.",
|
|
6
6
|
"keywords": [
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
"files": ["dist/**/*"],
|
|
213
213
|
"dependencies": {
|
|
214
214
|
"@ltd/j-toml": "1.38.0",
|
|
215
|
-
"@storm-software/config": "^1.137.
|
|
215
|
+
"@storm-software/config": "^1.137.77",
|
|
216
216
|
"c12": "^2.0.4",
|
|
217
217
|
"chalk": "^4.1.2",
|
|
218
218
|
"commander": "^12.1.0",
|
|
@@ -230,5 +230,5 @@
|
|
|
230
230
|
"peerDependencies": { "zod": "^3.25.0 || ^4.0.0" },
|
|
231
231
|
"peerDependenciesMeta": { "zod": { "optional": false } },
|
|
232
232
|
"publishConfig": { "access": "public" },
|
|
233
|
-
"gitHead": "
|
|
233
|
+
"gitHead": "2edf2f31d40773cf35694a29842bd1b257160479"
|
|
234
234
|
}
|
package/dist/chunk-34ZTLNLC.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
writeTrace
|
|
3
|
-
} from "./chunk-CHETDXSD.js";
|
|
4
|
-
import {
|
|
5
|
-
findWorkspaceRoot
|
|
6
|
-
} from "./chunk-S4V6UG5D.js";
|
|
7
|
-
import {
|
|
8
|
-
joinPaths
|
|
9
|
-
} from "./chunk-V3GMJ4TX.js";
|
|
10
|
-
|
|
11
|
-
// src/config-file/get-config-file.ts
|
|
12
|
-
import { loadConfig } from "c12";
|
|
13
|
-
import defu from "defu";
|
|
14
|
-
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
15
|
-
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
16
|
-
const configs = await Promise.all([
|
|
17
|
-
loadConfig({
|
|
18
|
-
cwd: workspacePath,
|
|
19
|
-
packageJson: true,
|
|
20
|
-
name: fileName,
|
|
21
|
-
envName: fileName?.toUpperCase(),
|
|
22
|
-
jitiOptions: {
|
|
23
|
-
debug: false,
|
|
24
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
25
|
-
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
26
|
-
"jiti"
|
|
27
|
-
)
|
|
28
|
-
},
|
|
29
|
-
...options
|
|
30
|
-
}),
|
|
31
|
-
loadConfig({
|
|
32
|
-
cwd: workspacePath,
|
|
33
|
-
packageJson: true,
|
|
34
|
-
name: fileName,
|
|
35
|
-
envName: fileName?.toUpperCase(),
|
|
36
|
-
jitiOptions: {
|
|
37
|
-
debug: false,
|
|
38
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
39
|
-
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
40
|
-
"jiti"
|
|
41
|
-
)
|
|
42
|
-
},
|
|
43
|
-
configFile: fileName,
|
|
44
|
-
...options
|
|
45
|
-
})
|
|
46
|
-
]);
|
|
47
|
-
return defu(configs[0] ?? {}, configs[1] ?? {});
|
|
48
|
-
};
|
|
49
|
-
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
50
|
-
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
51
|
-
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
52
|
-
let config = result.config;
|
|
53
|
-
const configFile = result.configFile;
|
|
54
|
-
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
55
|
-
writeTrace(
|
|
56
|
-
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
57
|
-
{
|
|
58
|
-
logLevel: "all"
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
63
|
-
const results = await Promise.all(
|
|
64
|
-
additionalFileNames.map(
|
|
65
|
-
(fileName) => getConfigFileByName(fileName, workspacePath)
|
|
66
|
-
)
|
|
67
|
-
);
|
|
68
|
-
for (const result2 of results) {
|
|
69
|
-
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
70
|
-
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
71
|
-
writeTrace(
|
|
72
|
-
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
73
|
-
{
|
|
74
|
-
logLevel: "all"
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
config = defu(result2.config ?? {}, config ?? {});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
if (!config || Object.keys(config).length === 0) {
|
|
83
|
-
return void 0;
|
|
84
|
-
}
|
|
85
|
-
config.configFile = configFile;
|
|
86
|
-
return config;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export {
|
|
90
|
-
getConfigFileByName,
|
|
91
|
-
getConfigFile
|
|
92
|
-
};
|
package/dist/chunk-3GSCLSH5.cjs
DELETED
|
@@ -1,395 +0,0 @@
|
|
|
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 _chunkJWLDCEBZcjs = require('./chunk-JWLDCEBZ.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkBDATZ3UBcjs = require('./chunk-BDATZ3UB.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunk7QBTVNMRcjs = require('./chunk-7QBTVNMR.cjs');
|
|
10
|
-
|
|
11
|
-
// src/env/set-env.ts
|
|
12
|
-
var setExtensionEnv = (extensionName, extension) => {
|
|
13
|
-
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
14
|
-
if (extension[key]) {
|
|
15
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _ => _.replace, 'call', _2 => _2(
|
|
16
|
-
/([A-Z])+/g,
|
|
17
|
-
(input) => input ? _optionalChain([input, 'access', _3 => _3[0], 'optionalAccess', _4 => _4.toUpperCase, 'call', _5 => _5()]) + input.slice(1) : ""
|
|
18
|
-
), 'access', _6 => _6.split, 'call', _7 => _7(/(?=[A-Z])|[.\-\s_]/), 'access', _8 => _8.map, 'call', _9 => _9((x) => x.toLowerCase())]), () => ( []));
|
|
19
|
-
let extensionKey;
|
|
20
|
-
if (result.length === 0) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (result.length === 1) {
|
|
24
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _10 => _10[0], 'optionalAccess', _11 => _11.toUpperCase, 'call', _12 => _12()]), () => ( ""));
|
|
25
|
-
} else {
|
|
26
|
-
extensionKey = result.reduce((ret, part) => {
|
|
27
|
-
return `${ret}_${part.toLowerCase()}`;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
var setConfigEnv = (config) => {
|
|
35
|
-
const prefix = "STORM_";
|
|
36
|
-
if (config.extends) {
|
|
37
|
-
process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
|
|
38
|
-
}
|
|
39
|
-
if (config.name) {
|
|
40
|
-
process.env[`${prefix}NAME`] = config.name;
|
|
41
|
-
}
|
|
42
|
-
if (config.variant) {
|
|
43
|
-
process.env[`${prefix}VARIANT`] = config.variant;
|
|
44
|
-
}
|
|
45
|
-
if (config.namespace) {
|
|
46
|
-
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
47
|
-
}
|
|
48
|
-
if (config.owner) {
|
|
49
|
-
process.env[`${prefix}OWNER`] = config.owner;
|
|
50
|
-
}
|
|
51
|
-
if (config.bot) {
|
|
52
|
-
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
53
|
-
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
54
|
-
}
|
|
55
|
-
if (config.error) {
|
|
56
|
-
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
57
|
-
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
58
|
-
}
|
|
59
|
-
if (config.release) {
|
|
60
|
-
if (config.release.banner) {
|
|
61
|
-
if (typeof config.release.banner === "string") {
|
|
62
|
-
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
63
|
-
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
|
|
64
|
-
} else {
|
|
65
|
-
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
|
|
66
|
-
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
|
|
67
|
-
process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
71
|
-
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
72
|
-
}
|
|
73
|
-
if (config.socials) {
|
|
74
|
-
if (config.socials.twitter) {
|
|
75
|
-
process.env[`${prefix}SOCIAL_TWITTER`] = config.socials.twitter;
|
|
76
|
-
}
|
|
77
|
-
if (config.socials.discord) {
|
|
78
|
-
process.env[`${prefix}SOCIAL_DISCORD`] = config.socials.discord;
|
|
79
|
-
}
|
|
80
|
-
if (config.socials.telegram) {
|
|
81
|
-
process.env[`${prefix}SOCIAL_TELEGRAM`] = config.socials.telegram;
|
|
82
|
-
}
|
|
83
|
-
if (config.socials.slack) {
|
|
84
|
-
process.env[`${prefix}SOCIAL_SLACK`] = config.socials.slack;
|
|
85
|
-
}
|
|
86
|
-
if (config.socials.medium) {
|
|
87
|
-
process.env[`${prefix}SOCIAL_MEDIUM`] = config.socials.medium;
|
|
88
|
-
}
|
|
89
|
-
if (config.socials.github) {
|
|
90
|
-
process.env[`${prefix}SOCIAL_GITHUB`] = config.socials.github;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (config.organization) {
|
|
94
|
-
if (typeof config.organization === "string") {
|
|
95
|
-
process.env[`${prefix}ORG`] = config.organization;
|
|
96
|
-
process.env[`${prefix}ORG_NAME`] = config.organization;
|
|
97
|
-
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
98
|
-
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization;
|
|
99
|
-
} else {
|
|
100
|
-
process.env[`${prefix}ORG`] = config.organization.name;
|
|
101
|
-
process.env[`${prefix}ORG_NAME`] = config.organization.name;
|
|
102
|
-
process.env[`${prefix}ORGANIZATION`] = config.organization.name;
|
|
103
|
-
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization.name;
|
|
104
|
-
if (config.organization.url) {
|
|
105
|
-
process.env[`${prefix}ORG_URL`] = config.organization.url;
|
|
106
|
-
process.env[`${prefix}ORGANIZATION_URL`] = config.organization.url;
|
|
107
|
-
}
|
|
108
|
-
if (config.organization.description) {
|
|
109
|
-
process.env[`${prefix}ORG_DESCRIPTION`] = config.organization.description;
|
|
110
|
-
process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config.organization.description;
|
|
111
|
-
}
|
|
112
|
-
if (config.organization.logo) {
|
|
113
|
-
process.env[`${prefix}ORG_LOGO`] = config.organization.logo;
|
|
114
|
-
process.env[`${prefix}ORGANIZATION_LOGO`] = config.organization.logo;
|
|
115
|
-
}
|
|
116
|
-
if (config.organization.icon) {
|
|
117
|
-
process.env[`${prefix}ORG_ICON`] = config.organization.icon;
|
|
118
|
-
process.env[`${prefix}ORGANIZATION_ICON`] = config.organization.icon;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (config.packageManager) {
|
|
123
|
-
process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
|
|
124
|
-
}
|
|
125
|
-
if (config.license) {
|
|
126
|
-
process.env[`${prefix}LICENSE`] = config.license;
|
|
127
|
-
}
|
|
128
|
-
if (config.homepage) {
|
|
129
|
-
process.env[`${prefix}HOMEPAGE`] = config.homepage;
|
|
130
|
-
}
|
|
131
|
-
if (config.docs) {
|
|
132
|
-
process.env[`${prefix}DOCS`] = config.docs;
|
|
133
|
-
}
|
|
134
|
-
if (config.portal) {
|
|
135
|
-
process.env[`${prefix}PORTAL`] = config.portal;
|
|
136
|
-
}
|
|
137
|
-
if (config.licensing) {
|
|
138
|
-
process.env[`${prefix}LICENSING`] = config.licensing;
|
|
139
|
-
}
|
|
140
|
-
if (config.contact) {
|
|
141
|
-
process.env[`${prefix}CONTACT`] = config.contact;
|
|
142
|
-
}
|
|
143
|
-
if (config.support) {
|
|
144
|
-
process.env[`${prefix}SUPPORT`] = config.support;
|
|
145
|
-
}
|
|
146
|
-
if (config.timezone) {
|
|
147
|
-
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
148
|
-
process.env.TZ = config.timezone;
|
|
149
|
-
process.env.DEFAULT_TIMEZONE = config.timezone;
|
|
150
|
-
process.env.TIMEZONE = config.timezone;
|
|
151
|
-
}
|
|
152
|
-
if (config.locale) {
|
|
153
|
-
process.env[`${prefix}LOCALE`] = config.locale;
|
|
154
|
-
process.env.DEFAULT_LOCALE = config.locale;
|
|
155
|
-
process.env.LOCALE = config.locale;
|
|
156
|
-
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
157
|
-
}
|
|
158
|
-
if (config.configFile) {
|
|
159
|
-
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0,
|
|
160
|
-
config.configFile
|
|
161
|
-
);
|
|
162
|
-
}
|
|
163
|
-
if (config.workspaceRoot) {
|
|
164
|
-
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
165
|
-
process.env.NX_WORKSPACE_ROOT = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
166
|
-
process.env.NX_WORKSPACE_ROOT_PATH = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
167
|
-
}
|
|
168
|
-
if (config.directories) {
|
|
169
|
-
if (!config.skipCache && config.directories.cache) {
|
|
170
|
-
process.env[`${prefix}CACHE_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0,
|
|
171
|
-
config.directories.cache
|
|
172
|
-
);
|
|
173
|
-
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
174
|
-
}
|
|
175
|
-
if (config.directories.data) {
|
|
176
|
-
process.env[`${prefix}DATA_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.directories.data);
|
|
177
|
-
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
178
|
-
}
|
|
179
|
-
if (config.directories.config) {
|
|
180
|
-
process.env[`${prefix}CONFIG_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0,
|
|
181
|
-
config.directories.config
|
|
182
|
-
);
|
|
183
|
-
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
184
|
-
}
|
|
185
|
-
if (config.directories.temp) {
|
|
186
|
-
process.env[`${prefix}TEMP_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.directories.temp);
|
|
187
|
-
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
188
|
-
}
|
|
189
|
-
if (config.directories.log) {
|
|
190
|
-
process.env[`${prefix}LOG_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.directories.log);
|
|
191
|
-
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
192
|
-
}
|
|
193
|
-
if (config.directories.build) {
|
|
194
|
-
process.env[`${prefix}BUILD_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0,
|
|
195
|
-
config.directories.build
|
|
196
|
-
);
|
|
197
|
-
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
if (config.skipCache !== void 0) {
|
|
201
|
-
process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
|
|
202
|
-
if (config.skipCache) {
|
|
203
|
-
process.env.NX_SKIP_NX_CACHE ??= String(config.skipCache);
|
|
204
|
-
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
if (config.mode) {
|
|
208
|
-
process.env[`${prefix}MODE`] = config.mode;
|
|
209
|
-
process.env.NODE_ENV = config.mode;
|
|
210
|
-
process.env.ENVIRONMENT = config.mode;
|
|
211
|
-
}
|
|
212
|
-
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])) {
|
|
213
|
-
for (const key of Object.keys(config.colors)) {
|
|
214
|
-
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
215
|
-
}
|
|
216
|
-
} else {
|
|
217
|
-
setThemeColorsEnv(
|
|
218
|
-
`${prefix}COLOR_`,
|
|
219
|
-
config.colors
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
if (config.repository) {
|
|
223
|
-
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
224
|
-
}
|
|
225
|
-
if (config.branch) {
|
|
226
|
-
process.env[`${prefix}BRANCH`] = config.branch;
|
|
227
|
-
}
|
|
228
|
-
if (config.preid) {
|
|
229
|
-
process.env[`${prefix}PRE_ID`] = String(config.preid);
|
|
230
|
-
}
|
|
231
|
-
if (config.registry) {
|
|
232
|
-
if (config.registry.github) {
|
|
233
|
-
process.env[`${prefix}REGISTRY_GITHUB`] = String(config.registry.github);
|
|
234
|
-
}
|
|
235
|
-
if (config.registry.npm) {
|
|
236
|
-
process.env[`${prefix}REGISTRY_NPM`] = String(config.registry.npm);
|
|
237
|
-
}
|
|
238
|
-
if (config.registry.cargo) {
|
|
239
|
-
process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
|
|
240
|
-
}
|
|
241
|
-
if (config.registry.cyclone) {
|
|
242
|
-
process.env[`${prefix}REGISTRY_CYCLONE`] = String(
|
|
243
|
-
config.registry.cyclone
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
if (config.registry.container) {
|
|
247
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(
|
|
248
|
-
config.registry.container
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
if (config.logLevel) {
|
|
253
|
-
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
254
|
-
process.env.LOG_LEVEL = String(config.logLevel);
|
|
255
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
256
|
-
_chunkJWLDCEBZcjs.getLogLevel.call(void 0, config.logLevel) >= _chunk7QBTVNMRcjs.LogLevel.DEBUG ? true : false
|
|
257
|
-
);
|
|
258
|
-
process.env.RUST_BACKTRACE = _chunkJWLDCEBZcjs.getLogLevel.call(void 0, config.logLevel) >= _chunk7QBTVNMRcjs.LogLevel.DEBUG ? "full" : "none";
|
|
259
|
-
}
|
|
260
|
-
if (config.skipConfigLogging !== void 0) {
|
|
261
|
-
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
262
|
-
config.skipConfigLogging
|
|
263
|
-
);
|
|
264
|
-
}
|
|
265
|
-
process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(config);
|
|
266
|
-
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
267
|
-
if (config.extensions[key] && Object.keys(config.extensions[key])) {
|
|
268
|
-
setExtensionEnv(key, config.extensions[key]);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
var setThemeColorsEnv = (prefix, config) => {
|
|
273
|
-
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);
|
|
274
|
-
};
|
|
275
|
-
var setSingleThemeColorsEnv = (prefix, config) => {
|
|
276
|
-
if (config.dark) {
|
|
277
|
-
process.env[`${prefix}DARK`] = config.dark;
|
|
278
|
-
}
|
|
279
|
-
if (config.light) {
|
|
280
|
-
process.env[`${prefix}LIGHT`] = config.light;
|
|
281
|
-
}
|
|
282
|
-
if (config.brand) {
|
|
283
|
-
process.env[`${prefix}BRAND`] = config.brand;
|
|
284
|
-
}
|
|
285
|
-
if (config.alternate) {
|
|
286
|
-
process.env[`${prefix}ALTERNATE`] = config.alternate;
|
|
287
|
-
}
|
|
288
|
-
if (config.accent) {
|
|
289
|
-
process.env[`${prefix}ACCENT`] = config.accent;
|
|
290
|
-
}
|
|
291
|
-
if (config.link) {
|
|
292
|
-
process.env[`${prefix}LINK`] = config.link;
|
|
293
|
-
}
|
|
294
|
-
if (config.help) {
|
|
295
|
-
process.env[`${prefix}HELP`] = config.help;
|
|
296
|
-
}
|
|
297
|
-
if (config.success) {
|
|
298
|
-
process.env[`${prefix}SUCCESS`] = config.success;
|
|
299
|
-
}
|
|
300
|
-
if (config.info) {
|
|
301
|
-
process.env[`${prefix}INFO`] = config.info;
|
|
302
|
-
}
|
|
303
|
-
if (config.debug) {
|
|
304
|
-
process.env[`${prefix}DEBUG`] = config.debug;
|
|
305
|
-
}
|
|
306
|
-
if (config.warning) {
|
|
307
|
-
process.env[`${prefix}WARNING`] = config.warning;
|
|
308
|
-
}
|
|
309
|
-
if (config.danger) {
|
|
310
|
-
process.env[`${prefix}DANGER`] = config.danger;
|
|
311
|
-
}
|
|
312
|
-
if (config.fatal) {
|
|
313
|
-
process.env[`${prefix}FATAL`] = config.fatal;
|
|
314
|
-
}
|
|
315
|
-
if (config.performance) {
|
|
316
|
-
process.env[`${prefix}PERFORMANCE`] = config.performance;
|
|
317
|
-
}
|
|
318
|
-
if (config.positive) {
|
|
319
|
-
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
320
|
-
}
|
|
321
|
-
if (config.negative) {
|
|
322
|
-
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
323
|
-
}
|
|
324
|
-
if (config.gradient) {
|
|
325
|
-
for (let i = 0; i < config.gradient.length; i++) {
|
|
326
|
-
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
};
|
|
330
|
-
var setMultiThemeColorsEnv = (prefix, config) => {
|
|
331
|
-
return {
|
|
332
|
-
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
|
|
333
|
-
dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
|
|
334
|
-
};
|
|
335
|
-
};
|
|
336
|
-
var setBaseThemeColorsEnv = (prefix, config) => {
|
|
337
|
-
if (config.foreground) {
|
|
338
|
-
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
339
|
-
}
|
|
340
|
-
if (config.background) {
|
|
341
|
-
process.env[`${prefix}BACKGROUND`] = config.background;
|
|
342
|
-
}
|
|
343
|
-
if (config.brand) {
|
|
344
|
-
process.env[`${prefix}BRAND`] = config.brand;
|
|
345
|
-
}
|
|
346
|
-
if (config.alternate) {
|
|
347
|
-
process.env[`${prefix}ALTERNATE`] = config.alternate;
|
|
348
|
-
}
|
|
349
|
-
if (config.accent) {
|
|
350
|
-
process.env[`${prefix}ACCENT`] = config.accent;
|
|
351
|
-
}
|
|
352
|
-
if (config.link) {
|
|
353
|
-
process.env[`${prefix}LINK`] = config.link;
|
|
354
|
-
}
|
|
355
|
-
if (config.help) {
|
|
356
|
-
process.env[`${prefix}HELP`] = config.help;
|
|
357
|
-
}
|
|
358
|
-
if (config.success) {
|
|
359
|
-
process.env[`${prefix}SUCCESS`] = config.success;
|
|
360
|
-
}
|
|
361
|
-
if (config.info) {
|
|
362
|
-
process.env[`${prefix}INFO`] = config.info;
|
|
363
|
-
}
|
|
364
|
-
if (config.debug) {
|
|
365
|
-
process.env[`${prefix}DEBUG`] = config.debug;
|
|
366
|
-
}
|
|
367
|
-
if (config.warning) {
|
|
368
|
-
process.env[`${prefix}WARNING`] = config.warning;
|
|
369
|
-
}
|
|
370
|
-
if (config.danger) {
|
|
371
|
-
process.env[`${prefix}DANGER`] = config.danger;
|
|
372
|
-
}
|
|
373
|
-
if (config.fatal) {
|
|
374
|
-
process.env[`${prefix}FATAL`] = config.fatal;
|
|
375
|
-
}
|
|
376
|
-
if (config.performance) {
|
|
377
|
-
process.env[`${prefix}PERFORMANCE`] = config.performance;
|
|
378
|
-
}
|
|
379
|
-
if (config.positive) {
|
|
380
|
-
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
381
|
-
}
|
|
382
|
-
if (config.negative) {
|
|
383
|
-
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
384
|
-
}
|
|
385
|
-
if (config.gradient) {
|
|
386
|
-
for (let i = 0; i < config.gradient.length; i++) {
|
|
387
|
-
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
exports.setExtensionEnv = setExtensionEnv; exports.setConfigEnv = setConfigEnv;
|