@bitwarden/cli 2025.1.1 → 2025.1.2

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
@@ -35357,8 +35357,8 @@ __webpack_require__.d(__webpack_exports__, {
35357
35357
 
35358
35358
  // EXTERNAL MODULE: ../../libs/common/src/state-migrations/index.ts
35359
35359
  var state_migrations = __webpack_require__(1181);
35360
- // EXTERNAL MODULE: ../../libs/common/src/state-migrations/migrate.ts + 68 modules
35361
- var migrate = __webpack_require__(1617);
35360
+ // EXTERNAL MODULE: ../../libs/common/src/state-migrations/migrate.ts + 69 modules
35361
+ var migrate = __webpack_require__(9176);
35362
35362
  ;// ../../libs/common/src/state-migrations/migration-helper.ts
35363
35363
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
35364
35364
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -39834,13 +39834,13 @@ class VaultTimeoutService {
39834
39834
  /* harmony export */ GR: () => (/* reexport safe */ _migrate__WEBPACK_IMPORTED_MODULE_0__.GR),
39835
39835
  /* harmony export */ yT: () => (/* reexport safe */ _migrate__WEBPACK_IMPORTED_MODULE_0__.yT)
39836
39836
  /* harmony export */ });
39837
- /* harmony import */ var _migrate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1617);
39837
+ /* harmony import */ var _migrate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9176);
39838
39838
 
39839
39839
 
39840
39840
 
39841
39841
  /***/ }),
39842
39842
 
39843
- /***/ 1617:
39843
+ /***/ 9176:
39844
39844
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
39845
39845
 
39846
39846
 
@@ -44325,6 +44325,62 @@ class MoveLastSyncDate extends Migrator {
44325
44325
  }
44326
44326
  }
44327
44327
 
44328
+ ;// ../../libs/common/src/state-migrations/migrations/69-migrate-incorrect-folder-key.ts
44329
+ var _69_migrate_incorrect_folder_key_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
44330
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
44331
+ return new (P || (P = Promise))(function (resolve, reject) {
44332
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
44333
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
44334
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44335
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
44336
+ });
44337
+ };
44338
+
44339
+ const BAD_FOLDER_KEY = {
44340
+ key: "folder", // We inadvertently changed the key from "folders" to "folder"
44341
+ stateDefinition: {
44342
+ name: "folder",
44343
+ },
44344
+ };
44345
+ const GOOD_FOLDER_KEY = {
44346
+ key: "folders", // We should keep the key as "folders"
44347
+ stateDefinition: {
44348
+ name: "folder",
44349
+ },
44350
+ };
44351
+ class MigrateIncorrectFolderKey extends Migrator {
44352
+ migrate(helper) {
44353
+ return _69_migrate_incorrect_folder_key_awaiter(this, void 0, void 0, function* () {
44354
+ function migrateUser(userId) {
44355
+ return _69_migrate_incorrect_folder_key_awaiter(this, void 0, void 0, function* () {
44356
+ const value = yield helper.getFromUser(userId, BAD_FOLDER_KEY);
44357
+ if (value != null) {
44358
+ yield helper.setToUser(userId, GOOD_FOLDER_KEY, value);
44359
+ }
44360
+ yield helper.removeFromUser(userId, BAD_FOLDER_KEY);
44361
+ });
44362
+ }
44363
+ const users = yield helper.getKnownUserIds();
44364
+ yield Promise.all(users.map((userId) => migrateUser(userId)));
44365
+ });
44366
+ }
44367
+ rollback(helper) {
44368
+ return _69_migrate_incorrect_folder_key_awaiter(this, void 0, void 0, function* () {
44369
+ function rollbackUser(userId) {
44370
+ return _69_migrate_incorrect_folder_key_awaiter(this, void 0, void 0, function* () {
44371
+ const value = yield helper.getFromUser(userId, GOOD_FOLDER_KEY);
44372
+ if (value != null) {
44373
+ yield helper.setToUser(userId, BAD_FOLDER_KEY, value);
44374
+ }
44375
+ yield helper.removeFromUser(userId, GOOD_FOLDER_KEY);
44376
+ });
44377
+ }
44378
+ const users = yield helper.getKnownUserIds();
44379
+ yield Promise.all(users.map((userId) => rollbackUser(userId)));
44380
+ });
44381
+ }
44382
+ }
44383
+
44328
44384
  ;// ../../libs/common/src/state-migrations/migrations/7-move-biometric-auto-prompt-to-account.ts
