Files
kamaskandClaude Sonnet 5.5 b0bcd7ca2d style: apply prettier formatting
Routine formatting only, no functional changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GHq7GcQtB91bnq3832H76
2026-10-21 21:01:44 +03:00

15 lines
526 B
JavaScript

// Creates the PocketBase superuser or resets its password (idempotent).
import { execFileSync } from 'node:child_process';
const { PB_SUPERUSER_EMAIL: email, PB_SUPERUSER_PASSWORD: password } = process.env;
const dir = process.env.PB_DIR || 'pocketbase/pb_data';
if (!email || !password) {
console.error('PB_SUPERUSER_EMAIL and PB_SUPERUSER_PASSWORD must be set (see .env.example)');
process.exit(1);
}
execFileSync('pocketbase', ['superuser', 'upsert', email, password, '--dir', dir], {
stdio: 'inherit',
});