@depup/angular__cli 21.2.1-depup.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/LICENSE +21 -0
- package/README.md +36 -0
- package/bin/bootstrap.js +33 -0
- package/bin/ng.js +71 -0
- package/bin/package.json +3 -0
- package/changes.json +30 -0
- package/lib/cli/index.d.ts +11 -0
- package/lib/cli/index.js +109 -0
- package/lib/cli/index.js.map +1 -0
- package/lib/code-examples.db +0 -0
- package/lib/config/schema.json +6150 -0
- package/lib/config/workspace-schema.d.ts +1025 -0
- package/lib/config/workspace-schema.js +133 -0
- package/lib/config/workspace-schema.js.map +1 -0
- package/lib/init.d.ts +8 -0
- package/lib/init.js +162 -0
- package/lib/init.js.map +1 -0
- package/package.json +103 -0
- package/src/analytics/analytics-collector.d.ts +35 -0
- package/src/analytics/analytics-collector.js +195 -0
- package/src/analytics/analytics-collector.js.map +1 -0
- package/src/analytics/analytics-parameters.d.ts +101 -0
- package/src/analytics/analytics-parameters.js +107 -0
- package/src/analytics/analytics-parameters.js.map +1 -0
- package/src/analytics/analytics.d.ts +27 -0
- package/src/analytics/analytics.js +183 -0
- package/src/analytics/analytics.js.map +1 -0
- package/src/command-builder/architect-base-command-module.d.ts +30 -0
- package/src/command-builder/architect-base-command-module.js +244 -0
- package/src/command-builder/architect-base-command-module.js.map +1 -0
- package/src/command-builder/architect-command-module.d.ts +28 -0
- package/src/command-builder/architect-command-module.js +218 -0
- package/src/command-builder/architect-command-module.js.map +1 -0
- package/src/command-builder/command-module.d.ts +73 -0
- package/src/command-builder/command-module.js +245 -0
- package/src/command-builder/command-module.js.map +1 -0
- package/src/command-builder/command-runner.d.ts +9 -0
- package/src/command-builder/command-runner.js +195 -0
- package/src/command-builder/command-runner.js.map +1 -0
- package/src/command-builder/definitions.d.ts +41 -0
- package/src/command-builder/definitions.js +20 -0
- package/src/command-builder/definitions.js.map +1 -0
- package/src/command-builder/schematics-command-module.d.ts +41 -0
- package/src/command-builder/schematics-command-module.js +408 -0
- package/src/command-builder/schematics-command-module.js.map +1 -0
- package/src/command-builder/utilities/command.d.ts +13 -0
- package/src/command-builder/utilities/command.js +39 -0
- package/src/command-builder/utilities/command.js.map +1 -0
- package/src/command-builder/utilities/json-help.d.ts +37 -0
- package/src/command-builder/utilities/json-help.js +92 -0
- package/src/command-builder/utilities/json-help.js.map +1 -0
- package/src/command-builder/utilities/json-schema.d.ts +64 -0
- package/src/command-builder/utilities/json-schema.js +349 -0
- package/src/command-builder/utilities/json-schema.js.map +1 -0
- package/src/command-builder/utilities/normalize-options-middleware.d.ts +18 -0
- package/src/command-builder/utilities/normalize-options-middleware.js +37 -0
- package/src/command-builder/utilities/normalize-options-middleware.js.map +1 -0
- package/src/command-builder/utilities/schematic-engine-host.d.ts +15 -0
- package/src/command-builder/utilities/schematic-engine-host.js +179 -0
- package/src/command-builder/utilities/schematic-engine-host.js.map +1 -0
- package/src/command-builder/utilities/schematic-workflow.d.ts +14 -0
- package/src/command-builder/utilities/schematic-workflow.js +70 -0
- package/src/command-builder/utilities/schematic-workflow.js.map +1 -0
- package/src/commands/add/cli.d.ts +38 -0
- package/src/commands/add/cli.js +623 -0
- package/src/commands/add/cli.js.map +1 -0
- package/src/commands/add/long-description.md +7 -0
- package/src/commands/analytics/cli.d.ts +16 -0
- package/src/commands/analytics/cli.js +34 -0
- package/src/commands/analytics/cli.js.map +1 -0
- package/src/commands/analytics/info/cli.d.ts +16 -0
- package/src/commands/analytics/info/cli.js +25 -0
- package/src/commands/analytics/info/cli.js.map +1 -0
- package/src/commands/analytics/long-description.md +20 -0
- package/src/commands/analytics/settings/cli.d.ts +35 -0
- package/src/commands/analytics/settings/cli.js +54 -0
- package/src/commands/analytics/settings/cli.js.map +1 -0
- package/src/commands/build/cli.d.ts +16 -0
- package/src/commands/build/cli.js +21 -0
- package/src/commands/build/cli.js.map +1 -0
- package/src/commands/build/long-description.md +18 -0
- package/src/commands/cache/clean/cli.d.ts +17 -0
- package/src/commands/cache/clean/cli.js +32 -0
- package/src/commands/cache/clean/cli.js.map +1 -0
- package/src/commands/cache/cli.d.ts +17 -0
- package/src/commands/cache/cli.js +36 -0
- package/src/commands/cache/cli.js.map +1 -0
- package/src/commands/cache/info/cli.d.ts +20 -0
- package/src/commands/cache/info/cli.js +139 -0
- package/src/commands/cache/info/cli.js.map +1 -0
- package/src/commands/cache/long-description.md +53 -0
- package/src/commands/cache/settings/cli.d.ts +27 -0
- package/src/commands/cache/settings/cli.js +41 -0
- package/src/commands/cache/settings/cli.js.map +1 -0
- package/src/commands/cache/utilities.d.ts +11 -0
- package/src/commands/cache/utilities.js +47 -0
- package/src/commands/cache/utilities.js.map +1 -0
- package/src/commands/command-config.d.ts +17 -0
- package/src/commands/command-config.js +116 -0
- package/src/commands/command-config.js.map +1 -0
- package/src/commands/completion/cli.d.ts +16 -0
- package/src/commands/completion/cli.js +61 -0
- package/src/commands/completion/cli.js.map +1 -0
- package/src/commands/completion/long-description.md +67 -0
- package/src/commands/config/cli.d.ts +24 -0
- package/src/commands/config/cli.js +150 -0
- package/src/commands/config/cli.js.map +1 -0
- package/src/commands/config/long-description.md +13 -0
- package/src/commands/deploy/cli.d.ts +17 -0
- package/src/commands/deploy/cli.js +38 -0
- package/src/commands/deploy/cli.js.map +1 -0
- package/src/commands/deploy/long-description.md +22 -0
- package/src/commands/e2e/cli.d.ts +18 -0
- package/src/commands/e2e/cli.js +42 -0
- package/src/commands/e2e/cli.js.map +1 -0
- package/src/commands/extract-i18n/cli.d.ts +17 -0
- package/src/commands/extract-i18n/cli.js +48 -0
- package/src/commands/extract-i18n/cli.js.map +1 -0
- package/src/commands/generate/cli.d.ts +47 -0
- package/src/commands/generate/cli.js +189 -0
- package/src/commands/generate/cli.js.map +1 -0
- package/src/commands/lint/cli.d.ts +17 -0
- package/src/commands/lint/cli.js +25 -0
- package/src/commands/lint/cli.js.map +1 -0
- package/src/commands/lint/long-description.md +20 -0
- package/src/commands/make-this-awesome/cli.d.ts +17 -0
- package/src/commands/make-this-awesome/cli.js +36 -0
- package/src/commands/make-this-awesome/cli.js.map +1 -0
- package/src/commands/mcp/cli.d.ts +20 -0
- package/src/commands/mcp/cli.js +74 -0
- package/src/commands/mcp/cli.js.map +1 -0
- package/src/commands/mcp/constants.d.ts +10 -0
- package/src/commands/mcp/constants.js +16 -0
- package/src/commands/mcp/constants.js.map +1 -0
- package/src/commands/mcp/devserver.d.ts +85 -0
- package/src/commands/mcp/devserver.js +112 -0
- package/src/commands/mcp/devserver.js.map +1 -0
- package/src/commands/mcp/host.d.ts +97 -0
- package/src/commands/mcp/host.js +118 -0
- package/src/commands/mcp/host.js.map +1 -0
- package/src/commands/mcp/mcp-server.d.ts +192 -0
- package/src/commands/mcp/mcp-server.js +155 -0
- package/src/commands/mcp/mcp-server.js.map +1 -0
- package/src/commands/mcp/resources/ai-tutor.md +824 -0
- package/src/commands/mcp/resources/best-practices.md +54 -0
- package/src/commands/mcp/resources/instructions.d.ts +9 -0
- package/src/commands/mcp/resources/instructions.js +26 -0
- package/src/commands/mcp/resources/instructions.js.map +1 -0
- package/src/commands/mcp/shared-options.d.ts +12 -0
- package/src/commands/mcp/shared-options.js +22 -0
- package/src/commands/mcp/shared-options.js.map +1 -0
- package/src/commands/mcp/tools/ai-tutor.d.ts +12 -0
- package/src/commands/mcp/tools/ai-tutor.js +59 -0
- package/src/commands/mcp/tools/ai-tutor.js.map +1 -0
- package/src/commands/mcp/tools/best-practices.d.ts +13 -0
- package/src/commands/mcp/tools/best-practices.js +187 -0
- package/src/commands/mcp/tools/best-practices.js.map +1 -0
- package/src/commands/mcp/tools/build.d.ts +37 -0
- package/src/commands/mcp/tools/build.js +89 -0
- package/src/commands/mcp/tools/build.js.map +1 -0
- package/src/commands/mcp/tools/devserver/devserver-start.d.ts +31 -0
- package/src/commands/mcp/tools/devserver/devserver-start.js +91 -0
- package/src/commands/mcp/tools/devserver/devserver-start.js.map +1 -0
- package/src/commands/mcp/tools/devserver/devserver-stop.d.ts +31 -0
- package/src/commands/mcp/tools/devserver/devserver-stop.js +68 -0
- package/src/commands/mcp/tools/devserver/devserver-stop.js.map +1 -0
- package/src/commands/mcp/tools/devserver/devserver-wait-for-build.d.ts +41 -0
- package/src/commands/mcp/tools/devserver/devserver-wait-for-build.js +104 -0
- package/src/commands/mcp/tools/devserver/devserver-wait-for-build.js.map +1 -0
- package/src/commands/mcp/tools/doc-search.d.ts +21 -0
- package/src/commands/mcp/tools/doc-search.js +324 -0
- package/src/commands/mcp/tools/doc-search.js.map +1 -0
- package/src/commands/mcp/tools/e2e.d.ts +44 -0
- package/src/commands/mcp/tools/e2e.js +87 -0
- package/src/commands/mcp/tools/e2e.js.map +1 -0
- package/src/commands/mcp/tools/examples/database-discovery.d.ts +34 -0
- package/src/commands/mcp/tools/examples/database-discovery.js +87 -0
- package/src/commands/mcp/tools/examples/database-discovery.js.map +1 -0
- package/src/commands/mcp/tools/examples/database.d.ts +35 -0
- package/src/commands/mcp/tools/examples/database.js +125 -0
- package/src/commands/mcp/tools/examples/database.js.map +1 -0
- package/src/commands/mcp/tools/examples/index.d.ts +26 -0
- package/src/commands/mcp/tools/examples/index.js +149 -0
- package/src/commands/mcp/tools/examples/index.js.map +1 -0
- package/src/commands/mcp/tools/examples/query-escaper.d.ts +20 -0
- package/src/commands/mcp/tools/examples/query-escaper.js +68 -0
- package/src/commands/mcp/tools/examples/query-escaper.js.map +1 -0
- package/src/commands/mcp/tools/examples/runtime-database.d.ts +10 -0
- package/src/commands/mcp/tools/examples/runtime-database.js +192 -0
- package/src/commands/mcp/tools/examples/runtime-database.js.map +1 -0
- package/src/commands/mcp/tools/examples/schemas.d.ts +29 -0
- package/src/commands/mcp/tools/examples/schemas.js +101 -0
- package/src/commands/mcp/tools/examples/schemas.js.map +1 -0
- package/src/commands/mcp/tools/examples/utils.d.ts +14 -0
- package/src/commands/mcp/tools/examples/utils.js +31 -0
- package/src/commands/mcp/tools/examples/utils.js.map +1 -0
- package/src/commands/mcp/tools/modernize.d.ts +43 -0
- package/src/commands/mcp/tools/modernize.js +165 -0
- package/src/commands/mcp/tools/modernize.js.map +1 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.d.ts +17 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.js +62 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.js.map +1 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.d.ts +12 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js +73 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js.map +1 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.d.ts +11 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js +60 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js.map +1 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.d.ts +15 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.js +238 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.js.map +1 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.d.ts +10 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.js +20 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.js.map +1 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.d.ts +35 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js +136 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js.map +1 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/types.d.ts +13 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/types.js +10 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/types.js.map +1 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.d.ts +16 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js +224 -0
- package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js.map +1 -0
- package/src/commands/mcp/tools/projects.d.ts +47 -0
- package/src/commands/mcp/tools/projects.js +523 -0
- package/src/commands/mcp/tools/projects.js.map +1 -0
- package/src/commands/mcp/tools/test.d.ts +35 -0
- package/src/commands/mcp/tools/test.js +79 -0
- package/src/commands/mcp/tools/test.js.map +1 -0
- package/src/commands/mcp/tools/tool-registry.d.ts +39 -0
- package/src/commands/mcp/tools/tool-registry.js +35 -0
- package/src/commands/mcp/tools/tool-registry.js.map +1 -0
- package/src/commands/mcp/utils.d.ts +25 -0
- package/src/commands/mcp/utils.js +44 -0
- package/src/commands/mcp/utils.js.map +1 -0
- package/src/commands/mcp/workspace-utils.d.ts +53 -0
- package/src/commands/mcp/workspace-utils.js +138 -0
- package/src/commands/mcp/workspace-utils.js.map +1 -0
- package/src/commands/new/cli.d.ts +27 -0
- package/src/commands/new/cli.js +76 -0
- package/src/commands/new/cli.js.map +1 -0
- package/src/commands/new/long-description.md +15 -0
- package/src/commands/run/cli.d.ts +25 -0
- package/src/commands/run/cli.js +89 -0
- package/src/commands/run/cli.js.map +1 -0
- package/src/commands/run/long-description.md +10 -0
- package/src/commands/serve/cli.d.ts +16 -0
- package/src/commands/serve/cli.js +20 -0
- package/src/commands/serve/cli.js.map +1 -0
- package/src/commands/test/cli.d.ts +16 -0
- package/src/commands/test/cli.js +21 -0
- package/src/commands/test/cli.js.map +1 -0
- package/src/commands/test/long-description.md +2 -0
- package/src/commands/update/cli.d.ts +34 -0
- package/src/commands/update/cli.js +531 -0
- package/src/commands/update/cli.js.map +1 -0
- package/src/commands/update/long-description.md +22 -0
- package/src/commands/update/schematic/collection.json +9 -0
- package/src/commands/update/schematic/index.d.ts +11 -0
- package/src/commands/update/schematic/index.js +715 -0
- package/src/commands/update/schematic/index.js.map +1 -0
- package/src/commands/update/schematic/schema.d.ts +51 -0
- package/src/commands/update/schematic/schema.js +16 -0
- package/src/commands/update/schematic/schema.js.map +1 -0
- package/src/commands/update/schematic/schema.json +64 -0
- package/src/commands/update/utilities/cli-version.d.ts +48 -0
- package/src/commands/update/utilities/cli-version.js +196 -0
- package/src/commands/update/utilities/cli-version.js.map +1 -0
- package/src/commands/update/utilities/constants.d.ts +12 -0
- package/src/commands/update/utilities/constants.js +16 -0
- package/src/commands/update/utilities/constants.js.map +1 -0
- package/src/commands/update/utilities/git.d.ts +36 -0
- package/src/commands/update/utilities/git.js +148 -0
- package/src/commands/update/utilities/git.js.map +1 -0
- package/src/commands/update/utilities/migration.d.ts +32 -0
- package/src/commands/update/utilities/migration.js +267 -0
- package/src/commands/update/utilities/migration.js.map +1 -0
- package/src/commands/version/cli.d.ts +36 -0
- package/src/commands/version/cli.js +117 -0
- package/src/commands/version/cli.js.map +1 -0
- package/src/commands/version/version-info.d.ts +46 -0
- package/src/commands/version/version-info.js +107 -0
- package/src/commands/version/version-info.js.map +1 -0
- package/src/package-managers/discovery.d.ts +23 -0
- package/src/package-managers/discovery.js +104 -0
- package/src/package-managers/discovery.js.map +1 -0
- package/src/package-managers/error.d.ts +43 -0
- package/src/package-managers/error.js +41 -0
- package/src/package-managers/error.js.map +1 -0
- package/src/package-managers/factory.d.ts +30 -0
- package/src/package-managers/factory.js +137 -0
- package/src/package-managers/factory.js.map +1 -0
- package/src/package-managers/host.d.ts +86 -0
- package/src/package-managers/host.js +80 -0
- package/src/package-managers/host.js.map +1 -0
- package/src/package-managers/index.d.ts +13 -0
- package/src/package-managers/index.js +17 -0
- package/src/package-managers/index.js.map +1 -0
- package/src/package-managers/logger.d.ts +27 -0
- package/src/package-managers/logger.js +10 -0
- package/src/package-managers/logger.js.map +1 -0
- package/src/package-managers/package-manager-descriptor.d.ts +245 -0
- package/src/package-managers/package-manager-descriptor.js +175 -0
- package/src/package-managers/package-manager-descriptor.js.map +1 -0
- package/src/package-managers/package-manager.d.ts +191 -0
- package/src/package-managers/package-manager.js +496 -0
- package/src/package-managers/package-manager.js.map +1 -0
- package/src/package-managers/package-metadata.d.ts +91 -0
- package/src/package-managers/package-metadata.js +10 -0
- package/src/package-managers/package-metadata.js.map +1 -0
- package/src/package-managers/package-tree.d.ts +23 -0
- package/src/package-managers/package-tree.js +10 -0
- package/src/package-managers/package-tree.js.map +1 -0
- package/src/package-managers/parsers.d.ts +170 -0
- package/src/package-managers/parsers.js +467 -0
- package/src/package-managers/parsers.js.map +1 -0
- package/src/utilities/color.d.ts +9 -0
- package/src/utilities/color.js +28 -0
- package/src/utilities/color.js.map +1 -0
- package/src/utilities/completion.d.ts +30 -0
- package/src/utilities/completion.js +270 -0
- package/src/utilities/completion.js.map +1 -0
- package/src/utilities/config.d.ts +38 -0
- package/src/utilities/config.js +369 -0
- package/src/utilities/config.js.map +1 -0
- package/src/utilities/environment-options.d.ts +25 -0
- package/src/utilities/environment-options.js +60 -0
- package/src/utilities/environment-options.js.map +1 -0
- package/src/utilities/eol.d.ts +20 -0
- package/src/utilities/eol.js +35 -0
- package/src/utilities/eol.js.map +1 -0
- package/src/utilities/error.d.ts +18 -0
- package/src/utilities/error.js +41 -0
- package/src/utilities/error.js.map +1 -0
- package/src/utilities/find-up.d.ts +21 -0
- package/src/utilities/find-up.js +67 -0
- package/src/utilities/find-up.js.map +1 -0
- package/src/utilities/json-file.d.ts +24 -0
- package/src/utilities/json-file.js +179 -0
- package/src/utilities/json-file.js.map +1 -0
- package/src/utilities/log-file.d.ts +13 -0
- package/src/utilities/log-file.js +28 -0
- package/src/utilities/log-file.js.map +1 -0
- package/src/utilities/memoize.d.ts +15 -0
- package/src/utilities/memoize.js +64 -0
- package/src/utilities/memoize.js.map +1 -0
- package/src/utilities/package-metadata.d.ts +58 -0
- package/src/utilities/package-metadata.js +265 -0
- package/src/utilities/package-metadata.js.map +1 -0
- package/src/utilities/prettier.d.ts +13 -0
- package/src/utilities/prettier.js +46 -0
- package/src/utilities/prettier.js.map +1 -0
- package/src/utilities/project.d.ts +8 -0
- package/src/utilities/project.js +81 -0
- package/src/utilities/project.js.map +1 -0
- package/src/utilities/prompt.d.ts +17 -0
- package/src/utilities/prompt.js +90 -0
- package/src/utilities/prompt.js.map +1 -0
- package/src/utilities/tty.d.ts +16 -0
- package/src/utilities/tty.js +23 -0
- package/src/utilities/tty.js.map +1 -0
- package/src/utilities/version.d.ts +16 -0
- package/src/utilities/version.js +26 -0
- package/src/utilities/version.js.map +1 -0
|
@@ -0,0 +1,1025 @@
|
|
|
1
|
+
export type Schema = {
|
|
2
|
+
$schema?: string;
|
|
3
|
+
cli?: CliOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Path where new projects will be created.
|
|
6
|
+
*/
|
|
7
|
+
newProjectRoot?: string;
|
|
8
|
+
projects?: Projects;
|
|
9
|
+
schematics?: SchematicOptions;
|
|
10
|
+
version: number;
|
|
11
|
+
};
|
|
12
|
+
export type CliOptions = {
|
|
13
|
+
/**
|
|
14
|
+
* Share pseudonymous usage data with the Angular Team at Google.
|
|
15
|
+
*/
|
|
16
|
+
analytics?: Analytics;
|
|
17
|
+
/**
|
|
18
|
+
* Control disk cache.
|
|
19
|
+
*/
|
|
20
|
+
cache?: Cache;
|
|
21
|
+
/**
|
|
22
|
+
* Specify which package manager tool to use.
|
|
23
|
+
*/
|
|
24
|
+
packageManager?: PackageManager;
|
|
25
|
+
/**
|
|
26
|
+
* The list of schematic collections to use.
|
|
27
|
+
*/
|
|
28
|
+
schematicCollections?: string[];
|
|
29
|
+
/**
|
|
30
|
+
* Control CLI specific console warnings
|
|
31
|
+
*/
|
|
32
|
+
warnings?: Warnings;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Share pseudonymous usage data with the Angular Team at Google.
|
|
36
|
+
*/
|
|
37
|
+
export type Analytics = boolean | string;
|
|
38
|
+
/**
|
|
39
|
+
* Control disk cache.
|
|
40
|
+
*/
|
|
41
|
+
export type Cache = {
|
|
42
|
+
/**
|
|
43
|
+
* Configure whether disk caching is enabled.
|
|
44
|
+
*/
|
|
45
|
+
enabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Configure in which environment disk cache is enabled.
|
|
48
|
+
*/
|
|
49
|
+
environment?: Environment;
|
|
50
|
+
/**
|
|
51
|
+
* Cache base path.
|
|
52
|
+
*/
|
|
53
|
+
path?: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Configure in which environment disk cache is enabled.
|
|
57
|
+
*/
|
|
58
|
+
export declare enum Environment {
|
|
59
|
+
All = "all",
|
|
60
|
+
Ci = "ci",
|
|
61
|
+
Local = "local"
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Specify which package manager tool to use.
|
|
65
|
+
*
|
|
66
|
+
* The package manager used to install dependencies.
|
|
67
|
+
*/
|
|
68
|
+
export declare enum PackageManager {
|
|
69
|
+
Bun = "bun",
|
|
70
|
+
Npm = "npm",
|
|
71
|
+
Pnpm = "pnpm",
|
|
72
|
+
Yarn = "yarn"
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Control CLI specific console warnings
|
|
76
|
+
*/
|
|
77
|
+
export type Warnings = {
|
|
78
|
+
/**
|
|
79
|
+
* Show a warning when the global version is newer than the local one.
|
|
80
|
+
*/
|
|
81
|
+
versionMismatch?: boolean;
|
|
82
|
+
};
|
|
83
|
+
export type Projects = {};
|
|
84
|
+
export type SchematicOptions = {
|
|
85
|
+
"@schematics/angular:application"?: AngularApplicationOptionsSchema;
|
|
86
|
+
"@schematics/angular:class"?: AngularClassOptionsSchema;
|
|
87
|
+
"@schematics/angular:component"?: AngularComponentOptionsSchema;
|
|
88
|
+
"@schematics/angular:directive"?: AngularDirectiveOptionsSchema;
|
|
89
|
+
"@schematics/angular:enum"?: AngularEnumOptionsSchema;
|
|
90
|
+
"@schematics/angular:guard"?: AngularGuardOptionsSchema;
|
|
91
|
+
"@schematics/angular:interceptor"?: AngularInterceptorOptionsSchema;
|
|
92
|
+
"@schematics/angular:interface"?: AngularInterfaceOptionsSchema;
|
|
93
|
+
"@schematics/angular:library"?: LibraryOptionsSchema;
|
|
94
|
+
"@schematics/angular:ng-new"?: AngularNgNewOptionsSchema;
|
|
95
|
+
"@schematics/angular:pipe"?: AngularPipeOptionsSchema;
|
|
96
|
+
"@schematics/angular:resolver"?: AngularResolverOptionsSchema;
|
|
97
|
+
"@schematics/angular:service"?: AngularServiceOptionsSchema;
|
|
98
|
+
"@schematics/angular:web-worker"?: AngularWebWorkerOptionsSchema;
|
|
99
|
+
[property: string]: any;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Generates a new Angular application within your workspace. This schematic sets up the
|
|
103
|
+
* foundational structure of your project, including the root component, module, and
|
|
104
|
+
* configuration files. You can customize various aspects of the application, such as
|
|
105
|
+
* routing, styling, and testing.
|
|
106
|
+
*/
|
|
107
|
+
export type AngularApplicationOptionsSchema = {
|
|
108
|
+
/**
|
|
109
|
+
* The file naming convention to use for generated files. The '2025' style guide (default)
|
|
110
|
+
* uses a concise format (e.g., `app.ts` for the root component), while the '2016' style
|
|
111
|
+
* guide includes the type in the file name (e.g., `app.component.ts`). For more
|
|
112
|
+
* information, see the Angular Style Guide (https://angular.dev/style-guide).
|
|
113
|
+
*/
|
|
114
|
+
fileNameStyleGuide?: FileNameStyleGuide;
|
|
115
|
+
/**
|
|
116
|
+
* Include the styles for the root component directly within the `app.component.ts` file.
|
|
117
|
+
* Only CSS styles can be included inline. By default, a separate stylesheet file (e.g.,
|
|
118
|
+
* `app.component.css`) is created.
|
|
119
|
+
*/
|
|
120
|
+
inlineStyle?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Include the HTML template for the root component directly within the `app.component.ts`
|
|
123
|
+
* file. By default, a separate template file (e.g., `app.component.html`) is created.
|
|
124
|
+
*/
|
|
125
|
+
inlineTemplate?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Generate a minimal project without any testing frameworks. This is intended for learning
|
|
128
|
+
* purposes and simple experimentation, not for production applications.
|
|
129
|
+
*/
|
|
130
|
+
minimal?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* The name for the new application. This name will be used for the project directory and
|
|
133
|
+
* various identifiers throughout the application's code.
|
|
134
|
+
*/
|
|
135
|
+
name: string;
|
|
136
|
+
/**
|
|
137
|
+
* A prefix to be added to the selectors of components generated within this application.
|
|
138
|
+
* For example, if the prefix is `my-app` and you generate a component named `my-component`,
|
|
139
|
+
* the selector will be `my-app-my-component`.
|
|
140
|
+
*/
|
|
141
|
+
prefix?: string;
|
|
142
|
+
/**
|
|
143
|
+
* The directory where the new application's files will be created, relative to the
|
|
144
|
+
* workspace root. If not specified, the application will be created in a subfolder within
|
|
145
|
+
* the `projects` directory, using the application's name.
|
|
146
|
+
*/
|
|
147
|
+
projectRoot?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Generate an application with routing already configured. This sets up the necessary files
|
|
150
|
+
* and modules for managing navigation between different views in your application.
|
|
151
|
+
*/
|
|
152
|
+
routing?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Skip the automatic installation of packages. You will need to manually install the
|
|
155
|
+
* dependencies later.
|
|
156
|
+
*/
|
|
157
|
+
skipInstall?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Do not add dependencies to the `package.json` file.
|
|
160
|
+
*/
|
|
161
|
+
skipPackageJson?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Skip the generation of a unit test files `spec.ts`.
|
|
164
|
+
*/
|
|
165
|
+
skipTests?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Configure the application for Server-Side Rendering (SSR) and Static Site Generation
|
|
168
|
+
* (SSG/Prerendering).
|
|
169
|
+
*/
|
|
170
|
+
ssr?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Create an application that utilizes the standalone API, eliminating the need for
|
|
173
|
+
* NgModules. This can simplify the structure of your application.
|
|
174
|
+
*/
|
|
175
|
+
standalone?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Enable stricter bundle budget settings for the application. This helps to keep your
|
|
178
|
+
* application's bundle size small and improve performance. For more information, see
|
|
179
|
+
* https://angular.dev/tools/cli/template-typecheck#strict-mode
|
|
180
|
+
*/
|
|
181
|
+
strict?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* The type of stylesheet files to be created for components in the application.
|
|
184
|
+
*/
|
|
185
|
+
style?: SchematicsAngularApplicationStyle;
|
|
186
|
+
/**
|
|
187
|
+
* The unit testing runner to use.
|
|
188
|
+
*/
|
|
189
|
+
testRunner?: TestRunner;
|
|
190
|
+
/**
|
|
191
|
+
* Sets the view encapsulation mode for the application's components. This determines how
|
|
192
|
+
* component styles are scoped and applied.
|
|
193
|
+
*/
|
|
194
|
+
viewEncapsulation?: ViewEncapsulation;
|
|
195
|
+
/**
|
|
196
|
+
* Generate an application that does not use `zone.js`.
|
|
197
|
+
*/
|
|
198
|
+
zoneless?: boolean;
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* The file naming convention to use for generated files. The '2025' style guide (default)
|
|
202
|
+
* uses a concise format (e.g., `app.ts` for the root component), while the '2016' style
|
|
203
|
+
* guide includes the type in the file name (e.g., `app.component.ts`). For more
|
|
204
|
+
* information, see the Angular Style Guide (https://angular.dev/style-guide).
|
|
205
|
+
*/
|
|
206
|
+
export declare enum FileNameStyleGuide {
|
|
207
|
+
The2016 = "2016",
|
|
208
|
+
The2025 = "2025"
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* The type of stylesheet files to be created for components in the application.
|
|
212
|
+
*
|
|
213
|
+
* The type of stylesheet files to be created for components in the initial project.
|
|
214
|
+
*/
|
|
215
|
+
export declare enum SchematicsAngularApplicationStyle {
|
|
216
|
+
Css = "css",
|
|
217
|
+
Less = "less",
|
|
218
|
+
Sass = "sass",
|
|
219
|
+
Scss = "scss",
|
|
220
|
+
Tailwind = "tailwind"
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* The unit testing runner to use.
|
|
224
|
+
*/
|
|
225
|
+
export declare enum TestRunner {
|
|
226
|
+
Karma = "karma",
|
|
227
|
+
Vitest = "vitest"
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Sets the view encapsulation mode for the application's components. This determines how
|
|
231
|
+
* component styles are scoped and applied.
|
|
232
|
+
*
|
|
233
|
+
* Sets the view encapsulation mode for the component. This determines how the component's
|
|
234
|
+
* styles are scoped and applied.
|
|
235
|
+
*
|
|
236
|
+
* Sets the view encapsulation mode for components in the initial project. This determines
|
|
237
|
+
* how component styles are scoped and applied. Options include: `Emulated` (default, styles
|
|
238
|
+
* are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
|
|
239
|
+
* encapsulated using Shadow DOM).
|
|
240
|
+
*/
|
|
241
|
+
export declare enum ViewEncapsulation {
|
|
242
|
+
Emulated = "Emulated",
|
|
243
|
+
None = "None",
|
|
244
|
+
ShadowDom = "ShadowDom"
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Creates a new class in your project. Classes are the fundamental building blocks for
|
|
248
|
+
* object-oriented programming in TypeScript. They provide a blueprint for creating objects
|
|
249
|
+
* with properties and methods. This schematic helps you generate a new class with the basic
|
|
250
|
+
* structure and optional test files.
|
|
251
|
+
*/
|
|
252
|
+
export type AngularClassOptionsSchema = {
|
|
253
|
+
/**
|
|
254
|
+
* The name for the new class. This will be used to create the class file (e.g.,
|
|
255
|
+
* `my-class.ts`) and, if enabled, the corresponding test file `my-class.spec.ts`.
|
|
256
|
+
*/
|
|
257
|
+
name: string;
|
|
258
|
+
/**
|
|
259
|
+
* The path where the class file should be created, relative to the workspace root. If not
|
|
260
|
+
* specified, the class will be created in the current directory.
|
|
261
|
+
*/
|
|
262
|
+
path?: string;
|
|
263
|
+
/**
|
|
264
|
+
* The name of the project where the class should be added. If not specified, the CLI will
|
|
265
|
+
* determine the project from the current directory.
|
|
266
|
+
*/
|
|
267
|
+
project: string;
|
|
268
|
+
/**
|
|
269
|
+
* Skip the generation of a unit test file `spec.ts` for the new class.
|
|
270
|
+
*/
|
|
271
|
+
skipTests?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Adds a custom type to the filename, allowing you to create more descriptive class names.
|
|
274
|
+
* For example, if you set the type to `helper`, the filename will be `my-class.helper.ts`.
|
|
275
|
+
*/
|
|
276
|
+
type?: string;
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Creates a new Angular component. Components are the basic building blocks of Angular
|
|
280
|
+
* applications. Each component consists of a TypeScript class, an HTML template, and an
|
|
281
|
+
* optional CSS stylesheet. Use this schematic to generate a new component in your project.
|
|
282
|
+
*/
|
|
283
|
+
export type AngularComponentOptionsSchema = {
|
|
284
|
+
/**
|
|
285
|
+
* When true, the 'type' option will be appended to the generated class name. When false,
|
|
286
|
+
* only the file name will include the type.
|
|
287
|
+
*/
|
|
288
|
+
addTypeToClassName?: boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Configures the change detection strategy for the component.
|
|
291
|
+
*/
|
|
292
|
+
changeDetection?: ChangeDetection;
|
|
293
|
+
/**
|
|
294
|
+
* Adds `:host { display: block; }` to the component's stylesheet, ensuring the component
|
|
295
|
+
* renders as a block-level element. This is useful for layout purposes.
|
|
296
|
+
*/
|
|
297
|
+
displayBlock?: boolean;
|
|
298
|
+
/**
|
|
299
|
+
* Automatically export the component from the specified NgModule, making it accessible to
|
|
300
|
+
* other modules in the application.
|
|
301
|
+
*/
|
|
302
|
+
export?: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* Use a default export for the component in its TypeScript file instead of a named export.
|
|
305
|
+
*/
|
|
306
|
+
exportDefault?: boolean;
|
|
307
|
+
/**
|
|
308
|
+
* Create the component files directly in the project's `src/app` directory instead of
|
|
309
|
+
* creating a new folder for them.
|
|
310
|
+
*/
|
|
311
|
+
flat?: boolean;
|
|
312
|
+
/**
|
|
313
|
+
* Include the component's styles directly in the `component.ts` file. By default, a
|
|
314
|
+
* separate stylesheet file (e.g., `my-component.css`) is created.
|
|
315
|
+
*/
|
|
316
|
+
inlineStyle?: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Include the component's HTML template directly in the `component.ts` file. By default, a
|
|
319
|
+
* separate template file (e.g., `my-component.html`) is created.
|
|
320
|
+
*/
|
|
321
|
+
inlineTemplate?: boolean;
|
|
322
|
+
/**
|
|
323
|
+
* Specify the NgModule where the component should be declared. If not provided, the CLI
|
|
324
|
+
* will attempt to find the closest NgModule in the component's path.
|
|
325
|
+
*/
|
|
326
|
+
module?: string;
|
|
327
|
+
/**
|
|
328
|
+
* The name for the new component. This will be used to create the component's class,
|
|
329
|
+
* template, and stylesheet files. For example, if you provide `my-component`, the files
|
|
330
|
+
* will be named `my-component.ts`, `my-component.html`, and `my-component.css`.
|
|
331
|
+
*/
|
|
332
|
+
name: string;
|
|
333
|
+
/**
|
|
334
|
+
* Generate component template files with an '.ng.html' file extension instead of '.html'.
|
|
335
|
+
*/
|
|
336
|
+
ngHtml?: boolean;
|
|
337
|
+
/**
|
|
338
|
+
* The path where the component files should be created, relative to the current workspace.
|
|
339
|
+
* If not provided, a folder with the same name as the component will be created in the
|
|
340
|
+
* project's `src/app` directory.
|
|
341
|
+
*/
|
|
342
|
+
path?: string;
|
|
343
|
+
/**
|
|
344
|
+
* A prefix to be added to the component's selector. For example, if the prefix is `app` and
|
|
345
|
+
* the component name is `my-component`, the selector will be `app-my-component`.
|
|
346
|
+
*/
|
|
347
|
+
prefix?: string;
|
|
348
|
+
/**
|
|
349
|
+
* The name of the project where the component should be added. If not specified, the CLI
|
|
350
|
+
* will determine the project from the current directory.
|
|
351
|
+
*/
|
|
352
|
+
project: string;
|
|
353
|
+
/**
|
|
354
|
+
* The HTML selector to use for this component. If not provided, a selector will be
|
|
355
|
+
* generated based on the component name (e.g., `app-my-component`).
|
|
356
|
+
*/
|
|
357
|
+
selector?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Do not automatically import the new component into its closest NgModule.
|
|
360
|
+
*/
|
|
361
|
+
skipImport?: boolean;
|
|
362
|
+
/**
|
|
363
|
+
* Skip the generation of an HTML selector for the component.
|
|
364
|
+
*/
|
|
365
|
+
skipSelector?: boolean;
|
|
366
|
+
/**
|
|
367
|
+
* Skip the generation of unit test files `spec.ts`.
|
|
368
|
+
*/
|
|
369
|
+
skipTests?: boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Generate a standalone component. Standalone components are self-contained and don't need
|
|
372
|
+
* to be declared in an NgModule. They can be used independently or imported directly into
|
|
373
|
+
* other standalone components.
|
|
374
|
+
*/
|
|
375
|
+
standalone?: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* Specify the type of stylesheet to be created for the component, or `none` to skip
|
|
378
|
+
* creating a stylesheet.
|
|
379
|
+
*/
|
|
380
|
+
style?: SchematicsAngularComponentStyle;
|
|
381
|
+
/**
|
|
382
|
+
* Append a custom type to the component's filename. For example, if you set the type to
|
|
383
|
+
* `container`, the file will be named `my-component.container.ts`.
|
|
384
|
+
*/
|
|
385
|
+
type?: string;
|
|
386
|
+
/**
|
|
387
|
+
* Sets the view encapsulation mode for the component. This determines how the component's
|
|
388
|
+
* styles are scoped and applied.
|
|
389
|
+
*/
|
|
390
|
+
viewEncapsulation?: ViewEncapsulation;
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* Configures the change detection strategy for the component.
|
|
394
|
+
*/
|
|
395
|
+
export declare enum ChangeDetection {
|
|
396
|
+
Default = "Default",
|
|
397
|
+
OnPush = "OnPush"
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Specify the type of stylesheet to be created for the component, or `none` to skip
|
|
401
|
+
* creating a stylesheet.
|
|
402
|
+
*/
|
|
403
|
+
export declare enum SchematicsAngularComponentStyle {
|
|
404
|
+
Css = "css",
|
|
405
|
+
Less = "less",
|
|
406
|
+
None = "none",
|
|
407
|
+
Sass = "sass",
|
|
408
|
+
Scss = "scss"
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Creates a new directive in your project. Directives are used to extend the behavior or
|
|
412
|
+
* appearance of HTML elements and components. They allow you to manipulate the DOM, add
|
|
413
|
+
* custom attributes, and respond to events. This schematic generates the necessary files
|
|
414
|
+
* and boilerplate code for a new directive.
|
|
415
|
+
*/
|
|
416
|
+
export type AngularDirectiveOptionsSchema = {
|
|
417
|
+
/**
|
|
418
|
+
* When true, the 'type' option will be appended to the generated class name. When false,
|
|
419
|
+
* only the file name will include the type.
|
|
420
|
+
*/
|
|
421
|
+
addTypeToClassName?: boolean;
|
|
422
|
+
/**
|
|
423
|
+
* Automatically export the directive from the specified NgModule, making it accessible to
|
|
424
|
+
* other modules in the application.
|
|
425
|
+
*/
|
|
426
|
+
export?: boolean;
|
|
427
|
+
/**
|
|
428
|
+
* Creates the new directive files at the top level of the current project. If set to false,
|
|
429
|
+
* a new folder with the directive's name will be created to contain the files.
|
|
430
|
+
*/
|
|
431
|
+
flat?: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* Specify the NgModule where the directive should be declared. If not provided, the CLI
|
|
434
|
+
* will attempt to find the closest NgModule in the directive's path.
|
|
435
|
+
*/
|
|
436
|
+
module?: string;
|
|
437
|
+
/**
|
|
438
|
+
* The name for the new directive. This will be used to create the directive's class and
|
|
439
|
+
* spec files (e.g., `my-directive.directive.ts` and `my-directive.directive.spec.ts`).
|
|
440
|
+
*/
|
|
441
|
+
name: string;
|
|
442
|
+
/**
|
|
443
|
+
* The path where the directive files should be created, relative to the workspace root. If
|
|
444
|
+
* not provided, the directive will be created in the current directory.
|
|
445
|
+
*/
|
|
446
|
+
path?: string;
|
|
447
|
+
/**
|
|
448
|
+
* A prefix to be added to the directive's selector. For example, if the prefix is `app` and
|
|
449
|
+
* the directive name is `highlight`, the selector will be `appHighlight`.
|
|
450
|
+
*/
|
|
451
|
+
prefix?: string;
|
|
452
|
+
/**
|
|
453
|
+
* The name of the project where the directive should be added. If not specified, the CLI
|
|
454
|
+
* will determine the project from the current directory.
|
|
455
|
+
*/
|
|
456
|
+
project: string;
|
|
457
|
+
/**
|
|
458
|
+
* The HTML selector to use for this directive. If not provided, a selector will be
|
|
459
|
+
* generated based on the directive's name (e.g., `appHighlight`).
|
|
460
|
+
*/
|
|
461
|
+
selector?: string;
|
|
462
|
+
/**
|
|
463
|
+
* Do not automatically import the new directive into its closest NgModule.
|
|
464
|
+
*/
|
|
465
|
+
skipImport?: boolean;
|
|
466
|
+
/**
|
|
467
|
+
* Skip the generation of a unit test file `spec.ts` for the new directive.
|
|
468
|
+
*/
|
|
469
|
+
skipTests?: boolean;
|
|
470
|
+
/**
|
|
471
|
+
* Generate a standalone directive. Standalone directives are self-contained and don't need
|
|
472
|
+
* to be declared in an NgModule. They can be used independently or imported directly into
|
|
473
|
+
* other standalone components or directives.
|
|
474
|
+
*/
|
|
475
|
+
standalone?: boolean;
|
|
476
|
+
/**
|
|
477
|
+
* Append a custom type to the directive's filename. For example, if you set the type to
|
|
478
|
+
* `directive`, the file will be named `example.directive.ts`.
|
|
479
|
+
*/
|
|
480
|
+
type?: string;
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* Creates a new enum in your project. Enums (enumerations) are a way to define a set of
|
|
484
|
+
* named constants, making your code more readable and maintainable. This schematic
|
|
485
|
+
* generates a new enum with the specified name and type.
|
|
486
|
+
*/
|
|
487
|
+
export type AngularEnumOptionsSchema = {
|
|
488
|
+
/**
|
|
489
|
+
* The name for the new enum. This will be used to create the enum file (e.g.,
|
|
490
|
+
* `my-enum.enum.ts`).
|
|
491
|
+
*/
|
|
492
|
+
name: string;
|
|
493
|
+
/**
|
|
494
|
+
* The path where the enum file should be created, relative to the current workspace. If not
|
|
495
|
+
* specified, the enum will be created in the current directory.
|
|
496
|
+
*/
|
|
497
|
+
path?: string;
|
|
498
|
+
/**
|
|
499
|
+
* The name of the project where the enum should be created. If not specified, the CLI will
|
|
500
|
+
* determine the project from the current directory.
|
|
501
|
+
*/
|
|
502
|
+
project: string;
|
|
503
|
+
/**
|
|
504
|
+
* Adds a custom type to the filename, allowing you to create more descriptive enum names.
|
|
505
|
+
* For example, if you set the type to `status`, the filename will be `my-enum.status.ts`.
|
|
506
|
+
*/
|
|
507
|
+
type?: string;
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* Creates a new route guard in your project. Route guards are used to control access to
|
|
511
|
+
* parts of your application by checking certain conditions before a route is activated.
|
|
512
|
+
* This schematic generates a new guard with the specified name, type, and options.
|
|
513
|
+
*/
|
|
514
|
+
export type AngularGuardOptionsSchema = {
|
|
515
|
+
/**
|
|
516
|
+
* Creates the new guard files at the top level of the current project. If set to false, a
|
|
517
|
+
* new folder with the guard's name will be created to contain the files.
|
|
518
|
+
*/
|
|
519
|
+
flat?: boolean;
|
|
520
|
+
/**
|
|
521
|
+
* Generate the guard as a function instead of a class. Functional guards can be simpler for
|
|
522
|
+
* basic scenarios.
|
|
523
|
+
*/
|
|
524
|
+
functional?: boolean;
|
|
525
|
+
/**
|
|
526
|
+
* Specifies the type(s) of guard to create. You can choose one or more of the following:
|
|
527
|
+
* `CanActivate` (controls access to a route), `CanActivateChild` (controls access to child
|
|
528
|
+
* routes), `CanDeactivate` (asks for confirmation before leaving a route), `CanMatch`
|
|
529
|
+
* (determines if a route can be matched).
|
|
530
|
+
*/
|
|
531
|
+
implements?: Implement[];
|
|
532
|
+
/**
|
|
533
|
+
* The name for the new route guard. This will be used to create the guard's class and spec
|
|
534
|
+
* files (e.g., `my-guard.guard.ts` and `my-guard.guard.spec.ts`).
|
|
535
|
+
*/
|
|
536
|
+
name: string;
|
|
537
|
+
/**
|
|
538
|
+
* The path where the guard files should be created, relative to the current workspace. If
|
|
539
|
+
* not provided, the guard will be created in the current directory.
|
|
540
|
+
*/
|
|
541
|
+
path?: string;
|
|
542
|
+
/**
|
|
543
|
+
* The name of the project where the guard should be created. If not specified, the CLI will
|
|
544
|
+
* determine the project from the current directory.
|
|
545
|
+
*/
|
|
546
|
+
project: string;
|
|
547
|
+
/**
|
|
548
|
+
* Skip the generation of a unit test file `spec.ts` for the new guard.
|
|
549
|
+
*/
|
|
550
|
+
skipTests?: boolean;
|
|
551
|
+
/**
|
|
552
|
+
* The separator character to use before the type within the generated file's name. For
|
|
553
|
+
* example, if you set the option to `.`, the file will be named `example.guard.ts`.
|
|
554
|
+
*/
|
|
555
|
+
typeSeparator?: TypeSeparator;
|
|
556
|
+
};
|
|
557
|
+
export declare enum Implement {
|
|
558
|
+
CanActivate = "CanActivate",
|
|
559
|
+
CanActivateChild = "CanActivateChild",
|
|
560
|
+
CanDeactivate = "CanDeactivate",
|
|
561
|
+
CanMatch = "CanMatch"
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* The separator character to use before the type within the generated file's name. For
|
|
565
|
+
* example, if you set the option to `.`, the file will be named `example.guard.ts`.
|
|
566
|
+
*
|
|
567
|
+
* The separator character to use before the type within the generated file's name. For
|
|
568
|
+
* example, if you set the option to `.`, the file will be named `example.interceptor.ts`.
|
|
569
|
+
*
|
|
570
|
+
* The separator character to use before the type within the generated file's name. For
|
|
571
|
+
* example, if you set the option to `.`, the file will be named `example.pipe.ts`.
|
|
572
|
+
*
|
|
573
|
+
* The separator character to use before the type within the generated file's name. For
|
|
574
|
+
* example, if you set the option to `.`, the file will be named `example.resolver.ts`.
|
|
575
|
+
*/
|
|
576
|
+
export declare enum TypeSeparator {
|
|
577
|
+
Empty = "-",
|
|
578
|
+
TypeSeparator = "."
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Creates a new interceptor in your project. Interceptors are used to intercept and modify
|
|
582
|
+
* HTTP requests and responses before they reach their destination. This allows you to
|
|
583
|
+
* perform tasks like adding authentication headers, handling errors, or logging requests.
|
|
584
|
+
* This schematic generates the necessary files and boilerplate code for a new interceptor.
|
|
585
|
+
*/
|
|
586
|
+
export type AngularInterceptorOptionsSchema = {
|
|
587
|
+
/**
|
|
588
|
+
* Creates the new interceptor files at the top level of the current project. If set to
|
|
589
|
+
* false, a new folder with the interceptor's name will be created to contain the files.
|
|
590
|
+
*/
|
|
591
|
+
flat?: boolean;
|
|
592
|
+
/**
|
|
593
|
+
* Creates the interceptor as a function `HttpInterceptorFn` instead of a class. Functional
|
|
594
|
+
* interceptors can be simpler for basic scenarios.
|
|
595
|
+
*/
|
|
596
|
+
functional?: boolean;
|
|
597
|
+
/**
|
|
598
|
+
* The name for the new interceptor. This will be used to create the interceptor's class and
|
|
599
|
+
* spec files (e.g., `my-interceptor.interceptor.ts` and
|
|
600
|
+
* `my-interceptor.interceptor.spec.ts`).
|
|
601
|
+
*/
|
|
602
|
+
name: string;
|
|
603
|
+
/**
|
|
604
|
+
* The path where the interceptor files should be created, relative to the workspace root.
|
|
605
|
+
* If not provided, the interceptor will be created in the current directory.
|
|
606
|
+
*/
|
|
607
|
+
path?: string;
|
|
608
|
+
/**
|
|
609
|
+
* The name of the project where the interceptor should be created. If not specified, the
|
|
610
|
+
* CLI will determine the project from the current directory.
|
|
611
|
+
*/
|
|
612
|
+
project: string;
|
|
613
|
+
/**
|
|
614
|
+
* Skip the generation of a unit test file `spec.ts` for the new interceptor.
|
|
615
|
+
*/
|
|
616
|
+
skipTests?: boolean;
|
|
617
|
+
/**
|
|
618
|
+
* The separator character to use before the type within the generated file's name. For
|
|
619
|
+
* example, if you set the option to `.`, the file will be named `example.interceptor.ts`.
|
|
620
|
+
*/
|
|
621
|
+
typeSeparator?: TypeSeparator;
|
|
622
|
+
};
|
|
623
|
+
/**
|
|
624
|
+
* Creates a new interface in your project. Interfaces define the structure of objects in
|
|
625
|
+
* TypeScript, ensuring type safety and code clarity. This schematic generates a new
|
|
626
|
+
* interface with the specified name and type.
|
|
627
|
+
*/
|
|
628
|
+
export type AngularInterfaceOptionsSchema = {
|
|
629
|
+
/**
|
|
630
|
+
* The name for the new interface. This will be used to create the interface file (e.g.,
|
|
631
|
+
* `my-interface.interface.ts`).
|
|
632
|
+
*/
|
|
633
|
+
name: string;
|
|
634
|
+
/**
|
|
635
|
+
* The path where the interface file should be created, relative to the workspace root. If
|
|
636
|
+
* not provided, the interface will be created in the current directory.
|
|
637
|
+
*/
|
|
638
|
+
path?: string;
|
|
639
|
+
/**
|
|
640
|
+
* A prefix to be added to the interface name. This is typically not used for interfaces, as
|
|
641
|
+
* they don't have selectors like components or directives.
|
|
642
|
+
*/
|
|
643
|
+
prefix?: string;
|
|
644
|
+
/**
|
|
645
|
+
* The name of the project where the interface should be created. If not specified, the CLI
|
|
646
|
+
* will determine the project from the current directory.
|
|
647
|
+
*/
|
|
648
|
+
project: string;
|
|
649
|
+
/**
|
|
650
|
+
* Adds a custom type to the filename, allowing you to create more descriptive interface
|
|
651
|
+
* names. For example, if you set the type to `data`, the filename will be
|
|
652
|
+
* `my-interface.data.ts`.
|
|
653
|
+
*/
|
|
654
|
+
type?: string;
|
|
655
|
+
};
|
|
656
|
+
/**
|
|
657
|
+
* Creates a new library project in your Angular workspace. Libraries are reusable
|
|
658
|
+
* collections of components, services, and other Angular artifacts that can be shared
|
|
659
|
+
* across multiple applications. This schematic simplifies the process of generating a new
|
|
660
|
+
* library with the necessary files and configurations.
|
|
661
|
+
*/
|
|
662
|
+
export type LibraryOptionsSchema = {
|
|
663
|
+
/**
|
|
664
|
+
* The path to the library's public API file, relative to the workspace root. This file
|
|
665
|
+
* defines what parts of the library are accessible to applications that import it.
|
|
666
|
+
*/
|
|
667
|
+
entryFile?: string;
|
|
668
|
+
/**
|
|
669
|
+
* The name for the new library. This name will be used for the project directory and
|
|
670
|
+
* various identifiers within the library's code.
|
|
671
|
+
*/
|
|
672
|
+
name: string;
|
|
673
|
+
/**
|
|
674
|
+
* A prefix to be added to the selectors of components generated within this library. For
|
|
675
|
+
* example, if the prefix is `my-lib` and you generate a component named `my-component`, the
|
|
676
|
+
* selector will be `my-lib-my-component`.
|
|
677
|
+
*/
|
|
678
|
+
prefix?: string;
|
|
679
|
+
/**
|
|
680
|
+
* The root directory for the new library, relative to the workspace root. If not specified,
|
|
681
|
+
* the library will be created in a subfolder within the `projects` directory, using the
|
|
682
|
+
* library's name.
|
|
683
|
+
*/
|
|
684
|
+
projectRoot?: string;
|
|
685
|
+
/**
|
|
686
|
+
* Skip the automatic installation of packages. You will need to manually install the
|
|
687
|
+
* dependencies later.
|
|
688
|
+
*/
|
|
689
|
+
skipInstall?: boolean;
|
|
690
|
+
/**
|
|
691
|
+
* Do not automatically add dependencies to the `package.json` file.
|
|
692
|
+
*/
|
|
693
|
+
skipPackageJson?: boolean;
|
|
694
|
+
/**
|
|
695
|
+
* Do not update the workspace `tsconfig.json` file to add a path mapping for the new
|
|
696
|
+
* library. The path mapping is needed to use the library in an application, but can be
|
|
697
|
+
* disabled here to simplify development.
|
|
698
|
+
*/
|
|
699
|
+
skipTsConfig?: boolean;
|
|
700
|
+
/**
|
|
701
|
+
* Create a library that utilizes the standalone API, eliminating the need for NgModules.
|
|
702
|
+
* This can simplify the structure of your library and its usage in applications.
|
|
703
|
+
*/
|
|
704
|
+
standalone?: boolean;
|
|
705
|
+
/**
|
|
706
|
+
* The unit testing runner to use.
|
|
707
|
+
*/
|
|
708
|
+
testRunner?: TestRunner;
|
|
709
|
+
};
|
|
710
|
+
/**
|
|
711
|
+
* Creates a new Angular workspace and an initial project. This schematic sets up the
|
|
712
|
+
* foundation for your Angular development, generating the workspace configuration files and
|
|
713
|
+
* an optional starter application. You can customize various aspects of the workspace and
|
|
714
|
+
* the initial project, such as routing, styling, and testing.
|
|
715
|
+
*/
|
|
716
|
+
export type AngularNgNewOptionsSchema = {
|
|
717
|
+
/**
|
|
718
|
+
* Specifies which AI tools to generate configuration files for. These file are used to
|
|
719
|
+
* improve the outputs of AI tools by following the best practices.
|
|
720
|
+
*/
|
|
721
|
+
aiConfig?: AiConfig[];
|
|
722
|
+
/**
|
|
723
|
+
* Configure the initial Git commit for the new repository.
|
|
724
|
+
*/
|
|
725
|
+
commit?: CommitUnion;
|
|
726
|
+
/**
|
|
727
|
+
* Create a new initial application project in the new workspace. When false, creates an
|
|
728
|
+
* empty workspace with no initial application. You can then use the `ng generate
|
|
729
|
+
* application` command to create applications in the `projects` directory.
|
|
730
|
+
*/
|
|
731
|
+
createApplication?: boolean;
|
|
732
|
+
/**
|
|
733
|
+
* The directory where the new workspace and project should be created. If not specified,
|
|
734
|
+
* the workspace will be created in the current directory.
|
|
735
|
+
*/
|
|
736
|
+
directory?: string;
|
|
737
|
+
/**
|
|
738
|
+
* The file naming convention to use for generated files. The '2025' style guide (default)
|
|
739
|
+
* uses a concise format (e.g., `app.ts` for the root component), while the '2016' style
|
|
740
|
+
* guide includes the type in the file name (e.g., `app.component.ts`). For more
|
|
741
|
+
* information, see the Angular Style Guide (https://angular.dev/style-guide).
|
|
742
|
+
*/
|
|
743
|
+
fileNameStyleGuide?: FileNameStyleGuide;
|
|
744
|
+
/**
|
|
745
|
+
* Include the styles for the initial application's root component directly within the
|
|
746
|
+
* `app.component.ts` file. By default, a separate stylesheet file (e.g.,
|
|
747
|
+
* `app.component.css`) is created.
|
|
748
|
+
*/
|
|
749
|
+
inlineStyle?: boolean;
|
|
750
|
+
/**
|
|
751
|
+
* Include the HTML template for the initial application's root component directly within
|
|
752
|
+
* the `app.component.ts` file. By default, a separate template file (e.g.,
|
|
753
|
+
* `app.component.html`) is created.
|
|
754
|
+
*/
|
|
755
|
+
inlineTemplate?: boolean;
|
|
756
|
+
/**
|
|
757
|
+
* Generate a minimal Angular workspace without any testing frameworks. This is intended for
|
|
758
|
+
* learning purposes and simple experimentation, not for production applications.
|
|
759
|
+
*/
|
|
760
|
+
minimal?: boolean;
|
|
761
|
+
/**
|
|
762
|
+
* The name for the new workspace and the initial project. This name will be used for the
|
|
763
|
+
* root directory and various identifiers throughout the project.
|
|
764
|
+
*/
|
|
765
|
+
name: string;
|
|
766
|
+
/**
|
|
767
|
+
* The path where new projects will be created within the workspace, relative to the
|
|
768
|
+
* workspace root. By default, new projects are created in the `projects` directory.
|
|
769
|
+
*/
|
|
770
|
+
newProjectRoot?: string;
|
|
771
|
+
/**
|
|
772
|
+
* The package manager used to install dependencies.
|
|
773
|
+
*/
|
|
774
|
+
packageManager?: PackageManager;
|
|
775
|
+
/**
|
|
776
|
+
* The prefix to apply to generated selectors for the initial project. For example, if the
|
|
777
|
+
* prefix is `my-app` and you generate a component named `my-component`, the selector will
|
|
778
|
+
* be `my-app-my-component`.
|
|
779
|
+
*/
|
|
780
|
+
prefix?: string;
|
|
781
|
+
/**
|
|
782
|
+
* Enable routing in the initial application project. This sets up the necessary files and
|
|
783
|
+
* modules for managing navigation between different views in your application.
|
|
784
|
+
*/
|
|
785
|
+
routing?: boolean;
|
|
786
|
+
/**
|
|
787
|
+
* Do not initialize a Git repository in the new workspace. By default, a Git repository is
|
|
788
|
+
* initialized to help you track changes to your project.
|
|
789
|
+
*/
|
|
790
|
+
skipGit?: boolean;
|
|
791
|
+
/**
|
|
792
|
+
* Skip the automatic installation of packages. You will need to manually install the
|
|
793
|
+
* dependencies later.
|
|
794
|
+
*/
|
|
795
|
+
skipInstall?: boolean;
|
|
796
|
+
/**
|
|
797
|
+
* Skip the generation of unit test files `spec.ts`.
|
|
798
|
+
*/
|
|
799
|
+
skipTests?: boolean;
|
|
800
|
+
/**
|
|
801
|
+
* Configure the initial application for Server-Side Rendering (SSR) and Static Site
|
|
802
|
+
* Generation (SSG/Prerendering).
|
|
803
|
+
*/
|
|
804
|
+
ssr?: boolean;
|
|
805
|
+
/**
|
|
806
|
+
* Creates an application based upon the standalone API, without NgModules.
|
|
807
|
+
*/
|
|
808
|
+
standalone?: boolean;
|
|
809
|
+
/**
|
|
810
|
+
* Enable stricter type checking and stricter bundle budgets settings. This setting helps
|
|
811
|
+
* improve maintainability and catch bugs ahead of time. For more information, see
|
|
812
|
+
* https://angular.dev/tools/cli/template-typecheck#strict-mode
|
|
813
|
+
*/
|
|
814
|
+
strict?: boolean;
|
|
815
|
+
/**
|
|
816
|
+
* The type of stylesheet files to be created for components in the initial project.
|
|
817
|
+
*/
|
|
818
|
+
style?: SchematicsAngularApplicationStyle;
|
|
819
|
+
/**
|
|
820
|
+
* The unit testing runner to use.
|
|
821
|
+
*/
|
|
822
|
+
testRunner?: TestRunner;
|
|
823
|
+
/**
|
|
824
|
+
* The version of the Angular CLI to use.
|
|
825
|
+
*/
|
|
826
|
+
version: string;
|
|
827
|
+
/**
|
|
828
|
+
* Sets the view encapsulation mode for components in the initial project. This determines
|
|
829
|
+
* how component styles are scoped and applied. Options include: `Emulated` (default, styles
|
|
830
|
+
* are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
|
|
831
|
+
* encapsulated using Shadow DOM).
|
|
832
|
+
*/
|
|
833
|
+
viewEncapsulation?: ViewEncapsulation;
|
|
834
|
+
/**
|
|
835
|
+
* Create an initial application that does not utilize `zone.js`.
|
|
836
|
+
*/
|
|
837
|
+
zoneless?: boolean;
|
|
838
|
+
};
|
|
839
|
+
export declare enum AiConfig {
|
|
840
|
+
Agents = "agents",
|
|
841
|
+
Claude = "claude",
|
|
842
|
+
Copilot = "copilot",
|
|
843
|
+
Cursor = "cursor",
|
|
844
|
+
Gemini = "gemini",
|
|
845
|
+
Jetbrains = "jetbrains",
|
|
846
|
+
None = "none",
|
|
847
|
+
Windsurf = "windsurf"
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* Configure the initial Git commit for the new repository.
|
|
851
|
+
*/
|
|
852
|
+
export type CommitUnion = boolean | CommitObject;
|
|
853
|
+
export type CommitObject = {
|
|
854
|
+
email: string;
|
|
855
|
+
message?: string;
|
|
856
|
+
name: string;
|
|
857
|
+
[property: string]: any;
|
|
858
|
+
};
|
|
859
|
+
/**
|
|
860
|
+
* Creates a new pipe in your project. Pipes are used to transform data for display in
|
|
861
|
+
* templates. They take input values and apply a specific transformation, such as formatting
|
|
862
|
+
* dates, currency, or filtering arrays. This schematic generates the necessary files and
|
|
863
|
+
* boilerplate code for a new pipe.
|
|
864
|
+
*/
|
|
865
|
+
export type AngularPipeOptionsSchema = {
|
|
866
|
+
/**
|
|
867
|
+
* Automatically export the pipe from the specified NgModule, making it accessible to other
|
|
868
|
+
* modules in the application.
|
|
869
|
+
*/
|
|
870
|
+
export?: boolean;
|
|
871
|
+
/**
|
|
872
|
+
* Creates the new pipe files at the top level of the current project. If set to false, a
|
|
873
|
+
* new folder with the pipe's name will be created to contain the files.
|
|
874
|
+
*/
|
|
875
|
+
flat?: boolean;
|
|
876
|
+
/**
|
|
877
|
+
* Specify the NgModule where the pipe should be declared. If not provided, the CLI will
|
|
878
|
+
* attempt to find the closest NgModule in the pipe's path.
|
|
879
|
+
*/
|
|
880
|
+
module?: string;
|
|
881
|
+
/**
|
|
882
|
+
* The name for the new pipe. This will be used to create the pipe's class and spec files
|
|
883
|
+
* (e.g., `my-pipe.pipe.ts` and `my-pipe.pipe.spec.ts`).
|
|
884
|
+
*/
|
|
885
|
+
name: string;
|
|
886
|
+
/**
|
|
887
|
+
* The path where the pipe files should be created, relative to the workspace root. If not
|
|
888
|
+
* provided, the pipe will be created in the current directory.
|
|
889
|
+
*/
|
|
890
|
+
path?: string;
|
|
891
|
+
/**
|
|
892
|
+
* The name of the project where the pipe should be created. If not specified, the CLI will
|
|
893
|
+
* determine the project from the current directory.
|
|
894
|
+
*/
|
|
895
|
+
project: string;
|
|
896
|
+
/**
|
|
897
|
+
* Do not automatically import the new pipe into its closest NgModule.
|
|
898
|
+
*/
|
|
899
|
+
skipImport?: boolean;
|
|
900
|
+
/**
|
|
901
|
+
* Prevent the generation of a unit test file `spec.ts` for the new pipe.
|
|
902
|
+
*/
|
|
903
|
+
skipTests?: boolean;
|
|
904
|
+
/**
|
|
905
|
+
* Generate a standalone pipe. Standalone pipes are self-contained and don't need to be
|
|
906
|
+
* declared in an NgModule. They can be used independently or imported directly into other
|
|
907
|
+
* standalone components, directives, or pipes.
|
|
908
|
+
*/
|
|
909
|
+
standalone?: boolean;
|
|
910
|
+
/**
|
|
911
|
+
* The separator character to use before the type within the generated file's name. For
|
|
912
|
+
* example, if you set the option to `.`, the file will be named `example.pipe.ts`.
|
|
913
|
+
*/
|
|
914
|
+
typeSeparator?: TypeSeparator;
|
|
915
|
+
};
|
|
916
|
+
/**
|
|
917
|
+
* Creates a new resolver in your project. Resolvers are used to pre-fetch data before a
|
|
918
|
+
* route is activated, ensuring that the necessary data is available before the component is
|
|
919
|
+
* displayed. This can improve the user experience by preventing delays and loading states.
|
|
920
|
+
* This schematic generates a new resolver with the specified name and options.
|
|
921
|
+
*/
|
|
922
|
+
export type AngularResolverOptionsSchema = {
|
|
923
|
+
/**
|
|
924
|
+
* Creates the new resolver files at the top level of the current project. If set to false,
|
|
925
|
+
* a new folder with the resolver's name will be created to contain the files.
|
|
926
|
+
*/
|
|
927
|
+
flat?: boolean;
|
|
928
|
+
/**
|
|
929
|
+
* Creates the resolver as a function `ResolveFn` instead of a class. Functional resolvers
|
|
930
|
+
* can be simpler for basic scenarios.
|
|
931
|
+
*/
|
|
932
|
+
functional?: boolean;
|
|
933
|
+
/**
|
|
934
|
+
* The name for the new resolver. This will be used to create the resolver's class and spec
|
|
935
|
+
* files (e.g., `my-resolver.resolver.ts` and `my-resolver.resolver.spec.ts`).
|
|
936
|
+
*/
|
|
937
|
+
name: string;
|
|
938
|
+
/**
|
|
939
|
+
* The path where the resolver files should be created, relative to the current workspace.
|
|
940
|
+
* If not provided, the resolver will be created in the current directory.
|
|
941
|
+
*/
|
|
942
|
+
path?: string;
|
|
943
|
+
/**
|
|
944
|
+
* The name of the project where the resolver should be created. If not specified, the CLI
|
|
945
|
+
* will determine the project from the current directory.
|
|
946
|
+
*/
|
|
947
|
+
project: string;
|
|
948
|
+
/**
|
|
949
|
+
* Skip the generation of a unit test file `spec.ts` for the new resolver.
|
|
950
|
+
*/
|
|
951
|
+
skipTests?: boolean;
|
|
952
|
+
/**
|
|
953
|
+
* The separator character to use before the type within the generated file's name. For
|
|
954
|
+
* example, if you set the option to `.`, the file will be named `example.resolver.ts`.
|
|
955
|
+
*/
|
|
956
|
+
typeSeparator?: TypeSeparator;
|
|
957
|
+
};
|
|
958
|
+
/**
|
|
959
|
+
* Creates a new service in your project. Services are used to encapsulate reusable logic,
|
|
960
|
+
* such as data access, API calls, or utility functions. This schematic simplifies the
|
|
961
|
+
* process of generating a new service with the necessary files and boilerplate code.
|
|
962
|
+
*/
|
|
963
|
+
export type AngularServiceOptionsSchema = {
|
|
964
|
+
/**
|
|
965
|
+
* When true, the 'type' option will be appended to the generated class name. When false,
|
|
966
|
+
* only the file name will include the type.
|
|
967
|
+
*/
|
|
968
|
+
addTypeToClassName?: boolean;
|
|
969
|
+
/**
|
|
970
|
+
* Creates files at the top level of the project or the given path. If set to false, a new
|
|
971
|
+
* folder with the service's name will be created to contain the files.
|
|
972
|
+
*/
|
|
973
|
+
flat?: boolean;
|
|
974
|
+
/**
|
|
975
|
+
* The name for the new service. This will be used to create the service's class and spec
|
|
976
|
+
* files (e.g., `my-service.service.ts` and `my-service.service.spec.ts`).
|
|
977
|
+
*/
|
|
978
|
+
name: string;
|
|
979
|
+
/**
|
|
980
|
+
* The path where the service files should be created, relative to the workspace root. If
|
|
981
|
+
* not provided, the service will be created in the project's `src/app` directory.
|
|
982
|
+
*/
|
|
983
|
+
path?: string;
|
|
984
|
+
/**
|
|
985
|
+
* The name of the project where the service should be added. If not specified, the CLI will
|
|
986
|
+
* determine the project from the current directory.
|
|
987
|
+
*/
|
|
988
|
+
project: string;
|
|
989
|
+
/**
|
|
990
|
+
* Skip the generation of a unit test file `spec.ts` for the service.
|
|
991
|
+
*/
|
|
992
|
+
skipTests?: boolean;
|
|
993
|
+
/**
|
|
994
|
+
* Append a custom type to the service's filename. For example, if you set the type to
|
|
995
|
+
* `service`, the file will be named `my-service.service.ts`.
|
|
996
|
+
*/
|
|
997
|
+
type?: string;
|
|
998
|
+
};
|
|
999
|
+
/**
|
|
1000
|
+
* Creates a new web worker in your project. Web workers allow you to run JavaScript code in
|
|
1001
|
+
* the background, improving the performance and responsiveness of your application by
|
|
1002
|
+
* offloading computationally intensive tasks. This schematic generates the necessary files
|
|
1003
|
+
* for a new web worker and provides an optional code snippet to demonstrate its usage.
|
|
1004
|
+
*/
|
|
1005
|
+
export type AngularWebWorkerOptionsSchema = {
|
|
1006
|
+
/**
|
|
1007
|
+
* The name for the new web worker. This will be used to create the worker file (e.g.,
|
|
1008
|
+
* `my-worker.worker.ts`).
|
|
1009
|
+
*/
|
|
1010
|
+
name: string;
|
|
1011
|
+
/**
|
|
1012
|
+
* The path where the web worker file should be created, relative to the current workspace.
|
|
1013
|
+
* If not specified, the worker will be created in the current directory.
|
|
1014
|
+
*/
|
|
1015
|
+
path?: string;
|
|
1016
|
+
/**
|
|
1017
|
+
* The name of the project where the web worker should be created. If not specified, the CLI
|
|
1018
|
+
* will determine the project from the current directory.
|
|
1019
|
+
*/
|
|
1020
|
+
project: string;
|
|
1021
|
+
/**
|
|
1022
|
+
* Generate a code snippet that demonstrates how to create and use the new web worker.
|
|
1023
|
+
*/
|
|
1024
|
+
snippet?: boolean;
|
|
1025
|
+
};
|