@bitwarden/cli 2024.4.0 → 2024.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/bw.js CHANGED
@@ -20,7 +20,7 @@ module.exports = require("url");
20
20
  /***/ 147:
21
21
  /***/ ((module) => {
22
22
 
23
- module.exports = JSON.parse('{"name":"@bitwarden/cli","description":"A secure and free password manager for all of your devices.","version":"2024.4.0","keywords":["bitwarden","password","vault","password manager","cli"],"author":"Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)","homepage":"https://bitwarden.com","repository":{"type":"git","url":"https://github.com/bitwarden/clients"},"license":"GPL-3.0-only","scripts":{"clean":"rimraf dist","build":"webpack","build:debug":"npm run build && node --inspect ./build/bw.js","build:watch":"webpack --watch","build:prod":"cross-env NODE_ENV=production webpack","build:prod:watch":"cross-env NODE_ENV=production webpack --watch","package":"npm run package:win && npm run package:mac && npm run package:lin","package:win":"pkg . --targets win-x64 --output ./dist/windows/bw.exe","package:mac":"pkg . --targets macos-x64 --output ./dist/macos/bw","package:lin":"pkg . --targets linux-x64 --output ./dist/linux/bw","debug":"node --inspect ./build/bw.js","dist":"npm run build:prod && npm run clean && npm run package","dist:win":"npm run build:prod && npm run clean && npm run package:win","dist:mac":"npm run build:prod && npm run clean && npm run package:mac","dist:lin":"npm run build:prod && npm run clean && npm run package:lin","publish:npm":"npm run build:prod && npm publish --access public","test":"jest","test:watch":"jest --watch","test:watch:all":"jest --watchAll"},"bin":{"bw":"build/bw.js"},"pkg":{"assets":["./build/**/*","../../node_modules/argon2/**/*"]},"dependencies":{"@koa/multer":"3.0.2","@koa/router":"12.0.1","argon2":"0.31.0","big-integer":"1.6.51","browser-hrtime":"1.1.8","chalk":"4.1.2","commander":"11.1.0","form-data":"4.0.0","https-proxy-agent":"7.0.2","inquirer":"8.2.6","jsdom":"23.0.1","jszip":"3.10.1","koa":"2.15.0","koa-bodyparser":"4.4.1","koa-json":"2.0.2","lowdb":"1.0.0","lunr":"2.3.9","multer":"1.4.5-lts.1","node-fetch":"2.6.12","node-forge":"1.3.1","open":"8.4.2","papaparse":"5.4.1","proper-lockfile":"4.1.2","rxjs":"7.8.1","tldts":"6.1.16","zxcvbn":"4.4.2"}}');
23
+ module.exports = JSON.parse('{"name":"@bitwarden/cli","description":"A secure and free password manager for all of your devices.","version":"2024.4.1","keywords":["bitwarden","password","vault","password manager","cli"],"author":"Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)","homepage":"https://bitwarden.com","repository":{"type":"git","url":"https://github.com/bitwarden/clients"},"license":"GPL-3.0-only","scripts":{"clean":"rimraf dist","build":"webpack","build:debug":"npm run build && node --inspect ./build/bw.js","build:watch":"webpack --watch","build:prod":"cross-env NODE_ENV=production webpack","build:prod:watch":"cross-env NODE_ENV=production webpack --watch","package":"npm run package:win && npm run package:mac && npm run package:lin","package:win":"pkg . --targets win-x64 --output ./dist/windows/bw.exe","package:mac":"pkg . --targets macos-x64 --output ./dist/macos/bw","package:lin":"pkg . --targets linux-x64 --output ./dist/linux/bw","debug":"node --inspect ./build/bw.js","dist":"npm run build:prod && npm run clean && npm run package","dist:win":"npm run build:prod && npm run clean && npm run package:win","dist:mac":"npm run build:prod && npm run clean && npm run package:mac","dist:lin":"npm run build:prod && npm run clean && npm run package:lin","publish:npm":"npm run build:prod && npm publish --access public","test":"jest","test:watch":"jest --watch","test:watch:all":"jest --watchAll"},"bin":{"bw":"build/bw.js"},"pkg":{"assets":["./build/**/*","../../node_modules/argon2/**/*"]},"dependencies":{"@koa/multer":"3.0.2","@koa/router":"12.0.1","argon2":"0.31.0","big-integer":"1.6.51","browser-hrtime":"1.1.8","chalk":"4.1.2","commander":"11.1.0","form-data":"4.0.0","https-proxy-agent":"7.0.2","inquirer":"8.2.6","jsdom":"23.0.1","jszip":"3.10.1","koa":"2.15.0","koa-bodyparser":"4.4.1","koa-json":"2.0.2","lowdb":"1.0.0","lunr":"2.3.9","multer":"1.4.5-lts.1","node-fetch":"2.6.12","node-forge":"1.3.1","open":"8.4.2","papaparse":"5.4.1","proper-lockfile":"4.1.2","rxjs":"7.8.1","tldts":"6.1.16","zxcvbn":"4.4.2"}}');
24
24
 
25
25
  /***/ })
