The open source coding agent.
TypeScript
wip: zen
Frank2cc738fb1794
diff --git a/packages/console/core/script/promote-limits.ts b/packages/console/core/script/promote-limits.tsindex f488aba02d4..a54fcd0afcb 100755--- a/packages/console/core/script/promote-limits.ts+++ b/packages/console/core/script/promote-limits.ts@@ -10,7 +10,7 @@ if (!stage) throw new Error("Stage is required")const root = path.resolve(process.cwd(), "..", "..", "..")// read the secret-const ret = await $`bun sst secret list`.cwd(root).text()+const ret = await $`bun sst secret list --stage frank`.cwd(root).text()const lines = ret.split("\n")const value = lines.find((line) => line.startsWith("ZEN_LIMITS"))?.split("=")[1]if (!value) throw new Error("ZEN_LIMITS not found")diff --git a/packages/console/core/script/promote-models.ts b/packages/console/core/script/promote-models.tsindex aa9f20abc3e..28db3642c2d 100755--- a/packages/console/core/script/promote-models.ts+++ b/packages/console/core/script/promote-models.ts@@ -12,7 +12,7 @@ const root = path.resolve(process.cwd(), "..", "..", "..")const PARTS = 30// read the secret-const ret = await $`bun sst secret list`.cwd(root).text()+const ret = await $`bun sst secret list --stage frank`.cwd(root).text()const lines = ret.split("\n")const values = Array.from({ length: PARTS }, (_, i) => {const value = linesdiff --git a/packages/console/core/script/update-limits.ts b/packages/console/core/script/update-limits.tsindex 8f257931261..29794f5bec7 100755--- a/packages/console/core/script/update-limits.ts+++ b/packages/console/core/script/update-limits.ts@@ -6,7 +6,7 @@ import os from "os"import { Subscription } from "../src/subscription"const root = path.resolve(process.cwd(), "..", "..", "..")-const secrets = await $`bun sst secret list`.cwd(root).text()+const secrets = await $`bun sst secret list --stage frank`.cwd(root).text()// read valueconst lines = secrets.split("\n")@@ -25,4 +25,4 @@ const newValue = JSON.stringify(JSON.parse(await tempFile.text()))Subscription.validate(JSON.parse(newValue))// update the secret-await $`bun sst secret set ZEN_LIMITS ${newValue}`+await $`bun sst secret set ZEN_LIMITS ${newValue} --stage frank`.cwd(root)diff --git a/packages/console/core/script/update-models.ts b/packages/console/core/script/update-models.tsindex 6d7f7662a4c..e426aec1ce0 100755--- a/packages/console/core/script/update-models.ts+++ b/packages/console/core/script/update-models.ts@@ -6,7 +6,7 @@ import os from "os"import { ZenData } from "../src/model"const root = path.resolve(process.cwd(), "..", "..", "..")-const models = await $`bun sst secret list`.cwd(root).text()+const models = await $`bun sst secret list --stage frank`.cwd(root).text()const PARTS = 30// read the line starting with "ZEN_MODELS"@@ -40,4 +40,4 @@ const newValues = Array.from({ length: PARTS }, (_, i) =>const envFile = Bun.file(path.join(os.tmpdir(), `models-${Date.now()}.env`))await envFile.write(newValues.map((v, i) => `ZEN_MODELS${i + 1}="${v.replace(/"/g, '\\"')}"`).join("\n"))-await $`bun sst secret load ${envFile.name}`.cwd(root)+await $`bun sst secret load ${envFile.name} --stage frank`.cwd(root)