Rename CliCommand abstraction to CliCommandFactory#4880
Merged
Conversation
Co-authored-by: adrians5j <5121148+adrians5j@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Rename CliCommand abstraction to CliCommandFactory
Rename CliCommand abstraction to CliCommandFactory
Jan 16, 2026
adrians5j
reviewed
Jan 16, 2026
|
|
||
| {/* Blue-green */} | ||
| <CliCommand src={p("Webiny/BlueGreenDeployments/SetPrimaryVariantCliCommand.js")} /> | ||
| <CliCommandFactory src={p("Webiny/BlueGreenDeployments/SetPrimaryVariantCliCommand.js")} /> |
Member
There was a problem hiding this comment.
This React component I want to still be CliCommand. It's only the abstraction (impl) that will use CliCommandFactory.
Contributor
Author
There was a problem hiding this comment.
Fixed in commit 89ceed3. The React component now uses <CliCommand> while the abstraction uses CliCommandFactory.
| import { z } from "zod"; | ||
|
|
||
| export const CliCommand = defineExtension({ | ||
| export const CliCommandFactory = defineExtension({ |
Member
There was a problem hiding this comment.
As mentioned, make the actual ext CliCommand.
Contributor
Author
There was a problem hiding this comment.
Fixed in commit 89ceed3. The extension export is now CliCommand while internally referencing the CliCommandFactory abstraction.
Co-authored-by: adrians5j <5121148+adrians5j@users.noreply.github.com>
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.
Rename CliCommand to CliCommandFactory ✅
packages/cli-core/src/abstractions/features/CliCommand.tsCliCommandtoCliCommandFactoryCliCommandtoCliCommandFactoryCliCommand.InterfacetoCliCommandFactory.InterfaceCliCommand.CommandDefinitiontoCliCommandFactory.CommandDefinitionCliCommand.createImplementationtoCliCommandFactory.createImplementationabstraction: CliCommandtoabstraction: CliCommandFactoryCliCommandandCliCommandDecorator(not renamed)CliCommandFactoryabstraction<CliCommand>(not<CliCommandFactory>)Summary
Successfully renamed the
CliCommandabstraction toCliCommandFactoryacross the entire codebase. Extension exports remain asCliCommandfor backward compatibility while internally referencing the renamedCliCommandFactoryabstraction.Changes Made:
packages/cli-coreandpackages/project-awsupdatedCliCommandandCliCommandDecoratorexports for backward compatibilityCliCommandFactoryto reflect factory patternOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.