-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
refactor: deprecate cortex configs
Showing
23 changed files
with
175 additions
and
322 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
27 changes: 0 additions & 27 deletions
27
cortex-js/src/infrastructure/commanders/configs.command.ts
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
cortex-js/src/infrastructure/commanders/configs/configs-list.command.ts
This file was deleted.
Oops, something went wrong.
60 changes: 0 additions & 60 deletions
60
cortex-js/src/infrastructure/commanders/configs/configs-set.command.ts
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
24 changes: 13 additions & 11 deletions
24
...commanders/configs/configs-get.command.ts → ...commanders/engines/engines-set.command.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
import { CommandRunner, SubCommand } from 'nest-commander'; | ||
import { SubCommand } from 'nest-commander'; | ||
import { SetCommandContext } from '../decorators/CommandContext'; | ||
import { ContextService } from '@/infrastructure/services/context/context.service'; | ||
import { ConfigsUsecases } from '@/usecases/configs/configs.usecase'; | ||
import { CortexUsecases } from '@/usecases/cortex/cortex.usecases'; | ||
import { BaseCommand } from '../base.command'; | ||
import { CortexUsecases } from '@/usecases/cortex/cortex.usecases'; | ||
import { ConfigsUsecases } from '@/usecases/configs/configs.usecase'; | ||
|
||
@SubCommand({ | ||
name: 'get', | ||
description: 'Get a cortex configuration', | ||
arguments: '<name>', | ||
name: '<name> set <config> <value>', | ||
description: 'Update an engine configurations', | ||
argsDescription: { | ||
name: 'Configuration name to get', | ||
name: 'Engine name to update', | ||
}, | ||
}) | ||
@SetCommandContext() | ||
export class ConfigsGetCommand extends BaseCommand { | ||
export class EnginesSetCommand extends BaseCommand { | ||
constructor( | ||
private readonly configsUsecases: ConfigsUsecases, | ||
readonly configsUsecases: ConfigsUsecases, | ||
readonly contextService: ContextService, | ||
readonly cortexUsecases: CortexUsecases, | ||
) { | ||
super(cortexUsecases); | ||
} | ||
|
||
async runCommand(passedParams: string[]): Promise<void> { | ||
const engineName = passedParams[0]; | ||
const config = passedParams[1]; | ||
const value = passedParams[2]; | ||
return this.configsUsecases | ||
.getGroupConfigs(passedParams[0]) | ||
.then(console.table); | ||
.saveConfig(config, value, engineName) | ||
.then(() => console.log('Update engine successfully')); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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
41 changes: 0 additions & 41 deletions
41
cortex-js/src/infrastructure/controllers/configs.controller.spec.ts
This file was deleted.
Oops, something went wrong.
81 changes: 0 additions & 81 deletions
81
cortex-js/src/infrastructure/controllers/configs.controller.ts
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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