@angular/cli 22.2.0 → 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 +210 -6
- 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 -85
- 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 -211
- 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
|
@@ -1,541 +0,0 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.LIST_PROJECTS_TOOL = void 0;
|
|
14
|
-
const node_fs_1 = require("node:fs");
|
|
15
|
-
const promises_1 = require("node:fs/promises");
|
|
16
|
-
const node_path_1 = require("node:path");
|
|
17
|
-
const node_url_1 = require("node:url");
|
|
18
|
-
const semver_1 = __importDefault(require("semver"));
|
|
19
|
-
const zod_1 = require("zod");
|
|
20
|
-
const config_1 = require("../../../utilities/config");
|
|
21
|
-
const error_1 = require("../../../utilities/error");
|
|
22
|
-
const tool_registry_1 = require("./tool-registry");
|
|
23
|
-
// Single source of truth for what constitutes a valid style language.
|
|
24
|
-
const styleLanguageSchema = zod_1.z.enum(['css', 'scss', 'sass', 'less']);
|
|
25
|
-
const VALID_STYLE_LANGUAGES = styleLanguageSchema.options;
|
|
26
|
-
// Explicitly ordered for the file system search heuristic.
|
|
27
|
-
const STYLE_LANGUAGE_SEARCH_ORDER = ['scss', 'sass', 'less', 'css'];
|
|
28
|
-
function isStyleLanguage(value) {
|
|
29
|
-
return (typeof value === 'string' && VALID_STYLE_LANGUAGES.includes(value));
|
|
30
|
-
}
|
|
31
|
-
function getStyleLanguageFromExtension(extension) {
|
|
32
|
-
const style = extension.toLowerCase().substring(1); // remove leading '.'
|
|
33
|
-
return isStyleLanguage(style) ? style : undefined;
|
|
34
|
-
}
|
|
35
|
-
const listProjectsOutputSchema = {
|
|
36
|
-
workspaces: zod_1.z.array(zod_1.z.object({
|
|
37
|
-
path: zod_1.z.string().describe('The path to the `angular.json` file for this workspace.'),
|
|
38
|
-
frameworkVersion: zod_1.z
|
|
39
|
-
.string()
|
|
40
|
-
.optional()
|
|
41
|
-
.describe('The major version of the Angular framework (`@angular/core`) in this workspace, if found.'),
|
|
42
|
-
projects: zod_1.z.array(zod_1.z.object({
|
|
43
|
-
name: zod_1.z
|
|
44
|
-
.string()
|
|
45
|
-
.describe('The name of the project, as defined in the `angular.json` file.'),
|
|
46
|
-
type: zod_1.z
|
|
47
|
-
.enum(['application', 'library'])
|
|
48
|
-
.optional()
|
|
49
|
-
.describe(`The type of the project, either 'application' or 'library'.`),
|
|
50
|
-
builder: zod_1.z
|
|
51
|
-
.string()
|
|
52
|
-
.optional()
|
|
53
|
-
.describe('The primary builder for the project, typically from the "build" target.'),
|
|
54
|
-
root: zod_1.z
|
|
55
|
-
.string()
|
|
56
|
-
.describe('The root directory of the project, relative to the workspace root.'),
|
|
57
|
-
sourceRoot: zod_1.z
|
|
58
|
-
.string()
|
|
59
|
-
.describe(`The root directory of the project's source files, relative to the workspace root.`),
|
|
60
|
-
selectorPrefix: zod_1.z
|
|
61
|
-
.string()
|
|
62
|
-
.optional()
|
|
63
|
-
.describe('The prefix to use for component selectors.' +
|
|
64
|
-
` For example, a prefix of 'app' would result in selectors like '<app-my-component>'.`),
|
|
65
|
-
unitTestFramework: zod_1.z
|
|
66
|
-
.enum(['jasmine', 'jest', 'vitest', 'unknown'])
|
|
67
|
-
.optional()
|
|
68
|
-
.describe('The unit test framework used by the project, such as Jasmine, Jest, or Vitest. ' +
|
|
69
|
-
'This field is critical for generating correct and idiomatic unit tests. ' +
|
|
70
|
-
'When writing or modifying tests, you MUST use the APIs corresponding to this framework.'),
|
|
71
|
-
styleLanguage: styleLanguageSchema
|
|
72
|
-
.optional()
|
|
73
|
-
.describe('The default style language for the project (e.g., "scss"). ' +
|
|
74
|
-
'This determines the file extension for new component styles.'),
|
|
75
|
-
targets: zod_1.z
|
|
76
|
-
.array(zod_1.z.string())
|
|
77
|
-
.describe('Available project targets (e.g., ["build", "test", "lint", "e2e"]).'),
|
|
78
|
-
})),
|
|
79
|
-
})),
|
|
80
|
-
parsingErrors: zod_1.z
|
|
81
|
-
.array(zod_1.z.object({
|
|
82
|
-
filePath: zod_1.z.string().describe('The path to the file that could not be parsed.'),
|
|
83
|
-
message: zod_1.z.string().describe('The error message detailing why parsing failed.'),
|
|
84
|
-
}))
|
|
85
|
-
.default([])
|
|
86
|
-
.describe('A list of files that looked like workspaces but failed to parse.'),
|
|
87
|
-
versioningErrors: zod_1.z
|
|
88
|
-
.array(zod_1.z.object({
|
|
89
|
-
filePath: zod_1.z
|
|
90
|
-
.string()
|
|
91
|
-
.describe('The path to the workspace `angular.json` for which versioning failed.'),
|
|
92
|
-
message: zod_1.z.string().describe('The error message detailing why versioning failed.'),
|
|
93
|
-
}))
|
|
94
|
-
.default([])
|
|
95
|
-
.describe('A list of workspaces for which the framework version could not be determined.'),
|
|
96
|
-
};
|
|
97
|
-
exports.LIST_PROJECTS_TOOL = (0, tool_registry_1.declareTool)({
|
|
98
|
-
name: 'list_projects',
|
|
99
|
-
title: 'List Angular Projects',
|
|
100
|
-
description: `
|
|
101
|
-
<Purpose>
|
|
102
|
-
Provides a comprehensive overview of all Angular workspaces, projects, and configured targets within the repository.
|
|
103
|
-
Always use this tool as a mandatory first step before performing any project-specific actions
|
|
104
|
-
to understand the available projects and locations.
|
|
105
|
-
</Purpose>
|
|
106
|
-
<Use Cases>
|
|
107
|
-
* Discovering project names, locations, builders, selector prefixes, and style languages before generating or building components.
|
|
108
|
-
* Determining a project's unit test framework (Jasmine, Jest, or Vitest) before writing or modifying tests.
|
|
109
|
-
* Identifying available execution targets (e.g., lint, e2e, serve, deploy) before attempting execution.
|
|
110
|
-
* Disambiguating multiple workspaces in monorepos.
|
|
111
|
-
</Use Cases>
|
|
112
|
-
<Operational Notes>
|
|
113
|
-
* Execute shell/CLI commands from the parent directory of the workspace's 'path' field.
|
|
114
|
-
* If 'unitTestFramework' is 'unknown', inspect local config files (e.g., jest.config.js, karma.conf.js)
|
|
115
|
-
or the 'test' target in 'angular.json' to determine the framework before creating tests.
|
|
116
|
-
</Operational Notes>`,
|
|
117
|
-
outputSchema: listProjectsOutputSchema,
|
|
118
|
-
isReadOnly: true,
|
|
119
|
-
isLocalOnly: true,
|
|
120
|
-
factory: createListProjectsHandler,
|
|
121
|
-
});
|
|
122
|
-
const EXCLUDED_DIRS = new Set(['node_modules', 'dist', 'out', 'coverage']);
|
|
123
|
-
const IGNORED_FILE_SYSTEM_ERRORS = new Set(['EACCES', 'EPERM', 'ENOENT', 'EBUSY', 'EBADF']);
|
|
124
|
-
function isIgnorableFileError(error) {
|
|
125
|
-
return !!error.code && IGNORED_FILE_SYSTEM_ERRORS.has(error.code);
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Iteratively finds all 'angular.json' files with controlled concurrency and directory exclusions.
|
|
129
|
-
* This non-recursive implementation is suitable for very large directory trees,
|
|
130
|
-
* prevents file descriptor exhaustion (`EMFILE` errors), and handles symbolic link loops.
|
|
131
|
-
* @param rootDir The directory to start the search from.
|
|
132
|
-
* @param allowedRealRoots A list of allowed real root directories (resolved paths) to restrict symbolic link traversal.
|
|
133
|
-
* @returns An async generator that yields the full path of each found 'angular.json' file.
|
|
134
|
-
*/
|
|
135
|
-
async function* findAngularJsonFiles(rootDir, allowedRealRoots) {
|
|
136
|
-
const CONCURRENCY_LIMIT = 50;
|
|
137
|
-
const queue = [rootDir];
|
|
138
|
-
const seenInodes = new Set();
|
|
139
|
-
try {
|
|
140
|
-
const rootStats = await (0, promises_1.stat)(rootDir);
|
|
141
|
-
seenInodes.add(rootStats.ino);
|
|
142
|
-
}
|
|
143
|
-
catch (error) {
|
|
144
|
-
(0, error_1.assertIsError)(error);
|
|
145
|
-
if (isIgnorableFileError(error)) {
|
|
146
|
-
return; // Cannot access root, so there's nothing to do.
|
|
147
|
-
}
|
|
148
|
-
throw error;
|
|
149
|
-
}
|
|
150
|
-
while (queue.length > 0) {
|
|
151
|
-
const batch = queue.splice(0, CONCURRENCY_LIMIT);
|
|
152
|
-
const foundFilesInBatch = [];
|
|
153
|
-
const promises = batch.map(async (dir) => {
|
|
154
|
-
try {
|
|
155
|
-
const entries = await (0, promises_1.readdir)(dir, { withFileTypes: true });
|
|
156
|
-
const subdirectories = [];
|
|
157
|
-
for (const entry of entries) {
|
|
158
|
-
const fullPath = (0, node_path_1.join)(dir, entry.name);
|
|
159
|
-
if (entry.isDirectory() || entry.isSymbolicLink()) {
|
|
160
|
-
// Exclude dot-directories, build/cache directories, and node_modules
|
|
161
|
-
if (entry.name.startsWith('.') || EXCLUDED_DIRS.has(entry.name)) {
|
|
162
|
-
continue;
|
|
163
|
-
}
|
|
164
|
-
let entryStats;
|
|
165
|
-
try {
|
|
166
|
-
entryStats = await (0, promises_1.stat)(fullPath);
|
|
167
|
-
if (seenInodes.has(entryStats.ino)) {
|
|
168
|
-
continue; // Already visited this directory (symlink loop), skip.
|
|
169
|
-
}
|
|
170
|
-
// Only process actual directories or symlinks to directories.
|
|
171
|
-
if (!entryStats.isDirectory()) {
|
|
172
|
-
continue;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
catch {
|
|
176
|
-
// Ignore errors from stat (e.g., broken symlinks)
|
|
177
|
-
continue;
|
|
178
|
-
}
|
|
179
|
-
if (entry.isSymbolicLink()) {
|
|
180
|
-
try {
|
|
181
|
-
const targetPath = (0, node_fs_1.realpathSync)(fullPath);
|
|
182
|
-
// Ensure the link target is within one of the allowed roots.
|
|
183
|
-
const isAllowed = allowedRealRoots.some((root) => {
|
|
184
|
-
const rel = (0, node_path_1.relative)(root, targetPath);
|
|
185
|
-
return !rel.startsWith('..') && !(0, node_path_1.isAbsolute)(rel);
|
|
186
|
-
});
|
|
187
|
-
if (!isAllowed) {
|
|
188
|
-
continue;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
catch {
|
|
192
|
-
// Ignore broken links.
|
|
193
|
-
continue;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
seenInodes.add(entryStats.ino);
|
|
197
|
-
subdirectories.push(fullPath);
|
|
198
|
-
}
|
|
199
|
-
else if (entry.name === 'angular.json') {
|
|
200
|
-
foundFilesInBatch.push(fullPath);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
return subdirectories;
|
|
204
|
-
}
|
|
205
|
-
catch (error) {
|
|
206
|
-
(0, error_1.assertIsError)(error);
|
|
207
|
-
if (isIgnorableFileError(error)) {
|
|
208
|
-
return []; // Silently ignore permission errors.
|
|
209
|
-
}
|
|
210
|
-
throw error;
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
const nestedSubdirs = await Promise.all(promises);
|
|
214
|
-
queue.push(...nestedSubdirs.flat());
|
|
215
|
-
yield* foundFilesInBatch;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Searches upwards from a starting directory to find the version of '@angular/core'.
|
|
220
|
-
* It caches results to avoid redundant lookups.
|
|
221
|
-
* @param startDir The directory to start the search from.
|
|
222
|
-
* @param cache A map to store cached results.
|
|
223
|
-
* @param searchRoot The directory at which to stop the search.
|
|
224
|
-
* @returns The major version of '@angular/core' as a string, otherwise undefined.
|
|
225
|
-
*/
|
|
226
|
-
async function findAngularCoreVersion(startDir, cache, searchRoot) {
|
|
227
|
-
let currentDir = startDir;
|
|
228
|
-
const dirsToCache = [];
|
|
229
|
-
while (currentDir) {
|
|
230
|
-
dirsToCache.push(currentDir);
|
|
231
|
-
if (cache.has(currentDir)) {
|
|
232
|
-
const cachedResult = cache.get(currentDir);
|
|
233
|
-
// Populate cache for all intermediate directories.
|
|
234
|
-
for (const dir of dirsToCache) {
|
|
235
|
-
cache.set(dir, cachedResult);
|
|
236
|
-
}
|
|
237
|
-
return cachedResult;
|
|
238
|
-
}
|
|
239
|
-
const pkgPath = (0, node_path_1.join)(currentDir, 'package.json');
|
|
240
|
-
try {
|
|
241
|
-
const pkgContent = await (0, promises_1.readFile)(pkgPath, 'utf-8');
|
|
242
|
-
const pkg = JSON.parse(pkgContent);
|
|
243
|
-
const versionSpecifier = pkg.dependencies?.['@angular/core'] ?? pkg.devDependencies?.['@angular/core'];
|
|
244
|
-
if (versionSpecifier) {
|
|
245
|
-
const minVersion = semver_1.default.minVersion(versionSpecifier);
|
|
246
|
-
const result = minVersion ? String(minVersion.major) : undefined;
|
|
247
|
-
for (const dir of dirsToCache) {
|
|
248
|
-
cache.set(dir, result);
|
|
249
|
-
}
|
|
250
|
-
return result;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
catch (error) {
|
|
254
|
-
(0, error_1.assertIsError)(error);
|
|
255
|
-
if (error.code !== 'ENOENT') {
|
|
256
|
-
// Ignore missing package.json files, but rethrow other errors.
|
|
257
|
-
throw error;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
// Stop if we are at the search root or the filesystem root.
|
|
261
|
-
if (currentDir === searchRoot) {
|
|
262
|
-
break;
|
|
263
|
-
}
|
|
264
|
-
const parentDir = (0, node_path_1.dirname)(currentDir);
|
|
265
|
-
if (parentDir === currentDir) {
|
|
266
|
-
break; // Reached the filesystem root.
|
|
267
|
-
}
|
|
268
|
-
currentDir = parentDir;
|
|
269
|
-
}
|
|
270
|
-
// Cache the failure for all traversed directories.
|
|
271
|
-
for (const dir of dirsToCache) {
|
|
272
|
-
cache.set(dir, undefined);
|
|
273
|
-
}
|
|
274
|
-
return undefined;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Determines the unit test framework for a project based on its 'test' target configuration.
|
|
278
|
-
* It handles both the modern `@angular/build:unit-test` builder with its `runner` option
|
|
279
|
-
* and older builders where the framework is inferred from the builder name.
|
|
280
|
-
* @param testTarget The 'test' target definition from the workspace configuration.
|
|
281
|
-
* @returns The name of the unit test framework ('jasmine', 'jest', 'vitest'), 'unknown' if
|
|
282
|
-
* the framework can't be determined from a known builder, or `undefined` if there is no test target.
|
|
283
|
-
*/
|
|
284
|
-
function getUnitTestFramework(testTarget) {
|
|
285
|
-
if (!testTarget) {
|
|
286
|
-
return undefined;
|
|
287
|
-
}
|
|
288
|
-
// For the new unit-test builder, the runner option directly informs the framework.
|
|
289
|
-
if (testTarget.builder === '@angular/build:unit-test') {
|
|
290
|
-
const runner = testTarget.options?.['runner'];
|
|
291
|
-
if (runner === 'karma') {
|
|
292
|
-
return 'jasmine'; // Karma is a runner, but the framework is Jasmine.
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
return runner; // For 'vitest', the runner and framework are the same.
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
// Fallback for older builders where the framework is inferred from the builder name.
|
|
299
|
-
if (testTarget.builder) {
|
|
300
|
-
const testBuilder = testTarget.builder;
|
|
301
|
-
if (testBuilder.includes('karma') ||
|
|
302
|
-
testBuilder === '@angular-devkit/build-angular:web-test-runner') {
|
|
303
|
-
return 'jasmine';
|
|
304
|
-
}
|
|
305
|
-
else if (testBuilder.includes('jest')) {
|
|
306
|
-
return 'jest';
|
|
307
|
-
}
|
|
308
|
-
else if (testBuilder.includes('vitest')) {
|
|
309
|
-
return 'vitest';
|
|
310
|
-
}
|
|
311
|
-
else {
|
|
312
|
-
return 'unknown';
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
return undefined;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Determines the style language for a project using a prioritized heuristic.
|
|
319
|
-
* It checks project-specific schematics, then workspace-level schematics,
|
|
320
|
-
* and finally infers from the build target's inlineStyleLanguage option.
|
|
321
|
-
* @param project The project definition from the workspace configuration.
|
|
322
|
-
* @param workspace The loaded Angular workspace.
|
|
323
|
-
* @returns The determined style language ('css', 'scss', 'sass', 'less').
|
|
324
|
-
*/
|
|
325
|
-
async function getProjectStyleLanguage(project, workspace, fullSourceRoot) {
|
|
326
|
-
const projectSchematics = project.extensions.schematics;
|
|
327
|
-
const workspaceSchematics = workspace.extensions.schematics;
|
|
328
|
-
// 1. Check for a project-specific schematic setting.
|
|
329
|
-
let style = projectSchematics?.['@schematics/angular:component']?.['style'];
|
|
330
|
-
if (isStyleLanguage(style)) {
|
|
331
|
-
return style;
|
|
332
|
-
}
|
|
333
|
-
// 2. Check for a workspace-level schematic setting.
|
|
334
|
-
style = workspaceSchematics?.['@schematics/angular:component']?.['style'];
|
|
335
|
-
if (isStyleLanguage(style)) {
|
|
336
|
-
return style;
|
|
337
|
-
}
|
|
338
|
-
const buildTarget = project.targets.get('build');
|
|
339
|
-
if (buildTarget?.options) {
|
|
340
|
-
// 3. Infer from the build target's inlineStyleLanguage option.
|
|
341
|
-
style = buildTarget.options['inlineStyleLanguage'];
|
|
342
|
-
if (isStyleLanguage(style)) {
|
|
343
|
-
return style;
|
|
344
|
-
}
|
|
345
|
-
// 4. Infer from the 'styles' array (explicit).
|
|
346
|
-
const styles = buildTarget.options['styles'];
|
|
347
|
-
if (Array.isArray(styles)) {
|
|
348
|
-
for (const stylePath of styles) {
|
|
349
|
-
const style = getStyleLanguageFromExtension((0, node_path_1.extname)(stylePath));
|
|
350
|
-
if (style) {
|
|
351
|
-
return style;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
// 5. Infer from implicit default styles file (future-proofing).
|
|
357
|
-
for (const ext of STYLE_LANGUAGE_SEARCH_ORDER) {
|
|
358
|
-
try {
|
|
359
|
-
await (0, promises_1.stat)((0, node_path_1.join)(fullSourceRoot, `styles.${ext}`));
|
|
360
|
-
return ext;
|
|
361
|
-
}
|
|
362
|
-
catch {
|
|
363
|
-
// Silently ignore all errors (e.g., file not found, permissions).
|
|
364
|
-
// If we can't read the file, we can't use it for detection.
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
// 6. Fallback to 'css'.
|
|
368
|
-
return 'css';
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Loads, parses, and transforms a single angular.json file into the tool's output format.
|
|
372
|
-
* It checks a set of seen paths to avoid processing the same workspace multiple times.
|
|
373
|
-
* @param configFile The path to the angular.json file.
|
|
374
|
-
* @param seenPaths A Set of absolute paths that have already been processed.
|
|
375
|
-
* @returns A promise resolving to the workspace data or a parsing error.
|
|
376
|
-
*/
|
|
377
|
-
async function loadAndParseWorkspace(configFile, seenPaths) {
|
|
378
|
-
try {
|
|
379
|
-
const resolvedPath = (0, node_path_1.resolve)(configFile);
|
|
380
|
-
if (seenPaths.has(resolvedPath)) {
|
|
381
|
-
return { workspace: null, error: null }; // Already processed, skip.
|
|
382
|
-
}
|
|
383
|
-
seenPaths.add(resolvedPath);
|
|
384
|
-
const ws = await config_1.AngularWorkspace.load(configFile);
|
|
385
|
-
const projects = [];
|
|
386
|
-
const workspaceRoot = (0, node_path_1.dirname)(configFile);
|
|
387
|
-
for (const [name, project] of ws.projects.entries()) {
|
|
388
|
-
const sourceRoot = project.sourceRoot ?? node_path_1.posix.join(project.root, 'src');
|
|
389
|
-
const fullSourceRoot = (0, node_path_1.join)(workspaceRoot, sourceRoot);
|
|
390
|
-
const unitTestFramework = getUnitTestFramework(project.targets.get('test'));
|
|
391
|
-
const styleLanguage = await getProjectStyleLanguage(project, ws, fullSourceRoot);
|
|
392
|
-
const targets = Array.from(project.targets.keys());
|
|
393
|
-
projects.push({
|
|
394
|
-
name,
|
|
395
|
-
type: project.extensions['projectType'],
|
|
396
|
-
builder: project.targets.get('build')?.builder,
|
|
397
|
-
root: project.root,
|
|
398
|
-
sourceRoot,
|
|
399
|
-
selectorPrefix: project.extensions['prefix'],
|
|
400
|
-
unitTestFramework,
|
|
401
|
-
styleLanguage,
|
|
402
|
-
targets,
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
return { workspace: { path: configFile, projects }, error: null };
|
|
406
|
-
}
|
|
407
|
-
catch (error) {
|
|
408
|
-
let message;
|
|
409
|
-
if (error instanceof Error) {
|
|
410
|
-
message = error.message;
|
|
411
|
-
}
|
|
412
|
-
else {
|
|
413
|
-
message = 'An unknown error occurred while parsing the file.';
|
|
414
|
-
}
|
|
415
|
-
return { workspace: null, error: { filePath: configFile, message } };
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* Processes a single `angular.json` file to extract workspace and framework version information.
|
|
420
|
-
* @param configFile The path to the `angular.json` file.
|
|
421
|
-
* @param searchRoot The directory at which to stop the upward search for `package.json`.
|
|
422
|
-
* @param seenPaths A Set of absolute paths that have already been processed to avoid duplicates.
|
|
423
|
-
* @param versionCache A Map to cache framework version lookups for performance.
|
|
424
|
-
* @returns A promise resolving to an object containing the processed data and any errors.
|
|
425
|
-
*/
|
|
426
|
-
async function processConfigFile(configFile, searchRoot, seenPaths, versionCache) {
|
|
427
|
-
const { workspace, error } = await loadAndParseWorkspace(configFile, seenPaths);
|
|
428
|
-
if (error) {
|
|
429
|
-
return { parsingError: error };
|
|
430
|
-
}
|
|
431
|
-
if (!workspace) {
|
|
432
|
-
return {}; // Skipped as it was already seen.
|
|
433
|
-
}
|
|
434
|
-
try {
|
|
435
|
-
const workspaceDir = (0, node_path_1.dirname)(configFile);
|
|
436
|
-
workspace.frameworkVersion = await findAngularCoreVersion(workspaceDir, versionCache, searchRoot);
|
|
437
|
-
return { workspace };
|
|
438
|
-
}
|
|
439
|
-
catch (e) {
|
|
440
|
-
return {
|
|
441
|
-
workspace,
|
|
442
|
-
versioningError: {
|
|
443
|
-
filePath: workspace.path,
|
|
444
|
-
message: e instanceof Error ? e.message : 'An unknown error occurred.',
|
|
445
|
-
},
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* Deduplicates overlapping search roots (e.g., if one is a child of another).
|
|
451
|
-
* Sorting by length ensures parent directories are processed before children.
|
|
452
|
-
* @param roots A list of normalized absolute paths used as search roots.
|
|
453
|
-
* @returns A deduplicated list of search roots.
|
|
454
|
-
*/
|
|
455
|
-
function deduplicateSearchRoots(roots) {
|
|
456
|
-
const sortedRoots = [...roots].sort((a, b) => a.length - b.length);
|
|
457
|
-
const deduplicated = [];
|
|
458
|
-
for (const root of sortedRoots) {
|
|
459
|
-
const isSubdirectory = deduplicated.some((existing) => {
|
|
460
|
-
const rel = (0, node_path_1.relative)(existing, root);
|
|
461
|
-
return rel === '' || (!rel.startsWith('..') && !(0, node_path_1.isAbsolute)(rel));
|
|
462
|
-
});
|
|
463
|
-
if (!isSubdirectory) {
|
|
464
|
-
deduplicated.push(root);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
return deduplicated;
|
|
468
|
-
}
|
|
469
|
-
async function createListProjectsHandler({ server, roots: configuredRoots }) {
|
|
470
|
-
return async () => {
|
|
471
|
-
const workspaces = [];
|
|
472
|
-
const parsingErrors = [];
|
|
473
|
-
const versioningErrors = [];
|
|
474
|
-
const seenPaths = new Set();
|
|
475
|
-
const versionCache = new Map();
|
|
476
|
-
let searchRoots;
|
|
477
|
-
const clientCapabilities = server.server.getClientCapabilities();
|
|
478
|
-
if (clientCapabilities?.roots) {
|
|
479
|
-
const { roots } = await server.server.listRoots();
|
|
480
|
-
searchRoots = roots?.map((r) => (0, node_path_1.normalize)((0, node_url_1.fileURLToPath)(r.uri)));
|
|
481
|
-
}
|
|
482
|
-
if (!searchRoots || searchRoots.length === 0) {
|
|
483
|
-
searchRoots =
|
|
484
|
-
configuredRoots && configuredRoots.length > 0 ? configuredRoots : [process.cwd()];
|
|
485
|
-
}
|
|
486
|
-
searchRoots = deduplicateSearchRoots(searchRoots);
|
|
487
|
-
// Pre-resolve allowed roots to handle their own symlinks or normalizations.
|
|
488
|
-
// We ignore failures here; if a root is broken, we simply won't match against it.
|
|
489
|
-
const realAllowedRoots = searchRoots
|
|
490
|
-
.map((r) => {
|
|
491
|
-
try {
|
|
492
|
-
return (0, node_fs_1.realpathSync)(r);
|
|
493
|
-
}
|
|
494
|
-
catch {
|
|
495
|
-
return null;
|
|
496
|
-
}
|
|
497
|
-
})
|
|
498
|
-
.filter((r) => r !== null);
|
|
499
|
-
for (const root of searchRoots) {
|
|
500
|
-
for await (const configFile of findAngularJsonFiles(root, realAllowedRoots)) {
|
|
501
|
-
const { workspace, parsingError, versioningError } = await processConfigFile(configFile, root, seenPaths, versionCache);
|
|
502
|
-
if (workspace) {
|
|
503
|
-
workspaces.push(workspace);
|
|
504
|
-
}
|
|
505
|
-
if (parsingError) {
|
|
506
|
-
parsingErrors.push(parsingError);
|
|
507
|
-
}
|
|
508
|
-
if (versioningError) {
|
|
509
|
-
versioningErrors.push(versioningError);
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
if (workspaces.length === 0 && parsingErrors.length === 0) {
|
|
514
|
-
return {
|
|
515
|
-
content: [
|
|
516
|
-
{
|
|
517
|
-
type: 'text',
|
|
518
|
-
text: 'No Angular workspace found.' +
|
|
519
|
-
' An `angular.json` file, which marks the root of a workspace,' +
|
|
520
|
-
' could not be located in the current directory or any of its parent directories.',
|
|
521
|
-
},
|
|
522
|
-
],
|
|
523
|
-
structuredContent: { workspaces: [] },
|
|
524
|
-
};
|
|
525
|
-
}
|
|
526
|
-
let text = `Found ${workspaces.length} workspace(s).\n${JSON.stringify({ workspaces })}`;
|
|
527
|
-
if (parsingErrors.length > 0) {
|
|
528
|
-
text += `\n\nWarning: The following ${parsingErrors.length} file(s) could not be parsed and were skipped:\n`;
|
|
529
|
-
text += parsingErrors.map((e) => `- ${e.filePath}: ${e.message}`).join('\n');
|
|
530
|
-
}
|
|
531
|
-
if (versioningErrors.length > 0) {
|
|
532
|
-
text += `\n\nWarning: The framework version for the following ${versioningErrors.length} workspace(s) could not be determined:\n`;
|
|
533
|
-
text += versioningErrors.map((e) => `- ${e.filePath}: ${e.message}`).join('\n');
|
|
534
|
-
}
|
|
535
|
-
return {
|
|
536
|
-
content: [{ type: 'text', text }],
|
|
537
|
-
structuredContent: { workspaces, parsingErrors, versioningErrors },
|
|
538
|
-
};
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
|
-
//# sourceMappingURL=projects.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["projects.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;AAEH,qCAAuC;AACvC,+CAA2D;AAC3D,yCAAoG;AACpG,uCAAyC;AACzC,oDAA4B;AAC5B,6BAAwB;AACxB,sDAA6D;AAC7D,oDAAyD;AACzD,mDAAmE;AAEnE,sEAAsE;AACtE,MAAM,mBAAmB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEpE,MAAM,qBAAqB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
|
|
|
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 type { McpToolContext } from '../tool-registry';
|
|
9
|
-
import type { TargetStrategy } from './strategy';
|
|
10
|
-
import type { RunTargetOutput, StrategyExecutionContext } from './types';
|
|
11
|
-
export declare class BuildTargetStrategy implements TargetStrategy {
|
|
12
|
-
canHandle(targetName: string, builder?: string): boolean;
|
|
13
|
-
execute(input: StrategyExecutionContext, context: McpToolContext): Promise<RunTargetOutput>;
|
|
14
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
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.BuildTargetStrategy = void 0;
|
|
11
|
-
const utils_1 = require("../../utils");
|
|
12
|
-
const options_serializer_1 = require("./options-serializer");
|
|
13
|
-
class BuildTargetStrategy {
|
|
14
|
-
canHandle(targetName, builder) {
|
|
15
|
-
return (targetName === 'build' &&
|
|
16
|
-
(builder === '@angular-devkit/build-angular:application' ||
|
|
17
|
-
builder === '@angular-devkit/build-angular:browser' ||
|
|
18
|
-
builder === '@angular/build:application' ||
|
|
19
|
-
builder === '@angular-devkit/build-angular:ng-packagr'));
|
|
20
|
-
}
|
|
21
|
-
async execute(input, context) {
|
|
22
|
-
const args = ['build', input.projectName];
|
|
23
|
-
if (input.configuration) {
|
|
24
|
-
args.push(`--configuration=${input.configuration}`);
|
|
25
|
-
}
|
|
26
|
-
args.push(...(0, options_serializer_1.serializeOptions)(input.options));
|
|
27
|
-
let status = 'success';
|
|
28
|
-
let logs;
|
|
29
|
-
try {
|
|
30
|
-
const result = await context.host.executeNgCommand(args, { cwd: input.workspacePath });
|
|
31
|
-
logs = result.logs;
|
|
32
|
-
}
|
|
33
|
-
catch (e) {
|
|
34
|
-
status = 'failure';
|
|
35
|
-
logs = (0, utils_1.getCommandErrorLogs)(e);
|
|
36
|
-
}
|
|
37
|
-
let outputPath;
|
|
38
|
-
for (const line of logs) {
|
|
39
|
-
const match = line.match(/Output location: (.*)/);
|
|
40
|
-
if (match) {
|
|
41
|
-
outputPath = match[1].trim();
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
status,
|
|
47
|
-
logs,
|
|
48
|
-
extensions: outputPath ? { outputPath } : undefined,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.BuildTargetStrategy = BuildTargetStrategy;
|
|
53
|
-
//# sourceMappingURL=build-target-strategy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-target-strategy.js","sourceRoot":"","sources":["build-target-strategy.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,uCAAkD;AAElD,6DAAwD;AAIxD,MAAa,mBAAmB;IAC9B,SAAS,CAAC,UAAkB,EAAE,OAAgB;QAC5C,OAAO,CACL,UAAU,KAAK,OAAO;YACtB,CAAC,OAAO,KAAK,2CAA2C;gBACtD,OAAO,KAAK,uCAAuC;gBACnD,OAAO,KAAK,4BAA4B;gBACxC,OAAO,KAAK,0CAA0C,CAAC,CAC1D,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CACX,KAA+B,EAC/B,OAAuB;QAEvB,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;QAC1C,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC,mBAAmB,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC;QACtD,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,GAAG,IAAA,qCAAgB,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAE9C,IAAI,MAAM,GAA0B,SAAS,CAAC;QAC9C,IAAI,IAAc,CAAC;QAEnB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC;YACvF,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,GAAG,SAAS,CAAC;YACnB,IAAI,GAAG,IAAA,2BAAmB,EAAC,CAAC,CAAC,CAAC;QAChC,CAAC;QAED,IAAI,UAA8B,CAAC;QACnC,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;YACxB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAClD,IAAI,KAAK,EAAE,CAAC;gBACV,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBAC7B,MAAM;YACR,CAAC;QACH,CAAC;QAED,OAAO;YACL,MAAM;YACN,IAAI;YACJ,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS;SACpD,CAAC;IACJ,CAAC;CACF;AAhDD,kDAgDC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
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 type { McpToolContext } from '../tool-registry';
|
|
9
|
-
import type { TargetStrategy } from './strategy';
|
|
10
|
-
import type { RunTargetOutput, StrategyExecutionContext } from './types';
|
|
11
|
-
export declare class GenericTargetStrategy implements TargetStrategy {
|
|
12
|
-
canHandle(targetName: string, builder?: string): boolean;
|
|
13
|
-
execute(input: StrategyExecutionContext, context: McpToolContext): Promise<RunTargetOutput>;
|
|
14
|
-
}
|