bun dw spins up a fully isolated per-worktree dev stack: Neon DB branch, Dragonfly + ElasticMQ via docker compose, portless aliases, tmux session, and emulate.dev Google OAuth. Workers, dev server, vite, checkout, and stripe-listen run as concurrently siblings. bun setup-test auto-runs on first dw and seeds unit-test-org via clearOrg+setupOrg+ensureDefaultStripeAccount with 13 features + team invites for all 5 useautumn.com members. Hardcoded localhost URLs in test scenarios now read AUTUMN_TEST_BASE_URL/AUTUMN_TEST_VITE_URL. preload-env.ts loads .env.local so bun t/cm/setup-test route to the worktree server. 1265-line scripts/dw.ts split into scripts/dw/ module (index + commands + helpers). server/src/db/initDrizzle.ts reverted to upstream (search_path concerns solved by per-branch Neon isolation). Workers enabled in agent worktrees now that SQS is per-worktree via ElasticMQ.
28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import { homedir } from "node:os";
|
|
import { dirname, join, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
export const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url));
|
|
export const PROJECT_ROOT = resolve(SCRIPT_DIR, "../..");
|
|
export const SHARED_DIR = join(PROJECT_ROOT, "shared");
|
|
|
|
export const REGISTRY_PATH = join(homedir(), ".autumn-worktrees.json");
|
|
export const MAX_WORKTREE = 50;
|
|
export const BRANCH_NAME_RE = /^dw-wt-\d+-[a-f0-9]+$/;
|
|
export const INACTIVITY_MS = 7 * 24 * 60 * 60 * 1000;
|
|
|
|
export const NEON_PROJECT_ID = "weathered-morning-43833874";
|
|
export const NEON_TEMPLATE_BRANCH = "dw-template";
|
|
export const NEON_PARENT_BRANCH = "production";
|
|
|
|
export const EMULATE_PID_FILE = join(homedir(), ".autumn-emulate.pid");
|
|
export const EMULATE_HEALTH_URL =
|
|
"https://google.emulate.localhost/.well-known/openid-configuration";
|
|
export const START_EMULATE_SH = join(SCRIPT_DIR, "../setup/start-emulate.sh");
|
|
|
|
export const ENV_LOCAL_TARGETS = [
|
|
"server/.env.local",
|
|
"vite/.env.local",
|
|
"apps/checkout/.env.local",
|
|
] as const;
|