(log)
| 193 | } |
| 194 | |
| 195 | async function ensureSeed(log) { |
| 196 | if (await signInDemoOwner()) { |
| 197 | log(`Demo org present (${DEMO_EMAIL})`); |
| 198 | return; |
| 199 | } |
| 200 | log("Seeding demo org (Acme Robotics)..."); |
| 201 | await run("npx", ["tsx", "scripts/seed-demo-org.ts"], { |
| 202 | cwd: join(REPO_ROOT, "ee", "apps", "den-api"), |
| 203 | env: { ...process.env, ...DEN_ENV }, |
| 204 | }); |
| 205 | if (!(await signInDemoOwner())) { |
| 206 | throw new Error("Seed completed but the demo owner still cannot sign in."); |
| 207 | } |
| 208 | log("Demo org seeded"); |
| 209 | } |
| 210 | |
| 211 | async function freeStaleAppPorts(log) { |
| 212 | // If CDP is not serving but the dev ports are held, a previous run left a |
no test coverage detected