@storm-software/workspace-tools 1.118.0 → 1.120.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 +16 -0
- package/README.md +43 -8
- package/declarations.d.ts +66 -0
- package/executors.json +5 -0
- package/index.js +11989 -5321
- package/meta.json +1 -1
- package/package.json +3 -1
- package/packages/config/src/schema.d.ts +2 -2
- package/packages/workspace-tools/index.d.ts +2 -0
- package/packages/workspace-tools/src/base/base-executor.d.ts +2 -4
- package/packages/workspace-tools/src/base/typescript-library-generator.d.ts +2 -14
- package/packages/workspace-tools/src/executors/clean-package/constants.d.ts +4 -0
- package/packages/workspace-tools/src/executors/clean-package/executor.d.ts +8 -0
- package/packages/workspace-tools/src/executors/clean-package/types.d.ts +8 -0
- package/packages/workspace-tools/src/executors/clean-package/utils.d.ts +4 -0
- package/packages/workspace-tools/src/executors/rolldown/executor.d.ts +1 -3
- package/packages/workspace-tools/src/executors/tsup/executor.d.ts +1 -3
- package/packages/workspace-tools/src/executors/tsup-browser/executor.d.ts +1 -3
- package/packages/workspace-tools/src/executors/tsup-neutral/executor.d.ts +1 -3
- package/packages/workspace-tools/src/executors/tsup-node/executor.d.ts +1 -3
- package/packages/workspace-tools/src/executors/typia/executor.d.ts +1 -3
- package/packages/workspace-tools/src/executors/unbuild/executor.d.ts +1 -3
- package/packages/workspace-tools/src/generators/browser-library/generator.d.ts +1 -1
- package/packages/workspace-tools/src/generators/neutral-library/generator.d.ts +1 -1
- package/packages/workspace-tools/src/generators/node-library/generator.d.ts +1 -1
- package/packages/workspace-tools/src/plugins/typescript/project-config.d.ts +1 -1
- package/packages/workspace-tools/src/utils/index.d.ts +1 -0
- package/packages/workspace-tools/src/utils/project-tags.d.ts +30 -0
- package/src/base/index.js +4 -2
- package/src/executors/clean-package/executor.js +80083 -0
- package/src/executors/clean-package/schema.d.ts +10 -0
- package/src/executors/clean-package/schema.json +41 -0
- package/src/executors/rolldown/executor.js +4 -2
- package/src/executors/tsup/executor.js +4 -2
- package/src/executors/tsup-browser/executor.js +4 -2
- package/src/executors/tsup-neutral/executor.js +4 -2
- package/src/executors/tsup-node/executor.js +4 -2
- package/src/executors/typia/executor.js +4 -2
- package/src/executors/unbuild/executor.js +4 -2
- package/src/generators/browser-library/generator.js +10 -3
- package/src/generators/config-schema/generator.js +2 -1
- package/src/generators/neutral-library/generator.js +2 -1
- package/src/generators/neutral-library/schema.d.ts +1 -1
- package/src/generators/node-library/generator.js +5 -2
- package/src/generators/preset/files/.github/workflows/dependabot-update.yml +32 -0
- package/src/generators/preset/generator.js +2 -1
- package/src/generators/release-version/generator.js +2 -1
- package/src/plugins/rust/index.js +90 -7
- package/src/plugins/typescript/index.js +100 -1
- package/src/utils/index.js +87 -1
- package/src/generators/preset/files/.github/workflows/dependabot-approve.yml +0 -24
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseExecutorSchema } from "../../../declarations";
|
|
2
|
+
|
|
3
|
+
export interface CleanPackageExecutorSchema extends BaseExecutorSchema {
|
|
4
|
+
outputPath: string;
|
|
5
|
+
packageJsonPath?: string;
|
|
6
|
+
ignoredFiles?: string;
|
|
7
|
+
fields?: string;
|
|
8
|
+
cleanReadMe: boolean;
|
|
9
|
+
cleanComments: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "clean-publish",
|
|
4
|
+
"version": 2,
|
|
5
|
+
"title": "Clean Publish Executor",
|
|
6
|
+
"description": "Remove configuration files, fields, and scripts for development before publishing package. This tool is inspired by the [clean-publish](https://github.com/shashkovdanil/clean-publish/tree/master) package",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"outputPath": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The output path of the generated files.",
|
|
12
|
+
"x-completion-type": "directory",
|
|
13
|
+
"x-priority": "important",
|
|
14
|
+
"default": "dist/{projectRoot}"
|
|
15
|
+
},
|
|
16
|
+
"packageJsonPath": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The path to the package.json file, relative to the workspace root.",
|
|
19
|
+
"x-completion-type": "directory"
|
|
20
|
+
},
|
|
21
|
+
"cleanReadMe": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"description": "Should API Extractor generate an TSDoc Metadata file.",
|
|
24
|
+
"default": true
|
|
25
|
+
},
|
|
26
|
+
"cleanComments": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"description": "Should API Extractor generate an TSDoc Metadata file.",
|
|
29
|
+
"default": true
|
|
30
|
+
},
|
|
31
|
+
"ignoredFiles": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "List of ESBuild plugins to use during processing"
|
|
34
|
+
},
|
|
35
|
+
"fields": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "List of ESBuild plugins to use during processing"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"required": ["outputPath", "cleanReadMe", "cleanComments"]
|
|
41
|
+
}
|
|
@@ -65395,7 +65395,7 @@ var init_schema = __esm({
|
|
|
65395
65395
|
ci: z2.boolean().default(true).describe(
|
|
65396
65396
|
"An indicator specifying if the current environment is a CI environment"
|
|
65397
65397
|
),
|
|
65398
|
-
workspaceRoot: z2.string().trim().
|
|
65398
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65399
65399
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65400
65400
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
65401
65401
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -68041,6 +68041,7 @@ var init_create_storm_config = __esm({
|
|
|
68041
68041
|
...config.colors
|
|
68042
68042
|
}
|
|
68043
68043
|
});
|
|
68044
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68044
68045
|
} else {
|
|
68045
68046
|
result = _static_cache;
|
|
68046
68047
|
}
|
|
@@ -68247,7 +68248,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68247
68248
|
} = await Promise.resolve().then(() => (init_src2(), src_exports));
|
|
68248
68249
|
const stopwatch = getStopwatch2(name);
|
|
68249
68250
|
let options = _options;
|
|
68250
|
-
let config;
|
|
68251
|
+
let config = {};
|
|
68251
68252
|
try {
|
|
68252
68253
|
writeInfo2(`\u26A1 Running the ${name} executor...
|
|
68253
68254
|
`, config);
|
|
@@ -68260,6 +68261,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68260
68261
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
68261
68262
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
68262
68263
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
68264
|
+
config.workspaceRoot = workspaceRoot;
|
|
68263
68265
|
if (!executorOptions.skipReadingConfig) {
|
|
68264
68266
|
writeDebug2(
|
|
68265
68267
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
@@ -65395,7 +65395,7 @@ var init_schema = __esm({
|
|
|
65395
65395
|
ci: z2.boolean().default(true).describe(
|
|
65396
65396
|
"An indicator specifying if the current environment is a CI environment"
|
|
65397
65397
|
),
|
|
65398
|
-
workspaceRoot: z2.string().trim().
|
|
65398
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65399
65399
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65400
65400
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
65401
65401
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -68041,6 +68041,7 @@ var init_create_storm_config = __esm({
|
|
|
68041
68041
|
...config.colors
|
|
68042
68042
|
}
|
|
68043
68043
|
});
|
|
68044
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68044
68045
|
} else {
|
|
68045
68046
|
result = _static_cache;
|
|
68046
68047
|
}
|
|
@@ -68247,7 +68248,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68247
68248
|
} = await Promise.resolve().then(() => (init_src2(), src_exports));
|
|
68248
68249
|
const stopwatch = getStopwatch2(name);
|
|
68249
68250
|
let options = _options;
|
|
68250
|
-
let config;
|
|
68251
|
+
let config = {};
|
|
68251
68252
|
try {
|
|
68252
68253
|
writeInfo2(`\u26A1 Running the ${name} executor...
|
|
68253
68254
|
`, config);
|
|
@@ -68260,6 +68261,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68260
68261
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
68261
68262
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
68262
68263
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
68264
|
+
config.workspaceRoot = workspaceRoot;
|
|
68263
68265
|
if (!executorOptions.skipReadingConfig) {
|
|
68264
68266
|
writeDebug2(
|
|
68265
68267
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
@@ -65395,7 +65395,7 @@ var init_schema = __esm({
|
|
|
65395
65395
|
ci: z2.boolean().default(true).describe(
|
|
65396
65396
|
"An indicator specifying if the current environment is a CI environment"
|
|
65397
65397
|
),
|
|
65398
|
-
workspaceRoot: z2.string().trim().
|
|
65398
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65399
65399
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65400
65400
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
65401
65401
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -68041,6 +68041,7 @@ var init_create_storm_config = __esm({
|
|
|
68041
68041
|
...config.colors
|
|
68042
68042
|
}
|
|
68043
68043
|
});
|
|
68044
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68044
68045
|
} else {
|
|
68045
68046
|
result = _static_cache;
|
|
68046
68047
|
}
|
|
@@ -68247,7 +68248,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68247
68248
|
} = await Promise.resolve().then(() => (init_src2(), src_exports));
|
|
68248
68249
|
const stopwatch = getStopwatch2(name);
|
|
68249
68250
|
let options = _options;
|
|
68250
|
-
let config;
|
|
68251
|
+
let config = {};
|
|
68251
68252
|
try {
|
|
68252
68253
|
writeInfo2(`\u26A1 Running the ${name} executor...
|
|
68253
68254
|
`, config);
|
|
@@ -68260,6 +68261,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68260
68261
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
68261
68262
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
68262
68263
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
68264
|
+
config.workspaceRoot = workspaceRoot;
|
|
68263
68265
|
if (!executorOptions.skipReadingConfig) {
|
|
68264
68266
|
writeDebug2(
|
|
68265
68267
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
@@ -65395,7 +65395,7 @@ var init_schema = __esm({
|
|
|
65395
65395
|
ci: z2.boolean().default(true).describe(
|
|
65396
65396
|
"An indicator specifying if the current environment is a CI environment"
|
|
65397
65397
|
),
|
|
65398
|
-
workspaceRoot: z2.string().trim().
|
|
65398
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65399
65399
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65400
65400
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
65401
65401
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -68041,6 +68041,7 @@ var init_create_storm_config = __esm({
|
|
|
68041
68041
|
...config.colors
|
|
68042
68042
|
}
|
|
68043
68043
|
});
|
|
68044
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68044
68045
|
} else {
|
|
68045
68046
|
result = _static_cache;
|
|
68046
68047
|
}
|
|
@@ -68247,7 +68248,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68247
68248
|
} = await Promise.resolve().then(() => (init_src2(), src_exports));
|
|
68248
68249
|
const stopwatch = getStopwatch2(name);
|
|
68249
68250
|
let options = _options;
|
|
68250
|
-
let config;
|
|
68251
|
+
let config = {};
|
|
68251
68252
|
try {
|
|
68252
68253
|
writeInfo2(`\u26A1 Running the ${name} executor...
|
|
68253
68254
|
`, config);
|
|
@@ -68260,6 +68261,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68260
68261
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
68261
68262
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
68262
68263
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
68264
|
+
config.workspaceRoot = workspaceRoot;
|
|
68263
68265
|
if (!executorOptions.skipReadingConfig) {
|
|
68264
68266
|
writeDebug2(
|
|
68265
68267
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
@@ -65395,7 +65395,7 @@ var init_schema = __esm({
|
|
|
65395
65395
|
ci: z2.boolean().default(true).describe(
|
|
65396
65396
|
"An indicator specifying if the current environment is a CI environment"
|
|
65397
65397
|
),
|
|
65398
|
-
workspaceRoot: z2.string().trim().
|
|
65398
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65399
65399
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65400
65400
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
65401
65401
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -68041,6 +68041,7 @@ var init_create_storm_config = __esm({
|
|
|
68041
68041
|
...config.colors
|
|
68042
68042
|
}
|
|
68043
68043
|
});
|
|
68044
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68044
68045
|
} else {
|
|
68045
68046
|
result = _static_cache;
|
|
68046
68047
|
}
|
|
@@ -68247,7 +68248,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68247
68248
|
} = await Promise.resolve().then(() => (init_src2(), src_exports));
|
|
68248
68249
|
const stopwatch = getStopwatch2(name);
|
|
68249
68250
|
let options = _options;
|
|
68250
|
-
let config;
|
|
68251
|
+
let config = {};
|
|
68251
68252
|
try {
|
|
68252
68253
|
writeInfo2(`\u26A1 Running the ${name} executor...
|
|
68253
68254
|
`, config);
|
|
@@ -68260,6 +68261,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68260
68261
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
68261
68262
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
68262
68263
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
68264
|
+
config.workspaceRoot = workspaceRoot;
|
|
68263
68265
|
if (!executorOptions.skipReadingConfig) {
|
|
68264
68266
|
writeDebug2(
|
|
68265
68267
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
@@ -67508,7 +67508,7 @@ var init_schema = __esm({
|
|
|
67508
67508
|
ci: z2.boolean().default(true).describe(
|
|
67509
67509
|
"An indicator specifying if the current environment is a CI environment"
|
|
67510
67510
|
),
|
|
67511
|
-
workspaceRoot: z2.string().trim().
|
|
67511
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
67512
67512
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
67513
67513
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
67514
67514
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -70154,6 +70154,7 @@ var init_create_storm_config = __esm({
|
|
|
70154
70154
|
...config.colors
|
|
70155
70155
|
}
|
|
70156
70156
|
});
|
|
70157
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
70157
70158
|
} else {
|
|
70158
70159
|
result = _static_cache;
|
|
70159
70160
|
}
|
|
@@ -299203,7 +299204,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
299203
299204
|
} = await Promise.resolve().then(() => (init_src2(), src_exports));
|
|
299204
299205
|
const stopwatch = getStopwatch2(name);
|
|
299205
299206
|
let options = _options;
|
|
299206
|
-
let config;
|
|
299207
|
+
let config = {};
|
|
299207
299208
|
try {
|
|
299208
299209
|
writeInfo2(`\u26A1 Running the ${name} executor...
|
|
299209
299210
|
`, config);
|
|
@@ -299216,6 +299217,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
299216
299217
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
299217
299218
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
299218
299219
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
299220
|
+
config.workspaceRoot = workspaceRoot;
|
|
299219
299221
|
if (!executorOptions.skipReadingConfig) {
|
|
299220
299222
|
writeDebug2(
|
|
299221
299223
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
@@ -65395,7 +65395,7 @@ var init_schema = __esm({
|
|
|
65395
65395
|
ci: z2.boolean().default(true).describe(
|
|
65396
65396
|
"An indicator specifying if the current environment is a CI environment"
|
|
65397
65397
|
),
|
|
65398
|
-
workspaceRoot: z2.string().trim().
|
|
65398
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65399
65399
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65400
65400
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
65401
65401
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -68041,6 +68041,7 @@ var init_create_storm_config = __esm({
|
|
|
68041
68041
|
...config.colors
|
|
68042
68042
|
}
|
|
68043
68043
|
});
|
|
68044
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68044
68045
|
} else {
|
|
68045
68046
|
result = _static_cache;
|
|
68046
68047
|
}
|
|
@@ -68247,7 +68248,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68247
68248
|
} = await Promise.resolve().then(() => (init_src2(), src_exports));
|
|
68248
68249
|
const stopwatch = getStopwatch2(name);
|
|
68249
68250
|
let options = _options;
|
|
68250
|
-
let config;
|
|
68251
|
+
let config = {};
|
|
68251
68252
|
try {
|
|
68252
68253
|
writeInfo2(`\u26A1 Running the ${name} executor...
|
|
68253
68254
|
`, config);
|
|
@@ -68260,6 +68261,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
68260
68261
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
68261
68262
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
68262
68263
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
68264
|
+
config.workspaceRoot = workspaceRoot;
|
|
68263
68265
|
if (!executorOptions.skipReadingConfig) {
|
|
68264
68266
|
writeDebug2(
|
|
68265
68267
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
@@ -65395,7 +65395,7 @@ var init_schema = __esm({
|
|
|
65395
65395
|
ci: z2.boolean().default(true).describe(
|
|
65396
65396
|
"An indicator specifying if the current environment is a CI environment"
|
|
65397
65397
|
),
|
|
65398
|
-
workspaceRoot: z2.string().trim().
|
|
65398
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65399
65399
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65400
65400
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
65401
65401
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -68041,6 +68041,7 @@ var init_create_storm_config = __esm({
|
|
|
68041
68041
|
...config.colors
|
|
68042
68042
|
}
|
|
68043
68043
|
});
|
|
68044
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68044
68045
|
} else {
|
|
68045
68046
|
result = _static_cache;
|
|
68046
68047
|
}
|
|
@@ -374546,7 +374547,9 @@ async function browserLibraryGeneratorFn(tree, schema) {
|
|
|
374546
374547
|
buildExecutor: "@storm-software/workspace-tools:tsup-browser"
|
|
374547
374548
|
};
|
|
374548
374549
|
const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
|
|
374549
|
-
const { className, name, propertyName } = (0, import_devkit2.names)(
|
|
374550
|
+
const { className, name, propertyName } = (0, import_devkit2.names)(
|
|
374551
|
+
options.projectNames.projectFileName
|
|
374552
|
+
);
|
|
374550
374553
|
(0, import_devkit2.generateFiles)(tree, filesDir, options.projectRoot, {
|
|
374551
374554
|
...schema,
|
|
374552
374555
|
dot: ".",
|
|
@@ -374565,7 +374568,11 @@ async function browserLibraryGeneratorFn(tree, schema) {
|
|
|
374565
374568
|
tsConfigOptions: {
|
|
374566
374569
|
compilerOptions: {
|
|
374567
374570
|
jsx: "react",
|
|
374568
|
-
types: [
|
|
374571
|
+
types: [
|
|
374572
|
+
"node",
|
|
374573
|
+
"@nx/react/typings/cssmodule.d.ts",
|
|
374574
|
+
"@nx/react/typings/image.d.ts"
|
|
374575
|
+
]
|
|
374569
374576
|
}
|
|
374570
374577
|
}
|
|
374571
374578
|
});
|
|
@@ -4038,7 +4038,7 @@ var init_schema = __esm({
|
|
|
4038
4038
|
ci: z.boolean().default(true).describe(
|
|
4039
4039
|
"An indicator specifying if the current environment is a CI environment"
|
|
4040
4040
|
),
|
|
4041
|
-
workspaceRoot: z.string().trim().
|
|
4041
|
+
workspaceRoot: z.string().trim().default("").describe("The root directory of the workspace"),
|
|
4042
4042
|
packageDirectory: z.string().trim().optional().describe("The root directory of the package"),
|
|
4043
4043
|
externalPackagePatterns: z.array(z.string()).default([]).describe(
|
|
4044
4044
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -68041,6 +68041,7 @@ var init_create_storm_config = __esm({
|
|
|
68041
68041
|
...config.colors
|
|
68042
68042
|
}
|
|
68043
68043
|
});
|
|
68044
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68044
68045
|
} else {
|
|
68045
68046
|
result = _static_cache;
|
|
68046
68047
|
}
|
|
@@ -65395,7 +65395,7 @@ var init_schema = __esm({
|
|
|
65395
65395
|
ci: z2.boolean().default(true).describe(
|
|
65396
65396
|
"An indicator specifying if the current environment is a CI environment"
|
|
65397
65397
|
),
|
|
65398
|
-
workspaceRoot: z2.string().trim().
|
|
65398
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65399
65399
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65400
65400
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
65401
65401
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -68041,6 +68041,7 @@ var init_create_storm_config = __esm({
|
|
|
68041
68041
|
...config.colors
|
|
68042
68042
|
}
|
|
68043
68043
|
});
|
|
68044
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68044
68045
|
} else {
|
|
68045
68046
|
result = _static_cache;
|
|
68046
68047
|
}
|
|
@@ -65395,7 +65395,7 @@ var init_schema = __esm({
|
|
|
65395
65395
|
ci: z2.boolean().default(true).describe(
|
|
65396
65396
|
"An indicator specifying if the current environment is a CI environment"
|
|
65397
65397
|
),
|
|
65398
|
-
workspaceRoot: z2.string().trim().
|
|
65398
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65399
65399
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65400
65400
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
65401
65401
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -68041,6 +68041,7 @@ var init_create_storm_config = __esm({
|
|
|
68041
68041
|
...config.colors
|
|
68042
68042
|
}
|
|
68043
68043
|
});
|
|
68044
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68044
68045
|
} else {
|
|
68045
68046
|
result = _static_cache;
|
|
68046
68047
|
}
|
|
@@ -374533,7 +374534,9 @@ async function nodeLibraryGeneratorFn(tree, schema) {
|
|
|
374533
374534
|
buildExecutor: "@storm-software/workspace-tools:tsup-node"
|
|
374534
374535
|
};
|
|
374535
374536
|
const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
|
|
374536
|
-
const { className, name, propertyName } = (0, import_devkit2.names)(
|
|
374537
|
+
const { className, name, propertyName } = (0, import_devkit2.names)(
|
|
374538
|
+
options.projectNames.projectFileName
|
|
374539
|
+
);
|
|
374537
374540
|
(0, import_devkit2.generateFiles)(tree, filesDir, options.projectRoot, {
|
|
374538
374541
|
...schema,
|
|
374539
374542
|
dot: ".",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Dependabot Update
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
types:
|
|
7
|
+
- opened
|
|
8
|
+
- synchronize
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write
|
|
12
|
+
pull-requests: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
dependabot:
|
|
16
|
+
env:
|
|
17
|
+
PR_URL: ${{github.event.pull_request.html_url}}
|
|
18
|
+
GITHUB_TOKEN: "${{secrets.STORM_BOT_GITHUB_TOKEN}}"
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
if: github.actor == 'dependabot[bot]'
|
|
21
|
+
steps:
|
|
22
|
+
- name: Fetch Dependabot metadata
|
|
23
|
+
id: metadata
|
|
24
|
+
uses: dependabot/fetch-metadata@v2
|
|
25
|
+
with:
|
|
26
|
+
github-token: "${{ secrets.STORM_BOT_GITHUB_TOKEN }}"
|
|
27
|
+
|
|
28
|
+
- name: Auto-merge the pull request in GitHub
|
|
29
|
+
run: gh pr merge --auto --squash --delete-branch "${PR_URL}"
|
|
30
|
+
env:
|
|
31
|
+
GITHUB_ACTOR: Stormie-Bot
|
|
32
|
+
GITHUB_TOKEN: "${{secrets.STORM_BOT_GITHUB_TOKEN}}"
|
|
@@ -65395,7 +65395,7 @@ var init_schema = __esm({
|
|
|
65395
65395
|
ci: z2.boolean().default(true).describe(
|
|
65396
65396
|
"An indicator specifying if the current environment is a CI environment"
|
|
65397
65397
|
),
|
|
65398
|
-
workspaceRoot: z2.string().trim().
|
|
65398
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
65399
65399
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
65400
65400
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
65401
65401
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -68041,6 +68041,7 @@ var init_create_storm_config = __esm({
|
|
|
68041
68041
|
...config.colors
|
|
68042
68042
|
}
|
|
68043
68043
|
});
|
|
68044
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
68044
68045
|
} else {
|
|
68045
68046
|
result = _static_cache;
|
|
68046
68047
|
}
|
|
@@ -69658,7 +69658,7 @@ var init_schema = __esm({
|
|
|
69658
69658
|
ci: z2.boolean().default(true).describe(
|
|
69659
69659
|
"An indicator specifying if the current environment is a CI environment"
|
|
69660
69660
|
),
|
|
69661
|
-
workspaceRoot: z2.string().trim().
|
|
69661
|
+
workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
|
|
69662
69662
|
packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
|
|
69663
69663
|
externalPackagePatterns: z2.array(z2.string()).default([]).describe(
|
|
69664
69664
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
@@ -72304,6 +72304,7 @@ var init_create_storm_config = __esm({
|
|
|
72304
72304
|
...config.colors
|
|
72305
72305
|
}
|
|
72306
72306
|
});
|
|
72307
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot);
|
|
72307
72308
|
} else {
|
|
72308
72309
|
result = _static_cache;
|
|
72309
72310
|
}
|
|
@@ -76,6 +76,67 @@ function isExternal(packageOrDep, workspaceRoot3) {
|
|
|
76
76
|
return isRegistry || isGit || isOutsideWorkspace;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
// packages/workspace-tools/src/plugins/rust/cargo-toml.ts
|
|
80
|
+
var import_node_fs = require("node:fs");
|
|
81
|
+
|
|
82
|
+
// packages/workspace-tools/src/utils/project-tags.ts
|
|
83
|
+
var ProjectTagConstants = {
|
|
84
|
+
Language: {
|
|
85
|
+
TAG_ID: "language",
|
|
86
|
+
TYPESCRIPT: "typescript",
|
|
87
|
+
RUST: "rust"
|
|
88
|
+
},
|
|
89
|
+
ProjectType: {
|
|
90
|
+
TAG_ID: "type",
|
|
91
|
+
LIBRARY: "library",
|
|
92
|
+
APPLICATION: "application"
|
|
93
|
+
},
|
|
94
|
+
DistStyle: {
|
|
95
|
+
TAG_ID: "dist-style",
|
|
96
|
+
NORMAL: "normal",
|
|
97
|
+
CLEAN: "clean"
|
|
98
|
+
},
|
|
99
|
+
Provider: {
|
|
100
|
+
TAG_ID: "provider"
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
var formatProjectTag = (variant, value) => {
|
|
104
|
+
return `${variant}:${value}`;
|
|
105
|
+
};
|
|
106
|
+
var hasProjectTag = (project, variant) => {
|
|
107
|
+
project.tags = project.tags ?? [];
|
|
108
|
+
const prefix = formatProjectTag(variant, "");
|
|
109
|
+
return project.tags.some(
|
|
110
|
+
(tag) => tag.startsWith(prefix) && tag.length > prefix.length
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
var addProjectTag = (project, variant, value, options = {
|
|
114
|
+
overwrite: false
|
|
115
|
+
}) => {
|
|
116
|
+
project.tags = project.tags ?? [];
|
|
117
|
+
if (options.overwrite || !hasProjectTag(project, variant)) {
|
|
118
|
+
project.tags = project.tags.filter(
|
|
119
|
+
(tag) => !tag.startsWith(formatProjectTag(variant, ""))
|
|
120
|
+
);
|
|
121
|
+
project.tags.push(formatProjectTag(variant, value));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
var setDefaultProjectTags = (project) => {
|
|
125
|
+
project.tags = project.tags ?? [];
|
|
126
|
+
addProjectTag(
|
|
127
|
+
project,
|
|
128
|
+
ProjectTagConstants.ProjectType.TAG_ID,
|
|
129
|
+
project.projectType === "application" ? ProjectTagConstants.ProjectType.APPLICATION : ProjectTagConstants.ProjectType.LIBRARY,
|
|
130
|
+
{ overwrite: true }
|
|
131
|
+
);
|
|
132
|
+
addProjectTag(
|
|
133
|
+
project,
|
|
134
|
+
ProjectTagConstants.DistStyle.TAG_ID,
|
|
135
|
+
project.targets && Object.keys(project.targets).includes("clean-package") ? ProjectTagConstants.DistStyle.CLEAN : ProjectTagConstants.DistStyle.NORMAL,
|
|
136
|
+
{ overwrite: true }
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
|
|
79
140
|
// packages/workspace-tools/src/plugins/rust/cargo-toml.ts
|
|
80
141
|
var name = "storm-software/rust/cargo-toml";
|
|
81
142
|
var createNodes = [
|
|
@@ -97,7 +158,23 @@ var createNodes = [
|
|
|
97
158
|
for (const cargoPackage of cargoPackages) {
|
|
98
159
|
if (!isExternal(cargoPackage, ctx.workspaceRoot)) {
|
|
99
160
|
const root = (0, import_node_path2.dirname)(cargoFile);
|
|
100
|
-
const
|
|
161
|
+
const project = {
|
|
162
|
+
root,
|
|
163
|
+
name: cargoPackage.name
|
|
164
|
+
};
|
|
165
|
+
if ((0, import_node_fs.existsSync)((0, import_devkit2.joinPathFragments)(root, "project.json"))) {
|
|
166
|
+
const projectJson = (0, import_devkit2.readJsonFile)(
|
|
167
|
+
(0, import_devkit2.joinPathFragments)(root, "project.json")
|
|
168
|
+
);
|
|
169
|
+
if (projectJson) {
|
|
170
|
+
Object.keys(projectJson).forEach((key) => {
|
|
171
|
+
if (!project[key]) {
|
|
172
|
+
project[key] = projectJson[key];
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
project.targets = {
|
|
101
178
|
"lint-ls": {
|
|
102
179
|
cache: true,
|
|
103
180
|
inputs: ["config_linting", "rust", "^production"],
|
|
@@ -179,7 +256,7 @@ var createNodes = [
|
|
|
179
256
|
};
|
|
180
257
|
const isPrivate = cargoPackage.publish?.length === 0;
|
|
181
258
|
if (!isPrivate) {
|
|
182
|
-
targets["nx-release-publish"] = {
|
|
259
|
+
project.targets["nx-release-publish"] = {
|
|
183
260
|
cache: false,
|
|
184
261
|
inputs: ["rust", "^production"],
|
|
185
262
|
executor: "@storm-software/workspace-tools:cargo-publish",
|
|
@@ -188,16 +265,22 @@ var createNodes = [
|
|
|
188
265
|
}
|
|
189
266
|
};
|
|
190
267
|
}
|
|
268
|
+
addProjectTag(
|
|
269
|
+
project,
|
|
270
|
+
ProjectTagConstants.Language.TAG_ID,
|
|
271
|
+
ProjectTagConstants.Language.RUST,
|
|
272
|
+
{ overwrite: true }
|
|
273
|
+
);
|
|
274
|
+
setDefaultProjectTags(project);
|
|
191
275
|
projects[root] = {
|
|
192
|
-
|
|
193
|
-
name: cargoPackage.name,
|
|
194
|
-
targets,
|
|
276
|
+
...project,
|
|
195
277
|
release: {
|
|
278
|
+
...project.release,
|
|
196
279
|
version: {
|
|
280
|
+
...project.release?.version,
|
|
197
281
|
generator: "@storm-software/workspace-tools:release-version"
|
|
198
282
|
}
|
|
199
|
-
}
|
|
200
|
-
tags: ["language:rust"]
|
|
283
|
+
}
|
|
201
284
|
};
|
|
202
285
|
}
|
|
203
286
|
for (const dep of cargoPackage.dependencies) {
|