wip: zen black

This commit is contained in:
Frank
2026-01-22 12:40:42 -05:00
parent bb582416f2
commit a890d51bbc
16 changed files with 130 additions and 42 deletions

View File

@@ -12,11 +12,11 @@ const root = path.resolve(process.cwd(), "..", "..", "..")
// read the secret
const ret = await $`bun sst secret list`.cwd(root).text()
const lines = ret.split("\n")
const value = lines.find((line) => line.startsWith("ZEN_BLACK"))?.split("=")[1]
if (!value) throw new Error("ZEN_BLACK not found")
const value = lines.find((line) => line.startsWith("ZEN_BLACK_LIMITS"))?.split("=")[1]
if (!value) throw new Error("ZEN_BLACK_LIMITS not found")
// validate value
BlackData.validate(JSON.parse(value))
// update the secret
await $`bun sst secret set ZEN_BLACK ${value} --stage ${stage}`
await $`bun sst secret set ZEN_BLACK_LIMITS ${value} --stage ${stage}`