fix(ui): save cache setting to workflow

Do not strip out unknown values. Quick fix, probably not the best way to handle this.
This commit is contained in:
psychedelicious 2023-09-25 23:15:09 +10:00
parent 1419977e89
commit 0cfc1c5f86

View File

@ -1210,7 +1210,8 @@ export const zParsedSemver = zSemVer.transform((val) => {
export type SemVer = z.infer<typeof zSemVer>;
export const zInvocationNodeData = z.object({
export const zInvocationNodeData = z
.object({
id: z.string().trim().min(1),
// no easy way to build this dynamically, and we don't want to anyways, because this will be used
// to validate incoming workflows, and we want to allow community nodes.
@ -1223,7 +1224,8 @@ export const zInvocationNodeData = z.object({
embedWorkflow: z.boolean(),
isIntermediate: z.boolean(),
version: zSemVer.optional(),
});
})
.passthrough();
export const zInvocationNodeDataV2 = z.preprocess(
(arg) => {