@storm-software/config-tools 1.8.2 → 1.9.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/CHANGELOG.md +7 -0
- package/declarations.d.ts +15 -0
- package/index.cjs +101 -85
- package/index.js +100 -85
- package/meta.cjs.json +1 -1
- package/meta.esm.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.8.2](https://github.com/storm-software/storm-ops/compare/config-tools-v1.8.1...config-tools-v1.8.2) (2023-12-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **config-tools:** Resolved issue in configuration defaulter function ([92e10c1](https://github.com/storm-software/storm-ops/commit/92e10c1fa0283eaf341f4bc9338628cbdb546eb9))
|
|
7
|
+
|
|
1
8
|
## [1.8.1](https://github.com/storm-software/storm-ops/compare/config-tools-v1.8.0...config-tools-v1.8.1) (2023-12-22)
|
|
2
9
|
|
|
3
10
|
|
package/declarations.d.ts
CHANGED
|
@@ -17,6 +17,9 @@ declare type StormConfig<
|
|
|
17
17
|
};
|
|
18
18
|
export { StormConfig };
|
|
19
19
|
|
|
20
|
+
declare type StormConfigInput = z.input<typeof StormConfigSchema>;
|
|
21
|
+
export { StormConfigInput };
|
|
22
|
+
|
|
20
23
|
/**
|
|
21
24
|
* Find the root of the current monorepo
|
|
22
25
|
*
|
|
@@ -44,6 +47,18 @@ export { findWorkspaceRootSafe };
|
|
|
44
47
|
declare function createConfig(workspaceRoot?: string): StormConfig;
|
|
45
48
|
export { createConfig };
|
|
46
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Get the config file values for the current Storm workspace
|
|
52
|
+
*/
|
|
53
|
+
declare function getConfigFile(): Promise<Partial<StormConfigInput>>;
|
|
54
|
+
export { getConfigFile };
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Load the config file values for the current Storm workspace into environment variables
|
|
58
|
+
*/
|
|
59
|
+
declare function loadStormConfig(workspaceRoot?: string): Promise<void>;
|
|
60
|
+
export { loadStormConfig };
|
|
61
|
+
|
|
47
62
|
/**
|
|
48
63
|
* Type-check to determine if `obj` is a `StormError` object
|
|
49
64
|
*
|
package/index.cjs
CHANGED
|
@@ -46,6 +46,7 @@ __export(src_exports, {
|
|
|
46
46
|
getExtensionEnv: () => getExtensionEnv,
|
|
47
47
|
getLogLevel: () => getLogLevel,
|
|
48
48
|
getLogLevelLabel: () => getLogLevelLabel,
|
|
49
|
+
loadStormConfig: () => loadStormConfig,
|
|
49
50
|
setConfigEnv: () => setConfigEnv,
|
|
50
51
|
setExtensionEnv: () => setExtensionEnv
|
|
51
52
|
});
|
|
@@ -54,22 +55,22 @@ module.exports = __toCommonJS(src_exports);
|
|
|
54
55
|
// packages/config-tools/src/config-file/get-config-file.ts
|
|
55
56
|
var import_cosmiconfig = require("cosmiconfig");
|
|
56
57
|
var _static_cache = void 0;
|
|
57
|
-
var getConfigFileName = (fileName) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search();
|
|
58
|
-
var getConfigFile = async () => {
|
|
58
|
+
var getConfigFileName = (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
|
|
59
|
+
var getConfigFile = async (filePath) => {
|
|
59
60
|
if (_static_cache) {
|
|
60
61
|
return _static_cache;
|
|
61
62
|
}
|
|
62
|
-
let cosmiconfigResult = await getConfigFileName("storm");
|
|
63
|
+
let cosmiconfigResult = await getConfigFileName("storm", filePath);
|
|
63
64
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
64
|
-
cosmiconfigResult = await getConfigFileName("storm-software");
|
|
65
|
+
cosmiconfigResult = await getConfigFileName("storm-software", filePath);
|
|
65
66
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
66
|
-
cosmiconfigResult = await getConfigFileName("storm-stack");
|
|
67
|
+
cosmiconfigResult = await getConfigFileName("storm-stack", filePath);
|
|
67
68
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
68
|
-
cosmiconfigResult = await getConfigFileName("storm-cloud");
|
|
69
|
+
cosmiconfigResult = await getConfigFileName("storm-cloud", filePath);
|
|
69
70
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
70
|
-
cosmiconfigResult = await getConfigFileName("acidic");
|
|
71
|
+
cosmiconfigResult = await getConfigFileName("acidic", filePath);
|
|
71
72
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
72
|
-
cosmiconfigResult = await getConfigFileName("acid");
|
|
73
|
+
cosmiconfigResult = await getConfigFileName("acid", filePath);
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
}
|
|
@@ -186,8 +187,8 @@ var ColorConfigSchema = z.object({
|
|
|
186
187
|
fatal: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")
|
|
187
188
|
}).describe("Colors used for various workspace elements");
|
|
188
189
|
var StormConfigSchema = z.object({
|
|
189
|
-
name: z.string().trim().toLowerCase().
|
|
190
|
-
namespace: z.string().trim().toLowerCase().
|
|
190
|
+
name: z.string().trim().toLowerCase().optional().describe("The name of the package"),
|
|
191
|
+
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
191
192
|
organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
192
193
|
repository: z.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
193
194
|
license: z.string().trim().default("Apache License 2.0").describe("The root directory of the package"),
|
|
@@ -204,7 +205,7 @@ var StormConfigSchema = z.object({
|
|
|
204
205
|
ci: z.boolean().default(true).describe(
|
|
205
206
|
"An indicator specifying if the current environment is a CI environment"
|
|
206
207
|
),
|
|
207
|
-
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
208
|
+
workspaceRoot: z.string().trim().optional().describe("The root directory of the workspace"),
|
|
208
209
|
packageDirectory: z.string().trim().optional().describe("The root directory of the package"),
|
|
209
210
|
buildDirectory: z.string().trim().default("dist").describe("The build directory for the workspace"),
|
|
210
211
|
runtimeDirectory: z.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
@@ -214,7 +215,7 @@ var StormConfigSchema = z.object({
|
|
|
214
215
|
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
|
|
215
216
|
timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
216
217
|
locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
217
|
-
logLevel: z.enum(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).
|
|
218
|
+
logLevel: z.enum(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).default("debug").describe(
|
|
218
219
|
"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`)."
|
|
219
220
|
),
|
|
220
221
|
configFile: z.string().trim().nullable().default(null).describe(
|
|
@@ -353,6 +354,7 @@ var getConfigEnv = () => {
|
|
|
353
354
|
owner: process.env[`${prefix}OWNER`],
|
|
354
355
|
worker: process.env[`${prefix}WORKER`],
|
|
355
356
|
organization: process.env[`${prefix}ORGANIZATION`],
|
|
357
|
+
packageManager: process.env[`${prefix}PACKAGE_MANAGER`],
|
|
356
358
|
license: process.env[`${prefix}LICENSE`],
|
|
357
359
|
homepage: process.env[`${prefix}HOMEPAGE`],
|
|
358
360
|
timezone: process.env[`${prefix}TIMEZONE`] ?? process.env.TZ,
|
|
@@ -398,6 +400,81 @@ var getConfigEnv = () => {
|
|
|
398
400
|
}, config);
|
|
399
401
|
};
|
|
400
402
|
|
|
403
|
+
// packages/config-tools/src/env/set-env.ts
|
|
404
|
+
var setExtensionEnv = (extensionName, extension) => {
|
|
405
|
+
Object.keys(extension ?? {}).forEach((key) => {
|
|
406
|
+
if (extension[key]) {
|
|
407
|
+
let result = key?.replace(
|
|
408
|
+
/([A-Z])+/g,
|
|
409
|
+
(input) => input ? input[0].toUpperCase() + input.slice(1) : ""
|
|
410
|
+
).split(/(?=[A-Z])|[\.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
|
|
411
|
+
let extensionKey;
|
|
412
|
+
if (result.length === 0) {
|
|
413
|
+
return;
|
|
414
|
+
} else if (result.length === 1) {
|
|
415
|
+
extensionKey = result[0].toUpperCase();
|
|
416
|
+
} else {
|
|
417
|
+
extensionKey = result.reduce((ret, part) => {
|
|
418
|
+
return `${ret}_${part.toLowerCase()}`;
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
};
|
|
425
|
+
var setConfigEnv = (config) => {
|
|
426
|
+
const prefix = `STORM_`;
|
|
427
|
+
config.name && (process.env[`${prefix}NAME`] = config.name);
|
|
428
|
+
config.namespace && (process.env[`${prefix}NAMESPACE`] = config.namespace);
|
|
429
|
+
config.owner && (process.env[`${prefix}OWNER`] = config.owner);
|
|
430
|
+
config.worker && (process.env[`${prefix}WORKER`] = config.worker);
|
|
431
|
+
config.organization && (process.env[`${prefix}ORGANIZATION`] = config.organization);
|
|
432
|
+
config.packageManager && (process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager);
|
|
433
|
+
config.license && (process.env[`${prefix}LICENSE`] = config.license);
|
|
434
|
+
config.homepage && (process.env[`${prefix}HOMEPAGE`] = config.homepage);
|
|
435
|
+
config.timezone && (process.env[`${prefix}TIMEZONE`] = config.timezone);
|
|
436
|
+
config.timezone && (process.env.TZ = config.timezone);
|
|
437
|
+
config.timezone && (process.env.DEFAULT_TIMEZONE = config.timezone);
|
|
438
|
+
config.locale && (process.env[`${prefix}LOCALE`] = config.locale);
|
|
439
|
+
config.locale && (process.env.LOCALE = config.locale);
|
|
440
|
+
config.locale && (process.env.DEFAULT_LOCALE = config.locale);
|
|
441
|
+
config.locale && (process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8");
|
|
442
|
+
config.configFile && (process.env[`${prefix}CONFIG_FILE`] = config.configFile);
|
|
443
|
+
config.workspaceRoot && (process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot);
|
|
444
|
+
config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT = config.workspaceRoot);
|
|
445
|
+
config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot);
|
|
446
|
+
config.packageDirectory && (process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory);
|
|
447
|
+
config.buildDirectory && (process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory);
|
|
448
|
+
config.runtimeVersion && (process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion);
|
|
449
|
+
config.runtimeDirectory && (process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory);
|
|
450
|
+
config.env && (process.env[`${prefix}ENV`] = config.env);
|
|
451
|
+
config.env && (process.env.NODE_ENV = config.env);
|
|
452
|
+
config.env && (process.env.ENVIRONMENT = config.env);
|
|
453
|
+
config.ci && (process.env[`${prefix}CI`] = String(config.ci));
|
|
454
|
+
config.ci && (process.env.CI = String(config.ci));
|
|
455
|
+
config.ci && (process.env.CONTINUOUS_INTEGRATION = String(config.ci));
|
|
456
|
+
config.colors.primary && (process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary);
|
|
457
|
+
config.colors.background && (process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background);
|
|
458
|
+
config.colors.success && (process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success);
|
|
459
|
+
config.colors.info && (process.env[`${prefix}COLOR_INFO`] = config.colors.info);
|
|
460
|
+
config.colors.warning && (process.env[`${prefix}COLOR_WARNING`] = config.colors.warning);
|
|
461
|
+
config.colors.error && (process.env[`${prefix}COLOR_ERROR`] = config.colors.error);
|
|
462
|
+
config.colors.fatal && (process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal);
|
|
463
|
+
config.repository && (process.env[`${prefix}REPOSITORY`] = config.repository);
|
|
464
|
+
config.branch && (process.env[`${prefix}BRANCH`] = config.branch);
|
|
465
|
+
config.preMajor && (process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor));
|
|
466
|
+
config.logLevel && (process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel));
|
|
467
|
+
config.logLevel && (process.env.LOG_LEVEL = String(config.logLevel));
|
|
468
|
+
config.logLevel && (process.env.NX_VERBOSE_LOGGING = String(
|
|
469
|
+
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
470
|
+
));
|
|
471
|
+
config.logLevel && (process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none");
|
|
472
|
+
config && (process.env[`${prefix}CONFIG`] = JSON.stringify(config));
|
|
473
|
+
Object.keys(config.extensions ?? {}).forEach((key) => {
|
|
474
|
+
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
475
|
+
});
|
|
476
|
+
};
|
|
477
|
+
|
|
401
478
|
// packages/config-tools/src/create-storm-config.ts
|
|
402
479
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
403
480
|
var _static_cache2 = void 0;
|
|
@@ -441,79 +518,17 @@ var createConfigExtension = (extensionName, schema) => {
|
|
|
441
518
|
_extension_cache.set(extension_cache_key, extension);
|
|
442
519
|
return extension;
|
|
443
520
|
};
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
return;
|
|
456
|
-
} else if (result.length === 1) {
|
|
457
|
-
extensionKey = result[0].toUpperCase();
|
|
458
|
-
} else {
|
|
459
|
-
extensionKey = result.reduce((ret, part) => {
|
|
460
|
-
return `${ret}_${part.toLowerCase()}`;
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
464
|
-
}
|
|
465
|
-
});
|
|
466
|
-
};
|
|
467
|
-
var setConfigEnv = (config) => {
|
|
468
|
-
const prefix = `STORM_`;
|
|
469
|
-
process.env[`${prefix}NAME`] = config.name;
|
|
470
|
-
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
471
|
-
process.env[`${prefix}OWNER`] = config.owner;
|
|
472
|
-
process.env[`${prefix}WORKER`] = config.worker;
|
|
473
|
-
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
474
|
-
process.env[`${prefix}LICENSE`] = config.license;
|
|
475
|
-
process.env[`${prefix}HOMEPAGE`] = config.homepage;
|
|
476
|
-
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
477
|
-
process.env.TZ = config.timezone;
|
|
478
|
-
process.env.DEFAULT_TIMEZONE = config.timezone;
|
|
479
|
-
process.env[`${prefix}LOCALE`] = config.locale;
|
|
480
|
-
process.env.LOCALE = config.locale;
|
|
481
|
-
process.env.DEFAULT_LOCALE = config.locale;
|
|
482
|
-
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
483
|
-
process.env[`${prefix}CONFIG_FILE`] = config.configFile;
|
|
484
|
-
process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot;
|
|
485
|
-
process.env.NX_WORKSPACE_ROOT = config.workspaceRoot;
|
|
486
|
-
process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot;
|
|
487
|
-
process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory;
|
|
488
|
-
process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory;
|
|
489
|
-
process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion;
|
|
490
|
-
process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory;
|
|
491
|
-
process.env[`${prefix}ENV`] = config.env;
|
|
492
|
-
process.env.NODE_ENV = config.env;
|
|
493
|
-
process.env.ENVIRONMENT = config.env;
|
|
494
|
-
process.env[`${prefix}CI`] = String(config.ci);
|
|
495
|
-
process.env.CI = String(config.ci);
|
|
496
|
-
process.env.CONTINUOUS_INTEGRATION = String(config.ci);
|
|
497
|
-
process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
|
|
498
|
-
process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background;
|
|
499
|
-
process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
|
|
500
|
-
process.env[`${prefix}COLOR_INFO`] = config.colors.info;
|
|
501
|
-
process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
|
|
502
|
-
process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
|
|
503
|
-
process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal;
|
|
504
|
-
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
505
|
-
process.env[`${prefix}BRANCH`] = config.branch;
|
|
506
|
-
process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor);
|
|
507
|
-
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
508
|
-
process.env.LOG_LEVEL = String(config.logLevel);
|
|
509
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
510
|
-
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
511
|
-
);
|
|
512
|
-
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
513
|
-
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
514
|
-
Object.keys(config.extensions ?? {}).forEach((key) => {
|
|
515
|
-
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
516
|
-
});
|
|
521
|
+
var loadStormConfig = async (workspaceRoot) => {
|
|
522
|
+
try {
|
|
523
|
+
setConfigEnv(
|
|
524
|
+
StormConfigSchema.parse(await getConfigFile(workspaceRoot))
|
|
525
|
+
);
|
|
526
|
+
} catch (e) {
|
|
527
|
+
console.warn(
|
|
528
|
+
"No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not."
|
|
529
|
+
);
|
|
530
|
+
console.error(e);
|
|
531
|
+
}
|
|
517
532
|
};
|
|
518
533
|
// Annotate the CommonJS export names for ESM import in node:
|
|
519
534
|
0 && (module.exports = {
|
|
@@ -534,6 +549,7 @@ var setConfigEnv = (config) => {
|
|
|
534
549
|
getExtensionEnv,
|
|
535
550
|
getLogLevel,
|
|
536
551
|
getLogLevelLabel,
|
|
552
|
+
loadStormConfig,
|
|
537
553
|
setConfigEnv,
|
|
538
554
|
setExtensionEnv
|
|
539
555
|
});
|
package/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
// packages/config-tools/src/config-file/get-config-file.ts
|
|
2
2
|
import { cosmiconfig } from "cosmiconfig";
|
|
3
3
|
var _static_cache = void 0;
|
|
4
|
-
var getConfigFileName = (fileName) => cosmiconfig(fileName, { cache: true }).search();
|
|
5
|
-
var getConfigFile = async () => {
|
|
4
|
+
var getConfigFileName = (fileName, filePath) => cosmiconfig(fileName, { cache: true }).search(filePath);
|
|
5
|
+
var getConfigFile = async (filePath) => {
|
|
6
6
|
if (_static_cache) {
|
|
7
7
|
return _static_cache;
|
|
8
8
|
}
|
|
9
|
-
let cosmiconfigResult = await getConfigFileName("storm");
|
|
9
|
+
let cosmiconfigResult = await getConfigFileName("storm", filePath);
|
|
10
10
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
11
|
-
cosmiconfigResult = await getConfigFileName("storm-software");
|
|
11
|
+
cosmiconfigResult = await getConfigFileName("storm-software", filePath);
|
|
12
12
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
13
|
-
cosmiconfigResult = await getConfigFileName("storm-stack");
|
|
13
|
+
cosmiconfigResult = await getConfigFileName("storm-stack", filePath);
|
|
14
14
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
15
|
-
cosmiconfigResult = await getConfigFileName("storm-cloud");
|
|
15
|
+
cosmiconfigResult = await getConfigFileName("storm-cloud", filePath);
|
|
16
16
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
17
|
-
cosmiconfigResult = await getConfigFileName("acidic");
|
|
17
|
+
cosmiconfigResult = await getConfigFileName("acidic", filePath);
|
|
18
18
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
19
|
-
cosmiconfigResult = await getConfigFileName("acid");
|
|
19
|
+
cosmiconfigResult = await getConfigFileName("acid", filePath);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -133,8 +133,8 @@ var ColorConfigSchema = z.object({
|
|
|
133
133
|
fatal: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")
|
|
134
134
|
}).describe("Colors used for various workspace elements");
|
|
135
135
|
var StormConfigSchema = z.object({
|
|
136
|
-
name: z.string().trim().toLowerCase().
|
|
137
|
-
namespace: z.string().trim().toLowerCase().
|
|
136
|
+
name: z.string().trim().toLowerCase().optional().describe("The name of the package"),
|
|
137
|
+
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
138
138
|
organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
139
139
|
repository: z.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
140
140
|
license: z.string().trim().default("Apache License 2.0").describe("The root directory of the package"),
|
|
@@ -151,7 +151,7 @@ var StormConfigSchema = z.object({
|
|
|
151
151
|
ci: z.boolean().default(true).describe(
|
|
152
152
|
"An indicator specifying if the current environment is a CI environment"
|
|
153
153
|
),
|
|
154
|
-
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
154
|
+
workspaceRoot: z.string().trim().optional().describe("The root directory of the workspace"),
|
|
155
155
|
packageDirectory: z.string().trim().optional().describe("The root directory of the package"),
|
|
156
156
|
buildDirectory: z.string().trim().default("dist").describe("The build directory for the workspace"),
|
|
157
157
|
runtimeDirectory: z.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
@@ -161,7 +161,7 @@ var StormConfigSchema = z.object({
|
|
|
161
161
|
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
|
|
162
162
|
timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
163
163
|
locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
164
|
-
logLevel: z.enum(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).
|
|
164
|
+
logLevel: z.enum(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).default("debug").describe(
|
|
165
165
|
"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`)."
|
|
166
166
|
),
|
|
167
167
|
configFile: z.string().trim().nullable().default(null).describe(
|
|
@@ -300,6 +300,7 @@ var getConfigEnv = () => {
|
|
|
300
300
|
owner: process.env[`${prefix}OWNER`],
|
|
301
301
|
worker: process.env[`${prefix}WORKER`],
|
|
302
302
|
organization: process.env[`${prefix}ORGANIZATION`],
|
|
303
|
+
packageManager: process.env[`${prefix}PACKAGE_MANAGER`],
|
|
303
304
|
license: process.env[`${prefix}LICENSE`],
|
|
304
305
|
homepage: process.env[`${prefix}HOMEPAGE`],
|
|
305
306
|
timezone: process.env[`${prefix}TIMEZONE`] ?? process.env.TZ,
|
|
@@ -345,6 +346,81 @@ var getConfigEnv = () => {
|
|
|
345
346
|
}, config);
|
|
346
347
|
};
|
|
347
348
|
|
|
349
|
+
// packages/config-tools/src/env/set-env.ts
|
|
350
|
+
var setExtensionEnv = (extensionName, extension) => {
|
|
351
|
+
Object.keys(extension ?? {}).forEach((key) => {
|
|
352
|
+
if (extension[key]) {
|
|
353
|
+
let result = key?.replace(
|
|
354
|
+
/([A-Z])+/g,
|
|
355
|
+
(input) => input ? input[0].toUpperCase() + input.slice(1) : ""
|
|
356
|
+
).split(/(?=[A-Z])|[\.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
|
|
357
|
+
let extensionKey;
|
|
358
|
+
if (result.length === 0) {
|
|
359
|
+
return;
|
|
360
|
+
} else if (result.length === 1) {
|
|
361
|
+
extensionKey = result[0].toUpperCase();
|
|
362
|
+
} else {
|
|
363
|
+
extensionKey = result.reduce((ret, part) => {
|
|
364
|
+
return `${ret}_${part.toLowerCase()}`;
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
};
|
|
371
|
+
var setConfigEnv = (config) => {
|
|
372
|
+
const prefix = `STORM_`;
|
|
373
|
+
config.name && (process.env[`${prefix}NAME`] = config.name);
|
|
374
|
+
config.namespace && (process.env[`${prefix}NAMESPACE`] = config.namespace);
|
|
375
|
+
config.owner && (process.env[`${prefix}OWNER`] = config.owner);
|
|
376
|
+
config.worker && (process.env[`${prefix}WORKER`] = config.worker);
|
|
377
|
+
config.organization && (process.env[`${prefix}ORGANIZATION`] = config.organization);
|
|
378
|
+
config.packageManager && (process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager);
|
|
379
|
+
config.license && (process.env[`${prefix}LICENSE`] = config.license);
|
|
380
|
+
config.homepage && (process.env[`${prefix}HOMEPAGE`] = config.homepage);
|
|
381
|
+
config.timezone && (process.env[`${prefix}TIMEZONE`] = config.timezone);
|
|
382
|
+
config.timezone && (process.env.TZ = config.timezone);
|
|
383
|
+
config.timezone && (process.env.DEFAULT_TIMEZONE = config.timezone);
|
|
384
|
+
config.locale && (process.env[`${prefix}LOCALE`] = config.locale);
|
|
385
|
+
config.locale && (process.env.LOCALE = config.locale);
|
|
386
|
+
config.locale && (process.env.DEFAULT_LOCALE = config.locale);
|
|
387
|
+
config.locale && (process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8");
|
|
388
|
+
config.configFile && (process.env[`${prefix}CONFIG_FILE`] = config.configFile);
|
|
389
|
+
config.workspaceRoot && (process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot);
|
|
390
|
+
config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT = config.workspaceRoot);
|
|
391
|
+
config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot);
|
|
392
|
+
config.packageDirectory && (process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory);
|
|
393
|
+
config.buildDirectory && (process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory);
|
|
394
|
+
config.runtimeVersion && (process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion);
|
|
395
|
+
config.runtimeDirectory && (process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory);
|
|
396
|
+
config.env && (process.env[`${prefix}ENV`] = config.env);
|
|
397
|
+
config.env && (process.env.NODE_ENV = config.env);
|
|
398
|
+
config.env && (process.env.ENVIRONMENT = config.env);
|
|
399
|
+
config.ci && (process.env[`${prefix}CI`] = String(config.ci));
|
|
400
|
+
config.ci && (process.env.CI = String(config.ci));
|
|
401
|
+
config.ci && (process.env.CONTINUOUS_INTEGRATION = String(config.ci));
|
|
402
|
+
config.colors.primary && (process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary);
|
|
403
|
+
config.colors.background && (process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background);
|
|
404
|
+
config.colors.success && (process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success);
|
|
405
|
+
config.colors.info && (process.env[`${prefix}COLOR_INFO`] = config.colors.info);
|
|
406
|
+
config.colors.warning && (process.env[`${prefix}COLOR_WARNING`] = config.colors.warning);
|
|
407
|
+
config.colors.error && (process.env[`${prefix}COLOR_ERROR`] = config.colors.error);
|
|
408
|
+
config.colors.fatal && (process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal);
|
|
409
|
+
config.repository && (process.env[`${prefix}REPOSITORY`] = config.repository);
|
|
410
|
+
config.branch && (process.env[`${prefix}BRANCH`] = config.branch);
|
|
411
|
+
config.preMajor && (process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor));
|
|
412
|
+
config.logLevel && (process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel));
|
|
413
|
+
config.logLevel && (process.env.LOG_LEVEL = String(config.logLevel));
|
|
414
|
+
config.logLevel && (process.env.NX_VERBOSE_LOGGING = String(
|
|
415
|
+
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
416
|
+
));
|
|
417
|
+
config.logLevel && (process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none");
|
|
418
|
+
config && (process.env[`${prefix}CONFIG`] = JSON.stringify(config));
|
|
419
|
+
Object.keys(config.extensions ?? {}).forEach((key) => {
|
|
420
|
+
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
421
|
+
});
|
|
422
|
+
};
|
|
423
|
+
|
|
348
424
|
// packages/config-tools/src/create-storm-config.ts
|
|
349
425
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
350
426
|
var _static_cache2 = void 0;
|
|
@@ -388,79 +464,17 @@ var createConfigExtension = (extensionName, schema) => {
|
|
|
388
464
|
_extension_cache.set(extension_cache_key, extension);
|
|
389
465
|
return extension;
|
|
390
466
|
};
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
return;
|
|
403
|
-
} else if (result.length === 1) {
|
|
404
|
-
extensionKey = result[0].toUpperCase();
|
|
405
|
-
} else {
|
|
406
|
-
extensionKey = result.reduce((ret, part) => {
|
|
407
|
-
return `${ret}_${part.toLowerCase()}`;
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
411
|
-
}
|
|
412
|
-
});
|
|
413
|
-
};
|
|
414
|
-
var setConfigEnv = (config) => {
|
|
415
|
-
const prefix = `STORM_`;
|
|
416
|
-
process.env[`${prefix}NAME`] = config.name;
|
|
417
|
-
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
418
|
-
process.env[`${prefix}OWNER`] = config.owner;
|
|
419
|
-
process.env[`${prefix}WORKER`] = config.worker;
|
|
420
|
-
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
421
|
-
process.env[`${prefix}LICENSE`] = config.license;
|
|
422
|
-
process.env[`${prefix}HOMEPAGE`] = config.homepage;
|
|
423
|
-
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
424
|
-
process.env.TZ = config.timezone;
|
|
425
|
-
process.env.DEFAULT_TIMEZONE = config.timezone;
|
|
426
|
-
process.env[`${prefix}LOCALE`] = config.locale;
|
|
427
|
-
process.env.LOCALE = config.locale;
|
|
428
|
-
process.env.DEFAULT_LOCALE = config.locale;
|
|
429
|
-
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
430
|
-
process.env[`${prefix}CONFIG_FILE`] = config.configFile;
|
|
431
|
-
process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot;
|
|
432
|
-
process.env.NX_WORKSPACE_ROOT = config.workspaceRoot;
|
|
433
|
-
process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot;
|
|
434
|
-
process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory;
|
|
435
|
-
process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory;
|
|
436
|
-
process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion;
|
|
437
|
-
process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory;
|
|
438
|
-
process.env[`${prefix}ENV`] = config.env;
|
|
439
|
-
process.env.NODE_ENV = config.env;
|
|
440
|
-
process.env.ENVIRONMENT = config.env;
|
|
441
|
-
process.env[`${prefix}CI`] = String(config.ci);
|
|
442
|
-
process.env.CI = String(config.ci);
|
|
443
|
-
process.env.CONTINUOUS_INTEGRATION = String(config.ci);
|
|
444
|
-
process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
|
|
445
|
-
process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background;
|
|
446
|
-
process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
|
|
447
|
-
process.env[`${prefix}COLOR_INFO`] = config.colors.info;
|
|
448
|
-
process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
|
|
449
|
-
process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
|
|
450
|
-
process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal;
|
|
451
|
-
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
452
|
-
process.env[`${prefix}BRANCH`] = config.branch;
|
|
453
|
-
process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor);
|
|
454
|
-
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
455
|
-
process.env.LOG_LEVEL = String(config.logLevel);
|
|
456
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
457
|
-
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
458
|
-
);
|
|
459
|
-
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
460
|
-
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
461
|
-
Object.keys(config.extensions ?? {}).forEach((key) => {
|
|
462
|
-
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
463
|
-
});
|
|
467
|
+
var loadStormConfig = async (workspaceRoot) => {
|
|
468
|
+
try {
|
|
469
|
+
setConfigEnv(
|
|
470
|
+
StormConfigSchema.parse(await getConfigFile(workspaceRoot))
|
|
471
|
+
);
|
|
472
|
+
} catch (e) {
|
|
473
|
+
console.warn(
|
|
474
|
+
"No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not."
|
|
475
|
+
);
|
|
476
|
+
console.error(e);
|
|
477
|
+
}
|
|
464
478
|
};
|
|
465
479
|
export {
|
|
466
480
|
ColorConfigSchema,
|
|
@@ -480,6 +494,7 @@ export {
|
|
|
480
494
|
getExtensionEnv,
|
|
481
495
|
getLogLevel,
|
|
482
496
|
getLogLevelLabel,
|
|
497
|
+
loadStormConfig,
|
|
483
498
|
setConfigEnv,
|
|
484
499
|
setExtensionEnv
|
|
485
500
|
};
|
package/meta.cjs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/config-tools/src/config-file/get-config-file.ts":{"bytes":
|
|
1
|
+
{"inputs":{"packages/config-tools/src/config-file/get-config-file.ts":{"bytes":2097,"imports":[{"path":"cosmiconfig","kind":"import-statement","external":true},{"path":"../types","kind":"import-statement","external":true}],"format":"esm"},"packages/config-tools/src/config-file/index.ts":{"bytes":35,"imports":[{"path":"packages/config-tools/src/config-file/get-config-file.ts","kind":"import-statement","original":"./get-config-file"}],"format":"esm"},"packages/config-tools/src/types.ts":{"bytes":1405,"imports":[{"path":"zod","kind":"import-statement","external":true},{"path":"./schema","kind":"import-statement","external":true}],"format":"esm"},"packages/config-tools/src/utilities/find-up.ts":{"bytes":648,"imports":[{"path":"fs","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true}],"format":"esm"},"packages/config-tools/src/utilities/find-workspace-root.ts":{"bytes":1755,"imports":[{"path":"packages/config-tools/src/utilities/find-up.ts","kind":"import-statement","original":"./find-up"}],"format":"esm"},"packages/config-tools/src/schema.ts":{"bytes":5942,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/config-tools/src/utilities/get-default-config.ts":{"bytes":2608,"imports":[{"path":"fs","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"packages/config-tools/src/schema.ts","kind":"import-statement","original":"../schema"},{"path":"../types","kind":"import-statement","external":true},{"path":"packages/config-tools/src/utilities/find-workspace-root.ts","kind":"import-statement","original":"./find-workspace-root"}],"format":"esm"},"packages/config-tools/src/utilities/get-log-level.ts":{"bytes":1409,"imports":[{"path":"packages/config-tools/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/config-tools/src/utilities/index.ts":{"bytes":110,"imports":[{"path":"packages/config-tools/src/utilities/find-workspace-root.ts","kind":"import-statement","original":"./find-workspace-root"},{"path":"packages/config-tools/src/utilities/get-default-config.ts","kind":"import-statement","original":"./get-default-config"},{"path":"packages/config-tools/src/utilities/get-log-level.ts","kind":"import-statement","original":"./get-log-level"}],"format":"esm"},"packages/config-tools/src/env/get-env.ts":{"bytes":4221,"imports":[{"path":"packages/config-tools/src/types.ts","kind":"import-statement","original":"../types"},{"path":"packages/config-tools/src/utilities/index.ts","kind":"import-statement","original":"../utilities"}],"format":"esm"},"packages/config-tools/src/env/set-env.ts":{"bytes":5433,"imports":[{"path":"packages/config-tools/src/types.ts","kind":"import-statement","original":"../types"},{"path":"packages/config-tools/src/utilities/get-log-level.ts","kind":"import-statement","original":"../utilities/get-log-level"}],"format":"esm"},"packages/config-tools/src/create-storm-config.ts":{"bytes":3653,"imports":[{"path":"zod","kind":"import-statement","external":true},{"path":"packages/config-tools/src/config-file/get-config-file.ts","kind":"import-statement","original":"./config-file/get-config-file"},{"path":"packages/config-tools/src/env/get-env.ts","kind":"import-statement","original":"./env/get-env"},{"path":"packages/config-tools/src/env/set-env.ts","kind":"import-statement","original":"./env/set-env"},{"path":"packages/config-tools/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"./types","kind":"import-statement","external":true},{"path":"packages/config-tools/src/utilities/get-default-config.ts","kind":"import-statement","original":"./utilities/get-default-config"}],"format":"esm"},"packages/config-tools/src/env/index.ts":{"bytes":54,"imports":[{"path":"packages/config-tools/src/env/get-env.ts","kind":"import-statement","original":"./get-env"},{"path":"packages/config-tools/src/env/set-env.ts","kind":"import-statement","original":"./set-env"}],"format":"esm"},"packages/config-tools/src/index.ts":{"bytes":399,"imports":[{"path":"packages/config-tools/src/config-file/index.ts","kind":"import-statement","original":"./config-file"},{"path":"packages/config-tools/src/create-storm-config.ts","kind":"import-statement","original":"./create-storm-config"},{"path":"packages/config-tools/src/env/index.ts","kind":"import-statement","original":"./env"},{"path":"packages/config-tools/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/config-tools/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/config-tools/src/utilities/index.ts","kind":"import-statement","original":"./utilities"}],"format":"esm"}},"outputs":{"dist/packages/config-tools/index.cjs":{"imports":[{"path":"cosmiconfig","kind":"require-call","external":true},{"path":"fs","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"fs","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"zod","kind":"require-call","external":true}],"exports":[],"entryPoint":"packages/config-tools/src/index.ts","inputs":{"packages/config-tools/src/index.ts":{"bytesInOutput":941},"packages/config-tools/src/config-file/get-config-file.ts":{"bytesInOutput":1680},"packages/config-tools/src/config-file/index.ts":{"bytesInOutput":0},"packages/config-tools/src/types.ts":{"bytesInOutput":256},"packages/config-tools/src/utilities/find-up.ts":{"bytesInOutput":555},"packages/config-tools/src/utilities/find-workspace-root.ts":{"bytesInOutput":1137},"packages/config-tools/src/utilities/index.ts":{"bytesInOutput":0},"packages/config-tools/src/utilities/get-default-config.ts":{"bytesInOutput":2063},"packages/config-tools/src/schema.ts":{"bytesInOutput":4595},"packages/config-tools/src/utilities/get-log-level.ts":{"bytesInOutput":1029},"packages/config-tools/src/env/get-env.ts":{"bytesInOutput":3121},"packages/config-tools/src/env/set-env.ts":{"bytesInOutput":4553},"packages/config-tools/src/create-storm-config.ts":{"bytesInOutput":1631},"packages/config-tools/src/env/index.ts":{"bytesInOutput":0}},"bytes":24034},"dist/packages/config-tools/utilities/find-workspace-root.cjs":{"imports":[{"path":"fs","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true}],"exports":[],"entryPoint":"packages/config-tools/src/utilities/find-workspace-root.ts","inputs":{"packages/config-tools/src/utilities/find-workspace-root.ts":{"bytesInOutput":1378},"packages/config-tools/src/utilities/find-up.ts":{"bytesInOutput":555}},"bytes":3031}}}
|
package/meta.esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/config-tools/src/config-file/get-config-file.ts":{"bytes":
|
|
1
|
+
{"inputs":{"packages/config-tools/src/config-file/get-config-file.ts":{"bytes":2097,"imports":[{"path":"cosmiconfig","kind":"import-statement","external":true},{"path":"../types","kind":"import-statement","external":true}],"format":"esm"},"packages/config-tools/src/config-file/index.ts":{"bytes":35,"imports":[{"path":"packages/config-tools/src/config-file/get-config-file.ts","kind":"import-statement","original":"./get-config-file"}],"format":"esm"},"packages/config-tools/src/types.ts":{"bytes":1405,"imports":[{"path":"zod","kind":"import-statement","external":true},{"path":"./schema","kind":"import-statement","external":true}],"format":"esm"},"packages/config-tools/src/utilities/find-up.ts":{"bytes":648,"imports":[{"path":"fs","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true}],"format":"esm"},"packages/config-tools/src/utilities/find-workspace-root.ts":{"bytes":1755,"imports":[{"path":"packages/config-tools/src/utilities/find-up.ts","kind":"import-statement","original":"./find-up"}],"format":"esm"},"packages/config-tools/src/schema.ts":{"bytes":5942,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/config-tools/src/utilities/get-default-config.ts":{"bytes":2608,"imports":[{"path":"fs","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"packages/config-tools/src/schema.ts","kind":"import-statement","original":"../schema"},{"path":"../types","kind":"import-statement","external":true},{"path":"packages/config-tools/src/utilities/find-workspace-root.ts","kind":"import-statement","original":"./find-workspace-root"}],"format":"esm"},"packages/config-tools/src/utilities/get-log-level.ts":{"bytes":1409,"imports":[{"path":"packages/config-tools/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/config-tools/src/utilities/index.ts":{"bytes":110,"imports":[{"path":"packages/config-tools/src/utilities/find-workspace-root.ts","kind":"import-statement","original":"./find-workspace-root"},{"path":"packages/config-tools/src/utilities/get-default-config.ts","kind":"import-statement","original":"./get-default-config"},{"path":"packages/config-tools/src/utilities/get-log-level.ts","kind":"import-statement","original":"./get-log-level"}],"format":"esm"},"packages/config-tools/src/env/get-env.ts":{"bytes":4221,"imports":[{"path":"packages/config-tools/src/types.ts","kind":"import-statement","original":"../types"},{"path":"packages/config-tools/src/utilities/index.ts","kind":"import-statement","original":"../utilities"}],"format":"esm"},"packages/config-tools/src/env/set-env.ts":{"bytes":5433,"imports":[{"path":"packages/config-tools/src/types.ts","kind":"import-statement","original":"../types"},{"path":"packages/config-tools/src/utilities/get-log-level.ts","kind":"import-statement","original":"../utilities/get-log-level"}],"format":"esm"},"packages/config-tools/src/create-storm-config.ts":{"bytes":3653,"imports":[{"path":"zod","kind":"import-statement","external":true},{"path":"packages/config-tools/src/config-file/get-config-file.ts","kind":"import-statement","original":"./config-file/get-config-file"},{"path":"packages/config-tools/src/env/get-env.ts","kind":"import-statement","original":"./env/get-env"},{"path":"packages/config-tools/src/env/set-env.ts","kind":"import-statement","original":"./env/set-env"},{"path":"packages/config-tools/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"./types","kind":"import-statement","external":true},{"path":"packages/config-tools/src/utilities/get-default-config.ts","kind":"import-statement","original":"./utilities/get-default-config"}],"format":"esm"},"packages/config-tools/src/env/index.ts":{"bytes":54,"imports":[{"path":"packages/config-tools/src/env/get-env.ts","kind":"import-statement","original":"./get-env"},{"path":"packages/config-tools/src/env/set-env.ts","kind":"import-statement","original":"./set-env"}],"format":"esm"},"packages/config-tools/src/index.ts":{"bytes":399,"imports":[{"path":"packages/config-tools/src/config-file/index.ts","kind":"import-statement","original":"./config-file"},{"path":"packages/config-tools/src/create-storm-config.ts","kind":"import-statement","original":"./create-storm-config"},{"path":"packages/config-tools/src/env/index.ts","kind":"import-statement","original":"./env"},{"path":"packages/config-tools/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/config-tools/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/config-tools/src/utilities/index.ts","kind":"import-statement","original":"./utilities"}],"format":"esm"}},"outputs":{"dist/packages/config-tools/index.js":{"imports":[{"path":"cosmiconfig","kind":"import-statement","external":true},{"path":"fs","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"fs","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true}],"exports":["ColorConfigSchema","DefaultColorConfig","DefaultStormConfig","LogLevel","LogLevelLabel","StormConfigSchema","createConfig","createConfigExtension","createStormConfig","findWorkspaceRoot","findWorkspaceRootSafe","getConfigEnv","getConfigFile","getDefaultConfig","getExtensionEnv","getLogLevel","getLogLevelLabel","loadStormConfig","setConfigEnv","setExtensionEnv"],"entryPoint":"packages/config-tools/src/index.ts","inputs":{"packages/config-tools/src/config-file/get-config-file.ts":{"bytesInOutput":1650},"packages/config-tools/src/config-file/index.ts":{"bytesInOutput":0},"packages/config-tools/src/index.ts":{"bytesInOutput":0},"packages/config-tools/src/types.ts":{"bytesInOutput":256},"packages/config-tools/src/utilities/find-up.ts":{"bytesInOutput":502},"packages/config-tools/src/utilities/find-workspace-root.ts":{"bytesInOutput":1137},"packages/config-tools/src/utilities/index.ts":{"bytesInOutput":0},"packages/config-tools/src/utilities/get-default-config.ts":{"bytesInOutput":2030},"packages/config-tools/src/schema.ts":{"bytesInOutput":4585},"packages/config-tools/src/utilities/get-log-level.ts":{"bytesInOutput":1029},"packages/config-tools/src/env/get-env.ts":{"bytesInOutput":3121},"packages/config-tools/src/env/set-env.ts":{"bytesInOutput":4553},"packages/config-tools/src/create-storm-config.ts":{"bytesInOutput":1631},"packages/config-tools/src/env/index.ts":{"bytesInOutput":0}},"bytes":21466},"dist/packages/config-tools/utilities/find-workspace-root.js":{"imports":[{"path":"fs","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true}],"exports":["findWorkspaceRoot","findWorkspaceRootSafe"],"entryPoint":"packages/config-tools/src/utilities/find-workspace-root.ts","inputs":{"packages/config-tools/src/utilities/find-up.ts":{"bytesInOutput":502},"packages/config-tools/src/utilities/find-workspace-root.ts":{"bytesInOutput":1137}},"bytes":1809}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/config-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
|
|
6
6
|
"repository": {
|