@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.
@@ -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 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;
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
- declare const toJsonSchema: (schema: StandardSchemaV1, options?: Record<string, unknown>) => Promise<JSONSchema7>;
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
- declare const toJsonSchema: (schema: StandardSchemaV1, options?: Record<string, unknown>) => Promise<JSONSchema7>;
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
- 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};
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@standard-community/standard-json",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs",
@@ -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;
@@ -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;
@@ -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;
@@ -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};
@@ -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;
@@ -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};