Skip to content

Commit a31a968

Browse files
committed
repo changes, create task run and pass to agent package
1 parent 9ee0388 commit a31a968

33 files changed

+1096
-614
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"@vitejs/plugin-react": "^4.2.1",
5252
"@vitest/ui": "^4.0.10",
5353
"autoprefixer": "^10.4.17",
54+
"dotenv": "^17.2.3",
5455
"electron": "^28.2.0",
5556
"husky": "^9.1.7",
5657
"jsdom": "^26.0.0",
@@ -73,7 +74,7 @@
7374
"@dnd-kit/react": "^0.1.21",
7475
"@floating-ui/dom": "^1.7.4",
7576
"@phosphor-icons/react": "^2.1.10",
76-
"@posthog/agent": "1.20.0",
77+
"@posthog/agent": "link:../agent",
7778
"@radix-ui/react-icons": "^1.3.2",
7879
"@radix-ui/themes": "^3.2.1",
7980
"@tanstack/react-query": "^5.90.2",

pnpm-lock.yaml

Lines changed: 5 additions & 140 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)