- pnpm dev:local/dev:reset: orchestrate DB container, migrations, seed, and Next.js dev server in one command; Caddy snippet + docs for HTTPS via dev.ginnoir.com - Fix dev login on HTTPS: set both authjs.session-token and __Secure-authjs.session-token so Auth.js finds the session regardless of cookie name resolution - Suppress hydration mismatch on <html> caused by pre-paint script changing data-nav before React hydrates - VAPID startup warning if keys not configured; remove dead NEXT_PUBLIC_VAPID_PUBLIC_KEY var - PushOptIn: hydrate subscription state on mount; reuse existing subscription on iOS to avoid redundant prompts - sendPushToEndpoint: new function to send to a single device endpoint - sendTestNotification: scoped to the calling device's endpoint (ownership-verified) instead of all user subscriptions
25 lines
731 B
JavaScript
25 lines
731 B
JavaScript
/**
|
|
* Dev environment reset script.
|
|
*
|
|
* Tears down the local Postgres container and deletes its volume (all local
|
|
* data is lost), then performs a fresh startup: container up, migrate, seed,
|
|
* Next.js dev server.
|
|
*
|
|
* Use this when you want a completely clean local database — e.g. after a
|
|
* destructive schema change or to reproduce a fresh-install scenario.
|
|
*
|
|
* Usage: pnpm dev:reset
|
|
*/
|
|
|
|
import { execSync } from "child_process";
|
|
import { main } from "./dev.mjs";
|
|
|
|
console.log("\n⚠ Resetting dev environment — all local data will be deleted.");
|
|
execSync("docker compose -f docker-compose.dev.yaml down -v", {
|
|
stdio: "inherit",
|
|
shell: true,
|
|
});
|
|
|
|
console.log("\n▸ Restarting from scratch...");
|
|
await main();
|