mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-22 15:12:23 +03:00
⭐4 — Suporte de backend nativo Bun + Dockerfile.bun multi-stage + fallback dinâmico de driver SQLite (better-sqlite3 prioritário sob Bun, bun:sqlite fallback; Node preservado) + correção de estabilidade do DAST CI smoke.
Validado a fundo (worktree board sobre tip): bun-support 4/4, typecheck:core limpo, dashboard-typecheck OK (220 dentro do baseline), open-sse-typecheck OK (5 pré-existentes), gate de runtime OK sob Node, changelog-integrity OK, file-size/complexity/cognitive/dead-code OK. Verificado que o driver preserva a cadeia Node/falback conforme AGENTS.md; teste bun-support presente. Baselines de typecheck removidos são ratchet honesto (erros não existem mais).
OBS: destravei 2 base-reds do tip neste turno (push direto 7ffa3ef): movi o changelog fragment da #11050 da seção inválida breaking/ para fixes/, e rebaselinei AddApiKeyModal 1067->1073 (crescimento da #11056). Sem isso a #11039 e o resto da fila ficariam vermelhos.
27 lines
835 B
JavaScript
27 lines
835 B
JavaScript
#!/usr/bin/env node
|
|
|
|
import {
|
|
getNodeRuntimeSupport,
|
|
getNodeRuntimeWarning,
|
|
} from "../../src/shared/utils/nodeRuntimeSupport.ts";
|
|
|
|
const support = getNodeRuntimeSupport();
|
|
|
|
if (!support.nodeCompatible) {
|
|
console.error(`Unsupported or insecure Node.js runtime detected: ${support.nodeVersion}`);
|
|
console.error(getNodeRuntimeWarning() || "Unsupported Node.js runtime.");
|
|
console.error(`Supported secure runtimes: ${support.supportedDisplay}`);
|
|
console.error(`Recommended version: ${support.recommendedVersion}`);
|
|
process.exit(1);
|
|
}
|
|
|
|
if (process.versions.bun) {
|
|
console.log(
|
|
`Bun ${process.versions.bun} (${support.nodeVersion}) satisfies OmniRoute secure runtime policy.`
|
|
);
|
|
} else {
|
|
console.log(
|
|
`Node.js ${support.nodeVersion} satisfies OmniRoute secure runtime policy (${support.supportedRange}).`
|
|
);
|
|
}
|