From 29795e0d514ba9cb1595cfdc73bb8962a92f8729 Mon Sep 17 00:00:00 2001 From: ginnoir Date: Mon, 1 Jun 2026 18:46:53 -0500 Subject: [PATCH] chore: format pre-existing files missed by lint-staged --- docs/dev-login.md | 11 ++++++----- scripts/dev.mjs | 10 +++------- scripts/send-test-push.mts | 6 +++++- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/docs/dev-login.md b/docs/dev-login.md index 54dbfe1..6c8a000 100644 --- a/docs/dev-login.md +++ b/docs/dev-login.md @@ -42,11 +42,11 @@ pnpm dev:local The script prints three URLs at startup: -| URL | Use for | -|-----|---------| -| `http://localhost:3000` | Browser on this machine | -| `http://192.168.1.74:3000` | Phone on the same WiFi (general UI testing) | -| `https://dev.ginnoir.com` | Push notifications + PWA install (needs Caddy — see below) | +| URL | Use for | +| -------------------------- | ---------------------------------------------------------- | +| `http://localhost:3000` | Browser on this machine | +| `http://192.168.1.74:3000` | Phone on the same WiFi (general UI testing) | +| `https://dev.ginnoir.com` | Push notifications + PWA install (needs Caddy — see below) | Then open `/login` and click **Dev login**. @@ -55,6 +55,7 @@ Then open `/login` and click **Dev login**. `next dev` has hot module replacement — most `.ts`/`.tsx` changes apply instantly without a restart. A full restart (`Ctrl+C` → `pnpm dev:local`) is needed for: + - `.env` changes - `next.config.ts` changes diff --git a/scripts/dev.mjs b/scripts/dev.mjs index 0373012..2e51c05 100644 --- a/scripts/dev.mjs +++ b/scripts/dev.mjs @@ -19,11 +19,7 @@ function getLanIp() { .flat() .filter((n) => n.family === "IPv4" && !n.internal) .map((n) => n.address); - return ( - all.find((a) => a.startsWith("192.168.") || a.startsWith("10.")) ?? - all[0] ?? - "unknown" - ); + return all.find((a) => a.startsWith("192.168.") || a.startsWith("10.")) ?? all[0] ?? "unknown"; } /** Poll TCP host:port until it accepts a connection or the timeout expires. */ @@ -43,8 +39,8 @@ function waitForTcp(host, port, timeoutMs = 30_000) { reject( new Error( `Postgres not ready on ${host}:${port} after ${timeoutMs / 1000}s. ` + - "Is Docker running? Check: docker compose -f docker-compose.dev.yaml logs" - ) + "Is Docker running? Check: docker compose -f docker-compose.dev.yaml logs", + ), ); } else { setTimeout(attempt, 500); diff --git a/scripts/send-test-push.mts b/scripts/send-test-push.mts index 923a762..4f3f8cc 100644 --- a/scripts/send-test-push.mts +++ b/scripts/send-test-push.mts @@ -36,7 +36,11 @@ for (const sub of subs) { try { await webPush.sendNotification( { endpoint: sub.endpoint, keys: { p256dh: sub.p256dh, auth: sub.auth } }, - JSON.stringify({ title: "famapp test", body: "Push notifications are working!", url: "/settings" }), + JSON.stringify({ + title: "famapp test", + body: "Push notifications are working!", + url: "/settings", + }), ); console.log(`Sent to ${sub.endpoint.slice(0, 60)}...`); } catch (err: unknown) {