diff --git a/packages/core/src/lib/defaults.ts b/packages/core/src/lib/defaults.ts index 50f1eca00d5..81b5ae4a493 100644 --- a/packages/core/src/lib/defaults.ts +++ b/packages/core/src/lib/defaults.ts @@ -1,2 +1 @@ export const healthCheckPath = '/_healthcheck' -export const telemetryEndpoint = 'https://telemetry.keystonejs.com' diff --git a/packages/core/src/lib/telemetry.ts b/packages/core/src/lib/telemetry.ts index 292ce5a5d3b..413272f6c0d 100644 --- a/packages/core/src/lib/telemetry.ts +++ b/packages/core/src/lib/telemetry.ts @@ -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', @@ -273,7 +280,7 @@ async function sendDeviceTelemetryEvent () { await sendEvent('device', { previous: lastSentDate, - os: os.platform(), + os: platform(), node: process.versions.node.split('.')[0], })