@standard-community/standard-json 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -48,6 +48,7 @@ List of supported validators -
48
48
  | Zod | ✅ |
49
49
  | Valibot | ✅ |
50
50
  | ArkType | ✅ |
51
+ | Typebox | ✅ (Using [TypeMap](https://github.com/sinclairzx81/typemap) |
51
52
  | Effect Schema | 🛠️ |
52
53
 
53
54
  You can check the compatibility versions at [standardschema.dev](https://standardschema.dev/)
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var o=Object.defineProperty;var t=(r,n)=>o(r,"name",{value:n,configurable:!0});const s=t(async r=>{const n=r["~standard"].vendor;let e;switch(n){case"arktype":e=Promise.resolve().then(function(){return require("./arktype-Dlvt2KS_.cjs")});break;case"effect":e=Promise.resolve().then(function(){return require("./effect-DhPQdyvU.cjs")});break;case"valibot":e=Promise.resolve().then(function(){return require("./valibot--kGNOzEb.cjs")});break;case"zod":e=Promise.resolve().then(function(){return require("./zod-CaS8MF0R.cjs")});break;default:throw new Error(`standard-json: Unsupported schema vendor "${n}"`)}return(await e).toJsonSchema(r)},"toJsonSchema");exports.toJsonSchema=s;
1
+ "use strict";var s=Object.defineProperty;var o=(r,n)=>s(r,"name",{value:n,configurable:!0});const a=o(async(r,n)=>{const t=r["~standard"].vendor;let e;switch(t){case"arktype":e=Promise.resolve().then(function(){return require("./arktype-Dlvt2KS_.cjs")});break;case"effect":e=Promise.resolve().then(function(){return require("./effect-DhPQdyvU.cjs")});break;case"valibot":e=Promise.resolve().then(function(){return require("./valibot-B46-dTte.cjs")});break;case"zod":e=Promise.resolve().then(function(){return require("./zod-Cub_0k7R.cjs")});break;default:throw new Error(`standard-json: Unsupported schema vendor "${t}"`)}return(await e).toJsonSchema(r,n)},"toJsonSchema");exports.toJsonSchema=a;
package/dist/index.d.cts CHANGED
@@ -222,6 +222,6 @@ interface JSONSchema7 {
222
222
  examples?: JSONSchema7Type | undefined;
223
223
  }
224
224
 
225
- declare const toJsonSchema: (schema: StandardSchemaV1) => Promise<JSONSchema7>;
225
+ declare const toJsonSchema: (schema: StandardSchemaV1, options?: Record<string, unknown>) => Promise<JSONSchema7>;
226
226
 
227
227
  export { toJsonSchema };
package/dist/index.d.ts CHANGED
@@ -222,6 +222,6 @@ interface JSONSchema7 {
222
222
  examples?: JSONSchema7Type | undefined;
223
223
  }
224
224
 
225
- declare const toJsonSchema: (schema: StandardSchemaV1) => Promise<JSONSchema7>;
225
+ declare const toJsonSchema: (schema: StandardSchemaV1, options?: Record<string, unknown>) => Promise<JSONSchema7>;
226
226
 
227
227
  export { toJsonSchema };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var a=Object.defineProperty;var t=(r,o)=>a(r,"name",{value:o,configurable:!0});const n=t(async r=>{const o=r["~standard"].vendor;let e;switch(o){case"arktype":e=import("./arktype-CqF_-yop.js");break;case"effect":e=import("./effect-pZiNZiGm.js");break;case"valibot":e=import("./valibot-bjxbIVdF.js");break;case"zod":e=import("./zod-BgKiXEg9.js");break;default:throw new Error(`standard-json: Unsupported schema vendor "${o}"`)}return(await e).toJsonSchema(r)},"toJsonSchema");export{n as toJsonSchema};
1
+ var n=Object.defineProperty;var a=(r,o)=>n(r,"name",{value:o,configurable:!0});const s=a(async(r,o)=>{const t=r["~standard"].vendor;let e;switch(t){case"arktype":e=import("./arktype-CqF_-yop.js");break;case"effect":e=import("./effect-pZiNZiGm.js");break;case"valibot":e=import("./valibot-DOnkF2ES.js");break;case"zod":e=import("./zod-DuHkA2Jp.js");break;default:throw new Error(`standard-json: Unsupported schema vendor "${t}"`)}return(await e).toJsonSchema(r,o)},"toJsonSchema");export{s as toJsonSchema};
@@ -0,0 +1 @@
1
+ "use strict";var t=Object.defineProperty;var s=(o,e)=>t(o,"name",{value:e,configurable:!0});var c=require("@valibot/to-json-schema");const a=s((o,e)=>c.toJsonSchema(o,e),"toJsonSchema");exports.toJsonSchema=a;
@@ -0,0 +1 @@
1
+ var s=Object.defineProperty;var m=(o,t)=>s(o,"name",{value:t,configurable:!0});import{toJsonSchema as a}from"@valibot/to-json-schema";const c=m((o,t)=>a(o,t),"toJsonSchema");export{c as toJsonSchema};
@@ -0,0 +1 @@
1
+ "use strict";var c=Object.defineProperty;var s=(o,e)=>c(o,"name",{value:e,configurable:!0});var a=require("zod-to-json-schema");const n=s((o,e)=>a.zodToJsonSchema(o,e),"toJsonSchema");exports.toJsonSchema=n;
@@ -0,0 +1 @@
1
+ var c=Object.defineProperty;var t=(o,m)=>c(o,"name",{value:m,configurable:!0});import{zodToJsonSchema as e}from"zod-to-json-schema";const n=t((o,m)=>e(o,m),"toJsonSchema");export{n as toJsonSchema};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@standard-community/standard-json",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs",
@@ -1 +0,0 @@
1
- "use strict";var t=Object.defineProperty;var e=(o,s)=>t(o,"name",{value:s,configurable:!0});var c=require("@valibot/to-json-schema");const a=e(o=>c.toJsonSchema(o),"toJsonSchema");exports.toJsonSchema=a;
@@ -1 +0,0 @@
1
- var s=Object.defineProperty;var t=(o,m)=>s(o,"name",{value:m,configurable:!0});import{toJsonSchema as a}from"@valibot/to-json-schema";const c=t(o=>a(o),"toJsonSchema");export{c as toJsonSchema};
@@ -1 +0,0 @@
1
- var c=Object.defineProperty;var m=(o,t)=>c(o,"name",{value:t,configurable:!0});import{zodToJsonSchema as e}from"zod-to-json-schema";const n=m(o=>e(o),"toJsonSchema");export{n as toJsonSchema};
@@ -1 +0,0 @@
1
- "use strict";var c=Object.defineProperty;var e=(o,s)=>c(o,"name",{value:s,configurable:!0});var a=require("zod-to-json-schema");const n=e(o=>a.zodToJsonSchema(o),"toJsonSchema");exports.toJsonSchema=n;