@storm-software/workspace-tools 1.270.1 → 1.271.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 +43 -0
- package/README.md +1 -1
- package/dist/chunk-4QYM3VS4.mjs +282 -0
- package/dist/{chunk-ZP76EMBE.js → chunk-FYXWAGK3.js} +97 -27
- package/dist/chunk-MJMN2T4N.mjs +166 -0
- package/dist/chunk-RZVF4LHT.js +282 -0
- package/dist/executors.js +3 -3
- package/dist/executors.mjs +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +4 -4
- package/dist/src/executors/npm-publish/executor.js +3 -3
- package/dist/src/executors/npm-publish/executor.mjs +2 -2
- package/dist/src/generators/preset/files/LICENSE +201 -0
- package/dist/src/utils/index.d.mts +1 -1
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/index.js +2 -2
- package/dist/src/utils/index.mjs +3 -3
- package/dist/src/utils/pnpm-deps-update.d.mts +3 -3
- package/dist/src/utils/pnpm-deps-update.d.ts +3 -3
- package/dist/src/utils/pnpm-deps-update.js +2 -2
- package/dist/src/utils/pnpm-deps-update.mjs +3 -3
- package/docs/api/base/base-executor.schema.md +16 -0
- package/docs/api/base/base-generator.schema.md +15 -0
- package/docs/api/base/cargo-base-executor.schema.md +90 -0
- package/docs/api/base/typescript-build-executor.schema.md +126 -0
- package/docs/api/base/typescript-library-generator.schema.md +129 -0
- package/docs/api/executors/cargo-build/schema.md +89 -0
- package/docs/api/executors/cargo-check/schema.md +90 -0
- package/docs/api/executors/cargo-clippy/schema.md +99 -0
- package/docs/api/executors/cargo-doc/schema.md +130 -0
- package/docs/api/executors/cargo-format/schema.md +90 -0
- package/docs/api/executors/cargo-publish/schema.md +117 -0
- package/docs/api/executors/clean-package/schema.md +65 -0
- package/docs/api/executors/esbuild/schema.md +126 -0
- package/docs/api/executors/npm-publish/schema.md +64 -0
- package/docs/api/executors/size-limit/schema.md +25 -0
- package/docs/api/executors/typia/schema.md +46 -0
- package/docs/api/executors/unbuild/schema.md +222 -0
- package/docs/api/generators/browser-library/files/README.md +58 -0
- package/docs/api/generators/browser-library/schema.md +129 -0
- package/docs/api/generators/config-schema/schema.md +25 -0
- package/docs/api/generators/init/schema.md +15 -0
- package/docs/api/generators/neutral-library/files/README.md +58 -0
- package/docs/api/generators/neutral-library/schema.md +129 -0
- package/docs/api/generators/node-library/files/README.md +63 -0
- package/docs/api/generators/node-library/schema.md +129 -0
- package/docs/api/generators/preset/schema.md +110 -0
- package/docs/api/generators/release-version/schema.md +160 -0
- package/package.json +13 -35
- package/dist/chunk-CWBVTZAO.mjs +0 -467
- package/dist/chunk-HMJTTE4A.mjs +0 -96
- package/dist/chunk-PGUGHXXT.js +0 -467
- package/docs/executors/rollup.md +0 -88
- package/executors.ts +0 -23
- package/generators.ts +0 -14
- package/index.ts +0 -5
- package/project.json +0 -58
- package/src/base/base-executor.ts +0 -200
- package/src/base/base-executor.untyped.ts +0 -18
- package/src/base/base-generator.ts +0 -130
- package/src/base/base-generator.untyped.ts +0 -16
- package/src/base/cargo-base-executor.untyped.ts +0 -73
- package/src/base/index.ts +0 -8
- package/src/base/typescript-build-executor.untyped.ts +0 -153
- package/src/base/typescript-library-generator.ts +0 -415
- package/src/base/typescript-library-generator.untyped.ts +0 -106
- package/src/executors/cargo-build/executor.spec.ts +0 -18
- package/src/executors/cargo-build/executor.ts +0 -28
- package/src/executors/cargo-build/untyped.ts +0 -18
- package/src/executors/cargo-check/executor.spec.ts +0 -18
- package/src/executors/cargo-check/executor.ts +0 -27
- package/src/executors/cargo-check/untyped.ts +0 -11
- package/src/executors/cargo-clippy/executor.spec.ts +0 -18
- package/src/executors/cargo-clippy/executor.ts +0 -28
- package/src/executors/cargo-clippy/untyped.ts +0 -18
- package/src/executors/cargo-doc/executor.spec.ts +0 -18
- package/src/executors/cargo-doc/executor.ts +0 -39
- package/src/executors/cargo-doc/untyped.ts +0 -44
- package/src/executors/cargo-format/executor.spec.ts +0 -18
- package/src/executors/cargo-format/executor.ts +0 -28
- package/src/executors/cargo-format/untyped.ts +0 -11
- package/src/executors/cargo-publish/executor.spec.ts +0 -11
- package/src/executors/cargo-publish/executor.ts +0 -139
- package/src/executors/cargo-publish/untyped.ts +0 -33
- package/src/executors/clean-package/constants.ts +0 -99
- package/src/executors/clean-package/executor.spec.ts +0 -18
- package/src/executors/clean-package/executor.ts +0 -214
- package/src/executors/clean-package/types.ts +0 -6
- package/src/executors/clean-package/untyped.ts +0 -60
- package/src/executors/clean-package/utils.ts +0 -85
- package/src/executors/esbuild/executor.spec.ts +0 -11
- package/src/executors/esbuild/executor.ts +0 -67
- package/src/executors/esbuild/untyped.ts +0 -20
- package/src/executors/npm-publish/executor.spec.ts +0 -11
- package/src/executors/npm-publish/executor.ts +0 -680
- package/src/executors/npm-publish/untyped.ts +0 -56
- package/src/executors/size-limit/executor.spec.ts +0 -18
- package/src/executors/size-limit/executor.ts +0 -88
- package/src/executors/size-limit/untyped.ts +0 -22
- package/src/executors/typia/executor.ts +0 -54
- package/src/executors/typia/untyped.ts +0 -48
- package/src/executors/unbuild/executor.spec.ts +0 -11
- package/src/executors/unbuild/executor.ts +0 -136
- package/src/executors/unbuild/untyped.ts +0 -152
- package/src/generators/browser-library/generator.spec.ts +0 -20
- package/src/generators/browser-library/generator.ts +0 -109
- package/src/generators/browser-library/untyped.ts +0 -29
- package/src/generators/config-schema/generator.spec.ts +0 -20
- package/src/generators/config-schema/generator.ts +0 -90
- package/src/generators/config-schema/untyped.ts +0 -19
- package/src/generators/init/init.ts +0 -32
- package/src/generators/init/untyped.ts +0 -16
- package/src/generators/neutral-library/generator.spec.ts +0 -20
- package/src/generators/neutral-library/generator.ts +0 -81
- package/src/generators/neutral-library/untyped.ts +0 -29
- package/src/generators/node-library/generator.spec.ts +0 -20
- package/src/generators/node-library/generator.ts +0 -84
- package/src/generators/node-library/untyped.ts +0 -29
- package/src/generators/preset/files/.all-contributorsrc.template +0 -48
- package/src/generators/preset/files/.editorconfig +0 -454
- package/src/generators/preset/files/.env.template +0 -38
- package/src/generators/preset/files/.gitattributes +0 -52
- package/src/generators/preset/files/.github/.nvmrc +0 -1
- package/src/generators/preset/files/.github/CODEOWNERS +0 -3
- package/src/generators/preset/files/.github/CODE_OF_CONDUCT.md +0 -125
- package/src/generators/preset/files/.github/CONTRIBUTING.md.template +0 -15
- package/src/generators/preset/files/.github/FUNDING.yml +0 -3
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/bug-report.yml.template +0 -102
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/documentation.yml.template +0 -56
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/feature-request.yml.template +0 -60
- package/src/generators/preset/files/.github/PULL_REQUEST_TEMPLATE.md.template +0 -39
- package/src/generators/preset/files/.github/SECURITY.md +0 -9
- package/src/generators/preset/files/.github/codecov.yml +0 -29
- package/src/generators/preset/files/.github/dependabot.yml +0 -64
- package/src/generators/preset/files/.github/labels.yml +0 -84
- package/src/generators/preset/files/.github/renovate.json +0 -4
- package/src/generators/preset/files/.github/renovate.json.template +0 -63
- package/src/generators/preset/files/.github/stale.yml +0 -55
- package/src/generators/preset/files/.github/workflows/build-release.yml.template +0 -25
- package/src/generators/preset/files/.github/workflows/code-review.yml +0 -18
- package/src/generators/preset/files/.github/workflows/codeql.yml +0 -84
- package/src/generators/preset/files/.github/workflows/dependabot-update.yml +0 -32
- package/src/generators/preset/files/.github/workflows/git-guardian.yml +0 -23
- package/src/generators/preset/files/.github/workflows/greetings.yml +0 -31
- package/src/generators/preset/files/.github/workflows/labels.yml +0 -31
- package/src/generators/preset/files/.github/workflows/lock.yml +0 -26
- package/src/generators/preset/files/.log4brains.yml.template +0 -5
- package/src/generators/preset/files/.markdownlint.json +0 -155
- package/src/generators/preset/files/.verdaccio/config.yml.template +0 -40
- package/src/generators/preset/files/.vscode/README.md +0 -32
- package/src/generators/preset/files/.vscode/cspell.json +0 -3
- package/src/generators/preset/files/.vscode/extensions.json +0 -14
- package/src/generators/preset/files/.vscode/launch.json +0 -37
- package/src/generators/preset/files/.vscode/settings.json +0 -401
- package/src/generators/preset/files/.vscode/tasks.json +0 -4
- package/src/generators/preset/files/.whitesource +0 -14
- package/src/generators/preset/files/assets/diagrams/.gitkeep +0 -0
- package/src/generators/preset/files/assets/icons/dark/.gitkeep +0 -0
- package/src/generators/preset/files/assets/icons/light/.gitkeep +0 -0
- package/src/generators/preset/files/assets/logos/.gitkeep +0 -0
- package/src/generators/preset/files/docs/api-reference/.gitkeep +0 -0
- package/src/generators/preset/generator.spec.ts +0 -20
- package/src/generators/preset/generator.ts +0 -315
- package/src/generators/preset/untyped.ts +0 -88
- package/src/generators/release-version/generator.spec.ts +0 -20
- package/src/generators/release-version/generator.ts +0 -920
- package/src/generators/release-version/untyped.ts +0 -156
- package/src/plugins/rust/cargo-toml.ts +0 -434
- package/src/plugins/rust/index.ts +0 -1
- package/src/plugins/typescript/index.ts +0 -1
- package/src/plugins/typescript/project-config.ts +0 -564
- package/src/plugins/typescript/tsup.ts +0 -198
- package/src/types.ts +0 -130
- package/src/utils/apply-workspace-tokens.ts +0 -73
- package/src/utils/cargo.ts +0 -219
- package/src/utils/create-cli-options.ts +0 -23
- package/src/utils/get-project-configurations.ts +0 -27
- package/src/utils/index.ts +0 -12
- package/src/utils/lock-file.ts +0 -159
- package/src/utils/package-helpers.ts +0 -54
- package/src/utils/plugin-helpers.ts +0 -112
- package/src/utils/pnpm-deps-update.ts +0 -111
- package/src/utils/project-tags.ts +0 -162
- package/src/utils/toml.ts +0 -204
- package/src/utils/typia-transform.ts +0 -8
- package/src/utils/versions.ts +0 -19
- package/tsconfig.json +0 -30
- package/tsup.config.ts +0 -36
- /package/{src/generators/preset/files/LICENSE → LICENSE} +0 -0
- /package/{src → dist/src}/base/base-executor.schema.d.ts +0 -0
- /package/{src → dist/src}/base/base-executor.schema.json +0 -0
- /package/{src → dist/src}/base/base-executor.schema.md +0 -0
- /package/{src → dist/src}/base/base-generator.schema.d.ts +0 -0
- /package/{src → dist/src}/base/base-generator.schema.json +0 -0
- /package/{src → dist/src}/base/base-generator.schema.md +0 -0
- /package/{src → dist/src}/base/cargo-base-executor.schema.d.ts +0 -0
- /package/{src → dist/src}/base/cargo-base-executor.schema.json +0 -0
- /package/{src → dist/src}/base/cargo-base-executor.schema.md +0 -0
- /package/{src → dist/src}/base/typescript-build-executor.schema.d.ts +0 -0
- /package/{src → dist/src}/base/typescript-build-executor.schema.json +0 -0
- /package/{src → dist/src}/base/typescript-build-executor.schema.md +0 -0
- /package/{src → dist/src}/base/typescript-library-generator.schema.d.ts +0 -0
- /package/{src → dist/src}/base/typescript-library-generator.schema.json +0 -0
- /package/{src → dist/src}/base/typescript-library-generator.schema.md +0 -0
- /package/{src → dist/src}/executors/cargo-build/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/cargo-build/schema.json +0 -0
- /package/{src → dist/src}/executors/cargo-build/schema.md +0 -0
- /package/{src → dist/src}/executors/cargo-check/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/cargo-check/schema.json +0 -0
- /package/{src → dist/src}/executors/cargo-check/schema.md +0 -0
- /package/{src → dist/src}/executors/cargo-clippy/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/cargo-clippy/schema.json +0 -0
- /package/{src → dist/src}/executors/cargo-clippy/schema.md +0 -0
- /package/{src → dist/src}/executors/cargo-doc/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/cargo-doc/schema.json +0 -0
- /package/{src → dist/src}/executors/cargo-doc/schema.md +0 -0
- /package/{src → dist/src}/executors/cargo-format/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/cargo-format/schema.json +0 -0
- /package/{src → dist/src}/executors/cargo-format/schema.md +0 -0
- /package/{src → dist/src}/executors/cargo-publish/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/cargo-publish/schema.json +0 -0
- /package/{src → dist/src}/executors/cargo-publish/schema.md +0 -0
- /package/{src → dist/src}/executors/clean-package/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/clean-package/schema.json +0 -0
- /package/{src → dist/src}/executors/clean-package/schema.md +0 -0
- /package/{src → dist/src}/executors/esbuild/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/esbuild/schema.json +0 -0
- /package/{src → dist/src}/executors/esbuild/schema.md +0 -0
- /package/{src → dist/src}/executors/npm-publish/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/npm-publish/schema.json +0 -0
- /package/{src → dist/src}/executors/npm-publish/schema.md +0 -0
- /package/{src → dist/src}/executors/size-limit/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/size-limit/schema.json +0 -0
- /package/{src → dist/src}/executors/size-limit/schema.md +0 -0
- /package/{src → dist/src}/executors/typia/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/typia/schema.json +0 -0
- /package/{src → dist/src}/executors/typia/schema.md +0 -0
- /package/{src → dist/src}/executors/unbuild/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/unbuild/schema.json +0 -0
- /package/{src → dist/src}/executors/unbuild/schema.md +0 -0
- /package/{src → dist/src}/generators/browser-library/files/README.md +0 -0
- /package/{src → dist/src}/generators/browser-library/files/jest.config.ts +0 -0
- /package/{src → dist/src}/generators/browser-library/files/src/index.ts.template +0 -0
- /package/{src → dist/src}/generators/browser-library/files/tsconfig.spec.json +0 -0
- /package/{src → dist/src}/generators/browser-library/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/browser-library/schema.json +0 -0
- /package/{src → dist/src}/generators/browser-library/schema.md +0 -0
- /package/{src → dist/src}/generators/config-schema/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/config-schema/schema.json +0 -0
- /package/{src → dist/src}/generators/config-schema/schema.md +0 -0
- /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/init/schema.json +0 -0
- /package/{src → dist/src}/generators/init/schema.md +0 -0
- /package/{src → dist/src}/generators/neutral-library/files/README.md +0 -0
- /package/{src → dist/src}/generators/neutral-library/files/jest.config.ts +0 -0
- /package/{src → dist/src}/generators/neutral-library/files/src/index.ts.template +0 -0
- /package/{src → dist/src}/generators/neutral-library/files/tsconfig.spec.json +0 -0
- /package/{src → dist/src}/generators/neutral-library/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/neutral-library/schema.json +0 -0
- /package/{src → dist/src}/generators/neutral-library/schema.md +0 -0
- /package/{src → dist/src}/generators/node-library/files/README.md +0 -0
- /package/{src → dist/src}/generators/node-library/files/jest.config.ts +0 -0
- /package/{src → dist/src}/generators/node-library/files/src/index.ts.template +0 -0
- /package/{src → dist/src}/generators/node-library/files/tsconfig.spec.json +0 -0
- /package/{src → dist/src}/generators/node-library/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/node-library/schema.json +0 -0
- /package/{src → dist/src}/generators/node-library/schema.md +0 -0
- /package/{src → dist/src}/generators/preset/files/README.md.template +0 -0
- /package/{src → dist/src}/generators/preset/files/docs/readme-templates/README.footer.md.template +0 -0
- /package/{src → dist/src}/generators/preset/files/docs/readme-templates/README.header.md.template +0 -0
- /package/{src → dist/src}/generators/preset/files/eslint.config.js.template +0 -0
- /package/{src → dist/src}/generators/preset/files/knip.json +0 -0
- /package/{src → dist/src}/generators/preset/files/lefthook.json +0 -0
- /package/{src → dist/src}/generators/preset/files/nx.json +0 -0
- /package/{src → dist/src}/generators/preset/files/pnpm-workspace.yaml +0 -0
- /package/{src → dist/src}/generators/preset/files/socket.yaml +0 -0
- /package/{src → dist/src}/generators/preset/files/storm.json.template +0 -0
- /package/{src → dist/src}/generators/preset/files/tsconfig.base.json.template +0 -0
- /package/{src → dist/src}/generators/preset/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/preset/schema.json +0 -0
- /package/{src → dist/src}/generators/preset/schema.md +0 -0
- /package/{src → dist/src}/generators/release-version/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/release-version/schema.json +0 -0
- /package/{src → dist/src}/generators/release-version/schema.md +0 -0
- /package/{src → dist/src}/plugins/typescript/untyped-schema.ts +0 -0
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { defineUntypedSchema } from "untyped";
|
|
2
|
-
|
|
3
|
-
export default defineUntypedSchema({
|
|
4
|
-
$schema: {
|
|
5
|
-
id: "ReleaseVersionGeneratorSchema",
|
|
6
|
-
title: "Release Version Generator",
|
|
7
|
-
description: "A type definition for a release version generator schema",
|
|
8
|
-
required: ["projects", "releaseGroup", "projectGraph", "specifier"]
|
|
9
|
-
},
|
|
10
|
-
projects: {
|
|
11
|
-
$schema: {
|
|
12
|
-
title: "Projects",
|
|
13
|
-
type: "array",
|
|
14
|
-
items: {
|
|
15
|
-
type: "object"
|
|
16
|
-
},
|
|
17
|
-
description: "The projects to release"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
releaseGroup: {
|
|
21
|
-
$schema: {
|
|
22
|
-
title: "Release Group",
|
|
23
|
-
type: "object",
|
|
24
|
-
description: "The release group"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
projectGraph: {
|
|
28
|
-
$schema: {
|
|
29
|
-
title: "Project Graph",
|
|
30
|
-
type: "object",
|
|
31
|
-
description: "The project graph"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
specifier: {
|
|
35
|
-
$schema: {
|
|
36
|
-
title: "Specifier",
|
|
37
|
-
type: "string",
|
|
38
|
-
description: "The specifier"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
specifierSource: {
|
|
42
|
-
$schema: {
|
|
43
|
-
title: "Specifier Source",
|
|
44
|
-
type: "string",
|
|
45
|
-
description: "The specifier source"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
preid: {
|
|
49
|
-
$schema: {
|
|
50
|
-
title: "Preid",
|
|
51
|
-
type: "string",
|
|
52
|
-
description: "The preid"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
packageRoot: {
|
|
56
|
-
$schema: {
|
|
57
|
-
title: "Package Root",
|
|
58
|
-
type: "string",
|
|
59
|
-
description: "The package root"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
currentVersionResolver: {
|
|
63
|
-
$schema: {
|
|
64
|
-
title: "Current Version Resolver",
|
|
65
|
-
type: "string",
|
|
66
|
-
description: "The current version resolver"
|
|
67
|
-
},
|
|
68
|
-
$default: "git-tag"
|
|
69
|
-
},
|
|
70
|
-
currentVersionResolverMetadata: {
|
|
71
|
-
$schema: {
|
|
72
|
-
title: "Current Version Resolver Metadata",
|
|
73
|
-
type: "object",
|
|
74
|
-
description: "The current version resolver metadata"
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
fallbackCurrentVersionResolver: {
|
|
78
|
-
$schema: {
|
|
79
|
-
title: "Fallback Current Version Resolver",
|
|
80
|
-
type: "string",
|
|
81
|
-
description: "The fallback current version resolver"
|
|
82
|
-
},
|
|
83
|
-
$default: "disk"
|
|
84
|
-
},
|
|
85
|
-
firstRelease: {
|
|
86
|
-
$schema: {
|
|
87
|
-
title: "First Release",
|
|
88
|
-
type: "boolean",
|
|
89
|
-
description: "Release the first version"
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
versionPrefix: {
|
|
93
|
-
$schema: {
|
|
94
|
-
title: "Version Prefix",
|
|
95
|
-
type: "string",
|
|
96
|
-
description: "The version prefix",
|
|
97
|
-
enum: ["", "auto", "~", "^", "="]
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
skipLockFileUpdate: {
|
|
101
|
-
$schema: {
|
|
102
|
-
title: "Skip Lock File Update",
|
|
103
|
-
type: "boolean",
|
|
104
|
-
description: "Skip lock file update"
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
installArgs: {
|
|
108
|
-
$schema: {
|
|
109
|
-
title: "Install Args",
|
|
110
|
-
type: "string",
|
|
111
|
-
description: "The install arguments"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
installIgnoreScripts: {
|
|
115
|
-
$schema: {
|
|
116
|
-
title: "Install Ignore Scripts",
|
|
117
|
-
type: "boolean",
|
|
118
|
-
description: "Ignore scripts"
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
conventionalCommitsConfig: {
|
|
122
|
-
$schema: {
|
|
123
|
-
title: "Conventional Commits Config",
|
|
124
|
-
type: "object",
|
|
125
|
-
description: "The conventional commits config"
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
deleteVersionPlans: {
|
|
129
|
-
$schema: {
|
|
130
|
-
title: "Delete Version Plans",
|
|
131
|
-
type: "boolean",
|
|
132
|
-
description: "Delete version plans"
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
updateDependents: {
|
|
136
|
-
$schema: {
|
|
137
|
-
title: "Update Dependents",
|
|
138
|
-
type: "string",
|
|
139
|
-
description: "Update dependents"
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
logUnchangedProjects: {
|
|
143
|
-
$schema: {
|
|
144
|
-
title: "Log Unchanged Projects",
|
|
145
|
-
type: "boolean",
|
|
146
|
-
description: "Log unchanged projects"
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
preserveLocalDependencyProtocols: {
|
|
150
|
-
$schema: {
|
|
151
|
-
title: "Preserve Local Dependency Protocols",
|
|
152
|
-
type: "boolean",
|
|
153
|
-
description: "Preserve local dependency protocols"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
});
|
|
@@ -1,434 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createNodesFromFiles,
|
|
3
|
-
CreateNodesResultV2,
|
|
4
|
-
CreateNodesV2,
|
|
5
|
-
joinPathFragments,
|
|
6
|
-
readJsonFile,
|
|
7
|
-
workspaceRoot,
|
|
8
|
-
type CreateDependencies,
|
|
9
|
-
type ProjectConfiguration,
|
|
10
|
-
type RawProjectGraphDependency
|
|
11
|
-
} from "@nx/devkit";
|
|
12
|
-
import { existsSync } from "node:fs";
|
|
13
|
-
import { dirname } from "node:path";
|
|
14
|
-
import {
|
|
15
|
-
DependencyType,
|
|
16
|
-
type ProjectGraphExternalNode
|
|
17
|
-
} from "nx/src/config/project-graph";
|
|
18
|
-
import { cargoMetadata, isExternal } from "../../utils/cargo";
|
|
19
|
-
import {
|
|
20
|
-
addProjectTag,
|
|
21
|
-
ProjectTagConstants,
|
|
22
|
-
setDefaultProjectTags
|
|
23
|
-
} from "../../utils/project-tags";
|
|
24
|
-
import type { Package } from "../../utils/toml";
|
|
25
|
-
|
|
26
|
-
export const name = "storm-software/rust";
|
|
27
|
-
export const description = "Plugin for parsing Cargo.toml files";
|
|
28
|
-
|
|
29
|
-
export type CargoPluginProfileMap = Record<string, string> & {
|
|
30
|
-
development?: string;
|
|
31
|
-
production?: string;
|
|
32
|
-
};
|
|
33
|
-
export const DefaultCargoPluginProfileMap = {
|
|
34
|
-
development: "dev",
|
|
35
|
-
production: "prod"
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const DEFAULT_ERROR_MESSAGE =
|
|
39
|
-
"An error occurred in the Storm Rust Nx plugin.";
|
|
40
|
-
|
|
41
|
-
export interface CargoPluginOptions {
|
|
42
|
-
includeApps?: boolean;
|
|
43
|
-
skipDocs?: boolean;
|
|
44
|
-
toolchain?: "stable" | "beta" | "nightly";
|
|
45
|
-
profiles?: CargoPluginProfileMap;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export const createNodesV2: CreateNodesV2<CargoPluginOptions | undefined> = [
|
|
49
|
-
"*/**/Cargo.toml",
|
|
50
|
-
async (configFiles, options, context): Promise<CreateNodesResultV2> => {
|
|
51
|
-
return await createNodesFromFiles(
|
|
52
|
-
(configFile, options, context) => {
|
|
53
|
-
try {
|
|
54
|
-
console.log(`Processing Cargo.toml file: ${configFile}`);
|
|
55
|
-
|
|
56
|
-
const profiles = options?.profiles ?? {};
|
|
57
|
-
const includeApps = options?.includeApps ?? true;
|
|
58
|
-
const toolchain = options?.toolchain;
|
|
59
|
-
const skipDocs = options?.skipDocs ?? false;
|
|
60
|
-
|
|
61
|
-
const metadata = cargoMetadata();
|
|
62
|
-
if (!metadata) {
|
|
63
|
-
return {};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const { packages: cargoPackages } = metadata;
|
|
67
|
-
|
|
68
|
-
const externalNodes: Record<string, ProjectGraphExternalNode> = {};
|
|
69
|
-
const projects: Record<string, ProjectConfiguration> = {};
|
|
70
|
-
|
|
71
|
-
const profs = {
|
|
72
|
-
...DefaultCargoPluginProfileMap,
|
|
73
|
-
...profiles
|
|
74
|
-
};
|
|
75
|
-
const configurations = Object.keys(profs).reduce((ret, key) => {
|
|
76
|
-
ret[key] = {
|
|
77
|
-
profile: profs[key]
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
return ret;
|
|
81
|
-
}, {});
|
|
82
|
-
|
|
83
|
-
const cargoPackageMap = cargoPackages.reduce((acc, p) => {
|
|
84
|
-
if (!acc.has(p.name)) {
|
|
85
|
-
acc.set(p.name, p);
|
|
86
|
-
}
|
|
87
|
-
return acc;
|
|
88
|
-
}, new Map<string, Package>());
|
|
89
|
-
|
|
90
|
-
for (const cargoPackage of cargoPackages) {
|
|
91
|
-
if (!isExternal(cargoPackage, context.workspaceRoot)) {
|
|
92
|
-
const root = dirname(configFile);
|
|
93
|
-
|
|
94
|
-
const project: ProjectConfiguration = {
|
|
95
|
-
root,
|
|
96
|
-
name: cargoPackage.name
|
|
97
|
-
};
|
|
98
|
-
if (existsSync(joinPathFragments(root, "project.json"))) {
|
|
99
|
-
const projectJson = readJsonFile<ProjectConfiguration>(
|
|
100
|
-
joinPathFragments(root, "project.json")
|
|
101
|
-
);
|
|
102
|
-
if (projectJson) {
|
|
103
|
-
Object.keys(projectJson).forEach(key => {
|
|
104
|
-
if (!project[key]) {
|
|
105
|
-
project[key] = projectJson[key];
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// If the project is an application and we don't want to include apps, skip it
|
|
112
|
-
if (
|
|
113
|
-
includeApps === false &&
|
|
114
|
-
project.projectType === "application"
|
|
115
|
-
) {
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
project.targets = {
|
|
120
|
-
"lint-markdown": {
|
|
121
|
-
cache: true,
|
|
122
|
-
outputs: ["{projectRoot}/**/*.md", "{projectRoot}/**/*.mdx"],
|
|
123
|
-
inputs: [
|
|
124
|
-
"linting",
|
|
125
|
-
"{projectRoot}/**/*.md",
|
|
126
|
-
"{projectRoot}/**/*.mdx"
|
|
127
|
-
],
|
|
128
|
-
dependsOn: ["^lint-markdown"],
|
|
129
|
-
executor: "nx:run-commands",
|
|
130
|
-
options: {
|
|
131
|
-
command:
|
|
132
|
-
'pnpm exec markdownlint-cli2 "{projectRoot}/*.{md,mdx}" "{projectRoot}/**/*.{md,mdx}" --config "node_modules/@storm-software/markdownlint/config/base.markdownlint-cli2.jsonc" --fix'
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"lint-ls": {
|
|
136
|
-
cache: true,
|
|
137
|
-
inputs: ["linting", "rust", "^production"],
|
|
138
|
-
dependsOn: ["^lint-ls"],
|
|
139
|
-
options: {
|
|
140
|
-
command:
|
|
141
|
-
'pnpm exec ls-lint --config="./node_modules/@storm-software/linting-tools/ls-lint/.ls-lint.yml" ',
|
|
142
|
-
color: true
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
lint: {
|
|
146
|
-
cache: true,
|
|
147
|
-
inputs: ["linting", "rust", "^production"],
|
|
148
|
-
dependsOn: ["lint-ls", "lint-markdown", "^lint"],
|
|
149
|
-
executor: "@storm-software/workspace-tools:cargo-clippy",
|
|
150
|
-
options: {
|
|
151
|
-
toolchain,
|
|
152
|
-
fix: false
|
|
153
|
-
},
|
|
154
|
-
defaultConfiguration: "development",
|
|
155
|
-
configurations
|
|
156
|
-
},
|
|
157
|
-
check: {
|
|
158
|
-
cache: true,
|
|
159
|
-
inputs: ["linting", "rust", "^production"],
|
|
160
|
-
dependsOn: ["lint", "^check"],
|
|
161
|
-
executor: "@storm-software/workspace-tools:cargo-check",
|
|
162
|
-
options: {
|
|
163
|
-
toolchain
|
|
164
|
-
},
|
|
165
|
-
defaultConfiguration: "development",
|
|
166
|
-
configurations
|
|
167
|
-
},
|
|
168
|
-
"format-readme": {
|
|
169
|
-
cache: true,
|
|
170
|
-
inputs: [
|
|
171
|
-
"linting",
|
|
172
|
-
"documentation",
|
|
173
|
-
"{projectRoot}/{README.md,package.json,Cargo.toml,executors.json,generators.json}"
|
|
174
|
-
],
|
|
175
|
-
outputs: ["{projectRoot}/README.md"],
|
|
176
|
-
dependsOn: ["^format-readme"],
|
|
177
|
-
executor: "nx:run-commands",
|
|
178
|
-
options: {
|
|
179
|
-
command:
|
|
180
|
-
'pnpm exec storm-git readme --templates="tools/readme-templates" --project="{projectName}"'
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
"format-toml": {
|
|
184
|
-
cache: true,
|
|
185
|
-
inputs: ["linting", "{projectRoot}/**/*.toml"],
|
|
186
|
-
outputs: ["{projectRoot}/**/*.toml"],
|
|
187
|
-
dependsOn: ["^format-toml"],
|
|
188
|
-
executor: "nx:run-commands",
|
|
189
|
-
options: {
|
|
190
|
-
command:
|
|
191
|
-
'pnpm exec taplo format --config="node_modules/@storm-software/linting-tools/taplo/config.toml" --cache-path="node_modules/.cache/taplo/{projectRoot}" --colors="always" "{projectRoot}/*.toml" "{projectRoot}/**/*.toml" '
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
"format-clippy": {
|
|
195
|
-
cache: true,
|
|
196
|
-
inputs: ["linting", "rust", "^production"],
|
|
197
|
-
dependsOn: ["^format-clippy"],
|
|
198
|
-
executor: "@storm-software/workspace-tools:cargo-clippy",
|
|
199
|
-
options: {
|
|
200
|
-
toolchain,
|
|
201
|
-
fix: true
|
|
202
|
-
},
|
|
203
|
-
defaultConfiguration: "development",
|
|
204
|
-
configurations
|
|
205
|
-
},
|
|
206
|
-
format: {
|
|
207
|
-
cache: true,
|
|
208
|
-
inputs: ["linting", "documentation", "rust", "^production"],
|
|
209
|
-
dependsOn: [
|
|
210
|
-
"format-readme",
|
|
211
|
-
"format-clippy",
|
|
212
|
-
"format-toml",
|
|
213
|
-
"^format"
|
|
214
|
-
],
|
|
215
|
-
executor: "@storm-software/workspace-tools:cargo-format",
|
|
216
|
-
options: {
|
|
217
|
-
toolchain,
|
|
218
|
-
fix: true
|
|
219
|
-
},
|
|
220
|
-
defaultConfiguration: "development",
|
|
221
|
-
configurations
|
|
222
|
-
},
|
|
223
|
-
clean: {
|
|
224
|
-
cache: true,
|
|
225
|
-
inputs: ["rust", "^production"],
|
|
226
|
-
outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
|
|
227
|
-
executor: "nx:run-commands",
|
|
228
|
-
options: {
|
|
229
|
-
command: `pnpm exec rimraf dist/target/crates/${cargoPackage.name}`,
|
|
230
|
-
color: true,
|
|
231
|
-
cwd: "{workspaceRoot}"
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
build: {
|
|
235
|
-
cache: true,
|
|
236
|
-
inputs: ["rust", "^production"],
|
|
237
|
-
dependsOn: ["build-base", "^build"],
|
|
238
|
-
executor: "@storm-software/workspace-tools:cargo-build",
|
|
239
|
-
outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
|
|
240
|
-
options: {
|
|
241
|
-
toolchain: toolchain
|
|
242
|
-
},
|
|
243
|
-
defaultConfiguration: "development",
|
|
244
|
-
configurations
|
|
245
|
-
},
|
|
246
|
-
rebuild: {
|
|
247
|
-
cache: false,
|
|
248
|
-
inputs: ["rust", "^production"],
|
|
249
|
-
dependsOn: ["clean", "^build"],
|
|
250
|
-
executor: "@storm-software/workspace-tools:cargo-build",
|
|
251
|
-
outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
|
|
252
|
-
options: {
|
|
253
|
-
toolchain: toolchain
|
|
254
|
-
},
|
|
255
|
-
defaultConfiguration: "development",
|
|
256
|
-
configurations
|
|
257
|
-
},
|
|
258
|
-
test: {
|
|
259
|
-
cache: true,
|
|
260
|
-
inputs: ["testing", "rust", "^production"],
|
|
261
|
-
dependsOn: ["build", "^test"],
|
|
262
|
-
executor: "@monodon/rust:test",
|
|
263
|
-
outputs: ["{options.target-dir}"],
|
|
264
|
-
options: {
|
|
265
|
-
"target-dir": `{workspaceRoot}/dist/target/{projectRoot}`
|
|
266
|
-
},
|
|
267
|
-
defaultConfiguration: "development",
|
|
268
|
-
configurations
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
if (skipDocs != true) {
|
|
273
|
-
project.targets.docs = {
|
|
274
|
-
cache: true,
|
|
275
|
-
inputs: [
|
|
276
|
-
"linting",
|
|
277
|
-
"documentation",
|
|
278
|
-
"default",
|
|
279
|
-
"^production"
|
|
280
|
-
],
|
|
281
|
-
dependsOn: ["format-readme", "lint-docs", "^docs"],
|
|
282
|
-
outputs: [`{workspaceRoot}/dist/docs/{projectRoot}`],
|
|
283
|
-
executor: "@storm-software/workspace-tools:cargo-doc",
|
|
284
|
-
options: {
|
|
285
|
-
toolchain: toolchain
|
|
286
|
-
},
|
|
287
|
-
defaultConfiguration: "production",
|
|
288
|
-
configurations
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
if (
|
|
293
|
-
cargoPackage.publish === null ||
|
|
294
|
-
cargoPackage.publish === undefined ||
|
|
295
|
-
cargoPackage.publish === true ||
|
|
296
|
-
(Array.isArray(cargoPackage.publish) &&
|
|
297
|
-
cargoPackage.publish.length > 0)
|
|
298
|
-
) {
|
|
299
|
-
addProjectTag(
|
|
300
|
-
project,
|
|
301
|
-
ProjectTagConstants.Registry.TAG_ID,
|
|
302
|
-
ProjectTagConstants.Registry.CARGO,
|
|
303
|
-
{ overwrite: true }
|
|
304
|
-
);
|
|
305
|
-
|
|
306
|
-
project.targets["nx-release-publish"] = {
|
|
307
|
-
cache: true,
|
|
308
|
-
inputs: [
|
|
309
|
-
"linting",
|
|
310
|
-
"testing",
|
|
311
|
-
"documentation",
|
|
312
|
-
"rust",
|
|
313
|
-
"^production"
|
|
314
|
-
],
|
|
315
|
-
dependsOn: ["build", "^nx-release-publish"],
|
|
316
|
-
executor: "@storm-software/workspace-tools:cargo-publish",
|
|
317
|
-
options: {
|
|
318
|
-
packageRoot: root
|
|
319
|
-
},
|
|
320
|
-
defaultConfiguration: "production",
|
|
321
|
-
configurations
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
addProjectTag(
|
|
326
|
-
project,
|
|
327
|
-
ProjectTagConstants.Language.TAG_ID,
|
|
328
|
-
ProjectTagConstants.Language.RUST,
|
|
329
|
-
{ overwrite: true }
|
|
330
|
-
);
|
|
331
|
-
setDefaultProjectTags(project, name);
|
|
332
|
-
|
|
333
|
-
projects[root] = {
|
|
334
|
-
...project,
|
|
335
|
-
release: {
|
|
336
|
-
...project.release,
|
|
337
|
-
version: {
|
|
338
|
-
...project.release?.version,
|
|
339
|
-
generator: "@storm-software/workspace-tools:release-version"
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
for (const dep of cargoPackage.dependencies) {
|
|
346
|
-
if (isExternal(dep, context.workspaceRoot)) {
|
|
347
|
-
const externalDepName = `cargo:${dep.name}`;
|
|
348
|
-
if (!externalNodes?.[externalDepName]) {
|
|
349
|
-
externalNodes[externalDepName] = {
|
|
350
|
-
type: "cargo" as any,
|
|
351
|
-
name: externalDepName as any,
|
|
352
|
-
data: {
|
|
353
|
-
packageName: dep.name,
|
|
354
|
-
version: cargoPackageMap.get(dep.name)?.version ?? "0.0.0"
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
return {
|
|
363
|
-
projects,
|
|
364
|
-
externalNodes
|
|
365
|
-
};
|
|
366
|
-
} catch (e) {
|
|
367
|
-
console.error(DEFAULT_ERROR_MESSAGE);
|
|
368
|
-
console.error(e);
|
|
369
|
-
|
|
370
|
-
throw new Error(DEFAULT_ERROR_MESSAGE, { cause: e });
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
configFiles,
|
|
374
|
-
options,
|
|
375
|
-
context
|
|
376
|
-
);
|
|
377
|
-
}
|
|
378
|
-
];
|
|
379
|
-
|
|
380
|
-
export const createDependencies: CreateDependencies = (_, context) => {
|
|
381
|
-
const metadata = cargoMetadata();
|
|
382
|
-
if (!metadata) {
|
|
383
|
-
return [];
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
const { packages: cargoPackages } = metadata;
|
|
387
|
-
const dependencies: RawProjectGraphDependency[] = [];
|
|
388
|
-
|
|
389
|
-
for (const pkg of cargoPackages) {
|
|
390
|
-
if (context.projects[pkg.name]) {
|
|
391
|
-
console.debug(`Local Cargo package found: ${pkg.name}`);
|
|
392
|
-
|
|
393
|
-
for (const deps of pkg.dependencies) {
|
|
394
|
-
if (!cargoPackages.find(p => p.name === deps.name)) {
|
|
395
|
-
console.debug(
|
|
396
|
-
`Dependency ${deps.name} not found in the cargo metadata.`
|
|
397
|
-
);
|
|
398
|
-
continue;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
// if the dependency is listed in nx projects, it's not an external dependency
|
|
402
|
-
if (context.projects[deps.name]) {
|
|
403
|
-
dependencies.push(
|
|
404
|
-
createDependency(pkg, deps.name, DependencyType.static)
|
|
405
|
-
);
|
|
406
|
-
} else {
|
|
407
|
-
const externalDepName = `cargo:${deps.name}`;
|
|
408
|
-
if (externalDepName in (context.externalNodes ?? {})) {
|
|
409
|
-
dependencies.push(
|
|
410
|
-
createDependency(pkg, externalDepName, DependencyType.static)
|
|
411
|
-
);
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
return dependencies;
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
function createDependency(
|
|
422
|
-
pkg: Package,
|
|
423
|
-
depName: string,
|
|
424
|
-
type: DependencyType
|
|
425
|
-
): RawProjectGraphDependency {
|
|
426
|
-
const target = pkg.manifest_path.replace(/\\/g, "/");
|
|
427
|
-
|
|
428
|
-
return {
|
|
429
|
-
type,
|
|
430
|
-
source: pkg.name,
|
|
431
|
-
target: depName,
|
|
432
|
-
sourceFile: target.replace(`${workspaceRoot.replace(/\\/g, "/")}/`, "")
|
|
433
|
-
};
|
|
434
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./cargo-toml";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./project-config";
|