pnpm: allow build scripts (esbuild, sharp, oxide) for non-interactive installs
10 changed files +21 −1
added
e2e-shots/page-compare.png
+0 −0
Binary file not shown.
added
e2e-shots/page-images.png
+0 −0
Binary file not shown.
added
e2e-shots/page-memory.png
+0 −0
Binary file not shown.
added
e2e-shots/page-models.png
+0 −0
Binary file not shown.
added
e2e-shots/page-projects-new.png
+0 −0
Binary file not shown.
added
e2e-shots/page-research.png
+0 −0
Binary file not shown.
added
e2e-shots/page-settings.png
+0 −0
Binary file not shown.
added
e2e-shots/page-usage.png
+0 −0
Binary file not shown.
modified
package.json
+10 −1
@@ -60,5 +60,14 @@ | |||||
| 60 | "playwright": "^1.64.1", | 60 | "playwright": "^1.64.1", | ||
| 61 | "tailwindcss": "^4.3.3", | 61 | "tailwindcss": "^4.3.3", | ||
| 62 | "typescript": "^5.9.3" | 62 | "typescript": "^5.9.3" | ||
| 63 | + }, | ||||
| 64 | + "pnpm": { | ||||
| 65 | + "onlyBuiltDependencies": [ | ||||
| 66 | + "esbuild", | ||||
| 67 | + "sharp", | ||||
| 68 | + "unrs-resolver", | ||||
| 69 | + "@tailwindcss/oxide", | ||||
| 70 | + "@node-rs/argon2" | ||||
| 71 | + ] | ||||
| 63 | } | 72 | } | ||
| 64 | −} | ||||
| \ No newline at end of file | |||||
| 73 | +} | ||||
added
scripts/e2e/pages.mjs
+11 −0
@@ -0,0 +1,11 @@ | |||||
| 1 | +import { chromium } from "playwright"; import fs from "node:fs"; | ||||
| 2 | +const BASE = process.env.BASE ?? "http://localhost:8500"; | ||||
| 3 | +const PW = fs.readFileSync(process.env.HOME + "/Desktop/Cluster/secrets/chat-spboucher-ai.devpassword", "utf8").trim(); | ||||
| 4 | +const browser = await chromium.launch(); const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } }); const page = await ctx.newPage(); | ||||
| 5 | +const errors = []; page.on("pageerror", e => errors.push(e.message)); page.on("console", m => { if (m.type() === "error") errors.push(m.text().slice(0, 200)); }); | ||||
| 6 | +await page.goto(BASE + "/login"); await page.fill('input[autocomplete="username"]', "simon"); await page.fill('input[type="password"]', PW); await page.click('button[type="submit"]'); await page.waitForURL(BASE + "/"); | ||||
| 7 | +for (const p of ["models", "compare", "research", "memory", "images", "usage", "settings", "projects/new"]) { | ||||
| 8 | + await page.goto(`${BASE}/${p}`); await page.waitForLoadState("networkidle").catch(() => {}); await page.waitForTimeout(1200); | ||||
| 9 | + await page.screenshot({ path: `e2e-shots/page-${p.replace("/", "-")}.png` }); console.log("shot", p); | ||||
| 10 | +} | ||||
| 11 | +console.log("errors:", JSON.stringify(errors.slice(0, 8), null, 1)); await browser.close(); | ||||
| 12 | |||||