@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
package/package.json
CHANGED
|
@@ -4,3 +4,4 @@ import type { TypeScriptBuildOptions } from "../../declarations";
|
|
|
4
4
|
export declare const generatePackageJson: (config: StormConfig, projectRoot: string, sourceRoot: string, projectName: string, options: TypeScriptBuildOptions) => Promise<Record<string, any>>;
|
|
5
5
|
export declare const formatPackageJson: (config: StormConfig, projectRoot: string, sourceRoot: string, projectName: string, options: Pick<TypeScriptBuildOptions, "tsConfig" | "external" | "generatePackageJson" | "bundle" | "includeSrc">, packageJson: Record<string, any>, projectGraph: ProjectGraph, projectsConfigurations: Record<string, ProjectConfiguration>) => Promise<Record<string, any>>;
|
|
6
6
|
export declare const addWorkspacePackageJsonFields: (config: StormConfig, projectRoot: string, sourceRoot: string, projectName: string, includeSrc: boolean | undefined, packageJson: Record<string, any>) => Record<string, any>;
|
|
7
|
+
export declare const addPackageJsonExports: (sourceRoot: string, packageJson: Record<string, any>) => Promise<Record<string, any>>;
|
|
@@ -148,7 +148,6 @@ export declare const defineConfig: (input: StormConfigInput) => {
|
|
|
148
148
|
owner?: string | undefined;
|
|
149
149
|
worker?: string | undefined;
|
|
150
150
|
env?: "development" | "staging" | "production" | undefined;
|
|
151
|
-
ci?: boolean | undefined;
|
|
152
151
|
workspaceRoot?: string | undefined;
|
|
153
152
|
packageDirectory?: string | undefined;
|
|
154
153
|
externalPackagePatterns?: string[] | undefined;
|
|
@@ -922,7 +922,6 @@ export declare const StormConfigSchema: z.ZodObject<{
|
|
|
922
922
|
owner: z.ZodDefault<z.ZodString>;
|
|
923
923
|
worker: z.ZodDefault<z.ZodString>;
|
|
924
924
|
env: z.ZodDefault<z.ZodEnum<["development", "staging", "production"]>>;
|
|
925
|
-
ci: z.ZodDefault<z.ZodBoolean>;
|
|
926
925
|
workspaceRoot: z.ZodDefault<z.ZodString>;
|
|
927
926
|
packageDirectory: z.ZodOptional<z.ZodString>;
|
|
928
927
|
externalPackagePatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1588,7 +1587,6 @@ export declare const StormConfigSchema: z.ZodObject<{
|
|
|
1588
1587
|
owner: string;
|
|
1589
1588
|
worker: string;
|
|
1590
1589
|
env: "development" | "staging" | "production";
|
|
1591
|
-
ci: boolean;
|
|
1592
1590
|
workspaceRoot: string;
|
|
1593
1591
|
externalPackagePatterns: string[];
|
|
1594
1592
|
skipCache: boolean;
|
|
@@ -1887,7 +1885,6 @@ export declare const StormConfigSchema: z.ZodObject<{
|
|
|
1887
1885
|
owner?: string | undefined;
|
|
1888
1886
|
worker?: string | undefined;
|
|
1889
1887
|
env?: "development" | "staging" | "production" | undefined;
|
|
1890
|
-
ci?: boolean | undefined;
|
|
1891
1888
|
workspaceRoot?: string | undefined;
|
|
1892
1889
|
packageDirectory?: string | undefined;
|
|
1893
1890
|
externalPackagePatterns?: string[] | undefined;
|
|
@@ -11,6 +11,8 @@ export type StdioOptions = IOType | Array<IOType | "ipc" | number | null | undef
|
|
|
11
11
|
* @param config - The Storm configuration object
|
|
12
12
|
* @param command - The command to run
|
|
13
13
|
* @param cwd - The current working directory
|
|
14
|
+
* @param stdio - The standard input/output options
|
|
15
|
+
* @param env - The environment variables
|
|
14
16
|
* @returns The result of the command
|
|
15
17
|
*/
|
|
16
|
-
export declare const run: (config: StormConfig, command: string, cwd?: string, stdio?: StdioOptions) => Buffer;
|
|
18
|
+
export declare const run: (config: StormConfig, command: string, cwd?: string, stdio?: StdioOptions, env?: NodeJS.ProcessEnv) => Buffer;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { ExecutorContext, PromiseExecutor } from "@nx/devkit";
|
|
2
2
|
import type { StormConfig } from "@storm-software/config";
|
|
3
|
-
import type { BaseExecutorOptions, BaseExecutorResult, BaseExecutorSchema } from "../../declarations";
|
|
4
|
-
export
|
|
3
|
+
import type { BaseExecutorOptions as _BaseExecutorOptions, BaseExecutorResult as _BaseExecutorResult, BaseExecutorSchema as _BaseExecutorSchema } from "../../declarations";
|
|
4
|
+
export type BaseExecutorOptions<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = _BaseExecutorOptions<TExecutorSchema>;
|
|
5
|
+
export type BaseExecutorResult = _BaseExecutorResult;
|
|
6
|
+
export type BaseExecutorSchema = _BaseExecutorSchema;
|
|
7
|
+
export declare const withRunExecutor: <TExecutorSchema extends BaseExecutorSchema = _BaseExecutorSchema>(name: string, executorFn: (options: TExecutorSchema, context: ExecutorContext, config: StormConfig) => Promise<BaseExecutorResult | null | undefined> | AsyncGenerator<any, BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined, executorOptions?: BaseExecutorOptions<TExecutorSchema>) => PromiseExecutor<TExecutorSchema>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type Tree } from "@nx/devkit";
|
|
2
2
|
import type { Schema } from "./schema";
|
|
3
|
-
export declare function
|
|
4
|
-
export default
|
|
3
|
+
export declare function initGenerator(tree: Tree, schema: Schema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
4
|
+
export default initGenerator;
|
package/src/base/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, workspaceRoot) => {
|
|
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, workspaceRoot);
|
|
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(workspaceRoot);
|
|
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 (workspaceRoot) => {
|
|
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 = workspaceRoot;
|
|
68100
68108
|
if (!_workspaceRoot) {
|
|
68101
68109
|
_workspaceRoot = findWorkspaceRoot();
|
|
@@ -579393,7 +579401,7 @@ var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
|
|
|
579393
579401
|
};
|
|
579394
579402
|
|
|
579395
579403
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
579396
|
-
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
579404
|
+
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
579397
579405
|
const {
|
|
579398
579406
|
getStopwatch: getStopwatch2,
|
|
579399
579407
|
writeDebug: writeDebug2,
|
|
@@ -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, workspaceRoot) => {
|
|
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, workspaceRoot);
|
|
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(workspaceRoot);
|
|
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 (workspaceRoot) => {
|
|
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 = workspaceRoot;
|
|
68100
68108
|
if (!_workspaceRoot) {
|
|
68101
68109
|
_workspaceRoot = findWorkspaceRoot();
|
|
@@ -73331,7 +73339,7 @@ var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
|
|
|
73331
73339
|
};
|
|
73332
73340
|
|
|
73333
73341
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
73334
|
-
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
73342
|
+
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
73335
73343
|
const {
|
|
73336
73344
|
getStopwatch: getStopwatch2,
|
|
73337
73345
|
writeDebug: writeDebug2,
|
|
@@ -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, workspaceRoot) => {
|
|
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, workspaceRoot);
|
|
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(workspaceRoot);
|
|
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 (workspaceRoot) => {
|
|
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 = workspaceRoot;
|
|
68100
68108
|
if (!_workspaceRoot) {
|
|
68101
68109
|
_workspaceRoot = findWorkspaceRoot();
|
|
@@ -68262,7 +68270,7 @@ var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
|
|
|
68262
68270
|
};
|
|
68263
68271
|
|
|
68264
68272
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
68265
|
-
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
68273
|
+
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
68266
68274
|
const {
|
|
68267
68275
|
getStopwatch: getStopwatch2,
|
|
68268
68276
|
writeDebug: writeDebug2,
|
|
@@ -65888,9 +65888,6 @@ var init_schema = __esm({
|
|
|
65888
65888
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
65889
65889
|
),
|
|
65890
65890
|
env: z2.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
|
|
65891
|
-
ci: z2.boolean().default(true).describe(
|
|
65892
|
-
"An indicator specifying if the current environment is a CI environment"
|
|
65893
|
-
),
|
|
65894
65891
|
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65895
65892
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65896
65893
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
@@ -66017,7 +66014,6 @@ var init_get_default_config = __esm({
|
|
|
66017
66014
|
env: "production",
|
|
66018
66015
|
branch: "main",
|
|
66019
66016
|
organization: "storm-software",
|
|
66020
|
-
ci: true,
|
|
66021
66017
|
configFile: null,
|
|
66022
66018
|
runtimeVersion: "1.0.0",
|
|
66023
66019
|
colors: { ...DEFAULT_COLOR_CONFIG },
|
|
@@ -67924,11 +67920,13 @@ var init_run = __esm({
|
|
|
67924
67920
|
"packages/config-tools/src/utilities/run.ts"() {
|
|
67925
67921
|
import_node_child_process10 = require("node:child_process");
|
|
67926
67922
|
LARGE_BUFFER = 1024 * 1e6;
|
|
67927
|
-
run = (config, command, cwd2 = config.workspaceRoot ?? process.cwd(), stdio = "inherit") => {
|
|
67923
|
+
run = (config, command, cwd2 = config.workspaceRoot ?? process.cwd(), stdio = "inherit", env = process.env) => {
|
|
67928
67924
|
return (0, import_node_child_process10.execSync)(command, {
|
|
67929
67925
|
cwd: cwd2,
|
|
67930
67926
|
env: {
|
|
67931
67927
|
...process.env,
|
|
67928
|
+
...env,
|
|
67929
|
+
CLICOLOR: "true",
|
|
67932
67930
|
FORCE_COLOR: "true"
|
|
67933
67931
|
},
|
|
67934
67932
|
stdio,
|
|
@@ -68170,9 +68168,14 @@ var init_get_env = __esm({
|
|
|
68170
68168
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
68171
68169
|
outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
|
|
68172
68170
|
env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
68173
|
-
ci:
|
|
68174
|
-
|
|
68175
|
-
|
|
68171
|
+
// ci:
|
|
68172
|
+
// process.env[`${prefix}CI`] !== undefined
|
|
68173
|
+
// ? Boolean(
|
|
68174
|
+
// process.env[`${prefix}CI`] ??
|
|
68175
|
+
// process.env.CI ??
|
|
68176
|
+
// process.env.CONTINUOUS_INTEGRATION
|
|
68177
|
+
// )
|
|
68178
|
+
// : undefined,
|
|
68176
68179
|
repository: process.env[`${prefix}REPOSITORY`],
|
|
68177
68180
|
branch: process.env[`${prefix}BRANCH`],
|
|
68178
68181
|
preid: process.env[`${prefix}PRE_ID`],
|
|
@@ -68373,11 +68376,6 @@ var init_set_env = __esm({
|
|
|
68373
68376
|
process.env.NODE_ENV = config.env;
|
|
68374
68377
|
process.env.ENVIRONMENT = config.env;
|
|
68375
68378
|
}
|
|
68376
|
-
if (config.ci) {
|
|
68377
|
-
process.env[`${prefix}CI`] = String(config.ci);
|
|
68378
|
-
process.env.CI = String(config.ci);
|
|
68379
|
-
process.env.CONTINUOUS_INTEGRATION = String(config.ci);
|
|
68380
|
-
}
|
|
68381
68379
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
68382
68380
|
for (const key of Object.keys(config.colors)) {
|
|
68383
68381
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
@@ -68546,7 +68544,7 @@ var init_create_storm_config = __esm({
|
|
|
68546
68544
|
};
|
|
68547
68545
|
createStormConfig = (extensionName, schema, workspaceRoot) => {
|
|
68548
68546
|
let result;
|
|
68549
|
-
if (!_static_cache) {
|
|
68547
|
+
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 3e4) {
|
|
68550
68548
|
const config = getConfigEnv();
|
|
68551
68549
|
const defaultConfig = getDefaultConfig(config, workspaceRoot);
|
|
68552
68550
|
result = StormConfigSchema.parse({
|
|
@@ -68559,7 +68557,7 @@ var init_create_storm_config = __esm({
|
|
|
68559
68557
|
});
|
|
68560
68558
|
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68561
68559
|
} else {
|
|
68562
|
-
result = _static_cache;
|
|
68560
|
+
result = _static_cache.data;
|
|
68563
68561
|
}
|
|
68564
68562
|
if (schema && extensionName) {
|
|
68565
68563
|
result.extensions = {
|
|
@@ -68567,7 +68565,10 @@ var init_create_storm_config = __esm({
|
|
|
68567
68565
|
[extensionName]: createConfigExtension(extensionName, schema)
|
|
68568
68566
|
};
|
|
68569
68567
|
}
|
|
68570
|
-
_static_cache =
|
|
68568
|
+
_static_cache = {
|
|
68569
|
+
timestamp: Date.now(),
|
|
68570
|
+
data: result
|
|
68571
|
+
};
|
|
68571
68572
|
return result;
|
|
68572
68573
|
};
|
|
68573
68574
|
createConfigExtension = (extensionName, schema) => {
|
|
@@ -68584,6 +68585,13 @@ var init_create_storm_config = __esm({
|
|
|
68584
68585
|
};
|
|
68585
68586
|
loadStormConfig = async (workspaceRoot) => {
|
|
68586
68587
|
let config = {};
|
|
68588
|
+
if (_static_cache?.data && _static_cache?.timestamp && _static_cache.timestamp >= Date.now() + 3e4) {
|
|
68589
|
+
writeInfo(
|
|
68590
|
+
`Configuration cache hit - ${_static_cache.timestamp}`,
|
|
68591
|
+
_static_cache.data
|
|
68592
|
+
);
|
|
68593
|
+
return _static_cache.data;
|
|
68594
|
+
}
|
|
68587
68595
|
let _workspaceRoot = workspaceRoot;
|
|
68588
68596
|
if (!_workspaceRoot) {
|
|
68589
68597
|
_workspaceRoot = findWorkspaceRoot();
|
|
@@ -69634,7 +69642,7 @@ var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
|
|
|
69634
69642
|
};
|
|
69635
69643
|
|
|
69636
69644
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
69637
|
-
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
69645
|
+
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
69638
69646
|
const {
|
|
69639
69647
|
getStopwatch: getStopwatch2,
|
|
69640
69648
|
writeDebug: writeDebug2,
|
|
@@ -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, workspaceRoot) => {
|
|
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, workspaceRoot);
|
|
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(workspaceRoot);
|
|
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 (workspaceRoot) => {
|
|
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 = workspaceRoot;
|
|
68100
68108
|
if (!_workspaceRoot) {
|
|
68101
68109
|
_workspaceRoot = findWorkspaceRoot();
|
|
@@ -68263,7 +68271,7 @@ var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
|
|
|
68263
68271
|
};
|
|
68264
68272
|
|
|
68265
68273
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
68266
|
-
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
68274
|
+
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
68267
68275
|
const {
|
|
68268
68276
|
getStopwatch: getStopwatch2,
|
|
68269
68277
|
writeDebug: writeDebug2,
|