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 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.
type: z.string().trim().min(1),
inputs: z.record(zInputFieldValue),
outputs: z.record(zOutputFieldValue),
label: z.string(),
isOpen: z.boolean(),
notes: z.string(),
embedWorkflow: z.boolean(),
isIntermediate: z.boolean(),
version: zSemVer.optional(),
});
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.
type: z.string().trim().min(1),
inputs: z.record(zInputFieldValue),
outputs: z.record(zOutputFieldValue),
label: z.string(),
isOpen: z.boolean(),
notes: z.string(),
embedWorkflow: z.boolean(),
isIntermediate: z.boolean(),
version: zSemVer.optional(),
})
.passthrough();
export const zInvocationNodeDataV2 = z.preprocess(
(arg) => {