mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
main and program are classes
This commit is contained in:
18
src/commands/sync.command.ts
Normal file
18
src/commands/sync.command.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import * as program from 'commander';
|
||||
|
||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||
|
||||
export class SyncCommand {
|
||||
constructor(private syncService: SyncService) {
|
||||
|
||||
}
|
||||
|
||||
async run(cmd: program.Command) {
|
||||
try {
|
||||
const result = await this.syncService.fullSync(false);
|
||||
console.log(result);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user