MCPcopy Create free account
hub / github.com/EvoMap/evolver / clearSettings

Function clearSettings

src/proxy/server/settings.js:50–63  ·  view source on GitHub ↗
(opts = {})

Source from the content-addressed store, hash-verified

48}
49
50function clearSettings(opts = {}) {
51 try {
52 const file = getSettingsFile();
53 if (fs.existsSync(file)) {
54 const current = readSettings();
55 const proxyPid = current.proxy?.pid;
56 if (!opts.force && proxyPid && proxyPid !== process.pid) return false;
57 delete current.proxy;
58 fs.writeFileSync(file, JSON.stringify(current, null, 2), 'utf8');
59 return true;
60 }
61 } catch {}
62 return false;
63}
64
65function isStaleProxy() {
66 const settings = readSettings();

Callers 3

stopMethod · 0.85
clearIfStaleFunction · 0.85

Calls 2

getSettingsFileFunction · 0.85
readSettingsFunction · 0.85

Tested by

no test coverage detected