mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-15 07:43:27 +00:00
base cli program and sync command
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import * as program from 'commander';
|
||||
|
||||
import { EnvironmentService } from 'jslib/abstractions/environment.service';
|
||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
|
||||
import { Response } from 'jslib/cli/models/response';
|
||||
import { MessageResponse } from 'jslib/cli/models/response/messageResponse';
|
||||
|
||||
export class ConfigCommand {
|
||||
constructor(private environmentService: EnvironmentService) { }
|
||||
constructor(private environmentService: EnvironmentService, private i18nService: I18nService) { }
|
||||
|
||||
async run(setting: string, value: string, cmd: program.Command): Promise<Response> {
|
||||
setting = setting.toLowerCase();
|
||||
@@ -18,7 +19,7 @@ export class ConfigCommand {
|
||||
return Response.badRequest('Unknown setting.');
|
||||
}
|
||||
|
||||
const res = new MessageResponse('Saved setting `' + setting + '`.', null);
|
||||
const res = new MessageResponse(this.i18nService.t('savedSetting', setting), null);
|
||||
return Response.success(res);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user