UNPKG

@grouparoo/core

Version:
15 lines (14 loc) 781 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.loadSetting = void 0; const codeConfig_1 = require("../../classes/codeConfig"); const __1 = require("../.."); // configLoader imports need to be from root async function loadSetting(configObject, externallyValidate, validate = false) { (0, codeConfig_1.validateConfigObjectKeys)(__1.Setting, configObject); const setting = await __1.plugin.updateSetting(configObject.pluginName, configObject.key, configObject.value); await setting.update({ locked: (0, codeConfig_1.getCodeConfigLockKey)() }); (0, codeConfig_1.logModel)(setting, validate ? "validated" : "updated"); // Settings is a special case that is not in the seenIds return {}; } exports.loadSetting = loadSetting;