UNPKG

@zowe/imperative

Version:
30 lines 948 B
"use strict"; /* * This program and the accompanying materials are made available under the terms of the * Eclipse Public License v2.0 which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-v20.html * * SPDX-License-Identifier: EPL-2.0 * * Copyright Contributors to the Zowe Project. * */ Object.defineProperty(exports, "__esModule", { value: true }); exports.JSONSettingsFilePersistence = void 0; const jsonfile_1 = require("jsonfile"); class JSONSettingsFilePersistence { constructor(settingsFile) { this.settingsFile = settingsFile; this.path = settingsFile; } read() { return (0, jsonfile_1.readFileSync)(this.path); } write(settings) { (0, jsonfile_1.writeFileSync)(this.path, settings, { spaces: 2 }); } } exports.JSONSettingsFilePersistence = JSONSettingsFilePersistence; //# sourceMappingURL=JSONSettingsFilePersistence.js.map