@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,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.CacheEnableModule = exports.CacheDisableModule = void 0;
|
|
11
|
+
const command_module_1 = require("../../../command-builder/command-module");
|
|
12
|
+
const utilities_1 = require("../utilities");
|
|
13
|
+
class CacheDisableModule extends command_module_1.CommandModule {
|
|
14
|
+
command = 'disable';
|
|
15
|
+
aliases = 'off';
|
|
16
|
+
describe = 'Disables persistent disk cache for all projects in the workspace.';
|
|
17
|
+
longDescriptionPath;
|
|
18
|
+
scope = command_module_1.CommandScope.In;
|
|
19
|
+
builder(localYargs) {
|
|
20
|
+
return localYargs;
|
|
21
|
+
}
|
|
22
|
+
run() {
|
|
23
|
+
return (0, utilities_1.updateCacheConfig)(this.getWorkspaceOrThrow(), 'enabled', false);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.CacheDisableModule = CacheDisableModule;
|
|
27
|
+
class CacheEnableModule extends command_module_1.CommandModule {
|
|
28
|
+
command = 'enable';
|
|
29
|
+
aliases = 'on';
|
|
30
|
+
describe = 'Enables disk cache for all projects in the workspace.';
|
|
31
|
+
longDescriptionPath;
|
|
32
|
+
scope = command_module_1.CommandScope.In;
|
|
33
|
+
builder(localYargs) {
|
|
34
|
+
return localYargs;
|
|
35
|
+
}
|
|
36
|
+
run() {
|
|
37
|
+
return (0, utilities_1.updateCacheConfig)(this.getWorkspaceOrThrow(), 'enabled', true);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.CacheEnableModule = CacheEnableModule;
|
|
41
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["cli.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,4EAIiD;AACjD,4CAAiD;AAEjD,MAAa,kBAAmB,SAAQ,8BAAa;IACnD,OAAO,GAAG,SAAS,CAAC;IACpB,OAAO,GAAG,KAAK,CAAC;IAChB,QAAQ,GAAG,mEAAmE,CAAC;IAC/E,mBAAmB,CAAqB;IAC/B,KAAK,GAAG,6BAAY,CAAC,EAAE,CAAC;IAEjC,OAAO,CAAC,UAAgB;QACtB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,GAAG;QACD,OAAO,IAAA,6BAAiB,EAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACzE,CAAC;CACF;AAdD,gDAcC;AAED,MAAa,iBAAkB,SAAQ,8BAAa;IAClD,OAAO,GAAG,QAAQ,CAAC;IACnB,OAAO,GAAG,IAAI,CAAC;IACf,QAAQ,GAAG,uDAAuD,CAAC;IACnE,mBAAmB,CAAqB;IAC/B,KAAK,GAAG,6BAAY,CAAC,EAAE,CAAC;IAEjC,OAAO,CAAC,UAAgB;QACtB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,GAAG;QACD,OAAO,IAAA,6BAAiB,EAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;CACF;AAdD,8CAcC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { Cache } from '../../../lib/config/workspace-schema';
|
|
9
|
+
import { AngularWorkspace } from '../../utilities/config';
|
|
10
|
+
export declare function updateCacheConfig<K extends keyof Cache>(workspace: AngularWorkspace, key: K, value: Cache[K]): Promise<void>;
|
|
11
|
+
export declare function getCacheConfig(workspace: AngularWorkspace | undefined): Required<Cache>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.updateCacheConfig = updateCacheConfig;
|
|
11
|
+
exports.getCacheConfig = getCacheConfig;
|
|
12
|
+
const core_1 = require("@angular-devkit/core");
|
|
13
|
+
const node_path_1 = require("node:path");
|
|
14
|
+
const workspace_schema_1 = require("../../../lib/config/workspace-schema");
|
|
15
|
+
function updateCacheConfig(workspace, key, value) {
|
|
16
|
+
const cli = (workspace.extensions['cli'] ??= {});
|
|
17
|
+
const cache = (cli['cache'] ??= {});
|
|
18
|
+
cache[key] = value;
|
|
19
|
+
return workspace.save();
|
|
20
|
+
}
|
|
21
|
+
function getCacheConfig(workspace) {
|
|
22
|
+
if (!workspace) {
|
|
23
|
+
throw new Error(`Cannot retrieve cache configuration as workspace is not defined.`);
|
|
24
|
+
}
|
|
25
|
+
const defaultSettings = {
|
|
26
|
+
path: (0, node_path_1.resolve)(workspace.basePath, '.angular/cache'),
|
|
27
|
+
environment: workspace_schema_1.Environment.Local,
|
|
28
|
+
enabled: true,
|
|
29
|
+
};
|
|
30
|
+
const cliSetting = workspace.extensions['cli'];
|
|
31
|
+
if (!cliSetting || !(0, core_1.isJsonObject)(cliSetting)) {
|
|
32
|
+
return defaultSettings;
|
|
33
|
+
}
|
|
34
|
+
const cacheSettings = cliSetting['cache'];
|
|
35
|
+
if (!(0, core_1.isJsonObject)(cacheSettings)) {
|
|
36
|
+
return defaultSettings;
|
|
37
|
+
}
|
|
38
|
+
const { path = defaultSettings.path, environment = defaultSettings.environment, enabled = defaultSettings.enabled,
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
|
+
} = cacheSettings;
|
|
41
|
+
return {
|
|
42
|
+
path: (0, node_path_1.resolve)(workspace.basePath, path),
|
|
43
|
+
environment,
|
|
44
|
+
enabled,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["utilities.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAOH,8CAUC;AAED,wCAiCC;AAlDD,+CAAoD;AACpD,yCAAoC;AACpC,2EAA0E;AAG1E,SAAgB,iBAAiB,CAC/B,SAA2B,EAC3B,GAAM,EACN,KAAe;IAEf,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,CAA4C,CAAC;IAC5F,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACpC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAEnB,OAAO,SAAS,CAAC,IAAI,EAAE,CAAC;AAC1B,CAAC;AAED,SAAgB,cAAc,CAAC,SAAuC;IACpE,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;IACtF,CAAC;IAED,MAAM,eAAe,GAAoB;QACvC,IAAI,EAAE,IAAA,mBAAO,EAAC,SAAS,CAAC,QAAQ,EAAE,gBAAgB,CAAC;QACnD,WAAW,EAAE,8BAAW,CAAC,KAAK;QAC9B,OAAO,EAAE,IAAI;KACd,CAAC;IAEF,MAAM,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC/C,IAAI,CAAC,UAAU,IAAI,CAAC,IAAA,mBAAY,EAAC,UAAU,CAAC,EAAE,CAAC;QAC7C,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAC1C,IAAI,CAAC,IAAA,mBAAY,EAAC,aAAa,CAAC,EAAE,CAAC;QACjC,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,MAAM,EACJ,IAAI,GAAG,eAAe,CAAC,IAAI,EAC3B,WAAW,GAAG,eAAe,CAAC,WAAW,EACzC,OAAO,GAAG,eAAe,CAAC,OAAO;IACjC,8DAA8D;MAC/D,GAAG,aAAoC,CAAC;IAEzC,OAAO;QACL,IAAI,EAAE,IAAA,mBAAO,EAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC;QACvC,WAAW;QACX,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { CommandModuleConstructor } from '../command-builder/utilities/command';
|
|
9
|
+
export type CommandNames = 'add' | 'analytics' | 'build' | 'cache' | 'completion' | 'config' | 'deploy' | 'e2e' | 'extract-i18n' | 'generate' | 'lint' | 'make-this-awesome' | 'mcp' | 'new' | 'run' | 'serve' | 'test' | 'update' | 'version';
|
|
10
|
+
export interface CommandConfig {
|
|
11
|
+
aliases?: string[];
|
|
12
|
+
factory: () => Promise<{
|
|
13
|
+
default: CommandModuleConstructor;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
export declare const RootCommands: Record<CommandNames & string, CommandConfig>;
|
|
17
|
+
export declare const RootCommandsAliases: Record<string, CommandConfig>;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
+
var ownKeys = function(o) {
|
|
27
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
+
var ar = [];
|
|
29
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
return ownKeys(o);
|
|
33
|
+
};
|
|
34
|
+
return function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod;
|
|
36
|
+
var result = {};
|
|
37
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
+
__setModuleDefault(result, mod);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
})();
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.RootCommandsAliases = exports.RootCommands = void 0;
|
|
44
|
+
exports.RootCommands = {
|
|
45
|
+
'add': {
|
|
46
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./add/cli'))),
|
|
47
|
+
},
|
|
48
|
+
'analytics': {
|
|
49
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./analytics/cli'))),
|
|
50
|
+
},
|
|
51
|
+
'build': {
|
|
52
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./build/cli'))),
|
|
53
|
+
aliases: ['b'],
|
|
54
|
+
},
|
|
55
|
+
'cache': {
|
|
56
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./cache/cli'))),
|
|
57
|
+
},
|
|
58
|
+
'completion': {
|
|
59
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./completion/cli'))),
|
|
60
|
+
},
|
|
61
|
+
'config': {
|
|
62
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./config/cli'))),
|
|
63
|
+
},
|
|
64
|
+
'deploy': {
|
|
65
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./deploy/cli'))),
|
|
66
|
+
},
|
|
67
|
+
'e2e': {
|
|
68
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./e2e/cli'))),
|
|
69
|
+
aliases: ['e'],
|
|
70
|
+
},
|
|
71
|
+
'extract-i18n': {
|
|
72
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./extract-i18n/cli'))),
|
|
73
|
+
},
|
|
74
|
+
'generate': {
|
|
75
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./generate/cli'))),
|
|
76
|
+
aliases: ['g'],
|
|
77
|
+
},
|
|
78
|
+
'lint': {
|
|
79
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./lint/cli'))),
|
|
80
|
+
},
|
|
81
|
+
'make-this-awesome': {
|
|
82
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./make-this-awesome/cli'))),
|
|
83
|
+
},
|
|
84
|
+
'mcp': {
|
|
85
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./mcp/cli'))),
|
|
86
|
+
},
|
|
87
|
+
'new': {
|
|
88
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./new/cli'))),
|
|
89
|
+
aliases: ['n'],
|
|
90
|
+
},
|
|
91
|
+
'run': {
|
|
92
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./run/cli'))),
|
|
93
|
+
},
|
|
94
|
+
'serve': {
|
|
95
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./serve/cli'))),
|
|
96
|
+
aliases: ['dev', 's'],
|
|
97
|
+
},
|
|
98
|
+
'test': {
|
|
99
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./test/cli'))),
|
|
100
|
+
aliases: ['t'],
|
|
101
|
+
},
|
|
102
|
+
'update': {
|
|
103
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./update/cli'))),
|
|
104
|
+
},
|
|
105
|
+
'version': {
|
|
106
|
+
factory: () => Promise.resolve().then(() => __importStar(require('./version/cli'))),
|
|
107
|
+
aliases: ['v'],
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
exports.RootCommandsAliases = Object.values(exports.RootCommands).reduce((prev, current) => {
|
|
111
|
+
current.aliases?.forEach((alias) => {
|
|
112
|
+
prev[alias] = current;
|
|
113
|
+
});
|
|
114
|
+
return prev;
|
|
115
|
+
}, {});
|
|
116
|
+
//# sourceMappingURL=command-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-config.js","sourceRoot":"","sources":["command-config.ts"],"names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C,OAAO,EAAE,CAAC,GAAG,CAAC;KACf;IACD,KAAK,EAAE;QACL,OAAO,EAAE,GAAG,EAAE,mDAAQ,WAAW,GAAC;KACnC;IACD,OAAO,EAAE;QACP,OAAO,EAAE,GAAG,EAAE,mDAAQ,aAAa,GAAC;QACpC,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC;KACtB;IACD,MAAM,EAAE;QACN,OAAO,EAAE,GAAG,EAAE,mDAAQ,YAAY,GAAC;QACnC,OAAO,EAAE,CAAC,GAAG,CAAC;KACf;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,GAAG,EAAE,mDAAQ,cAAc,GAAC;KACtC;IACD,SAAS,EAAE;QACT,OAAO,EAAE,GAAG,EAAE,mDAAQ,eAAe,GAAC;QACtC,OAAO,EAAE,CAAC,GAAG,CAAC;KACf;CACF,CAAC;AAEW,QAAA,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,oBAAY,CAAC,CAAC,MAAM,CACnE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;IAChB,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACjC,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC,EACD,EAAmC,CACpC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { Argv } from 'yargs';
|
|
9
|
+
import { CommandModule, CommandModuleImplementation } from '../../command-builder/command-module';
|
|
10
|
+
export default class CompletionCommandModule extends CommandModule implements CommandModuleImplementation {
|
|
11
|
+
command: string;
|
|
12
|
+
describe: string;
|
|
13
|
+
longDescriptionPath: string;
|
|
14
|
+
builder(localYargs: Argv): Argv;
|
|
15
|
+
run(): Promise<number>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
const command_module_1 = require("../../command-builder/command-module");
|
|
12
|
+
const command_1 = require("../../command-builder/utilities/command");
|
|
13
|
+
const color_1 = require("../../utilities/color");
|
|
14
|
+
const completion_1 = require("../../utilities/completion");
|
|
15
|
+
const error_1 = require("../../utilities/error");
|
|
16
|
+
class CompletionCommandModule extends command_module_1.CommandModule {
|
|
17
|
+
command = 'completion';
|
|
18
|
+
describe = 'Set up Angular CLI autocompletion for your terminal.';
|
|
19
|
+
longDescriptionPath = (0, node_path_1.join)(__dirname, 'long-description.md');
|
|
20
|
+
builder(localYargs) {
|
|
21
|
+
(0, command_1.addCommandModuleToYargs)(CompletionScriptCommandModule, this.context);
|
|
22
|
+
return localYargs;
|
|
23
|
+
}
|
|
24
|
+
async run() {
|
|
25
|
+
let rcFile;
|
|
26
|
+
try {
|
|
27
|
+
rcFile = await (0, completion_1.initializeAutocomplete)();
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
(0, error_1.assertIsError)(err);
|
|
31
|
+
this.context.logger.error(err.message);
|
|
32
|
+
return 1;
|
|
33
|
+
}
|
|
34
|
+
this.context.logger.info(`
|
|
35
|
+
Appended \`source <(ng completion script)\` to \`${rcFile}\`. Restart your terminal or run the following to autocomplete \`ng\` commands:
|
|
36
|
+
|
|
37
|
+
${color_1.colors.yellow('source <(ng completion script)')}
|
|
38
|
+
`.trim());
|
|
39
|
+
if ((await (0, completion_1.hasGlobalCliInstall)()) === false) {
|
|
40
|
+
this.context.logger.warn('Setup completed successfully, but there does not seem to be a global install of the' +
|
|
41
|
+
' Angular CLI. For autocompletion to work, the CLI will need to be on your `$PATH`, which' +
|
|
42
|
+
' is typically done with the `-g` flag in `npm install -g @angular/cli`.' +
|
|
43
|
+
'\n\n' +
|
|
44
|
+
'For more information, see https://angular.dev/cli/completion#global-install');
|
|
45
|
+
}
|
|
46
|
+
return 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.default = CompletionCommandModule;
|
|
50
|
+
class CompletionScriptCommandModule extends command_module_1.CommandModule {
|
|
51
|
+
command = 'script';
|
|
52
|
+
describe = 'Generate a bash and zsh real-time type-ahead autocompletion script.';
|
|
53
|
+
longDescriptionPath = undefined;
|
|
54
|
+
builder(localYargs) {
|
|
55
|
+
return localYargs;
|
|
56
|
+
}
|
|
57
|
+
run() {
|
|
58
|
+
this.context.yargsInstance.showCompletionScript();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["cli.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,yCAAiC;AAEjC,yEAAkG;AAClG,qEAAkF;AAClF,iDAA+C;AAC/C,2DAAyF;AACzF,iDAAsD;AAEtD,MAAqB,uBACnB,SAAQ,8BAAa;IAGrB,OAAO,GAAG,YAAY,CAAC;IACvB,QAAQ,GAAG,sDAAsD,CAAC;IAClE,mBAAmB,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;IAE7D,OAAO,CAAC,UAAgB;QACtB,IAAA,iCAAuB,EAAC,6BAA6B,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAErE,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,GAAG;QACP,IAAI,MAAc,CAAC;QACnB,IAAI,CAAC;YACH,MAAM,GAAG,MAAM,IAAA,mCAAsB,GAAE,CAAC;QAC1C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAA,qBAAa,EAAC,GAAG,CAAC,CAAC;YACnB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAEvC,OAAO,CAAC,CAAC;QACX,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CACtB;mDAC6C,MAAM;;MAEnD,cAAM,CAAC,MAAM,CAAC,gCAAgC,CAAC;OAC9C,CAAC,IAAI,EAAE,CACT,CAAC;QAEF,IAAI,CAAC,MAAM,IAAA,gCAAmB,GAAE,CAAC,KAAK,KAAK,EAAE,CAAC;YAC5C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CACtB,qFAAqF;gBACnF,0FAA0F;gBAC1F,yEAAyE;gBACzE,MAAM;gBACN,6EAA6E,CAChF,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AA7CD,0CA6CC;AAED,MAAM,6BAA8B,SAAQ,8BAAa;IACvD,OAAO,GAAG,QAAQ,CAAC;IACnB,QAAQ,GAAG,qEAAqE,CAAC;IACjF,mBAAmB,GAAG,SAAS,CAAC;IAEhC,OAAO,CAAC,UAAgB;QACtB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,GAAG;QACD,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,oBAAoB,EAAE,CAAC;IACpD,CAAC;CACF"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Setting up autocompletion configures your terminal, so pressing the `<TAB>` key while in the middle
|
|
2
|
+
of typing will display various commands and options available to you. This makes it very easy to
|
|
3
|
+
discover and use CLI commands without lots of memorization.
|
|
4
|
+
|
|
5
|
+

|
|
8
|
+
|
|
9
|
+
## Automated setup
|
|
10
|
+
|
|
11
|
+
The CLI should prompt and ask to set up autocompletion for you the first time you use it (v14+).
|
|
12
|
+
Simply answer "Yes" and the CLI will take care of the rest.
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
$ ng serve
|
|
16
|
+
? Would you like to enable autocompletion? This will set up your terminal so pressing TAB while typing Angular CLI commands will show possible options and autocomplete arguments. (Enabling autocompletion will modify configuration files in your home directory.) Yes
|
|
17
|
+
Appended `source <(ng completion script)` to `/home/my-username/.bashrc`. Restart your terminal or run:
|
|
18
|
+
|
|
19
|
+
source <(ng completion script)
|
|
20
|
+
|
|
21
|
+
to autocomplete `ng` commands.
|
|
22
|
+
|
|
23
|
+
# Serve output...
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If you already refused the prompt, it won't ask again. But you can run `ng completion` to
|
|
27
|
+
do the same thing automatically.
|
|
28
|
+
|
|
29
|
+
This modifies your terminal environment to load Angular CLI autocompletion, but can't update your
|
|
30
|
+
current terminal session. Either restart it or run `source <(ng completion script)` directly to
|
|
31
|
+
enable autocompletion in your current session.
|
|
32
|
+
|
|
33
|
+
Test it out by typing `ng ser<TAB>` and it should autocomplete to `ng serve`. Ambiguous arguments
|
|
34
|
+
will show all possible options and their documentation, such as `ng generate <TAB>`.
|
|
35
|
+
|
|
36
|
+
## Manual setup
|
|
37
|
+
|
|
38
|
+
Some users may have highly customized terminal setups, possibly with configuration files checked
|
|
39
|
+
into source control with an opinionated structure. `ng completion` only ever appends Angular's setup
|
|
40
|
+
to an existing configuration file for your current shell, or creates one if none exists. If you want
|
|
41
|
+
more control over exactly where this configuration lives, you can manually set it up by having your
|
|
42
|
+
shell run at startup:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
source <(ng completion script)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This is equivalent to what `ng completion` will automatically set up, and gives power users more
|
|
49
|
+
flexibility in their environments when desired.
|
|
50
|
+
|
|
51
|
+
## Platform support
|
|
52
|
+
|
|
53
|
+
Angular CLI supports autocompletion for the Bash and Zsh shells on MacOS and Linux operating
|
|
54
|
+
systems. On Windows, Git Bash and [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/)
|
|
55
|
+
using Bash or Zsh are supported.
|
|
56
|
+
|
|
57
|
+
## Global install
|
|
58
|
+
|
|
59
|
+
Autocompletion works by configuring your terminal to invoke the Angular CLI on startup to load the
|
|
60
|
+
setup script. This means the terminal must be able to find and execute the Angular CLI, typically
|
|
61
|
+
through a global install that places the binary on the user's `$PATH`. If you get
|
|
62
|
+
`command not found: ng`, make sure the CLI is installed globally which you can do with the `-g`
|
|
63
|
+
flag:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npm install -g @angular/cli
|
|
67
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { Argv } from 'yargs';
|
|
9
|
+
import { CommandModule, CommandModuleImplementation, Options } from '../../command-builder/command-module';
|
|
10
|
+
interface ConfigCommandArgs {
|
|
11
|
+
'json-path'?: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
global?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export default class ConfigCommandModule extends CommandModule<ConfigCommandArgs> implements CommandModuleImplementation<ConfigCommandArgs> {
|
|
16
|
+
command: string;
|
|
17
|
+
describe: string;
|
|
18
|
+
longDescriptionPath: string;
|
|
19
|
+
builder(localYargs: Argv): Argv<ConfigCommandArgs>;
|
|
20
|
+
run(options: Options<ConfigCommandArgs>): Promise<number | void>;
|
|
21
|
+
private get;
|
|
22
|
+
private set;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const node_crypto_1 = require("node:crypto");
|
|
11
|
+
const node_path_1 = require("node:path");
|
|
12
|
+
const command_module_1 = require("../../command-builder/command-module");
|
|
13
|
+
const config_1 = require("../../utilities/config");
|
|
14
|
+
const json_file_1 = require("../../utilities/json-file");
|
|
15
|
+
class ConfigCommandModule extends command_module_1.CommandModule {
|
|
16
|
+
command = 'config [json-path] [value]';
|
|
17
|
+
describe = 'Retrieves or sets Angular configuration values in the angular.json file for the workspace.';
|
|
18
|
+
longDescriptionPath = (0, node_path_1.join)(__dirname, 'long-description.md');
|
|
19
|
+
builder(localYargs) {
|
|
20
|
+
return localYargs
|
|
21
|
+
.positional('json-path', {
|
|
22
|
+
description: `The configuration key to set or query, in JSON path format. ` +
|
|
23
|
+
`For example: "a[3].foo.bar[2]". If no new value is provided, returns the current value of this key.`,
|
|
24
|
+
type: 'string',
|
|
25
|
+
})
|
|
26
|
+
.positional('value', {
|
|
27
|
+
description: 'If provided, a new value for the given configuration key.',
|
|
28
|
+
type: 'string',
|
|
29
|
+
})
|
|
30
|
+
.option('global', {
|
|
31
|
+
description: `Access the global configuration in the caller's home directory.`,
|
|
32
|
+
alias: ['g'],
|
|
33
|
+
type: 'boolean',
|
|
34
|
+
default: false,
|
|
35
|
+
})
|
|
36
|
+
.strict();
|
|
37
|
+
}
|
|
38
|
+
async run(options) {
|
|
39
|
+
const level = options.global ? 'global' : 'local';
|
|
40
|
+
const [config] = await (0, config_1.getWorkspaceRaw)(level);
|
|
41
|
+
if (options.value == undefined) {
|
|
42
|
+
if (!config) {
|
|
43
|
+
this.context.logger.error('No config found.');
|
|
44
|
+
return 1;
|
|
45
|
+
}
|
|
46
|
+
return this.get(config, options);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return this.set(options);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
get(jsonFile, options) {
|
|
53
|
+
const { logger } = this.context;
|
|
54
|
+
const value = options.jsonPath
|
|
55
|
+
? jsonFile.get(parseJsonPath(options.jsonPath))
|
|
56
|
+
: jsonFile.content;
|
|
57
|
+
if (value === undefined) {
|
|
58
|
+
logger.error('Value cannot be found.');
|
|
59
|
+
return 1;
|
|
60
|
+
}
|
|
61
|
+
else if (typeof value === 'string') {
|
|
62
|
+
logger.info(value);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
logger.info(JSON.stringify(value, null, 2));
|
|
66
|
+
}
|
|
67
|
+
return 0;
|
|
68
|
+
}
|
|
69
|
+
async set(options) {
|
|
70
|
+
if (!options.jsonPath?.trim()) {
|
|
71
|
+
throw new command_module_1.CommandModuleError('Invalid Path.');
|
|
72
|
+
}
|
|
73
|
+
const [config, configPath] = await (0, config_1.getWorkspaceRaw)(options.global ? 'global' : 'local');
|
|
74
|
+
const { logger } = this.context;
|
|
75
|
+
if (!config || !configPath) {
|
|
76
|
+
throw new command_module_1.CommandModuleError('Confguration file cannot be found.');
|
|
77
|
+
}
|
|
78
|
+
const normalizeUUIDValue = (v) => (v === '' ? (0, node_crypto_1.randomUUID)() : `${v}`);
|
|
79
|
+
const value = options.jsonPath === 'cli.analyticsSharing.uuid'
|
|
80
|
+
? normalizeUUIDValue(options.value)
|
|
81
|
+
: options.value;
|
|
82
|
+
const modified = config.modify(parseJsonPath(options.jsonPath), normalizeValue(value));
|
|
83
|
+
if (!modified) {
|
|
84
|
+
logger.error('Value cannot be found.');
|
|
85
|
+
return 1;
|
|
86
|
+
}
|
|
87
|
+
await (0, config_1.validateWorkspace)((0, json_file_1.parseJson)(config.content), options.global ?? false);
|
|
88
|
+
config.save();
|
|
89
|
+
return 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.default = ConfigCommandModule;
|
|
93
|
+
/**
|
|
94
|
+
* Splits a JSON path string into fragments. Fragments can be used to get the value referenced
|
|
95
|
+
* by the path. For example, a path of "a[3].foo.bar[2]" would give you a fragment array of
|
|
96
|
+
* ["a", 3, "foo", "bar", 2].
|
|
97
|
+
* @param path The JSON string to parse.
|
|
98
|
+
* @returns {(string|number)[]} The fragments for the string.
|
|
99
|
+
* @private
|
|
100
|
+
*/
|
|
101
|
+
function parseJsonPath(path) {
|
|
102
|
+
const fragments = (path || '').split(/\./g);
|
|
103
|
+
const result = [];
|
|
104
|
+
while (fragments.length > 0) {
|
|
105
|
+
const fragment = fragments.shift();
|
|
106
|
+
if (fragment == undefined) {
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
const match = fragment.match(/([^[]+)((\[.*\])*)/);
|
|
110
|
+
if (!match) {
|
|
111
|
+
throw new command_module_1.CommandModuleError('Invalid JSON path.');
|
|
112
|
+
}
|
|
113
|
+
result.push(match[1]);
|
|
114
|
+
if (match[2]) {
|
|
115
|
+
const indices = match[2]
|
|
116
|
+
.slice(1, -1)
|
|
117
|
+
.split('][')
|
|
118
|
+
.map((x) => (/^\d$/.test(x) ? +x : x.replace(/"|'/g, '')));
|
|
119
|
+
result.push(...indices);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return result.filter((fragment) => fragment != null);
|
|
123
|
+
}
|
|
124
|
+
function normalizeValue(value) {
|
|
125
|
+
const valueString = `${value}`.trim();
|
|
126
|
+
switch (valueString) {
|
|
127
|
+
case 'true':
|
|
128
|
+
return true;
|
|
129
|
+
case 'false':
|
|
130
|
+
return false;
|
|
131
|
+
case 'null':
|
|
132
|
+
return null;
|
|
133
|
+
case 'undefined':
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
if (isFinite(+valueString)) {
|
|
137
|
+
return +valueString;
|
|
138
|
+
}
|
|
139
|
+
try {
|
|
140
|
+
// We use `JSON.parse` instead of `parseJson` because the latter will parse UUIDs
|
|
141
|
+
// and convert them into a numberic entities.
|
|
142
|
+
// Example: 73b61974-182c-48e4-b4c6-30ddf08c5c98 -> 73.
|
|
143
|
+
// These values should never contain comments, therefore using `JSON.parse` is safe.
|
|
144
|
+
return JSON.parse(valueString);
|
|
145
|
+
}
|
|
146
|
+
catch {
|
|
147
|
+
return value;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["cli.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAGH,6CAAyC;AACzC,yCAAiC;AAEjC,yEAK8C;AAC9C,mDAA4E;AAC5E,yDAAgE;AAQhE,MAAqB,mBACnB,SAAQ,8BAAgC;IAGxC,OAAO,GAAG,4BAA4B,CAAC;IACvC,QAAQ,GACN,4FAA4F,CAAC;IAC/F,mBAAmB,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;IAE7D,OAAO,CAAC,UAAgB;QACtB,OAAO,UAAU;aACd,UAAU,CAAC,WAAW,EAAE;YACvB,WAAW,EACT,8DAA8D;gBAC9D,qGAAqG;YACvG,IAAI,EAAE,QAAQ;SACf,CAAC;aACD,UAAU,CAAC,OAAO,EAAE;YACnB,WAAW,EAAE,2DAA2D;YACxE,IAAI,EAAE,QAAQ;SACf,CAAC;aACD,MAAM,CAAC,QAAQ,EAAE;YAChB,WAAW,EAAE,iEAAiE;YAC9E,KAAK,EAAE,CAAC,GAAG,CAAC;YACZ,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;SACf,CAAC;aACD,MAAM,EAAE,CAAC;IACd,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,OAAmC;QAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;QAClD,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,IAAA,wBA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,KAAK,OAAO;YACV,OAAO,KAAK,CAAC;QACf,KAAK,MAAM;YACT,OAAO,IAAI,CAAC;QACd,KAAK,WAAW;YACd,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,IAAI,QAAQ,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;QAC3B,OAAO,CAAC,WAAW,CAAC;IACtB,CAAC;IAED,IAAI,CAAC;QACH,iFAAiF;QACjF,6CAA6C;QAC7C,uDAAuD;QACvD,oFAAoF;QACpF,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAc,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
A workspace has a single CLI configuration file, `angular.json`, at the top level.
|
|
2
|
+
The `projects` object contains a configuration object for each project in the workspace.
|
|
3
|
+
|
|
4
|
+
You can edit the configuration directly in a code editor,
|
|
5
|
+
or indirectly on the command line using this command.
|
|
6
|
+
|
|
7
|
+
The configurable property names match command option names,
|
|
8
|
+
except that in the configuration file, all names must use camelCase,
|
|
9
|
+
while on the command line options can be given dash-case.
|
|
10
|
+
|
|
11
|
+
For further details, see [Workspace Configuration](reference/configs/workspace-config).
|
|
12
|
+
|
|
13
|
+
For configuration of CLI usage analytics, see [ng analytics](cli/analytics).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { MissingTargetChoice } from '../../command-builder/architect-base-command-module';
|
|
9
|
+
import { ArchitectCommandModule } from '../../command-builder/architect-command-module';
|
|
10
|
+
import { CommandModuleImplementation } from '../../command-builder/command-module';
|
|
11
|
+
export default class DeployCommandModule extends ArchitectCommandModule implements CommandModuleImplementation {
|
|
12
|
+
missingTargetChoices: MissingTargetChoice[];
|
|
13
|
+
multiTarget: boolean;
|
|
14
|
+
command: string;
|
|
15
|
+
longDescriptionPath: string;
|
|
16
|
+
describe: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
const architect_command_module_1 = require("../../command-builder/architect-command-module");
|
|
12
|
+
class DeployCommandModule extends architect_command_module_1.ArchitectCommandModule {
|
|
13
|
+
// The below choices should be kept in sync with the list in https://angular.dev/tools/cli/deployment
|
|
14
|
+
missingTargetChoices = [
|
|
15
|
+
{
|
|
16
|
+
name: 'Amazon S3',
|
|
17
|
+
value: '@jefiozie/ngx-aws-deploy',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Firebase',
|
|
21
|
+
value: '@angular/fire',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'Netlify',
|
|
25
|
+
value: '@netlify-builder/deploy',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'GitHub Pages',
|
|
29
|
+
value: 'angular-cli-ghpages',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
multiTarget = false;
|
|
33
|
+
command = 'deploy [project]';
|
|
34
|
+
longDescriptionPath = (0, node_path_1.join)(__dirname, 'long-description.md');
|
|
35
|
+
describe = 'Invokes the deploy builder for a specified project or for the default project in the workspace.';
|
|
36
|
+
}
|
|
37
|
+
exports.default = DeployCommandModule;
|
|
38
|
+
//# sourceMappingURL=cli.js.map
|