mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
debug new classes
This commit is contained in:
parent
7f0f4a11f8
commit
2557f7239c
11
.vscode/launch.json
vendored
11
.vscode/launch.json
vendored
@ -9,11 +9,14 @@
|
|||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"program": "${workspaceFolder}/node_modules/ts-node/dist/bin.js",
|
"program": "${workspaceFolder}/node_modules/ts-node/dist/bin.js",
|
||||||
"args": [
|
"args": [
|
||||||
|
"-r",
|
||||||
|
"tsconfig-paths/register",
|
||||||
"${workspaceFolder}/src/main.ts",
|
"${workspaceFolder}/src/main.ts",
|
||||||
"login",
|
"sync"
|
||||||
"kyle@sdfdf.com",
|
],
|
||||||
"mypassword"
|
"env": {
|
||||||
]
|
"NODE_ENV": "debug"
|
||||||
|
},
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -3,5 +3,4 @@
|
|||||||
require('tsconfig-paths').register();
|
require('tsconfig-paths').register();
|
||||||
require('ts-node').register();
|
require('ts-node').register();
|
||||||
const main = require('./main.ts');
|
const main = require('./main.ts');
|
||||||
const m = new main.Main();
|
new main.Main().run();
|
||||||
m.run();
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { AuthService } from 'jslib/services/auth.service';
|
import { AuthService } from 'jslib/services/auth.service';
|
||||||
|
|
||||||
import { LoginCommand } from './commands/login.command';
|
import { LoginCommand } from './commands/login.command';
|
||||||
@ -101,3 +100,7 @@ export class Main {
|
|||||||
this.program.run();
|
this.program.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === 'debug') {
|
||||||
|
new Main().run();
|
||||||
|
}
|
||||||
|
@ -20,6 +20,7 @@ export class Program {
|
|||||||
.action(async (email: string, password: string, cmd: program.Command) => {
|
.action(async (email: string, password: string, cmd: program.Command) => {
|
||||||
const command = new LoginCommand(this.main.authService);
|
const command = new LoginCommand(this.main.authService);
|
||||||
await command.run(email, password, cmd);
|
await command.run(email, password, cmd);
|
||||||
|
process.exit();
|
||||||
});
|
});
|
||||||
|
|
||||||
program
|
program
|
||||||
@ -27,6 +28,7 @@ export class Program {
|
|||||||
.description('Log out of the current Bitwarden user account.')
|
.description('Log out of the current Bitwarden user account.')
|
||||||
.action((cmd) => {
|
.action((cmd) => {
|
||||||
console.log('Logging out...');
|
console.log('Logging out...');
|
||||||
|
process.exit();
|
||||||
});
|
});
|
||||||
|
|
||||||
program
|
program
|
||||||
@ -37,6 +39,7 @@ export class Program {
|
|||||||
console.log('Syncing...');
|
console.log('Syncing...');
|
||||||
const command = new SyncCommand(this.main.syncService);
|
const command = new SyncCommand(this.main.syncService);
|
||||||
await command.run(cmd);
|
await command.run(cmd);
|
||||||
|
process.exit();
|
||||||
});
|
});
|
||||||
|
|
||||||
program
|
program
|
||||||
@ -74,7 +77,6 @@ export class Program {
|
|||||||
console.log(id);
|
console.log(id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
program
|
program
|
||||||
.parse(process.argv);
|
.parse(process.argv);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user