UNPKG

powerbi-cli

Version:

Power BI command line interface for managing Power BI Embedded workspace collections

31 lines 877 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var fs = require("fs"); var _ = require("lodash"); var filePath = '.powerbirc'; var Config = (function () { function Config() { } /** * Gets the saved configuration values */ Config.get = function () { if (!fs.existsSync(filePath)) { return {}; } var configFileRaw = fs.readFileSync(filePath, { encoding: 'utf8' }); return configFileRaw ? JSON.parse(configFileRaw) : {}; }; /** * Stores the configuration values */ Config.set = function (settings) { fs.writeFileSync(filePath, JSON.stringify(settings, null, 4)); }; Config.merge = function (settings) { return _.merge(Config.get(), settings); }; return Config; }()); exports.Config = Config; //# sourceMappingURL=config.js.map