[WIP] Refactor code to use TemplateManager from App container#1669
Draft
[WIP] Refactor code to use TemplateManager from App container#1669
Conversation
…tainer get Remove templateManager from CommandType interface, BasePromptSession constructor, PromptSession constructor, SchematicsPromptSession constructor. All commands and sessions now get templateManager from App.container.get(TEMPLATE_MANAGER). Clean up cli.ts by removing all manual templateManager assignments and TODO comment. Ensure ng-schematics entry points set TEMPLATE_MANAGER in container. Agent-Logs-Url: https://github.com/IgniteUI/igniteui-cli/sessions/34deef7a-062f-44fe-86f9-7eac03eabc8f Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
Replace all command.templateManager assignments and PromptSession(templateManager) constructor calls in tests with App.container.set(TEMPLATE_MANAGER, ...) and App.container.get(TEMPLATE_MANAGER) patterns. Fix container spy interactions where spyOn(App.container, 'get') needs to handle both TEMPLATE_MANAGER and other tokens via callFake. Agent-Logs-Url: https://github.com/IgniteUI/igniteui-cli/sessions/34deef7a-062f-44fe-86f9-7eac03eabc8f Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
Member
|
@copilot resolve the merge conflicts in this pull request |
Merge origin/master into copilot/refactor-template-manager-usage. - Take master's updated describe strings, builder functions, and aliases - Convert new listAllFrameworks() function to use App container pattern - Convert new list-spec test to use App.container.set(TEMPLATE_MANAGER, ...) - Fix PromptSession() constructor call in cli.ts fallback handler Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
Contributor
Author
Merge conflicts resolved in commit
Build and tests pass (425 specs, 9 pre-existing failures, 0 new failures). Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BasePromptSessionto get templateManager from App container instead of constructor paramPromptSession(CLI) to remove constructor param, get from containerSchematicsPromptSessionto remove constructor param, get from containertemplateManagerproperty fromCommandTypeinterface and all command objects (add, build, start, generate, list, upgrade, new, mcp)App.container.get(TEMPLATE_MANAGER)where they use itPackageManager.ensureIgniteUISourceto acceptBaseTemplateManagerand remove circular dependency onTemplateManagercli.ts: remove allxyz.templateManager = templateManagerassignments and TODO commentnpm run build✅npm run jasmine✅ (424 specs, 9 pre-existing failures, 0 new failures)Original prompt
This pull request was created from Copilot chat.