Updates
This commit is contained in:
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = getSyncConfig;
|
||||
const fs_1 = __importDefault(require("fs"));
|
||||
const grab_dir_names_1 = __importDefault(require("./grab-dir-names"));
|
||||
function getSyncConfig() {
|
||||
try {
|
||||
const { syncConfigFilePath } = (0, grab_dir_names_1.default)();
|
||||
if (!fs_1.default.existsSync(syncConfigFilePath)) {
|
||||
fs_1.default.writeFileSync(syncConfigFilePath, JSON.stringify({}), "utf-8");
|
||||
return {};
|
||||
}
|
||||
const syncConfigJSON = fs_1.default.readFileSync(syncConfigFilePath, "utf-8");
|
||||
return JSON.parse(syncConfigJSON);
|
||||
}
|
||||
catch (error) {
|
||||
return { status: "error" };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user