@angular/cli 22.2.1 → 22.3.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ng.js +7 -10
- package/bin/version.js +98 -0
- package/index.d.ts +19 -0
- package/lib/chunk-5AASRQKS.js +85 -0
- package/lib/chunk-A2VIYA2E.js +165 -0
- package/lib/chunk-CAZUOCTC.js +225 -0
- package/lib/chunk-DHWVZMLH.js +206 -0
- package/lib/chunk-FZ5GFCWU.js +483 -0
- package/lib/chunk-G7TRU43D.js +42 -0
- package/lib/chunk-GHUUJYOY.js +40 -0
- package/lib/chunk-JBLF2TH3.js +267 -0
- package/lib/chunk-Q67GOPL7.js +380 -0
- package/lib/chunk-SN4KY4Z3.js +24 -0
- package/lib/chunk-XFL2J3CJ.js +24 -0
- package/lib/chunk-XG3HVNIL.js +59 -0
- package/lib/chunk-YM7ILCS5.js +2573 -0
- package/lib/cli/index.js +353 -105
- package/lib/cli-4CMZ6KMR.js +48 -0
- package/lib/cli-4Q7DGTBA.js +33 -0
- package/lib/cli-6AHY7ADW.js +96 -0
- package/lib/cli-A5UAJDO6.js +135 -0
- package/lib/cli-ACLGUIBI.js +2531 -0
- package/lib/cli-BQRFWIMG.js +35 -0
- package/lib/cli-CWICUPZW.js +42 -0
- package/lib/cli-DWQUM3M2.js +29 -0
- package/lib/cli-L4TM4JH3.js +88 -0
- package/lib/cli-LYBZEMDR.js +96 -0
- package/lib/cli-PDCEX7HQ.js +605 -0
- package/lib/cli-PJVTDBQM.js +51 -0
- package/lib/cli-PRIRL3WP.js +185 -0
- package/lib/cli-PU5VH7JB.js +189 -0
- package/lib/cli-QUH44NUB.js +68 -0
- package/lib/cli-VVITNTBC.js +50 -0
- package/lib/cli-XM4L4PP4.js +1651 -0
- package/lib/cli-Y2ECUR33.js +33 -0
- package/lib/cli-YDSMJOSO.js +182 -0
- package/lib/color-SJPGXZVA.js +8 -0
- package/lib/config/schema.json +204 -0
- package/lib/config-QXK7SSVG.js +22 -0
- package/lib/init.js +91 -180
- package/package.json +20 -15
- package/lib/cli/index.d.ts +0 -11
- package/lib/cli/index.js.map +0 -1
- package/lib/config/workspace-schema.d.ts +0 -1025
- package/lib/config/workspace-schema.js +0 -131
- package/lib/config/workspace-schema.js.map +0 -1
- package/lib/init.d.ts +0 -8
- package/lib/init.js.map +0 -1
- package/src/analytics/analytics-collector.d.ts +0 -35
- package/src/analytics/analytics-collector.js +0 -195
- package/src/analytics/analytics-collector.js.map +0 -1
- package/src/analytics/analytics-parameters.d.ts +0 -101
- package/src/analytics/analytics-parameters.js +0 -107
- package/src/analytics/analytics-parameters.js.map +0 -1
- package/src/analytics/analytics.d.ts +0 -27
- package/src/analytics/analytics.js +0 -183
- package/src/analytics/analytics.js.map +0 -1
- package/src/command-builder/architect-base-command-module.d.ts +0 -30
- package/src/command-builder/architect-base-command-module.js +0 -244
- package/src/command-builder/architect-base-command-module.js.map +0 -1
- package/src/command-builder/architect-command-module.d.ts +0 -28
- package/src/command-builder/architect-command-module.js +0 -218
- package/src/command-builder/architect-command-module.js.map +0 -1
- package/src/command-builder/command-module.d.ts +0 -73
- package/src/command-builder/command-module.js +0 -260
- package/src/command-builder/command-module.js.map +0 -1
- package/src/command-builder/command-runner.d.ts +0 -9
- package/src/command-builder/command-runner.js +0 -202
- package/src/command-builder/command-runner.js.map +0 -1
- package/src/command-builder/definitions.d.ts +0 -41
- package/src/command-builder/definitions.js +0 -20
- package/src/command-builder/definitions.js.map +0 -1
- package/src/command-builder/schematics-command-module.d.ts +0 -41
- package/src/command-builder/schematics-command-module.js +0 -408
- package/src/command-builder/schematics-command-module.js.map +0 -1
- package/src/command-builder/utilities/command.d.ts +0 -13
- package/src/command-builder/utilities/command.js +0 -39
- package/src/command-builder/utilities/command.js.map +0 -1
- package/src/command-builder/utilities/json-help.d.ts +0 -37
- package/src/command-builder/utilities/json-help.js +0 -92
- package/src/command-builder/utilities/json-help.js.map +0 -1
- package/src/command-builder/utilities/json-schema.d.ts +0 -64
- package/src/command-builder/utilities/json-schema.js +0 -349
- package/src/command-builder/utilities/json-schema.js.map +0 -1
- package/src/command-builder/utilities/normalize-options-middleware.d.ts +0 -18
- package/src/command-builder/utilities/normalize-options-middleware.js +0 -37
- package/src/command-builder/utilities/normalize-options-middleware.js.map +0 -1
- package/src/command-builder/utilities/schematic-engine-host.d.ts +0 -15
- package/src/command-builder/utilities/schematic-engine-host.js +0 -179
- package/src/command-builder/utilities/schematic-engine-host.js.map +0 -1
- package/src/command-builder/utilities/schematic-workflow.d.ts +0 -14
- package/src/command-builder/utilities/schematic-workflow.js +0 -70
- package/src/command-builder/utilities/schematic-workflow.js.map +0 -1
- package/src/commands/add/cli.d.ts +0 -41
- package/src/commands/add/cli.js +0 -705
- package/src/commands/add/cli.js.map +0 -1
- package/src/commands/add/long-description.md +0 -7
- package/src/commands/analytics/cli.d.ts +0 -16
- package/src/commands/analytics/cli.js +0 -34
- package/src/commands/analytics/cli.js.map +0 -1
- package/src/commands/analytics/info/cli.d.ts +0 -16
- package/src/commands/analytics/info/cli.js +0 -25
- package/src/commands/analytics/info/cli.js.map +0 -1
- package/src/commands/analytics/long-description.md +0 -20
- package/src/commands/analytics/settings/cli.d.ts +0 -35
- package/src/commands/analytics/settings/cli.js +0 -54
- package/src/commands/analytics/settings/cli.js.map +0 -1
- package/src/commands/build/cli.d.ts +0 -16
- package/src/commands/build/cli.js +0 -21
- package/src/commands/build/cli.js.map +0 -1
- package/src/commands/build/long-description.md +0 -18
- package/src/commands/cache/clean/cli.d.ts +0 -17
- package/src/commands/cache/clean/cli.js +0 -32
- package/src/commands/cache/clean/cli.js.map +0 -1
- package/src/commands/cache/cli.d.ts +0 -17
- package/src/commands/cache/cli.js +0 -36
- package/src/commands/cache/cli.js.map +0 -1
- package/src/commands/cache/info/cli.d.ts +0 -20
- package/src/commands/cache/info/cli.js +0 -139
- package/src/commands/cache/info/cli.js.map +0 -1
- package/src/commands/cache/long-description.md +0 -53
- package/src/commands/cache/settings/cli.d.ts +0 -27
- package/src/commands/cache/settings/cli.js +0 -41
- package/src/commands/cache/settings/cli.js.map +0 -1
- package/src/commands/cache/utilities.d.ts +0 -11
- package/src/commands/cache/utilities.js +0 -90
- package/src/commands/cache/utilities.js.map +0 -1
- package/src/commands/command-config.d.ts +0 -17
- package/src/commands/command-config.js +0 -116
- package/src/commands/command-config.js.map +0 -1
- package/src/commands/completion/cli.d.ts +0 -16
- package/src/commands/completion/cli.js +0 -61
- package/src/commands/completion/cli.js.map +0 -1
- package/src/commands/completion/long-description.md +0 -67
- package/src/commands/config/cli.d.ts +0 -24
- package/src/commands/config/cli.js +0 -150
- package/src/commands/config/cli.js.map +0 -1
- package/src/commands/config/long-description.md +0 -13
- package/src/commands/deploy/cli.d.ts +0 -17
- package/src/commands/deploy/cli.js +0 -38
- package/src/commands/deploy/cli.js.map +0 -1
- package/src/commands/deploy/long-description.md +0 -22
- package/src/commands/e2e/cli.d.ts +0 -18
- package/src/commands/e2e/cli.js +0 -42
- package/src/commands/e2e/cli.js.map +0 -1
- package/src/commands/extract-i18n/cli.d.ts +0 -17
- package/src/commands/extract-i18n/cli.js +0 -48
- package/src/commands/extract-i18n/cli.js.map +0 -1
- package/src/commands/generate/cli.d.ts +0 -47
- package/src/commands/generate/cli.js +0 -189
- package/src/commands/generate/cli.js.map +0 -1
- package/src/commands/lint/cli.d.ts +0 -17
- package/src/commands/lint/cli.js +0 -25
- package/src/commands/lint/cli.js.map +0 -1
- package/src/commands/lint/long-description.md +0 -20
- package/src/commands/make-this-awesome/cli.d.ts +0 -17
- package/src/commands/make-this-awesome/cli.js +0 -36
- package/src/commands/make-this-awesome/cli.js.map +0 -1
- package/src/commands/mcp/cli.d.ts +0 -21
- package/src/commands/mcp/cli.js +0 -74
- package/src/commands/mcp/cli.js.map +0 -1
- package/src/commands/mcp/constants.d.ts +0 -10
- package/src/commands/mcp/constants.js +0 -16
- package/src/commands/mcp/constants.js.map +0 -1
- package/src/commands/mcp/devserver.d.ts +0 -85
- package/src/commands/mcp/devserver.js +0 -109
- package/src/commands/mcp/devserver.js.map +0 -1
- package/src/commands/mcp/host.d.ts +0 -103
- package/src/commands/mcp/host.js +0 -270
- package/src/commands/mcp/host.js.map +0 -1
- package/src/commands/mcp/mcp-server.d.ts +0 -38
- package/src/commands/mcp/mcp-server.js +0 -176
- package/src/commands/mcp/mcp-server.js.map +0 -1
- package/src/commands/mcp/resources/ai-tutor.md +0 -822
- package/src/commands/mcp/resources/best-practices.md +0 -59
- package/src/commands/mcp/resources/instructions.d.ts +0 -9
- package/src/commands/mcp/resources/instructions.js +0 -26
- package/src/commands/mcp/resources/instructions.js.map +0 -1
- package/src/commands/mcp/shared-options.d.ts +0 -12
- package/src/commands/mcp/shared-options.js +0 -22
- package/src/commands/mcp/shared-options.js.map +0 -1
- package/src/commands/mcp/tools/ai-tutor.d.ts +0 -12
- package/src/commands/mcp/tools/ai-tutor.js +0 -59
- package/src/commands/mcp/tools/ai-tutor.js.map +0 -1
- package/src/commands/mcp/tools/best-practices.d.ts +0 -13
- package/src/commands/mcp/tools/best-practices.js +0 -196
- package/src/commands/mcp/tools/best-practices.js.map +0 -1
- package/src/commands/mcp/tools/devserver/devserver-start.d.ts +0 -32
- package/src/commands/mcp/tools/devserver/devserver-start.js +0 -110
- package/src/commands/mcp/tools/devserver/devserver-start.js.map +0 -1
- package/src/commands/mcp/tools/devserver/devserver-stop.d.ts +0 -31
- package/src/commands/mcp/tools/devserver/devserver-stop.js +0 -69
- package/src/commands/mcp/tools/devserver/devserver-stop.js.map +0 -1
- package/src/commands/mcp/tools/devserver/devserver-wait-for-build.d.ts +0 -41
- package/src/commands/mcp/tools/devserver/devserver-wait-for-build.js +0 -105
- package/src/commands/mcp/tools/devserver/devserver-wait-for-build.js.map +0 -1
- package/src/commands/mcp/tools/doc-search.d.ts +0 -21
- package/src/commands/mcp/tools/doc-search.js +0 -307
- package/src/commands/mcp/tools/doc-search.js.map +0 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.d.ts +0 -17
- package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.js +0 -62
- package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.js.map +0 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.d.ts +0 -12
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js +0 -70
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js.map +0 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.d.ts +0 -12
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js +0 -60
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js.map +0 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.d.ts +0 -15
- package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.js +0 -238
- package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.js.map +0 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.d.ts +0 -9
- package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.js +0 -14
- package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.js.map +0 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.d.ts +0 -36
- package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js +0 -135
- package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js.map +0 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/types.d.ts +0 -13
- package/src/commands/mcp/tools/onpush-zoneless-migration/types.js +0 -10
- package/src/commands/mcp/tools/onpush-zoneless-migration/types.js.map +0 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.d.ts +0 -16
- package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js +0 -215
- package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js.map +0 -1
- package/src/commands/mcp/tools/projects.d.ts +0 -48
- package/src/commands/mcp/tools/projects.js +0 -541
- package/src/commands/mcp/tools/projects.js.map +0 -1
- package/src/commands/mcp/tools/run-target/build-target-strategy.d.ts +0 -14
- package/src/commands/mcp/tools/run-target/build-target-strategy.js +0 -53
- package/src/commands/mcp/tools/run-target/build-target-strategy.js.map +0 -1
- package/src/commands/mcp/tools/run-target/generic-target-strategy.d.ts +0 -14
- package/src/commands/mcp/tools/run-target/generic-target-strategy.js +0 -63
- package/src/commands/mcp/tools/run-target/generic-target-strategy.js.map +0 -1
- package/src/commands/mcp/tools/run-target/options-serializer.d.ts +0 -13
- package/src/commands/mcp/tools/run-target/options-serializer.js +0 -41
- package/src/commands/mcp/tools/run-target/options-serializer.js.map +0 -1
- package/src/commands/mcp/tools/run-target/run-target.d.ts +0 -34
- package/src/commands/mcp/tools/run-target/run-target.js +0 -69
- package/src/commands/mcp/tools/run-target/run-target.js.map +0 -1
- package/src/commands/mcp/tools/run-target/strategy.d.ts +0 -15
- package/src/commands/mcp/tools/run-target/strategy.js +0 -10
- package/src/commands/mcp/tools/run-target/strategy.js.map +0 -1
- package/src/commands/mcp/tools/run-target/types.d.ts +0 -39
- package/src/commands/mcp/tools/run-target/types.js +0 -41
- package/src/commands/mcp/tools/run-target/types.js.map +0 -1
- package/src/commands/mcp/tools/run-target/unit-test-strategy.d.ts +0 -14
- package/src/commands/mcp/tools/run-target/unit-test-strategy.js +0 -56
- package/src/commands/mcp/tools/run-target/unit-test-strategy.js.map +0 -1
- package/src/commands/mcp/tools/tool-registry.d.ts +0 -40
- package/src/commands/mcp/tools/tool-registry.js +0 -40
- package/src/commands/mcp/tools/tool-registry.js.map +0 -1
- package/src/commands/mcp/utils.d.ts +0 -25
- package/src/commands/mcp/utils.js +0 -44
- package/src/commands/mcp/utils.js.map +0 -1
- package/src/commands/mcp/workspace-utils.d.ts +0 -55
- package/src/commands/mcp/workspace-utils.js +0 -181
- package/src/commands/mcp/workspace-utils.js.map +0 -1
- package/src/commands/new/cli.d.ts +0 -27
- package/src/commands/new/cli.js +0 -76
- package/src/commands/new/cli.js.map +0 -1
- package/src/commands/new/long-description.md +0 -15
- package/src/commands/run/cli.d.ts +0 -25
- package/src/commands/run/cli.js +0 -89
- package/src/commands/run/cli.js.map +0 -1
- package/src/commands/run/long-description.md +0 -10
- package/src/commands/serve/cli.d.ts +0 -16
- package/src/commands/serve/cli.js +0 -20
- package/src/commands/serve/cli.js.map +0 -1
- package/src/commands/test/cli.d.ts +0 -16
- package/src/commands/test/cli.js +0 -21
- package/src/commands/test/cli.js.map +0 -1
- package/src/commands/test/long-description.md +0 -2
- package/src/commands/update/cli.d.ts +0 -50
- package/src/commands/update/cli.js +0 -586
- package/src/commands/update/cli.js.map +0 -1
- package/src/commands/update/long-description.md +0 -22
- package/src/commands/update/update-resolver.d.ts +0 -75
- package/src/commands/update/update-resolver.js +0 -918
- package/src/commands/update/update-resolver.js.map +0 -1
- package/src/commands/update/utilities/cli-version.d.ts +0 -48
- package/src/commands/update/utilities/cli-version.js +0 -196
- package/src/commands/update/utilities/cli-version.js.map +0 -1
- package/src/commands/update/utilities/constants.d.ts +0 -12
- package/src/commands/update/utilities/constants.js +0 -16
- package/src/commands/update/utilities/constants.js.map +0 -1
- package/src/commands/update/utilities/git.d.ts +0 -36
- package/src/commands/update/utilities/git.js +0 -148
- package/src/commands/update/utilities/git.js.map +0 -1
- package/src/commands/update/utilities/migration.d.ts +0 -32
- package/src/commands/update/utilities/migration.js +0 -271
- package/src/commands/update/utilities/migration.js.map +0 -1
- package/src/commands/version/cli.d.ts +0 -36
- package/src/commands/version/cli.js +0 -117
- package/src/commands/version/cli.js.map +0 -1
- package/src/commands/version/version-info.d.ts +0 -46
- package/src/commands/version/version-info.js +0 -101
- package/src/commands/version/version-info.js.map +0 -1
- package/src/package-managers/discovery.d.ts +0 -23
- package/src/package-managers/discovery.js +0 -104
- package/src/package-managers/discovery.js.map +0 -1
- package/src/package-managers/error.d.ts +0 -43
- package/src/package-managers/error.js +0 -41
- package/src/package-managers/error.js.map +0 -1
- package/src/package-managers/factory.d.ts +0 -30
- package/src/package-managers/factory.js +0 -137
- package/src/package-managers/factory.js.map +0 -1
- package/src/package-managers/host.d.ts +0 -86
- package/src/package-managers/host.js +0 -91
- package/src/package-managers/host.js.map +0 -1
- package/src/package-managers/index.d.ts +0 -13
- package/src/package-managers/index.js +0 -17
- package/src/package-managers/index.js.map +0 -1
- package/src/package-managers/logger.d.ts +0 -27
- package/src/package-managers/logger.js +0 -10
- package/src/package-managers/logger.js.map +0 -1
- package/src/package-managers/package-manager-descriptor.d.ts +0 -269
- package/src/package-managers/package-manager-descriptor.js +0 -210
- package/src/package-managers/package-manager-descriptor.js.map +0 -1
- package/src/package-managers/package-manager.d.ts +0 -200
- package/src/package-managers/package-manager.js +0 -720
- package/src/package-managers/package-manager.js.map +0 -1
- package/src/package-managers/package-metadata.d.ts +0 -91
- package/src/package-managers/package-metadata.js +0 -10
- package/src/package-managers/package-metadata.js.map +0 -1
- package/src/package-managers/package-tree.d.ts +0 -23
- package/src/package-managers/package-tree.js +0 -10
- package/src/package-managers/package-tree.js.map +0 -1
- package/src/package-managers/parsers.d.ts +0 -167
- package/src/package-managers/parsers.js +0 -674
- package/src/package-managers/parsers.js.map +0 -1
- package/src/utilities/color.d.ts +0 -23
- package/src/utilities/color.js +0 -41
- package/src/utilities/color.js.map +0 -1
- package/src/utilities/completion.d.ts +0 -30
- package/src/utilities/completion.js +0 -270
- package/src/utilities/completion.js.map +0 -1
- package/src/utilities/config.d.ts +0 -38
- package/src/utilities/config.js +0 -368
- package/src/utilities/config.js.map +0 -1
- package/src/utilities/environment-options.d.ts +0 -25
- package/src/utilities/environment-options.js +0 -60
- package/src/utilities/environment-options.js.map +0 -1
- package/src/utilities/eol.d.ts +0 -20
- package/src/utilities/eol.js +0 -35
- package/src/utilities/eol.js.map +0 -1
- package/src/utilities/error.d.ts +0 -18
- package/src/utilities/error.js +0 -41
- package/src/utilities/error.js.map +0 -1
- package/src/utilities/find-up.d.ts +0 -21
- package/src/utilities/find-up.js +0 -67
- package/src/utilities/find-up.js.map +0 -1
- package/src/utilities/json-file.d.ts +0 -24
- package/src/utilities/json-file.js +0 -179
- package/src/utilities/json-file.js.map +0 -1
- package/src/utilities/log-file.d.ts +0 -13
- package/src/utilities/log-file.js +0 -28
- package/src/utilities/log-file.js.map +0 -1
- package/src/utilities/memoize.d.ts +0 -15
- package/src/utilities/memoize.js +0 -64
- package/src/utilities/memoize.js.map +0 -1
- package/src/utilities/node-version.d.ts +0 -21
- package/src/utilities/node-version.js +0 -65
- package/src/utilities/node-version.js.map +0 -1
- package/src/utilities/prettier.d.ts +0 -19
- package/src/utilities/prettier.js +0 -105
- package/src/utilities/prettier.js.map +0 -1
- package/src/utilities/project.d.ts +0 -8
- package/src/utilities/project.js +0 -81
- package/src/utilities/project.js.map +0 -1
- package/src/utilities/prompt.d.ts +0 -17
- package/src/utilities/prompt.js +0 -90
- package/src/utilities/prompt.js.map +0 -1
- package/src/utilities/tty.d.ts +0 -16
- package/src/utilities/tty.js +0 -23
- package/src/utilities/tty.js.map +0 -1
- package/src/utilities/version.d.ts +0 -16
- package/src/utilities/version.js +0 -26
- package/src/utilities/version.js.map +0 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isNodeVersionSupported
|
|
3
|
+
} from "./chunk-XFL2J3CJ.js";
|
|
4
|
+
import {
|
|
5
|
+
RootCommands
|
|
6
|
+
} from "./chunk-5AASRQKS.js";
|
|
7
|
+
import {
|
|
8
|
+
CommandModule
|
|
9
|
+
} from "./chunk-YM7ILCS5.js";
|
|
10
|
+
import {
|
|
11
|
+
VERSION
|
|
12
|
+
} from "./chunk-XG3HVNIL.js";
|
|
13
|
+
import {
|
|
14
|
+
colors
|
|
15
|
+
} from "./chunk-GHUUJYOY.js";
|
|
16
|
+
import "./chunk-FZ5GFCWU.js";
|
|
17
|
+
|
|
18
|
+
// packages/angular/cli/src/commands/version/version-info.js
|
|
19
|
+
import { createRequire } from "node:module";
|
|
20
|
+
var PACKAGE_PATTERNS = [
|
|
21
|
+
/^@angular\/.*/,
|
|
22
|
+
/^@angular-devkit\/.*/,
|
|
23
|
+
/^@ngtools\/.*/,
|
|
24
|
+
/^@schematics\/.*/,
|
|
25
|
+
/^rxjs$/,
|
|
26
|
+
/^typescript$/,
|
|
27
|
+
/^ng-packagr$/,
|
|
28
|
+
/^vitest$/,
|
|
29
|
+
/^webpack$/,
|
|
30
|
+
/^zone\.js$/
|
|
31
|
+
];
|
|
32
|
+
async function gatherVersionInfo(context) {
|
|
33
|
+
const workspaceRequire = createRequire(context.root + "/");
|
|
34
|
+
let workspacePackage;
|
|
35
|
+
try {
|
|
36
|
+
workspacePackage = workspaceRequire("./package.json");
|
|
37
|
+
} catch {
|
|
38
|
+
}
|
|
39
|
+
const allDependencies = {
|
|
40
|
+
...workspacePackage?.dependencies,
|
|
41
|
+
...workspacePackage?.devDependencies
|
|
42
|
+
};
|
|
43
|
+
const packageNames = new Set(Object.keys(allDependencies));
|
|
44
|
+
const packages = {};
|
|
45
|
+
for (const name of packageNames) {
|
|
46
|
+
if (PACKAGE_PATTERNS.some((p) => p.test(name))) {
|
|
47
|
+
packages[name] = {
|
|
48
|
+
requested: allDependencies[name] ?? "error",
|
|
49
|
+
installed: getVersion(name, workspaceRequire)
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const angularCoreVersion = packages["@angular/core"];
|
|
54
|
+
return {
|
|
55
|
+
cli: {
|
|
56
|
+
version: VERSION.full
|
|
57
|
+
},
|
|
58
|
+
framework: {
|
|
59
|
+
version: angularCoreVersion?.installed
|
|
60
|
+
},
|
|
61
|
+
system: {
|
|
62
|
+
node: {
|
|
63
|
+
version: process.versions.node,
|
|
64
|
+
unsupported: !isNodeVersionSupported()
|
|
65
|
+
},
|
|
66
|
+
os: {
|
|
67
|
+
platform: process.platform,
|
|
68
|
+
architecture: process.arch
|
|
69
|
+
},
|
|
70
|
+
packageManager: {
|
|
71
|
+
name: context.packageManager.name,
|
|
72
|
+
version: await context.packageManager.getVersion()
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
packages
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function getVersion(moduleName, workspaceRequire) {
|
|
79
|
+
let packageInfo;
|
|
80
|
+
try {
|
|
81
|
+
packageInfo = workspaceRequire(`${moduleName}/package.json`);
|
|
82
|
+
} catch {
|
|
83
|
+
}
|
|
84
|
+
if (packageInfo) {
|
|
85
|
+
return packageInfo.version;
|
|
86
|
+
}
|
|
87
|
+
return "<error>";
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// packages/angular/cli/src/commands/version/cli.js
|
|
91
|
+
var ASCII_ART = `
|
|
92
|
+
_ _ ____ _ ___
|
|
93
|
+
/ \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
|
|
94
|
+
/ \u25B3 \\ | '_ \\ / _\` | | | | |/ _\` | '__| | | | | | |
|
|
95
|
+
/ ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |
|
|
96
|
+
/_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|
|
|
97
|
+
|___/
|
|
98
|
+
`.split("\n").map((x) => colors.red(x)).join("\n");
|
|
99
|
+
var VersionCommandModule = class extends CommandModule {
|
|
100
|
+
command = "version";
|
|
101
|
+
aliases = RootCommands["version"].aliases;
|
|
102
|
+
describe = "Outputs Angular CLI version.";
|
|
103
|
+
/**
|
|
104
|
+
* Builds the command-line options for the `ng version` command.
|
|
105
|
+
* @param localYargs The `yargs` instance to configure.
|
|
106
|
+
* @returns The configured `yargs` instance.
|
|
107
|
+
*/
|
|
108
|
+
builder(localYargs) {
|
|
109
|
+
return localYargs.option("json", {
|
|
110
|
+
describe: "Outputs version information in JSON format.",
|
|
111
|
+
type: "boolean"
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The main execution logic for the `ng version` command.
|
|
116
|
+
*/
|
|
117
|
+
async run(options) {
|
|
118
|
+
const { logger } = this.context;
|
|
119
|
+
const versionInfo = await gatherVersionInfo(this.context);
|
|
120
|
+
if (options.json) {
|
|
121
|
+
console.log(JSON.stringify(versionInfo, null, 2));
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const { cli: { version: ngCliVersion }, framework, system: { node: { version: nodeVersion, unsupported: unsupportedNodeVersion }, os: { platform: os, architecture: arch }, packageManager: { name: packageManagerName, version: packageManagerVersion } }, packages } = versionInfo;
|
|
125
|
+
const headerInfo = [{ label: "Angular CLI", value: ngCliVersion }];
|
|
126
|
+
if (framework.version) {
|
|
127
|
+
headerInfo.push({ label: "Angular", value: framework.version });
|
|
128
|
+
}
|
|
129
|
+
headerInfo.push({
|
|
130
|
+
label: "Node.js",
|
|
131
|
+
value: `${nodeVersion}${unsupportedNodeVersion ? colors.yellow(" (Unsupported)") : ""}`
|
|
132
|
+
}, {
|
|
133
|
+
label: "Package Manager",
|
|
134
|
+
value: `${packageManagerName} ${packageManagerVersion ?? "<error>"}`
|
|
135
|
+
}, { label: "Operating System", value: `${os} ${arch}` });
|
|
136
|
+
const maxHeaderLabelLength = Math.max(...headerInfo.map((l) => l.label.length));
|
|
137
|
+
const header = headerInfo.map(({ label, value }) => colors.bold(label.padEnd(maxHeaderLabelLength + 2)) + `: ${colors.cyan(value)}`).join("\n");
|
|
138
|
+
const packageTable = this.formatPackageTable(packages);
|
|
139
|
+
logger.info([ASCII_ART, header, packageTable].join("\n\n"));
|
|
140
|
+
if (unsupportedNodeVersion) {
|
|
141
|
+
logger.warn(`Warning: The current version of Node (${nodeVersion}) is not supported by Angular.`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Formats the package table section of the version output.
|
|
146
|
+
* @param versions A map of package names to their versions.
|
|
147
|
+
* @returns A string containing the formatted package table.
|
|
148
|
+
*/
|
|
149
|
+
formatPackageTable(versions) {
|
|
150
|
+
const versionKeys = Object.keys(versions);
|
|
151
|
+
if (versionKeys.length === 0) {
|
|
152
|
+
return "";
|
|
153
|
+
}
|
|
154
|
+
const headers = {
|
|
155
|
+
name: "Package",
|
|
156
|
+
installed: "Installed Version",
|
|
157
|
+
requested: "Requested Version"
|
|
158
|
+
};
|
|
159
|
+
const maxNameLength = Math.max(headers.name.length, ...versionKeys.map((key) => key.length));
|
|
160
|
+
const maxInstalledLength = Math.max(headers.installed.length, ...versionKeys.map((key) => versions[key].installed.length));
|
|
161
|
+
const maxRequestedLength = Math.max(headers.requested.length, ...versionKeys.map((key) => versions[key].requested.length));
|
|
162
|
+
const tableRows = versionKeys.map((module) => {
|
|
163
|
+
const { requested, installed } = versions[module];
|
|
164
|
+
const name = module.padEnd(maxNameLength);
|
|
165
|
+
const coloredInstalled = installed === "<error>" ? colors.red(installed) : colors.cyan(installed);
|
|
166
|
+
const installedPadding = " ".repeat(maxInstalledLength - installed.length);
|
|
167
|
+
return `\u2502 ${name} \u2502 ${coloredInstalled}${installedPadding} \u2502 ${requested.padEnd(maxRequestedLength)} \u2502`;
|
|
168
|
+
}).sort();
|
|
169
|
+
const top = `\u250C\u2500${"\u2500".repeat(maxNameLength)}\u2500\u252C\u2500${"\u2500".repeat(maxInstalledLength)}\u2500\u252C\u2500${"\u2500".repeat(maxRequestedLength)}\u2500\u2510`;
|
|
170
|
+
const header = `\u2502 ${headers.name.padEnd(maxNameLength)} \u2502 ${headers.installed.padEnd(maxInstalledLength)} \u2502 ${headers.requested.padEnd(maxRequestedLength)} \u2502`;
|
|
171
|
+
const separator = `\u251C\u2500${"\u2500".repeat(maxNameLength)}\u2500\u253C\u2500${"\u2500".repeat(maxInstalledLength)}\u2500\u253C\u2500${"\u2500".repeat(maxRequestedLength)}\u2500\u2524`;
|
|
172
|
+
const bottom = `\u2514\u2500${"\u2500".repeat(maxNameLength)}\u2500\u2534\u2500${"\u2500".repeat(maxInstalledLength)}\u2500\u2534\u2500${"\u2500".repeat(maxRequestedLength)}\u2500\u2518`;
|
|
173
|
+
return [top, header, separator, ...tableRows, bottom].join("\n");
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
export {
|
|
177
|
+
VersionCommandModule as default
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* @license
|
|
181
|
+
* Copyright Google LLC All Rights Reserved.
|
|
182
|
+
*
|
|
183
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
184
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
185
|
+
*/
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getCacheConfig,
|
|
3
|
+
updateCacheConfig
|
|
4
|
+
} from "./chunk-A2VIYA2E.js";
|
|
5
|
+
import {
|
|
6
|
+
addCommandModuleToYargs,
|
|
7
|
+
demandCommandFailureMessage
|
|
8
|
+
} from "./chunk-G7TRU43D.js";
|
|
9
|
+
import {
|
|
10
|
+
CommandModule,
|
|
11
|
+
CommandScope
|
|
12
|
+
} from "./chunk-YM7ILCS5.js";
|
|
13
|
+
import {
|
|
14
|
+
isCI
|
|
15
|
+
} from "./chunk-XG3HVNIL.js";
|
|
16
|
+
import {
|
|
17
|
+
colors
|
|
18
|
+
} from "./chunk-GHUUJYOY.js";
|
|
19
|
+
import "./chunk-FZ5GFCWU.js";
|
|
20
|
+
|
|
21
|
+
// packages/angular/cli/src/commands/cache/clean/cli.js
|
|
22
|
+
import { rm } from "node:fs/promises";
|
|
23
|
+
var CacheCleanModule = class extends CommandModule {
|
|
24
|
+
command = "clean";
|
|
25
|
+
describe = "Deletes persistent disk cache from disk.";
|
|
26
|
+
scope = CommandScope.In;
|
|
27
|
+
builder(localYargs) {
|
|
28
|
+
return localYargs.strict();
|
|
29
|
+
}
|
|
30
|
+
run() {
|
|
31
|
+
const { path } = getCacheConfig(this.context.workspace);
|
|
32
|
+
return rm(path, {
|
|
33
|
+
force: true,
|
|
34
|
+
recursive: true,
|
|
35
|
+
maxRetries: 3
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// packages/angular/cli/src/commands/cache/info/cli.js
|
|
41
|
+
import * as fs from "node:fs/promises";
|
|
42
|
+
import { join } from "node:path";
|
|
43
|
+
var CacheInfoCommandModule = class extends CommandModule {
|
|
44
|
+
command = "info";
|
|
45
|
+
describe = "Prints persistent disk cache configuration and statistics in the console.";
|
|
46
|
+
scope = CommandScope.In;
|
|
47
|
+
builder(localYargs) {
|
|
48
|
+
return localYargs.strict();
|
|
49
|
+
}
|
|
50
|
+
async run() {
|
|
51
|
+
const cacheConfig = getCacheConfig(this.context.workspace);
|
|
52
|
+
const { path, environment, enabled } = cacheConfig;
|
|
53
|
+
const effectiveStatus = this.effectiveEnabledStatus(cacheConfig);
|
|
54
|
+
const sizeOnDisk = await this.getSizeOfDirectory(path);
|
|
55
|
+
const info = [
|
|
56
|
+
{
|
|
57
|
+
label: "Enabled",
|
|
58
|
+
value: enabled ? colors.green("Yes") : colors.red("No")
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: "Environment",
|
|
62
|
+
value: colors.cyan(environment)
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: "Path",
|
|
66
|
+
value: colors.cyan(path)
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: "Size on disk",
|
|
70
|
+
value: colors.cyan(sizeOnDisk)
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: "Effective Status",
|
|
74
|
+
value: (effectiveStatus ? colors.green("Enabled") : colors.red("Disabled")) + " (current machine)"
|
|
75
|
+
}
|
|
76
|
+
];
|
|
77
|
+
const maxLabelLength = Math.max(...info.map((l) => l.label.length));
|
|
78
|
+
const output = info.map(({ label, value }) => colors.bold(label.padEnd(maxLabelLength + 2)) + `: ${value}`).join("\n");
|
|
79
|
+
this.context.logger.info(`
|
|
80
|
+
${colors.bold("Cache Information")}
|
|
81
|
+
|
|
82
|
+
${output}
|
|
83
|
+
`);
|
|
84
|
+
}
|
|
85
|
+
async getSizeOfDirectory(path) {
|
|
86
|
+
const directoriesStack = [path];
|
|
87
|
+
let size = 0;
|
|
88
|
+
while (directoriesStack.length) {
|
|
89
|
+
const dirPath = directoriesStack.pop();
|
|
90
|
+
let entries = [];
|
|
91
|
+
try {
|
|
92
|
+
entries = await fs.readdir(dirPath);
|
|
93
|
+
} catch {
|
|
94
|
+
}
|
|
95
|
+
for (const entry of entries) {
|
|
96
|
+
const entryPath = join(dirPath, entry);
|
|
97
|
+
const stats = await fs.stat(entryPath);
|
|
98
|
+
if (stats.isDirectory()) {
|
|
99
|
+
directoriesStack.push(entryPath);
|
|
100
|
+
}
|
|
101
|
+
size += stats.size;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return this.formatSize(size);
|
|
105
|
+
}
|
|
106
|
+
formatSize(size) {
|
|
107
|
+
if (size <= 0) {
|
|
108
|
+
return "0 bytes";
|
|
109
|
+
}
|
|
110
|
+
const abbreviations = ["bytes", "kB", "MB", "GB"];
|
|
111
|
+
const index = Math.floor(Math.log(size) / Math.log(1024));
|
|
112
|
+
const roundedSize = size / Math.pow(1024, index);
|
|
113
|
+
const fractionDigits = index === 0 ? 0 : 2;
|
|
114
|
+
return `${roundedSize.toFixed(fractionDigits)} ${abbreviations[index]}`;
|
|
115
|
+
}
|
|
116
|
+
effectiveEnabledStatus(cacheConfig) {
|
|
117
|
+
const { enabled, environment } = cacheConfig;
|
|
118
|
+
if (enabled) {
|
|
119
|
+
switch (environment) {
|
|
120
|
+
case "ci":
|
|
121
|
+
return isCI;
|
|
122
|
+
case "local":
|
|
123
|
+
return !isCI;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return enabled;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// packages/angular/cli/src/commands/cache/long-description.md
|
|
131
|
+
var long_description_default = 'Angular CLI saves a number of cachable operations on disk by default.\n\nWhen you re-run the same build, the build system restores the state of the previous build and re-uses previously performed operations, which decreases the time taken to build and test your applications and libraries.\n\nTo amend the default cache settings, add the `cli.cache` object to your [Workspace Configuration](reference/configs/workspace-config).\nThe object goes under `cli.cache` at the top level of the file, outside the `projects` sections.\n\n```jsonc\n{\n "$schema": "./node_modules/@angular/cli/lib/config/schema.json",\n "version": 1,\n "cli": {\n "cache": {\n // ...\n },\n },\n "projects": {},\n}\n```\n\nFor more information, see [cache options](reference/configs/workspace-config#cache-options).\n\n### Cache environments\n\nBy default, disk cache is only enabled for local environments. The value of environment can be one of the following:\n\n- `all` - allows disk cache on all machines.\n- `local` - allows disk cache only on development machines.\n- `ci` - allows disk cache only on continuous integration (CI) systems.\n\nTo change the environment setting to `all`, run the following command:\n\n```bash\nng config cli.cache.environment all\n```\n\nFor more information, see `environment` in [cache options](reference/configs/workspace-config#cache-options).\n\n<div class="alert is-helpful">\n\nThe Angular CLI checks for the presence and value of the `CI` environment variable to determine in which environment it is running.\n\n</div>\n\n### Cache path\n\nBy default, `.angular/cache` is used as a base directory to store cache results.\n\nTo change this path to `.cache/ng`, run the following command:\n\n```bash\nng config cli.cache.path ".cache/ng"\n```\n';
|
|
132
|
+
|
|
133
|
+
// packages/angular/cli/src/commands/cache/settings/cli.js
|
|
134
|
+
var CacheDisableModule = class extends CommandModule {
|
|
135
|
+
command = "disable";
|
|
136
|
+
aliases = "off";
|
|
137
|
+
describe = "Disables persistent disk cache for all projects in the workspace.";
|
|
138
|
+
scope = CommandScope.In;
|
|
139
|
+
builder(localYargs) {
|
|
140
|
+
return localYargs;
|
|
141
|
+
}
|
|
142
|
+
run() {
|
|
143
|
+
return updateCacheConfig(this.getWorkspaceOrThrow(), "enabled", false);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
var CacheEnableModule = class extends CommandModule {
|
|
147
|
+
command = "enable";
|
|
148
|
+
aliases = "on";
|
|
149
|
+
describe = "Enables disk cache for all projects in the workspace.";
|
|
150
|
+
scope = CommandScope.In;
|
|
151
|
+
builder(localYargs) {
|
|
152
|
+
return localYargs;
|
|
153
|
+
}
|
|
154
|
+
run() {
|
|
155
|
+
return updateCacheConfig(this.getWorkspaceOrThrow(), "enabled", true);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// packages/angular/cli/src/commands/cache/cli.js
|
|
160
|
+
var CacheCommandModule = class extends CommandModule {
|
|
161
|
+
command = "cache";
|
|
162
|
+
describe = "Configure persistent disk cache and retrieve cache statistics.";
|
|
163
|
+
longDescription = long_description_default;
|
|
164
|
+
scope = CommandScope.In;
|
|
165
|
+
builder(localYargs) {
|
|
166
|
+
const subcommands = [
|
|
167
|
+
CacheEnableModule,
|
|
168
|
+
CacheDisableModule,
|
|
169
|
+
CacheCleanModule,
|
|
170
|
+
CacheInfoCommandModule
|
|
171
|
+
].sort();
|
|
172
|
+
for (const module of subcommands) {
|
|
173
|
+
addCommandModuleToYargs(module, this.context);
|
|
174
|
+
}
|
|
175
|
+
return localYargs.demandCommand(1, demandCommandFailureMessage).strict();
|
|
176
|
+
}
|
|
177
|
+
run(_options) {
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
export {
|
|
181
|
+
CacheCommandModule as default
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* @license
|
|
185
|
+
* Copyright Google LLC All Rights Reserved.
|
|
186
|
+
*
|
|
187
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
188
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
189
|
+
*/
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addCommandModuleToYargs
|
|
3
|
+
} from "./chunk-G7TRU43D.js";
|
|
4
|
+
import {
|
|
5
|
+
CommandModule,
|
|
6
|
+
hasGlobalCliInstall,
|
|
7
|
+
initializeAutocomplete
|
|
8
|
+
} from "./chunk-YM7ILCS5.js";
|
|
9
|
+
import "./chunk-XG3HVNIL.js";
|
|
10
|
+
import {
|
|
11
|
+
colors
|
|
12
|
+
} from "./chunk-GHUUJYOY.js";
|
|
13
|
+
import {
|
|
14
|
+
assertIsError
|
|
15
|
+
} from "./chunk-FZ5GFCWU.js";
|
|
16
|
+
|
|
17
|
+
// packages/angular/cli/src/commands/completion/long-description.md
|
|
18
|
+
var long_description_default = "Setting up autocompletion configures your terminal, so pressing the `<TAB>` key while in the middle\nof typing will display various commands and options available to you. This makes it very easy to\ndiscover and use CLI commands without lots of memorization.\n\n\n\n## Automated setup\n\nThe CLI should prompt and ask to set up autocompletion for you the first time you use it (v14+).\nSimply answer \"Yes\" and the CLI will take care of the rest.\n\n```\n$ ng serve\n? 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\nAppended `source <(ng completion script)` to `/home/my-username/.bashrc`. Restart your terminal or run:\n\nsource <(ng completion script)\n\nto autocomplete `ng` commands.\n\n# Serve output...\n```\n\nIf you already refused the prompt, it won't ask again. But you can run `ng completion` to\ndo the same thing automatically.\n\nThis modifies your terminal environment to load Angular CLI autocompletion, but can't update your\ncurrent terminal session. Either restart it or run `source <(ng completion script)` directly to\nenable autocompletion in your current session.\n\nTest it out by typing `ng ser<TAB>` and it should autocomplete to `ng serve`. Ambiguous arguments\nwill show all possible options and their documentation, such as `ng generate <TAB>`.\n\n## Manual setup\n\nSome users may have highly customized terminal setups, possibly with configuration files checked\ninto source control with an opinionated structure. `ng completion` only ever appends Angular's setup\nto an existing configuration file for your current shell, or creates one if none exists. If you want\nmore control over exactly where this configuration lives, you can manually set it up by having your\nshell run at startup:\n\n```bash\nsource <(ng completion script)\n```\n\nThis is equivalent to what `ng completion` will automatically set up, and gives power users more\nflexibility in their environments when desired.\n\n## Platform support\n\nAngular CLI supports autocompletion for the Bash and Zsh shells on MacOS and Linux operating\nsystems. On Windows, Git Bash and [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/)\nusing Bash or Zsh are supported.\n\n## Global install\n\nAutocompletion works by configuring your terminal to invoke the Angular CLI on startup to load the\nsetup script. This means the terminal must be able to find and execute the Angular CLI, typically\nthrough a global install that places the binary on the user's `$PATH`. If you get\n`command not found: ng`, make sure the CLI is installed globally which you can do with the `-g`\nflag:\n\n```bash\nnpm install -g @angular/cli\n```\n";
|
|
19
|
+
|
|
20
|
+
// packages/angular/cli/src/commands/completion/cli.js
|
|
21
|
+
var CompletionCommandModule = class extends CommandModule {
|
|
22
|
+
command = "completion";
|
|
23
|
+
describe = "Set up Angular CLI autocompletion for your terminal.";
|
|
24
|
+
longDescription = long_description_default;
|
|
25
|
+
builder(localYargs) {
|
|
26
|
+
addCommandModuleToYargs(CompletionScriptCommandModule, this.context);
|
|
27
|
+
return localYargs;
|
|
28
|
+
}
|
|
29
|
+
async run() {
|
|
30
|
+
let rcFile;
|
|
31
|
+
try {
|
|
32
|
+
rcFile = await initializeAutocomplete();
|
|
33
|
+
} catch (err) {
|
|
34
|
+
assertIsError(err);
|
|
35
|
+
this.context.logger.error(err.message);
|
|
36
|
+
return 1;
|
|
37
|
+
}
|
|
38
|
+
this.context.logger.info(`
|
|
39
|
+
Appended \`source <(ng completion script)\` to \`${rcFile}\`. Restart your terminal or run the following to autocomplete \`ng\` commands:
|
|
40
|
+
|
|
41
|
+
${colors.yellow("source <(ng completion script)")}
|
|
42
|
+
`.trim());
|
|
43
|
+
if (await hasGlobalCliInstall() === false) {
|
|
44
|
+
this.context.logger.warn("Setup completed successfully, but there does not seem to be a global install of the Angular CLI. For autocompletion to work, the CLI will need to be on your `$PATH`, which is typically done with the `-g` flag in `npm install -g @angular/cli`.\n\nFor more information, see https://angular.dev/cli/completion#global-install");
|
|
45
|
+
}
|
|
46
|
+
return 0;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var CompletionScriptCommandModule = class extends CommandModule {
|
|
50
|
+
command = "script";
|
|
51
|
+
describe = "Generate a bash and zsh real-time type-ahead autocompletion script.";
|
|
52
|
+
builder(localYargs) {
|
|
53
|
+
return localYargs;
|
|
54
|
+
}
|
|
55
|
+
run() {
|
|
56
|
+
this.context.yargsInstance.showCompletionScript();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
CompletionCommandModule as default
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* @license
|
|
64
|
+
* Copyright Google LLC All Rights Reserved.
|
|
65
|
+
*
|
|
66
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
67
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
68
|
+
*/
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ArchitectCommandModule
|
|
3
|
+
} from "./chunk-CAZUOCTC.js";
|
|
4
|
+
import "./chunk-DHWVZMLH.js";
|
|
5
|
+
import "./chunk-YM7ILCS5.js";
|
|
6
|
+
import "./chunk-XG3HVNIL.js";
|
|
7
|
+
import "./chunk-GHUUJYOY.js";
|
|
8
|
+
import "./chunk-FZ5GFCWU.js";
|
|
9
|
+
|
|
10
|
+
// packages/angular/cli/src/commands/extract-i18n/cli.js
|
|
11
|
+
import { createRequire } from "node:module";
|
|
12
|
+
import { join } from "node:path";
|
|
13
|
+
var ExtractI18nCommandModule = class extends ArchitectCommandModule {
|
|
14
|
+
multiTarget = false;
|
|
15
|
+
command = "extract-i18n [project]";
|
|
16
|
+
describe = "Extracts i18n messages from source code.";
|
|
17
|
+
async findDefaultBuilderName(project) {
|
|
18
|
+
if (project.extensions["projectType"] !== "application") {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const buildTarget = project.targets.get("build");
|
|
22
|
+
if (!buildTarget) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
switch (buildTarget.builder) {
|
|
26
|
+
case "@angular-devkit/build-angular:application":
|
|
27
|
+
case "@angular-devkit/build-angular:browser-esbuild":
|
|
28
|
+
case "@angular-devkit/build-angular:browser":
|
|
29
|
+
return "@angular-devkit/build-angular:extract-i18n";
|
|
30
|
+
case "@angular/build:application":
|
|
31
|
+
return "@angular/build:extract-i18n";
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
const projectRequire = createRequire(join(this.context.root, project.root) + "/");
|
|
35
|
+
projectRequire.resolve("@angular-devkit/build-angular");
|
|
36
|
+
return "@angular-devkit/build-angular:extract-i18n";
|
|
37
|
+
} catch {
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
ExtractI18nCommandModule as default
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @license
|
|
46
|
+
* Copyright Google LLC All Rights Reserved.
|
|
47
|
+
*
|
|
48
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
49
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
50
|
+
*/
|