@storm-software/workspace-tools 1.34.2 → 1.35.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/index.js +58 -56
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +58 -56
- package/src/executors/design-tokens/executor.js +58 -56
- package/src/executors/tsup/executor.js +58 -56
- package/src/executors/tsup-browser/executor.js +58 -56
- package/src/executors/tsup-neutral/executor.js +58 -56
- package/src/executors/tsup-node/executor.js +58 -56
- package/src/generators/browser-library/generator.js +58 -56
- package/src/generators/config-schema/generator.js +58 -56
- package/src/generators/neutral-library/generator.js +58 -56
- package/src/generators/node-library/generator.js +58 -56
- package/src/generators/preset/generator.js +58 -56
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.34.2](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.34.1...workspace-tools-v1.34.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.34.1](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.34.0...workspace-tools-v1.34.1) (2023-12-22)
|
|
2
9
|
|
|
3
10
|
|
package/index.js
CHANGED
|
@@ -106265,22 +106265,22 @@ module.exports = __toCommonJS(workspace_tools_exports);
|
|
|
106265
106265
|
// packages/config-tools/src/config-file/get-config-file.ts
|
|
106266
106266
|
var import_cosmiconfig = __toESM(require_dist(), 1);
|
|
106267
106267
|
var _static_cache = void 0;
|
|
106268
|
-
var getConfigFileName = (fileName) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search();
|
|
106269
|
-
var getConfigFile = async () => {
|
|
106268
|
+
var getConfigFileName = (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
|
|
106269
|
+
var getConfigFile = async (filePath) => {
|
|
106270
106270
|
if (_static_cache) {
|
|
106271
106271
|
return _static_cache;
|
|
106272
106272
|
}
|
|
106273
|
-
let cosmiconfigResult = await getConfigFileName("storm");
|
|
106273
|
+
let cosmiconfigResult = await getConfigFileName("storm", filePath);
|
|
106274
106274
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
106275
|
-
cosmiconfigResult = await getConfigFileName("storm-software");
|
|
106275
|
+
cosmiconfigResult = await getConfigFileName("storm-software", filePath);
|
|
106276
106276
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
106277
|
-
cosmiconfigResult = await getConfigFileName("storm-stack");
|
|
106277
|
+
cosmiconfigResult = await getConfigFileName("storm-stack", filePath);
|
|
106278
106278
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
106279
|
-
cosmiconfigResult = await getConfigFileName("storm-cloud");
|
|
106279
|
+
cosmiconfigResult = await getConfigFileName("storm-cloud", filePath);
|
|
106280
106280
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
106281
|
-
cosmiconfigResult = await getConfigFileName("acidic");
|
|
106281
|
+
cosmiconfigResult = await getConfigFileName("acidic", filePath);
|
|
106282
106282
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
106283
|
-
cosmiconfigResult = await getConfigFileName("acid");
|
|
106283
|
+
cosmiconfigResult = await getConfigFileName("acid", filePath);
|
|
106284
106284
|
}
|
|
106285
106285
|
}
|
|
106286
106286
|
}
|
|
@@ -109976,8 +109976,8 @@ var ColorConfigSchema = objectType({
|
|
|
109976
109976
|
fatal: stringType().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")
|
|
109977
109977
|
}).describe("Colors used for various workspace elements");
|
|
109978
109978
|
var StormConfigSchema = objectType({
|
|
109979
|
-
name: stringType().trim().toLowerCase().
|
|
109980
|
-
namespace: stringType().trim().toLowerCase().
|
|
109979
|
+
name: stringType().trim().toLowerCase().optional().describe("The name of the package"),
|
|
109980
|
+
namespace: stringType().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
109981
109981
|
organization: stringType().trim().default("storm-software").describe("The organization of the workspace"),
|
|
109982
109982
|
repository: stringType().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
109983
109983
|
license: stringType().trim().default("Apache License 2.0").describe("The root directory of the package"),
|
|
@@ -109994,7 +109994,7 @@ var StormConfigSchema = objectType({
|
|
|
109994
109994
|
ci: booleanType().default(true).describe(
|
|
109995
109995
|
"An indicator specifying if the current environment is a CI environment"
|
|
109996
109996
|
),
|
|
109997
|
-
workspaceRoot: stringType().trim().describe("The root directory of the workspace"),
|
|
109997
|
+
workspaceRoot: stringType().trim().optional().describe("The root directory of the workspace"),
|
|
109998
109998
|
packageDirectory: stringType().trim().optional().describe("The root directory of the package"),
|
|
109999
109999
|
buildDirectory: stringType().trim().default("dist").describe("The build directory for the workspace"),
|
|
110000
110000
|
runtimeDirectory: stringType().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
@@ -110004,7 +110004,7 @@ var StormConfigSchema = objectType({
|
|
|
110004
110004
|
packageManager: enumType(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
|
|
110005
110005
|
timezone: stringType().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
110006
110006
|
locale: stringType().trim().default("en-US").describe("The default locale of the workspace"),
|
|
110007
|
-
logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).
|
|
110007
|
+
logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).default("debug").describe(
|
|
110008
110008
|
"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`)."
|
|
110009
110009
|
),
|
|
110010
110010
|
configFile: stringType().trim().nullable().default(null).describe(
|
|
@@ -110143,6 +110143,7 @@ var getConfigEnv = () => {
|
|
|
110143
110143
|
owner: process.env[`${prefix}OWNER`],
|
|
110144
110144
|
worker: process.env[`${prefix}WORKER`],
|
|
110145
110145
|
organization: process.env[`${prefix}ORGANIZATION`],
|
|
110146
|
+
packageManager: process.env[`${prefix}PACKAGE_MANAGER`],
|
|
110146
110147
|
license: process.env[`${prefix}LICENSE`],
|
|
110147
110148
|
homepage: process.env[`${prefix}HOMEPAGE`],
|
|
110148
110149
|
timezone: process.env[`${prefix}TIMEZONE`] ?? process.env.TZ,
|
|
@@ -110212,51 +110213,52 @@ var setExtensionEnv = (extensionName, extension) => {
|
|
|
110212
110213
|
};
|
|
110213
110214
|
var setConfigEnv = (config) => {
|
|
110214
110215
|
const prefix = `STORM_`;
|
|
110215
|
-
process.env[`${prefix}NAME`] = config.name;
|
|
110216
|
-
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
110217
|
-
process.env[`${prefix}OWNER`] = config.owner;
|
|
110218
|
-
process.env[`${prefix}WORKER`] = config.worker;
|
|
110219
|
-
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
110220
|
-
process.env[`${prefix}
|
|
110221
|
-
process.env[`${prefix}
|
|
110222
|
-
process.env[`${prefix}
|
|
110223
|
-
process.env
|
|
110224
|
-
process.env.
|
|
110225
|
-
process.env
|
|
110226
|
-
process.env
|
|
110227
|
-
process.env.
|
|
110228
|
-
process.env.
|
|
110229
|
-
process.env
|
|
110230
|
-
process.env[`${prefix}
|
|
110231
|
-
process.env
|
|
110232
|
-
process.env.
|
|
110233
|
-
process.env
|
|
110234
|
-
process.env[`${prefix}
|
|
110235
|
-
process.env[`${prefix}
|
|
110236
|
-
process.env[`${prefix}
|
|
110237
|
-
process.env[`${prefix}
|
|
110238
|
-
process.env
|
|
110239
|
-
process.env.
|
|
110240
|
-
process.env
|
|
110241
|
-
process.env
|
|
110242
|
-
process.env.
|
|
110243
|
-
process.env
|
|
110244
|
-
process.env[`${prefix}
|
|
110245
|
-
process.env[`${prefix}
|
|
110246
|
-
process.env[`${prefix}
|
|
110247
|
-
process.env[`${prefix}
|
|
110248
|
-
process.env[`${prefix}
|
|
110249
|
-
process.env[`${prefix}
|
|
110250
|
-
process.env[`${prefix}
|
|
110251
|
-
process.env[`${prefix}
|
|
110252
|
-
process.env[`${prefix}
|
|
110253
|
-
process.env[`${prefix}
|
|
110254
|
-
process.env
|
|
110255
|
-
process.env.
|
|
110216
|
+
config.name && (process.env[`${prefix}NAME`] = config.name);
|
|
110217
|
+
config.namespace && (process.env[`${prefix}NAMESPACE`] = config.namespace);
|
|
110218
|
+
config.owner && (process.env[`${prefix}OWNER`] = config.owner);
|
|
110219
|
+
config.worker && (process.env[`${prefix}WORKER`] = config.worker);
|
|
110220
|
+
config.organization && (process.env[`${prefix}ORGANIZATION`] = config.organization);
|
|
110221
|
+
config.packageManager && (process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager);
|
|
110222
|
+
config.license && (process.env[`${prefix}LICENSE`] = config.license);
|
|
110223
|
+
config.homepage && (process.env[`${prefix}HOMEPAGE`] = config.homepage);
|
|
110224
|
+
config.timezone && (process.env[`${prefix}TIMEZONE`] = config.timezone);
|
|
110225
|
+
config.timezone && (process.env.TZ = config.timezone);
|
|
110226
|
+
config.timezone && (process.env.DEFAULT_TIMEZONE = config.timezone);
|
|
110227
|
+
config.locale && (process.env[`${prefix}LOCALE`] = config.locale);
|
|
110228
|
+
config.locale && (process.env.LOCALE = config.locale);
|
|
110229
|
+
config.locale && (process.env.DEFAULT_LOCALE = config.locale);
|
|
110230
|
+
config.locale && (process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8");
|
|
110231
|
+
config.configFile && (process.env[`${prefix}CONFIG_FILE`] = config.configFile);
|
|
110232
|
+
config.workspaceRoot && (process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot);
|
|
110233
|
+
config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT = config.workspaceRoot);
|
|
110234
|
+
config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot);
|
|
110235
|
+
config.packageDirectory && (process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory);
|
|
110236
|
+
config.buildDirectory && (process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory);
|
|
110237
|
+
config.runtimeVersion && (process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion);
|
|
110238
|
+
config.runtimeDirectory && (process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory);
|
|
110239
|
+
config.env && (process.env[`${prefix}ENV`] = config.env);
|
|
110240
|
+
config.env && (process.env.NODE_ENV = config.env);
|
|
110241
|
+
config.env && (process.env.ENVIRONMENT = config.env);
|
|
110242
|
+
config.ci && (process.env[`${prefix}CI`] = String(config.ci));
|
|
110243
|
+
config.ci && (process.env.CI = String(config.ci));
|
|
110244
|
+
config.ci && (process.env.CONTINUOUS_INTEGRATION = String(config.ci));
|
|
110245
|
+
config.colors.primary && (process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary);
|
|
110246
|
+
config.colors.background && (process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background);
|
|
110247
|
+
config.colors.success && (process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success);
|
|
110248
|
+
config.colors.info && (process.env[`${prefix}COLOR_INFO`] = config.colors.info);
|
|
110249
|
+
config.colors.warning && (process.env[`${prefix}COLOR_WARNING`] = config.colors.warning);
|
|
110250
|
+
config.colors.error && (process.env[`${prefix}COLOR_ERROR`] = config.colors.error);
|
|
110251
|
+
config.colors.fatal && (process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal);
|
|
110252
|
+
config.repository && (process.env[`${prefix}REPOSITORY`] = config.repository);
|
|
110253
|
+
config.branch && (process.env[`${prefix}BRANCH`] = config.branch);
|
|
110254
|
+
config.preMajor && (process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor));
|
|
110255
|
+
config.logLevel && (process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel));
|
|
110256
|
+
config.logLevel && (process.env.LOG_LEVEL = String(config.logLevel));
|
|
110257
|
+
config.logLevel && (process.env.NX_VERBOSE_LOGGING = String(
|
|
110256
110258
|
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
110257
|
-
);
|
|
110258
|
-
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
110259
|
-
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
110259
|
+
));
|
|
110260
|
+
config.logLevel && (process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none");
|
|
110261
|
+
config && (process.env[`${prefix}CONFIG`] = JSON.stringify(config));
|
|
110260
110262
|
Object.keys(config.extensions ?? {}).forEach((key) => {
|
|
110261
110263
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
110262
110264
|
});
|