Skip to content

Commit

Permalink
inline telemetryEndpoint constant
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Feb 8, 2024
1 parent 0e181de commit 7961a0e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/core/src/lib/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export const healthCheckPath = '/_healthcheck'
export const telemetryEndpoint = 'https://telemetry.keystonejs.com'
15 changes: 11 additions & 4 deletions packages/core/src/lib/telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import os from 'os'
import { platform } from 'node:os'
import ci from 'ci-info'
import Conf from 'conf'
import fetch from 'node-fetch'
import chalk from 'chalk'
import { type Configuration, type Telemetry, type Project, type Device, type PackageName } from '../types/telemetry'
import {
type Configuration,
type Device,
type PackageName,
type Project,
type Telemetry,
} from '../types/telemetry'
import { type DatabaseProvider } from '../types'
import { telemetryEndpoint as defaultTelemetryEndpoint } from './defaults'
import type { InitialisedList } from './core/initialise-lists'

const defaultTelemetryEndpoint = 'https://telemetry.keystonejs.com'

const packageNames: PackageName[] = [
'@keystone-6/core',
'@keystone-6/auth',
Expand Down Expand Up @@ -273,7 +280,7 @@ async function sendDeviceTelemetryEvent () {

await sendEvent('device', {
previous: lastSentDate,
os: os.platform(),
os: platform(),
node: process.versions.node.split('.')[0],
})

Expand Down

0 comments on commit 7961a0e

Please sign in to comment.