Skip to content

Commit cf5bdd9

Browse files
authored
chore: task run updates + repo handling (#147)
1 parent 70ef037 commit cf5bdd9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2291
-1642
lines changed

apps/array/scripts/update-openapi-client.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22

33
import { execSync } from "node:child_process";
44
import * as fs from "node:fs";
5+
import { config } from "dotenv";
56
import * as yaml from "yaml";
67

7-
const SCHEMA_URL = "https://us.posthog.com/api/schema/";
8+
config();
9+
10+
const POSTHOG_API_HOST = process.env.VITE_POSTHOG_API_HOST;
11+
if (!POSTHOG_API_HOST) {
12+
throw new Error("VITE_POSTHOG_API_HOST environment variable is required");
13+
}
14+
15+
const SCHEMA_URL = `${POSTHOG_API_HOST}/api/schema/`;
816
const TEMP_SCHEMA_PATH = "temp-openapi.yaml";
917
const OUTPUT_PATH = "src/api/generated.ts";
1018

0 commit comments

Comments
 (0)