diff --git a/packages/wrangler/src/__tests__/metrics.test.ts b/packages/wrangler/src/__tests__/metrics.test.ts index a83abd14a677..ee496b64060c 100644 --- a/packages/wrangler/src/__tests__/metrics.test.ts +++ b/packages/wrangler/src/__tests__/metrics.test.ts @@ -237,7 +237,7 @@ describe("metrics", () => { wranglerVersion: "1.2.3", isFirstUsage: false, isCI: false, - isNonInteractive: false, + isInteractive: true, argsUsed: [ "array", "number", @@ -275,7 +275,7 @@ describe("metrics", () => { wranglerVersion: "1.2.3", isFirstUsage: false, isCI: false, - isNonInteractive: false, + isInteractive: true, argsUsed: [ "array", "number", @@ -335,7 +335,7 @@ describe("metrics", () => { wranglerVersion: "1.2.3", isFirstUsage: false, isCI: false, - isNonInteractive: false, + isInteractive: true, argsUsed: [ "array", "number", @@ -374,7 +374,7 @@ describe("metrics", () => { wranglerVersion: "1.2.3", isFirstUsage: false, isCI: false, - isNonInteractive: false, + isInteractive: true, argsUsed: [ "array", "number", @@ -426,7 +426,7 @@ describe("metrics", () => { await runWrangler("command subcommand positional"); expect(requests.count).toBe(2); - expect(std.debug).toContain('isNonInteractive":true'); + expect(std.debug).toContain('"isInteractive":false,'); }); describe("banner", () => { diff --git a/packages/wrangler/src/metrics/metrics-dispatcher.ts b/packages/wrangler/src/metrics/metrics-dispatcher.ts index 3c3ec6f5d807..c3fd3880e918 100644 --- a/packages/wrangler/src/metrics/metrics-dispatcher.ts +++ b/packages/wrangler/src/metrics/metrics-dispatcher.ts @@ -1,6 +1,6 @@ import chalk from "chalk"; import { fetch } from "undici"; -import isInteractive from "../is-interactive"; +import _isInteractive from "../is-interactive"; import { logger } from "../logger"; import { CI } from "./../is-ci"; import { @@ -29,7 +29,7 @@ export function getMetricsDispatcher(options: MetricsConfigOptions) { const packageManager = getPackageManager(); const isFirstUsage = readMetricsConfig().permission === undefined; const isCI = CI.isCI(); - const isNonInteractive = !isInteractive(); + const isInteractive = _isInteractive(); const amplitude_session_id = Date.now(); let amplitude_event_id = 0; @@ -83,7 +83,7 @@ export function getMetricsDispatcher(options: MetricsConfigOptions) { packageManager, isFirstUsage, isCI, - isNonInteractive, + isInteractive, argsUsed, argsCombination, }; diff --git a/packages/wrangler/src/metrics/send-event.ts b/packages/wrangler/src/metrics/send-event.ts index 74b6ba6bda94..8f2d56b17d21 100644 --- a/packages/wrangler/src/metrics/send-event.ts +++ b/packages/wrangler/src/metrics/send-event.ts @@ -141,7 +141,7 @@ export type CommonEventProperties = { amplitude_event_id: number; isCI: boolean; - isNonInteractive: boolean; + isInteractive: boolean; argsUsed: string[]; argsCombination: string; };