MCPcopy Create free account
hub / github.com/arctic-cli/interface / update

Function update

packages/arctic/src/config/config.ts:1126–1133  ·  view source on GitHub ↗
(config: Info)

Source from the content-addressed store, hash-verified

1124 }
1125
1126 export async function update(config: Info) {
1127 const jsoncPath = path.join(Instance.directory, "arctic.jsonc")
1128 const jsonPath = path.join(Instance.directory, "arctic.json")
1129 const filepath = (await Bun.file(jsoncPath).exists()) ? jsoncPath : jsonPath
1130 const existing = await loadFile(filepath)
1131 await Bun.write(filepath, JSON.stringify(mergeDeep(existing, config), null, 2))
1132 await Instance.dispose()
1133 }
1134
1135 export async function directories() {
1136 return state().then((x) => x.directories)

Callers

nothing calls this directly

Calls 3

loadFileFunction · 0.85
existsMethod · 0.45
disposeMethod · 0.45

Tested by

no test coverage detected