chore: format pre-existing files missed by lint-staged

This commit is contained in:
ginnoir
2026-06-01 18:46:53 -05:00
parent 8921cb0444
commit 29795e0d51
3 changed files with 14 additions and 13 deletions
+6 -5
View File
@@ -42,11 +42,11 @@ pnpm dev:local
The script prints three URLs at startup: The script prints three URLs at startup:
| URL | Use for | | URL | Use for |
|-----|---------| | -------------------------- | ---------------------------------------------------------- |
| `http://localhost:3000` | Browser on this machine | | `http://localhost:3000` | Browser on this machine |
| `http://192.168.1.74:3000` | Phone on the same WiFi (general UI testing) | | `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) | | `https://dev.ginnoir.com` | Push notifications + PWA install (needs Caddy — see below) |
Then open `/login` and click **Dev login**. 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. `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: A full restart (`Ctrl+C``pnpm dev:local`) is needed for:
- `.env` changes - `.env` changes
- `next.config.ts` changes - `next.config.ts` changes
+3 -7
View File
@@ -19,11 +19,7 @@ function getLanIp() {
.flat() .flat()
.filter((n) => n.family === "IPv4" && !n.internal) .filter((n) => n.family === "IPv4" && !n.internal)
.map((n) => n.address); .map((n) => n.address);
return ( return all.find((a) => a.startsWith("192.168.") || a.startsWith("10.")) ?? all[0] ?? "unknown";
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. */ /** 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( reject(
new Error( new Error(
`Postgres not ready on ${host}:${port} after ${timeoutMs / 1000}s. ` + `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 { } else {
setTimeout(attempt, 500); setTimeout(attempt, 500);
+5 -1
View File
@@ -36,7 +36,11 @@ for (const sub of subs) {
try { try {
await webPush.sendNotification( await webPush.sendNotification(
{ endpoint: sub.endpoint, keys: { p256dh: sub.p256dh, auth: sub.auth } }, { 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)}...`); console.log(`Sent to ${sub.endpoint.slice(0, 60)}...`);
} catch (err: unknown) { } catch (err: unknown) {