26
26
 
@@ -49674,6 +49674,7 @@ var program_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
49674
49674
 
49675
49675
 
49676
49676
 
49677
+
49677
49678
  const writeLn = CliUtils.writeLn;
49678
49679
  class Program {
49679
49680
  constructor(main) {
@@ -49708,9 +49709,14 @@ class Program {
49708
49709
  external_commander_namespaceObject.program.on("option:nointeraction", () => {
49709
49710
  process.env.BW_NOINTERACTION = "true";
49710
49711
  });
49711
- external_commander_namespaceObject.program.on("option:session", (key) => {
49712
+ external_commander_namespaceObject.program.on("option:session", (key) => program_awaiter(this, void 0, void 0, function* () {
49712
49713
  process.env.BW_SESSION = key;
49713
- });
49714
+ // once we have the session key, we can set the user key in memory
49715
+ const activeAccount = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.main.accountService.activeAccount$);
49716
+ if (activeAccount) {
49717
+ yield this.main.userAutoUnlockKeyService.setUserKeyInMemoryIfAutoUserKeySet(activeAccount.id);
49718
+ }
49719
+ }));
49714
49720
  external_commander_namespaceObject.program.on("command:*", () => {
49715
49721
  writeLn(external_chalk_namespaceObject.redBright("Invalid command: " + external_commander_namespaceObject.program.args.join(" ")), false, true);
49716
49722
  writeLn("See --help for a list of available commands.", true, true);
@@ -51234,6 +51240,7 @@ class Main {
51234
51240
  this.individualExportService = new IndividualVaultExportService(this.folderService, this.cipherService, this.cryptoService, this.cryptoFunctionService, this.stateService);
51235
51241
  this.organizationExportService = new OrganizationVaultExportService(this.cipherService, this.apiService, this.cryptoService, this.cryptoFunctionService, this.stateService, this.collectionService);
51236
51242
  this.exportService = new VaultExportService(this.individualExportService, this.organizationExportService);
51243
+ this.userAutoUnlockKeyService = new UserAutoUnlockKeyService(this.cryptoService);
51237
51244
  this.auditService = new AuditService(this.cryptoFunctionService, this.apiService);
51238
51245
  this.program = new Program(this);
51239
51246
  this.vaultProgram = new VaultProgram(this);
@@ -51242,7 +51249,6 @@ class Main {
51242
51249
  this.eventUploadService = new EventUploadService(this.apiService, this.stateProvider, this.logService, this.authService);
51243
51250
  this.eventCollectionService = new EventCollectionService(this.cipherService, this.stateProvider, this.organizationService, this.eventUploadService, this.authService);
51244
51251
  this.providerApiService = new ProviderApiService(this.apiService);
51245
- this.userAutoUnlockKeyService = new UserAutoUnlockKeyService(this.cryptoService);
51246
51252
  }
51247
51253
  run() {
51248
51254
  return bw_awaiter(this, void 0, void 0, function* () {