rsm-hcd / AndcultureCode.Cli

and-cli command-line tool to manage the development of software applications
https://andculture.com
Apache License 2.0
14 stars 15 forks source link

CommandRegistry refactor #153

Closed brandongregoryscott closed 3 years ago

brandongregoryscott commented 3 years ago

Closes #147 Revisit naming & refactoring in CommandRegistry

Also adds rosie and bumps our andculturecode-javascript-testing dependency to the latest version.

Release notes

Previous Renamed
Commands CommandDefinitions
CommandRegistry.getBaseCommandDefinitions() Removed, use CommandDefinitions and CommandDefinitionUtils.flatten
CommandRegistry.getCommand(name: string) CommandRegistry.get(name: string) or CommandUtils.get(name: string, command?: program.Command)
CommandRegistry.initialize(isImportedModule?: boolean) CommandRegistry.configure({ isImportedModule?: boolean })
CommandRegistry.registerCommand(commandDefinition: CommandDefinition, overrideIfRegistered: boolean) CommandRegistry.register(commandDefinition: CommandDefinition, overrideIfRegistered: boolean)
CommandRegistry.registerCommands(commandDefinitions: CommandDefinition[], overrideIfRegistered: boolean) CommandRegistry.registerAll(commandDefinitions: CommandDefinition[], overrideIfRegistered: boolean)
CommandRegistry.registerBaseCommand(name: string, overrideIfRegistered: boolean) CommandRegistry.registerBase(name: string, overrideIfRegistered: boolean)
CommandRegistry.registerBaseCommands(overrideIfRegistered: boolean) CommandRegistry.registerAllBase(overrideIfRegistered: boolean)
CommandRegistry.removeCommand(name: string) CommandRegistry.remove(name: string) or CommandUtils.remove(name: string, command?: program.Command)

In additional to these renames, there are two new utility classes available:

CommandUtils, which provides common funcitonality for acting on program.Command objects CommandDefinitionUtils, which provides common functionality for acting on CommandDefinition objects and maps.

codecov[bot] commented 3 years ago

Codecov Report

Merging #153 (53f8909) into main (b28887c) will increase coverage by 0.67%. The diff coverage is 97.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #153      +/-   ##
==========================================
+ Coverage   75.97%   76.65%   +0.67%     
==========================================
  Files          28       33       +5     
  Lines        1278     1328      +50     
  Branches      246      249       +3     
==========================================
+ Hits          971     1018      +47     
- Misses        297      300       +3     
  Partials       10       10              
Impacted Files Coverage Δ
src/tests/test-utils.ts 29.62% <ø> (-0.86%) :arrow_down:
src/utilities/command-utils.ts 93.33% <93.33%> (ø)
src/utilities/command-definition-utils.ts 94.73% <94.73%> (ø)
src/modules/command-definitions.ts 100.00% <100.00%> (ø)
src/modules/command-registry.ts 100.00% <100.00%> (ø)
src/tests/factories/command-definition-factory.ts 100.00% <100.00%> (ø)
src/tests/factories/factory-type.ts 100.00% <100.00%> (ø)
src/tests/factories/index.ts 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b28887c...a57b62e. Read the comment docs.

brandongregoryscott commented 3 years ago

@all-contributors please add @wintondeshong for review

allcontributors[bot] commented 3 years ago

@brandongregoryscott

I've put up a pull request to add @wintondeshong! :tada: