@storm-software/workspace-tools 1.118.0 → 1.119.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 +9 -0
- package/README.md +43 -8
- package/executors.json +5 -0
- package/index.js +11902 -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/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/plugins/typescript/project-config.d.ts +1 -1
- 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 +2 -1
- package/src/generators/config-schema/generator.js +2 -1
- package/src/generators/neutral-library/generator.js +2 -1
- package/src/generators/node-library/generator.js +2 -1
- 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 +38 -7
- package/src/plugins/typescript/index.js +27 -1
- package/src/utils/index.js +2 -1
- package/src/generators/preset/files/.github/workflows/dependabot-approve.yml +0 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/workspace-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.119.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.",
|
|
6
6
|
"repository": {
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"esbuild-plugin-pino": "2.1.1",
|
|
62
62
|
"fs-extra": "11.2.0",
|
|
63
63
|
"glob": "10.4.2",
|
|
64
|
+
"micromatch": "4.0.7",
|
|
64
65
|
"npm-run-path": "5.3.0",
|
|
65
66
|
"pkg-types": "1.1.1",
|
|
66
67
|
"prettier": "3.3.2",
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
"zod-to-json-schema": "3.23.1"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
79
|
+
"@types/micromatch": "4.0.9",
|
|
78
80
|
"@types/semver": "7.5.8"
|
|
79
81
|
},
|
|
80
82
|
"publishConfig": {
|
|
@@ -795,7 +795,7 @@ export declare const StormConfigSchema: z.ZodObject<{
|
|
|
795
795
|
worker: z.ZodDefault<z.ZodString>;
|
|
796
796
|
env: z.ZodDefault<z.ZodEnum<["development", "staging", "production"]>>;
|
|
797
797
|
ci: z.ZodDefault<z.ZodBoolean>;
|
|
798
|
-
workspaceRoot: z.
|
|
798
|
+
workspaceRoot: z.ZodDefault<z.ZodString>;
|
|
799
799
|
packageDirectory: z.ZodOptional<z.ZodString>;
|
|
800
800
|
externalPackagePatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
801
801
|
skipCache: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -1371,6 +1371,7 @@ export declare const StormConfigSchema: z.ZodObject<{
|
|
|
1371
1371
|
worker: string;
|
|
1372
1372
|
env: "development" | "staging" | "production";
|
|
1373
1373
|
ci: boolean;
|
|
1374
|
+
workspaceRoot: string;
|
|
1374
1375
|
externalPackagePatterns: string[];
|
|
1375
1376
|
skipCache: boolean;
|
|
1376
1377
|
cacheDirectory: string;
|
|
@@ -1506,7 +1507,6 @@ export declare const StormConfigSchema: z.ZodObject<{
|
|
|
1506
1507
|
namespace?: string | undefined;
|
|
1507
1508
|
repository?: string | undefined;
|
|
1508
1509
|
preid?: string | undefined;
|
|
1509
|
-
workspaceRoot?: string | undefined;
|
|
1510
1510
|
packageDirectory?: string | undefined;
|
|
1511
1511
|
}, {
|
|
1512
1512
|
colors: {
|
|
@@ -12,6 +12,8 @@ export * from "./src/executors/tsup-browser/executor";
|
|
|
12
12
|
export * from "./src/executors/tsup-browser/schema";
|
|
13
13
|
export * from "./src/executors/typia/executor";
|
|
14
14
|
export * from "./src/executors/typia/schema";
|
|
15
|
+
export * from "./src/executors/clean-package/executor";
|
|
16
|
+
export * from "./src/executors/clean-package/schema";
|
|
15
17
|
export * from "./src/executors/cargo-publish/executor";
|
|
16
18
|
export * from "./src/executors/cargo-publish/schema";
|
|
17
19
|
export * from "./src/executors/npm-publish/executor";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { ExecutorContext } from "@nx/devkit";
|
|
1
|
+
import type { ExecutorContext, PromiseExecutor } from "@nx/devkit";
|
|
2
2
|
import type { StormConfig } from "@storm-software/config";
|
|
3
3
|
import type { BaseExecutorOptions, BaseExecutorResult, BaseExecutorSchema } from "../../declarations";
|
|
4
|
-
export declare const withRunExecutor: <TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(name: string, executorFn: (options: TExecutorSchema, context: ExecutorContext, config
|
|
5
|
-
success: boolean;
|
|
6
|
-
}>;
|
|
4
|
+
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>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
+
import type { StormConfig } from "@storm-software/config";
|
|
3
|
+
import { CleanPackageExecutorSchema } from "./schema";
|
|
4
|
+
export declare function cleanPackageExecutorFn(options: CleanPackageExecutorSchema, context: ExecutorContext, config: StormConfig): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<CleanPackageExecutorSchema>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function isObject(object: any): boolean;
|
|
2
|
+
export declare function filterObjectByKey(object: Record<string, any>, filterByKey?: (key?: string) => boolean, deep?: boolean): {};
|
|
3
|
+
export declare function createIgnoreMatcher(ignorePattern?: string | RegExp): (_filename: any, path: any) => boolean;
|
|
4
|
+
export declare function createFilesFilter(ignoreFiles: string | undefined, cwd: string): Promise<(path: any) => boolean | void | undefined>;
|
|
@@ -5,7 +5,5 @@ import type { RolldownExecutorSchema } from "./schema.d";
|
|
|
5
5
|
export declare function rolldownExecutorFn(options: RolldownExecutorSchema, context: ExecutorContext, config?: StormConfig): Promise<{
|
|
6
6
|
success: boolean;
|
|
7
7
|
}>;
|
|
8
|
-
declare const _default: (
|
|
9
|
-
success: boolean;
|
|
10
|
-
}>;
|
|
8
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<RolldownOptions>;
|
|
11
9
|
export default _default;
|
|
@@ -4,7 +4,5 @@ import type { TsupExecutorSchema } from "./schema.d";
|
|
|
4
4
|
export declare function tsupExecutorFn(options: TsupExecutorSchema, context: ExecutorContext, config?: StormConfig): Promise<{
|
|
5
5
|
success: boolean;
|
|
6
6
|
}>;
|
|
7
|
-
declare const _default: (
|
|
8
|
-
success: boolean;
|
|
9
|
-
}>;
|
|
7
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<TsupExecutorSchema>;
|
|
10
8
|
export default _default;
|
|
@@ -3,7 +3,5 @@ import type { TsupBrowserExecutorSchema } from "./schema.d";
|
|
|
3
3
|
export declare const tsupBrowserBuildExecutorFn: (options: TsupBrowserExecutorSchema, context: ExecutorContext, config?: any) => Promise<{
|
|
4
4
|
success: boolean;
|
|
5
5
|
}>;
|
|
6
|
-
declare const _default: (
|
|
7
|
-
success: boolean;
|
|
8
|
-
}>;
|
|
6
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<TsupBrowserExecutorSchema>;
|
|
9
7
|
export default _default;
|
|
@@ -4,7 +4,5 @@ import type { TsupNeutralExecutorSchema } from "./schema";
|
|
|
4
4
|
export declare const tsupNeutralBuildExecutorFn: (options: TsupNeutralExecutorSchema, context: ExecutorContext, config?: StormConfig) => Promise<{
|
|
5
5
|
success: boolean;
|
|
6
6
|
}>;
|
|
7
|
-
declare const _default: (
|
|
8
|
-
success: boolean;
|
|
9
|
-
}>;
|
|
7
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<TsupNeutralExecutorSchema>;
|
|
10
8
|
export default _default;
|
|
@@ -3,7 +3,5 @@ import type { TsupNodeExecutorSchema } from "./schema";
|
|
|
3
3
|
export declare const tsupNodeBuildExecutorFn: (options: TsupNodeExecutorSchema, context: ExecutorContext, config?: any) => Promise<{
|
|
4
4
|
success: boolean;
|
|
5
5
|
}>;
|
|
6
|
-
declare const _default: (
|
|
7
|
-
success: boolean;
|
|
8
|
-
}>;
|
|
6
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<TsupNodeExecutorSchema>;
|
|
9
7
|
export default _default;
|
|
@@ -4,7 +4,5 @@ import type { TypiaExecutorSchema } from "./schema";
|
|
|
4
4
|
export declare function typiaExecutorFn(options: TypiaExecutorSchema, _: ExecutorContext, config?: StormConfig): Promise<{
|
|
5
5
|
success: boolean;
|
|
6
6
|
}>;
|
|
7
|
-
declare const _default: (
|
|
8
|
-
success: boolean;
|
|
9
|
-
}>;
|
|
7
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<TypiaExecutorSchema>;
|
|
10
8
|
export default _default;
|
|
@@ -5,7 +5,5 @@ import type { UnbuildExecutorSchema } from "./schema.d";
|
|
|
5
5
|
export declare function unbuildExecutorFn(options: UnbuildExecutorSchema, context: ExecutorContext, config?: StormConfig): Promise<{
|
|
6
6
|
success: boolean;
|
|
7
7
|
}>;
|
|
8
|
-
declare const _default: (
|
|
9
|
-
success: boolean;
|
|
10
|
-
}>;
|
|
8
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<UnbuildBuildOptions>;
|
|
11
9
|
export default _default;
|
|
@@ -4,6 +4,7 @@ export declare const createNodes: (string | ((file: any, _: any, ctx: any) => {
|
|
|
4
4
|
} | {
|
|
5
5
|
projects: {
|
|
6
6
|
[x: string]: {
|
|
7
|
+
tags: string[];
|
|
7
8
|
targets: {
|
|
8
9
|
[targetName: string]: import("nx/src/config/workspace-json-project-json").TargetConfiguration<any>;
|
|
9
10
|
};
|
|
@@ -26,7 +27,6 @@ export declare const createNodes: (string | ((file: any, _: any, ctx: any) => {
|
|
|
26
27
|
namedInputs?: {
|
|
27
28
|
[inputName: string]: (string | import("nx/src/config/workspace-json-project-json").InputDefinition)[];
|
|
28
29
|
} | undefined;
|
|
29
|
-
tags: string[];
|
|
30
30
|
metadata?: import("nx/src/config/workspace-json-project-json").ProjectMetadata | undefined;
|
|
31
31
|
};
|
|
32
32
|
};
|
package/src/base/index.js
CHANGED
|
@@ -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
|
}
|
|
@@ -374120,7 +374121,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
374120
374121
|
} = await Promise.resolve().then(() => (init_src2(), src_exports));
|
|
374121
374122
|
const stopwatch = getStopwatch2(name);
|
|
374122
374123
|
let options = _options;
|
|
374123
|
-
let config;
|
|
374124
|
+
let config = {};
|
|
374124
374125
|
try {
|
|
374125
374126
|
writeInfo2(`\u26A1 Running the ${name} executor...
|
|
374126
374127
|
`, config);
|
|
@@ -374133,6 +374134,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
374133
374134
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
374134
374135
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
374135
374136
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
374137
|
+
config.workspaceRoot = workspaceRoot;
|
|
374136
374138
|
if (!executorOptions.skipReadingConfig) {
|
|
374137
374139
|
writeDebug2(
|
|
374138
374140
|
`Loading the Storm Config from environment variables and storm.config.js file...
|