@storm-software/workspace-tools 1.145.0 → 1.146.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/README.md +1 -1
- package/generators.json +11 -8
- package/index.js +93 -78
- package/meta.json +1 -1
- package/package.json +1 -1
- package/packages/build-tools/src/utils/generate-package-json.d.ts +1 -0
- package/packages/config/src/define-config.d.ts +0 -1
- package/packages/config/src/schema.d.ts +0 -3
- package/packages/config-tools/src/utilities/run.d.ts +3 -1
- package/packages/workspace-tools/src/base/base-executor.d.ts +5 -2
- package/packages/workspace-tools/src/generators/init/init.d.ts +2 -2
- package/src/base/index.js +25 -17
- package/src/executors/clean-package/executor.js +25 -17
- package/src/executors/rolldown/executor.js +25 -17
- package/src/executors/size-limit/executor.js +25 -17
- package/src/executors/tsup/executor.js +25 -17
- package/src/executors/tsup-browser/executor.js +25 -17
- package/src/executors/tsup-neutral/executor.js +25 -17
- package/src/executors/tsup-node/executor.js +25 -17
- package/src/executors/typia/executor.js +25 -17
- package/src/executors/unbuild/executor.js +25 -17
- package/src/generators/browser-library/generator.js +24 -16
- package/src/generators/config-schema/generator.js +24 -16
- package/src/generators/init/init.js +9 -11
- package/src/generators/neutral-library/generator.js +24 -16
- package/src/generators/node-library/generator.js +24 -16
- package/src/generators/preset/generator.js +81 -70
- package/src/generators/release-version/generator.js +24 -16
- package/src/utils/index.js +24 -16
|
@@ -69660,9 +69660,6 @@ var init_schema = __esm({
|
|
|
69660
69660
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
69661
69661
|
),
|
|
69662
69662
|
env: z2.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
|
|
69663
|
-
ci: z2.boolean().default(true).describe(
|
|
69664
|
-
"An indicator specifying if the current environment is a CI environment"
|
|
69665
|
-
),
|
|
69666
69663
|
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
69667
69664
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
69668
69665
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
@@ -69789,7 +69786,6 @@ var init_get_default_config = __esm({
|
|
|
69789
69786
|
env: "production",
|
|
69790
69787
|
branch: "main",
|
|
69791
69788
|
organization: "storm-software",
|
|
69792
|
-
ci: true,
|
|
69793
69789
|
configFile: null,
|
|
69794
69790
|
runtimeVersion: "1.0.0",
|
|
69795
69791
|
colors: { ...DEFAULT_COLOR_CONFIG },
|
|
@@ -71696,11 +71692,13 @@ var init_run = __esm({
|
|
|
71696
71692
|
"packages/config-tools/src/utilities/run.ts"() {
|
|
71697
71693
|
import_node_child_process5 = require("node:child_process");
|
|
71698
71694
|
LARGE_BUFFER = 1024 * 1e6;
|
|
71699
|
-
run = (config, command, cwd2 = config.workspaceRoot ?? process.cwd(), stdio = "inherit") => {
|
|
71695
|
+
run = (config, command, cwd2 = config.workspaceRoot ?? process.cwd(), stdio = "inherit", env = process.env) => {
|
|
71700
71696
|
return (0, import_node_child_process5.execSync)(command, {
|
|
71701
71697
|
cwd: cwd2,
|
|
71702
71698
|
env: {
|
|
71703
71699
|
...process.env,
|
|
71700
|
+
...env,
|
|
71701
|
+
CLICOLOR: "true",
|
|
71704
71702
|
FORCE_COLOR: "true"
|
|
71705
71703
|
},
|
|
71706
71704
|
stdio,
|
|
@@ -71942,9 +71940,14 @@ var init_get_env = __esm({
|
|
|
71942
71940
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
71943
71941
|
outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
|
|
71944
71942
|
env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
71945
|
-
ci:
|
|
71946
|
-
|
|
71947
|
-
|
|
71943
|
+
// ci:
|
|
71944
|
+
// process.env[`${prefix}CI`] !== undefined
|
|
71945
|
+
// ? Boolean(
|
|
71946
|
+
// process.env[`${prefix}CI`] ??
|
|
71947
|
+
// process.env.CI ??
|
|
71948
|
+
// process.env.CONTINUOUS_INTEGRATION
|
|
71949
|
+
// )
|
|
71950
|
+
// : undefined,
|
|
71948
71951
|
repository: process.env[`${prefix}REPOSITORY`],
|
|
71949
71952
|
branch: process.env[`${prefix}BRANCH`],
|
|
71950
71953
|
preid: process.env[`${prefix}PRE_ID`],
|
|
@@ -72145,11 +72148,6 @@ var init_set_env = __esm({
|
|
|
72145
72148
|
process.env.NODE_ENV = config.env;
|
|
72146
72149
|
process.env.ENVIRONMENT = config.env;
|
|
72147
72150
|
}
|
|
72148
|
-
if (config.ci) {
|
|
72149
|
-
process.env[`${prefix}CI`] = String(config.ci);
|
|
72150
|
-
process.env.CI = String(config.ci);
|
|
72151
|
-
process.env.CONTINUOUS_INTEGRATION = String(config.ci);
|
|
72152
|
-
}
|
|
72153
72151
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
72154
72152
|
for (const key of Object.keys(config.colors)) {
|
|
72155
72153
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
@@ -72318,7 +72316,7 @@ var init_create_storm_config = __esm({
|
|
|
72318
72316
|
};
|
|
72319
72317
|
createStormConfig = (extensionName, schema, workspaceRoot) => {
|
|
72320
72318
|
let result;
|
|
72321
|
-
if (!_static_cache) {
|
|
72319
|
+
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 3e4) {
|
|
72322
72320
|
const config = getConfigEnv();
|
|
72323
72321
|
const defaultConfig = getDefaultConfig(config, workspaceRoot);
|
|
72324
72322
|
result = StormConfigSchema.parse({
|
|
@@ -72331,7 +72329,7 @@ var init_create_storm_config = __esm({
|
|
|
72331
72329
|
});
|
|
72332
72330
|
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
72333
72331
|
} else {
|
|
72334
|
-
result = _static_cache;
|
|
72332
|
+
result = _static_cache.data;
|
|
72335
72333
|
}
|
|
72336
72334
|
if (schema && extensionName) {
|
|
72337
72335
|
result.extensions = {
|
|
@@ -72339,7 +72337,10 @@ var init_create_storm_config = __esm({
|
|
|
72339
72337
|
[extensionName]: createConfigExtension(extensionName, schema)
|
|
72340
72338
|
};
|
|
72341
72339
|
}
|
|
72342
|
-
_static_cache =
|
|
72340
|
+
_static_cache = {
|
|
72341
|
+
timestamp: Date.now(),
|
|
72342
|
+
data: result
|
|
72343
|
+
};
|
|
72343
72344
|
return result;
|
|
72344
72345
|
};
|
|
72345
72346
|
createConfigExtension = (extensionName, schema) => {
|
|
@@ -72356,6 +72357,13 @@ var init_create_storm_config = __esm({
|
|
|
72356
72357
|
};
|
|
72357
72358
|
loadStormConfig = async (workspaceRoot) => {
|
|
72358
72359
|
let config = {};
|
|
72360
|
+
if (_static_cache?.data && _static_cache?.timestamp && _static_cache.timestamp >= Date.now() + 3e4) {
|
|
72361
|
+
writeInfo(
|
|
72362
|
+
`Configuration cache hit - ${_static_cache.timestamp}`,
|
|
72363
|
+
_static_cache.data
|
|
72364
|
+
);
|
|
72365
|
+
return _static_cache.data;
|
|
72366
|
+
}
|
|
72359
72367
|
let _workspaceRoot = workspaceRoot;
|
|
72360
72368
|
if (!_workspaceRoot) {
|
|
72361
72369
|
_workspaceRoot = findWorkspaceRoot();
|
package/src/utils/index.js
CHANGED
|
@@ -65400,9 +65400,6 @@ var init_schema = __esm({
|
|
|
65400
65400
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
65401
65401
|
),
|
|
65402
65402
|
env: z2.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
|
|
65403
|
-
ci: z2.boolean().default(true).describe(
|
|
65404
|
-
"An indicator specifying if the current environment is a CI environment"
|
|
65405
|
-
),
|
|
65406
65403
|
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65407
65404
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65408
65405
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
@@ -65529,7 +65526,6 @@ var init_get_default_config = __esm({
|
|
|
65529
65526
|
env: "production",
|
|
65530
65527
|
branch: "main",
|
|
65531
65528
|
organization: "storm-software",
|
|
65532
|
-
ci: true,
|
|
65533
65529
|
configFile: null,
|
|
65534
65530
|
runtimeVersion: "1.0.0",
|
|
65535
65531
|
colors: { ...DEFAULT_COLOR_CONFIG },
|
|
@@ -67436,11 +67432,13 @@ var init_run = __esm({
|
|
|
67436
67432
|
"packages/config-tools/src/utilities/run.ts"() {
|
|
67437
67433
|
import_node_child_process5 = require("node:child_process");
|
|
67438
67434
|
LARGE_BUFFER = 1024 * 1e6;
|
|
67439
|
-
run = (config, command, cwd2 = config.workspaceRoot ?? process.cwd(), stdio = "inherit") => {
|
|
67435
|
+
run = (config, command, cwd2 = config.workspaceRoot ?? process.cwd(), stdio = "inherit", env = process.env) => {
|
|
67440
67436
|
return (0, import_node_child_process5.execSync)(command, {
|
|
67441
67437
|
cwd: cwd2,
|
|
67442
67438
|
env: {
|
|
67443
67439
|
...process.env,
|
|
67440
|
+
...env,
|
|
67441
|
+
CLICOLOR: "true",
|
|
67444
67442
|
FORCE_COLOR: "true"
|
|
67445
67443
|
},
|
|
67446
67444
|
stdio,
|
|
@@ -67682,9 +67680,14 @@ var init_get_env = __esm({
|
|
|
67682
67680
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
67683
67681
|
outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
|
|
67684
67682
|
env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
67685
|
-
ci:
|
|
67686
|
-
|
|
67687
|
-
|
|
67683
|
+
// ci:
|
|
67684
|
+
// process.env[`${prefix}CI`] !== undefined
|
|
67685
|
+
// ? Boolean(
|
|
67686
|
+
// process.env[`${prefix}CI`] ??
|
|
67687
|
+
// process.env.CI ??
|
|
67688
|
+
// process.env.CONTINUOUS_INTEGRATION
|
|
67689
|
+
// )
|
|
67690
|
+
// : undefined,
|
|
67688
67691
|
repository: process.env[`${prefix}REPOSITORY`],
|
|
67689
67692
|
branch: process.env[`${prefix}BRANCH`],
|
|
67690
67693
|
preid: process.env[`${prefix}PRE_ID`],
|
|
@@ -67885,11 +67888,6 @@ var init_set_env = __esm({
|
|
|
67885
67888
|
process.env.NODE_ENV = config.env;
|
|
67886
67889
|
process.env.ENVIRONMENT = config.env;
|
|
67887
67890
|
}
|
|
67888
|
-
if (config.ci) {
|
|
67889
|
-
process.env[`${prefix}CI`] = String(config.ci);
|
|
67890
|
-
process.env.CI = String(config.ci);
|
|
67891
|
-
process.env.CONTINUOUS_INTEGRATION = String(config.ci);
|
|
67892
|
-
}
|
|
67893
67891
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
67894
67892
|
for (const key of Object.keys(config.colors)) {
|
|
67895
67893
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
@@ -68058,7 +68056,7 @@ var init_create_storm_config = __esm({
|
|
|
68058
68056
|
};
|
|
68059
68057
|
createStormConfig = (extensionName, schema, workspaceRoot3) => {
|
|
68060
68058
|
let result;
|
|
68061
|
-
if (!_static_cache) {
|
|
68059
|
+
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 3e4) {
|
|
68062
68060
|
const config = getConfigEnv();
|
|
68063
68061
|
const defaultConfig = getDefaultConfig(config, workspaceRoot3);
|
|
68064
68062
|
result = StormConfigSchema.parse({
|
|
@@ -68071,7 +68069,7 @@ var init_create_storm_config = __esm({
|
|
|
68071
68069
|
});
|
|
68072
68070
|
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot3);
|
|
68073
68071
|
} else {
|
|
68074
|
-
result = _static_cache;
|
|
68072
|
+
result = _static_cache.data;
|
|
68075
68073
|
}
|
|
68076
68074
|
if (schema && extensionName) {
|
|
68077
68075
|
result.extensions = {
|
|
@@ -68079,7 +68077,10 @@ var init_create_storm_config = __esm({
|
|
|
68079
68077
|
[extensionName]: createConfigExtension(extensionName, schema)
|
|
68080
68078
|
};
|
|
68081
68079
|
}
|
|
68082
|
-
_static_cache =
|
|
68080
|
+
_static_cache = {
|
|
68081
|
+
timestamp: Date.now(),
|
|
68082
|
+
data: result
|
|
68083
|
+
};
|
|
68083
68084
|
return result;
|
|
68084
68085
|
};
|
|
68085
68086
|
createConfigExtension = (extensionName, schema) => {
|
|
@@ -68096,6 +68097,13 @@ var init_create_storm_config = __esm({
|
|
|
68096
68097
|
};
|
|
68097
68098
|
loadStormConfig = async (workspaceRoot3) => {
|
|
68098
68099
|
let config = {};
|
|
68100
|
+
if (_static_cache?.data && _static_cache?.timestamp && _static_cache.timestamp >= Date.now() + 3e4) {
|
|
68101
|
+
writeInfo(
|
|
68102
|
+
`Configuration cache hit - ${_static_cache.timestamp}`,
|
|
68103
|
+
_static_cache.data
|
|
68104
|
+
);
|
|
68105
|
+
return _static_cache.data;
|
|
68106
|
+
}
|
|
68099
68107
|
let _workspaceRoot = workspaceRoot3;
|
|
68100
68108
|
if (!_workspaceRoot) {
|
|
68101
68109
|
_workspaceRoot = findWorkspaceRoot();
|