| 163 | private intervalHandle: NodeJS.Timeout | null = null; |
| 164 | |
| 165 | constructor(opts: TelemetryOptions = {}) { |
| 166 | this.dir = opts.dir ?? path.join(os.homedir(), '.codegraph'); |
| 167 | this.fetchImpl = opts.fetchImpl ?? globalThis.fetch; |
| 168 | this.now = opts.now ?? (() => new Date()); |
| 169 | this.env = opts.env ?? process.env; |
| 170 | this.writeStderr = opts.stderr ?? ((line) => process.stderr.write(line)); |
| 171 | this.installExitHook = opts.installExitHook ?? true; |
| 172 | } |
| 173 | |
| 174 | // ---------------------------------------------------------------- consent |
| 175 | |