@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
|
@@ -26265,22 +26265,22 @@ var path = __toESM(require("path"));
|
|
|
26265
26265
|
// packages/config-tools/src/config-file/get-config-file.ts
|
|
26266
26266
|
var import_cosmiconfig = __toESM(require_dist(), 1);
|
|
26267
26267
|
var _static_cache = void 0;
|
|
26268
|
-
var getConfigFileName = (fileName) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search();
|
|
26269
|
-
var getConfigFile = async () => {
|
|
26268
|
+
var getConfigFileName = (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
|
|
26269
|
+
var getConfigFile = async (filePath) => {
|
|
26270
26270
|
if (_static_cache) {
|
|
26271
26271
|
return _static_cache;
|
|
26272
26272
|
}
|
|
26273
|
-
let cosmiconfigResult = await getConfigFileName("storm");
|
|
26273
|
+
let cosmiconfigResult = await getConfigFileName("storm", filePath);
|
|
26274
26274
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
26275
|
-
cosmiconfigResult = await getConfigFileName("storm-software");
|
|
26275
|
+
cosmiconfigResult = await getConfigFileName("storm-software", filePath);
|
|
26276
26276
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
26277
|
-
cosmiconfigResult = await getConfigFileName("storm-stack");
|
|
26277
|
+
cosmiconfigResult = await getConfigFileName("storm-stack", filePath);
|
|
26278
26278
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
26279
|
-
cosmiconfigResult = await getConfigFileName("storm-cloud");
|
|
26279
|
+
cosmiconfigResult = await getConfigFileName("storm-cloud", filePath);
|
|
26280
26280
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
26281
|
-
cosmiconfigResult = await getConfigFileName("acidic");
|
|
26281
|
+
cosmiconfigResult = await getConfigFileName("acidic", filePath);
|
|
26282
26282
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
26283
|
-
cosmiconfigResult = await getConfigFileName("acid");
|
|
26283
|
+
cosmiconfigResult = await getConfigFileName("acid", filePath);
|
|
26284
26284
|
}
|
|
26285
26285
|
}
|
|
26286
26286
|
}
|
|
@@ -29976,8 +29976,8 @@ var ColorConfigSchema = objectType({
|
|
|
29976
29976
|
fatal: stringType().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")
|
|
29977
29977
|
}).describe("Colors used for various workspace elements");
|
|
29978
29978
|
var StormConfigSchema = objectType({
|
|
29979
|
-
name: stringType().trim().toLowerCase().describe("The name of the package"),
|
|
29980
|
-
namespace: stringType().trim().toLowerCase().
|
|
29979
|
+
name: stringType().trim().toLowerCase().optional().describe("The name of the package"),
|
|
29980
|
+
namespace: stringType().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
29981
29981
|
organization: stringType().trim().default("storm-software").describe("The organization of the workspace"),
|
|
29982
29982
|
repository: stringType().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
29983
29983
|
license: stringType().trim().default("Apache License 2.0").describe("The root directory of the package"),
|
|
@@ -29994,7 +29994,7 @@ var StormConfigSchema = objectType({
|
|
|
29994
29994
|
ci: booleanType().default(true).describe(
|
|
29995
29995
|
"An indicator specifying if the current environment is a CI environment"
|
|
29996
29996
|
),
|
|
29997
|
-
workspaceRoot: stringType().trim().describe("The root directory of the workspace"),
|
|
29997
|
+
workspaceRoot: stringType().trim().optional().describe("The root directory of the workspace"),
|
|
29998
29998
|
packageDirectory: stringType().trim().optional().describe("The root directory of the package"),
|
|
29999
29999
|
buildDirectory: stringType().trim().default("dist").describe("The build directory for the workspace"),
|
|
30000
30000
|
runtimeDirectory: stringType().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
@@ -30004,7 +30004,7 @@ var StormConfigSchema = objectType({
|
|
|
30004
30004
|
packageManager: enumType(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
|
|
30005
30005
|
timezone: stringType().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
30006
30006
|
locale: stringType().trim().default("en-US").describe("The default locale of the workspace"),
|
|
30007
|
-
logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).
|
|
30007
|
+
logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).default("debug").describe(
|
|
30008
30008
|
"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`)."
|
|
30009
30009
|
),
|
|
30010
30010
|
configFile: stringType().trim().nullable().default(null).describe(
|
|
@@ -30029,7 +30029,7 @@ var DefaultColorConfig = {
|
|
|
30029
30029
|
fatal: "#7d1a1a"
|
|
30030
30030
|
};
|
|
30031
30031
|
var DefaultStormConfig = {
|
|
30032
|
-
name: "storm
|
|
30032
|
+
name: "storm",
|
|
30033
30033
|
namespace: "storm-software",
|
|
30034
30034
|
license: "Apache License 2.0",
|
|
30035
30035
|
homepage: "https://stormsoftware.org",
|
|
@@ -30069,19 +30069,18 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
30069
30069
|
packageJson.homepage && (homepage = packageJson.homepage);
|
|
30070
30070
|
}
|
|
30071
30071
|
}
|
|
30072
|
-
return StormConfigSchema.parse(
|
|
30073
|
-
|
|
30074
|
-
|
|
30075
|
-
|
|
30076
|
-
|
|
30077
|
-
|
|
30078
|
-
|
|
30079
|
-
|
|
30080
|
-
|
|
30081
|
-
|
|
30082
|
-
|
|
30083
|
-
|
|
30084
|
-
);
|
|
30072
|
+
return StormConfigSchema.parse({
|
|
30073
|
+
...config,
|
|
30074
|
+
...DefaultStormConfig,
|
|
30075
|
+
colors: { ...config.colors, ...DefaultColorConfig },
|
|
30076
|
+
workspaceRoot,
|
|
30077
|
+
name,
|
|
30078
|
+
namespace,
|
|
30079
|
+
repository,
|
|
30080
|
+
license: license ?? DefaultStormConfig.license,
|
|
30081
|
+
homepage: homepage ?? DefaultStormConfig.homepage,
|
|
30082
|
+
extensions: {}
|
|
30083
|
+
});
|
|
30085
30084
|
};
|
|
30086
30085
|
|
|
30087
30086
|
// packages/config-tools/src/utilities/get-log-level.ts
|
|
@@ -30144,6 +30143,7 @@ var getConfigEnv = () => {
|
|
|
30144
30143
|
owner: process.env[`${prefix}OWNER`],
|
|
30145
30144
|
worker: process.env[`${prefix}WORKER`],
|
|
30146
30145
|
organization: process.env[`${prefix}ORGANIZATION`],
|
|
30146
|
+
packageManager: process.env[`${prefix}PACKAGE_MANAGER`],
|
|
30147
30147
|
license: process.env[`${prefix}LICENSE`],
|
|
30148
30148
|
homepage: process.env[`${prefix}HOMEPAGE`],
|
|
30149
30149
|
timezone: process.env[`${prefix}TIMEZONE`] ?? process.env.TZ,
|
|
@@ -30213,51 +30213,52 @@ var setExtensionEnv = (extensionName, extension) => {
|
|
|
30213
30213
|
};
|
|
30214
30214
|
var setConfigEnv = (config) => {
|
|
30215
30215
|
const prefix = `STORM_`;
|
|
30216
|
-
process.env[`${prefix}NAME`] = config.name;
|
|
30217
|
-
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
30218
|
-
process.env[`${prefix}OWNER`] = config.owner;
|
|
30219
|
-
process.env[`${prefix}WORKER`] = config.worker;
|
|
30220
|
-
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
30221
|
-
process.env[`${prefix}
|
|
30222
|
-
process.env[`${prefix}
|
|
30223
|
-
process.env[`${prefix}
|
|
30224
|
-
process.env
|
|
30225
|
-
process.env.
|
|
30226
|
-
process.env
|
|
30227
|
-
process.env
|
|
30228
|
-
process.env.
|
|
30229
|
-
process.env.
|
|
30230
|
-
process.env
|
|
30231
|
-
process.env[`${prefix}
|
|
30232
|
-
process.env
|
|
30233
|
-
process.env.
|
|
30234
|
-
process.env
|
|
30235
|
-
process.env[`${prefix}
|
|
30236
|
-
process.env[`${prefix}
|
|
30237
|
-
process.env[`${prefix}
|
|
30238
|
-
process.env[`${prefix}
|
|
30239
|
-
process.env
|
|
30240
|
-
process.env.
|
|
30241
|
-
process.env
|
|
30242
|
-
process.env
|
|
30243
|
-
process.env.
|
|
30244
|
-
process.env
|
|
30245
|
-
process.env[`${prefix}
|
|
30246
|
-
process.env[`${prefix}
|
|
30247
|
-
process.env[`${prefix}
|
|
30248
|
-
process.env[`${prefix}
|
|
30249
|
-
process.env[`${prefix}
|
|
30250
|
-
process.env[`${prefix}
|
|
30251
|
-
process.env[`${prefix}
|
|
30252
|
-
process.env[`${prefix}
|
|
30253
|
-
process.env[`${prefix}
|
|
30254
|
-
process.env[`${prefix}
|
|
30255
|
-
process.env
|
|
30256
|
-
process.env.
|
|
30216
|
+
config.name && (process.env[`${prefix}NAME`] = config.name);
|
|
30217
|
+
config.namespace && (process.env[`${prefix}NAMESPACE`] = config.namespace);
|
|
30218
|
+
config.owner && (process.env[`${prefix}OWNER`] = config.owner);
|
|
30219
|
+
config.worker && (process.env[`${prefix}WORKER`] = config.worker);
|
|
30220
|
+
config.organization && (process.env[`${prefix}ORGANIZATION`] = config.organization);
|
|
30221
|
+
config.packageManager && (process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager);
|
|
30222
|
+
config.license && (process.env[`${prefix}LICENSE`] = config.license);
|
|
30223
|
+
config.homepage && (process.env[`${prefix}HOMEPAGE`] = config.homepage);
|
|
30224
|
+
config.timezone && (process.env[`${prefix}TIMEZONE`] = config.timezone);
|
|
30225
|
+
config.timezone && (process.env.TZ = config.timezone);
|
|
30226
|
+
config.timezone && (process.env.DEFAULT_TIMEZONE = config.timezone);
|
|
30227
|
+
config.locale && (process.env[`${prefix}LOCALE`] = config.locale);
|
|
30228
|
+
config.locale && (process.env.LOCALE = config.locale);
|
|
30229
|
+
config.locale && (process.env.DEFAULT_LOCALE = config.locale);
|
|
30230
|
+
config.locale && (process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8");
|
|
30231
|
+
config.configFile && (process.env[`${prefix}CONFIG_FILE`] = config.configFile);
|
|
30232
|
+
config.workspaceRoot && (process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot);
|
|
30233
|
+
config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT = config.workspaceRoot);
|
|
30234
|
+
config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot);
|
|
30235
|
+
config.packageDirectory && (process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory);
|
|
30236
|
+
config.buildDirectory && (process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory);
|
|
30237
|
+
config.runtimeVersion && (process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion);
|
|
30238
|
+
config.runtimeDirectory && (process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory);
|
|
30239
|
+
config.env && (process.env[`${prefix}ENV`] = config.env);
|
|
30240
|
+
config.env && (process.env.NODE_ENV = config.env);
|
|
30241
|
+
config.env && (process.env.ENVIRONMENT = config.env);
|
|
30242
|
+
config.ci && (process.env[`${prefix}CI`] = String(config.ci));
|
|
30243
|
+
config.ci && (process.env.CI = String(config.ci));
|
|
30244
|
+
config.ci && (process.env.CONTINUOUS_INTEGRATION = String(config.ci));
|
|
30245
|
+
config.colors.primary && (process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary);
|
|
30246
|
+
config.colors.background && (process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background);
|
|
30247
|
+
config.colors.success && (process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success);
|
|
30248
|
+
config.colors.info && (process.env[`${prefix}COLOR_INFO`] = config.colors.info);
|
|
30249
|
+
config.colors.warning && (process.env[`${prefix}COLOR_WARNING`] = config.colors.warning);
|
|
30250
|
+
config.colors.error && (process.env[`${prefix}COLOR_ERROR`] = config.colors.error);
|
|
30251
|
+
config.colors.fatal && (process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal);
|
|
30252
|
+
config.repository && (process.env[`${prefix}REPOSITORY`] = config.repository);
|
|
30253
|
+
config.branch && (process.env[`${prefix}BRANCH`] = config.branch);
|
|
30254
|
+
config.preMajor && (process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor));
|
|
30255
|
+
config.logLevel && (process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel));
|
|
30256
|
+
config.logLevel && (process.env.LOG_LEVEL = String(config.logLevel));
|
|
30257
|
+
config.logLevel && (process.env.NX_VERBOSE_LOGGING = String(
|
|
30257
30258
|
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
30258
|
-
);
|
|
30259
|
-
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
30260
|
-
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
30259
|
+
));
|
|
30260
|
+
config.logLevel && (process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none");
|
|
30261
|
+
config && (process.env[`${prefix}CONFIG`] = JSON.stringify(config));
|
|
30261
30262
|
Object.keys(config.extensions ?? {}).forEach((key) => {
|
|
30262
30263
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
30263
30264
|
});
|