Skip to content

Commit 694a398

Browse files
committed
Removes environment variable steps from wizard
Eliminates the steps for adding or updating environment variables in the Astro wizard process. Updates the default changes in the integration configuration to reflect these removals while maintaining the functionality of the PostHog component. This streamlining aims to simplify the wizard experience and reduce complexity in managing environment variables.
1 parent be0d548 commit 694a398

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

src/astro/astro-wizard.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ import { getOutroMessage } from '../lib/messages';
2525
import {
2626
addEditorRulesStep,
2727
addMCPServerToClientsStep,
28-
addOrUpdateEnvironmentVariablesStep,
2928
runPrettierStep,
30-
uploadEnvironmentVariablesStep,
3129
} from '../steps';
3230

3331
export async function runAstroWizard(options: WizardOptions): Promise<void> {
@@ -94,32 +92,11 @@ export async function runAstroWizard(options: WizardOptions): Promise<void> {
9492
cloudRegion,
9593
});
9694

97-
const { relativeEnvFilePath, addedEnvVariables } =
98-
await addOrUpdateEnvironmentVariablesStep({
99-
variables: {
100-
PUBLIC_POSTHOG_KEY: projectApiKey,
101-
PUBLIC_POSTHOG_HOST: host,
102-
},
103-
installDir: options.installDir,
104-
integration: Integration.astro,
105-
});
106-
10795
await runPrettierStep({
10896
installDir: options.installDir,
10997
integration: Integration.astro,
11098
});
11199

112-
const uploadedEnvVars = await uploadEnvironmentVariablesStep(
113-
{
114-
PUBLIC_POSTHOG_KEY: projectApiKey,
115-
PUBLIC_POSTHOG_HOST: host,
116-
},
117-
{
118-
integration: Integration.astro,
119-
options,
120-
},
121-
);
122-
123100
const addedEditorRules = await addEditorRulesStep({
124101
installDir: options.installDir,
125102
rulesName: 'astro-rules.md',
@@ -136,8 +113,7 @@ export async function runAstroWizard(options: WizardOptions): Promise<void> {
136113
integration: Integration.astro,
137114
cloudRegion,
138115
addedEditorRules,
139-
envFileChanged: addedEnvVariables ? relativeEnvFilePath : undefined,
140-
uploadedEnvVars,
116+
uploadedEnvVars: [],
141117
});
142118

143119
clack.outro(outroMessage);

src/lib/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const INTEGRATION_CONFIG = {
106106
filterFilesRules: '',
107107
docsUrl: 'https://posthog.com/docs/libraries/js',
108108
defaultChanges:
109-
'• Installed posthog-js package\n• Added PostHog component with initialization script\n• Created PostHogLayout for consistent analytics tracking\n• Setup environment variables for API key and host',
109+
'• Added PostHog component with initialization script\n• Created PostHogLayout for consistent analytics tracking',
110110
nextSteps:
111111
'• Call posthog.identify() when a user signs into your app\n• Call posthog.capture() to capture custom events in your app\n• Use posthog.isFeatureEnabled() for feature flags',
112112
},

0 commit comments

Comments
 (0)