@storm-software/workspace-tools 1.270.2 → 1.271.1
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 +40 -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 +6 -6
- package/dist/executors.mjs +6 -6
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.mjs +8 -8
- 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-CMH2A42G.js +0 -467
- package/dist/chunk-HMJTTE4A.mjs +0 -96
- package/dist/chunk-I54IKCIV.mjs +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,315 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
addDependenciesToPackageJson,
|
|
3
|
-
addProjectConfiguration,
|
|
4
|
-
formatFiles,
|
|
5
|
-
generateFiles,
|
|
6
|
-
joinPathFragments,
|
|
7
|
-
updateJson,
|
|
8
|
-
type Tree,
|
|
9
|
-
} from "@nx/devkit";
|
|
10
|
-
import * as path from "node:path";
|
|
11
|
-
import { withRunGenerator } from "../../base/base-generator";
|
|
12
|
-
import { nodeVersion, pnpmVersion } from "../../utils/versions";
|
|
13
|
-
import type { PresetGeneratorSchema } from "./schema.d";
|
|
14
|
-
|
|
15
|
-
export async function presetGeneratorFn(
|
|
16
|
-
tree: Tree,
|
|
17
|
-
options: PresetGeneratorSchema,
|
|
18
|
-
) {
|
|
19
|
-
const projectRoot = ".";
|
|
20
|
-
|
|
21
|
-
options.description ??= `⚡The ${
|
|
22
|
-
options.namespace ? options.namespace : options.name
|
|
23
|
-
} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`;
|
|
24
|
-
options.namespace ??= options.organization;
|
|
25
|
-
|
|
26
|
-
addProjectConfiguration(tree, `@${options.namespace}/${options.name}`, {
|
|
27
|
-
root: projectRoot,
|
|
28
|
-
projectType: "application",
|
|
29
|
-
targets: {
|
|
30
|
-
"local-registry": {
|
|
31
|
-
executor: "@nx/js:verdaccio",
|
|
32
|
-
options: {
|
|
33
|
-
port: 4873,
|
|
34
|
-
config: ".verdaccio/config.yml",
|
|
35
|
-
storage: "tmp/local-registry/storage",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
updateJson(tree, "package.json", (json) => {
|
|
42
|
-
json.scripts = json.scripts || {};
|
|
43
|
-
|
|
44
|
-
json.version = "0.0.0";
|
|
45
|
-
json.triggerEmptyDevReleaseByIncrementingThisNumber = 0;
|
|
46
|
-
json.private = true;
|
|
47
|
-
json.keywords ??= [
|
|
48
|
-
options.name,
|
|
49
|
-
options.namespace,
|
|
50
|
-
"storm",
|
|
51
|
-
"storm-stack",
|
|
52
|
-
"storm-ops",
|
|
53
|
-
"rust",
|
|
54
|
-
"nx",
|
|
55
|
-
"graphql",
|
|
56
|
-
"sullivanpj",
|
|
57
|
-
"monorepo",
|
|
58
|
-
];
|
|
59
|
-
|
|
60
|
-
json.homepage ??= "https://stormsoftware.com";
|
|
61
|
-
json.bugs ??= {
|
|
62
|
-
url: `https://github.com/${options.organization}/${options.name}/issues`,
|
|
63
|
-
email: "support@stormsoftware.com",
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
json.license = "Apache-2.0";
|
|
67
|
-
json.author ??= {
|
|
68
|
-
name: "Storm Software",
|
|
69
|
-
email: "contact@stormsoftware.com",
|
|
70
|
-
url: "https://stormsoftware.com",
|
|
71
|
-
};
|
|
72
|
-
json.maintainers ??= [
|
|
73
|
-
{
|
|
74
|
-
name: "Storm Software",
|
|
75
|
-
email: "contact@stormsoftware.com",
|
|
76
|
-
url: "https://stormsoftware.com",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
name: "Pat Sullivan",
|
|
80
|
-
email: "admin@stormsoftware.com",
|
|
81
|
-
url: "https://patsullivan.org",
|
|
82
|
-
},
|
|
83
|
-
];
|
|
84
|
-
json.funding ??= {
|
|
85
|
-
type: "github",
|
|
86
|
-
url: "https://github.com/sponsors/storm-software",
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
json.namespace ??= `@${options.namespace}`;
|
|
90
|
-
json.description ??= options.description;
|
|
91
|
-
options.repositoryUrl ??= `https://github.com/${options.organization}/${options.name}`;
|
|
92
|
-
json.repository ??= {
|
|
93
|
-
type: "github",
|
|
94
|
-
url: `${options.repositoryUrl}.git`,
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
json.packageManager ??= "pnpm@10.3.0";
|
|
98
|
-
json.engines ??= {
|
|
99
|
-
node: ">=20.11.0",
|
|
100
|
-
pnpm: ">=10.3.0",
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
json.prettier = "@storm-software/prettier/config.json";
|
|
104
|
-
|
|
105
|
-
json.nx ??= {
|
|
106
|
-
includedScripts: [
|
|
107
|
-
"lint-sherif",
|
|
108
|
-
"lint-knip",
|
|
109
|
-
"lint-ls",
|
|
110
|
-
"lint",
|
|
111
|
-
"format",
|
|
112
|
-
"format-sherif",
|
|
113
|
-
"format-readme",
|
|
114
|
-
"format-prettier",
|
|
115
|
-
"format-toml",
|
|
116
|
-
"commit",
|
|
117
|
-
"release",
|
|
118
|
-
],
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
// generate a start script into the package.json
|
|
122
|
-
|
|
123
|
-
json.scripts.adr = "pnpm log4brains adr new";
|
|
124
|
-
json.scripts["adr-preview"] = "pnpm log4brains preview";
|
|
125
|
-
json.scripts.prepare = "pnpm add lefthook -w && pnpm lefthook install";
|
|
126
|
-
json.scripts.preinstall = "npx -y only-allow pnpm";
|
|
127
|
-
json.scripts["install-csb"] =
|
|
128
|
-
"corepack enable && pnpm install --no-frozen-lockfile";
|
|
129
|
-
|
|
130
|
-
json.scripts.clean =
|
|
131
|
-
"rimraf dist && rimraf --glob packages/**/dist && rimraf --glob tools/**/dist && rimraf --glob docs/**/dist && rimraf --glob apps/**/dist && rimraf --glob libs/**/dist";
|
|
132
|
-
json.scripts.nuke =
|
|
133
|
-
"nx clear-cache && rimraf .nx/cache && rimraf .nx/workspace-data && pnpm clean && rimraf pnpm-lock.yaml && rimraf --glob packages/**/node_modules && rimraf --glob tools/**/node_modules && rimraf node_modules";
|
|
134
|
-
json.scripts.prebuild = "pnpm clean";
|
|
135
|
-
|
|
136
|
-
json.scripts.build = "nx affected -t build --parallel=5";
|
|
137
|
-
json.scripts["build-all"] = "nx run-many -t build --all --parallel=5";
|
|
138
|
-
json.scripts["build-prod"] =
|
|
139
|
-
"nx run-many -t build --all --prod --parallel=5";
|
|
140
|
-
json.scripts["build-tools"] =
|
|
141
|
-
"nx run-many -t build --projects=tools/* --parallel=5";
|
|
142
|
-
json.scripts["build-docs"] =
|
|
143
|
-
"nx run-many -t build --projects=docs/* --parallel=5";
|
|
144
|
-
|
|
145
|
-
if (!options.includeApps) {
|
|
146
|
-
json.scripts["build-packages"] =
|
|
147
|
-
"nx run-many -t build --projects=packages/* --parallel=5";
|
|
148
|
-
} else {
|
|
149
|
-
json.scripts["build-apps"] =
|
|
150
|
-
"nx run-many -t build --projects=apps/* --parallel=5";
|
|
151
|
-
json.scripts["build-libs"] =
|
|
152
|
-
"nx run-many -t build --projects=libs/* --parallel=5";
|
|
153
|
-
json.scripts["build-storybook"] = "storybook build -s public";
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
json.scripts.nx = "nx";
|
|
157
|
-
json.scripts.graph = "nx graph";
|
|
158
|
-
json.scripts.lint = "pnpm storm-lint all --skip-cspell --skip-alex";
|
|
159
|
-
|
|
160
|
-
if (options.includeApps) {
|
|
161
|
-
json.scripts.start = "nx serve";
|
|
162
|
-
json.scripts.storybook = "pnpm storybook dev -p 6006";
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
json.scripts.help = "nx help";
|
|
166
|
-
json.scripts["dep-graph"] = "nx dep-graph";
|
|
167
|
-
json.scripts["local-registry"] =
|
|
168
|
-
`nx local-registry @${options.namespace}/${options.name}`;
|
|
169
|
-
|
|
170
|
-
json.scripts.e2e = "nx e2e";
|
|
171
|
-
|
|
172
|
-
if (options.includeApps) {
|
|
173
|
-
json.scripts.test = "nx test && pnpm test-storybook";
|
|
174
|
-
json.scripts["test-storybook"] = "pnpm test-storybook";
|
|
175
|
-
} else {
|
|
176
|
-
json.scripts.test = "nx test";
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
json.scripts.lint = "pnpm storm-lint all --skip-cspell --skip-alex";
|
|
180
|
-
json.scripts.commit = "pnpm storm-git commit";
|
|
181
|
-
json.scripts["api-extractor"] =
|
|
182
|
-
'pnpm storm-docs api-extractor --outputPath="docs/api-reference" --clean';
|
|
183
|
-
json.scripts.release = "pnpm storm-git release";
|
|
184
|
-
|
|
185
|
-
json.scripts.format = "nx format:write";
|
|
186
|
-
json.scripts["format-sherif"] =
|
|
187
|
-
"pnpm exec sherif -f -i typescript -i react -i react-dom";
|
|
188
|
-
json.scripts["format-toml"] =
|
|
189
|
-
'pnpm exec taplo format --config="./node_modules/@storm-software/linting-tools/taplo/config.toml" --cache-path="./node_modules/.cache/storm/taplo"';
|
|
190
|
-
json.scripts["format-readme"] =
|
|
191
|
-
'pnpm storm-git readme --templates="tools/readme-templates"';
|
|
192
|
-
json.scripts["format-prettier"] =
|
|
193
|
-
"pnpm exec prettier --write --ignore-unknown --no-error-on-unmatched-pattern --cache && git update-index";
|
|
194
|
-
|
|
195
|
-
json.scripts.lint = "pnpm storm-lint all --skip-cspell";
|
|
196
|
-
json.scripts["lint-knip"] = "pnpm exec knip";
|
|
197
|
-
json.scripts["lint-sherif"] =
|
|
198
|
-
"pnpm exec sherif -i typescript -i react -i react-dom";
|
|
199
|
-
json.scripts["lint-ls"] =
|
|
200
|
-
'pnpm exec ls-lint --config="./node_modules/@storm-software/linting-tools/ls-lint/ls-lint.yml"';
|
|
201
|
-
|
|
202
|
-
json.packageManager ??= `pnpm@${pnpmVersion}`;
|
|
203
|
-
json.engines = {
|
|
204
|
-
node: `>=${nodeVersion}`,
|
|
205
|
-
pnpm: `>=${pnpmVersion}`,
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
// if (options.includeApps) {
|
|
209
|
-
// json.bundlewatch = {
|
|
210
|
-
// files: [
|
|
211
|
-
// {
|
|
212
|
-
// path: "dist/*/*.js",
|
|
213
|
-
// maxSize: "200kB"
|
|
214
|
-
// }
|
|
215
|
-
// ],
|
|
216
|
-
// ci: {
|
|
217
|
-
// trackBranches: ["main", "alpha", "beta"]
|
|
218
|
-
// }
|
|
219
|
-
// };
|
|
220
|
-
|
|
221
|
-
// json.nextBundleAnalysis = {
|
|
222
|
-
// buildOutputDirectory: "dist/apps/web/app/.next"
|
|
223
|
-
// };
|
|
224
|
-
// }
|
|
225
|
-
|
|
226
|
-
return json;
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
generateFiles(tree, path.join(__dirname, "files"), projectRoot, {
|
|
230
|
-
...options,
|
|
231
|
-
pnpmVersion,
|
|
232
|
-
nodeVersion,
|
|
233
|
-
});
|
|
234
|
-
await formatFiles(tree);
|
|
235
|
-
|
|
236
|
-
let dependencies: Record<string, string> = {
|
|
237
|
-
"@ls-lint/ls-lint": "2.2.3",
|
|
238
|
-
"@ltd/j-toml": "1.38.0",
|
|
239
|
-
"@nx/devkit": "^20.2.2",
|
|
240
|
-
"@nx/eslint-plugin": "^20.2.2",
|
|
241
|
-
"@nx/js": "^20.2.2",
|
|
242
|
-
"@nx/workspace": "^20.2.2",
|
|
243
|
-
"@storm-software/config": "latest",
|
|
244
|
-
"@storm-software/git-tools": "latest",
|
|
245
|
-
"@storm-software/linting-tools": "latest",
|
|
246
|
-
"@storm-software/testing-tools": "latest",
|
|
247
|
-
"@storm-software/workspace-tools": "latest",
|
|
248
|
-
"@storm-software/eslint": "latest",
|
|
249
|
-
"@storm-software/cspell": "latest",
|
|
250
|
-
"@storm-software/prettier": "latest",
|
|
251
|
-
"@taplo/cli": "0.7.0",
|
|
252
|
-
"@types/node": "^20.14.10",
|
|
253
|
-
copyfiles: "2.4.1",
|
|
254
|
-
eslint: "9.5.0",
|
|
255
|
-
jest: "29.7.0",
|
|
256
|
-
"jest-environment-node": "29.7.0",
|
|
257
|
-
knip: "5.25.2",
|
|
258
|
-
lefthook: "1.6.18",
|
|
259
|
-
nx: "^20.2.2",
|
|
260
|
-
prettier: "3.3.2",
|
|
261
|
-
"prettier-plugin-prisma": "5.0.0",
|
|
262
|
-
rimraf: "5.0.7",
|
|
263
|
-
sherif: "0.10.0",
|
|
264
|
-
"ts-jest": "29.1.5",
|
|
265
|
-
"ts-node": "10.9.2",
|
|
266
|
-
tslib: "2.6.3",
|
|
267
|
-
typescript: "5.5.3",
|
|
268
|
-
verdaccio: "5.31.1",
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
if (options.includeApps) {
|
|
272
|
-
dependencies = {
|
|
273
|
-
...dependencies,
|
|
274
|
-
react: "latest",
|
|
275
|
-
"react-dom": "latest",
|
|
276
|
-
storybook: "latest",
|
|
277
|
-
"@storybook/addons": "latest",
|
|
278
|
-
"@nx/react": "latest",
|
|
279
|
-
"@nx/next": "latest",
|
|
280
|
-
"@nx/node": "latest",
|
|
281
|
-
"@nx/storybook": "latest",
|
|
282
|
-
"jest-environment-jsdom": "29.7.0",
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
if (options.includeRust) {
|
|
287
|
-
dependencies = {
|
|
288
|
-
...dependencies,
|
|
289
|
-
"@monodon/rust": "1.4.0",
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
if (options.nxCloud) {
|
|
294
|
-
dependencies = {
|
|
295
|
-
...dependencies,
|
|
296
|
-
"nx-cloud": "latest",
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
await Promise.resolve(
|
|
301
|
-
addDependenciesToPackageJson(
|
|
302
|
-
tree,
|
|
303
|
-
dependencies,
|
|
304
|
-
{},
|
|
305
|
-
joinPathFragments(projectRoot, "package.json"),
|
|
306
|
-
),
|
|
307
|
-
);
|
|
308
|
-
|
|
309
|
-
return null;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
export default withRunGenerator<PresetGeneratorSchema>(
|
|
313
|
-
"Storm Workspace Preset Generator",
|
|
314
|
-
presetGeneratorFn,
|
|
315
|
-
);
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { defineUntypedSchema } from "untyped";
|
|
2
|
-
import baseGeneratorSchema from "../../base/base-generator.untyped";
|
|
3
|
-
|
|
4
|
-
export default defineUntypedSchema({
|
|
5
|
-
...baseGeneratorSchema,
|
|
6
|
-
$schema: {
|
|
7
|
-
id: "PresetGeneratorSchema",
|
|
8
|
-
title: "Preset Generator",
|
|
9
|
-
description: "A type definition for a preset generator schema",
|
|
10
|
-
required: ["directory", "name"],
|
|
11
|
-
},
|
|
12
|
-
name: {
|
|
13
|
-
$schema: {
|
|
14
|
-
title: "Name",
|
|
15
|
-
type: "string",
|
|
16
|
-
description: "The name of the workspace",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
organization: {
|
|
20
|
-
$schema: {
|
|
21
|
-
title: "Organization",
|
|
22
|
-
type: "string",
|
|
23
|
-
description: "The organization of the workspace",
|
|
24
|
-
},
|
|
25
|
-
$default: "storm-software",
|
|
26
|
-
},
|
|
27
|
-
includeApps: {
|
|
28
|
-
$schema: {
|
|
29
|
-
title: "Include Apps",
|
|
30
|
-
type: "boolean",
|
|
31
|
-
description: "Include apps in the workspace",
|
|
32
|
-
},
|
|
33
|
-
$default: true,
|
|
34
|
-
},
|
|
35
|
-
includeRust: {
|
|
36
|
-
$schema: {
|
|
37
|
-
title: "Include Rust",
|
|
38
|
-
type: "boolean",
|
|
39
|
-
description: "Include Rust support in the workspace",
|
|
40
|
-
},
|
|
41
|
-
$default: false,
|
|
42
|
-
},
|
|
43
|
-
namespace: {
|
|
44
|
-
$schema: {
|
|
45
|
-
title: "Namespace",
|
|
46
|
-
type: "string",
|
|
47
|
-
description: "The namespace of the workspace",
|
|
48
|
-
},
|
|
49
|
-
$default: "storm-software",
|
|
50
|
-
},
|
|
51
|
-
description: {
|
|
52
|
-
$schema: {
|
|
53
|
-
title: "Description",
|
|
54
|
-
type: "string",
|
|
55
|
-
description: "The description of the workspace",
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
repositoryUrl: {
|
|
59
|
-
$schema: {
|
|
60
|
-
title: "Repository URL",
|
|
61
|
-
type: "string",
|
|
62
|
-
description: "The URL of the repository",
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
nxCloud: {
|
|
66
|
-
$schema: {
|
|
67
|
-
title: "Nx Cloud",
|
|
68
|
-
type: "string",
|
|
69
|
-
description: "Nx Cloud configuration",
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
mode: {
|
|
73
|
-
$schema: {
|
|
74
|
-
title: "Mode",
|
|
75
|
-
type: "string",
|
|
76
|
-
description: "The mode of the Nx client",
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
packageManager: {
|
|
80
|
-
$schema: {
|
|
81
|
-
title: "Package Manager",
|
|
82
|
-
type: "string",
|
|
83
|
-
description: "The package manager to use",
|
|
84
|
-
enum: ["npm", "pnpm", "yarn", "bun"],
|
|
85
|
-
},
|
|
86
|
-
$default: "pnpm",
|
|
87
|
-
},
|
|
88
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// import { createTreeWithEmptyWorkspace } from "@nx/devkit/testing";
|
|
2
|
-
// import { type Tree, readProjectConfiguration } from "@nx/devkit";
|
|
3
|
-
|
|
4
|
-
// import { releaseVersionGenerator } from "./generator";
|
|
5
|
-
// import type { ReleaseVersionGeneratorSchema } from "./schema.d";
|
|
6
|
-
|
|
7
|
-
// describe("release-version generator", () => {
|
|
8
|
-
// let tree: Tree;
|
|
9
|
-
// const options: ReleaseVersionGeneratorSchema = { name: "test" };
|
|
10
|
-
|
|
11
|
-
// beforeEach(() => {
|
|
12
|
-
// tree = createTreeWithEmptyWorkspace();
|
|
13
|
-
// });
|
|
14
|
-
|
|
15
|
-
// it("should run successfully", async () => {
|
|
16
|
-
// await releaseVersionGenerator(tree, options);
|
|
17
|
-
// const config = readProjectConfiguration(tree, "test");
|
|
18
|
-
// expect(config).toBeDefined();
|
|
19
|
-
// });
|
|
20
|
-
// });
|