mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
switch to webpack
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
require('tsconfig-paths').register();
|
||||
require('ts-node').register();
|
||||
const main = require('./main.ts');
|
||||
new main.Main().run();
|
||||
@@ -57,7 +57,7 @@ export class Main {
|
||||
program: Program;
|
||||
|
||||
constructor() {
|
||||
this.i18nService = new I18nService('en', '../locales');
|
||||
this.i18nService = new I18nService('en', './locales');
|
||||
this.platformUtilsService = new NodePlatformUtilsService();
|
||||
this.cryptoFunctionService = new NodeCryptoFunctionService();
|
||||
this.storageService = new NodeStorageService('Bitwarden CLI');
|
||||
@@ -89,6 +89,11 @@ export class Main {
|
||||
this.program = new Program(this);
|
||||
}
|
||||
|
||||
async run() {
|
||||
await this.init();
|
||||
this.program.run();
|
||||
}
|
||||
|
||||
private async init() {
|
||||
this.containerService.attachToWindow(global);
|
||||
await this.environmentService.setUrlsFromStorage();
|
||||
@@ -96,13 +101,7 @@ export class Main {
|
||||
await this.i18nService.init(locale);
|
||||
await this.authService.init();
|
||||
}
|
||||
|
||||
async run() {
|
||||
await this.init();
|
||||
this.program.run();
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'debug') {
|
||||
new Main().run();
|
||||
}
|
||||
const main = new Main();
|
||||
main.run();
|
||||
@@ -1,13 +1,13 @@
|
||||
import * as program from 'commander';
|
||||
|
||||
import { Main } from './bw';
|
||||
|
||||
import { DeleteCommand } from './commands/delete.command';
|
||||
import { GetCommand } from './commands/get.command';
|
||||
import { ListCommand } from './commands/list.command';
|
||||
import { LoginCommand } from './commands/login.command';
|
||||
import { SyncCommand } from './commands/sync.command';
|
||||
|
||||
import { Main } from './main';
|
||||
|
||||
import { Response } from './models/response';
|
||||
import { CreateCommand } from './commands/create.command';
|
||||
import { EncodeCommand } from './commands/encode.command';
|
||||
|
||||
@@ -13,7 +13,7 @@ export class I18nService extends BaseI18nService {
|
||||
});
|
||||
|
||||
this.supportedTranslationLocales = [
|
||||
'en'
|
||||
'en',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user