@angular/cli 22.2.2 → 22.3.0-next.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/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
package/lib/cli/index.js
CHANGED
|
@@ -1,113 +1,361 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import {
|
|
2
|
+
writeErrorToLogFile
|
|
3
|
+
} from "../chunk-SN4KY4Z3.js";
|
|
4
|
+
import {
|
|
5
|
+
isNodeVersionMinSupported,
|
|
6
|
+
supportedNodeVersions
|
|
7
|
+
} from "../chunk-XFL2J3CJ.js";
|
|
8
|
+
import {
|
|
9
|
+
RootCommands,
|
|
10
|
+
RootCommandsAliases
|
|
11
|
+
} from "../chunk-5AASRQKS.js";
|
|
12
|
+
import {
|
|
13
|
+
getCacheConfig
|
|
14
|
+
} from "../chunk-A2VIYA2E.js";
|
|
15
|
+
import {
|
|
16
|
+
addCommandModuleToYargs,
|
|
17
|
+
demandCommandFailureMessage
|
|
18
|
+
} from "../chunk-G7TRU43D.js";
|
|
19
|
+
import {
|
|
20
|
+
CommandModuleError,
|
|
21
|
+
createPackageManager
|
|
22
|
+
} from "../chunk-YM7ILCS5.js";
|
|
23
|
+
import {
|
|
24
|
+
VERSION,
|
|
25
|
+
ngDebug
|
|
26
|
+
} from "../chunk-XG3HVNIL.js";
|
|
27
|
+
import {
|
|
28
|
+
colors,
|
|
29
|
+
supportColor
|
|
30
|
+
} from "../chunk-GHUUJYOY.js";
|
|
31
|
+
import {
|
|
32
|
+
assertIsError,
|
|
33
|
+
getProjectByCwd,
|
|
34
|
+
getWorkspace
|
|
35
|
+
} from "../chunk-FZ5GFCWU.js";
|
|
36
|
+
|
|
37
|
+
// packages/angular/cli/lib/cli/index.js
|
|
38
|
+
import { logging } from "@angular-devkit/core";
|
|
39
|
+
import { format, stripVTControlCharacters } from "node:util";
|
|
40
|
+
|
|
41
|
+
// packages/angular/cli/src/command-builder/command-runner.js
|
|
42
|
+
import { isJsonObject } from "@angular-devkit/core";
|
|
43
|
+
import { readFile } from "node:fs/promises";
|
|
44
|
+
import { join } from "node:path";
|
|
45
|
+
import yargs from "yargs";
|
|
46
|
+
import { Parser as yargsParser } from "yargs/helpers";
|
|
47
|
+
|
|
48
|
+
// packages/angular/cli/src/command-builder/utilities/json-help.js
|
|
49
|
+
var yargsDefaultCommandRegExp = /^\$0|\*/;
|
|
50
|
+
function jsonHelpUsage(localYargs) {
|
|
51
|
+
const localYargsInstance = localYargs;
|
|
52
|
+
const { deprecatedOptions, alias: aliases, array, string, boolean, number, choices, demandedOptions, default: defaultVal, hiddenOptions = [] } = localYargsInstance.getOptions();
|
|
53
|
+
const internalMethods = localYargsInstance.getInternalMethods();
|
|
54
|
+
const usageInstance = internalMethods.getUsageInstance();
|
|
55
|
+
const context = internalMethods.getContext();
|
|
56
|
+
const descriptions = usageInstance.getDescriptions();
|
|
57
|
+
const groups = localYargsInstance.getGroups();
|
|
58
|
+
const positional = groups[usageInstance.getPositionalGroupName()];
|
|
59
|
+
const seen = /* @__PURE__ */ new Set();
|
|
60
|
+
const hidden = new Set(hiddenOptions);
|
|
61
|
+
const normalizeOptions = [];
|
|
62
|
+
const allAliases = /* @__PURE__ */ new Set([...Object.values(aliases).flat()]);
|
|
63
|
+
for (const [names, type] of [
|
|
64
|
+
[number, "number"],
|
|
65
|
+
[array, "array"],
|
|
66
|
+
[string, "string"],
|
|
67
|
+
[boolean, "boolean"]
|
|
68
|
+
]) {
|
|
69
|
+
for (const name of names) {
|
|
70
|
+
if (allAliases.has(name) || hidden.has(name) || seen.has(name)) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
seen.add(name);
|
|
74
|
+
const positionalIndex = positional?.indexOf(name) ?? -1;
|
|
75
|
+
const alias = aliases[name];
|
|
76
|
+
normalizeOptions.push({
|
|
77
|
+
name,
|
|
78
|
+
type,
|
|
79
|
+
deprecated: deprecatedOptions[name],
|
|
80
|
+
aliases: alias?.length > 0 ? alias : void 0,
|
|
81
|
+
default: defaultVal[name],
|
|
82
|
+
required: demandedOptions[name],
|
|
83
|
+
enum: choices[name],
|
|
84
|
+
description: descriptions[name]?.replace("__yargsString__:", ""),
|
|
85
|
+
positional: positionalIndex >= 0 ? positionalIndex : void 0
|
|
86
|
+
});
|
|
30
87
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
});
|
|
60
|
-
// Redirect console to logger
|
|
61
|
-
console.info = console.log = function (...args) {
|
|
62
|
-
logger.info((0, node_util_1.format)(...args));
|
|
88
|
+
}
|
|
89
|
+
const subcommands = usageInstance.getCommands().map(([name, rawDescription2, isDefault, aliases2, deprecated]) => ({
|
|
90
|
+
name: name.split(" ", 1)[0].replace(yargsDefaultCommandRegExp, ""),
|
|
91
|
+
command: name.replace(yargsDefaultCommandRegExp, ""),
|
|
92
|
+
default: isDefault || void 0,
|
|
93
|
+
...parseDescription(rawDescription2),
|
|
94
|
+
aliases: aliases2,
|
|
95
|
+
deprecated
|
|
96
|
+
})).sort((a, b) => a.name.localeCompare(b.name));
|
|
97
|
+
const [command, rawDescription] = usageInstance.getUsage()[0] ?? [];
|
|
98
|
+
const defaultSubCommand = subcommands.find((x) => x.default)?.command ?? "";
|
|
99
|
+
const otherSubcommands = subcommands.filter((s) => !s.default);
|
|
100
|
+
const output = {
|
|
101
|
+
name: [...context.commands].pop(),
|
|
102
|
+
command: `${command?.replace(yargsDefaultCommandRegExp, localYargsInstance["$0"])}${defaultSubCommand}`,
|
|
103
|
+
...parseDescription(rawDescription),
|
|
104
|
+
options: normalizeOptions.sort((a, b) => a.name.localeCompare(b.name)),
|
|
105
|
+
subcommands: otherSubcommands.length ? otherSubcommands : void 0
|
|
106
|
+
};
|
|
107
|
+
return JSON.stringify(output, void 0, 2);
|
|
108
|
+
}
|
|
109
|
+
function parseDescription(rawDescription) {
|
|
110
|
+
try {
|
|
111
|
+
const { longDescription, describe: shortDescription, longDescriptionRelativePath } = JSON.parse(rawDescription);
|
|
112
|
+
return {
|
|
113
|
+
shortDescription,
|
|
114
|
+
longDescriptionRelativePath,
|
|
115
|
+
longDescription
|
|
63
116
|
};
|
|
64
|
-
|
|
65
|
-
|
|
117
|
+
} catch {
|
|
118
|
+
return {
|
|
119
|
+
shortDescription: rawDescription
|
|
66
120
|
};
|
|
67
|
-
|
|
68
|
-
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// packages/angular/cli/src/command-builder/utilities/normalize-options-middleware.js
|
|
125
|
+
function createNormalizeOptionsMiddleware(localeYargs) {
|
|
126
|
+
return (args) => {
|
|
127
|
+
const { array } = localeYargs.getOptions();
|
|
128
|
+
const arrayOptions = new Set(array);
|
|
129
|
+
for (const [key, value] of Object.entries(args)) {
|
|
130
|
+
if (key !== "_" && Array.isArray(value) && !arrayOptions.has(key)) {
|
|
131
|
+
const newValue = value.pop();
|
|
132
|
+
console.warn(`Option '${key}' has been specified multiple times. The value '${newValue}' will be used.`);
|
|
133
|
+
args[key] = newValue;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// packages/angular/cli/src/command-builder/command-runner.js
|
|
140
|
+
async function runCommand(args, logger) {
|
|
141
|
+
const { $0, _, help = false, dryRun = false, jsonHelp = false, getYargsCompletions = false, ...rest } = yargsParser(args, {
|
|
142
|
+
boolean: ["help", "json-help", "get-yargs-completions", "dry-run"],
|
|
143
|
+
alias: { "collection": "c" }
|
|
144
|
+
});
|
|
145
|
+
const positional = getYargsCompletions ? _.slice(1) : _;
|
|
146
|
+
let workspace;
|
|
147
|
+
let globalConfiguration;
|
|
148
|
+
try {
|
|
149
|
+
[workspace, globalConfiguration] = await Promise.all([
|
|
150
|
+
getWorkspace("local"),
|
|
151
|
+
getWorkspace("global")
|
|
152
|
+
]);
|
|
153
|
+
} catch (e) {
|
|
154
|
+
assertIsError(e);
|
|
155
|
+
logger.fatal(e.message);
|
|
156
|
+
return 1;
|
|
157
|
+
}
|
|
158
|
+
const root = workspace?.basePath ?? process.cwd();
|
|
159
|
+
const cacheConfig = workspace && getCacheConfig(workspace);
|
|
160
|
+
const packageManager = await createPackageManager({
|
|
161
|
+
cwd: root,
|
|
162
|
+
logger,
|
|
163
|
+
dryRun: dryRun || help || jsonHelp || getYargsCompletions,
|
|
164
|
+
tempDirectory: cacheConfig?.enabled ? cacheConfig.path : void 0,
|
|
165
|
+
configuredPackageManager: await getConfiguredPackageManager(root, workspace, globalConfiguration)
|
|
166
|
+
});
|
|
167
|
+
const localYargs = yargs(args);
|
|
168
|
+
const context = {
|
|
169
|
+
globalConfiguration,
|
|
170
|
+
workspace,
|
|
171
|
+
logger,
|
|
172
|
+
currentDirectory: process.cwd(),
|
|
173
|
+
yargsInstance: localYargs,
|
|
174
|
+
root,
|
|
175
|
+
packageManager,
|
|
176
|
+
args: {
|
|
177
|
+
positional: positional.map((v) => v.toString()),
|
|
178
|
+
options: {
|
|
179
|
+
help,
|
|
180
|
+
jsonHelp,
|
|
181
|
+
getYargsCompletions,
|
|
182
|
+
...rest
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
for (const CommandModule of await getCommandsToRegister(positional[0])) {
|
|
187
|
+
addCommandModuleToYargs(CommandModule, context);
|
|
188
|
+
}
|
|
189
|
+
const usageInstance = localYargs.getInternalMethods().getUsageInstance();
|
|
190
|
+
if (jsonHelp) {
|
|
191
|
+
usageInstance.help = () => jsonHelpUsage(localYargs);
|
|
192
|
+
} else if (!help) {
|
|
193
|
+
usageInstance.cacheHelpMessage = () => {
|
|
69
194
|
};
|
|
70
|
-
|
|
71
|
-
|
|
195
|
+
}
|
|
196
|
+
localYargs.command("*", false, (builder) => builder.version("version", "Show Angular CLI version.", VERSION.full));
|
|
197
|
+
await localYargs.scriptName("ng").parserConfiguration({
|
|
198
|
+
"populate--": true,
|
|
199
|
+
"unknown-options-as-args": false,
|
|
200
|
+
"dot-notation": false,
|
|
201
|
+
"boolean-negation": true,
|
|
202
|
+
"strip-aliased": true,
|
|
203
|
+
"strip-dashed": true,
|
|
204
|
+
"camel-case-expansion": false
|
|
205
|
+
}).option("json-help", {
|
|
206
|
+
describe: "Show help in JSON format.",
|
|
207
|
+
implies: ["help"],
|
|
208
|
+
hidden: true,
|
|
209
|
+
type: "boolean"
|
|
210
|
+
}).help("help", "Shows a help message for this command in the console.").updateStrings({
|
|
211
|
+
"Commands:": colors.cyan("Commands:"),
|
|
212
|
+
"Options:": colors.cyan("Options:"),
|
|
213
|
+
"Positionals:": colors.cyan("Arguments:"),
|
|
214
|
+
"deprecated": colors.yellow("deprecated"),
|
|
215
|
+
"deprecated: %s": colors.yellow("deprecated:") + " %s",
|
|
216
|
+
"Did you mean %s?": "Unknown command. Did you mean %s?"
|
|
217
|
+
}).epilogue("For more information, see https://angular.dev/cli/.\n").demandCommand(1, demandCommandFailureMessage).recommendCommands().middleware(createNormalizeOptionsMiddleware(localYargs)).version(false).showHelpOnFail(false).strict().fail((msg, err) => {
|
|
218
|
+
throw msg ? (
|
|
219
|
+
// Validation failed example: `Unknown argument:`
|
|
220
|
+
new CommandModuleError(msg)
|
|
221
|
+
) : (
|
|
222
|
+
// Unknown exception, re-throw.
|
|
223
|
+
err
|
|
224
|
+
);
|
|
225
|
+
}).wrap(localYargs.terminalWidth()).parseAsync();
|
|
226
|
+
return +(process.exitCode ?? 0);
|
|
227
|
+
}
|
|
228
|
+
async function getCommandsToRegister(commandName) {
|
|
229
|
+
const commands = [];
|
|
230
|
+
if (commandName in RootCommands) {
|
|
231
|
+
commands.push(RootCommands[commandName]);
|
|
232
|
+
} else if (commandName in RootCommandsAliases) {
|
|
233
|
+
commands.push(RootCommandsAliases[commandName]);
|
|
234
|
+
} else {
|
|
235
|
+
Object.values(RootCommands).forEach((c) => commands.push(c));
|
|
236
|
+
}
|
|
237
|
+
return Promise.all(commands.map((command) => command.factory().then((m) => m.default)));
|
|
238
|
+
}
|
|
239
|
+
async function getConfiguredPackageManager(root, localWorkspace, globalWorkspace) {
|
|
240
|
+
let result;
|
|
241
|
+
try {
|
|
242
|
+
const packageJsonPath = join(root, "package.json");
|
|
243
|
+
const pkgJson = JSON.parse(await readFile(packageJsonPath, "utf-8"));
|
|
244
|
+
result = getPackageManager(pkgJson);
|
|
245
|
+
} catch {
|
|
246
|
+
}
|
|
247
|
+
if (result) {
|
|
248
|
+
return result;
|
|
249
|
+
}
|
|
250
|
+
if (localWorkspace) {
|
|
251
|
+
const project = getProjectByCwd(localWorkspace);
|
|
252
|
+
if (project) {
|
|
253
|
+
result = getPackageManager(localWorkspace.projects.get(project)?.extensions["cli"]);
|
|
72
254
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
255
|
+
result ??= getPackageManager(localWorkspace.extensions["cli"]);
|
|
256
|
+
}
|
|
257
|
+
result ??= getPackageManager(globalWorkspace.extensions["cli"]);
|
|
258
|
+
return result;
|
|
259
|
+
}
|
|
260
|
+
function getPackageManager(source) {
|
|
261
|
+
if (source && isJsonObject(source)) {
|
|
262
|
+
const value = source["packageManager"];
|
|
263
|
+
if (typeof value === "string") {
|
|
264
|
+
return value.split("@", 2);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
return void 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// packages/angular/cli/lib/cli/index.js
|
|
271
|
+
async function execute(options) {
|
|
272
|
+
if (!isNodeVersionMinSupported()) {
|
|
273
|
+
process.stderr.write(`Node.js version ${process.version} detected.
|
|
274
|
+
The Angular CLI requires a minimum of v${supportedNodeVersions[0]}.
|
|
275
|
+
|
|
276
|
+
Please update your Node.js version or visit https://nodejs.org/ for additional instructions.
|
|
277
|
+
`);
|
|
278
|
+
return 3;
|
|
279
|
+
}
|
|
280
|
+
const colorLevels = {
|
|
281
|
+
info: (s) => s,
|
|
282
|
+
debug: (s) => s,
|
|
283
|
+
warn: (s) => colors.bold(colors.yellow(s)),
|
|
284
|
+
error: (s) => colors.bold(colors.red(s)),
|
|
285
|
+
fatal: (s) => colors.bold(colors.red(s))
|
|
286
|
+
};
|
|
287
|
+
const logger = new logging.IndentLogger("cli-main-logger");
|
|
288
|
+
const logInfo = console.log;
|
|
289
|
+
const logWarn = console.warn;
|
|
290
|
+
const logError = console.error;
|
|
291
|
+
const useColor = supportColor();
|
|
292
|
+
const loggerFinished = logger.forEach((entry) => {
|
|
293
|
+
if (!ngDebug && entry.level === "debug") {
|
|
294
|
+
return;
|
|
102
295
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
296
|
+
const color = useColor ? colorLevels[entry.level] : stripVTControlCharacters;
|
|
297
|
+
const message = color(entry.message);
|
|
298
|
+
switch (entry.level) {
|
|
299
|
+
case "warn":
|
|
300
|
+
case "fatal":
|
|
301
|
+
case "error":
|
|
302
|
+
logError(message);
|
|
303
|
+
break;
|
|
304
|
+
default:
|
|
305
|
+
logInfo(message);
|
|
306
|
+
break;
|
|
111
307
|
}
|
|
308
|
+
});
|
|
309
|
+
console.info = console.log = function(...args) {
|
|
310
|
+
logger.info(format(...args));
|
|
311
|
+
};
|
|
312
|
+
console.warn = function(...args) {
|
|
313
|
+
logger.warn(format(...args));
|
|
314
|
+
};
|
|
315
|
+
console.error = function(...args) {
|
|
316
|
+
logger.error(format(...args));
|
|
317
|
+
};
|
|
318
|
+
try {
|
|
319
|
+
return await runCommand(options.cliArgs, logger);
|
|
320
|
+
} catch (err) {
|
|
321
|
+
if (err instanceof CommandModuleError) {
|
|
322
|
+
logger.fatal(`Error: ${err.message}`);
|
|
323
|
+
} else if (err instanceof Error) {
|
|
324
|
+
try {
|
|
325
|
+
const logPath = writeErrorToLogFile(err);
|
|
326
|
+
logger.fatal(`An unhandled exception occurred: ${err.message}
|
|
327
|
+
See "${logPath}" for further details.`);
|
|
328
|
+
} catch (e) {
|
|
329
|
+
logger.fatal(`An unhandled exception occurred: ${err.message}
|
|
330
|
+
Fatal error writing debug log file: ${e}`);
|
|
331
|
+
if (err.stack) {
|
|
332
|
+
logger.fatal(err.stack);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
return 127;
|
|
336
|
+
} else if (typeof err === "string") {
|
|
337
|
+
logger.fatal(err);
|
|
338
|
+
} else if (typeof err === "number") {
|
|
339
|
+
} else {
|
|
340
|
+
logger.fatal(`An unexpected error occurred: ${err}`);
|
|
341
|
+
}
|
|
342
|
+
return 1;
|
|
343
|
+
} finally {
|
|
344
|
+
logger.complete();
|
|
345
|
+
await loggerFinished;
|
|
346
|
+
console.log = console.info = logInfo;
|
|
347
|
+
console.warn = logWarn;
|
|
348
|
+
console.error = logError;
|
|
349
|
+
}
|
|
112
350
|
}
|
|
113
|
-
|
|
351
|
+
export {
|
|
352
|
+
VERSION,
|
|
353
|
+
execute as default
|
|
354
|
+
};
|
|
355
|
+
/**
|
|
356
|
+
* @license
|
|
357
|
+
* Copyright Google LLC All Rights Reserved.
|
|
358
|
+
*
|
|
359
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
360
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
361
|
+
*/
|
|
@@ -0,0 +1,48 @@
|
|
|
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/deploy/long-description.md
|
|
11
|
+
var long_description_default = 'The command takes an optional project name, as specified in the `projects` section of the `angular.json` workspace configuration file.\nWhen a project name is not supplied, executes the `deploy` builder for the default project.\n\nTo use the `ng deploy` command, use `ng add` to add a package that implements deployment capabilities to your favorite platform.\nAdding the package automatically updates your workspace configuration, adding a deployment\n[CLI builder](tools/cli/cli-builder).\nFor example:\n\n```json\n"projects": {\n "my-project": {\n ...\n "architect": {\n ...\n "deploy": {\n "builder": "@angular/fire:deploy",\n "options": {}\n }\n }\n }\n}\n```\n';
|
|
12
|
+
|
|
13
|
+
// packages/angular/cli/src/commands/deploy/cli.js
|
|
14
|
+
var DeployCommandModule = class extends ArchitectCommandModule {
|
|
15
|
+
// The below choices should be kept in sync with the list in https://angular.dev/tools/cli/deployment
|
|
16
|
+
missingTargetChoices = [
|
|
17
|
+
{
|
|
18
|
+
name: "Amazon S3",
|
|
19
|
+
value: "@jefiozie/ngx-aws-deploy"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "Firebase",
|
|
23
|
+
value: "@angular/fire"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "Netlify",
|
|
27
|
+
value: "@netlify-builder/deploy"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "GitHub Pages",
|
|
31
|
+
value: "angular-cli-ghpages"
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
multiTarget = false;
|
|
35
|
+
command = "deploy [project]";
|
|
36
|
+
longDescription = long_description_default;
|
|
37
|
+
describe = "Invokes the deploy builder for a specified project or for the default project in the workspace.";
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
DeployCommandModule as default
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @license
|
|
44
|
+
* Copyright Google LLC All Rights Reserved.
|
|
45
|
+
*
|
|
46
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
47
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
48
|
+
*/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ArchitectCommandModule
|
|
3
|
+
} from "./chunk-CAZUOCTC.js";
|
|
4
|
+
import "./chunk-DHWVZMLH.js";
|
|
5
|
+
import {
|
|
6
|
+
RootCommands
|
|
7
|
+
} from "./chunk-5AASRQKS.js";
|
|
8
|
+
import "./chunk-YM7ILCS5.js";
|
|
9
|
+
import "./chunk-XG3HVNIL.js";
|
|
10
|
+
import "./chunk-GHUUJYOY.js";
|
|
11
|
+
import "./chunk-FZ5GFCWU.js";
|
|
12
|
+
|
|
13
|
+
// packages/angular/cli/src/commands/test/long-description.md
|
|
14
|
+
var long_description_default = "Takes the name of the project, as specified in the `projects` section of the `angular.json` workspace configuration file.\nWhen a project name is not supplied, it will execute for all projects.\n";
|
|
15
|
+
|
|
16
|
+
// packages/angular/cli/src/commands/test/cli.js
|
|
17
|
+
var TestCommandModule = class extends ArchitectCommandModule {
|
|
18
|
+
multiTarget = true;
|
|
19
|
+
command = "test [project]";
|
|
20
|
+
aliases = RootCommands["test"].aliases;
|
|
21
|
+
describe = "Runs unit tests in a project.";
|
|
22
|
+
longDescription = long_description_default;
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
TestCommandModule as default
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright Google LLC All Rights Reserved.
|
|
30
|
+
*
|
|
31
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
32
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
33
|
+
*/
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ArchitectBaseCommandModule
|
|
3
|
+
} from "./chunk-DHWVZMLH.js";
|
|
4
|
+
import {
|
|
5
|
+
CommandModuleError,
|
|
6
|
+
CommandScope
|
|
7
|
+
} from "./chunk-YM7ILCS5.js";
|
|
8
|
+
import "./chunk-XG3HVNIL.js";
|
|
9
|
+
import "./chunk-GHUUJYOY.js";
|
|
10
|
+
import "./chunk-FZ5GFCWU.js";
|
|
11
|
+
|
|
12
|
+
// packages/angular/cli/src/commands/run/long-description.md
|
|
13
|
+
var long_description_default = "Architect is the tool that the CLI uses to perform complex tasks such as compilation, according to provided configurations.\nThe CLI commands run Architect targets such as `build`, `serve`, `test`, and `lint`.\nEach named target has a default configuration, specified by an `options` object,\nand an optional set of named alternate configurations in the `configurations` object.\n\nFor example, the `serve` target for a newly generated app has a predefined\nalternate configuration named `production`.\n\nYou can define new targets and their configuration options in the `architect` section\nof the `angular.json` file which you can run them from the command line using the `ng run` command.\n";
|
|
14
|
+
|
|
15
|
+
// packages/angular/cli/src/commands/run/cli.js
|
|
16
|
+
var RunCommandModule = class extends ArchitectBaseCommandModule {
|
|
17
|
+
scope = CommandScope.In;
|
|
18
|
+
command = "run <target>";
|
|
19
|
+
describe = "Runs an Architect target with an optional custom builder configuration defined in your project.";
|
|
20
|
+
longDescription = long_description_default;
|
|
21
|
+
async builder(argv) {
|
|
22
|
+
const { jsonHelp, getYargsCompletions, help } = this.context.args.options;
|
|
23
|
+
const localYargs = argv.positional("target", {
|
|
24
|
+
describe: "The Architect target to run provided in the following format `project:target[:configuration]`.",
|
|
25
|
+
type: "string",
|
|
26
|
+
demandOption: true,
|
|
27
|
+
// Show only in when using --help and auto completion because otherwise comma seperated configuration values will be invalid.
|
|
28
|
+
// Also, hide choices from JSON help so that we don't display them in AIO.
|
|
29
|
+
choices: (getYargsCompletions || help) && !jsonHelp ? this.getTargetChoices() : void 0
|
|
30
|
+
}).middleware((args) => {
|
|
31
|
+
const { configuration, target: target2 } = args;
|
|
32
|
+
if (typeof configuration === "string" && target2) {
|
|
33
|
+
const targetWithConfig = target2.split(":", 2);
|
|
34
|
+
targetWithConfig.push(configuration);
|
|
35
|
+
throw new CommandModuleError(`Unknown argument: configuration.
|
|
36
|
+
Provide the configuration as part of the target 'ng run ${targetWithConfig.join(":")}'.`);
|
|
37
|
+
}
|
|
38
|
+
}, true).strict();
|
|
39
|
+
const target = this.makeTargetSpecifier();
|
|
40
|
+
if (!target) {
|
|
41
|
+
return localYargs;
|
|
42
|
+
}
|
|
43
|
+
const schemaOptions = await this.getArchitectTargetOptions(target);
|
|
44
|
+
return this.addSchemaOptionsToCommand(localYargs, schemaOptions);
|
|
45
|
+
}
|
|
46
|
+
async run(options) {
|
|
47
|
+
const target = this.makeTargetSpecifier(options);
|
|
48
|
+
const { target: _target, ...extraOptions } = options;
|
|
49
|
+
if (!target) {
|
|
50
|
+
throw new CommandModuleError("Cannot determine project or target.");
|
|
51
|
+
}
|
|
52
|
+
return this.runSingleTarget(target, extraOptions);
|
|
53
|
+
}
|
|
54
|
+
makeTargetSpecifier(options) {
|
|
55
|
+
const architectTarget = options?.target ?? this.context.args.positional[1];
|
|
56
|
+
if (!architectTarget) {
|
|
57
|
+
return void 0;
|
|
58
|
+
}
|
|
59
|
+
const [project = "", target = "", configuration] = architectTarget.split(":");
|
|
60
|
+
return {
|
|
61
|
+
project,
|
|
62
|
+
target,
|
|
63
|
+
configuration
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/** @returns a sorted list of target specifiers to be used for auto completion. */
|
|
67
|
+
getTargetChoices() {
|
|
68
|
+
if (!this.context.workspace) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const targets = [];
|
|
72
|
+
for (const [projectName, project] of this.context.workspace.projects) {
|
|
73
|
+
for (const [targetName, target] of project.targets) {
|
|
74
|
+
const currentTarget = `${projectName}:${targetName}`;
|
|
75
|
+
targets.push(currentTarget);
|
|
76
|
+
if (!target.configurations) {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
for (const configName of Object.keys(target.configurations)) {
|
|
80
|
+
targets.push(`${currentTarget}:${configName}`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return targets.sort();
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
export {
|
|
88
|
+
RunCommandModule as default
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* @license
|
|
92
|
+
* Copyright Google LLC All Rights Reserved.
|
|
93
|
+
*
|
|
94
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
95
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
96
|
+
*/
|