This commit is contained in:
Frank
2026-02-07 13:32:19 -05:00
parent 8ad5262a87
commit 04f216902b
4 changed files with 4 additions and 3 deletions

View File

@@ -29,5 +29,5 @@ ZenData.validate(JSON.parse(values.join("")))
// update the secret
const envFile = Bun.file(path.join(os.tmpdir(), `models-${Date.now()}.env`))
await envFile.write(values.map((v, i) => `ZEN_MODELS${i + 1}=${v}`).join("\n"))
await envFile.write(values.map((v, i) => `ZEN_MODELS${i + 1}="${v.replace(/"/g, '\\"')}"`).join("\n"))
await $`bun sst secret load ${envFile.name} --stage ${stage}`.cwd(root)

View File

@@ -29,5 +29,5 @@ ZenData.validate(JSON.parse(values.join("")))
// update the secret
const envFile = Bun.file(path.join(os.tmpdir(), `models-${Date.now()}.env`))
await envFile.write(values.map((v, i) => `ZEN_MODELS${i + 1}=${v}`).join("\n"))
await envFile.write(values.map((v, i) => `ZEN_MODELS${i + 1}="${v.replace(/"/g, '\\"')}"`).join("\n"))
await $`bun sst secret load ${envFile.name}`.cwd(root)

View File

@@ -39,5 +39,5 @@ 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}`).join("\n"))
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)

View File

@@ -53,6 +53,7 @@ export namespace ZenData {
weight: z.number().optional(),
disabled: z.boolean().optional(),
storeModel: z.string().optional(),
headerMappings: z.record(z.string(), z.string()).optional(),
}),
),
})