@catladder/cli 0.0.0-main-c0845351 → 0.0.0-main-30667b5c

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.
@@ -403,17 +403,14 @@ exports.parseChoice = parseChoice;
403
403
  /***/ }),
404
404
 
405
405
  /***/ 9863:
406
- /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
406
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
407
407
 
408
408
  "use strict";
409
409
 
410
- var __importDefault = (this && this.__importDefault) || function (mod) {
411
- return (mod && mod.__esModule) ? mod : { "default": mod };
412
- };
413
410
  Object.defineProperty(exports, "__esModule", ({ value: true }));
414
411
  exports.readFileOrError = void 0;
415
- const fs_extra_1 = __importDefault(__nccwpck_require__(5501));
416
- const readFile = async (file) => fs_extra_1.default.readFile(file, { encoding: "utf-8" });
412
+ const fs_extra_1 = __nccwpck_require__(5501);
413
+ const readFile = (file) => (0, fs_extra_1.readFile)(file, { encoding: "utf-8" });
417
414
  const readFileOrError = async (filePath) => {
418
415
  try {
419
416
  const file = await readFile(filePath);
@@ -642,26 +639,23 @@ exports.upsertAllVariables = upsertAllVariables;
642
639
  /***/ }),
643
640
 
644
641
  /***/ 2636:
645
- /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
642
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
646
643
 
647
644
  "use strict";
648
645
 
649
- var __importDefault = (this && this.__importDefault) || function (mod) {
650
- return (mod && mod.__esModule) ? mod : { "default": mod };
651
- };
652
646
  Object.defineProperty(exports, "__esModule", ({ value: true }));
653
647
  exports.setPreference = exports.getPreference = exports.hasPreference = void 0;
654
- const fs_extra_1 = __importDefault(__nccwpck_require__(5501));
648
+ const fs_extra_1 = __nccwpck_require__(5501);
655
649
  const os_1 = __nccwpck_require__(2037);
656
650
  const yaml_1 = __nccwpck_require__(8033);
657
651
  const directory = `${(0, os_1.homedir)()}/.catladder`;
658
652
  const file = `${directory}/preferences.yml`;
659
653
  const getPreferences = async () => {
660
654
  var _a;
661
- if (!(await fs_extra_1.default.pathExists(file))) {
662
- await fs_extra_1.default.createFile(file);
655
+ if (!(await (0, fs_extra_1.pathExists)(file))) {
656
+ await (0, fs_extra_1.createFile)(file);
663
657
  }
664
- return ((_a = (0, yaml_1.parse)(await fs_extra_1.default.readFile(file, { encoding: "utf-8" }))) !== null && _a !== void 0 ? _a : {});
658
+ return ((_a = (0, yaml_1.parse)(await (0, fs_extra_1.readFile)(file, { encoding: "utf-8" }))) !== null && _a !== void 0 ? _a : {});
665
659
  };
666
660
  const hasPreference = async (key) => {
667
661
  const preferences = await getPreferences();
@@ -679,7 +673,7 @@ const setPreference = async (key, value) => {
679
673
  ...preferences,
680
674
  [key]: value,
681
675
  };
682
- await fs_extra_1.default.writeFile(file, (0, yaml_1.stringify)(newPreferences));
676
+ await (0, fs_extra_1.writeFile)(file, (0, yaml_1.stringify)(newPreferences));
683
677
  };
684
678
  exports.setPreference = setPreference;
685
679
  //# sourceMappingURL=index.js.map