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