mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
Upgrade commander (v7.2.0 ⮕ v11.1.0) (#410)
* Upgrade package in package.json * Rebuild package-lock.json * Update imports to reflect new types fixup
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import * as path from "path";
|
||||
|
||||
import * as chalk from "chalk";
|
||||
import * as program from "commander";
|
||||
import { Command, OptionValues } from "commander";
|
||||
|
||||
import { Utils } from "@/jslib/common/src/misc/utils";
|
||||
import { BaseProgram } from "@/jslib/node/src/cli/baseProgram";
|
||||
@@ -33,7 +33,7 @@ export class Program extends BaseProgram {
|
||||
}
|
||||
|
||||
async run() {
|
||||
program
|
||||
const program = new Command()
|
||||
.option("--pretty", "Format output. JSON is tabbed with two spaces.")
|
||||
.option("--raw", "Return raw output instead of a descriptive message.")
|
||||
.option("--response", "Return a JSON formatted version of response output.")
|
||||
@@ -90,7 +90,7 @@ export class Program extends BaseProgram {
|
||||
clientId: "Client_id part of your organization's API key",
|
||||
clientSecret: "Client_secret part of your organization's API key",
|
||||
})
|
||||
.action(async (clientId: string, clientSecret: string, options: program.OptionValues) => {
|
||||
.action(async (clientId: string, clientSecret: string, options: OptionValues) => {
|
||||
await this.exitIfAuthed();
|
||||
const command = new LoginCommand(
|
||||
this.main.authService,
|
||||
@@ -150,7 +150,7 @@ export class Program extends BaseProgram {
|
||||
writeLn(" bwdc test --last");
|
||||
writeLn("", true);
|
||||
})
|
||||
.action(async (options: program.OptionValues) => {
|
||||
.action(async (options: OptionValues) => {
|
||||
await this.exitIfNotAuthed();
|
||||
const command = new TestCommand(this.main.syncService, this.main.i18nService);
|
||||
const response = await command.run(options);
|
||||
@@ -223,7 +223,7 @@ export class Program extends BaseProgram {
|
||||
writeLn(" bwdc config onelogin.secret <secret>");
|
||||
writeLn("", true);
|
||||
})
|
||||
.action(async (setting: string, value: string, options: program.OptionValues) => {
|
||||
.action(async (setting: string, value: string, options: OptionValues) => {
|
||||
const command = new ConfigCommand(
|
||||
this.main.environmentService,
|
||||
this.main.i18nService,
|
||||
@@ -257,7 +257,7 @@ export class Program extends BaseProgram {
|
||||
writeLn(" bwdc clear-cache");
|
||||
writeLn("", true);
|
||||
})
|
||||
.action(async (options: program.OptionValues) => {
|
||||
.action(async (options: OptionValues) => {
|
||||
const command = new ClearCacheCommand(this.main.i18nService, this.main.stateService);
|
||||
const response = await command.run(options);
|
||||
this.processResponse(response);
|
||||
|
||||
Reference in New Issue
Block a user