MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / setConfigKey

Function setConfigKey

src/lib/cli-config.ts:193–197  ·  view source on GitHub ↗
(config: CLIConfig, key: string, value: unknown)

Source from the content-addressed store, hash-verified

191 * Save the specified configuration key into managed config so it will be picked up
192 * in the future but not override user settings.
193 */
194export const setConfigKey = async (config: CLIConfig, key: string, value: unknown): Promise<void> => {
195 config.managedProfiles = mergeProfiles({ [config.profileName]: { [key]: value } }, config.managedProfiles)
196 await writeFile(config.managedConfigFilename, buildManagedConfigFileContents(config))
197 config.mergedProfiles = mergeProfiles(config.profiles, config.managedProfiles)
198}
199
200/**

Callers 2

selectFromListFunction · 0.85
cli-config.test.tsFile · 0.85

Calls 2

mergeProfilesFunction · 0.85

Tested by

no test coverage detected