mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
* chore(release): open v3.8.13 development cycle Bump 3.8.12 → 3.8.13 across package.json, lockfile, electron/, open-sse/, and docs/reference/openapi.yaml; add the [3.8.13] cycle placeholder to the root CHANGELOG and the 41 i18n mirrors. Integration branch for the v3.8.13 cycle — fixes/features land here via per-issue PRs and it merges to main at release time. * fix(ci): skip auto-deploy when VPS host is unreachable from the runner (#3299) Integrated into release/v3.8.13 * fix(dev): auto-rebuild better-sqlite3 on Node ABI mismatch at dev startup (#3301) Integrated into release/v3.8.13 * feat(api): accept path-scoped API keys on client API routes (#3300) Integrated into release/v3.8.13 * fix(sse): harden against empty responses causing Copilot Chat failures (#3297) Integrated into release/v3.8.13 * fix(api): remove Completions.me rickroll provider (discussion #3293) (#3302) Integrated into release/v3.8.13 * fix(opencode-provider): extract contextLength from live model catalog (#3298) Integrated into release/v3.8.13 * feat(web-cookie): self-service login infrastructure + auto-refresh daemon (#3292) Integrated into release/v3.8.13 * docs(changelog): record the v3.8.13 PRs merged this round (#3292/#3300/#3297/#3298/#3301/#3302/#3299) * fix(auth): harden URL token extraction — drop query-string fallback, gate to client routes (security follow-up to #3300) (#3309) Security follow-up to #3300 — integrated into release/v3.8.13 * docs: rename resolve-issues → review-issues skill references * fix(dashboard): keep no-auth providers visible under 'Show configured only' (#3290) (#3312) no-auth providers (opencode, duckduckgo-web, theoldllm, veoaifree-web) never create a DB connection row so stats.total stays 0, which the configured-only filter treated as 'unconfigured' and hid them — even though they are always usable and appear unconditionally in /v1/models. filterConfiguredProviderEntries now treats displayAuthType === 'no-auth' as configured. Co-authored-by: uniQta <uniQta@users.noreply.github.com> * fix(cli): resolve update paths relative to script + recursive backup (#3295) (#3313) omniroute update always failed on a global install: - getCurrentVersion() read package.json from process.cwd(), which on a global npm/brew install is the user's working dir, not the package root → null → 'Could not determine current version'. - createBackup() resolved bin/ from cwd too, and passed the 'cli' directory to copyFileSync → EISDIR, swallowed by the catch → 'Failed to create backup'. Both now resolve package.json/bin relative to the script via import.meta.url, and the backup uses cpSync({recursive:true}) so the cli/ directory is copied. Co-authored-by: uniQta <uniQta@users.noreply.github.com> * fix(theoldllm): read upstream body once to avoid [502] body-already-read (#3296) (#3314) On the cached-token path the executor never enters the refresh branch, so the same upstream Response was read with .text() twice (token-rejection check + final body). A Response body is single-use, so the second read threw 'Body is unusable: Body has already been read', caught and surfaced as [502]. Read the body once into finalBody and only re-read after a token-rejection refetch. Co-authored-by: onizukashonan14-png <onizukashonan14-png@users.noreply.github.com> * fix(sse): strip leaked internal tool envelopes from streaming output (#3311) Integrated into release/v3.8.13 * fix(sse): expose Claude + Gemini budget tiers in the antigravity catalog (#3184) (#3303) Integrated into release/v3.8.13 (#3184) * fix(catalog): compute combo context_length from known targets only (#3304) Integrated into release/v3.8.13 — live contextLength + known-targets combo context (#3298 follow-up) * chore(i18n): add message keys for proxy UI + vscode/ollama endpoint (#3307) Integrated into release/v3.8.13 — i18n message keys for proxy UI + vscode/ollama * feat(dashboard): i18n the proxy settings UI (#3310) Integrated into release/v3.8.13 — i18n the proxy settings UI * feat(api): model catalog enrichment + MCP model-catalog tools (#3306) Integrated into release/v3.8.13 — model catalog enrichment + MCP model-catalog tools, reconciled with #3309 URL-token hardening * test(catalog): align Antigravity preview-alias test with #3303 budget tiers #3303 added the Gemini `-high`/`-low` budget tiers to ANTIGRAVITY_PUBLIC_MODELS (user-callable on the Antigravity OAuth backend, verified via #3184), but did not update the catalog-route test that asserted `antigravity/gemini-3.1-pro-high` must NOT be exposed. The assertion now reflects the intended behavior — the client-visible budget alias IS surfaced — while keeping the legacy `gemini-claude-*` alias keys unexposed. Caught running the full catalog suite on the merged release HEAD (the #3303 round only ran the antigravity-aliases and usage-hardening files). * docs(changelog): record the 6 PRs merged this review round into v3.8.13 #3306/#3307/#3310 (New Features — VS Code split: catalog+MCP, i18n keys, proxy UI i18n), #3311/#3303/#3304 (Bug Fixes — SSE envelope sanitizer, antigravity budget tiers, combo known-targets context_length). * chore(release): finalize v3.8.13 changelog and cleanup Finalize the v3.8.13 changelog with release date, maintenance notes, and contributor credits. Update MCP docs to reference the correct tool inventory diagram, exclude nested .claude worktrees from ESLint scans, and tighten a response sanitizer type guard. * fix(dashboard): refresh connections after provider auth import (#3320) Integrated into release/v3.8.13 — refresh connections after provider auth import * fix(codex): strip client-only params on native /responses passthrough (#3317) (#3325) A /v1/responses request against the built-in codex/ provider does an openai-responses -> openai-responses passthrough (CodexExecutor.transformRequest returns the body early for _nativeCodexPassthrough). It forwarded client-only fields verbatim and the Codex upstream rejected them with 400 Unsupported parameter: prompt_cache_retention / safety_identifier / user — breaking Factory Droid (which injects all three). The chat-completions path already strips these (base.ts #1884, openai-responses translator #2770) but the passthrough skips translation. Strip the three fields in the shared block before the passthrough return; user is removed unconditionally since Codex /responses always rejects it. Co-authored-by: tycronk20 <tycronk20@users.noreply.github.com> * fix(dashboard): normalize agent-bridge /state response to stop page crash (#3318) (#3326) The Agent Bridge page seeded a well-shaped initialData default then replaced it wholesale with the raw /api/tools/agent-bridge/state response. The route returns { server, agents } but the UI reads { serverState, agentStates, bypassPatterns, mappings }, so serverState became undefined and AgentBridgeServerCard crashed on serverState.running — surfaced as the full-page 'Internal Server Error' boundary (client render error, not a real 5xx). Add a shared normalizeAgentBridgeState() that maps the route shape into the page contract (server.running/certExists -> serverState) and always returns safe defaults (never undefined serverState). Wired into both the SSR loader (page.tsx) and the polling hook. The legacy 'agents' entry shape differs from AgentStateEntry so it is not coerced; full route<->page contract reconciliation (port, upstreamCa, bypassPatterns, mappings, agentStates) is a follow-up. Co-authored-by: tycronk20 <tycronk20@users.noreply.github.com> * docs: VS Code/Ollama endpoints + env & i18n tooling (#3319) Integrated into release/v3.8.13 — VS Code/Ollama docs + env & i18n tooling * feat(provider): test-all endpoint, rate-limit overrides, visibility f… (#3267) Integrated into release/v3.8.13 — provider test-all endpoint, rate-limit overrides, model visibility * feat: auto-combo optimization, playground model dropdown, only-configured toggle (#3322) Integrated into release/v3.8.13 — auto-combo candidate expansion + playground dropdown + only-configured toggle * feat(api): VS Code Copilot Ollama-compatible BYOK endpoint (#3316) Integrated into release/v3.8.13 — VS Code Copilot Ollama-compatible BYOK endpoint (reconciled with #3306/#3309 auth hardening) * chore(release): document #3320 in the v3.8.13 changelog + contributor credits --------- Co-authored-by: Felipe Almeman <4226997+zhiru@users.noreply.github.com> Co-authored-by: Wilson <pedbookmed@gmail.com> Co-authored-by: Hernan Javier Ardila Sanchez <hjasgr@gmail.com> Co-authored-by: Paijo <14921983+oyi77@users.noreply.github.com> Co-authored-by: uniQta <uniQta@users.noreply.github.com> Co-authored-by: onizukashonan14-png <onizukashonan14-png@users.noreply.github.com> Co-authored-by: tycronk20 <tycronk20@users.noreply.github.com> Co-authored-by: Vinayrnani <vinayrnani@gmail.com>
351 lines
14 KiB
JavaScript
351 lines
14 KiB
JavaScript
#!/usr/bin/env node
|
||
/**
|
||
* OmniRoute — Zero-Config Bootstrap
|
||
*
|
||
* Auto-generates required secrets (JWT_SECRET, STORAGE_ENCRYPTION_KEY) if
|
||
* missing or empty, persists them to {DATA_DIR}/server.env so they survive
|
||
* restarts, Docker volume remounts, and upgrades.
|
||
*
|
||
* Works across all deployment modes:
|
||
* - npm / app runners: called from run-standalone.mjs and run-next.mjs
|
||
* - Docker: same, secrets persisted in mounted volume
|
||
* - Electron: called from main.js startup, persisted in DATA_DIR
|
||
*
|
||
* Priority (lowest → highest):
|
||
* 1. Auto-generated defaults
|
||
* 2. {DATA_DIR}/server.env (persisted on first boot)
|
||
* 3. Preferred config .env (DATA_DIR/.env -> ~/.omniroute/.env -> ./.env)
|
||
* 4. process.env (shell / Docker -e flags, highest priority)
|
||
*/
|
||
|
||
import { randomBytes, createDecipheriv, scryptSync, createHash } from "node:crypto";
|
||
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
||
import { createRequire } from "node:module";
|
||
import { homedir } from "node:os";
|
||
import { join, resolve } from "node:path";
|
||
|
||
const require = createRequire(import.meta.url);
|
||
|
||
// ── OAuth secrets that are optional but warn if missing ─────────────────────
|
||
const OPTIONAL_OAUTH_SECRETS = [
|
||
{ keys: ["ANTIGRAVITY_OAUTH_CLIENT_SECRET"], label: "Antigravity OAuth" },
|
||
{ keys: ["QODER_OAUTH_CLIENT_SECRET"], label: "Qoder OAuth" },
|
||
{
|
||
keys: ["GEMINI_CLI_OAUTH_CLIENT_SECRET", "GEMINI_OAUTH_CLIENT_SECRET"],
|
||
label: "Gemini OAuth",
|
||
},
|
||
];
|
||
|
||
// ── Resolve DATA_DIR (mirrors dataPaths.ts logic) ───────────────────────────
|
||
function resolveDataDir(overridePath, env = process.env) {
|
||
if (overridePath?.trim()) return resolve(overridePath);
|
||
|
||
const configured = env.DATA_DIR?.trim();
|
||
if (configured) return resolve(configured);
|
||
|
||
if (process.platform === "win32") {
|
||
const appData = env.APPDATA || join(homedir(), "AppData", "Roaming");
|
||
return join(appData, "omniroute");
|
||
}
|
||
|
||
const xdg = env.XDG_CONFIG_HOME?.trim();
|
||
if (xdg) return join(resolve(xdg), "omniroute");
|
||
|
||
return join(homedir(), ".omniroute");
|
||
}
|
||
|
||
function getPreferredEnvFilePath(env = process.env) {
|
||
const candidates = [];
|
||
|
||
if (env.DATA_DIR?.trim()) {
|
||
candidates.push(join(resolve(env.DATA_DIR.trim()), ".env"));
|
||
}
|
||
|
||
candidates.push(join(resolveDataDir(null, env), ".env"));
|
||
candidates.push(join(process.cwd(), ".env"));
|
||
|
||
return candidates.find((filePath) => existsSync(filePath)) ?? null;
|
||
}
|
||
|
||
function isNativeSqliteLoadError(error) {
|
||
const message = error instanceof Error ? error.message : String(error);
|
||
const code = error && typeof error === "object" && "code" in error ? error.code : undefined;
|
||
|
||
return (
|
||
message.includes("Module did not self-register") ||
|
||
message.includes("NODE_MODULE_VERSION") ||
|
||
message.includes("ERR_DLOPEN_FAILED") ||
|
||
message.includes("Could not locate the bindings file") ||
|
||
message.includes("Cannot find module 'better-sqlite3'") ||
|
||
code === "ERR_DLOPEN_FAILED" ||
|
||
code === "MODULE_NOT_FOUND"
|
||
);
|
||
}
|
||
|
||
function hasEncryptedCredentials(dataDir) {
|
||
const dbPath = join(dataDir, "storage.sqlite");
|
||
if (!existsSync(dbPath)) return false;
|
||
|
||
try {
|
||
const Database = require("better-sqlite3");
|
||
const db = new Database(dbPath, { readonly: true, fileMustExist: true });
|
||
try {
|
||
const row = db
|
||
.prepare(
|
||
`SELECT 1
|
||
FROM provider_connections
|
||
WHERE access_token LIKE 'enc:v1:%'
|
||
OR refresh_token LIKE 'enc:v1:%'
|
||
OR api_key LIKE 'enc:v1:%'
|
||
OR id_token LIKE 'enc:v1:%'
|
||
LIMIT 1`
|
||
)
|
||
.get();
|
||
return !!row;
|
||
} finally {
|
||
db.close();
|
||
}
|
||
} catch (error) {
|
||
if (isNativeSqliteLoadError(error)) {
|
||
return false;
|
||
}
|
||
|
||
const message = error instanceof Error ? error.message : String(error);
|
||
throw new Error(`Unable to inspect existing database at ${dbPath}: ${message}`);
|
||
}
|
||
}
|
||
|
||
// ── Parse a simple KEY=VALUE env file ───────────────────────────────────────
|
||
function parseEnvFile(filePath) {
|
||
if (!existsSync(filePath)) return {};
|
||
const env = {};
|
||
const lines = readFileSync(filePath, "utf8").split(/\r?\n/);
|
||
for (const line of lines) {
|
||
const trimmed = line.trim();
|
||
if (!trimmed || trimmed.startsWith("#")) continue;
|
||
const eqIdx = trimmed.indexOf("=");
|
||
if (eqIdx < 1) continue;
|
||
const key = trimmed.slice(0, eqIdx).trim();
|
||
const val = unquoteEnvValue(trimmed.slice(eqIdx + 1).trim());
|
||
env[key] = val;
|
||
}
|
||
return env;
|
||
}
|
||
|
||
function unquoteEnvValue(value) {
|
||
if (value.length < 2) return value;
|
||
const quote = value[0];
|
||
if ((quote !== '"' && quote !== "'") || value[value.length - 1] !== quote) return value;
|
||
return value.slice(1, -1);
|
||
}
|
||
|
||
// ── Write a simple KEY=VALUE env file ───────────────────────────────────────
|
||
function writeEnvFile(filePath, env) {
|
||
const lines = [
|
||
"# Auto-generated by OmniRoute bootstrap — do not delete",
|
||
`# Created: ${new Date().toISOString()}`,
|
||
"",
|
||
...Object.entries(env).map(([k, v]) => `${k}=${v}`),
|
||
"",
|
||
];
|
||
writeFileSync(filePath, lines.join("\n"), "utf8");
|
||
}
|
||
|
||
// ── Main bootstrap function ──────────────────────────────────────────────────
|
||
/**
|
||
* @param {{ dataDirOverride?: string; quiet?: boolean }} options
|
||
* @returns {Record<string, string>} merged env to pass to child process
|
||
*/
|
||
export function bootstrapEnv({ dataDirOverride, quiet = false } = {}) {
|
||
const log = quiet ? () => {} : (msg) => process.stderr.write(`[bootstrap] ${msg}\n`);
|
||
|
||
const preferredEnvPath = getPreferredEnvFilePath(process.env);
|
||
const preferredEnv = preferredEnvPath ? parseEnvFile(preferredEnvPath) : {};
|
||
const dataDir = resolveDataDir(dataDirOverride, { ...preferredEnv, ...process.env });
|
||
const serverEnvPath = join(dataDir, "server.env");
|
||
|
||
// ── Layer 1: Load persisted server.env ────────────────────────────────────
|
||
let persisted = parseEnvFile(serverEnvPath);
|
||
|
||
// ── Layer 2: Load the same preferred .env that the CLI wrapper uses ───────
|
||
// This keeps run-next / run-standalone consistent with `bin/omniroute.mjs`.
|
||
//
|
||
// We strip empty values from preferredEnv so an empty placeholder
|
||
// (e.g. `STORAGE_ENCRYPTION_KEY=` in the project .env template) does not
|
||
// override the real value persisted in server.env. Only the .env entries
|
||
// that the operator actually set should win.
|
||
const preferredEnvFiltered = Object.fromEntries(
|
||
Object.entries(preferredEnv).filter(([, v]) => typeof v === "string" && v.length > 0)
|
||
);
|
||
const merged = { ...persisted, ...preferredEnvFiltered, ...process.env };
|
||
|
||
// ── Auto-generate required secrets ────────────────────────────────────────
|
||
let needsPersist = false;
|
||
|
||
if (!merged.JWT_SECRET?.trim()) {
|
||
persisted.JWT_SECRET = randomBytes(64).toString("hex");
|
||
merged.JWT_SECRET = persisted.JWT_SECRET;
|
||
needsPersist = true;
|
||
log("✨ JWT_SECRET auto-generated (first run)");
|
||
}
|
||
|
||
if (!merged.STORAGE_ENCRYPTION_KEY?.trim()) {
|
||
if (hasEncryptedCredentials(dataDir)) {
|
||
throw new Error(
|
||
`Refusing to auto-generate STORAGE_ENCRYPTION_KEY: encrypted credentials already exist in ${join(
|
||
dataDir,
|
||
"storage.sqlite"
|
||
)}. Restore the key via ${preferredEnvPath ?? "an appropriate .env file"}, ${serverEnvPath}, or process.env.`
|
||
);
|
||
}
|
||
persisted.STORAGE_ENCRYPTION_KEY = randomBytes(32).toString("hex");
|
||
merged.STORAGE_ENCRYPTION_KEY = persisted.STORAGE_ENCRYPTION_KEY;
|
||
needsPersist = true;
|
||
log("✨ STORAGE_ENCRYPTION_KEY auto-generated (first run)");
|
||
}
|
||
|
||
if (!merged.STORAGE_ENCRYPTION_KEY_VERSION?.trim()) {
|
||
persisted.STORAGE_ENCRYPTION_KEY_VERSION = "v1";
|
||
merged.STORAGE_ENCRYPTION_KEY_VERSION = persisted.STORAGE_ENCRYPTION_KEY_VERSION;
|
||
needsPersist = true;
|
||
}
|
||
|
||
if (!merged.API_KEY_SECRET?.trim()) {
|
||
persisted.API_KEY_SECRET = randomBytes(32).toString("hex");
|
||
merged.API_KEY_SECRET = persisted.API_KEY_SECRET;
|
||
needsPersist = true;
|
||
log("✨ API_KEY_SECRET auto-generated (first run)");
|
||
}
|
||
|
||
// ── Persist new secrets ────────────────────────────────────────────────────
|
||
if (needsPersist) {
|
||
try {
|
||
mkdirSync(dataDir, { recursive: true });
|
||
// Only persist keys that we auto-generated (not .env or process.env vals)
|
||
writeEnvFile(serverEnvPath, persisted);
|
||
log(`📁 Secrets persisted to: ${serverEnvPath}`);
|
||
} catch (e) {
|
||
log(`⚠️ Could not persist secrets to ${serverEnvPath}: ${e.message}`);
|
||
}
|
||
}
|
||
|
||
// ── Mark as bootstrapped ───────────────────────────────────────────────────
|
||
if (needsPersist) {
|
||
merged.OMNIROUTE_BOOTSTRAPPED = "true";
|
||
}
|
||
|
||
// ── Warn about missing optional OAuth secrets ──────────────────────────────
|
||
const missingOauth = OPTIONAL_OAUTH_SECRETS.filter(
|
||
({ keys }) => !keys.some((key) => merged[key]?.trim())
|
||
);
|
||
if (missingOauth.length > 0) {
|
||
log("ℹ️ The following OAuth integrations are not configured:");
|
||
for (const { keys, label } of missingOauth) {
|
||
log(` • ${label} (${keys.join(" or ")}) — set in .env or ${serverEnvPath}`);
|
||
}
|
||
log(" These providers will not work until configured.");
|
||
}
|
||
|
||
// ── Warn about default password ────────────────────────────────────────────
|
||
if (merged.INITIAL_PASSWORD === "CHANGEME" || !merged.INITIAL_PASSWORD?.trim()) {
|
||
log("⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!");
|
||
}
|
||
|
||
// ── Decrypt-probe: verify STORAGE_ENCRYPTION_KEY matches encrypted data (#1622) ─
|
||
if (merged.STORAGE_ENCRYPTION_KEY?.trim() && hasEncryptedCredentials(dataDir)) {
|
||
try {
|
||
const Database = require("better-sqlite3");
|
||
const db = new Database(join(dataDir, "storage.sqlite"), {
|
||
readonly: true,
|
||
fileMustExist: true,
|
||
});
|
||
try {
|
||
const row = db
|
||
.prepare(
|
||
`SELECT api_key, access_token, refresh_token, id_token
|
||
FROM provider_connections
|
||
WHERE api_key LIKE 'enc:v1:%'
|
||
OR access_token LIKE 'enc:v1:%'
|
||
OR refresh_token LIKE 'enc:v1:%'
|
||
OR id_token LIKE 'enc:v1:%'
|
||
LIMIT 1`
|
||
)
|
||
.get();
|
||
if (row) {
|
||
const ciphertext = row.api_key || row.access_token || row.refresh_token || row.id_token;
|
||
if (ciphertext?.startsWith("enc:v1:")) {
|
||
const parts = ciphertext.split(":");
|
||
// enc:v1:<iv>:<ct>:<tag>
|
||
if (parts.length >= 5) {
|
||
const iv = Buffer.from(parts[2], "hex");
|
||
const ct = Buffer.from(parts[3], "hex");
|
||
const tag = Buffer.from(parts[4], "hex");
|
||
|
||
// Try decrypting with both key derivation methods matching encryption.ts
|
||
const tryDecrypt = (derivedKey) => {
|
||
const decipher = createDecipheriv("aes-256-gcm", derivedKey, iv);
|
||
decipher.setAuthTag(tag);
|
||
decipher.update(ct);
|
||
decipher.final();
|
||
};
|
||
|
||
// Dynamic salt (current): scryptSync(secret, sha256(secret).slice(0,16), 32)
|
||
const dynamicSalt = createHash("sha256")
|
||
.update(merged.STORAGE_ENCRYPTION_KEY)
|
||
.digest()
|
||
.slice(0, 16);
|
||
const dynamicKey = scryptSync(merged.STORAGE_ENCRYPTION_KEY, dynamicSalt, 32);
|
||
|
||
// Legacy salt (fallback): scryptSync(secret, "omniroute-field-encryption-v1", 32)
|
||
const legacySalt = "omniroute-field-encryption-v1";
|
||
const legacyKey = scryptSync(merged.STORAGE_ENCRYPTION_KEY, legacySalt, 32);
|
||
|
||
let keyMatched = false;
|
||
try {
|
||
tryDecrypt(dynamicKey);
|
||
keyMatched = true;
|
||
} catch {
|
||
// Try legacy key as fallback
|
||
try {
|
||
tryDecrypt(legacyKey);
|
||
keyMatched = true;
|
||
} catch {
|
||
// Both failed — key truly doesn't match
|
||
}
|
||
}
|
||
|
||
if (!keyMatched) {
|
||
log(
|
||
"⛔ STORAGE_ENCRYPTION_KEY does not match the key used to encrypt your stored credentials."
|
||
);
|
||
log(
|
||
" Either restore your previous key via ~/.omniroute/server.env or ~/.omniroute/.env,"
|
||
);
|
||
log(
|
||
" or run: omniroute reset-encrypted-columns --force (wipes credentials, keeps provider config)"
|
||
);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
} finally {
|
||
db.close();
|
||
}
|
||
} catch {
|
||
// Non-fatal — probe is best-effort
|
||
}
|
||
}
|
||
|
||
return merged;
|
||
}
|
||
|
||
// ── CLI usage: node scripts/build/bootstrap-env.mjs ──────────────────────────────
|
||
if (process.argv[1] && process.argv[1].endsWith("bootstrap-env.mjs")) {
|
||
const env = bootstrapEnv();
|
||
process.stderr.write(`[bootstrap] Done. DATA_DIR resolved to: ${resolveDataDir()}\n`);
|
||
process.stderr.write(`[bootstrap] JWT_SECRET length: ${env.JWT_SECRET?.length ?? 0}\n`);
|
||
process.stderr.write(
|
||
`[bootstrap] STORAGE_ENCRYPTION_KEY length: ${env.STORAGE_ENCRYPTION_KEY?.length ?? 0}\n`
|
||
);
|
||
}
|