@standard-community/standard-json 0.1.2 → 0.2.0
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/dist/arktype-Dl6TXwAj.cjs +1 -0
- package/dist/arktype-rPtBJvA_.js +1 -0
- package/dist/effect-Bz0yPX2a.cjs +1 -0
- package/dist/effect-lIj12xeO.js +1 -0
- package/dist/index-BiXjOJ4o.cjs +1 -0
- package/dist/index-BnLYQduk.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/valibot-BJZP6MXN.cjs +1 -0
- package/dist/valibot-x7jZH0Fn.js +1 -0
- package/dist/zod-DDSZCko0.cjs +1 -0
- package/dist/zod-UXmI2DWZ.js +1 -0
- package/package.json +1 -1
- package/dist/arktype-CqF_-yop.js +0 -1
- package/dist/arktype-Dlvt2KS_.cjs +0 -1
- package/dist/effect-DhPQdyvU.cjs +0 -1
- package/dist/effect-pZiNZiGm.js +0 -1
- package/dist/valibot-B46-dTte.cjs +0 -1
- package/dist/valibot-DOnkF2ES.js +0 -1
- package/dist/zod-Cub_0k7R.cjs +0 -1
- package/dist/zod-DuHkA2Jp.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var c=Object.defineProperty;var o=(n,s)=>c(n,"name",{value:s,configurable:!0});const e=o(async()=>n=>n.toJsonSchema(),"getToJsonSchemaFn");exports.getToJsonSchemaFn=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.defineProperty;var n=(o,c)=>e(o,"name",{value:c,configurable:!0});const s=n(async()=>o=>o.toJsonSchema(),"getToJsonSchemaFn");export{s as getToJsonSchemaFn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var s=Object.create;var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var o=(e,t)=>a(e,"name",{value:t,configurable:!0});var u=(e,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of i(t))!h.call(e,r)&&r!==n&&a(e,r,{get:()=>t[r],enumerable:!(c=m(t,r))||c.enumerable});return e};var J=(e,t,n)=>(n=e!=null?s(S(e)):{},u(t||!e||!e.__esModule?a(n,"default",{value:e,enumerable:!0}):n,e));var f=require("./index-BiXjOJ4o.cjs");const g=o(async()=>{const{JSONSchema:e}=await f.tryImport(import("effect"),"effect");return t=>e.make(t)},"getToJsonSchemaFn");exports.getToJsonSchemaFn=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=Object.defineProperty;var e=(t,o)=>r(t,"name",{value:o,configurable:!0});import{t as a}from"./index-BnLYQduk.js";const m=e(async()=>{const{JSONSchema:t}=await a(import("effect"),"effect");return o=>t.make(o)},"getToJsonSchemaFn");export{m as getToJsonSchemaFn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=Object.defineProperty;var r=(n,e)=>t(n,"name",{value:e,configurable:!0});const s=r(async(n,e)=>{try{return await n}catch{throw new Error(`standard-json: Missing dependencies "${e}".`)}},"tryImport"),o=r(async n=>{switch(n){case"arktype":return Promise.resolve().then(function(){return require("./arktype-Dl6TXwAj.cjs")}).then(async({getToJsonSchemaFn:e})=>e());case"effect":return Promise.resolve().then(function(){return require("./effect-Bz0yPX2a.cjs")}).then(async({getToJsonSchemaFn:e})=>e());case"valibot":return Promise.resolve().then(function(){return require("./valibot-BJZP6MXN.cjs")}).then(async({getToJsonSchemaFn:e})=>e());case"zod":return Promise.resolve().then(function(){return require("./zod-DDSZCko0.cjs")}).then(async({getToJsonSchemaFn:e})=>e());default:throw new Error(`standard-json: Unsupported schema vendor "${n}"`)}},"getToJsonSchemaFn"),c=r(async n=>o(n["~standard"].vendor).then(async e=>e(n)),"toJsonSchema");exports.toJsonSchema=c,exports.tryImport=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=Object.defineProperty;var e=(t,n)=>a(t,"name",{value:n,configurable:!0});const s=e(async(t,n)=>{try{return await t}catch{throw new Error(`standard-json: Missing dependencies "${n}".`)}},"tryImport"),r=e(async t=>{switch(t){case"arktype":return import("./arktype-rPtBJvA_.js").then(async({getToJsonSchemaFn:n})=>n());case"effect":return import("./effect-lIj12xeO.js").then(async({getToJsonSchemaFn:n})=>n());case"valibot":return import("./valibot-x7jZH0Fn.js").then(async({getToJsonSchemaFn:n})=>n());case"zod":return import("./zod-UXmI2DWZ.js").then(async({getToJsonSchemaFn:n})=>n());default:throw new Error(`standard-json: Unsupported schema vendor "${t}"`)}},"getToJsonSchemaFn"),o=e(async t=>r(t["~standard"].vendor).then(async n=>n(t)),"toJsonSchema");export{o as a,s as t};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("./index-BiXjOJ4o.cjs");exports.toJsonSchema=e.toJsonSchema;
|
package/dist/index.d.cts
CHANGED
|
@@ -222,6 +222,9 @@ interface JSONSchema7 {
|
|
|
222
222
|
examples?: JSONSchema7Type | undefined;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
|
|
225
|
+
/**
|
|
226
|
+
* Converts a Standard Schema to a JSON schema.
|
|
227
|
+
*/
|
|
228
|
+
declare const toJsonSchema: (schema: StandardSchemaV1) => Promise<JSONSchema7>;
|
|
226
229
|
|
|
227
230
|
export { toJsonSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -222,6 +222,9 @@ interface JSONSchema7 {
|
|
|
222
222
|
examples?: JSONSchema7Type | undefined;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
|
|
225
|
+
/**
|
|
226
|
+
* Converts a Standard Schema to a JSON schema.
|
|
227
|
+
*/
|
|
228
|
+
declare const toJsonSchema: (schema: StandardSchemaV1) => Promise<JSONSchema7>;
|
|
226
229
|
|
|
227
230
|
export { toJsonSchema };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{a as e}from"./index-BnLYQduk.js";export{e as toJsonSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var c=Object.create;var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var r=(t,o)=>s(t,"name",{value:o,configurable:!0});var J=(t,o,e,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of m(o))!u.call(t,n)&&n!==e&&s(t,n,{get:()=>o[n],enumerable:!(a=i(o,n))||a.enumerable});return t};var S=(t,o,e)=>(e=t!=null?c(h(t)):{},J(o||!t||!t.__esModule?s(e,"default",{value:t,enumerable:!0}):e,t));var g=require("./index-BiXjOJ4o.cjs");const p=r(async()=>{const{toJsonSchema:t}=await g.tryImport(import("@valibot/to-json-schema"),"@valibot/to-json-schema");return(o,e)=>t(o,e)},"getToJsonSchemaFn");exports.getToJsonSchemaFn=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=Object.defineProperty;var a=(o,t)=>r(o,"name",{value:t,configurable:!0});import{t as s}from"./index-BnLYQduk.js";const m=a(async()=>{const{toJsonSchema:o}=await s(import("@valibot/to-json-schema"),"@valibot/to-json-schema");return(t,n)=>o(t,n)},"getToJsonSchemaFn");export{m as getToJsonSchemaFn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var c=Object.create;var s=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var a=(o,t)=>s(o,"name",{value:t,configurable:!0});var u=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of i(t))!d.call(o,n)&&n!==e&&s(o,n,{get:()=>t[n],enumerable:!(r=m(t,n))||r.enumerable});return o};var J=(o,t,e)=>(e=o!=null?c(h(o)):{},u(t||!o||!o.__esModule?s(e,"default",{value:o,enumerable:!0}):e,o));var S=require("./index-BiXjOJ4o.cjs");const T=a(async()=>{const{zodToJsonSchema:o}=await S.tryImport(import("zod-to-json-schema"),"zod-to-json-schema");return(t,e)=>o(t,e)},"getToJsonSchemaFn");exports.getToJsonSchemaFn=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s=Object.defineProperty;var n=(o,t)=>s(o,"name",{value:t,configurable:!0});import{t as a}from"./index-BnLYQduk.js";const m=n(async()=>{const{zodToJsonSchema:o}=await a(import("zod-to-json-schema"),"zod-to-json-schema");return(t,r)=>o(t,r)},"getToJsonSchemaFn");export{m as getToJsonSchemaFn};
|
package/package.json
CHANGED
package/dist/arktype-CqF_-yop.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty;var t=(o,c)=>e(o,"name",{value:c,configurable:!0});const n=t(o=>o.toJsonSchema(),"toJsonSchema");export{n as toJsonSchema};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var s=(o,t)=>c(o,"name",{value:t,configurable:!0});const e=s(o=>o.toJsonSchema(),"toJsonSchema");exports.toJsonSchema=e;
|
package/dist/effect-DhPQdyvU.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var c=(e,t)=>a(e,"name",{value:t,configurable:!0});var o=require("effect");const s=c(e=>o.JSONSchema.make(e),"toJsonSchema");exports.toJsonSchema=s;
|
package/dist/effect-pZiNZiGm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var m=(o,e)=>t(o,"name",{value:e,configurable:!0});import{JSONSchema as a}from"effect";const c=m(o=>a.make(o),"toJsonSchema");export{c as toJsonSchema};
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
package/dist/valibot-DOnkF2ES.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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};
|
package/dist/zod-Cub_0k7R.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;
|
package/dist/zod-DuHkA2Jp.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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};
|