MCPcopy Create free account
hub / github.com/Marus/cortex-debug / getUUID

Function getUUID

src/reporting.ts:33–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31}
32
33function getUUID(): string {
34 if (!uuid) {
35 const settingspath = path.join(os.homedir(), '.cortex-debug');
36 if (fs.existsSync(settingspath)) {
37 const data = fs.readFileSync(settingspath, 'utf8');
38 const settings: UserSettings = JSON.parse(data);
39 uuid = settings.uuid;
40 }
41 else {
42 uuid = uuidv4();
43 const settings: UserSettings = { uuid: uuid };
44 fs.writeFileSync(settingspath, JSON.stringify(settings), 'utf8');
45 }
46 }
47
48 return uuid;
49}
50
51function telemetryEnabled(): boolean {
52 const telemetry = vscode.workspace.getConfiguration('telemetry');

Callers 1

activateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected