MCPcopy Create free account
hub / github.com/anus-dev/ANUS / loadSettingsValue

Function loadSettingsValue

scripts/telemetry.js:30–44  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

28let settingsTarget = undefined;
29
30function loadSettingsValue(filePath) {
31 try {
32 if (existsSync(filePath)) {
33 const content = readFileSync(filePath, 'utf-8');
34 const jsonContent = content.replace(/\/\/[^\n]*/g, '');
35 const settings = JSON.parse(jsonContent);
36 return settings.telemetry?.target;
37 }
38 } catch (e) {
39 console.warn(
40 `⚠️ Warning: Could not parse settings file at ${filePath}: ${e.message}`,
41 );
42 }
43 return undefined;
44}
45
46settingsTarget = loadSettingsValue(WORKSPACE_SETTINGS_PATH);
47

Callers 1

telemetry.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected