From 311b0e6b3f9d49148b495e27ae7b3742ca5c7510 Mon Sep 17 00:00:00 2001 From: Miroir Framework Date: Wed, 22 Nov 2023 19:48:04 +0100 Subject: [PATCH] 0.5.4: added jzodToZod and zodToJzod to index.ts, and corrected image links in README.md --- README.md | 5 +++-- package.json | 2 +- src/index.ts | 9 ++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3347ec8..b5dc5cd 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Which requires to type undeniably more characters, but provides a plain JSON str ## Usage -![usage](doc/usage.drawio.png) +![usage](https://github.com/miroir-framework/jzod/blob/main/doc/usage.drawio.png) Using the features of Zod, one may obtain, in a single movement: @@ -147,7 +147,7 @@ jzodToZod(recursiveType).parse( { a: { a: { a: "test" } } } ); //success Jzod provides Typescript Types for Jzod Schemas. One thus benefits from completion when creating Jzod Schemas, at least on modern IDEs: -![Completion](doc/ts-completion.png) +![Completion](https://github.com/miroir-framework/jzod/blob/main/doc/ts-completion.png) ### Conversion to Zod @@ -193,6 +193,7 @@ jzodToTsCode({ type: "simpleType", definition: "string" }, true/*export declarat The function ```ts +import { jzodToTsTypeAliasesAndZodText } from "jzod-ts" jzodToTsTypeAliasesAndZodText( element: JzodElement, typeName?: string, diff --git a/package.json b/package.json index 655f13f..1674b6e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@miroir-framework/jzod", "private": false, - "version": "0.5.3", + "version": "0.5.4", "description": "The Json bootstrapper for Zod.", "main": "dist/bundle.js", "types": "dist/bundle.d.ts", diff --git a/src/index.ts b/src/index.ts index d3b210d..4cb2966 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,6 +11,9 @@ export { objectToJsStringArray, objectToJsStringObject, } from "./Jzod" -// export { -// zodToZodText -// } from "./ZodToZodText" \ No newline at end of file +export { + zodToJzod +} from "./ZodToJzod" +export { + jzodToZod +} from "./facade" \ No newline at end of file