diff --git a/package.json b/package.json index c56bbdf4..3143e3b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@posthog/wizard", - "version": "1.8.3", + "version": "1.8.4", "homepage": "https://github.com/posthog/wizard", "repository": "https://github.com/posthog/wizard", "description": "The PostHog wizard helps you to configure your project", diff --git a/src/utils/query.ts b/src/utils/query.ts index 949bcdd6..ad4a25d8 100644 --- a/src/utils/query.ts +++ b/src/utils/query.ts @@ -5,8 +5,6 @@ import type { AIModel, CloudRegion } from './types'; import { getCloudUrlFromRegion } from './urls'; import { analytics } from './analytics'; import { AxiosError } from 'axios'; -import { fixtureTracker } from '../../e2e-tests/mocks/fixture-tracker'; -import { shouldRecord } from '../../e2e-tests/mocks/handlers'; export interface QueryOptions { message: string; @@ -36,7 +34,7 @@ export const query = async ({ { headers: { 'X-PostHog-Wizard-Hash': wizardHash, - ...(shouldRecord + ...(process.env.RECORD_FIXTURES === 'true' ? { 'X-PostHog-Wizard-Fixture-Generation': true } : {}), }, @@ -65,6 +63,10 @@ export const query = async ({ } if (process.env.NODE_ENV === 'test') { + const { fixtureTracker } = await import( + '../../e2e-tests/mocks/fixture-tracker.js' + ); + const requestBody = JSON.stringify({ message, model,