fix: secret env bug in firebase due to undefined value (#3881)

Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com>
This commit is contained in:
Nivedin
2024-03-13 17:11:51 +05:30
committed by GitHub
parent be7387ed19
commit 41d617b507
8 changed files with 26 additions and 24 deletions

View File

@@ -2,6 +2,8 @@ import { z } from "zod"
import { defineVersion } from "verzod"
import { V0_SCHEMA } from "./0"
export const uniqueID = () => Math.random().toString(36).substring(2, 16)
export const V1_SCHEMA = z.object({
v: z.literal(1),
id: z.string(),
@@ -28,7 +30,7 @@ export default defineVersion({
const result: z.infer<typeof V1_SCHEMA> = {
...old,
v: 1,
id: old.id ?? "",
id: old.id || uniqueID(),
variables: old.variables.map((variable) => {
return {
...variable,