fix(convex): evitar inline de segredo no build

This commit is contained in:
Esdras Renan 2025-10-09 01:27:45 -03:00
parent c4e42ab49c
commit 06c4efd173

View file

@ -14,7 +14,7 @@ type NormalizedIdentifiers = {
}
function getProvisioningSecret() {
const secret = process.env.MACHINE_PROVISIONING_SECRET
const secret = process.env["MACHINE_PROVISIONING_SECRET"]
if (!secret) {
throw new ConvexError("Provisionamento de máquinas não configurado")
}
@ -22,7 +22,7 @@ function getProvisioningSecret() {
}
function getTokenTtlMs(): number {
const raw = process.env.MACHINE_TOKEN_TTL_MS
const raw = process.env["MACHINE_TOKEN_TTL_MS"]
if (!raw) return DEFAULT_TOKEN_TTL_MS
const parsed = Number(raw)
if (!Number.isFinite(parsed) || parsed < 60_000) {