@storm-software/workspace-tools 1.270.2 → 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 +23 -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-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,56 +0,0 @@
|
|
|
1
|
-
import { defineUntypedSchema } from "untyped";
|
|
2
|
-
|
|
3
|
-
export default defineUntypedSchema({
|
|
4
|
-
$schema: {
|
|
5
|
-
id: "NpmPublishExecutorSchema",
|
|
6
|
-
title: "Npm Publish Executor",
|
|
7
|
-
description: "A type definition for a Npm Publish executor schema"
|
|
8
|
-
},
|
|
9
|
-
packageRoot: {
|
|
10
|
-
$schema: {
|
|
11
|
-
title: "Package Root",
|
|
12
|
-
type: "string",
|
|
13
|
-
format: "path",
|
|
14
|
-
description: "The path to the package root"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
registry: {
|
|
18
|
-
$schema: {
|
|
19
|
-
title: "Registry",
|
|
20
|
-
type: "string",
|
|
21
|
-
description: "The registry to publish to"
|
|
22
|
-
},
|
|
23
|
-
$default: "https://registry.npmjs.org/"
|
|
24
|
-
},
|
|
25
|
-
tag: {
|
|
26
|
-
$schema: {
|
|
27
|
-
title: "Tag",
|
|
28
|
-
type: "string",
|
|
29
|
-
description: "The tag to publish with"
|
|
30
|
-
},
|
|
31
|
-
$default: "latest"
|
|
32
|
-
},
|
|
33
|
-
otp: {
|
|
34
|
-
$schema: {
|
|
35
|
-
title: "One Time Password",
|
|
36
|
-
type: "number",
|
|
37
|
-
description: "The one time password"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
dryRun: {
|
|
41
|
-
$schema: {
|
|
42
|
-
title: "Dry Run",
|
|
43
|
-
type: "boolean",
|
|
44
|
-
description: "Perform a dry run"
|
|
45
|
-
},
|
|
46
|
-
$default: false
|
|
47
|
-
},
|
|
48
|
-
firstRelease: {
|
|
49
|
-
$schema: {
|
|
50
|
-
title: "First Release",
|
|
51
|
-
type: "boolean",
|
|
52
|
-
description: "Publish the first release"
|
|
53
|
-
},
|
|
54
|
-
$default: false
|
|
55
|
-
}
|
|
56
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from "@nx/devkit";
|
|
2
|
-
|
|
3
|
-
import executor from "./executor";
|
|
4
|
-
import { SizeLimitExecutorSchema } from "./schema.d";
|
|
5
|
-
|
|
6
|
-
const options: SizeLimitExecutorSchema = {};
|
|
7
|
-
const context: ExecutorContext = {
|
|
8
|
-
root: "",
|
|
9
|
-
cwd: process.cwd(),
|
|
10
|
-
isVerbose: false,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
describe("SizeLimit Executor", () => {
|
|
14
|
-
it("can run", async () => {
|
|
15
|
-
const output = await executor(options, context);
|
|
16
|
-
expect(output.success).toBe(true);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
-
import { joinPathFragments } from "@nx/devkit";
|
|
3
|
-
import esBuildPlugin from "@size-limit/esbuild";
|
|
4
|
-
import esBuildWhyPlugin from "@size-limit/esbuild-why";
|
|
5
|
-
import filePlugin from "@size-limit/file";
|
|
6
|
-
import type { StormWorkspaceConfig } from "@storm-software/config";
|
|
7
|
-
import { writeInfo } from "@storm-software/config-tools";
|
|
8
|
-
import sizeLimit from "size-limit";
|
|
9
|
-
import { withRunExecutor } from "../../base/base-executor";
|
|
10
|
-
import type { SizeLimitExecutorSchema } from "./schema.d";
|
|
11
|
-
|
|
12
|
-
// export default [
|
|
13
|
-
// {
|
|
14
|
-
// async finally(config, check) {
|
|
15
|
-
// let { esbuildVisualizerFile } = check;
|
|
16
|
-
|
|
17
|
-
// if (esbuildVisualizerFile) {
|
|
18
|
-
// await open(esbuildVisualizerFile);
|
|
19
|
-
// }
|
|
20
|
-
// },
|
|
21
|
-
|
|
22
|
-
// name: "@size-limit/esbuild-why",
|
|
23
|
-
// async step81(config, check) {
|
|
24
|
-
// if (config.why && check.esbuildMetafile) {
|
|
25
|
-
// let result = await visualizer(check.esbuildMetafile);
|
|
26
|
-
// let file = join(config.saveBundle ?? "", getReportName(config, check));
|
|
27
|
-
// check.esbuildVisualizerFile = file;
|
|
28
|
-
// writeFileSync(file, result);
|
|
29
|
-
// }
|
|
30
|
-
// }
|
|
31
|
-
// }
|
|
32
|
-
// ];
|
|
33
|
-
|
|
34
|
-
export async function sizeLimitExecutorFn(
|
|
35
|
-
options: SizeLimitExecutorSchema,
|
|
36
|
-
context: ExecutorContext,
|
|
37
|
-
config?: StormWorkspaceConfig
|
|
38
|
-
) {
|
|
39
|
-
if (
|
|
40
|
-
!context?.projectName ||
|
|
41
|
-
!context.projectsConfigurations?.projects ||
|
|
42
|
-
!context.projectsConfigurations.projects[context.projectName]
|
|
43
|
-
) {
|
|
44
|
-
throw new Error(
|
|
45
|
-
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
writeInfo(`📏 Running Size-Limit on ${context.projectName}`, config);
|
|
50
|
-
|
|
51
|
-
sizeLimit([filePlugin, esBuildPlugin, esBuildWhyPlugin], {
|
|
52
|
-
checks:
|
|
53
|
-
options.entry ??
|
|
54
|
-
context.projectsConfigurations.projects[context.projectName]
|
|
55
|
-
?.sourceRoot ??
|
|
56
|
-
joinPathFragments(
|
|
57
|
-
context.projectsConfigurations.projects[context.projectName]?.root ??
|
|
58
|
-
"./",
|
|
59
|
-
"src"
|
|
60
|
-
)
|
|
61
|
-
}).then(result => {
|
|
62
|
-
writeInfo(
|
|
63
|
-
`📏 ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
64
|
-
config
|
|
65
|
-
);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
return {
|
|
69
|
-
success: true
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export default withRunExecutor<SizeLimitExecutorSchema>(
|
|
74
|
-
"Size-Limit Performance Test Executor",
|
|
75
|
-
sizeLimitExecutorFn,
|
|
76
|
-
{
|
|
77
|
-
skipReadingConfig: false,
|
|
78
|
-
hooks: {
|
|
79
|
-
applyDefaultOptions: (
|
|
80
|
-
options: SizeLimitExecutorSchema
|
|
81
|
-
): SizeLimitExecutorSchema => {
|
|
82
|
-
// options.entry ??= "{sourceRoot}/index.ts";
|
|
83
|
-
|
|
84
|
-
return options;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { defineUntypedSchema } from "untyped";
|
|
2
|
-
import baseExecutorSchema from "../../base/base-executor.untyped";
|
|
3
|
-
|
|
4
|
-
export default defineUntypedSchema({
|
|
5
|
-
...baseExecutorSchema,
|
|
6
|
-
$schema: {
|
|
7
|
-
id: "SizeLimitExecutorSchema",
|
|
8
|
-
title: "Size Limit Executor",
|
|
9
|
-
description: "A type definition for a Size Limit executor schema",
|
|
10
|
-
},
|
|
11
|
-
entry: {
|
|
12
|
-
$schema: {
|
|
13
|
-
title: "Entry",
|
|
14
|
-
type: "array",
|
|
15
|
-
description: "The path to the entry file",
|
|
16
|
-
items: {
|
|
17
|
-
type: "string",
|
|
18
|
-
format: "path",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
-
import type { StormWorkspaceConfig } from "@storm-software/config";
|
|
3
|
-
import { writeInfo } from "@storm-software/config-tools/logger/console";
|
|
4
|
-
import { removeSync } from "fs-extra";
|
|
5
|
-
import { TypiaProgrammer } from "typia/lib/programmers/TypiaProgrammer.js";
|
|
6
|
-
import { withRunExecutor } from "../../base/base-executor";
|
|
7
|
-
import type { TypiaExecutorSchema } from "./schema.d";
|
|
8
|
-
|
|
9
|
-
export async function typiaExecutorFn(
|
|
10
|
-
options: TypiaExecutorSchema,
|
|
11
|
-
_: ExecutorContext,
|
|
12
|
-
config: StormWorkspaceConfig
|
|
13
|
-
) {
|
|
14
|
-
if (options.clean !== false) {
|
|
15
|
-
writeInfo(`🧹 Cleaning output path: ${options.outputPath}`, config);
|
|
16
|
-
removeSync(options.outputPath);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
await Promise.all(
|
|
20
|
-
options.entry!.map(entry => {
|
|
21
|
-
writeInfo(`🚀 Running Typia on entry: ${entry}`, config);
|
|
22
|
-
|
|
23
|
-
return TypiaProgrammer.build({
|
|
24
|
-
input: entry,
|
|
25
|
-
output: options.outputPath!,
|
|
26
|
-
project: options.tsconfig!
|
|
27
|
-
});
|
|
28
|
-
})
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
return {
|
|
32
|
-
success: true
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export default withRunExecutor<TypiaExecutorSchema>(
|
|
37
|
-
"Typia runtime validation generator",
|
|
38
|
-
typiaExecutorFn,
|
|
39
|
-
{
|
|
40
|
-
skipReadingConfig: false,
|
|
41
|
-
hooks: {
|
|
42
|
-
applyDefaultOptions: (
|
|
43
|
-
options: TypiaExecutorSchema
|
|
44
|
-
): TypiaExecutorSchema => {
|
|
45
|
-
options.entry ??= ["{sourceRoot}/index.ts"];
|
|
46
|
-
options.outputPath ??= "{sourceRoot}/__generated__/typia";
|
|
47
|
-
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
48
|
-
options.clean ??= true;
|
|
49
|
-
|
|
50
|
-
return options;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
);
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { defineUntypedSchema } from "untyped";
|
|
2
|
-
import baseExecutorSchema from "../../base/base-executor.untyped";
|
|
3
|
-
|
|
4
|
-
export default defineUntypedSchema({
|
|
5
|
-
...baseExecutorSchema,
|
|
6
|
-
$schema: {
|
|
7
|
-
id: "TypiaExecutorSchema",
|
|
8
|
-
title: "Typia Executor",
|
|
9
|
-
description: "A type definition for a Typia executor schema",
|
|
10
|
-
required: ["entry", "tsconfig", "outputPath"],
|
|
11
|
-
},
|
|
12
|
-
entry: {
|
|
13
|
-
$schema: {
|
|
14
|
-
title: "Entry File(s)",
|
|
15
|
-
format: "path",
|
|
16
|
-
type: "array",
|
|
17
|
-
description: "The entry file or files to build",
|
|
18
|
-
items: { type: "string" },
|
|
19
|
-
},
|
|
20
|
-
$default: ["{sourceRoot}/index.ts"],
|
|
21
|
-
},
|
|
22
|
-
tsconfig: {
|
|
23
|
-
$schema: {
|
|
24
|
-
title: "TSConfig Path",
|
|
25
|
-
type: "string",
|
|
26
|
-
format: "path",
|
|
27
|
-
description: "The path to the tsconfig file",
|
|
28
|
-
},
|
|
29
|
-
$default: "{projectRoot}/tsconfig.json",
|
|
30
|
-
},
|
|
31
|
-
outputPath: {
|
|
32
|
-
$schema: {
|
|
33
|
-
title: "Output Path",
|
|
34
|
-
type: "string",
|
|
35
|
-
format: "path",
|
|
36
|
-
description: "The output path for the build",
|
|
37
|
-
},
|
|
38
|
-
$default: "{sourceRoot}/__generated__/typia",
|
|
39
|
-
},
|
|
40
|
-
clean: {
|
|
41
|
-
$schema: {
|
|
42
|
-
title: "Clean",
|
|
43
|
-
type: "boolean",
|
|
44
|
-
description: "Clean the output directory before building",
|
|
45
|
-
},
|
|
46
|
-
$default: true,
|
|
47
|
-
},
|
|
48
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import executor from "./executor";
|
|
2
|
-
import { UnbuildExecutorSchema } from "./schema.d";
|
|
3
|
-
|
|
4
|
-
const options: UnbuildExecutorSchema = {};
|
|
5
|
-
|
|
6
|
-
describe("Unbuild Executor", () => {
|
|
7
|
-
it("can run", async () => {
|
|
8
|
-
const output = await executor(options);
|
|
9
|
-
expect(output.success).toBe(true);
|
|
10
|
-
});
|
|
11
|
-
});
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
-
import type { StormWorkspaceConfig } from "@storm-software/config";
|
|
3
|
-
import { writeInfo } from "@storm-software/config-tools/logger/console";
|
|
4
|
-
import { joinPaths } from "@storm-software/config-tools/utilities/correct-paths";
|
|
5
|
-
import { UnbuildOptions } from "@storm-software/unbuild";
|
|
6
|
-
import { defu } from "defu";
|
|
7
|
-
import { createJiti } from "jiti";
|
|
8
|
-
import { withRunExecutor } from "../../base/base-executor";
|
|
9
|
-
import type { UnbuildExecutorSchema } from "./schema.d";
|
|
10
|
-
|
|
11
|
-
type StormUnbuildModule = {
|
|
12
|
-
build: (opts: UnbuildOptions) => Promise<void>;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export async function unbuildExecutorFn(
|
|
16
|
-
options: UnbuildExecutorSchema,
|
|
17
|
-
context: ExecutorContext,
|
|
18
|
-
config: StormWorkspaceConfig
|
|
19
|
-
) {
|
|
20
|
-
writeInfo("📦 Running Storm Unbuild executor on the workspace", config);
|
|
21
|
-
|
|
22
|
-
// #region Prepare build context variables
|
|
23
|
-
|
|
24
|
-
if (
|
|
25
|
-
!context.projectsConfigurations?.projects ||
|
|
26
|
-
!context.projectName ||
|
|
27
|
-
!context.projectsConfigurations.projects[context.projectName]
|
|
28
|
-
) {
|
|
29
|
-
throw new Error(
|
|
30
|
-
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (!context.projectsConfigurations.projects[context.projectName]!.root) {
|
|
35
|
-
throw new Error(
|
|
36
|
-
"The Build process failed because the project root is not valid. Please run this command from a workspace root directory."
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (
|
|
41
|
-
!context.projectsConfigurations.projects[context.projectName]!.sourceRoot
|
|
42
|
-
) {
|
|
43
|
-
throw new Error(
|
|
44
|
-
"The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory."
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const jiti = createJiti(config.workspaceRoot, {
|
|
49
|
-
fsCache: config.skipCache
|
|
50
|
-
? false
|
|
51
|
-
: joinPaths(
|
|
52
|
-
config.workspaceRoot,
|
|
53
|
-
config.directories.cache || "node_modules/.cache/storm",
|
|
54
|
-
"jiti"
|
|
55
|
-
),
|
|
56
|
-
interopDefault: true
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
const stormUnbuild = await jiti.import<StormUnbuildModule>(
|
|
60
|
-
jiti.esmResolve("@storm-software/unbuild/build")
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
// #endregion Prepare build context variables
|
|
64
|
-
|
|
65
|
-
await stormUnbuild.build(
|
|
66
|
-
defu(
|
|
67
|
-
{
|
|
68
|
-
...options,
|
|
69
|
-
projectRoot:
|
|
70
|
-
context.projectsConfigurations.projects![context.projectName]!.root,
|
|
71
|
-
projectName: context.projectName,
|
|
72
|
-
sourceRoot:
|
|
73
|
-
context.projectsConfigurations.projects![context.projectName]!
|
|
74
|
-
.sourceRoot,
|
|
75
|
-
platform: options.platform as UnbuildOptions["platform"]
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
stubOptions: {
|
|
79
|
-
jiti: {
|
|
80
|
-
fsCache: config.skipCache
|
|
81
|
-
? false
|
|
82
|
-
: joinPaths(
|
|
83
|
-
config.workspaceRoot,
|
|
84
|
-
config.directories.cache || "node_modules/.cache/storm",
|
|
85
|
-
"jiti"
|
|
86
|
-
)
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
rollup: {
|
|
90
|
-
emitCJS: true,
|
|
91
|
-
watch: false,
|
|
92
|
-
dts: {
|
|
93
|
-
respectExternal: true
|
|
94
|
-
},
|
|
95
|
-
esbuild: {
|
|
96
|
-
target: options.target,
|
|
97
|
-
format: "esm",
|
|
98
|
-
platform: options.platform,
|
|
99
|
-
minify: options.minify ?? !options.debug,
|
|
100
|
-
sourcemap: options.sourcemap ?? options.debug,
|
|
101
|
-
treeShaking: options.treeShaking
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
) as UnbuildOptions
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
// #endregion Run the build process
|
|
109
|
-
|
|
110
|
-
return {
|
|
111
|
-
success: true
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export default withRunExecutor<UnbuildExecutorSchema>(
|
|
116
|
-
"TypeScript Unbuild build",
|
|
117
|
-
unbuildExecutorFn,
|
|
118
|
-
{
|
|
119
|
-
skipReadingConfig: false,
|
|
120
|
-
hooks: {
|
|
121
|
-
applyDefaultOptions: async (
|
|
122
|
-
options: UnbuildExecutorSchema,
|
|
123
|
-
config?: StormWorkspaceConfig | undefined
|
|
124
|
-
) => {
|
|
125
|
-
options.debug ??= false;
|
|
126
|
-
options.treeShaking ??= true;
|
|
127
|
-
options.buildOnly ??= false;
|
|
128
|
-
options.platform ??= "neutral";
|
|
129
|
-
options.entry ??= ["{sourceRoot}"];
|
|
130
|
-
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
131
|
-
|
|
132
|
-
return options;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
);
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { defineUntypedSchema } from "untyped";
|
|
2
|
-
import typescriptBuildExecutorSchema from "../../base/typescript-build-executor.untyped";
|
|
3
|
-
|
|
4
|
-
export default defineUntypedSchema({
|
|
5
|
-
...typescriptBuildExecutorSchema,
|
|
6
|
-
$schema: {
|
|
7
|
-
id: "UnbuildExecutorSchema",
|
|
8
|
-
title: "Unbuild Executor",
|
|
9
|
-
description: "A type definition for a unbuild executor schema",
|
|
10
|
-
required: ["name", "entry"]
|
|
11
|
-
},
|
|
12
|
-
name: {
|
|
13
|
-
$schema: {
|
|
14
|
-
title: "Name",
|
|
15
|
-
type: "string",
|
|
16
|
-
description: "The name of the project/build"
|
|
17
|
-
},
|
|
18
|
-
$default: "{projectName}"
|
|
19
|
-
},
|
|
20
|
-
entry: {
|
|
21
|
-
$schema: {
|
|
22
|
-
title: "Input Directory",
|
|
23
|
-
format: "path",
|
|
24
|
-
type: "array",
|
|
25
|
-
description: "The directory to use as input for the build",
|
|
26
|
-
items: { type: "string" }
|
|
27
|
-
},
|
|
28
|
-
$default: ["{sourceRoot}"]
|
|
29
|
-
},
|
|
30
|
-
outputPath: {
|
|
31
|
-
$schema: {
|
|
32
|
-
title: "Output Path",
|
|
33
|
-
type: "string",
|
|
34
|
-
format: "path",
|
|
35
|
-
description: "The output path for the build"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
treeShaking: {
|
|
39
|
-
$schema: {
|
|
40
|
-
title: "Tree Shaking",
|
|
41
|
-
type: "boolean",
|
|
42
|
-
description: "Enable tree shaking"
|
|
43
|
-
},
|
|
44
|
-
$default: true
|
|
45
|
-
},
|
|
46
|
-
watch: {
|
|
47
|
-
$schema: {
|
|
48
|
-
title: "Watch",
|
|
49
|
-
type: "boolean",
|
|
50
|
-
description: "Watch for changes"
|
|
51
|
-
},
|
|
52
|
-
$default: false
|
|
53
|
-
},
|
|
54
|
-
clean: {
|
|
55
|
-
$schema: {
|
|
56
|
-
title: "Clean",
|
|
57
|
-
type: "boolean",
|
|
58
|
-
description: "Clean the output directory before building"
|
|
59
|
-
},
|
|
60
|
-
$default: true
|
|
61
|
-
},
|
|
62
|
-
stub: {
|
|
63
|
-
$schema: {
|
|
64
|
-
title: "Stub",
|
|
65
|
-
type: "boolean",
|
|
66
|
-
description: "Stub the output"
|
|
67
|
-
},
|
|
68
|
-
$default: false
|
|
69
|
-
},
|
|
70
|
-
buildOnly: {
|
|
71
|
-
$schema: {
|
|
72
|
-
title: "Build Only",
|
|
73
|
-
type: "boolean",
|
|
74
|
-
description:
|
|
75
|
-
"Should the build process skip generating a package.json and copying assets"
|
|
76
|
-
},
|
|
77
|
-
$default: false
|
|
78
|
-
},
|
|
79
|
-
watchOptions: {
|
|
80
|
-
$schema: {
|
|
81
|
-
title: "Watch Options",
|
|
82
|
-
type: "object",
|
|
83
|
-
description: "Watch options"
|
|
84
|
-
},
|
|
85
|
-
$default: {}
|
|
86
|
-
},
|
|
87
|
-
stubOptions: {
|
|
88
|
-
$schema: {
|
|
89
|
-
title: "Stub Options",
|
|
90
|
-
type: "object",
|
|
91
|
-
description: "Stub options"
|
|
92
|
-
},
|
|
93
|
-
$default: {
|
|
94
|
-
jiti: {
|
|
95
|
-
cache: "node_modules/.cache/storm"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
dependencies: {
|
|
100
|
-
$schema: {
|
|
101
|
-
title: "Dependencies",
|
|
102
|
-
type: "array",
|
|
103
|
-
description: "The dependencies to install",
|
|
104
|
-
items: {
|
|
105
|
-
type: "string"
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
peerDependencies: {
|
|
110
|
-
$schema: {
|
|
111
|
-
title: "Peer Dependencies",
|
|
112
|
-
type: "array",
|
|
113
|
-
description: "The peer dependencies to install",
|
|
114
|
-
items: {
|
|
115
|
-
type: "string"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
devDependencies: {
|
|
120
|
-
$schema: {
|
|
121
|
-
title: "Dev Dependencies",
|
|
122
|
-
type: "array",
|
|
123
|
-
description: "The dev dependencies to install",
|
|
124
|
-
items: {
|
|
125
|
-
type: "string"
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
alias: {
|
|
130
|
-
$schema: {
|
|
131
|
-
title: "Alias",
|
|
132
|
-
type: "object",
|
|
133
|
-
tsType: "Record<string, string>",
|
|
134
|
-
description: "The alias to use"
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
replace: {
|
|
138
|
-
$schema: {
|
|
139
|
-
title: "Replace",
|
|
140
|
-
type: "object",
|
|
141
|
-
tsType: "Record<string, string>",
|
|
142
|
-
description: "The replace to use"
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
rollup: {
|
|
146
|
-
$schema: {
|
|
147
|
-
title: "Rollup",
|
|
148
|
-
type: "object",
|
|
149
|
-
description: "The rollup options"
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Tree, readProjectConfiguration } from "@nx/devkit";
|
|
2
|
-
import { createTreeWithEmptyWorkspace } from "@nx/devkit/testing";
|
|
3
|
-
|
|
4
|
-
import { browserLibraryGenerator } from "./generator";
|
|
5
|
-
import { BrowserLibraryGeneratorSchema } from "./schema.d";
|
|
6
|
-
|
|
7
|
-
describe("browser-library generator", () => {
|
|
8
|
-
let tree: Tree;
|
|
9
|
-
const options: BrowserLibraryGeneratorSchema = { name: "test" };
|
|
10
|
-
|
|
11
|
-
beforeEach(() => {
|
|
12
|
-
tree = createTreeWithEmptyWorkspace();
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
it("should run successfully", async () => {
|
|
16
|
-
await browserLibraryGenerator(tree, options);
|
|
17
|
-
const config = readProjectConfiguration(tree, "test");
|
|
18
|
-
expect(config).toBeDefined();
|
|
19
|
-
});
|
|
20
|
-
});
|