From 25c7d1ae0d41f2d3def4dc7aa5c1d67872d6f37f Mon Sep 17 00:00:00 2001 From: Peramanathan Sathyamoorthy Date: Wed, 6 Nov 2024 19:22:46 +0100 Subject: [PATCH] Update README and bump version --- README.md | 12 ++++++------ package.json | 2 +- packages/core/README.md | 9 +++++++++ packages/core/package.json | 2 +- 4 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 packages/core/README.md diff --git a/README.md b/README.md index 75f8009..0f9149f 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ Dynamic and Adaptable Model Validator Using Zod, Interoperable with OpenAPI To install the library, use npm or yarn: ```sh -npm install adaptate +npm install @adaptate/core # or -yarn add adaptate +yarn add @adaptate/core ``` ## Usage @@ -89,7 +89,7 @@ You can make a Zod schema required based on a configuration (components need) us ```ts import { z } from 'zod'; -import { makeSchemaRequired } from 'adaptate'; +import { makeSchemaRequired } from '@adaptate/core'; const schema = z.object({ name: z.string().optional(), @@ -138,7 +138,7 @@ You can apply conditional requirements to a Zod schema using the applyConditiona ```ts import { z } from 'zod'; -import { applyConditionalRequirements } from 'adaptate'; +import { applyConditionalRequirements } from '@adaptate/core'; const schema = z.object({ firstName: z.string().optional(), @@ -176,7 +176,7 @@ const updatedSchema = applyConditionalRequirements(schema, config, data); The utility is in the early stage and not one to one. For complete and advanced use cases check [json-schema-to-zod](https://snyk.io/advisor/npm-package/json-schema-to-zod) ```ts -import { openAPISchemaToZod } from 'adaptate'; +import { openAPISchemaToZod } from '@adaptate/core'; const openAPISchema = { type: 'object', @@ -199,7 +199,7 @@ The utility is in the early stage and not one to one. For complete and advanced ```ts import { z } from 'zod'; -import { zodToOpenAPISchema } from 'adaptate'; +import { zodToOpenAPISchema } from '@adaptate/core'; const zodSchema = z.object({ name: z.string(), diff --git a/package.json b/package.json index fcb89e9..995a347 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "workspaces": [ "packages/*" ], - "version": "0.0.7", + "version": "0.0.8", "author": { "name": "Peramanathan Sathyamoorthy", "url": "https://github.com/p10ns11y/adaptate.git" diff --git a/packages/core/README.md b/packages/core/README.md new file mode 100644 index 0000000..136d2b3 --- /dev/null +++ b/packages/core/README.md @@ -0,0 +1,9 @@ +## Installation + +To install the library, use npm or yarn: + +```sh +npm install @adaptate/core +# or +yarn add @adaptate/core +``` diff --git a/packages/core/package.json b/packages/core/package.json index 07445cf..c646fe7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@adaptate/core", - "version": "0.0.7", + "version": "0.0.8", "author": { "name": "Peramanathan Sathyamoorthy", "url": "https://github.com/p10ns11y/adaptate.git"