| 211 | private intervalHandle: NodeJS.Timeout | null = null; |
| 212 | |
| 213 | constructor(opts: TelemetryOptions = {}) { |
| 214 | this.dir = opts.dir ?? path.join(os.homedir(), '.codegraph'); |
| 215 | this.fetchImpl = opts.fetchImpl ?? globalThis.fetch; |
| 216 | this.now = opts.now ?? (() => new Date()); |
| 217 | this.env = opts.env ?? process.env; |
| 218 | this.writeStderr = opts.stderr ?? ((line) => process.stderr.write(line)); |
| 219 | this.installExitHook = opts.installExitHook ?? true; |
| 220 | } |
| 221 | |
| 222 | // ---------------------------------------------------------------- consent |
| 223 | |