(event: TelemetryEvents, properties: Record<string, unknown> = {})
| 58 | } |
| 59 | |
| 60 | track(event: TelemetryEvents, properties: Record<string, unknown> = {}) { |
| 61 | if (this.mixpanel) { |
| 62 | const payload = { |
| 63 | distinct_id: this.hostId, |
| 64 | session: this.sessionid, |
| 65 | time: new Date(), |
| 66 | $os: this._os_type, |
| 67 | osType: this._os_type, |
| 68 | osRelease: this._os_release, |
| 69 | osPlatform: this._os_platform, |
| 70 | osArch: this._os_arch, |
| 71 | osVersion: this._os_version, |
| 72 | nodeVersion: process.version, |
| 73 | version: this.version, |
| 74 | prismaVersion: this.prismaVersion, |
| 75 | isDocker: this.isDocker, |
| 76 | isWsl: this.isWsl, |
| 77 | isContainer: this.isContainer, |
| 78 | isCi: this.isCi, |
| 79 | ...properties, |
| 80 | }; |
| 81 | this.mixpanel.track(event, payload); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | trackError(err: Error) { |
| 86 | this.track('cli:error', { |
no outgoing calls
no test coverage detected