@storm-software/config-tools 1.146.0 → 1.147.1
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 +41 -24
- package/bin/config.js +41 -24
- package/dist/{chunk-5GDS63DU.js → chunk-23WUCNWX.js} +1 -1
- package/dist/{chunk-FI7WN47Y.cjs → chunk-2IKEUEGY.cjs} +7 -7
- package/dist/{chunk-UJPJQXGA.cjs → chunk-4DLP6LZY.cjs} +2 -2
- package/dist/{chunk-JHFMRUZ3.js → chunk-6OM23J4N.js} +1 -1
- package/dist/{chunk-WRGFZXJE.js → chunk-6T3V5XJK.js} +2 -1
- package/dist/{chunk-LXAJWZ37.cjs → chunk-7JBLPO7O.cjs} +10 -9
- package/dist/{chunk-5K6CXYFF.cjs → chunk-C4RHWKK6.cjs} +2 -2
- package/dist/{chunk-HDI7BCVL.js → chunk-CCO2PASC.js} +3 -2
- package/dist/{chunk-32ACHDIU.cjs → chunk-DD5UX56L.cjs} +3 -0
- package/dist/{chunk-CSIXX72P.js → chunk-FDJZUZKJ.js} +10 -10
- package/dist/{chunk-2V7MZG6O.cjs → chunk-GS25DBTT.cjs} +18 -18
- package/dist/{chunk-HFGQYKYH.js → chunk-GZFXEQPB.js} +2 -2
- package/dist/{chunk-P5GFKFI6.cjs → chunk-HKZSDZZ4.cjs} +2 -2
- package/dist/{chunk-MAMYTWWY.cjs → chunk-KNLWLA7O.cjs} +20 -13
- package/dist/{chunk-4E4DSFC4.js → chunk-OIEEXHKO.js} +20 -13
- package/dist/{chunk-2VKMRURF.js → chunk-P7Q327IR.js} +3 -0
- package/dist/{chunk-3ONZMUOD.js → chunk-Q7MMWMEN.js} +2 -2
- package/dist/{chunk-JXLUUN7Z.cjs → chunk-SVQE7WVB.cjs} +2 -1
- package/dist/{chunk-XYV3B7TT.cjs → chunk-SWX2MJHI.cjs} +5 -2
- package/dist/{chunk-ZQWK7Y2J.cjs → chunk-TZO4SYUO.cjs} +9 -9
- package/dist/{chunk-JCGZTN5H.js → chunk-UZ5SHCFX.js} +1 -1
- package/dist/{chunk-JVA7N2JV.js → chunk-WMWOH7LS.js} +9 -7
- package/dist/{chunk-QPSRWTSZ.cjs → chunk-XIVRONKM.cjs} +11 -11
- package/dist/{chunk-X7BEPYRX.js → chunk-XQPQRRG3.js} +5 -2
- package/dist/{chunk-MPQ5PFCS.cjs → chunk-XVIPFWZW.cjs} +12 -10
- package/dist/{chunk-MICZPWNF.js → chunk-ZU6V7IRV.js} +1 -1
- package/dist/config-file/get-config-file.cjs +9 -9
- package/dist/config-file/get-config-file.js +8 -8
- package/dist/config-file/index.cjs +9 -9
- package/dist/config-file/index.js +8 -8
- package/dist/create-storm-config.cjs +12 -12
- package/dist/create-storm-config.js +11 -11
- package/dist/env/get-env.cjs +3 -3
- package/dist/env/get-env.js +2 -2
- package/dist/env/index.cjs +4 -4
- package/dist/env/index.js +3 -3
- package/dist/env/set-env.cjs +2 -2
- package/dist/env/set-env.js +1 -1
- package/dist/get-config.cjs +13 -13
- package/dist/get-config.js +12 -12
- package/dist/index.cjs +14 -14
- package/dist/index.js +13 -13
- package/dist/logger/console.cjs +6 -6
- package/dist/logger/console.js +5 -5
- package/dist/logger/create-logger.cjs +7 -7
- package/dist/logger/create-logger.js +6 -6
- package/dist/logger/index.cjs +7 -7
- package/dist/logger/index.js +6 -6
- package/dist/utilities/apply-workspace-tokens.cjs +4 -4
- package/dist/utilities/apply-workspace-tokens.js +3 -3
- package/dist/utilities/find-up.cjs +2 -2
- package/dist/utilities/find-up.d.cts +1 -1
- package/dist/utilities/find-up.d.ts +1 -1
- package/dist/utilities/find-up.js +1 -1
- package/dist/utilities/find-workspace-root.cjs +3 -3
- package/dist/utilities/find-workspace-root.js +2 -2
- package/dist/utilities/get-default-config.cjs +5 -5
- package/dist/utilities/get-default-config.js +4 -4
- package/dist/utilities/index.cjs +8 -8
- package/dist/utilities/index.js +7 -7
- package/dist/utilities/process-handler.cjs +7 -7
- package/dist/utilities/process-handler.js +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/config.cjs
CHANGED
|
@@ -143,7 +143,7 @@ var WorkspaceDirectoryConfigSchema = import_zod.default.object({
|
|
|
143
143
|
build: import_zod.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
144
144
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
145
145
|
var StormConfigSchema = import_zod.default.object({
|
|
146
|
-
$schema: import_zod.default.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"),
|
|
146
|
+
$schema: import_zod.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
147
147
|
extends: ExtendsSchema.optional(),
|
|
148
148
|
name: import_zod.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
149
149
|
namespace: import_zod.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -185,6 +185,7 @@ var StormConfigSchema = import_zod.default.object({
|
|
|
185
185
|
"trace",
|
|
186
186
|
"all"
|
|
187
187
|
]).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`)."),
|
|
188
|
+
skipConfigLogging: import_zod.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
188
189
|
registry: RegistryConfigSchema,
|
|
189
190
|
configFile: import_zod.default.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."),
|
|
190
191
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -378,14 +379,17 @@ var import_node_fs = require("fs");
|
|
|
378
379
|
var import_node_path = require("path");
|
|
379
380
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
380
381
|
var depth = 0;
|
|
381
|
-
function findFolderUp(startPath, endFileNames) {
|
|
382
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
382
383
|
const _startPath = startPath ?? process.cwd();
|
|
384
|
+
if (endDirectoryNames.some((endDirName) => (0, import_node_fs.existsSync)((0, import_node_path.join)(_startPath, endDirName)))) {
|
|
385
|
+
return _startPath;
|
|
386
|
+
}
|
|
383
387
|
if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
|
|
384
388
|
return _startPath;
|
|
385
389
|
}
|
|
386
390
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
387
391
|
const parent = (0, import_node_path.join)(_startPath, "..");
|
|
388
|
-
return findFolderUp(parent, endFileNames);
|
|
392
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
389
393
|
}
|
|
390
394
|
return void 0;
|
|
391
395
|
}
|
|
@@ -393,17 +397,17 @@ __name(findFolderUp, "findFolderUp");
|
|
|
393
397
|
|
|
394
398
|
// src/utilities/find-workspace-root.ts
|
|
395
399
|
var rootFiles = [
|
|
396
|
-
"storm.json",
|
|
397
|
-
"storm.json",
|
|
398
|
-
"storm.yaml",
|
|
399
|
-
"storm.yml",
|
|
400
|
-
"storm.js",
|
|
401
|
-
"storm.ts",
|
|
402
|
-
".storm.json",
|
|
403
|
-
".storm.yaml",
|
|
404
|
-
".storm.yml",
|
|
405
|
-
".storm.js",
|
|
406
|
-
".storm.ts",
|
|
400
|
+
"storm-workspace.json",
|
|
401
|
+
"storm-workspace.json",
|
|
402
|
+
"storm-workspace.yaml",
|
|
403
|
+
"storm-workspace.yml",
|
|
404
|
+
"storm-workspace.js",
|
|
405
|
+
"storm-workspace.ts",
|
|
406
|
+
".storm-workspace.json",
|
|
407
|
+
".storm-workspace.yaml",
|
|
408
|
+
".storm-workspace.yml",
|
|
409
|
+
".storm-workspace.js",
|
|
410
|
+
".storm-workspace.ts",
|
|
407
411
|
"lerna.json",
|
|
408
412
|
"nx.json",
|
|
409
413
|
"turbo.json",
|
|
@@ -427,11 +431,18 @@ var rootFiles = [
|
|
|
427
431
|
"pnpm-lock.yml",
|
|
428
432
|
"bun.lockb"
|
|
429
433
|
];
|
|
434
|
+
var rootDirectories = [
|
|
435
|
+
".storm-workspace",
|
|
436
|
+
".nx",
|
|
437
|
+
".github",
|
|
438
|
+
".vscode",
|
|
439
|
+
".verdaccio"
|
|
440
|
+
];
|
|
430
441
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
431
442
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
432
443
|
return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
433
444
|
}
|
|
434
|
-
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
|
|
445
|
+
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
435
446
|
}
|
|
436
447
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
437
448
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
@@ -791,10 +802,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
|
|
|
791
802
|
}, "getConfigFileByName");
|
|
792
803
|
var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
|
|
793
804
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
794
|
-
const result = await getConfigFileByName("storm", workspacePath);
|
|
805
|
+
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
795
806
|
let config = result.config;
|
|
796
807
|
const configFile = result.configFile;
|
|
797
|
-
if (config && configFile && Object.keys(config).length > 0) {
|
|
808
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
798
809
|
writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
799
810
|
logLevel: "all"
|
|
800
811
|
});
|
|
@@ -803,9 +814,11 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
803
814
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
804
815
|
for (const result2 of results) {
|
|
805
816
|
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
817
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
818
|
+
writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
819
|
+
logLevel: "all"
|
|
820
|
+
});
|
|
821
|
+
}
|
|
809
822
|
config = (0, import_defu.default)(result2.config ?? {}, config ?? {});
|
|
810
823
|
}
|
|
811
824
|
}
|
|
@@ -878,7 +891,8 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
878
891
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
879
892
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
880
893
|
},
|
|
881
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
894
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
895
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
882
896
|
};
|
|
883
897
|
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
884
898
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
@@ -1113,6 +1127,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1113
1127
|
process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
|
|
1114
1128
|
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
1115
1129
|
}
|
|
1130
|
+
if (config.skipConfigLogging !== void 0) {
|
|
1131
|
+
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
1132
|
+
}
|
|
1116
1133
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
1117
1134
|
for (const key of Object.keys(config.extensions ?? {})) {
|
|
1118
1135
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
@@ -1230,7 +1247,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1230
1247
|
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1231
1248
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1232
1249
|
if (!configFile && !skipLogs) {
|
|
1233
|
-
writeWarning("No Storm
|
|
1250
|
+
writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
1234
1251
|
logLevel: "all"
|
|
1235
1252
|
});
|
|
1236
1253
|
}
|
|
@@ -1268,8 +1285,8 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1268
1285
|
var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1269
1286
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1270
1287
|
setConfigEnv(config);
|
|
1271
|
-
if (!skipLogs) {
|
|
1272
|
-
writeTrace(`\u2699\uFE0F Using Storm configuration:
|
|
1288
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
1289
|
+
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1273
1290
|
${formatLogMessage(config)}`, config);
|
|
1274
1291
|
}
|
|
1275
1292
|
return config;
|
package/bin/config.js
CHANGED
|
@@ -111,7 +111,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
111
111
|
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)")
|
|
112
112
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
113
113
|
var StormConfigSchema = z.object({
|
|
114
|
-
$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"),
|
|
114
|
+
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
115
115
|
extends: ExtendsSchema.optional(),
|
|
116
116
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
117
117
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -153,6 +153,7 @@ var StormConfigSchema = z.object({
|
|
|
153
153
|
"trace",
|
|
154
154
|
"all"
|
|
155
155
|
]).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`)."),
|
|
156
|
+
skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
156
157
|
registry: RegistryConfigSchema,
|
|
157
158
|
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."),
|
|
158
159
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -346,14 +347,17 @@ import { existsSync } from "node:fs";
|
|
|
346
347
|
import { join } from "node:path";
|
|
347
348
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
348
349
|
var depth = 0;
|
|
349
|
-
function findFolderUp(startPath, endFileNames) {
|
|
350
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
350
351
|
const _startPath = startPath ?? process.cwd();
|
|
352
|
+
if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
|
|
353
|
+
return _startPath;
|
|
354
|
+
}
|
|
351
355
|
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
|
|
352
356
|
return _startPath;
|
|
353
357
|
}
|
|
354
358
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
355
359
|
const parent = join(_startPath, "..");
|
|
356
|
-
return findFolderUp(parent, endFileNames);
|
|
360
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
357
361
|
}
|
|
358
362
|
return void 0;
|
|
359
363
|
}
|
|
@@ -361,17 +365,17 @@ __name(findFolderUp, "findFolderUp");
|
|
|
361
365
|
|
|
362
366
|
// src/utilities/find-workspace-root.ts
|
|
363
367
|
var rootFiles = [
|
|
364
|
-
"storm.json",
|
|
365
|
-
"storm.json",
|
|
366
|
-
"storm.yaml",
|
|
367
|
-
"storm.yml",
|
|
368
|
-
"storm.js",
|
|
369
|
-
"storm.ts",
|
|
370
|
-
".storm.json",
|
|
371
|
-
".storm.yaml",
|
|
372
|
-
".storm.yml",
|
|
373
|
-
".storm.js",
|
|
374
|
-
".storm.ts",
|
|
368
|
+
"storm-workspace.json",
|
|
369
|
+
"storm-workspace.json",
|
|
370
|
+
"storm-workspace.yaml",
|
|
371
|
+
"storm-workspace.yml",
|
|
372
|
+
"storm-workspace.js",
|
|
373
|
+
"storm-workspace.ts",
|
|
374
|
+
".storm-workspace.json",
|
|
375
|
+
".storm-workspace.yaml",
|
|
376
|
+
".storm-workspace.yml",
|
|
377
|
+
".storm-workspace.js",
|
|
378
|
+
".storm-workspace.ts",
|
|
375
379
|
"lerna.json",
|
|
376
380
|
"nx.json",
|
|
377
381
|
"turbo.json",
|
|
@@ -395,11 +399,18 @@ var rootFiles = [
|
|
|
395
399
|
"pnpm-lock.yml",
|
|
396
400
|
"bun.lockb"
|
|
397
401
|
];
|
|
402
|
+
var rootDirectories = [
|
|
403
|
+
".storm-workspace",
|
|
404
|
+
".nx",
|
|
405
|
+
".github",
|
|
406
|
+
".vscode",
|
|
407
|
+
".verdaccio"
|
|
408
|
+
];
|
|
398
409
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
399
410
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
400
411
|
return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
401
412
|
}
|
|
402
|
-
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
|
|
413
|
+
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
403
414
|
}
|
|
404
415
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
405
416
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
@@ -759,10 +770,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
|
|
|
759
770
|
}, "getConfigFileByName");
|
|
760
771
|
var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
|
|
761
772
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
762
|
-
const result = await getConfigFileByName("storm", workspacePath);
|
|
773
|
+
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
763
774
|
let config = result.config;
|
|
764
775
|
const configFile = result.configFile;
|
|
765
|
-
if (config && configFile && Object.keys(config).length > 0) {
|
|
776
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
766
777
|
writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
767
778
|
logLevel: "all"
|
|
768
779
|
});
|
|
@@ -771,9 +782,11 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
771
782
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
772
783
|
for (const result2 of results) {
|
|
773
784
|
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
785
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
786
|
+
writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
787
|
+
logLevel: "all"
|
|
788
|
+
});
|
|
789
|
+
}
|
|
777
790
|
config = defu(result2.config ?? {}, config ?? {});
|
|
778
791
|
}
|
|
779
792
|
}
|
|
@@ -846,7 +859,8 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
846
859
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
847
860
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
848
861
|
},
|
|
849
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
862
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
863
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
850
864
|
};
|
|
851
865
|
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
852
866
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
@@ -1081,6 +1095,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1081
1095
|
process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
|
|
1082
1096
|
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
1083
1097
|
}
|
|
1098
|
+
if (config.skipConfigLogging !== void 0) {
|
|
1099
|
+
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
1100
|
+
}
|
|
1084
1101
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
1085
1102
|
for (const key of Object.keys(config.extensions ?? {})) {
|
|
1086
1103
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
@@ -1198,7 +1215,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1198
1215
|
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1199
1216
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1200
1217
|
if (!configFile && !skipLogs) {
|
|
1201
|
-
writeWarning("No Storm
|
|
1218
|
+
writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
1202
1219
|
logLevel: "all"
|
|
1203
1220
|
});
|
|
1204
1221
|
}
|
|
@@ -1236,8 +1253,8 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1236
1253
|
var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1237
1254
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1238
1255
|
setConfigEnv(config);
|
|
1239
|
-
if (!skipLogs) {
|
|
1240
|
-
writeTrace(`\u2699\uFE0F Using Storm configuration:
|
|
1256
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
1257
|
+
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1241
1258
|
${formatLogMessage(config)}`, config);
|
|
1242
1259
|
}
|
|
1243
1260
|
return config;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkKNLWLA7Ocjs = require('./chunk-KNLWLA7O.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkSVQE7WVBcjs = require('./chunk-SVQE7WVB.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkHESFC24Zcjs = require('./chunk-HESFC24Z.cjs');
|
|
@@ -45,12 +45,12 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
var getDefaultConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (root) => {
|
|
48
|
-
let license =
|
|
49
|
-
let homepage =
|
|
48
|
+
let license = _chunkSVQE7WVBcjs.STORM_DEFAULT_LICENSE;
|
|
49
|
+
let homepage = _chunkSVQE7WVBcjs.STORM_DEFAULT_HOMEPAGE;
|
|
50
50
|
let name = void 0;
|
|
51
51
|
let namespace = void 0;
|
|
52
52
|
let repository = void 0;
|
|
53
|
-
const workspaceRoot =
|
|
53
|
+
const workspaceRoot = _chunkKNLWLA7Ocjs.findWorkspaceRoot.call(void 0, root);
|
|
54
54
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
55
55
|
const file = await _promises.readFile.call(void 0, _chunkHESFC24Zcjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
56
56
|
if (file) {
|
|
@@ -83,8 +83,8 @@ var getDefaultConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, asy
|
|
|
83
83
|
repository,
|
|
84
84
|
license,
|
|
85
85
|
homepage,
|
|
86
|
-
docs: `${homepage ||
|
|
87
|
-
licensing: `${homepage ||
|
|
86
|
+
docs: `${homepage || _chunkSVQE7WVBcjs.STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
87
|
+
licensing: `${homepage || _chunkSVQE7WVBcjs.STORM_DEFAULT_HOMEPAGE}/license`
|
|
88
88
|
};
|
|
89
89
|
}, "getDefaultConfig");
|
|
90
90
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkKNLWLA7Ocjs = require('./chunk-KNLWLA7O.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
@@ -32,7 +32,7 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(voi
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
if (result.includes("{workspaceRoot}")) {
|
|
35
|
-
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => (
|
|
35
|
+
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => ( _chunkKNLWLA7Ocjs.findWorkspaceRoot.call(void 0, ))));
|
|
36
36
|
}
|
|
37
37
|
return result;
|
|
38
38
|
}, "applyWorkspaceBaseTokens");
|
|
@@ -102,7 +102,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
102
102
|
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)")
|
|
103
103
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
104
104
|
var StormConfigSchema = z.object({
|
|
105
|
-
$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"),
|
|
105
|
+
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
106
106
|
extends: ExtendsSchema.optional(),
|
|
107
107
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
108
108
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -144,6 +144,7 @@ var StormConfigSchema = z.object({
|
|
|
144
144
|
"trace",
|
|
145
145
|
"all"
|
|
146
146
|
]).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`)."),
|
|
147
|
+
skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
147
148
|
registry: RegistryConfigSchema,
|
|
148
149
|
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."),
|
|
149
150
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkSVQE7WVBcjs = require('./chunk-SVQE7WVB.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkHESFC24Zcjs = require('./chunk-HESFC24Z.cjs');
|
|
@@ -75,23 +75,24 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
|
|
|
75
75
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
76
76
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
77
77
|
},
|
|
78
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunk3NWKPYIGcjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
78
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunk3NWKPYIGcjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
79
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
79
80
|
};
|
|
80
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
81
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkSVQE7WVBcjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
81
82
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
82
83
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
83
84
|
return ret;
|
|
84
85
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
85
|
-
if (config.docs ===
|
|
86
|
-
if (config.homepage ===
|
|
87
|
-
config.docs = `${
|
|
86
|
+
if (config.docs === _chunkSVQE7WVBcjs.STORM_DEFAULT_DOCS) {
|
|
87
|
+
if (config.homepage === _chunkSVQE7WVBcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
88
|
+
config.docs = `${_chunkSVQE7WVBcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
88
89
|
} else {
|
|
89
90
|
config.docs = `${config.homepage}/docs`;
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
|
-
if (config.licensing ===
|
|
93
|
-
if (config.homepage ===
|
|
94
|
-
config.licensing = `${
|
|
93
|
+
if (config.licensing === _chunkSVQE7WVBcjs.STORM_DEFAULT_LICENSING) {
|
|
94
|
+
if (config.homepage === _chunkSVQE7WVBcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
95
|
+
config.licensing = `${_chunkSVQE7WVBcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
95
96
|
} else {
|
|
96
97
|
config.licensing = `${config.homepage}/docs`;
|
|
97
98
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2IKEUEGYcjs = require('./chunk-2IKEUEGY.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSLGVSUEVcjs = require('./chunk-SLGVSUEV.cjs');
|
|
@@ -23,7 +23,7 @@ var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
|
23
23
|
|
|
24
24
|
// src/logger/console.ts
|
|
25
25
|
var getLogFn = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (logLevel = _chunkIRCFHYKZcjs.LogLevel.INFO, config = {}, _chalk = _chunkSLGVSUEVcjs.getChalk.call(void 0, )) => {
|
|
26
|
-
const colors = !_optionalChain([config, 'access', _2 => _2.colors, 'optionalAccess', _3 => _3.dark]) && !_optionalChain([config, 'access', _4 => _4.colors, 'optionalAccess', _5 => _5["base"]]) && !_optionalChain([config, 'access', _6 => _6.colors, 'optionalAccess', _7 => _7["base"], 'optionalAccess', _8 => _8.dark]) ?
|
|
26
|
+
const colors = !_optionalChain([config, 'access', _2 => _2.colors, 'optionalAccess', _3 => _3.dark]) && !_optionalChain([config, 'access', _4 => _4.colors, 'optionalAccess', _5 => _5["base"]]) && !_optionalChain([config, 'access', _6 => _6.colors, 'optionalAccess', _7 => _7["base"], 'optionalAccess', _8 => _8.dark]) ? _chunk2IKEUEGYcjs.DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15["base"]]) ? _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"]]) : _chunk2IKEUEGYcjs.DEFAULT_COLOR_CONFIG;
|
|
27
27
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || _chunkIRCFHYKZcjs.LogLevelLabel.INFO;
|
|
28
28
|
if (logLevel > _chunk3NWKPYIGcjs.getLogLevel.call(void 0, configLogLevel) || logLevel <= _chunkIRCFHYKZcjs.LogLevel.SILENT || _chunk3NWKPYIGcjs.getLogLevel.call(void 0, configLogLevel) <= _chunkIRCFHYKZcjs.LogLevel.SILENT) {
|
|
29
29
|
return (_) => {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
STORM_DEFAULT_DOCS,
|
|
4
4
|
STORM_DEFAULT_HOMEPAGE,
|
|
5
5
|
STORM_DEFAULT_LICENSING
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6T3V5XJK.js";
|
|
7
7
|
import {
|
|
8
8
|
correctPaths
|
|
9
9
|
} from "./chunk-MLUBD3PU.js";
|
|
@@ -75,7 +75,8 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
75
75
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
76
76
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
77
77
|
},
|
|
78
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
78
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
79
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
79
80
|
};
|
|
80
81
|
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
81
82
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
@@ -160,6 +160,9 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
160
160
|
process.env.NX_VERBOSE_LOGGING = String(_chunk3NWKPYIGcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkIRCFHYKZcjs.LogLevel.DEBUG ? true : false);
|
|
161
161
|
process.env.RUST_BACKTRACE = _chunk3NWKPYIGcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkIRCFHYKZcjs.LogLevel.DEBUG ? "full" : "none";
|
|
162
162
|
}
|
|
163
|
+
if (config.skipConfigLogging !== void 0) {
|
|
164
|
+
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
165
|
+
}
|
|
163
166
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
164
167
|
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
165
168
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WMWOH7LS.js";
|
|
4
4
|
import {
|
|
5
5
|
formatLogMessage,
|
|
6
6
|
writeTrace,
|
|
7
7
|
writeWarning
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-23WUCNWX.js";
|
|
9
9
|
import {
|
|
10
10
|
getDefaultConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GZFXEQPB.js";
|
|
12
12
|
import {
|
|
13
13
|
findWorkspaceRoot
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OIEEXHKO.js";
|
|
15
15
|
import {
|
|
16
16
|
setConfigEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-P7Q327IR.js";
|
|
18
18
|
import {
|
|
19
19
|
getConfigEnv,
|
|
20
20
|
getExtensionEnv
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CCO2PASC.js";
|
|
22
22
|
import {
|
|
23
23
|
StormConfigSchema
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6T3V5XJK.js";
|
|
25
25
|
import {
|
|
26
26
|
__name
|
|
27
27
|
} from "./chunk-SHUYVCID.js";
|
|
@@ -41,7 +41,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
41
41
|
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
42
42
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
43
43
|
if (!configFile && !skipLogs) {
|
|
44
|
-
writeWarning("No Storm
|
|
44
|
+
writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
45
45
|
logLevel: "all"
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -79,8 +79,8 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
79
79
|
var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
80
80
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
81
81
|
setConfigEnv(config);
|
|
82
|
-
if (!skipLogs) {
|
|
83
|
-
writeTrace(`\u2699\uFE0F Using Storm configuration:
|
|
82
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
83
|
+
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
84
84
|
${formatLogMessage(config)}`, config);
|
|
85
85
|
}
|
|
86
86
|
return config;
|