filefive
Version:
SFTP/FTP/Amazon S3 client and dual-panel file manager for macOS and Linux
23 lines (22 loc) • 862 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const promises_1 = require("node:fs/promises");
const saveConnection_1 = require("./saveConnection");
const ramda_1 = require("ramda");
const _1 = require(".");
async function default_1(path, changes) {
const settings = (0, ramda_1.mergeDeepRight)(await _1.commands.getSettings(path), changes);
const config = {
mode: settings.mode,
theme: settings.theme,
fileTheme: settings.fileTheme,
timeFmt: settings.timeFmt,
sizeFmt: settings.sizeFmt,
local: (0, saveConnection_1.getSettings)(settings.local),
remote: (0, saveConnection_1.getSettings)(settings.remote),
path: settings.path,
sync: settings.sync
};
await (0, promises_1.writeFile)(path, JSON.stringify(config));
}