@storm-software/workspace-tools 1.43.9 → 1.43.11
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 +14 -0
- package/index.js +37 -49
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +37 -49
- package/src/executors/design-tokens/executor.js +37 -49
- package/src/executors/tsup/executor.js +37 -49
- package/src/executors/tsup-browser/executor.js +37 -49
- package/src/executors/tsup-neutral/executor.js +37 -49
- package/src/executors/tsup-node/executor.js +37 -49
- package/src/generators/browser-library/generator.js +37 -49
- package/src/generators/config-schema/generator.js +37 -49
- package/src/generators/neutral-library/generator.js +37 -49
- package/src/generators/node-library/generator.js +37 -49
- package/src/generators/preset/generator.js +37 -49
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.43.10](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.43.9...workspace-tools-v1.43.10) (2024-01-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **config-tools:** Ehanced config values assignement logic ([d66dcf7](https://github.com/storm-software/storm-ops/commit/d66dcf7500d15bc85065cb5676a1fb585d44d94b))
|
|
7
|
+
|
|
8
|
+
## [1.43.9](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.43.8...workspace-tools-v1.43.9) (2024-01-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **config-tools:** Added code to print out config values added ([ea56410](https://github.com/storm-software/storm-ops/commit/ea56410f9e7e9f3e4f68268395a13127a1653d2d))
|
|
14
|
+
|
|
1
15
|
## [1.43.8](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.43.7...workspace-tools-v1.43.8) (2024-01-17)
|
|
2
16
|
|
|
3
17
|
|
package/index.js
CHANGED
|
@@ -126417,29 +126417,6 @@ var getConfigFile = async (filePath) => {
|
|
|
126417
126417
|
return config;
|
|
126418
126418
|
};
|
|
126419
126419
|
|
|
126420
|
-
// packages/config-tools/src/types.ts
|
|
126421
|
-
var LogLevel = {
|
|
126422
|
-
SILENT: 0,
|
|
126423
|
-
FATAL: 10,
|
|
126424
|
-
ERROR: 20,
|
|
126425
|
-
WARN: 30,
|
|
126426
|
-
INFO: 40,
|
|
126427
|
-
SUCCESS: 45,
|
|
126428
|
-
DEBUG: 60,
|
|
126429
|
-
TRACE: 70,
|
|
126430
|
-
ALL: 100
|
|
126431
|
-
};
|
|
126432
|
-
var LogLevelLabel = {
|
|
126433
|
-
SILENT: "silent",
|
|
126434
|
-
FATAL: "fatal",
|
|
126435
|
-
ERROR: "error",
|
|
126436
|
-
WARN: "warn",
|
|
126437
|
-
INFO: "info",
|
|
126438
|
-
DEBUG: "debug",
|
|
126439
|
-
TRACE: "trace",
|
|
126440
|
-
ALL: "all"
|
|
126441
|
-
};
|
|
126442
|
-
|
|
126443
126420
|
// packages/config-tools/src/utilities/find-up.ts
|
|
126444
126421
|
var import_node_fs = require("node:fs");
|
|
126445
126422
|
var import_node_path = require("node:path");
|
|
@@ -130170,6 +130147,29 @@ var DefaultStormConfig = {
|
|
|
130170
130147
|
extensions: {}
|
|
130171
130148
|
};
|
|
130172
130149
|
|
|
130150
|
+
// packages/config-tools/src/types.ts
|
|
130151
|
+
var LogLevel = {
|
|
130152
|
+
SILENT: 0,
|
|
130153
|
+
FATAL: 10,
|
|
130154
|
+
ERROR: 20,
|
|
130155
|
+
WARN: 30,
|
|
130156
|
+
INFO: 40,
|
|
130157
|
+
SUCCESS: 45,
|
|
130158
|
+
DEBUG: 60,
|
|
130159
|
+
TRACE: 70,
|
|
130160
|
+
ALL: 100
|
|
130161
|
+
};
|
|
130162
|
+
var LogLevelLabel = {
|
|
130163
|
+
SILENT: "silent",
|
|
130164
|
+
FATAL: "fatal",
|
|
130165
|
+
ERROR: "error",
|
|
130166
|
+
WARN: "warn",
|
|
130167
|
+
INFO: "info",
|
|
130168
|
+
DEBUG: "debug",
|
|
130169
|
+
TRACE: "trace",
|
|
130170
|
+
ALL: "all"
|
|
130171
|
+
};
|
|
130172
|
+
|
|
130173
130173
|
// packages/config-tools/src/utilities/get-log-level.ts
|
|
130174
130174
|
var getLogLevel = (label) => {
|
|
130175
130175
|
switch (label) {
|
|
@@ -130502,16 +130502,6 @@ var setConfigEnv = (config) => {
|
|
|
130502
130502
|
};
|
|
130503
130503
|
|
|
130504
130504
|
// packages/config-tools/src/env/get-env.ts
|
|
130505
|
-
var getExtensionEnv = (extensionName) => {
|
|
130506
|
-
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
130507
|
-
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
130508
|
-
const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
130509
|
-
if (name) {
|
|
130510
|
-
ret[name] = process.env[key];
|
|
130511
|
-
}
|
|
130512
|
-
return ret;
|
|
130513
|
-
}, {});
|
|
130514
|
-
};
|
|
130515
130505
|
var getConfigEnv = () => {
|
|
130516
130506
|
const prefix = "STORM_";
|
|
130517
130507
|
let config = {
|
|
@@ -130532,7 +130522,9 @@ var getConfigEnv = () => {
|
|
|
130532
130522
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
130533
130523
|
runtimeDirectory: process.env[`${prefix}RUNTIME_DIRECTORY`],
|
|
130534
130524
|
env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
130535
|
-
ci:
|
|
130525
|
+
ci: process.env[`${prefix}CI`] !== void 0 ? Boolean(
|
|
130526
|
+
process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
|
|
130527
|
+
) : void 0,
|
|
130536
130528
|
colors: {
|
|
130537
130529
|
primary: process.env[`${prefix}COLOR_PRIMARY`],
|
|
130538
130530
|
background: process.env[`${prefix}COLOR_BACKGROUND`],
|
|
@@ -130544,9 +130536,8 @@ var getConfigEnv = () => {
|
|
|
130544
130536
|
},
|
|
130545
130537
|
repository: process.env[`${prefix}REPOSITORY`],
|
|
130546
130538
|
branch: process.env[`${prefix}BRANCH`],
|
|
130547
|
-
preMajor: Boolean(process.env[`${prefix}PRE_MAJOR`]),
|
|
130548
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] :
|
|
130549
|
-
extensions: {}
|
|
130539
|
+
preMajor: process.env[`${prefix}PRE_MAJOR`] !== void 0 ? Boolean(process.env[`${prefix}PRE_MAJOR`]) : void 0,
|
|
130540
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
130550
130541
|
};
|
|
130551
130542
|
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
130552
130543
|
if (serializedConfig) {
|
|
@@ -130558,14 +130549,7 @@ var getConfigEnv = () => {
|
|
|
130558
130549
|
extensions: { ...config.extensions, ...parsed.extensions }
|
|
130559
130550
|
};
|
|
130560
130551
|
}
|
|
130561
|
-
|
|
130562
|
-
return Object.keys(process.env).filter((key) => key.startsWith(extensionPrefix)).reduce((ret, key) => {
|
|
130563
|
-
const extensionName = key.substring(prefix.length, key.indexOf("_", prefix.length)).split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
130564
|
-
if (extensionName) {
|
|
130565
|
-
ret.extensions[extensionName] = getExtensionEnv(extensionName);
|
|
130566
|
-
}
|
|
130567
|
-
return ret;
|
|
130568
|
-
}, config);
|
|
130552
|
+
return config;
|
|
130569
130553
|
};
|
|
130570
130554
|
|
|
130571
130555
|
// packages/config-tools/src/create-storm-config.ts
|
|
@@ -130574,15 +130558,19 @@ var loadStormConfig = async (workspaceRoot) => {
|
|
|
130574
130558
|
if (!_workspaceRoot) {
|
|
130575
130559
|
_workspaceRoot = findWorkspaceRoot();
|
|
130576
130560
|
}
|
|
130577
|
-
const configFile =
|
|
130578
|
-
|
|
130579
|
-
|
|
130580
|
-
|
|
130561
|
+
const configFile = await getConfigFile(_workspaceRoot);
|
|
130562
|
+
const configEnv = getConfigEnv();
|
|
130563
|
+
for (const key of Object.keys(configEnv)) {
|
|
130564
|
+
if (configEnv[key] !== void 0 && configEnv[key] !== null) {
|
|
130565
|
+
configFile[key] = configEnv[key];
|
|
130566
|
+
}
|
|
130567
|
+
}
|
|
130581
130568
|
const config = StormConfigSchema.parse(configFile);
|
|
130582
130569
|
setConfigEnv(config);
|
|
130583
130570
|
console.debug("\n\n");
|
|
130584
130571
|
console.debug(`Loaded Storm config from ${config.configFile}`);
|
|
130585
130572
|
for (const key of Object.keys(configFile)) {
|
|
130573
|
+
console.debug(` ----- ${key} ----- `);
|
|
130586
130574
|
console.debug(configFile[key]);
|
|
130587
130575
|
}
|
|
130588
130576
|
console.debug("\n\n");
|