@storm-software/workspace-tools 1.34.1 → 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 +14 -0
- package/index.js +71 -70
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +71 -70
- package/src/executors/design-tokens/executor.js +71 -70
- package/src/executors/tsup/executor.js +71 -70
- package/src/executors/tsup-browser/executor.js +71 -70
- package/src/executors/tsup-neutral/executor.js +71 -70
- package/src/executors/tsup-node/executor.js +71 -70
- package/src/generators/browser-library/generator.js +71 -70
- package/src/generators/config-schema/generator.js +71 -70
- package/src/generators/neutral-library/generator.js +71 -70
- package/src/generators/node-library/generator.js +71 -70
- package/src/generators/preset/generator.js +71 -70
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
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)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **config-tools:** Resolved export issue in type declarations ([9125a40](https://github.com/storm-software/storm-ops/commit/9125a40607db1f58351cd9ef12e86f62b234d753))
|
|
14
|
+
|
|
1
15
|
# [1.34.0](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.33.1...workspace-tools-v1.34.0) (2023-12-22)
|
|
2
16
|
|
|
3
17
|
|
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().describe("The name of the package"),
|
|
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(
|
|
@@ -110029,7 +110029,7 @@ var DefaultColorConfig = {
|
|
|
110029
110029
|
fatal: "#7d1a1a"
|
|
110030
110030
|
};
|
|
110031
110031
|
var DefaultStormConfig = {
|
|
110032
|
-
name: "storm
|
|
110032
|
+
name: "storm",
|
|
110033
110033
|
namespace: "storm-software",
|
|
110034
110034
|
license: "Apache License 2.0",
|
|
110035
110035
|
homepage: "https://stormsoftware.org",
|
|
@@ -110069,19 +110069,18 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
110069
110069
|
packageJson.homepage && (homepage = packageJson.homepage);
|
|
110070
110070
|
}
|
|
110071
110071
|
}
|
|
110072
|
-
return StormConfigSchema.parse(
|
|
110073
|
-
|
|
110074
|
-
|
|
110075
|
-
|
|
110076
|
-
|
|
110077
|
-
|
|
110078
|
-
|
|
110079
|
-
|
|
110080
|
-
|
|
110081
|
-
|
|
110082
|
-
|
|
110083
|
-
|
|
110084
|
-
);
|
|
110072
|
+
return StormConfigSchema.parse({
|
|
110073
|
+
...config,
|
|
110074
|
+
...DefaultStormConfig,
|
|
110075
|
+
colors: { ...config.colors, ...DefaultColorConfig },
|
|
110076
|
+
workspaceRoot,
|
|
110077
|
+
name,
|
|
110078
|
+
namespace,
|
|
110079
|
+
repository,
|
|
110080
|
+
license: license ?? DefaultStormConfig.license,
|
|
110081
|
+
homepage: homepage ?? DefaultStormConfig.homepage,
|
|
110082
|
+
extensions: {}
|
|
110083
|
+
});
|
|
110085
110084
|
};
|
|
110086
110085
|
|
|
110087
110086
|
// packages/config-tools/src/utilities/get-log-level.ts
|
|
@@ -110144,6 +110143,7 @@ var getConfigEnv = () => {
|
|
|
110144
110143
|
owner: process.env[`${prefix}OWNER`],
|
|
110145
110144
|
worker: process.env[`${prefix}WORKER`],
|
|
110146
110145
|
organization: process.env[`${prefix}ORGANIZATION`],
|
|
110146
|
+
packageManager: process.env[`${prefix}PACKAGE_MANAGER`],
|
|
110147
110147
|
license: process.env[`${prefix}LICENSE`],
|
|
110148
110148
|
homepage: process.env[`${prefix}HOMEPAGE`],
|
|
110149
110149
|
timezone: process.env[`${prefix}TIMEZONE`] ?? process.env.TZ,
|
|
@@ -110213,51 +110213,52 @@ var setExtensionEnv = (extensionName, extension) => {
|
|
|
110213
110213
|
};
|
|
110214
110214
|
var setConfigEnv = (config) => {
|
|
110215
110215
|
const prefix = `STORM_`;
|
|
110216
|
-
process.env[`${prefix}NAME`] = config.name;
|
|
110217
|
-
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
110218
|
-
process.env[`${prefix}OWNER`] = config.owner;
|
|
110219
|
-
process.env[`${prefix}WORKER`] = config.worker;
|
|
110220
|
-
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
110221
|
-
process.env[`${prefix}
|
|
110222
|
-
process.env[`${prefix}
|
|
110223
|
-
process.env[`${prefix}
|
|
110224
|
-
process.env
|
|
110225
|
-
process.env.
|
|
110226
|
-
process.env
|
|
110227
|
-
process.env
|
|
110228
|
-
process.env.
|
|
110229
|
-
process.env.
|
|
110230
|
-
process.env
|
|
110231
|
-
process.env[`${prefix}
|
|
110232
|
-
process.env
|
|
110233
|
-
process.env.
|
|
110234
|
-
process.env
|
|
110235
|
-
process.env[`${prefix}
|
|
110236
|
-
process.env[`${prefix}
|
|
110237
|
-
process.env[`${prefix}
|
|
110238
|
-
process.env[`${prefix}
|
|
110239
|
-
process.env
|
|
110240
|
-
process.env.
|
|
110241
|
-
process.env
|
|
110242
|
-
process.env
|
|
110243
|
-
process.env.
|
|
110244
|
-
process.env
|
|
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[`${prefix}
|
|
110255
|
-
process.env
|
|
110256
|
-
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(
|
|
110257
110258
|
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
110258
|
-
);
|
|
110259
|
-
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
110260
|
-
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));
|
|
110261
110262
|
Object.keys(config.extensions ?? {}).forEach((key) => {
|
|
110262
110263
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
110263
110264
|
});
|