feat: add "*" datatype for inputs for debug node
This commit is contained in:
@@ -29,8 +29,9 @@ function areSocketsCompatible(
|
||||
output: string | undefined,
|
||||
inputs: string | (string | undefined)[] | undefined
|
||||
) {
|
||||
if (output === '*') return true;
|
||||
if (Array.isArray(inputs) && output) {
|
||||
return inputs.includes(output);
|
||||
return inputs.includes('*') || inputs.includes(output);
|
||||
}
|
||||
return inputs === output;
|
||||
}
|
||||
|
||||
@@ -89,6 +89,11 @@ export const NodeInputPathSchema = z.object({
|
||||
value: z.array(z.number()).optional()
|
||||
});
|
||||
|
||||
export const NodeInputAnySchema = z.object({
|
||||
...DefaultOptionsSchema.shape,
|
||||
type: z.literal('*')
|
||||
});
|
||||
|
||||
export const NodeInputSchema = z.union([
|
||||
NodeInputSeedSchema,
|
||||
NodeInputBooleanSchema,
|
||||
@@ -100,7 +105,8 @@ export const NodeInputSchema = z.union([
|
||||
NodeInputSeedSchema,
|
||||
NodeInputVec3Schema,
|
||||
NodeInputGeometrySchema,
|
||||
NodeInputPathSchema
|
||||
NodeInputPathSchema,
|
||||
NodeInputAnySchema
|
||||
]);
|
||||
|
||||
export type NodeInput = z.infer<typeof NodeInputSchema>;
|
||||
|
||||
Reference in New Issue
Block a user