added validator for rjsf, hook form via standard schema

This commit is contained in:
dswbx
2025-07-05 13:29:30 +02:00
parent cfbec5b6ea
commit 0d3bb3b7d6
34 changed files with 69 additions and 1369 deletions
+4 -6
View File
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import { Flow, LogTask, SubFlowTask, RenderTask, Task } from "../../src/flows";
import { Type } from "@sinclair/typebox";
import { s } from "core/object/schema";
export class StringifyTask<Output extends string> extends Task<
typeof StringifyTask.schema,
@@ -8,11 +8,9 @@ export class StringifyTask<Output extends string> extends Task<
> {
type = "stringify";
static override schema = Type.Optional(
Type.Object({
input: Type.Optional(Type.String()),
}),
);
static override schema = s.object({
input: s.string().optional(),
});
async execute() {
return JSON.stringify(this.params.input) as Output;