@storm-software/workspace-tools 1.43.10 → 1.43.12
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 +35 -45
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +29 -45
- package/src/executors/design-tokens/executor.js +29 -45
- package/src/executors/tsup/executor.js +35 -45
- package/src/executors/tsup-browser/executor.js +35 -45
- package/src/executors/tsup-neutral/executor.js +35 -45
- package/src/executors/tsup-node/executor.js +35 -45
- package/src/generators/browser-library/generator.js +29 -45
- package/src/generators/config-schema/generator.js +29 -45
- package/src/generators/neutral-library/generator.js +29 -45
- package/src/generators/node-library/generator.js +29 -45
- package/src/generators/preset/generator.js +29 -45
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.43.11](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.43.10...workspace-tools-v1.43.11) (2024-01-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **config-tools:** Fixed config value defaulting issue for booleans ([c54c60b](https://github.com/storm-software/storm-ops/commit/c54c60b1ddd533530571dd41fd9b6502c1cb2cb8))
|
|
7
|
+
|
|
8
|
+
## [1.43.10](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.43.9...workspace-tools-v1.43.10) (2024-01-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **config-tools:** Ehanced config values assignement logic ([d66dcf7](https://github.com/storm-software/storm-ops/commit/d66dcf7500d15bc85065cb5676a1fb585d44d94b))
|
|
14
|
+
|
|
1
15
|
## [1.43.9](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.43.8...workspace-tools-v1.43.9) (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
|
|
@@ -137867,7 +137851,9 @@ ${externalDependencies.map((dep) => {
|
|
|
137867
137851
|
}
|
|
137868
137852
|
return ret;
|
|
137869
137853
|
}, {});
|
|
137854
|
+
console.log("Conditional before checking entry points");
|
|
137870
137855
|
if (options.generatePackageJson !== false) {
|
|
137856
|
+
console.log("Checking entry points");
|
|
137871
137857
|
const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
137872
137858
|
packageJson.dependencies = void 0;
|
|
137873
137859
|
for (const externalDependency of externalDependencies) {
|
|
@@ -137881,6 +137867,7 @@ ${externalDependencies.map((dep) => {
|
|
|
137881
137867
|
packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
137882
137868
|
}
|
|
137883
137869
|
}
|
|
137870
|
+
console.log("Checking entry points - internalDependencies");
|
|
137884
137871
|
for (const packageName of internalDependencies) {
|
|
137885
137872
|
if (!packageJson?.devDependencies?.[packageName]) {
|
|
137886
137873
|
packageJson.dependencies ??= {};
|
|
@@ -137919,6 +137906,7 @@ ${externalDependencies.map((dep) => {
|
|
|
137919
137906
|
},
|
|
137920
137907
|
"./package.json": "./package.json"
|
|
137921
137908
|
};
|
|
137909
|
+
console.log("Checking entry points - packageJson.exports");
|
|
137922
137910
|
packageJson.exports = Object.keys(entry).reduce((ret, key) => {
|
|
137923
137911
|
let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
|
|
137924
137912
|
packageJsonKey = packageJsonKey.replaceAll("/index", "");
|
|
@@ -137975,6 +137963,7 @@ ${externalDependencies.map((dep) => {
|
|
|
137975
137963
|
packageJson.keywords ??= workspacePackageJson.keywords;
|
|
137976
137964
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
137977
137965
|
packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_node_path3.join)("packages", context.projectName);
|
|
137966
|
+
console.log("Checking entry points - packageJsonPath");
|
|
137978
137967
|
const packageJsonPath = (0, import_node_path3.join)(context.root, options.outputPath, "package.json");
|
|
137979
137968
|
writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
|
|
137980
137969
|
(0, import_node_fs2.writeFileSync)(
|
|
@@ -137987,6 +137976,7 @@ ${externalDependencies.map((dep) => {
|
|
|
137987
137976
|
} else {
|
|
137988
137977
|
writeWarning(config, "Skipping writing to package.json file");
|
|
137989
137978
|
}
|
|
137979
|
+
console.log("Checking entry points - options.includeSrc");
|
|
137990
137980
|
if (options.includeSrc === true) {
|
|
137991
137981
|
const files = globSync([
|
|
137992
137982
|
(0, import_devkit3.joinPathFragments)(context.root, options.outputPath, "src/**/*.ts"),
|