mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 02:03:39 +00:00
[AC-2579] Set up bit-cli folder (#9092)
* Create bit-cli folder with configs * Add bit-cli to workspace * Refactor CLI app structure * services are managed by the ServiceContainer * programs are registered by register(Oss|Bit)Program * the app is bootstrapped by Main * Reapply changes from #9099 * Reapply changes from #8604 * Reapply changes from #9115
This commit is contained in:
20
bitwarden_license/bit-cli/src/bw.ts
Normal file
20
bitwarden_license/bit-cli/src/bw.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { program } from "commander";
|
||||
|
||||
import { registerOssPrograms } from "@bitwarden/cli/register-oss-programs";
|
||||
|
||||
import { registerBitPrograms } from "./register-bit-programs";
|
||||
import { ServiceContainer } from "./service-container";
|
||||
|
||||
async function main() {
|
||||
const serviceContainer = new ServiceContainer();
|
||||
await serviceContainer.init();
|
||||
|
||||
await registerOssPrograms(serviceContainer);
|
||||
await registerBitPrograms(serviceContainer);
|
||||
|
||||
program.parse(process.argv);
|
||||
}
|
||||
|
||||
// Node does not support top-level await statements until ES2022, esnext, etc which we don't use yet
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
main();
|
||||
Reference in New Issue
Block a user