44329
44385
  var _7_move_biometric_auto_prompt_to_account_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
44330
44386
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -44607,10 +44663,11 @@ var migrate_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
44607
44663
 
44608
44664
 
44609
44665
 
44666
+
44610
44667
 
44611
44668
 
44612
44669
  const MIN_VERSION = 3;
44613
- const CURRENT_VERSION = 68;
44670
+ const CURRENT_VERSION = 69;
44614
44671
  function createMigrationBuilder() {
44615
44672
  return MigrationBuilder.create()
44616
44673
  .with(MinVersionMigrator)
@@ -44678,7 +44735,8 @@ function createMigrationBuilder() {
44678
44735
  .with(ForwarderOptionsMigrator, 64, 65)
44679
44736
  .with(MoveFinalDesktopSettingsMigrator, 65, 66)
44680
44737
  .with(RemoveUnassignedItemsBannerDismissed, 66, 67)
44681
- .with(MoveLastSyncDate, 67, CURRENT_VERSION);
44738
+ .with(MoveLastSyncDate, 67, 68)
44739
+ .with(MigrateIncorrectFolderKey, 68, CURRENT_VERSION);
44682
44740
  }
44683
44741
  function currentVersion(storageService, logService) {
44684
44742
  return migrate_awaiter(this, void 0, void 0, function* () {
@@ -52401,7 +52459,7 @@ var state = __webpack_require__(1068);
52401
52459
 
52402
52460
 
52403
52461
 
52404
- const FOLDER_ENCRYPTED_FOLDERS = state/* UserKeyDefinition */.Ok.record(state/* FOLDER_DISK */.Rv, "folder", {
52462
+ const FOLDER_ENCRYPTED_FOLDERS = state/* UserKeyDefinition */.Ok.record(state/* FOLDER_DISK */.Rv, "folders", {
52405
52463
  deserializer: (obj) => folder_data/* FolderData */.p.fromJSON(obj),
52406
52464
  clearOn: ["logout"],
52407
52465
  });
@@ -67657,7 +67715,7 @@ module.exports = require("path");
67657
67715
  /***/ 8330:
67658
67716
  /***/ ((module) => {
67659
67717
 
67660
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description":"A secure and free password manager for all of your devices.","version":"2025.1.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":"SEE LICENSE IN LICENSE.txt","scripts":{"clean":"rimraf dist","build:oss":"cross-env NODE_OPTIONS=\\"--max-old-space-size=8192\\" webpack","build:oss:debug":"npm run build:oss && node --inspect ./build/bw.js","build:oss:watch":"webpack --watch","build:oss:prod":"cross-env NODE_ENV=production webpack","build:oss:prod:watch":"cross-env NODE_ENV=production webpack --watch","debug":"node --inspect ./build/bw.js","publish:npm":"npm run build:oss:prod && npm publish --access public","build:bit":"cross-env NODE_OPTIONS=\\"--max-old-space-size=8192\\" webpack -c ../../bitwarden_license/bit-cli/webpack.config.js","build:bit:debug":"npm run build:bit && node --inspect ./build/bw.js","build:bit:watch":"webpack --watch -c ../../bitwarden_license/bit-cli/webpack.config.js","build:bit:prod":"cross-env NODE_ENV=production npm run build:bit","build:bit:prod:watch":"cross-env NODE_ENV=production npm run build:bit:watch","dist:oss:win":"npm run build:oss:prod && npm run clean && npm run package:oss:win","dist:oss:mac":"npm run build:oss:prod && npm run clean && npm run package:oss:mac","dist:oss:lin":"npm run build:oss:prod && npm run clean && npm run package:oss:lin","dist:bit:win":"npm run build:bit:prod && npm run clean && npm run package:bit:win","dist:bit:mac":"npm run build:bit:prod && npm run clean && npm run package:bit:mac","dist:bit:lin":"npm run build:bit:prod && npm run clean && npm run package:bit:lin","package:oss:win":"pkg . --targets win-x64 --output ./dist/oss/windows/bw.exe","package:oss:mac":"pkg . --targets macos-x64 --output ./dist/oss/macos/bw","package:oss:lin":"pkg . --targets linux-x64 --output ./dist/oss/linux/bw","package:bit:win":"pkg . --targets win-x64 --output ./dist/bit/windows/bw.exe","package:bit:mac":"pkg . --targets macos-x64 --output ./dist/bit/macos/bw","package:bit:lin":"pkg . --targets linux-x64 --output ./dist/bit/linux/bw","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":"13.1.0","argon2":"0.41.1","big-integer":"1.6.52","browser-hrtime":"1.1.8","chalk":"4.1.2","commander":"11.1.0","form-data":"4.0.0","https-proxy-agent":"7.0.5","inquirer":"8.2.6","jsdom":"25.0.1","jszip":"3.10.1","koa":"2.15.3","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.71","zxcvbn":"4.4.2"}}');
67718
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description":"A secure and free password manager for all of your devices.","version":"2025.1.2","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":"SEE LICENSE IN LICENSE.txt","scripts":{"clean":"rimraf dist","build:oss":"cross-env NODE_OPTIONS=\\"--max-old-space-size=8192\\" webpack","build:oss:debug":"npm run build:oss && node --inspect ./build/bw.js","build:oss:watch":"webpack --watch","build:oss:prod":"cross-env NODE_ENV=production webpack","build:oss:prod:watch":"cross-env NODE_ENV=production webpack --watch","debug":"node --inspect ./build/bw.js","publish:npm":"npm run build:oss:prod && npm publish --access public","build:bit":"cross-env NODE_OPTIONS=\\"--max-old-space-size=8192\\" webpack -c ../../bitwarden_license/bit-cli/webpack.config.js","build:bit:debug":"npm run build:bit && node --inspect ./build/bw.js","build:bit:watch":"webpack --watch -c ../../bitwarden_license/bit-cli/webpack.config.js","build:bit:prod":"cross-env NODE_ENV=production npm run build:bit","build:bit:prod:watch":"cross-env NODE_ENV=production npm run build:bit:watch","dist:oss:win":"npm run build:oss:prod && npm run clean && npm run package:oss:win","dist:oss:mac":"npm run build:oss:prod && npm run clean && npm run package:oss:mac","dist:oss:lin":"npm run build:oss:prod && npm run clean && npm run package:oss:lin","dist:bit:win":"npm run build:bit:prod && npm run clean && npm run package:bit:win","dist:bit:mac":"npm run build:bit:prod && npm run clean && npm run package:bit:mac","dist:bit:lin":"npm run build:bit:prod && npm run clean && npm run package:bit:lin","package:oss:win":"pkg . --targets win-x64 --output ./dist/oss/windows/bw.exe","package:oss:mac":"pkg . --targets macos-x64 --output ./dist/oss/macos/bw","package:oss:lin":"pkg . --targets linux-x64 --output ./dist/oss/linux/bw","package:bit:win":"pkg . --targets win-x64 --output ./dist/bit/windows/bw.exe","package:bit:mac":"pkg . --targets macos-x64 --output ./dist/bit/macos/bw","package:bit:lin":"pkg . --targets linux-x64 --output ./dist/bit/linux/bw","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":"13.1.0","argon2":"0.41.1","big-integer":"1.6.52","browser-hrtime":"1.1.8","chalk":"4.1.2","commander":"11.1.0","form-data":"4.0.0","https-proxy-agent":"7.0.5","inquirer":"8.2.6","jsdom":"25.0.1","jszip":"3.10.1","koa":"2.15.3","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.71","zxcvbn":"4.4.2"}}');
67661
67719
 
67662
67720
  /***/ }),
67663
67721