1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

debug new classes

This commit is contained in:
Kyle Spearrin
2018-05-14 11:59:34 -04:00
parent 7f0f4a11f8
commit 2557f7239c
4 changed files with 15 additions and 8 deletions

View File

@@ -3,5 +3,4 @@
require('tsconfig-paths').register();
require('ts-node').register();
const main = require('./main.ts');
const m = new main.Main();
m.run();
new main.Main().run();

View File

@@ -1,4 +1,3 @@
import { AuthService } from 'jslib/services/auth.service';
import { LoginCommand } from './commands/login.command';
@@ -101,3 +100,7 @@ export class Main {
this.program.run();
}
}
if (process.env.NODE_ENV === 'debug') {
new Main().run();
}

View File

@@ -20,6 +20,7 @@ export class Program {
.action(async (email: string, password: string, cmd: program.Command) => {
const command = new LoginCommand(this.main.authService);
await command.run(email, password, cmd);
process.exit();
});
program
@@ -27,6 +28,7 @@ export class Program {
.description('Log out of the current Bitwarden user account.')
.action((cmd) => {
console.log('Logging out...');
process.exit();
});
program
@@ -37,6 +39,7 @@ export class Program {
console.log('Syncing...');
const command = new SyncCommand(this.main.syncService);
await command.run(cmd);
process.exit();
});
program
@@ -74,7 +77,6 @@ export class Program {
console.log(id);
});
program
.parse(process.argv);
}