@power-plant/schema 0.0.23 → 0.0.25

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.
@@ -1 +1 @@
1
- const e=require("./rolldown-runtime-CMqjfN_6.cjs");let t=require("node:fs");t=e.t(t,1);let n=require("node:util"),r=require("node:events"),i=require("node:buffer"),a=require("node:worker_threads"),o=require("node:stream");function s(e){return e instanceof URL?decodeURIComponent(e.pathname):i.Buffer.isBuffer(e)?e.toString():e}function c(e){let t=s(e).replace(/\\/g,`/`);for(;t.startsWith(`./`);)t=t.slice(2);return t=t.replace(/^\/+/,``),t=t.replace(/\/+/g,`/`),t.length>1&&t.endsWith(`/`)&&(t=t.slice(0,-1)),t}function l(...e){let t=[];for(let n of e)for(let e of c(n).split(`/`))if(!(!e||e===`.`)){if(e===`..`){t.pop();continue}t.push(e)}return t.join(`/`)}function u(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function d(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function f(e){return e.endsWith(`$`)}function p(e){return e?`${e}/`:``}function m(e,t){let n=p(e),r=new Set;for(let e of t){if(f(e))continue;let t=n?e.startsWith(n)?e.slice(n.length):``:e;if(!t||t===e)continue;let i=t.indexOf(`/`);r.add(i===-1?t:t.slice(0,i))}return[...r].sort()}function h(e,t,n,r){let i=n?` '${n}'`:``,a=Error(r??`${e}: ${t}${i}`);return a.code=e,a.syscall=t,n&&(a.path=n),a}function g(e){let{port1:t,port2:n}=new a.MessageChannel;e().then(e=>{t.postMessage({ok:!0,value:e})},e=>{t.postMessage({ok:!1,error:e})});let r=(0,a.receiveMessageOnPort)(n);if(t.close(),n.close(),!r)throw Error(`Storage operation did not complete.`);if(!r.message.ok)throw r.message.error;return r.message.value}function _(e){return e==null?i.Buffer.alloc(0):i.Buffer.isBuffer(e)?e:(e instanceof Uint8Array,i.Buffer.from(e))}function v(e){if(typeof e==`string`)return e;if(e!=null)return e.encoding??void 0}function y(e){let t=v(e);return t==null||t===`buffer`}function b(e,t){let n=_(typeof e==`string`||i.Buffer.isBuffer(e)||e instanceof Uint8Array?e:e==null?``:JSON.stringify(e));return t==null||t===`buffer`?n:n.toString(t)}function x(e){return typeof e==`string`?e:_(i.Buffer.from(e.buffer,e.byteOffset,e.byteLength))}function S(e,n,r=0){let i=Date.now(),a=n?.atime instanceof Date?n.atime:new Date(i),o=n?.mtime instanceof Date?n.mtime:new Date(i),s=e===`directory`?16877:e===`symlink`?41471:33188,c=Object.create(t.Stats.prototype);return Object.assign(c,{dev:0,ino:0,mode:s,nlink:1,uid:typeof n?.uid==`number`?n.uid:0,gid:typeof n?.gid==`number`?n.gid:0,rdev:0,size:r,blksize:4096,blocks:Math.ceil(r/512),atimeMs:a.getTime(),mtimeMs:o.getTime(),ctimeMs:o.getTime(),birthtimeMs:o.getTime(),atime:a,mtime:o,ctime:o,birthtime:o}),c}function C(e,t){return RegExp(`^${e.replace(/[.+^${}()|[\]\\]/g,`\\$&`).replace(/\*\*/g,`.*`).replace(/\*/g,`[^/]*`).replace(/\?/g,`.`)}$`).test(t)}function w(e=6){return Array.from({length:e},()=>`abcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*36))).join(``)}const T=`symlinkTarget`;function E(e){let n=new Map,r=3;async function a(t){try{return await e.getMeta(t)??null}catch{return null}}async function s(t,n=!0){let r=c(t);if(!r&&t!==`.`&&t!==`/`)return null;let i=await a(r);return i?.[T]&&typeof i[T]==`string`?n?s(i[T],!0):{key:r,type:`symlink`,meta:i}:await e.hasItem(r)?{key:r,type:`file`,meta:i}:m(r,(await e.getKeys(r)).filter(e=>e!==r&&!f(e))).length>0?{key:r,type:`directory`,meta:i}:null}async function E(e,t=!0){let n=await s(e,t);if(!n)throw h(`ENOENT`,`stat`,c(e));return n}async function D(t){let n=await a(t);if(typeof n?.size==`number`)return n.size;if(y()){let n=await e.getItemRaw(t);return n==null?0:_(n).byteLength}let r=await e.getItem(t);return r==null?0:_(String(r)).byteLength}async function O(t,n){let r=c(t);if((await E(r,!0)).type!==`file`)throw h(`EISDIR`,`read`,r,`EISDIR: illegal operation on a directory, read`);let i=v(n),a=y(n)?await e.getItemRaw(r):await e.getItem(r);if(a==null)throw h(`ENOENT`,`open`,r);return b(a,i)}async function k(t,n,r){let i=c(t),a=v(r),o=typeof n==`string`?n:a&&a!==`buffer`?_(x(n)).toString(a):x(n);await e.setItem(i,o),await e.setMeta(i,{mtime:new Date,atime:new Date,size:_(o).byteLength})}async function A(t,n){let r=c(t),i=await s(r,!1);if(!i){if(typeof n==`object`&&n&&`recursive`in n&&n.recursive)return;throw h(`ENOENT`,`unlink`,r)}if(i.type===`directory`){let t=n===!0||(typeof n==`object`&&n&&`recursive`in n?!!n.recursive:!1),i=(await e.getKeys(r)).filter(e=>e!==r&&!f(e)&&e.startsWith(p(r)));if(!t&&i.length>0)throw h(`ENOTEMPTY`,`rmdir`,r);await Promise.all(i.map(async t=>e.removeItem(t))),await e.hasItem(r)&&await e.removeItem(r);return}await e.removeItem(r)}async function j(t,n,r=!1){if((await E(t,!0)).type===`directory`){if(!r)throw h(`EISDIR`,`copy`,t,`EISDIR: illegal operation on a directory, copy`);let i=await e.getKeys(t);for(let e of i)f(e)||e===t||await j(e,l(n,e.slice(t.length).replace(/^\//,``)),!0);return}let i=await O(t);await k(n,typeof i==`string`?i:_(i));let o=await a(t);o&&await e.setMeta(c(n),o)}async function M(e,t=!0){let n=await E(e,t),r=n.type===`file`?await D(n.key):4096;return S(n.type,n.meta,r)}async function N(t,n){let r=c(t);await E(r,!0),await e.setMeta(r,{mode:n})}async function P(t,n,r){let i=c(t);await E(i,!0),await e.setMeta(i,{uid:n,gid:r})}async function F(e,t){let n=c(e),r=typeof t==`object`&&t?!!t.recursive:!1;if(!n)return;let i=u(n);if(i){let e=await s(i,!0);if(!e&&!r)throw h(`ENOENT`,`mkdir`,n);!e&&r&&await F(i,{recursive:!0})}if((await s(n,!0))?.type===`file`)throw h(`EEXIST`,`mkdir`,n)}async function I(e,t){let n=`${c(e)}${w()}`;return await F(n,{recursive:!0}),t?.encoding===`buffer`?i.Buffer.from(n):n}function L(t,n){let r=c(t),a=[],o=!1,s=0,l=!1,u=async()=>{if(o)return;await E(r,!0);let t=await e.getKeys(r);a=m(r,t.filter(e=>!f(e))),o=!0},d=e=>({name:e,isFile:()=>!0,isDirectory:()=>!1,isBlockDevice:()=>!1,isCharacterDevice:()=>!1,isSymbolicLink:()=>!1,isFIFO:()=>!1,isSocket:()=>!1});return{path:r,async read(){if(l)throw h(`EBADF`,`readdir`,r);if(await u(),s>=a.length)return null;let e=a[s++];return n?.encoding===`buffer`?i.Buffer.from(e):d(e)},async close(){l=!0},async*[Symbol.asyncIterator](){for(;;){let e=await this.read();if(!e)break;yield e}}}}function R(e,t){let n=c(e),r=t?.start??0,i=t?.end;return o.Readable.from((async function*(){let e=_(await O(n));if(r>0&&(e=e.subarray(r)),i!=null){yield e.subarray(0,Math.max(0,i-r+1));return}yield e})())}function z(e,t){let n=c(e),r=[];return new o.Writable({write(e,t,n){r.push(_(e)),n()},final:e=>{let a=i.Buffer.concat(r),o=t?.encoding&&t.encoding!==`buffer`?a.toString(t.encoding):a;k(n,o,t).then(()=>e()).catch(t=>e(t))}})}function B(t,r){let a=()=>{let e=n.get(t);if(!e)throw h(`EBADF`,`read`,r);return e};return{fd:t,async appendFile(e,t){let n=await O(r).catch(()=>i.Buffer.alloc(0));await k(r,i.Buffer.concat([_(n),_(typeof e==`string`?e:x(e))]),t)},async chmod(e){},async chown(e,t){},async close(){n.delete(t)},createReadStream(e){return R(r,e)},createWriteStream(e){return z(r,e)},async datasync(){},async read(e,t,n,i){let o=a(),s=_(await O(r,{encoding:void 0})),c=i??o.position,l=t??0,u=n??e.length-l,d=s.copy(e,l,c,c+u);return i??(o.position+=d),{bytesRead:d,buffer:e}},async readFile(e){return O(r,e)},async stat(e){return M(r)},async sync(){},async truncate(e=0){await k(r,_(await O(r)).subarray(0,e))},async utimes(t,n){await e.setMeta(r,{atime:new Date(t),mtime:new Date(n)})},async write(e,t,n,i){let o=a(),s=_(await O(r).catch(()=>``)),c=t??0,l=n??e.length-c,u=i??o.position;return e.copy(s,u,c,c+l),await k(r,s),i??(o.position+=l),{bytesWritten:l,buffer:e}},async writeFile(e,t){await k(r,typeof e==`string`?e:x(e),t)}}}let V={async access(e,n=t.constants.F_OK){let r=await s(e,!0);if(!r)throw h(`ENOENT`,`access`,c(e));if(n&t.constants.W_OK&&r.type===`directory`)throw h(`EISDIR`,`access`,c(e))},async appendFile(e,t,n){let r=c(e),a=await O(r).catch(()=>``);await k(r,i.Buffer.concat([_(a),_(typeof t==`string`?t:x(t))]),n)},async chmod(t,n){let r=c(t);await E(r,!0),await e.setMeta(r,{mode:n})},async chown(t,n,r){let i=c(t);await E(i,!0),await e.setMeta(i,{uid:n,gid:r})},async copyFile(e,t,n){await j(c(e),c(t),!1)},async cp(e,t,n){await j(c(e),c(t),!!n?.recursive)},async glob(t,n){let r=c(n?.cwd??`.`),i=(await e.getKeys(r)).filter(e=>!f(e)).filter(e=>C(String(t),e));async function*a(){for(let e of i)if(n&&`withFileTypes`in n&&n.withFileTypes){let t=await s(e,!0);yield{name:d(e),relative:e.slice(r.length).replace(/^\//,``),absolute:e,isFile:()=>t?.type===`file`,isDirectory:()=>t?.type===`directory`,isSymbolicLink:()=>t?.type===`symlink`}}else yield e}return a()},async lchmod(e,t){await N(e,t)},async lchown(e,t,n){await P(e,t,n)},async lutimes(t,n,r){let i=c(t);await E(i,!1),await e.setMeta(i,{atime:new Date(n),mtime:new Date(r)})},async link(e,t){let n=c(e),r=c(t),i=await O(n);await k(r,typeof i==`string`?i:_(i))},async lstat(e,t){return M(e,!1)},async mkdir(e,t){return F(e,t)},async mkdtemp(e,t){return I(e,t)},async mkdtempDisposable(e,t){let n=await I(e,t);return{path:n,async[Symbol.asyncDispose](){await A(n,{recursive:!0,force:!0})},[Symbol.dispose](){g(async()=>A(n,{recursive:!0,force:!0}))}}},async open(e,t,i){let a=c(e);await E(a,!0).catch(async e=>{if(e.code===`ENOENT`){await k(a,``);return}throw e});let o=r++;return n.set(o,{key:a,position:0}),B(o,a)},async opendir(e,t){return L(e,t)},async readdir(t,n){let r=c(t);await E(r,!0);let a=await e.getKeys(r),o=m(r,a.filter(e=>!f(e)));return n&&typeof n==`object`&&`recursive`in n&&n.recursive&&(o=a.filter(e=>!f(e)).map(e=>e.slice(r.length).replace(/^\//,``)).filter(Boolean)),n&&typeof n==`object`&&`withFileTypes`in n&&n.withFileTypes?await Promise.all(o.map(async e=>{let t=await s(l(r,e),!0);return{name:e,isFile:()=>t?.type===`file`,isDirectory:()=>t?.type===`directory`,isBlockDevice:()=>!1,isCharacterDevice:()=>!1,isSymbolicLink:()=>t?.type===`symlink`,isFIFO:()=>!1,isSocket:()=>!1}})):n&&typeof n==`object`&&`encoding`in n&&n.encoding===`buffer`?o.map(e=>i.Buffer.from(e)):o},async readFile(e,t){return O(e,t)},async readlink(e,t){let n=c(e),r=await E(n,!1);if(r.type!==`symlink`)throw h(`EINVAL`,`readlink`,n);let a=r.meta?.[T];if(typeof a!=`string`)throw h(`EINVAL`,`readlink`,n);return t&&typeof t==`object`&&t.encoding===`buffer`?i.Buffer.from(a):a},async realpath(e,t){let n=l(e);if(!await s(n,!0))throw h(`ENOENT`,`realpath`,n);return t&&typeof t==`object`&&t.encoding===`buffer`?i.Buffer.from(n):n},async rename(t,n){let r=c(t),i=c(n);if((await E(r,!0)).type===`directory`){let t=await e.getKeys(r);for(let n of t){if(f(n))continue;let t=n===r?``:n.slice(r.length).replace(/^\//,``),o=t?l(i,t):i;if(n===r&&await e.hasItem(n)){let t=await e.getItem(n);t!=null&&await e.setItem(o,t)}else if(n!==r){let t=await e.getItem(n);t!=null&&await e.setItem(o,t);let r=await a(n);r&&await e.setMeta(o,r),await e.removeItem(n)}}await e.hasItem(r)&&await e.removeItem(r);return}let o=await e.getItem(r);o!=null&&await e.setItem(i,o);let s=await a(r);s&&await e.setMeta(i,s),await e.removeItem(r)},async rm(e,t){await A(e,t)},async rmdir(e,t){await A(e,t)},async stat(e,t){return M(e)},async statfs(n,r){let i=await e.getKeys(c(n)),a=Object.create(t.Stats.prototype);return Object.assign(a,{type:0,bsize:4096,blocks:i.length,bfree:0,bavail:0,files:i.length,ffree:0}),a},async symlink(t,n,r){let i=c(n);await e.setMeta(i,{[T]:c(t),mtime:new Date,atime:new Date})},async truncate(e,t=0){let n=c(e);await k(n,_(await O(n)).subarray(0,t))},async unlink(t){let n=c(t),r=await s(n,!1);if(!r)throw h(`ENOENT`,`unlink`,n);if(r.type===`directory`)throw h(`EISDIR`,`unlink`,n);await e.removeItem(n)},async utimes(t,n,r){let i=c(t);await E(i,!0),await e.setMeta(i,{atime:new Date(n),mtime:new Date(r)})},async watch(t,n){let r=c(t),i=await e.watch((e,t)=>{(t===r||t.startsWith(p(r)))&&(typeof n==`function`?n:n.listener)?.(e,t)});return{async close(){await i()},[Symbol.asyncDispose]:async()=>{await i()}}},async writeFile(e,t,n){await k(e,t,n)}};async function H(e,t,n){return(await V.open(e,t,n)).fd}async function U(e){if(!n.has(e))throw h(`EBADF`,`close`);n.delete(e)}async function W(e,t){let r=n.get(e);if(!r)throw h(`EBADF`,`fstat`);return M(r.key)}async function G(e,t,r,i,a){let o=n.get(e);if(!o)throw h(`EBADF`,`read`);return B(e,o.key).read(t,r,i,a)}async function K(e,t,r,i,a){let o=n.get(e);if(!o)throw h(`EBADF`,`write`);return B(e,o.key).write(t,r,i,a)}async function q(e,t=0){let r=n.get(e);if(!r)throw h(`EBADF`,`ftruncate`);await V.truncate(r.key,t)}async function J(e,t,r){let i=n.get(e);if(!i)throw h(`EBADF`,`futimes`);await V.utimes(i.key,t,r)}async function Y(e,t,r){let a=0,o=r??n.get(e)?.position??0;for(let n of t){let t=i.Buffer.from(n.buffer,n.byteOffset,n.byteLength),r=await G(e,t,0,t.length,o);a+=r.bytesRead,o+=r.bytesRead}return{bytesRead:a,buffers:t}}async function X(e,t,r){let a=i.Buffer.concat(t.map(e=>i.Buffer.from(e.buffer,e.byteOffset,e.byteLength))),o=n.get(e);if(!o)throw h(`EBADF`,`writev`);let s=r??o.position,c=_(await O(o.key).catch(()=>``));return a.copy(c,s),await k(o.key,c),r??(o.position+=a.byteLength),{bytesWritten:a.byteLength,buffers:t}}return{promises:V,createReadStream:R,createWriteStream:z,openFd:H,closeFd:U,fstatFd:W,readFd:G,writeFd:K,ftruncateFd:q,futimesFd:J,readvFd:Y,writevFd:X}}function D(e){let t=(0,n.callbackify)(e);return t.__promisify__=e,t}function O(){return async()=>void 0}function k(){return()=>void 0}function A(e){let n=E(e),{promises:i}=n,a=async(...e)=>{let t=i.glob(...e),n=[];for await(let e of t)n.push(typeof e==`string`?e:`absolute`in e?String(e.absolute):String(e));return n},o=t=>{let n=new r.EventEmitter;return e.watch((e,r)=>{let i=c(t);(r===i||r.startsWith(`${i}/`))&&n.emit(`change`,e,r)}).then(e=>{n.on(`close`,()=>{e()})}),n};return{promises:i,access:D(i.access),appendFile:D(i.appendFile),chmod:D(i.chmod),chown:D(i.chown),close:D(n.closeFd),copyFile:D(i.copyFile),cp:D(i.cp),createReadStream:n.createReadStream,createWriteStream:n.createWriteStream,exists:((e,t)=>{i.access(e).then(()=>t(!0)).catch(()=>t(!1))}),fchmod:D(O()),fchown:D(O()),fdatasync:D(O()),fstat:D(n.fstatFd),fsync:D(O()),ftruncate:D(n.ftruncateFd),futimes:D(n.futimesFd),glob:D(a),lchmod:D(i.lchmod),lchown:D(i.lchown),lutimes:D(i.lutimes),link:D(i.link),lstat:D(i.lstat),mkdir:D(i.mkdir),mkdtemp:D(i.mkdtemp),open:D(n.openFd),openAsBlob:D(async e=>{let t=await i.readFile(e);return new Blob([t])}),opendir:D(i.opendir),read:D(n.readFd),readdir:D(i.readdir),readFile:D(i.readFile),readlink:D(i.readlink),readv:D(n.readvFd),realpath:D(i.realpath),rename:D(i.rename),rmdir:D(i.rmdir),rm:D(i.rm),stat:D(i.stat),statfs:D(i.statfs),symlink:D(i.symlink),truncate:D(i.truncate),unlink:D(i.unlink),unwatchFile:t.unwatchFile,utimes:D(i.utimes),watch:((e,t,n)=>{let r=o(e),i=e=>{r.on(`change`,e)};return typeof t==`function`?(i(t),r):(typeof n==`function`?i(n):t&&typeof t==`object`&&`listener`in t&&typeof t.listener==`function`&&i(t.listener),r)}),watchFile:t.watchFile,write:D(n.writeFd),writeFile:D(i.writeFile),writev:D(n.writevFd),accessSync:((e,t)=>g(async()=>i.access(e,t))),appendFileSync:((e,t,n)=>g(async()=>i.appendFile(e,t,n))),chmodSync:((e,t)=>g(async()=>i.chmod(e,t))),chownSync:((e,t,n)=>g(async()=>i.chown(e,t,n))),closeSync:(e=>g(async()=>n.closeFd(e))),copyFileSync:((e,t,n)=>g(async()=>i.copyFile(e,t,n))),cpSync:((e,t,n)=>g(async()=>i.cp(e,t,n))),existsSync:(e=>{try{return g(async()=>i.access(e)),!0}catch{return!1}}),fchmodSync:k(),fchownSync:k(),fdatasyncSync:k(),fstatSync:((e,t)=>g(async()=>n.fstatFd(e,t))),fsyncSync:k(),ftruncateSync:((e,t)=>g(async()=>n.ftruncateFd(e,t))),futimesSync:((e,t,r)=>g(async()=>n.futimesFd(e,t,r))),globSync:((e,t)=>g(async()=>a(e,t))),lchmodSync:((e,t)=>g(async()=>i.lchmod(e,t))),lchownSync:((e,t,n)=>g(async()=>i.lchown(e,t,n))),lutimesSync:((e,t,n)=>g(async()=>i.lutimes(e,t,n))),linkSync:((e,t)=>g(async()=>i.link(e,t))),lstatSync:((e,t)=>g(async()=>i.lstat(e,t))),mkdirSync:((e,t)=>g(async()=>i.mkdir(e,t))),mkdtempSync:((e,t)=>g(async()=>i.mkdtemp(e,t))),openSync:((e,t,r)=>g(async()=>n.openFd(e,t,r??void 0))),opendirSync:((e,t)=>g(async()=>i.opendir(e,t))),readdirSync:((e,t)=>g(async()=>i.readdir(e,t))),readFileSync:((e,t)=>g(async()=>i.readFile(e,t))),readlinkSync:((e,t)=>g(async()=>i.readlink(e,t))),readSync:((e,t,r,i,a)=>g(async()=>n.readFd(e,t,r??0,i??t.byteLength,a==null?null:Number(a))).bytesRead),readvSync:((e,t,r)=>g(async()=>n.readvFd(e,[...t],r)).bytesRead),realpathSync:((e,t)=>g(async()=>i.realpath(e,t))),renameSync:((e,t)=>g(async()=>i.rename(e,t))),rmdirSync:(e=>g(async()=>i.rm(e,{recursive:!1}))),rmSync:((e,t)=>g(async()=>i.rm(e,t))),statSync:((e,t)=>g(async()=>i.stat(e,t))),statfsSync:((e,t)=>g(async()=>i.statfs(e,t))),symlinkSync:((e,t,n)=>g(async()=>i.symlink(e,t,n))),truncateSync:((e,t)=>g(async()=>i.truncate(e,t))),unlinkSync:(e=>g(async()=>i.unlink(e))),utimesSync:((e,t,n)=>g(async()=>i.utimes(e,t,n))),writeFileSync:((e,t,n)=>g(async()=>i.writeFile(e,t,n))),writeSync:((e,t,r,i,a)=>g(async()=>n.writeFd(e,t,r??0,i??t.byteLength,a==null?null:Number(a))).bytesWritten),writevSync:((e,t,r)=>g(async()=>n.writevFd(e,[...t],r)).bytesWritten)}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return A}});
1
+ const e=require("./rolldown-runtime-CMqjfN_6.cjs");let t=require("node:events"),n=require("node:fs");n=e.t(n,1);let r=require("node:util"),i=require("node:buffer"),a=require("node:worker_threads"),o=require("node:stream");function s(e){return e instanceof URL?decodeURIComponent(e.pathname):i.Buffer.isBuffer(e)?e.toString():e}function c(e){let t=s(e).replace(/\\/g,`/`);for(;t.startsWith(`./`);)t=t.slice(2);return t=t.replace(/^\/+/,``),t=t.replace(/\/+/g,`/`),t.length>1&&t.endsWith(`/`)&&(t=t.slice(0,-1)),t}function l(...e){let t=[];for(let n of e)for(let e of c(n).split(`/`))if(!(!e||e===`.`)){if(e===`..`){t.pop();continue}t.push(e)}return t.join(`/`)}function u(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function d(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function f(e){return e.endsWith(`$`)}function p(e){return e?`${e}/`:``}function m(e,t){let n=p(e),r=new Set;for(let e of t){if(f(e))continue;let t=n?e.startsWith(n)?e.slice(n.length):``:e;if(!t||t===e)continue;let i=t.indexOf(`/`);r.add(i===-1?t:t.slice(0,i))}return[...r].sort()}function h(e,t,n,r){let i=n?` '${n}'`:``,a=Error(r??`${e}: ${t}${i}`);return a.code=e,a.syscall=t,n&&(a.path=n),a}function g(e){let{port1:t,port2:n}=new a.MessageChannel;e().then(e=>{t.postMessage({ok:!0,value:e})},e=>{t.postMessage({ok:!1,error:e})});let r=(0,a.receiveMessageOnPort)(n);if(t.close(),n.close(),!r)throw Error(`Storage operation did not complete.`);if(!r.message.ok)throw r.message.error;return r.message.value}function _(e){return e==null?i.Buffer.alloc(0):i.Buffer.isBuffer(e)?e:(e instanceof Uint8Array,i.Buffer.from(e))}function v(e){if(typeof e==`string`)return e;if(e!=null)return e.encoding??void 0}function y(e){let t=v(e);return t==null||t===`buffer`}function b(e,t){let n=_(typeof e==`string`||i.Buffer.isBuffer(e)||e instanceof Uint8Array?e:e==null?``:JSON.stringify(e));return t==null||t===`buffer`?n:n.toString(t)}function x(e){return typeof e==`string`?e:_(i.Buffer.from(e.buffer,e.byteOffset,e.byteLength))}function S(e,t,r=0){let i=Date.now(),a=t?.atime instanceof Date?t.atime:new Date(i),o=t?.mtime instanceof Date?t.mtime:new Date(i),s=e===`directory`?16877:e===`symlink`?41471:33188,c=Object.create(n.Stats.prototype);return Object.assign(c,{dev:0,ino:0,mode:s,nlink:1,uid:typeof t?.uid==`number`?t.uid:0,gid:typeof t?.gid==`number`?t.gid:0,rdev:0,size:r,blksize:4096,blocks:Math.ceil(r/512),atimeMs:a.getTime(),mtimeMs:o.getTime(),ctimeMs:o.getTime(),birthtimeMs:o.getTime(),atime:a,mtime:o,ctime:o,birthtime:o}),c}function C(e,t){return RegExp(`^${e.replace(/[.+^${}()|[\]\\]/g,`\\$&`).replace(/\*\*/g,`.*`).replace(/\*/g,`[^/]*`).replace(/\?/g,`.`)}$`).test(t)}function w(e=6){return Array.from({length:e},()=>`abcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*36))).join(``)}const T=`symlinkTarget`;function E(e){let t=new Map,r=3;async function a(t){try{return await e.getMeta(t)??null}catch{return null}}async function s(t,n=!0){let r=c(t);if(!r&&t!==`.`&&t!==`/`)return null;let i=await a(r);return i?.[T]&&typeof i[T]==`string`?n?s(i[T],!0):{key:r,type:`symlink`,meta:i}:await e.hasItem(r)?{key:r,type:`file`,meta:i}:m(r,(await e.getKeys(r)).filter(e=>e!==r&&!f(e))).length>0?{key:r,type:`directory`,meta:i}:null}async function E(e,t=!0){let n=await s(e,t);if(!n)throw h(`ENOENT`,`stat`,c(e));return n}async function D(t){let n=await a(t);if(typeof n?.size==`number`)return n.size;if(y()){let n=await e.getItemRaw(t);return n==null?0:_(n).byteLength}let r=await e.getItem(t);return r==null?0:_(String(r)).byteLength}async function O(t,n){let r=c(t);if((await E(r,!0)).type!==`file`)throw h(`EISDIR`,`read`,r,`EISDIR: illegal operation on a directory, read`);let i=v(n),a=y(n)?await e.getItemRaw(r):await e.getItem(r);if(a==null)throw h(`ENOENT`,`open`,r);return b(a,i)}async function k(t,n,r){let i=c(t),a=v(r),o=typeof n==`string`?n:a&&a!==`buffer`?_(x(n)).toString(a):x(n);await e.setItem(i,o),await e.setMeta(i,{mtime:new Date,atime:new Date,size:_(o).byteLength})}async function A(t,n){let r=c(t),i=await s(r,!1);if(!i){if(typeof n==`object`&&n&&`recursive`in n&&n.recursive)return;throw h(`ENOENT`,`unlink`,r)}if(i.type===`directory`){let t=n===!0||(typeof n==`object`&&n&&`recursive`in n?!!n.recursive:!1),i=(await e.getKeys(r)).filter(e=>e!==r&&!f(e)&&e.startsWith(p(r)));if(!t&&i.length>0)throw h(`ENOTEMPTY`,`rmdir`,r);await Promise.all(i.map(async t=>e.removeItem(t))),await e.hasItem(r)&&await e.removeItem(r);return}await e.removeItem(r)}async function j(t,n,r=!1){if((await E(t,!0)).type===`directory`){if(!r)throw h(`EISDIR`,`copy`,t,`EISDIR: illegal operation on a directory, copy`);let i=await e.getKeys(t);for(let e of i)f(e)||e===t||await j(e,l(n,e.slice(t.length).replace(/^\//,``)),!0);return}let i=await O(t);await k(n,typeof i==`string`?i:_(i));let o=await a(t);o&&await e.setMeta(c(n),o)}async function M(e,t=!0){let n=await E(e,t),r=n.type===`file`?await D(n.key):4096;return S(n.type,n.meta,r)}async function N(t,n){let r=c(t);await E(r,!0),await e.setMeta(r,{mode:n})}async function P(t,n,r){let i=c(t);await E(i,!0),await e.setMeta(i,{uid:n,gid:r})}async function F(e,t){let n=c(e),r=typeof t==`object`&&t?!!t.recursive:!1;if(!n)return;let i=u(n);if(i){let e=await s(i,!0);if(!e&&!r)throw h(`ENOENT`,`mkdir`,n);!e&&r&&await F(i,{recursive:!0})}if((await s(n,!0))?.type===`file`)throw h(`EEXIST`,`mkdir`,n)}async function I(e,t){let n=`${c(e)}${w()}`;return await F(n,{recursive:!0}),t?.encoding===`buffer`?i.Buffer.from(n):n}function L(t,n){let r=c(t),a=[],o=!1,s=0,l=!1,u=async()=>{if(o)return;await E(r,!0);let t=await e.getKeys(r);a=m(r,t.filter(e=>!f(e))),o=!0},d=e=>({name:e,isFile:()=>!0,isDirectory:()=>!1,isBlockDevice:()=>!1,isCharacterDevice:()=>!1,isSymbolicLink:()=>!1,isFIFO:()=>!1,isSocket:()=>!1});return{path:r,async read(){if(l)throw h(`EBADF`,`readdir`,r);if(await u(),s>=a.length)return null;let e=a[s++];return n?.encoding===`buffer`?i.Buffer.from(e):d(e)},async close(){l=!0},async*[Symbol.asyncIterator](){for(;;){let e=await this.read();if(!e)break;yield e}}}}function R(e,t){let n=c(e),r=t?.start??0,i=t?.end;return o.Readable.from((async function*(){let e=_(await O(n));if(r>0&&(e=e.subarray(r)),i!=null){yield e.subarray(0,Math.max(0,i-r+1));return}yield e})())}function z(e,t){let n=c(e),r=[];return new o.Writable({write(e,t,n){r.push(_(e)),n()},final:e=>{let a=i.Buffer.concat(r),o=t?.encoding&&t.encoding!==`buffer`?a.toString(t.encoding):a;k(n,o,t).then(()=>e()).catch(t=>e(t))}})}function B(n,r){let a=()=>{let e=t.get(n);if(!e)throw h(`EBADF`,`read`,r);return e};return{fd:n,async appendFile(e,t){let n=await O(r).catch(()=>i.Buffer.alloc(0));await k(r,i.Buffer.concat([_(n),_(typeof e==`string`?e:x(e))]),t)},async chmod(e){},async chown(e,t){},async close(){t.delete(n)},createReadStream(e){return R(r,e)},createWriteStream(e){return z(r,e)},async datasync(){},async read(e,t,n,i){let o=a(),s=_(await O(r,{encoding:void 0})),c=i??o.position,l=t??0,u=n??e.length-l,d=s.copy(e,l,c,c+u);return i??(o.position+=d),{bytesRead:d,buffer:e}},async readFile(e){return O(r,e)},async stat(e){return M(r)},async sync(){},async truncate(e=0){await k(r,_(await O(r)).subarray(0,e))},async utimes(t,n){await e.setMeta(r,{atime:new Date(t),mtime:new Date(n)})},async write(e,t,n,i){let o=a(),s=_(await O(r).catch(()=>``)),c=t??0,l=n??e.length-c,u=i??o.position;return e.copy(s,u,c,c+l),await k(r,s),i??(o.position+=l),{bytesWritten:l,buffer:e}},async writeFile(e,t){await k(r,typeof e==`string`?e:x(e),t)}}}let V={async access(e,t=n.constants.F_OK){let r=await s(e,!0);if(!r)throw h(`ENOENT`,`access`,c(e));if(t&n.constants.W_OK&&r.type===`directory`)throw h(`EISDIR`,`access`,c(e))},async appendFile(e,t,n){let r=c(e),a=await O(r).catch(()=>``);await k(r,i.Buffer.concat([_(a),_(typeof t==`string`?t:x(t))]),n)},async chmod(t,n){let r=c(t);await E(r,!0),await e.setMeta(r,{mode:n})},async chown(t,n,r){let i=c(t);await E(i,!0),await e.setMeta(i,{uid:n,gid:r})},async copyFile(e,t,n){await j(c(e),c(t),!1)},async cp(e,t,n){await j(c(e),c(t),!!n?.recursive)},async glob(t,n){let r=c(n?.cwd??`.`),i=(await e.getKeys(r)).filter(e=>!f(e)).filter(e=>C(String(t),e));async function*a(){for(let e of i)if(n&&`withFileTypes`in n&&n.withFileTypes){let t=await s(e,!0);yield{name:d(e),relative:e.slice(r.length).replace(/^\//,``),absolute:e,isFile:()=>t?.type===`file`,isDirectory:()=>t?.type===`directory`,isSymbolicLink:()=>t?.type===`symlink`}}else yield e}return a()},async lchmod(e,t){await N(e,t)},async lchown(e,t,n){await P(e,t,n)},async lutimes(t,n,r){let i=c(t);await E(i,!1),await e.setMeta(i,{atime:new Date(n),mtime:new Date(r)})},async link(e,t){let n=c(e),r=c(t),i=await O(n);await k(r,typeof i==`string`?i:_(i))},async lstat(e,t){return M(e,!1)},async mkdir(e,t){return F(e,t)},async mkdtemp(e,t){return I(e,t)},async mkdtempDisposable(e,t){let n=await I(e,t);return{path:n,async[Symbol.asyncDispose](){await A(n,{recursive:!0,force:!0})},[Symbol.dispose](){g(async()=>A(n,{recursive:!0,force:!0}))}}},async open(e,n,i){let a=c(e);await E(a,!0).catch(async e=>{if(e.code===`ENOENT`){await k(a,``);return}throw e});let o=r++;return t.set(o,{key:a,position:0}),B(o,a)},async opendir(e,t){return L(e,t)},async readdir(t,n){let r=c(t);await E(r,!0);let a=await e.getKeys(r),o=m(r,a.filter(e=>!f(e)));return n&&typeof n==`object`&&`recursive`in n&&n.recursive&&(o=a.filter(e=>!f(e)).map(e=>e.slice(r.length).replace(/^\//,``)).filter(Boolean)),n&&typeof n==`object`&&`withFileTypes`in n&&n.withFileTypes?await Promise.all(o.map(async e=>{let t=await s(l(r,e),!0);return{name:e,isFile:()=>t?.type===`file`,isDirectory:()=>t?.type===`directory`,isBlockDevice:()=>!1,isCharacterDevice:()=>!1,isSymbolicLink:()=>t?.type===`symlink`,isFIFO:()=>!1,isSocket:()=>!1}})):n&&typeof n==`object`&&`encoding`in n&&n.encoding===`buffer`?o.map(e=>i.Buffer.from(e)):o},async readFile(e,t){return O(e,t)},async readlink(e,t){let n=c(e),r=await E(n,!1);if(r.type!==`symlink`)throw h(`EINVAL`,`readlink`,n);let a=r.meta?.[T];if(typeof a!=`string`)throw h(`EINVAL`,`readlink`,n);return t&&typeof t==`object`&&t.encoding===`buffer`?i.Buffer.from(a):a},async realpath(e,t){let n=l(e);if(!await s(n,!0))throw h(`ENOENT`,`realpath`,n);return t&&typeof t==`object`&&t.encoding===`buffer`?i.Buffer.from(n):n},async rename(t,n){let r=c(t),i=c(n);if((await E(r,!0)).type===`directory`){let t=await e.getKeys(r);for(let n of t){if(f(n))continue;let t=n===r?``:n.slice(r.length).replace(/^\//,``),o=t?l(i,t):i;if(n===r&&await e.hasItem(n)){let t=await e.getItem(n);t!=null&&await e.setItem(o,t)}else if(n!==r){let t=await e.getItem(n);t!=null&&await e.setItem(o,t);let r=await a(n);r&&await e.setMeta(o,r),await e.removeItem(n)}}await e.hasItem(r)&&await e.removeItem(r);return}let o=await e.getItem(r);o!=null&&await e.setItem(i,o);let s=await a(r);s&&await e.setMeta(i,s),await e.removeItem(r)},async rm(e,t){await A(e,t)},async rmdir(e,t){await A(e,t)},async stat(e,t){return M(e)},async statfs(t,r){let i=await e.getKeys(c(t)),a=Object.create(n.Stats.prototype);return Object.assign(a,{type:0,bsize:4096,blocks:i.length,bfree:0,bavail:0,files:i.length,ffree:0}),a},async symlink(t,n,r){let i=c(n);await e.setMeta(i,{[T]:c(t),mtime:new Date,atime:new Date})},async truncate(e,t=0){let n=c(e);await k(n,_(await O(n)).subarray(0,t))},async unlink(t){let n=c(t),r=await s(n,!1);if(!r)throw h(`ENOENT`,`unlink`,n);if(r.type===`directory`)throw h(`EISDIR`,`unlink`,n);await e.removeItem(n)},async utimes(t,n,r){let i=c(t);await E(i,!0),await e.setMeta(i,{atime:new Date(n),mtime:new Date(r)})},async watch(t,n){let r=c(t),i=await e.watch((e,t)=>{(t===r||t.startsWith(p(r)))&&(typeof n==`function`?n:n.listener)?.(e,t)});return{async close(){await i()},[Symbol.asyncDispose]:async()=>{await i()}}},async writeFile(e,t,n){await k(e,t,n)}};async function H(e,t,n){return(await V.open(e,t,n)).fd}async function U(e){if(!t.has(e))throw h(`EBADF`,`close`);t.delete(e)}async function W(e,n){let r=t.get(e);if(!r)throw h(`EBADF`,`fstat`);return M(r.key)}async function G(e,n,r,i,a){let o=t.get(e);if(!o)throw h(`EBADF`,`read`);return B(e,o.key).read(n,r,i,a)}async function K(e,n,r,i,a){let o=t.get(e);if(!o)throw h(`EBADF`,`write`);return B(e,o.key).write(n,r,i,a)}async function q(e,n=0){let r=t.get(e);if(!r)throw h(`EBADF`,`ftruncate`);await V.truncate(r.key,n)}async function J(e,n,r){let i=t.get(e);if(!i)throw h(`EBADF`,`futimes`);await V.utimes(i.key,n,r)}async function Y(e,n,r){let a=0,o=r??t.get(e)?.position??0;for(let t of n){let n=i.Buffer.from(t.buffer,t.byteOffset,t.byteLength),r=await G(e,n,0,n.length,o);a+=r.bytesRead,o+=r.bytesRead}return{bytesRead:a,buffers:n}}async function X(e,n,r){let a=i.Buffer.concat(n.map(e=>i.Buffer.from(e.buffer,e.byteOffset,e.byteLength))),o=t.get(e);if(!o)throw h(`EBADF`,`writev`);let s=r??o.position,c=_(await O(o.key).catch(()=>``));return a.copy(c,s),await k(o.key,c),r??(o.position+=a.byteLength),{bytesWritten:a.byteLength,buffers:n}}return{promises:V,createReadStream:R,createWriteStream:z,openFd:H,closeFd:U,fstatFd:W,readFd:G,writeFd:K,ftruncateFd:q,futimesFd:J,readvFd:Y,writevFd:X}}function D(e){let t=(0,r.callbackify)(e);return t.__promisify__=e,t}function O(){return async()=>void 0}function k(){return()=>void 0}function A(e){let r=E(e),{promises:i}=r,a=async(...e)=>{let t=i.glob(...e),n=[];for await(let e of t)n.push(typeof e==`string`?e:`absolute`in e?String(e.absolute):String(e));return n},o=n=>{let r=new t.EventEmitter;return e.watch((e,t)=>{let i=c(n);(t===i||t.startsWith(`${i}/`))&&r.emit(`change`,e,t)}).then(e=>{r.on(`close`,()=>{e()})}),r};return{promises:i,access:D(i.access),appendFile:D(i.appendFile),chmod:D(i.chmod),chown:D(i.chown),close:D(r.closeFd),copyFile:D(i.copyFile),cp:D(i.cp),createReadStream:r.createReadStream,createWriteStream:r.createWriteStream,exists:((e,t)=>{i.access(e).then(()=>t(!0)).catch(()=>t(!1))}),fchmod:D(O()),fchown:D(O()),fdatasync:D(O()),fstat:D(r.fstatFd),fsync:D(O()),ftruncate:D(r.ftruncateFd),futimes:D(r.futimesFd),glob:D(a),lchmod:D(i.lchmod),lchown:D(i.lchown),lutimes:D(i.lutimes),link:D(i.link),lstat:D(i.lstat),mkdir:D(i.mkdir),mkdtemp:D(i.mkdtemp),open:D(r.openFd),openAsBlob:D(async e=>{let t=await i.readFile(e);return new Blob([t])}),opendir:D(i.opendir),read:D(r.readFd),readdir:D(i.readdir),readFile:D(i.readFile),readlink:D(i.readlink),readv:D(r.readvFd),realpath:D(i.realpath),rename:D(i.rename),rmdir:D(i.rmdir),rm:D(i.rm),stat:D(i.stat),statfs:D(i.statfs),symlink:D(i.symlink),truncate:D(i.truncate),unlink:D(i.unlink),unwatchFile:n.unwatchFile,utimes:D(i.utimes),watch:((e,t,n)=>{let r=o(e),i=e=>{r.on(`change`,e)};return typeof t==`function`?(i(t),r):(typeof n==`function`?i(n):t&&typeof t==`object`&&`listener`in t&&typeof t.listener==`function`&&i(t.listener),r)}),watchFile:n.watchFile,write:D(r.writeFd),writeFile:D(i.writeFile),writev:D(r.writevFd),accessSync:((e,t)=>g(async()=>i.access(e,t))),appendFileSync:((e,t,n)=>g(async()=>i.appendFile(e,t,n))),chmodSync:((e,t)=>g(async()=>i.chmod(e,t))),chownSync:((e,t,n)=>g(async()=>i.chown(e,t,n))),closeSync:(e=>g(async()=>r.closeFd(e))),copyFileSync:((e,t,n)=>g(async()=>i.copyFile(e,t,n))),cpSync:((e,t,n)=>g(async()=>i.cp(e,t,n))),existsSync:(e=>{try{return g(async()=>i.access(e)),!0}catch{return!1}}),fchmodSync:k(),fchownSync:k(),fdatasyncSync:k(),fstatSync:((e,t)=>g(async()=>r.fstatFd(e,t))),fsyncSync:k(),ftruncateSync:((e,t)=>g(async()=>r.ftruncateFd(e,t))),futimesSync:((e,t,n)=>g(async()=>r.futimesFd(e,t,n))),globSync:((e,t)=>g(async()=>a(e,t))),lchmodSync:((e,t)=>g(async()=>i.lchmod(e,t))),lchownSync:((e,t,n)=>g(async()=>i.lchown(e,t,n))),lutimesSync:((e,t,n)=>g(async()=>i.lutimes(e,t,n))),linkSync:((e,t)=>g(async()=>i.link(e,t))),lstatSync:((e,t)=>g(async()=>i.lstat(e,t))),mkdirSync:((e,t)=>g(async()=>i.mkdir(e,t))),mkdtempSync:((e,t)=>g(async()=>i.mkdtemp(e,t))),openSync:((e,t,n)=>g(async()=>r.openFd(e,t,n??void 0))),opendirSync:((e,t)=>g(async()=>i.opendir(e,t))),readdirSync:((e,t)=>g(async()=>i.readdir(e,t))),readFileSync:((e,t)=>g(async()=>i.readFile(e,t))),readlinkSync:((e,t)=>g(async()=>i.readlink(e,t))),readSync:((e,t,n,i,a)=>g(async()=>r.readFd(e,t,n??0,i??t.byteLength,a==null?null:Number(a))).bytesRead),readvSync:((e,t,n)=>g(async()=>r.readvFd(e,[...t],n)).bytesRead),realpathSync:((e,t)=>g(async()=>i.realpath(e,t))),renameSync:((e,t)=>g(async()=>i.rename(e,t))),rmdirSync:(e=>g(async()=>i.rm(e,{recursive:!1}))),rmSync:((e,t)=>g(async()=>i.rm(e,t))),statSync:((e,t)=>g(async()=>i.stat(e,t))),statfsSync:((e,t)=>g(async()=>i.statfs(e,t))),symlinkSync:((e,t,n)=>g(async()=>i.symlink(e,t,n))),truncateSync:((e,t)=>g(async()=>i.truncate(e,t))),unlinkSync:(e=>g(async()=>i.unlink(e))),utimesSync:((e,t,n)=>g(async()=>i.utimes(e,t,n))),writeFileSync:((e,t,n)=>g(async()=>i.writeFile(e,t,n))),writeSync:((e,t,n,i,a)=>g(async()=>r.writeFd(e,t,n??0,i??t.byteLength,a==null?null:Number(a))).bytesWritten),writevSync:((e,t,n)=>g(async()=>r.writevFd(e,[...t],n)).bytesWritten)}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return A}});
@@ -1,6 +1,7 @@
1
1
  import { BaseIssue, BaseSchema } from "valibot";
2
2
  import { StandardJSONSchemaV1 } from "@standard-schema/spec";
3
3
  import { InferLoadOptions, LoadReference } from "@stryke/resolve/types";
4
+ import { Config } from "ts-json-schema-generator/dist/src/Config.js";
4
5
  import { Storage } from "unstorage";
5
6
  import { InputObject, Schema } from "untyped";
6
7
  import * as z3 from "zod/v3";
@@ -1203,19 +1204,13 @@ type SchemaSourceConfig<TSpec = any> = StandardJSONSchemaV1<TSpec> | JsonSchemaO
1203
1204
  * @see {@link SchemaConfigWithMeta}
1204
1205
  */
1205
1206
  type SchemaConfig<TSpec = any> = LoadReference | SchemaSourceConfig<TSpec> | SchemaEnvelope<JsonSchemaOf<TSpec>>;
1206
- type InferExtractOptions<T extends SchemaConfig> = (T extends LoadReference ? Omit<InferLoadOptions<T>, "fs"> : {}) & {
1207
+ type BaseExtractOptions = {
1207
1208
  /**
1208
1209
  * An optional storage instance to use for caching schema extraction results. If provided, the storage instance will be used to store and retrieve cached schema extraction results, which can improve performance by avoiding redundant schema extraction operations. If not provided, the default storage mechanism will be used.
1209
1210
  */
1210
1211
  storage?: Storage;
1211
- /**
1212
- * An optional path to a TypeScript configuration file to use for the schema extraction process. If provided, the TypeScript configuration file will be used to compile the TypeScript code before extracting the schema. If not provided, the default TypeScript configuration will be used.
1213
- *
1214
- * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
1215
- * @see https://www.typescriptlang.org/docs/handbook/compiler-options.html
1216
- */
1217
- tsconfig?: string;
1218
- };
1212
+ } & Omit<Config, "path" | "type">;
1213
+ type InferExtractOptions<T extends SchemaConfig> = (T extends LoadReference ? Omit<InferLoadOptions<T>, "fs"> : {}) & BaseExtractOptions;
1219
1214
  /**
1220
1215
  * A schema envelope that contains the normalized schema and its source variant.
1221
1216
  */
@@ -1337,5 +1332,5 @@ declare module "zod" {
1337
1332
  }
1338
1333
  }
1339
1334
  //#endregion
1340
- export { SpecOf as $, JsonSchemaObject as A, JsonSchemaStringFormat as B, JsonSchemaMetadataKeywords as C, JsonSchemaNullable as D, JsonSchemaNull as E, JsonSchemaRecordPropertyNames as F, JsonSchemaUnknown as G, JsonSchemaType as H, JsonSchemaRef as I, SchemaEnvelope as J, SchemaConfig as K, JsonSchemaSchemaSource as L, JsonSchemaPrimitiveType as M, JsonSchemaPrimitiveUnion as N, JsonSchemaNumber as O, JsonSchemaRecord as P, SchemaSourceVariant as Q, JsonSchemaSet as R, JsonSchemaMap as S, JsonSchemaNever as T, JsonSchemaUndefined as U, JsonSchemaTuple as V, JsonSchemaUnion as W, SchemaSource as X, SchemaEnvelopeOf as Y, SchemaSourceConfig as Z, JsonSchemaIntegerFormat as _, JsonSchemaAllOf as a, ValibotSchemaSource as at, JsonSchemaLiteral as b, JsonSchemaArray as c, JSON_SCHEMA_PRIMITIVE_TYPES as ct, JsonSchemaConditionalKeywords as d, SCHEMA_ARRAY_CONCAT_KEYWORDS as dt, StandardSchemaSchemaSource as et, JsonSchemaDate as f, SCHEMA_RECORD_KEYWORDS as ft, JsonSchemaInteger as g, JsonSchemaEnum as h, JsonSchema as i, ValibotSchema as it, JsonSchemaOf as j, JsonSchemaNumberFormat as k, JsonSchemaBigint as l, JSON_SCHEMA_TYPES as lt, JsonSchemaDecimalFormat as m, ExtractedSchemaEnvelope as n, UntypedSchema as nt, JsonSchemaAny as o, Zod3SchemaSource as ot, JsonSchemaDecimal as p, SCHEMA_SINGLE_KEYWORDS as pt, SchemaConfigVariant as q, InferExtractOptions as r, UntypedSchemaSource as rt, JsonSchemaAnyOf as s, JSON_SCHEMA_METADATA_KEYS as st, BaseSchemaSource as t, UntypedConfigObject as tt, JsonSchemaBoolean as u, JsonSchemaTypeNames as ut, JsonSchemaKeywords as v, JsonSchemaNativeEnum as w, JsonSchemaLogicKeywords as x, JsonSchemaLike as y, JsonSchemaString as z };
1341
- //# sourceMappingURL=types-D3JK-Pzs.d.mts.map
1335
+ export { SchemaSourceVariant as $, JsonSchemaNumberFormat as A, JsonSchemaString as B, JsonSchemaMap as C, JsonSchemaNull as D, JsonSchemaNever as E, JsonSchemaRecord as F, JsonSchemaUnion as G, JsonSchemaTuple as H, JsonSchemaRecordPropertyNames as I, SchemaConfigVariant as J, JsonSchemaUnknown as K, JsonSchemaRef as L, JsonSchemaOf as M, JsonSchemaPrimitiveType as N, JsonSchemaNullable as O, JsonSchemaPrimitiveUnion as P, SchemaSourceConfig as Q, JsonSchemaSchemaSource as R, JsonSchemaLogicKeywords as S, JsonSchemaNativeEnum as T, JsonSchemaType as U, JsonSchemaStringFormat as V, JsonSchemaUndefined as W, SchemaEnvelopeOf as X, SchemaEnvelope as Y, SchemaSource as Z, JsonSchemaInteger as _, JsonSchema as a, ValibotSchema as at, JsonSchemaLike as b, JsonSchemaAnyOf as c, JSON_SCHEMA_METADATA_KEYS as ct, JsonSchemaBoolean as d, JsonSchemaTypeNames as dt, SpecOf as et, JsonSchemaConditionalKeywords as f, SCHEMA_ARRAY_CONCAT_KEYWORDS as ft, JsonSchemaEnum as g, JsonSchemaDecimalFormat as h, InferExtractOptions as i, UntypedSchemaSource as it, JsonSchemaObject as j, JsonSchemaNumber as k, JsonSchemaArray as l, JSON_SCHEMA_PRIMITIVE_TYPES as lt, JsonSchemaDecimal as m, SCHEMA_SINGLE_KEYWORDS as mt, BaseSchemaSource as n, UntypedConfigObject as nt, JsonSchemaAllOf as o, ValibotSchemaSource as ot, JsonSchemaDate as p, SCHEMA_RECORD_KEYWORDS as pt, SchemaConfig as q, ExtractedSchemaEnvelope as r, UntypedSchema as rt, JsonSchemaAny as s, Zod3SchemaSource as st, BaseExtractOptions as t, StandardSchemaSchemaSource as tt, JsonSchemaBigint as u, JSON_SCHEMA_TYPES as ut, JsonSchemaIntegerFormat as v, JsonSchemaMetadataKeywords as w, JsonSchemaLiteral as x, JsonSchemaKeywords as y, JsonSchemaSet as z };
1336
+ //# sourceMappingURL=types-BMC57p-g.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-BMC57p-g.d.mts","names":[],"sources":["../src/constants.ts","../src/types.ts"],"mappings":""}
@@ -1,5 +1,6 @@
1
1
  import { StandardJSONSchemaV1 } from "@standard-schema/spec";
2
2
  import { InferLoadOptions, LoadReference } from "@stryke/resolve/types";
3
+ import { Config } from "ts-json-schema-generator/dist/src/Config.js";
3
4
  import { Storage } from "unstorage";
4
5
  import { InputObject, Schema } from "untyped";
5
6
  import { BaseIssue, BaseSchema } from "valibot";
@@ -1203,19 +1204,13 @@ type SchemaSourceConfig<TSpec = any> = StandardJSONSchemaV1<TSpec> | JsonSchemaO
1203
1204
  * @see {@link SchemaConfigWithMeta}
1204
1205
  */
1205
1206
  type SchemaConfig<TSpec = any> = LoadReference | SchemaSourceConfig<TSpec> | SchemaEnvelope<JsonSchemaOf<TSpec>>;
1206
- type InferExtractOptions<T extends SchemaConfig> = (T extends LoadReference ? Omit<InferLoadOptions<T>, "fs"> : {}) & {
1207
+ type BaseExtractOptions = {
1207
1208
  /**
1208
1209
  * An optional storage instance to use for caching schema extraction results. If provided, the storage instance will be used to store and retrieve cached schema extraction results, which can improve performance by avoiding redundant schema extraction operations. If not provided, the default storage mechanism will be used.
1209
1210
  */
1210
1211
  storage?: Storage;
1211
- /**
1212
- * An optional path to a TypeScript configuration file to use for the schema extraction process. If provided, the TypeScript configuration file will be used to compile the TypeScript code before extracting the schema. If not provided, the default TypeScript configuration will be used.
1213
- *
1214
- * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
1215
- * @see https://www.typescriptlang.org/docs/handbook/compiler-options.html
1216
- */
1217
- tsconfig?: string;
1218
- };
1212
+ } & Omit<Config, "path" | "type">;
1213
+ type InferExtractOptions<T extends SchemaConfig> = (T extends LoadReference ? Omit<InferLoadOptions<T>, "fs"> : {}) & BaseExtractOptions;
1219
1214
  /**
1220
1215
  * A schema envelope that contains the normalized schema and its source variant.
1221
1216
  */
@@ -1337,5 +1332,5 @@ declare module "zod" {
1337
1332
  }
1338
1333
  }
1339
1334
  //#endregion
1340
- export { SpecOf as $, JsonSchemaObject as A, JsonSchemaStringFormat as B, JsonSchemaMetadataKeywords as C, JsonSchemaNullable as D, JsonSchemaNull as E, JsonSchemaRecordPropertyNames as F, JsonSchemaUnknown as G, JsonSchemaType as H, JsonSchemaRef as I, SchemaEnvelope as J, SchemaConfig as K, JsonSchemaSchemaSource as L, JsonSchemaPrimitiveType as M, JsonSchemaPrimitiveUnion as N, JsonSchemaNumber as O, JsonSchemaRecord as P, SchemaSourceVariant as Q, JsonSchemaSet as R, JsonSchemaMap as S, JsonSchemaNever as T, JsonSchemaUndefined as U, JsonSchemaTuple as V, JsonSchemaUnion as W, SchemaSource as X, SchemaEnvelopeOf as Y, SchemaSourceConfig as Z, JsonSchemaIntegerFormat as _, JsonSchemaAllOf as a, ValibotSchemaSource as at, JsonSchemaLiteral as b, JsonSchemaArray as c, JSON_SCHEMA_PRIMITIVE_TYPES as ct, JsonSchemaConditionalKeywords as d, SCHEMA_ARRAY_CONCAT_KEYWORDS as dt, StandardSchemaSchemaSource as et, JsonSchemaDate as f, SCHEMA_RECORD_KEYWORDS as ft, JsonSchemaInteger as g, JsonSchemaEnum as h, JsonSchema as i, ValibotSchema as it, JsonSchemaOf as j, JsonSchemaNumberFormat as k, JsonSchemaBigint as l, JSON_SCHEMA_TYPES as lt, JsonSchemaDecimalFormat as m, ExtractedSchemaEnvelope as n, UntypedSchema as nt, JsonSchemaAny as o, Zod3SchemaSource as ot, JsonSchemaDecimal as p, SCHEMA_SINGLE_KEYWORDS as pt, SchemaConfigVariant as q, InferExtractOptions as r, UntypedSchemaSource as rt, JsonSchemaAnyOf as s, JSON_SCHEMA_METADATA_KEYS as st, BaseSchemaSource as t, UntypedConfigObject as tt, JsonSchemaBoolean as u, JsonSchemaTypeNames as ut, JsonSchemaKeywords as v, JsonSchemaNativeEnum as w, JsonSchemaLogicKeywords as x, JsonSchemaLike as y, JsonSchemaString as z };
1341
- //# sourceMappingURL=types-Dfjg_dR7.d.cts.map
1335
+ export { SchemaSourceVariant as $, JsonSchemaNumberFormat as A, JsonSchemaString as B, JsonSchemaMap as C, JsonSchemaNull as D, JsonSchemaNever as E, JsonSchemaRecord as F, JsonSchemaUnion as G, JsonSchemaTuple as H, JsonSchemaRecordPropertyNames as I, SchemaConfigVariant as J, JsonSchemaUnknown as K, JsonSchemaRef as L, JsonSchemaOf as M, JsonSchemaPrimitiveType as N, JsonSchemaNullable as O, JsonSchemaPrimitiveUnion as P, SchemaSourceConfig as Q, JsonSchemaSchemaSource as R, JsonSchemaLogicKeywords as S, JsonSchemaNativeEnum as T, JsonSchemaType as U, JsonSchemaStringFormat as V, JsonSchemaUndefined as W, SchemaEnvelopeOf as X, SchemaEnvelope as Y, SchemaSource as Z, JsonSchemaInteger as _, JsonSchema as a, ValibotSchema as at, JsonSchemaLike as b, JsonSchemaAnyOf as c, JSON_SCHEMA_METADATA_KEYS as ct, JsonSchemaBoolean as d, JsonSchemaTypeNames as dt, SpecOf as et, JsonSchemaConditionalKeywords as f, SCHEMA_ARRAY_CONCAT_KEYWORDS as ft, JsonSchemaEnum as g, JsonSchemaDecimalFormat as h, InferExtractOptions as i, UntypedSchemaSource as it, JsonSchemaObject as j, JsonSchemaNumber as k, JsonSchemaArray as l, JSON_SCHEMA_PRIMITIVE_TYPES as lt, JsonSchemaDecimal as m, SCHEMA_SINGLE_KEYWORDS as mt, BaseSchemaSource as n, UntypedConfigObject as nt, JsonSchemaAllOf as o, ValibotSchemaSource as ot, JsonSchemaDate as p, SCHEMA_RECORD_KEYWORDS as pt, SchemaConfig as q, ExtractedSchemaEnvelope as r, UntypedSchema as rt, JsonSchemaAny as s, Zod3SchemaSource as st, BaseExtractOptions as t, StandardSchemaSchemaSource as tt, JsonSchemaBigint as u, JSON_SCHEMA_TYPES as ut, JsonSchemaIntegerFormat as v, JsonSchemaMetadataKeywords as w, JsonSchemaLiteral as x, JsonSchemaKeywords as y, JsonSchemaSet as z };
1336
+ //# sourceMappingURL=types-BhEdUeyR.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-BhEdUeyR.d.cts","names":[],"sources":["../src/constants.ts","../src/types.ts"],"mappings":";;;;;;;;cAoBa;;;;;;;;;cAUA;cAQA;cAMA;;;;;cA8BA,wBAAsB;;;;;cAYtB,wBAAsB;;;;;cAiBtB,8BAA4B;;;;;;;;KClE7B,kCACF;;;;;;KAOE,yBAAyB;;;;KAKzB;;;;KAaA;;;;KAKA,yBACV,0BAA0B;;;;KAKhB;;;;;;UA6BK;;;;;;;EAOf;;;;;;;EAQA;;;;;;;EAWA,cAAc;;;;;;;EAQd;;;;;;EAOA;;;;;;;;;EAUA,QAAQ,eAAe;;;;;;;;EASvB;;;;;;;EAQA;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;IACc;IAAe;IAAsB;;;;;EAMnD;;;;EAKA;;;;EAKA;IAGM;IAAkB;IAAgB;;;;;EAKxC;;;;EAKA;;;;;;EAOA;;;;EAKA;;;;EAKA;;;;EAKA;;;;;;;;UASe;;;;;;;;;EASf,QAAQ;;;;;;;;;EAUR,QAAQ;;;;;;;;;EAUR,QAAQ;;;;;;;;;EAUR,MAAM;;;;;;;;UASS;;;;;;;;;EASf,KAAK;;;;;;;;;EAUL,OAAO;;;;;;;;;EAUP,OAAO;;;;;KAMG,qBAAqB,6BAC/B,0BACA;;;;KAKU,gBAAgB;;;;;;EAQpB;;;;;EAMA,aAAa;;;;;;;UASJ,wBAAwB;;;;EAIvC;;;;;;EAOA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T,QAAQ,mBAAmB;;;;;UAMZ,uBACf,qBACQ,iBAAiB;;EAEzB;;EAGA,QAAQ,aAAa;;;;;UAMN,2BACf,qBACQ,iBAAiB;;EAEzB;;EAGA,QAAQ,qBAAqB;;;;;UAMd,iBAAiB,qBAAqB,iBAAiB;;EAEtE;;EAGA,QAAQ,GAAG,QAAQ;;;;;UAMJ,oBACf,qBACQ,iBAAiB;;EAEzB;;EAGA,QAAQ,sBAAsB;;;;;UAMf,oBACf,qBACQ,iBAAiB;;EAEzB;;EAGA,QAAQ,cAAc;;;;;KAMZ,aAAa,eACrB,uBAAuB,SACvB,2BAA2B,SAC3B,iBAAiB,SACjB,oBAAoB,SACpB,oBAAoB;;;;UAKP,wBACf,qBACQ,iBAAiB;;;;EAIzB,QAAQ,aAAa;;;YAIX;IACR;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACc;MAAe;MAAsB;;IACnD;IACA;IACA;IACA;IACA;KACC"}
@@ -1,4 +1,4 @@
1
- import { i as JsonSchema } from "./types-Dfjg_dR7.cjs";
1
+ import { a as JsonSchema } from "./types-BhEdUeyR.cjs";
2
2
  import * as v from "valibot";
3
3
  //#region src/valibot.d.ts
4
4
  declare const referenceSchema: v.ObjectSchema<{
@@ -1,4 +1,4 @@
1
- import { i as JsonSchema } from "./types-D3JK-Pzs.mjs";
1
+ import { a as JsonSchema } from "./types-BMC57p-g.mjs";
2
2
  import * as v from "valibot";
3
3
  //#region src/valibot.d.ts
4
4
  declare const referenceSchema: v.ObjectSchema<{
package/dist/zod.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-CMqjfN_6.cjs"),t=require("./constants-CjTQhR-l.cjs"),n=require("./helpers-DFeTcMSU.cjs");let r=require("@stryke/helpers/deep-clone"),i=require("zod/mini");i=e.t(i,1);let a=require("zod/v4");a=e.t(a,1);const o=i.enum(t.r),s=i.union([i.string(),i.number(),i.bigint(),i.boolean(),i.null()]),c=i.union([i.number(),i.bigint()]),l=i.union([i.boolean(),i.string(),i.object({message:i.optional(i.string()),since:i.optional(i.string()),alternative:i.optional(i.string())})]),u=i.union([i.unknown(),i.object({name:i.optional(i.string()),description:i.optional(i.string()),value:i.unknown()})]),d=i.number().check(i.int(),i.nonnegative()),f=i.object({$ref:i.string().check(i.minLength(1,`Reference must be a non-empty URI`))});function p(e){return i.union([f,e])}const m=i.object({$id:i.optional(i.string()),$schema:i.optional(i.string()),$vocabulary:i.optional(i.record(i.string(),i.boolean())),$comment:i.optional(i.string()),$anchor:i.optional(i.string()),$dynamicRef:i.optional(i.string()),$dynamicAnchor:i.optional(i.string()),name:i.optional(i.string()),version:i.optional(i.union([i.string(),i.number()])),title:i.optional(i.string()),description:i.optional(i.string()),docs:i.optional(i.string()),examples:i.optional(i.array(u)),alias:i.optional(i.array(i.string())),tags:i.optional(i.array(i.string())),deprecated:i.optional(l),hidden:i.optional(i.boolean()),ignore:i.optional(i.boolean()),internal:i.optional(i.boolean()),runtime:i.optional(i.boolean()),readOnly:i.optional(i.boolean()),writeOnly:i.optional(i.boolean())}),h=i.lazy(()=>{let e=i.object({type:i.literal(`array`),prefixItems:i.tuple([h,h]),items:i.optional(i.literal(!1)),minItems:i.literal(2),maxItems:i.literal(2)}),t=i.extend(m,{$ref:i.optional(i.string()),$defs:i.optional(i.record(i.string(),h)),type:i.optional(i.union([o,i.array(o)])),const:i.optional(i.unknown()),enum:i.optional(i.array(s)),format:i.optional(i.string()),default:i.optional(i.unknown()),allOf:i.optional(i.array(h)),anyOf:i.optional(i.array(h)),oneOf:i.optional(i.array(h)),not:i.optional(h),if:i.optional(h),then:i.optional(h),else:i.optional(h),properties:i.optional(i.record(i.string(),h)),patternProperties:i.optional(i.record(i.string(),h)),additionalProperties:i.optional(i.union([i.boolean(),h])),required:i.optional(i.array(i.string())),propertyNames:i.optional(h),dependencies:i.optional(i.record(i.string(),i.union([i.array(i.string()),h]))),dependentRequired:i.optional(i.record(i.string(),i.array(i.string()))),dependentSchemas:i.optional(i.record(i.string(),h)),minProperties:i.optional(d),maxProperties:i.optional(d),primaryKey:i.optional(i.array(i.string())),databaseSchema:i.optional(i.string()),unevaluatedProperties:i.optional(i.union([i.boolean(),h])),prefixItems:i.optional(i.array(h)),items:i.optional(i.union([h,e])),contains:i.optional(h),minItems:i.optional(d),maxItems:i.optional(d),uniqueItems:i.optional(i.boolean()),minContains:i.optional(d),maxContains:i.optional(d),unevaluatedItems:i.optional(i.union([i.boolean(),h])),minLength:i.optional(d),maxLength:i.optional(d),pattern:i.optional(i.string()),contentMediaType:i.optional(i.string()),contentEncoding:i.optional(i.string()),contentSchema:i.optional(i.string()),minimum:i.optional(c),maximum:i.optional(c),exclusiveMinimum:i.optional(c),exclusiveMaximum:i.optional(c),multipleOf:i.optional(c)});return i.union([f,t])});function g(e,t={}){let i=(0,r.deepClone)(n.n(e));return n.f(i,e=>{n.g(e)&&(e.type=[`string`,`number`,`integer`,`boolean`,`null`,`array`,`object`])}),a.fromJSONSchema(i,t)}exports.jsonSchema=h,exports.refOr=p,exports.referenceSchema=f,exports.toZodSchema=g;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-CMqjfN_6.cjs"),t=require("./constants-CjTQhR-l.cjs"),n=require("./helpers-CFED4EbH.cjs");let r=require("@stryke/helpers/deep-clone"),i=require("zod/mini");i=e.t(i,1);let a=require("zod/v4");a=e.t(a,1);const o=i.enum(t.r),s=i.union([i.string(),i.number(),i.bigint(),i.boolean(),i.null()]),c=i.union([i.number(),i.bigint()]),l=i.union([i.boolean(),i.string(),i.object({message:i.optional(i.string()),since:i.optional(i.string()),alternative:i.optional(i.string())})]),u=i.union([i.unknown(),i.object({name:i.optional(i.string()),description:i.optional(i.string()),value:i.unknown()})]),d=i.number().check(i.int(),i.nonnegative()),f=i.object({$ref:i.string().check(i.minLength(1,`Reference must be a non-empty URI`))});function p(e){return i.union([f,e])}const m=i.object({$id:i.optional(i.string()),$schema:i.optional(i.string()),$vocabulary:i.optional(i.record(i.string(),i.boolean())),$comment:i.optional(i.string()),$anchor:i.optional(i.string()),$dynamicRef:i.optional(i.string()),$dynamicAnchor:i.optional(i.string()),name:i.optional(i.string()),version:i.optional(i.union([i.string(),i.number()])),title:i.optional(i.string()),description:i.optional(i.string()),docs:i.optional(i.string()),examples:i.optional(i.array(u)),alias:i.optional(i.array(i.string())),tags:i.optional(i.array(i.string())),deprecated:i.optional(l),hidden:i.optional(i.boolean()),ignore:i.optional(i.boolean()),internal:i.optional(i.boolean()),runtime:i.optional(i.boolean()),readOnly:i.optional(i.boolean()),writeOnly:i.optional(i.boolean())}),h=i.lazy(()=>{let e=i.object({type:i.literal(`array`),prefixItems:i.tuple([h,h]),items:i.optional(i.literal(!1)),minItems:i.literal(2),maxItems:i.literal(2)}),t=i.extend(m,{$ref:i.optional(i.string()),$defs:i.optional(i.record(i.string(),h)),type:i.optional(i.union([o,i.array(o)])),const:i.optional(i.unknown()),enum:i.optional(i.array(s)),format:i.optional(i.string()),default:i.optional(i.unknown()),allOf:i.optional(i.array(h)),anyOf:i.optional(i.array(h)),oneOf:i.optional(i.array(h)),not:i.optional(h),if:i.optional(h),then:i.optional(h),else:i.optional(h),properties:i.optional(i.record(i.string(),h)),patternProperties:i.optional(i.record(i.string(),h)),additionalProperties:i.optional(i.union([i.boolean(),h])),required:i.optional(i.array(i.string())),propertyNames:i.optional(h),dependencies:i.optional(i.record(i.string(),i.union([i.array(i.string()),h]))),dependentRequired:i.optional(i.record(i.string(),i.array(i.string()))),dependentSchemas:i.optional(i.record(i.string(),h)),minProperties:i.optional(d),maxProperties:i.optional(d),primaryKey:i.optional(i.array(i.string())),databaseSchema:i.optional(i.string()),unevaluatedProperties:i.optional(i.union([i.boolean(),h])),prefixItems:i.optional(i.array(h)),items:i.optional(i.union([h,e])),contains:i.optional(h),minItems:i.optional(d),maxItems:i.optional(d),uniqueItems:i.optional(i.boolean()),minContains:i.optional(d),maxContains:i.optional(d),unevaluatedItems:i.optional(i.union([i.boolean(),h])),minLength:i.optional(d),maxLength:i.optional(d),pattern:i.optional(i.string()),contentMediaType:i.optional(i.string()),contentEncoding:i.optional(i.string()),contentSchema:i.optional(i.string()),minimum:i.optional(c),maximum:i.optional(c),exclusiveMinimum:i.optional(c),exclusiveMaximum:i.optional(c),multipleOf:i.optional(c)});return i.union([f,t])});function g(e,t={}){let i=(0,r.deepClone)(n.n(e));return n.f(i,e=>{n.g(e)&&(e.type=[`string`,`number`,`integer`,`boolean`,`null`,`array`,`object`])}),a.fromJSONSchema(i,t)}exports.jsonSchema=h,exports.refOr=p,exports.referenceSchema=f,exports.toZodSchema=g;
package/dist/zod.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { J as SchemaEnvelope, i as JsonSchema } from "./types-Dfjg_dR7.cjs";
1
+ import { Y as SchemaEnvelope, a as JsonSchema } from "./types-BhEdUeyR.cjs";
2
2
  import * as z from "zod/mini";
3
3
  import * as z4 from "zod/v4";
4
4
  //#region src/zod.d.ts
package/dist/zod.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { J as SchemaEnvelope, i as JsonSchema } from "./types-D3JK-Pzs.mjs";
1
+ import { Y as SchemaEnvelope, a as JsonSchema } from "./types-BMC57p-g.mjs";
2
2
  import * as z from "zod/mini";
3
3
  import * as z4 from "zod/v4";
4
4
  //#region src/zod.d.ts
package/dist/zod.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{r as e}from"./constants-lk1mMbgx.mjs";import{f as t,g as n,n as r}from"./helpers-Km2QO1Vz.mjs";import{deepClone as i}from"@stryke/helpers/deep-clone";import*as a from"zod/mini";import*as o from"zod/v4";const s=a.enum(e),c=a.union([a.string(),a.number(),a.bigint(),a.boolean(),a.null()]),l=a.union([a.number(),a.bigint()]),u=a.union([a.boolean(),a.string(),a.object({message:a.optional(a.string()),since:a.optional(a.string()),alternative:a.optional(a.string())})]),d=a.union([a.unknown(),a.object({name:a.optional(a.string()),description:a.optional(a.string()),value:a.unknown()})]),f=a.number().check(a.int(),a.nonnegative()),p=a.object({$ref:a.string().check(a.minLength(1,`Reference must be a non-empty URI`))});function m(e){return a.union([p,e])}const h=a.object({$id:a.optional(a.string()),$schema:a.optional(a.string()),$vocabulary:a.optional(a.record(a.string(),a.boolean())),$comment:a.optional(a.string()),$anchor:a.optional(a.string()),$dynamicRef:a.optional(a.string()),$dynamicAnchor:a.optional(a.string()),name:a.optional(a.string()),version:a.optional(a.union([a.string(),a.number()])),title:a.optional(a.string()),description:a.optional(a.string()),docs:a.optional(a.string()),examples:a.optional(a.array(d)),alias:a.optional(a.array(a.string())),tags:a.optional(a.array(a.string())),deprecated:a.optional(u),hidden:a.optional(a.boolean()),ignore:a.optional(a.boolean()),internal:a.optional(a.boolean()),runtime:a.optional(a.boolean()),readOnly:a.optional(a.boolean()),writeOnly:a.optional(a.boolean())}),g=a.lazy(()=>{let e=a.object({type:a.literal(`array`),prefixItems:a.tuple([g,g]),items:a.optional(a.literal(!1)),minItems:a.literal(2),maxItems:a.literal(2)}),t=a.extend(h,{$ref:a.optional(a.string()),$defs:a.optional(a.record(a.string(),g)),type:a.optional(a.union([s,a.array(s)])),const:a.optional(a.unknown()),enum:a.optional(a.array(c)),format:a.optional(a.string()),default:a.optional(a.unknown()),allOf:a.optional(a.array(g)),anyOf:a.optional(a.array(g)),oneOf:a.optional(a.array(g)),not:a.optional(g),if:a.optional(g),then:a.optional(g),else:a.optional(g),properties:a.optional(a.record(a.string(),g)),patternProperties:a.optional(a.record(a.string(),g)),additionalProperties:a.optional(a.union([a.boolean(),g])),required:a.optional(a.array(a.string())),propertyNames:a.optional(g),dependencies:a.optional(a.record(a.string(),a.union([a.array(a.string()),g]))),dependentRequired:a.optional(a.record(a.string(),a.array(a.string()))),dependentSchemas:a.optional(a.record(a.string(),g)),minProperties:a.optional(f),maxProperties:a.optional(f),primaryKey:a.optional(a.array(a.string())),databaseSchema:a.optional(a.string()),unevaluatedProperties:a.optional(a.union([a.boolean(),g])),prefixItems:a.optional(a.array(g)),items:a.optional(a.union([g,e])),contains:a.optional(g),minItems:a.optional(f),maxItems:a.optional(f),uniqueItems:a.optional(a.boolean()),minContains:a.optional(f),maxContains:a.optional(f),unevaluatedItems:a.optional(a.union([a.boolean(),g])),minLength:a.optional(f),maxLength:a.optional(f),pattern:a.optional(a.string()),contentMediaType:a.optional(a.string()),contentEncoding:a.optional(a.string()),contentSchema:a.optional(a.string()),minimum:a.optional(l),maximum:a.optional(l),exclusiveMinimum:a.optional(l),exclusiveMaximum:a.optional(l),multipleOf:a.optional(l)});return a.union([p,t])});function _(e,a={}){let s=i(r(e));return t(s,e=>{n(e)&&(e.type=[`string`,`number`,`integer`,`boolean`,`null`,`array`,`object`])}),o.fromJSONSchema(s,a)}export{g as jsonSchema,m as refOr,p as referenceSchema,_ as toZodSchema};
1
+ import{r as e}from"./constants-lk1mMbgx.mjs";import{f as t,g as n,n as r}from"./helpers-s2Zqtb-K.mjs";import{deepClone as i}from"@stryke/helpers/deep-clone";import*as a from"zod/mini";import*as o from"zod/v4";const s=a.enum(e),c=a.union([a.string(),a.number(),a.bigint(),a.boolean(),a.null()]),l=a.union([a.number(),a.bigint()]),u=a.union([a.boolean(),a.string(),a.object({message:a.optional(a.string()),since:a.optional(a.string()),alternative:a.optional(a.string())})]),d=a.union([a.unknown(),a.object({name:a.optional(a.string()),description:a.optional(a.string()),value:a.unknown()})]),f=a.number().check(a.int(),a.nonnegative()),p=a.object({$ref:a.string().check(a.minLength(1,`Reference must be a non-empty URI`))});function m(e){return a.union([p,e])}const h=a.object({$id:a.optional(a.string()),$schema:a.optional(a.string()),$vocabulary:a.optional(a.record(a.string(),a.boolean())),$comment:a.optional(a.string()),$anchor:a.optional(a.string()),$dynamicRef:a.optional(a.string()),$dynamicAnchor:a.optional(a.string()),name:a.optional(a.string()),version:a.optional(a.union([a.string(),a.number()])),title:a.optional(a.string()),description:a.optional(a.string()),docs:a.optional(a.string()),examples:a.optional(a.array(d)),alias:a.optional(a.array(a.string())),tags:a.optional(a.array(a.string())),deprecated:a.optional(u),hidden:a.optional(a.boolean()),ignore:a.optional(a.boolean()),internal:a.optional(a.boolean()),runtime:a.optional(a.boolean()),readOnly:a.optional(a.boolean()),writeOnly:a.optional(a.boolean())}),g=a.lazy(()=>{let e=a.object({type:a.literal(`array`),prefixItems:a.tuple([g,g]),items:a.optional(a.literal(!1)),minItems:a.literal(2),maxItems:a.literal(2)}),t=a.extend(h,{$ref:a.optional(a.string()),$defs:a.optional(a.record(a.string(),g)),type:a.optional(a.union([s,a.array(s)])),const:a.optional(a.unknown()),enum:a.optional(a.array(c)),format:a.optional(a.string()),default:a.optional(a.unknown()),allOf:a.optional(a.array(g)),anyOf:a.optional(a.array(g)),oneOf:a.optional(a.array(g)),not:a.optional(g),if:a.optional(g),then:a.optional(g),else:a.optional(g),properties:a.optional(a.record(a.string(),g)),patternProperties:a.optional(a.record(a.string(),g)),additionalProperties:a.optional(a.union([a.boolean(),g])),required:a.optional(a.array(a.string())),propertyNames:a.optional(g),dependencies:a.optional(a.record(a.string(),a.union([a.array(a.string()),g]))),dependentRequired:a.optional(a.record(a.string(),a.array(a.string()))),dependentSchemas:a.optional(a.record(a.string(),g)),minProperties:a.optional(f),maxProperties:a.optional(f),primaryKey:a.optional(a.array(a.string())),databaseSchema:a.optional(a.string()),unevaluatedProperties:a.optional(a.union([a.boolean(),g])),prefixItems:a.optional(a.array(g)),items:a.optional(a.union([g,e])),contains:a.optional(g),minItems:a.optional(f),maxItems:a.optional(f),uniqueItems:a.optional(a.boolean()),minContains:a.optional(f),maxContains:a.optional(f),unevaluatedItems:a.optional(a.union([a.boolean(),g])),minLength:a.optional(f),maxLength:a.optional(f),pattern:a.optional(a.string()),contentMediaType:a.optional(a.string()),contentEncoding:a.optional(a.string()),contentSchema:a.optional(a.string()),minimum:a.optional(l),maximum:a.optional(l),exclusiveMinimum:a.optional(l),exclusiveMaximum:a.optional(l),multipleOf:a.optional(l)});return a.union([p,t])});function _(e,a={}){let s=i(r(e));return t(s,e=>{n(e)&&(e.type=[`string`,`number`,`integer`,`boolean`,`null`,`array`,`object`])}),o.fromJSONSchema(s,a)}export{g as jsonSchema,m as refOr,p as referenceSchema,_ as toZodSchema};
2
2
  //# sourceMappingURL=zod.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@power-plant/schema",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "private": false,
5
5
  "description": "A Power Plant utility package to help managing schemas.",
6
6
  "keywords": [
@@ -125,6 +125,7 @@
125
125
  "@stryke/helpers": "^0.10.36",
126
126
  "@stryke/json": "^0.15.20",
127
127
  "@stryke/path": "^0.29.23",
128
+ "@stryke/fs": "^0.33.97",
128
129
  "@stryke/resolve": "^0.0.12",
129
130
  "@stryke/string-format": "^0.17.38",
130
131
  "@stryke/type-checks": "^0.6.29",
@@ -132,6 +133,7 @@
132
133
  "@stryke/unique-id": "^0.3.108",
133
134
  "@stryke/url": "^0.4.47",
134
135
  "@stryke/zod": "^0.3.42",
136
+ "@typescript/vfs": "^1.6.4",
135
137
  "@valibot/to-json-schema": "^1.7.1",
136
138
  "defu": "^6.1.7",
137
139
  "ts-json-schema-generator": "^2.9.0",
@@ -140,9 +142,9 @@
140
142
  "untyped": "^1.5.2"
141
143
  },
142
144
  "devDependencies": {
143
- "@powerlines/plugin-tsdown": "^0.1.548",
145
+ "@powerlines/plugin-tsdown": "^0.1.550",
144
146
  "@types/node": "^25.9.5",
145
- "powerlines": "^0.47.147",
147
+ "powerlines": "^0.47.149",
146
148
  "valibot": "^1.4.2",
147
149
  "zod": "^4.4.3"
148
150
  },
@@ -155,13 +157,5 @@
155
157
  "zod": { "optional": true }
156
158
  },
157
159
  "publishConfig": { "access": "public" },
158
- "inlinedDependencies": {
159
- "@storm-software/config-tools": "1.190.109",
160
- "@stryke/fs": "0.33.97",
161
- "acorn": "8.17.0",
162
- "mlly": "1.8.2",
163
- "pathe": "2.0.3",
164
- "ufo": "1.6.4"
165
- },
166
- "gitHead": "f01443cbd473363ecf38d0198db1b14b824b0c40"
160
+ "gitHead": "912dc0dddcd04e268dd977d47e92f33df24b6a33"
167
161
  }
@@ -1 +0,0 @@
1
- const e=require("./rolldown-runtime-CMqjfN_6.cjs"),t=require("./constants-CjTQhR-l.cjs");let n=require("@stryke/type-checks/is-set-object"),r=require("@stryke/type-checks/is-set-string"),i=require("@stryke/type-checks"),a=require("defu");a=e.t(a,1);let ee=require("@stryke/helpers/get-unique"),te=require("@stryke/path/find"),ne=require("@stryke/resolve/constants");function re(e,r){if(!r||!(0,n.isSetObject)(e))return e;let i={...e},a=i;for(let e of t.t){let t=r[e];t!=null&&(a[e]=t)}return i}function o(e){if(!(0,n.isSetObject)(e))return[];let t=e;return Array.isArray(t.type)?t.type.filter(e=>(0,r.isSetString)(e)):(0,r.isSetString)(t.type)&&t.type!==`object`&&t.type!==`array`?[t.type]:[]}function ie(e){if((0,n.isSetObject)(e))return o(e).find(e=>e!==`null`)}function ae(e){return!(0,i.isString)(e)&&e.file!==void 0}const s=e=>typeof e==`number`&&Number.isFinite(e),oe=e=>(0,i.isSetObject)(e)||(0,i.isBoolean)(e),c=e=>(0,i.isSetObject)(e)&&Object.values(e).every(e=>oe(e)),se=e=>(0,i.isSetObject)(e)&&Object.values(e).every(e=>(0,i.isBoolean)(e)),l=e=>Array.isArray(e)&&e.every(e=>(0,i.isSetString)(e)),ce=e=>(0,i.isSetObject)(e)&&Object.values(e).every(e=>l(e)),u=new Set(t.n),d=new Set(t.r);function le(e){return(0,i.isSetString)(e)&&u.has(e)}function f(e){return(0,i.isSetString)(e)&&d.has(e)}const ue=new Set([`date`,`time`,`date-time`,`iso-time`,`iso-date-time`,`unix-time`]),p=e=>typeof e==`bigint`,de=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`function`,`object`,`any`,`array`]),fe=e=>(0,i.isSetString)(e)&&de.has(e),m=e=>{if(!(0,i.isSetObject)(e))return!1;let t=e;return!(t.type!==void 0&&!((0,i.isSetString)(t.type)&&fe(t.type)||Array.isArray(t.type)&&t.type.every(e=>fe(e)))||t.tsType!==void 0&&!(0,i.isSetString)(t.tsType)||t.markdownType!==void 0&&!(0,i.isSetString)(t.markdownType)||t.items!==void 0&&!(m(t.items)||Array.isArray(t.items)&&t.items.every(e=>m(e))))},pe=e=>{if(!m(e))return!1;let t=e;return t.name!==void 0&&!(0,i.isSetString)(t.name)?!1:t.optional===void 0||typeof t.optional==`boolean`},me=e=>(0,i.isSetObject)(e)&&Object.values(e).every(e=>q(e)),h=(e,t)=>Array.isArray(e)&&e.every(e=>t(e)),he=(e,t,n)=>Array.isArray(e)&&e.length===2&&t(e[0])&&n(e[1]),g=(e,t=!1)=>e===void 0||(0,i.isString)(e)&&(t||e.length>0),_=e=>e===void 0||(0,i.isBoolean)(e),v=e=>e===void 0||s(e),y=e=>e===void 0||p(e),b=e=>e===void 0||K(e),x=e=>e===void 0||h(e,K),ge=e=>e===void 0||Array.isArray(e)&&e.every(e=>(0,i.isSetString)(e)&&u.has(e)),_e=e=>e===void 0||Array.isArray(e)&&e.every(e=>(0,i.isSetString)(e)&&d.has(e)),S=e=>!(!g(e.$id)||!g(e.$schema)||e.$vocabulary!==void 0&&!se(e.$vocabulary)||!g(e.$comment,!0)||!g(e.$anchor)||e.$defs!==void 0&&!c(e.$defs)||!g(e.$dynamicRef)||!g(e.$dynamicAnchor)||!g(e.name)||!g(e.title,!0)||!g(e.description,!0)||!g(e.docs,!0)||e.examples!==void 0&&!Array.isArray(e.examples)||e.alias!==void 0&&!l(e.alias)||e.tags!==void 0&&!l(e.tags)||!_(e.deprecated)||!_(e.hidden)||!_(e.ignore)||!_(e.internal)||!_(e.runtime)||!_(e.readOnly)||!_(e.writeOnly)||!x(e.allOf)||!x(e.anyOf)||!x(e.oneOf)||!b(e.not)||!b(e.if)||!b(e.then)||!b(e.else));function ve(e){return(0,i.isSetObject)(e)?S(e):!1}function C(e){if(!(0,i.isSetObject)(e))return!1;let n=e;return S(n)&&g(n.$ref)&&(!n.type||Array.isArray(n.type)&&n.type.every(e=>t.n.includes(e)))}function ye(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return!S(t)||t.type!==`array`?!1:x(t.prefixItems)&&b(t.items)&&b(t.contains)&&v(t.minItems)&&v(t.maxItems)&&_(t.uniqueItems)&&v(t.minContains)&&v(t.maxContains)&&(t.unevaluatedItems===void 0||(0,i.isBoolean)(t.unevaluatedItems)||K(t.unevaluatedItems))}function w(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return!S(t)||t.type!==`integer`||t.format!==`int64`?!1:y(t.minimum)&&y(t.exclusiveMinimum)&&y(t.maximum)&&y(t.exclusiveMaximum)&&y(t.multipleOf)&&y(t.default)&&(t.enum===void 0||h(t.enum,p))}function be(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&t.type===`boolean`&&_(t.default)}function T(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)?t.anyOf===void 0?t.type!==`integer`&&t.type!==`string`||!(0,i.isSetString)(t.format)||!ue.has(t.format)?!1:v(t.minimum)&&v(t.maximum)&&(t.default===void 0||(0,i.isSetString)(t.default)||s(t.default)):h(t.anyOf,T):!1}function E(e){if(!(0,i.isSetObject)(e))return!1;let t=e;if(!S(t)||!(0,i.isSetString)(t.type)||!u.has(t.type)||!Array.isArray(t.enum))return!1;let n=t.type,r=t.enum,a=t.default;return n===`string`?r.every(e=>(0,i.isSetString)(e))&&(a===void 0||(0,i.isSetString)(a)):n===`number`||n===`integer`?r.every(e=>s(e))&&(a===void 0||s(a)):n===`boolean`?r.every(e=>(0,i.isBoolean)(e))&&(a===void 0||(0,i.isBoolean)(a)):n===`null`&&r.every(e=>e===null)&&a==null}function D(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return!S(t)||!h(t.allOf,K)?!1:t.unevaluatedProperties===void 0||(0,i.isBoolean)(t.unevaluatedProperties)||K(t.unevaluatedProperties)}function O(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return!S(t)||!(`const`in t)?!1:t.type===void 0||(0,i.isSetString)(t.type)&&f(t.type)||_e(t.type)}function k(e){if(!(0,i.isSetObject)(e))return!1;let t=e;if(!S(t)||t.type!==`array`||t.maxItems!==125||!(0,i.isSetObject)(t.items))return!1;let n=t.items;return n.type===`array`&&he(n.prefixItems,K,K)&&(n.items===void 0||n.items===!1)&&n.minItems===2&&n.maxItems===2}function A(e){if(!(0,i.isSetObject)(e))return!1;let t=e,n=t.type===`string`||t.type===`number`||Array.isArray(t.type)&&t.type.length===2&&t.type[0]===`string`&&t.type[1]===`number`;return S(t)&&n&&Array.isArray(t.enum)&&t.enum.every(e=>(0,i.isSetString)(e)||s(e))}function j(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&C(t.not)}function M(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&t.type===`null`&&(t.const===void 0||t.const===null)&&(t.enum===void 0||Array.isArray(t.enum)&&t.enum.every(e=>e===null))&&(t.default===void 0||t.default===null)}function N(e){if(!(0,i.isSetObject)(e))return!1;let t=e;if(!S(t))return!1;let n=t.anyOf!==void 0&&Array.isArray(t.anyOf)&&t.anyOf.length===2&&K(t.anyOf[0])&&M(t.anyOf[1]),r=Array.isArray(t.type)&&t.type.length===2&&(t.type[0]===`null`&&(0,i.isSetString)(t.type[1])&&t.type[1]!==`null`&&d.has(t.type[1])||t.type[1]===`null`&&(0,i.isSetString)(t.type[0])&&t.type[0]!==`null`&&d.has(t.type[0]));return n||r}function P(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return!S(t)||t.type!==`number`&&t.type!==`integer`?!1:g(t.format)&&v(t.minimum)&&v(t.exclusiveMinimum)&&v(t.maximum)&&v(t.exclusiveMaximum)&&v(t.multipleOf)&&v(t.default)&&(t.enum===void 0||h(t.enum,s))}function F(e){return P(e)&&e.type===`integer`}function I(e){return P(e)&&e.type===`number`}function L(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&t.type===`object`&&(t.properties===void 0||c(t.properties))&&(t.patternProperties===void 0||c(t.patternProperties))&&(t.additionalProperties===void 0||(0,i.isBoolean)(t.additionalProperties)||K(t.additionalProperties))&&(t.required===void 0||l(t.required))&&(t.unevaluatedProperties===void 0||(0,i.isBoolean)(t.unevaluatedProperties)||K(t.unevaluatedProperties))&&(t.dependencies===void 0||(0,i.isSetObject)(t.dependencies)&&Object.values(t.dependencies).every(e=>l(e)||K(e)))&&(t.dependentRequired===void 0||ce(t.dependentRequired))&&(t.dependentSchemas===void 0||c(t.dependentSchemas))&&v(t.minProperties)&&v(t.maxProperties)&&(t.primaryKey===void 0||l(t.primaryKey))&&g(t.databaseSchema)}function R(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&t.type===`string`&&v(t.minLength)&&v(t.maxLength)&&g(t.pattern)&&g(t.format)&&g(t.default)&&(t.enum===void 0||h(t.enum,i.isSetString))&&g(t.contentMediaType)&&g(t.contentEncoding)&&g(t.contentSchema)}function z(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&t.type===`array`&&t.uniqueItems===!0&&x(t.prefixItems)&&b(t.items)&&b(t.contains)&&v(t.minItems)&&v(t.maxItems)&&v(t.minContains)&&v(t.maxContains)&&(t.unevaluatedItems===void 0||(0,i.isBoolean)(t.unevaluatedItems)||K(t.unevaluatedItems))}function B(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&t.type===`object`&&(t.patternProperties===void 0||c(t.patternProperties))&&(t.additionalProperties===void 0||(0,i.isBoolean)(t.additionalProperties)||K(t.additionalProperties))&&b(t.propertyNames)}function V(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&t.type===`array`&&h(t.prefixItems,K)&&v(t.minItems)&&v(t.maxItems)&&b(t.items)&&b(t.contains)&&_(t.uniqueItems)&&v(t.minContains)&&v(t.maxContains)&&(t.unevaluatedItems===void 0||(0,i.isBoolean)(t.unevaluatedItems)||K(t.unevaluatedItems))}function H(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&C(t.not)&&(t.default===void 0||t.default===void 0)}function U(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)?(0,i.isSetString)(t.type)&&u.has(t.type)?t.enum===void 0?!0:Array.isArray(t.enum)?t.type===`string`?t.enum.every(e=>(0,i.isSetString)(e))&&(t.default===void 0||(0,i.isSetString)(t.default)):t.type===`number`?t.enum.every(e=>s(e))&&(t.default===void 0||s(t.default)):t.type===`boolean`?t.enum.every(e=>(0,i.isBoolean)(e))&&(t.default===void 0||(0,i.isBoolean)(t.default)):t.type===`integer`?t.format===`int64`&&t.enum.every(e=>p(e))&&(t.default===void 0||p(t.default)):t.type===`null`&&t.enum.every(e=>e===null)&&(t.default===void 0||t.default===null):!1:ge(t.type)&&t.type!==void 0:!1}function W(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&(U(t)||xe(t))}function G(e){return C(e)}function xe(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&h(t.anyOf,K)}function Se(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return S(t)&&(0,i.isSetString)(t.$ref)}function Ce(e){if(!(0,i.isSetObject)(e))return!1;let t=e;if(!(0,i.isSetObject)(t[`~standard`]))return!1;let n=t[`~standard`];return n.version===1&&(0,i.isFunction)(n.validate)}function we(e){if(!(0,i.isSetObject)(e)||!Ce(e))return!1;let t=e;return t.kind===`schema`&&(0,i.isSetString)(t.type)&&(0,i.isBoolean)(t.async)&&(0,i.isFunction)(t.reference)&&(0,i.isSetString)(t.expects)&&(0,i.isFunction)(t[`~run`])}function K(e){return R(e)||F(e)||I(e)||w(e)||be(e)||T(e)||E(e)||O(e)||A(e)||M(e)||ye(e)||L(e)||B(e)||V(e)||W(e)||H(e)||Se(e)||j(e)||k(e)||C(e)||N(e)||D(e)||G(e)||z(e)}function Te(e){return M(e)}function q(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return!(!m(t)||`id`in t&&!(0,i.isSetString)(t.id)||`resolve`in t&&!(0,i.isFunction)(t.resolve)||`properties`in t&&!me(t.properties)||`required`in t&&!l(t.required)||`title`in t&&!(0,i.isSetString)(t.title)||`description`in t&&!(0,i.isSetString)(t.description)||`$schema`in t&&!(0,i.isSetString)(t.$schema)||`tags`in t&&!l(t.tags)||`args`in t&&(!Array.isArray(t.args)||!t.args.every(e=>pe(e)))||`returns`in t&&!m(t.returns))}function J(e){return q(e)&&!K(e)}function Ee(e){if(!(0,i.isSetObject)(e))return!1;let t=e;return!(`$schema`in t&&!q(t.$schema)||`$resolve`in t&&!(0,i.isFunction)(t.$resolve))}function De(e){if(!Ee(e)||K(e))return!1;let t=e;return!(`$schema`in t&&t.$schema!==void 0&&!J(t.$schema))}function Y(e){return(0,i.isSetObject)(e)&&`schema`in e&&K(e.schema)&&`variant`in e&&(0,i.isSetString)(e.variant)&&`hash`in e&&(0,i.isSetString)(e.hash)}function Oe(e){return Y(e)}function ke(e){return Y(e)&&`source`in e&&(0,i.isSetObject)(e.source)&&`schema`in e.source&&`variant`in e.source&&(0,i.isSetString)(e.source.variant)}function Ae(e){return Y(e)&&L(e.schema)}function X(e){let t=Y(e)?e.schema:e;if(!K(t))throw TypeError(`The provided input is not a valid JSON Schema`);return t}function Z(e){let t=X(e);if(!L(t))throw TypeError(`The provided input is not a valid JSON Schema object`);return t}function je(e){let t=Z(e);return(0,i.isSetObject)(t.properties)?Object.entries(t.properties).reduce((e,[n,r])=>(r.name=n,r.required=!$(t,n),r.default=t.default?.[n]??r.default,e[n]=r,e),{}):{}}function Me(e){return Object.values(je(e))}function Ne(e,t){let n=Z(e);if(!(0,i.isSetObject)(n.properties))throw TypeError(`The provided schema does not have any properties`);let r=n.properties[t];if(!r)throw TypeError(`The provided schema does not have a property named "${t}"`);return{...r,name:t,required:!$(n,t),default:n.default?.[t]??r?.default}}function Pe(e,t,n){let r=Z(e);r.properties??={},r.required??=[],n.name=t,r.properties[t]=n,r.required.includes(t)||r.required.push(t),r.required.length===0&&delete r.required}function Q(e,n){let r={...e};for(let[e,a]of Object.entries(n)){let n=r[e];if(e===`required`)r[e]=(0,ee.getUnique)([...Array.isArray(n)?n:[],...Array.isArray(a)?a:[]]);else if(t.o.has(e)&&(0,i.isSetObject)(n)&&(0,i.isSetObject)(a)){let t={...n};for(let[e,n]of Object.entries(a)){let r=t[e];t[e]=K(r)&&K(n)?Q(r,n):n}r[e]=t}else t.a.has(e)&&Array.isArray(n)&&Array.isArray(a)?r[e]=[...n,...a]:t.s.has(e)&&K(n)&&K(a)?r[e]=Q(n,a):r[e]=a}return r}function Fe(...e){let t=e.map(e=>X(e));return t.length===0?{}:t.reduce((e,t)=>{let n=e.type,r=t.type;return n&&r&&n!==r?t:Q(e,t)})}function Ie(e,n){return(0,a.default)(e,Object.fromEntries(t.t.filter(e=>n[e]!==void 0).map(e=>[e,n[e]])))}function Le(e){return(0,i.isSetObject)(e)?e.nullable===!0||o(e).includes(`null`):!1}function $(e,t){if(!e.properties?.[t])throw Error(`The property "${t}" does not exist in the parent schema.`);return!(e.required??[]).includes(t)}function Re(e){return ne.VALID_OBJECT_SOURCE_EXTENSIONS.includes((0,te.findFileExtensionSafe)(e))}function ze(e,t){let n=[];function r(e){let i=t(e);if(i!==void 0&&n.push(i),L(e))for(let t of Object.values(e.properties??{}))r(t);for(let t of[`allOf`,`anyOf`,`oneOf`,`not`,`if`,`then`,`else`,`$ref`,`items`,`additionalProperties`,`unevaluatedProperties`,`propertyNames`,`unevaluatedItems`,`contains`]){let n=e[t];if(Array.isArray(n))for(let e of n)K(e)&&r(e);else K(n)&&r(n)}}return r(e),n}Object.defineProperty(exports,"$",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"Q",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"Z",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"et",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,"it",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"nt",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"rt",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"tt",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return R}});
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers-Km2QO1Vz.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"storage-CwlNwPrn.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-D3JK-Pzs.d.mts","names":[],"sources":["../src/constants.ts","../src/types.ts"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-Df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