@power-plant/schema 0.0.23 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codegen.d.cts +1 -1
- package/dist/codegen.d.mts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{types-D3JK-Pzs.d.mts → types-BMC57p-g.d.mts} +6 -11
- package/dist/types-BMC57p-g.d.mts.map +1 -0
- package/dist/{types-Dfjg_dR7.d.cts → types-BhEdUeyR.d.cts} +6 -11
- package/dist/types-BhEdUeyR.d.cts.map +1 -0
- package/dist/valibot.d.cts +1 -1
- package/dist/valibot.d.mts +1 -1
- package/dist/zod.d.cts +1 -1
- package/dist/zod.d.mts +1 -1
- package/package.json +4 -4
- package/dist/types-D3JK-Pzs.d.mts.map +0 -1
- package/dist/types-Dfjg_dR7.d.cts.map +0 -1
package/dist/codegen.d.cts
CHANGED
package/dist/codegen.d.mts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -8,4 +8,4 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
|
|
|
8
8
|
`&&++this.pos;case`
|
|
9
9
|
`:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,`Unterminated template`)},Y.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
|
10
10
|
`;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return j(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!==`0`||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return O(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},Y.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},Y.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(b(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?y:b)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=j(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},Y.readWord=function(){var e=this.readWord1(),t=E.name;return this.keywords.test(e)&&(t=et[e]),this.finishToken(t,e)},I.acorn={Parser:I,version:`8.17.0`,defaultOptions:mt,Position:dt,SourceLocation:ft,getLineInfo:pt,Node:Yt,TokenType:x,tokTypes:E,keywordTypes:et,TokContext:V,tokContexts:H,isIdentifierChar:b,isIdentifierStart:y,Token:Rn,isNewLine:O,lineBreak:D,lineBreakG:tt,nonASCIIwhitespace:rt},String.fromCharCode;const Hn=/\/$|\/\?|\/#/,Un=/^\.?\//;function Wn(e=``,t){return t?Hn.test(e):e.endsWith(`/`)}function Gn(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(Wn(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function Kn(e){return e&&e!==`/`}function qn(e,...t){let n=e||``;for(let e of t.filter(e=>Kn(e)))if(n){let t=e.replace(Un,``);n=Gn(n)+t}else n=e;return n}const Jn=new Set(te.builtinModules);function Yn(e){return e.replace(/\\/g,`/`)}const Xn={}.hasOwnProperty,Zn=/^([A-Z][a-z\d]*)+$/,Qn=new Set([`string`,`function`,`number`,`object`,`Function`,`Object`,`boolean`,`bigint`,`symbol`]),X={};function $n(e,t=`and`){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(`, `)}, ${t} ${e[e.length-1]}`}const er=new Map;let tr;X.ERR_INVALID_ARG_TYPE=Z(`ERR_INVALID_ARG_TYPE`,(e,t,n)=>{h.default.ok(typeof e==`string`,`'name' must be a string`),Array.isArray(t)||(t=[t]);let r=`The `;if(e.endsWith(` argument`))r+=`${e} `;else{let t=e.includes(`.`)?`property`:`argument`;r+=`"${e}" ${t} `}r+=`must be `;let i=[],a=[],o=[];for(let e of t)h.default.ok(typeof e==`string`,`All expected entries have to be of type string`),Qn.has(e)?i.push(e.toLowerCase()):Zn.exec(e)===null?(h.default.ok(e!==`object`,`The value "object" should be written as "Object"`),o.push(e)):a.push(e);if(a.length>0){let e=i.indexOf(`object`);e!==-1&&(i.slice(e,1),a.push(`Object`))}return i.length>0&&(r+=`${i.length>1?`one of type`:`of type`} ${$n(i,`or`)}`,(a.length>0||o.length>0)&&(r+=` or `)),a.length>0&&(r+=`an instance of ${$n(a,`or`)}`,o.length>0&&(r+=` or `)),o.length>0&&(o.length>1?r+=`one of ${$n(o,`or`)}`:(o[0].toLowerCase()!==o[0]&&(r+=`an `),r+=`${o[0]}`)),r+=`. Received ${sr(n)}`,r},TypeError),X.ERR_INVALID_MODULE_SPECIFIER=Z(`ERR_INVALID_MODULE_SPECIFIER`,(e,t,n=void 0)=>`Invalid module "${e}" ${t}${n?` imported from ${n}`:``}`,TypeError),X.ERR_INVALID_PACKAGE_CONFIG=Z(`ERR_INVALID_PACKAGE_CONFIG`,(e,t,n)=>`Invalid package config ${e}${t?` while importing ${t}`:``}${n?`. ${n}`:``}`,Error),X.ERR_INVALID_PACKAGE_TARGET=Z(`ERR_INVALID_PACKAGE_TARGET`,(e,t,n,r=!1,i=void 0)=>{let a=typeof n==`string`&&!r&&n.length>0&&!n.startsWith(`./`);return t===`.`?(h.default.ok(r===!1),`Invalid "exports" main target ${JSON.stringify(n)} defined in the package config ${e}package.json${i?` imported from ${i}`:``}${a?`; targets must start with "./"`:``}`):`Invalid "${r?`imports`:`exports`}" target ${JSON.stringify(n)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:``}${a?`; targets must start with "./"`:``}`},Error),X.ERR_MODULE_NOT_FOUND=Z(`ERR_MODULE_NOT_FOUND`,(e,t,n=!1)=>`Cannot find ${n?`module`:`package`} '${e}' imported from ${t}`,Error),X.ERR_NETWORK_IMPORT_DISALLOWED=Z(`ERR_NETWORK_IMPORT_DISALLOWED`,`import of '%s' by %s is not supported: %s`,Error),X.ERR_PACKAGE_IMPORT_NOT_DEFINED=Z(`ERR_PACKAGE_IMPORT_NOT_DEFINED`,(e,t,n)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:``} imported from ${n}`,TypeError),X.ERR_PACKAGE_PATH_NOT_EXPORTED=Z(`ERR_PACKAGE_PATH_NOT_EXPORTED`,(e,t,n=void 0)=>t===`.`?`No "exports" main defined in ${e}package.json${n?` imported from ${n}`:``}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${n?` imported from ${n}`:``}`,Error),X.ERR_UNSUPPORTED_DIR_IMPORT=Z(`ERR_UNSUPPORTED_DIR_IMPORT`,`Directory import '%s' is not supported resolving ES modules imported from %s`,Error),X.ERR_UNSUPPORTED_RESOLVE_REQUEST=Z(`ERR_UNSUPPORTED_RESOLVE_REQUEST`,`Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.`,TypeError),X.ERR_UNKNOWN_FILE_EXTENSION=Z(`ERR_UNKNOWN_FILE_EXTENSION`,(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError),X.ERR_INVALID_ARG_VALUE=Z(`ERR_INVALID_ARG_VALUE`,(e,t,n=`is invalid`)=>{let r=(0,re.inspect)(t);return r.length>128&&(r=`${r.slice(0,128)}...`),`The ${e.includes(`.`)?`property`:`argument`} '${e}' ${n}. Received ${r}`},TypeError);function Z(e,t,n){return er.set(e,t),nr(n,e)}function nr(e,t){return n;function n(...n){let r=Error.stackTraceLimit;rr()&&(Error.stackTraceLimit=0);let i=new e;rr()&&(Error.stackTraceLimit=r);let a=or(t,n,i);return Object.defineProperties(i,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),ar(i),i.code=t,i}}function rr(){try{if(ne.default.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Xn.call(e,`writable`)&&e.writable!==void 0?e.writable:e.set!==void 0}function ir(e){let t=`__node_internal_`+e.name;return Object.defineProperty(e,"name",{value:t}),e}const ar=ir(function(e){let t=rr();return t&&(tr=Error.stackTraceLimit,Error.stackTraceLimit=1/0),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=tr),e});function or(e,t,n){let r=er.get(e);if(h.default.ok(r!==void 0,"expected `message` to be found"),typeof r==`function`)return h.default.ok(r.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${r.length}).`),Reflect.apply(r,n,t);let i=/%[dfijoOs]/g,a=0;for(;i.exec(r)!==null;)a++;return h.default.ok(a===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${a}).`),t.length===0?r:(t.unshift(r),Reflect.apply(re.format,null,t))}function sr(e){if(e==null)return String(e);if(typeof e==`function`&&e.name)return`function ${e.name}`;if(typeof e==`object`)return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${(0,re.inspect)(e,{depth:-1})}`;let t=(0,re.inspect)(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}const cr={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:lr}=X,ur=new Map;function dr(e,{base:t,specifier:n}){let r=ur.get(e);if(r)return r;let i;try{i=c.default.readFileSync(p.default.toNamespacedPath(e),`utf8`)}catch(e){let t=e;if(t.code!==`ENOENT`)throw t}let a={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:`none`,exports:void 0,imports:void 0};if(i!==void 0){let r;try{r=JSON.parse(i)}catch(r){let i=r,a=new lr(e,(t?`"${n}" from `:``)+(0,m.fileURLToPath)(t||n),i.message);throw a.cause=i,a}a.exists=!0,cr.call(r,`name`)&&typeof r.name==`string`&&(a.name=r.name),cr.call(r,`main`)&&typeof r.main==`string`&&(a.main=r.main),cr.call(r,`exports`)&&(a.exports=r.exports),cr.call(r,`imports`)&&(a.imports=r.imports),cr.call(r,`type`)&&(r.type===`commonjs`||r.type===`module`)&&(a.type=r.type)}return ur.set(e,a),a}function fr(e){let t=new URL(`package.json`,e);for(;!t.pathname.endsWith(`node_modules/package.json`);){let n=dr((0,m.fileURLToPath)(t),{specifier:e});if(n.exists)return n;let r=t;if(t=new URL(`../package.json`,t),t.pathname===r.pathname)break}return{pjsonPath:(0,m.fileURLToPath)(t),exists:!1,type:`none`}}function pr(e){return fr(e).type}const{ERR_UNKNOWN_FILE_EXTENSION:mr}=X,hr={}.hasOwnProperty,gr={__proto__:null,".cjs":`commonjs`,".js":`module`,".json":`json`,".mjs":`module`};function _r(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?`module`:e===`application/json`?`json`:null}const vr={__proto__:null,"data:":yr,"file:":xr,"http:":Sr,"https:":Sr,"node:"(){return`builtin`}};function yr(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return _r(t)}function br(e){let t=e.pathname,n=t.length;for(;n--;){let e=t.codePointAt(n);if(e===47)return``;if(e===46)return t.codePointAt(n-1)===47?``:t.slice(n)}return``}function xr(e,t,n){let r=br(e);if(r===`.js`){let t=pr(e);return t===`none`?`commonjs`:t}if(r===``){let t=pr(e);return t===`none`||t===`commonjs`?`commonjs`:`module`}let i=gr[r];if(i)return i;if(n)return;let a=(0,m.fileURLToPath)(e);throw new mr(r,a)}function Sr(){}function Cr(e,t){let n=e.protocol;return hr.call(vr,n)&&vr[n](e,t,!0)||null}const wr=Object.freeze([`node`,`import`]),Tr=new Set(wr);function Er(){return Tr}function Dr(e){return Er()}const Or=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:kr,ERR_INVALID_PACKAGE_CONFIG:Ar,ERR_INVALID_PACKAGE_TARGET:jr,ERR_MODULE_NOT_FOUND:Mr,ERR_PACKAGE_IMPORT_NOT_DEFINED:Nr,ERR_PACKAGE_PATH_NOT_EXPORTED:Pr,ERR_UNSUPPORTED_DIR_IMPORT:Fr,ERR_UNSUPPORTED_RESOLVE_REQUEST:Ir}=X,Lr={}.hasOwnProperty,Rr=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,zr=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,Br=/^\.|%|\\/,Vr=/\*/g,Hr=/%2f|%5c/i,Ur=new Set,Wr=/[/\\]{2}/;function Gr(e,t,n,r,i,a,o){if(g.default.noDeprecation)return;let s=(0,m.fileURLToPath)(r),c=Wr.exec(o?e:t)!==null;g.default.emitWarning(`Use of deprecated ${c?`double slash`:`leading or trailing slash matching`} resolving "${e}" for module request "${t}" ${t===n?``:`matched to "${n}" `}in the "${i?`imports`:`exports`}" field module resolution of the package at ${s}${a?` imported from ${(0,m.fileURLToPath)(a)}`:``}.`,`DeprecationWarning`,`DEP0166`)}function Kr(e,t,n,r){if(g.default.noDeprecation||Cr(e,{parentURL:n.href})!==`module`)return;let i=(0,m.fileURLToPath)(e.href),a=(0,m.fileURLToPath)(new URL(`.`,t)),o=(0,m.fileURLToPath)(n);r?p.default.resolve(a,r)!==i&&g.default.emitWarning(`Package ${a} has a "main" field set to "${r}", excluding the full filename and extension to the resolved file at "${i.slice(a.length)}", imported from ${o}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`,`DeprecationWarning`,`DEP0151`):g.default.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${i.slice(a.length)}", imported from ${o}.\nDefault "index" lookups for the main are deprecated for ES modules.`,`DeprecationWarning`,`DEP0151`)}function qr(e){try{return(0,c.statSync)(e)}catch{}}function Jr(e){let t=(0,c.statSync)(e,{throwIfNoEntry:!1});return(t?t.isFile():void 0)??!1}function Yr(e,t,n){let r;if(t.main!==void 0){if(r=new URL(t.main,e),Jr(r))return r;let i=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],a=-1;for(;++a<i.length&&(r=new URL(i[a],e),!Jr(r));)r=void 0;if(r)return Kr(r,e,n,t.main),r}let i=[`./index.js`,`./index.json`,`./index.node`],a=-1;for(;++a<i.length&&(r=new URL(i[a],e),!Jr(r));)r=void 0;if(r)return Kr(r,e,n,t.main),r;throw new Mr((0,m.fileURLToPath)(new URL(`.`,e)),(0,m.fileURLToPath)(n))}function Xr(e,t,n){if(Hr.exec(e.pathname)!==null)throw new kr(e.pathname,`must not include encoded "/" or "\\" characters`,(0,m.fileURLToPath)(t));let r;try{r=(0,m.fileURLToPath)(e)}catch(n){let r=n;throw Object.defineProperty(r,"input",{value:String(e)}),Object.defineProperty(r,"module",{value:String(t)}),r}let i=qr(r.endsWith(`/`)?r.slice(-1):r);if(i&&i.isDirectory()){let n=new Fr(r,(0,m.fileURLToPath)(t));throw n.url=String(e),n}if(!i||!i.isFile()){let n=new Mr(r||e.pathname,t&&(0,m.fileURLToPath)(t),!0);throw n.url=String(e),n}{let t=(0,c.realpathSync)(r),{search:n,hash:i}=e;e=(0,m.pathToFileURL)(t+(r.endsWith(p.default.sep)?`/`:``)),e.search=n,e.hash=i}return e}function Zr(e,t,n){return new Nr(e,t&&(0,m.fileURLToPath)(new URL(`.`,t)),(0,m.fileURLToPath)(n))}function Qr(e,t,n){return new Pr((0,m.fileURLToPath)(new URL(`.`,t)),e,n&&(0,m.fileURLToPath)(n))}function $r(e,t,n,r,i){let a=`request is not a valid match in pattern "${t}" for the "${r?`imports`:`exports`}" resolution of ${(0,m.fileURLToPath)(n)}`;throw new kr(e,a,i&&(0,m.fileURLToPath)(i))}function ei(e,t,n,r,i){return t=typeof t==`object`&&t?JSON.stringify(t,null,``):`${t}`,new jr((0,m.fileURLToPath)(new URL(`.`,n)),e,t,r,i&&(0,m.fileURLToPath)(i))}function ti(e,t,n,r,i,a,o,s,c){if(t!==``&&!a&&e[e.length-1]!==`/`)throw ei(n,e,r,o,i);if(!e.startsWith(`./`)){if(o&&!e.startsWith(`../`)&&!e.startsWith(`/`)){let n=!1;try{new URL(e),n=!0}catch{}if(!n)return ui(a?Or.call(Vr,e,()=>t):e+t,r,c)}throw ei(n,e,r,o,i)}if(Rr.exec(e.slice(2))!==null)if(zr.exec(e.slice(2))===null){if(!s){let s=a?n.replace(`*`,()=>t):n+t;Gr(a?Or.call(Vr,e,()=>t):e,s,n,r,o,i,!0)}}else throw ei(n,e,r,o,i);let l=new URL(e,r),u=l.pathname,d=new URL(`.`,r).pathname;if(!u.startsWith(d))throw ei(n,e,r,o,i);if(t===``)return l;if(Rr.exec(t)!==null){let c=a?n.replace(`*`,()=>t):n+t;zr.exec(t)===null?s||Gr(a?Or.call(Vr,e,()=>t):e,c,n,r,o,i,!1):$r(c,n,r,o,i)}return a?new URL(Or.call(Vr,l.href,()=>t)):new URL(t,l)}function ni(e){let t=Number(e);return`${t}`===e&&t>=0&&t<4294967295}function ri(e,t,n,r,i,a,o,s,c){if(typeof t==`string`)return ti(t,n,r,e,i,a,o,s,c);if(Array.isArray(t)){let l=t;if(l.length===0)return null;let u,d=-1;for(;++d<l.length;){let t=l[d],f;try{f=ri(e,t,n,r,i,a,o,s,c)}catch(e){let t=e;if(u=t,t.code===`ERR_INVALID_PACKAGE_TARGET`)continue;throw e}if(f!==void 0){if(f===null){u=null;continue}return f}}if(u==null)return null;throw u}if(typeof t==`object`&&t){let l=Object.getOwnPropertyNames(t),u=-1;for(;++u<l.length;){let t=l[u];if(ni(t))throw new Ar((0,m.fileURLToPath)(e),i,`"exports" cannot contain numeric property keys.`)}for(u=-1;++u<l.length;){let d=l[u];if(d==="default"||c&&c.has(d)){let l=t[d],u=ri(e,l,n,r,i,a,o,s,c);if(u===void 0)continue;return u}}return null}if(t===null)return null;throw ei(r,t,e,o,i)}function ii(e,t,n){if(typeof e==`string`||Array.isArray(e))return!0;if(typeof e!=`object`||!e)return!1;let r=Object.getOwnPropertyNames(e),i=!1,a=0,o=-1;for(;++o<r.length;){let e=r[o],s=e===``||e[0]!==`.`;if(a++===0)i=s;else if(i!==s)throw new Ar((0,m.fileURLToPath)(t),n,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return i}function ai(e,t,n){if(g.default.noDeprecation)return;let r=(0,m.fileURLToPath)(t);Ur.has(r+`|`+e)||(Ur.add(r+`|`+e),g.default.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${r}${n?` imported from ${(0,m.fileURLToPath)(n)}`:``}. Mapping specifiers ending in "/" is no longer supported.`,`DeprecationWarning`,`DEP0155`))}function oi(e,t,n,r,i){let a=n.exports;if(ii(a,e,r)&&(a={".":a}),Lr.call(a,t)&&!t.includes(`*`)&&!t.endsWith(`/`)){let n=a[t],o=ri(e,n,``,t,r,!1,!1,!1,i);if(o==null)throw Qr(t,e,r);return o}let o=``,s=``,c=Object.getOwnPropertyNames(a),l=-1;for(;++l<c.length;){let n=c[l],i=n.indexOf(`*`);if(i!==-1&&t.startsWith(n.slice(0,i))){t.endsWith(`/`)&&ai(t,e,r);let a=n.slice(i+1);t.length>=n.length&&t.endsWith(a)&&si(o,n)===1&&n.lastIndexOf(`*`)===i&&(o=n,s=t.slice(i,t.length-a.length))}}if(o){let n=a[o],c=ri(e,n,s,o,r,!0,!1,t.endsWith(`/`),i);if(c==null)throw Qr(t,e,r);return c}throw Qr(t,e,r)}function si(e,t){let n=e.indexOf(`*`),r=t.indexOf(`*`),i=n===-1?e.length:n+1,a=r===-1?t.length:r+1;return i>a?-1:a>i||n===-1?1:r===-1||e.length>t.length?-1:+(t.length>e.length)}function ci(e,t,n){if(e===`#`||e.startsWith(`#/`)||e.endsWith(`/`))throw new kr(e,`is not a valid internal imports specifier name`,(0,m.fileURLToPath)(t));let r,i=fr(t);if(i.exists){r=(0,m.pathToFileURL)(i.pjsonPath);let a=i.imports;if(a)if(Lr.call(a,e)&&!e.includes(`*`)){let i=ri(r,a[e],``,e,t,!1,!0,!1,n);if(i!=null)return i}else{let i=``,o=``,s=Object.getOwnPropertyNames(a),c=-1;for(;++c<s.length;){let t=s[c],n=t.indexOf(`*`);if(n!==-1&&e.startsWith(t.slice(0,-1))){let r=t.slice(n+1);e.length>=t.length&&e.endsWith(r)&&si(i,t)===1&&t.lastIndexOf(`*`)===n&&(i=t,o=e.slice(n,e.length-r.length))}}if(i){let e=a[i],s=ri(r,e,o,i,t,!0,!0,!1,n);if(s!=null)return s}}}throw Zr(e,r,t)}function li(e,t){let n=e.indexOf(`/`),r=!0,i=!1;e[0]===`@`&&(i=!0,n===-1||e.length===0?r=!1:n=e.indexOf(`/`,n+1));let a=n===-1?e:e.slice(0,n);if(Br.exec(a)!==null&&(r=!1),!r)throw new kr(e,`is not a valid package name`,(0,m.fileURLToPath)(t));return{packageName:a,packageSubpath:`.`+(n===-1?``:e.slice(n)),isScoped:i}}function ui(e,t,n){if(te.builtinModules.includes(e))return new URL(`node:`+e);let{packageName:r,packageSubpath:i,isScoped:a}=li(e,t),o=fr(t);if(o.exists){let e=(0,m.pathToFileURL)(o.pjsonPath);if(o.name===r&&o.exports!==void 0&&o.exports!==null)return oi(e,i,o,t,n)}let s=new URL(`./node_modules/`+r+`/package.json`,t),c=(0,m.fileURLToPath)(s),l;do{let o=qr(c.slice(0,-13));if(!o||!o.isDirectory()){l=c,s=new URL((a?`../../../../node_modules/`:`../../../node_modules/`)+r+`/package.json`,s),c=(0,m.fileURLToPath)(s);continue}let u=dr(c,{base:t,specifier:e});return u.exports!==void 0&&u.exports!==null?oi(s,i,u,t,n):i===`.`?Yr(s,u,t):new URL(i,s)}while(c.length!==l.length);throw new Mr(r,(0,m.fileURLToPath)(t),!1)}function di(e){return!(e[0]!==`.`||e.length!==1&&e[1]!==`/`&&(e[1]!==`.`||e.length!==2&&e[2]!==`/`))}function fi(e){return e===``?!1:e[0]===`/`||di(e)}function pi(e,t,n,r){n===void 0&&(n=Dr());let i=t.protocol,a=i===`data:`||i===`http:`||i===`https:`,o;if(fi(e))try{o=new URL(e,t)}catch(n){let r=new Ir(e,t);throw r.cause=n,r}else if(i===`file:`&&e[0]===`#`)o=ci(e,t,n);else try{o=new URL(e)}catch(r){if(a&&!te.builtinModules.includes(e)){let n=new Ir(e,t);throw n.cause=r,n}o=ui(e,t,n)}return h.default.ok(o!==void 0,`expected to be defined`),o.protocol===`file:`?Xr(o,t):o}function mi(e){return typeof e==`string`&&!e.startsWith(`file://`)?Yn(e):Yn((0,m.fileURLToPath)(e))}function hi(e){return(0,m.pathToFileURL)(mi(e)).toString()}function gi(e){return typeof e!=`string`&&(e=e.toString()),/(?:node|data|http|https|file):/.test(e)?e:Jn.has(e)?`node:`+e:`file://`+encodeURI(Yn(e))}const _i=new Set([`node`,`import`]),vi=[`.mjs`,`.cjs`,`.js`,`.json`],yi=new Set([`ERR_MODULE_NOT_FOUND`,`ERR_UNSUPPORTED_DIR_IMPORT`,`MODULE_NOT_FOUND`,`ERR_PACKAGE_PATH_NOT_EXPORTED`]);function bi(e,t,n){try{return pi(e,t,n)}catch(e){if(!yi.has(e?.code))throw e}}function xi(e,t={}){if(typeof e!=`string`)if(e instanceof URL)e=mi(e);else throw TypeError("input must be a `string` or `URL`");if(/(?:node|data|http|https):/.test(e))return e;if(Jn.has(e))return`node:`+e;if(e.startsWith(`file://`)&&(e=mi(e)),He(e))try{if((0,c.statSync)(e).isFile())return hi(e)}catch(e){if(e?.code!==`ENOENT`)throw e}let n=t.conditions?new Set(t.conditions):_i,r=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(e=>new URL(gi(e.toString())));r.length===0&&r.push(new URL(hi(process.cwd())));let i=[...r];for(let e of r)e.protocol===`file:`&&i.push(new URL(`./`,e),new URL(qn(e.pathname,`_index.js`),e),new URL(`node_modules`,e));let a;for(let r of i){if(a=bi(e,r,n),a)break;for(let i of[``,`/index`]){for(let o of t.extensions||vi)if(a=bi(qn(e,i)+o,r,n),a)break;if(a)break}if(a)break}if(!a){let t=Error(`Cannot find module ${e} imported from ${i.join(`, `)}`);throw t.code=`ERR_MODULE_NOT_FOUND`,t}return hi(a)}function Si(e,t){return xi(e,t)}function Ci(e,t){return mi(Si(e,t))}function wi(e,t){try{return Promise.resolve(Ci(e,t))}catch(e){return Promise.reject(e)}}const Ti=`.all-contributorsrc,.commitlintrc,.github,.git,.husky,.huskyrc,.lintstagedrc,.log4brains.yml,.npmrc,.nx,.storm-workspace.js,.storm-workspace.json,.storm-workspace.ts,.storm-workspace.yaml,.storm-workspace.yml,.vscode,.whitesource,bun.lock,bun.lockb,lefthook.yaml,lefthook.yml,lerna.json,npm-lock.json,npm-lock.yaml,npm-lock.yml,npm-workspace.json,npm-workspace.yaml,npm-workspace.yml,nx.json,package-lock.json,patches,pnpm-lock.json,pnpm-lock.yaml,pnpm-lock.yml,pnpm-workspace.json,pnpm-workspace.yaml,pnpm-workspace.yml,socket.yaml,storm-workspace.js,storm-workspace.json,storm-workspace.ts,storm-workspace.yaml,storm-workspace.yml,syncpack.config.js,syncpack.json,turbo.json,yarn-lock.json,yarn-lock.yaml,yarn-lock.yml,yarn-workspace.json,yarn-workspace.yaml,yarn-workspace.yml,yarn.lock`.split(`,`);function Ei(e=(0,f.cwd)()){if(process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH)return process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH;let t=Be(e);if(t)return t;let n=Ee(Ti,e);if(n)return n;for(n=e;n&&!(0,ie.isSystemRoot)(n);)if(n=Ee(`storm-workspace.json`,n,{skipCwd:!0,includeNameInResults:!1}),n)return n;return e}const Di=[`js`,`jsx`,`mjs`,`cjs`,`ts`,`tsx`,`mts`,`cts`,`json`,`jsonc`,`json5`,`node`];function Oi(e=[]){let t=e;t.includes((0,f.cwd)())||t.push((0,f.cwd)());let n=Ei();return t.includes(n)||t.push(n),t=(0,ae.getUnique)(t.filter(Boolean).map(e=>(0,_.correctPath)(e)).reduce((e,t,r,i)=>(e.push(t),(0,oe.isAbsolutePath)(t)||(e.push((0,_.toAbsolutePath)(t,(0,f.cwd)())),e.push((0,_.toAbsolutePath)(t,n)),i.forEach(n=>{e.push((0,_.toAbsolutePath)(t,n))})),e),[])),t}function ki(e=[]){return(0,ae.getUnique)(e.reduce((e,t)=>((0,ee.findFolderName)(t)===`node_modules`&&e.push((0,_.correctPath)(t)),we((0,l.joinPaths)(t,`node_modules`))&&e.push((0,_.correctPath)((0,l.joinPaths)(t,`node_modules`))),e),[]))}async function Ai(e,t={}){let n=Oi(t.paths);(0,oe.isNpmScopedPackage)(e)?n=ki(n):n.push(...ki(n));let r,i;try{r=await wi(e,{url:n,extensions:t.extensions??Di,conditions:t.conditions,fs:t.fs?{statSync:t.fs.statSync,realpathSync:t.fs.realpathSync,readFileSync:t.fs.readFileSync,stat:t.fs.promises?.stat,realpath:t.fs.promises?.realpath,readFile:t.fs.promises?.readFile}:void 0})}catch(e){i=e}if(!r)throw Error(`Unable to resolve module "${e}". The following import paths were tried: \n${n.join(`
|
|
11
|
-
`)}`,{cause:i});return(0,_.correctPath)(r)}async function ji(e,t={}){try{return await Ai(e,t)}catch{return}}const Mi=`https://power-plant.invalid/`;function Ni(e){return!(!(0,i.isSetObject)(e)||!(`schema`in e)||`hash`in e||`variant`in e||`source`in e)}function Pi(e){return Ni(e)?e.schema:e}function Fi(e){return e.endsWith(`#`)?e.slice(0,-1):e}function Ii(e){let t=e.indexOf(`#`);return t>=0?e.slice(0,t):e}function Li(e){return e.replaceAll(`~`,`~0`).replaceAll(`/`,`~1`)}function Ri(e){return e.length===0?``:`/${e.map(e=>Li(e)).join(`/`)}`}function zi(e,t){try{return Fi(new URL(e,t).toString())}catch{return Fi(e)}}function Bi(e,t,n,r,a){if(!(0,i.isSetObject)(e))return;let s=e,c=Ri(t),l=(0,o.isSetString)(s.$id)?zi(s.$id,n):n,u=Ii(l);if(r.set(l,c),r.set(u,c),(0,o.isSetString)(s.$anchor)&&r.set(`${u}#${s.$anchor}`,c),(0,o.isSetString)(s.$dynamicAnchor)){let e=`${u}#${s.$dynamicAnchor}`;r.set(e,c),a.set(e,`#${s.$dynamicAnchor}`)}for(let[e,n]of Object.entries(s)){if(Array.isArray(n)){n.forEach((n,i)=>{Bi(n,[...t,e,String(i)],l,r,a)});continue}Bi(n,[...t,e],l,r,a)}}function Vi(e,t,n,r,a){if(!(0,i.isSetObject)(e))return;let s=e,c=(0,o.isSetString)(s.$id)?zi(s.$id,n):n;if((0,o.isSetString)(s.$ref)){let e=zi(s.$ref,c),t=r.get(e)??r.get(Ii(e));t!==void 0&&(s.$ref=t.length>0?`#${t}`:`#`)}if((0,o.isSetString)(s.$dynamicRef)){let e=zi(s.$dynamicRef,c),t=a.get(e);if(t)s.$dynamicRef=t;else{let t=r.get(e)??r.get(Ii(e));t!==void 0&&(s.$dynamicRef=t.length>0?`#${t}`:`#`)}}for(let[e,n]of Object.entries(s)){if(Array.isArray(n)){n.forEach((n,i)=>{Vi(n,[...t,e,String(i)],c,r,a)});continue}Vi(n,[...t,e],c,r,a)}}function Hi(e){if(!(0,i.isSetObject)(e))return e;let t=(0,se.deepClone)(e),n=(0,o.isSetString)(t.$id)?zi(t.$id,Mi):Mi,r=new Map,a=new Map;return Bi(t,[],n,r,a),Vi(t,[],n,r,a),t}function Ui(e){if(n.$(e))return Q(e);if((0,i.isSetObject)(e)){if(n.Z(e))return Ki(e);let t=e;if(`$schema`in t&&n.$(t.$schema))return Q(t.$schema)}return e}function Wi(e){return Array.isArray(e)?e.map(e=>Ui(e)):e}function Gi(e){return(0,me.toJsonSchema)(e,{target:`draft-2020-12`})}function Q(e){let t=e,n={};for(let[e,r]of Object.entries(t))if(e!==`tsType`&&e!==`markdownType`&&e!==`tags`&&e!==`args`&&e!==`resolve`){if(e===`id`&&(0,o.isSetString)(r)){n.$id=r;continue}if(e===`properties`||e===`patternProperties`||e===`dependentSchemas`||e===`$defs`||e===`definitions`){if(!(0,i.isSetObject)(r)){n[e]=r;continue}n[e]=Object.fromEntries(Object.entries(r).map(([e,t])=>[e,Ui(t)]));continue}if(e===`items`||e===`contains`||e===`if`||e===`then`||e===`else`||e===`not`||e===`propertyNames`||e===`additionalProperties`||e===`unevaluatedProperties`){n[e]=Ui(r);continue}if(e===`oneOf`||e===`anyOf`||e===`allOf`){n[e]=Wi(r);continue}n[e]=r}return n}function Ki(e){let t=e,r=n.$(t.$schema)?Q(t.$schema):{},a={};for(let[e,r]of Object.entries(t)){if(e.startsWith(`$`)||!(0,i.isSetObject)(r))continue;if(n.Z(r)){a[e]=Ki(r);continue}let t=r;if(`$schema`in t&&n.$(t.$schema)){a[e]=Q(t.$schema);continue}n.$(r)&&(a[e]=Q(r))}if(!n.N(r))throw Error(`Failed to convert untyped input to JSON Schema. The base schema must be a valid JSON Schema object.`);let o={...(0,i.isSetObject)(r.properties)?r.properties:{},...a};return{...r,type:r.type??`object`,...Object.keys(o).length>0?{properties:o}:{}}}function $(e,t){let r=Pi(t);if(n.Y(r)||n.K(r))return(0,v.murmurhash)({variant:e,input:r.schema});if((0,o.isSetString)(r)||typeof r==`boolean`)return(0,v.murmurhash)({variant:e,input:r});if((0,i.isSetObject)(r)){if((0,pe.isZod3Type)(r))return(0,v.murmurhash)({variant:e,input:r._def});if((0,ce.isStandardJsonSchema)(r))return(0,v.murmurhash)({variant:e,input:r[`~standard`]});if(n.m(r))return(0,v.murmurhash)({variant:e,input:r});if(n.tt(r))return(0,v.murmurhash)({variant:e,input:Gi(r)});if(n.Z(r))return(0,v.murmurhash)({variant:e,input:Ki(r)});if(n.$(r))return(0,v.murmurhash)({variant:e,input:Q(r)})}throw Error(`Failed to create an input hash for the provided schema definition input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, or a reflected Deepkit Type object.`)}function qi(e){if((0,i.isSetObject)(e)){if((0,pe.isZod3Type)(e))return(0,pe.extractJsonSchema)(e,{target:`draft-2020-12`});if(n.Q(e))return Ki(e);if(n.et(e))return Q(e);if((0,ce.isStandardJsonSchema)(e))return e[`~standard`].jsonSchema.input({target:`draft-2020-12`});if(n.tt(e))return Gi(e);if(n.m(e))return e}}function Ji(e){if((0,i.isSetObject)(e)){if((0,pe.isZod3Type)(e))return`zod3`;if(n.Q(e)||n.et(e))return`untyped`;if((0,ce.isStandardJsonSchema)(e))return`standard-schema`;if(n.m(e))return`json-schema`;if(n.tt(e))return`valibot`}throw Error(`Failed to determine the variant of the provided schema definition input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, a reflected Deepkit Type object, or an Untyped schema.`)}function Yi(e){let t=Pi(e);return n.Y(t)||n.K(t)?t.variant:(0,o.isSetString)(t)||n.p(t)?`file-reference`:Ji(t)}async function Xi(e,t){if(n.Y(e))return e.schema;let r=t??Ji(e),i;if((r===`zod3`||r===`json-schema`||r===`standard-schema`||r===`untyped`||r===`valibot`)&&(i=qi(e)),i)return Hi(i);throw Error(`Failed to extract a valid schema from the provided input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, an untyped schema, or a reflected Deepkit Type object.`)}function Zi(e,t){if(e===`zod3`)return{hash:$(e,t),variant:`zod3`,schema:t};if(e===`untyped`)return{hash:$(e,t),variant:`untyped`,schema:t};if(e===`standard-schema`)return{hash:$(e,t),variant:`standard-schema`,schema:t};if(e===`json-schema`)return{hash:$(e,t),variant:`json-schema`,schema:t};if(e===`valibot`)return{hash:$(e,t),variant:`valibot`,schema:t};throw Error(`Failed to extract source information from the provided input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, an untyped schema, or a reflected Deepkit Type object.`)}async function Qi(e,t={}){let n=(0,s.extractFileReference)(e);if(!n)throw Error(`Failed to extract a file reference from the provided input. The input must be a string or an object with a "file" property that specifies the file path and optional export name.`);let r=n.export??`*`,i=await ji(n.file,{fs:t.fs});try{return(0,he.createGenerator)({path:i||n.file,type:r,expose:`all`,jsDoc:`extended`,...t}).createSchema(r)}catch(e){throw Error(`Failed to generate a JSON schema for "${n.file}" using the type "${r}". Error: ${e.message}`)}}async function $i(e,t={}){let i=Pi(e);if(n.Y(i))return i;if(n.K(i))return{...i,source:{hash:$(`json-schema`,i.schema),variant:`json-schema`,schema:i.schema}};let a,o=Yi(i),c=$(o,i);if(o===`file-reference`){let e=(0,s.extractFileReference)(i);if(!e)throw Error(`Failed to extract a valid file reference from the provided input "${JSON.stringify(i)}". Please ensure that the input is correctly formatted as a file reference (e.g. "./schema.ts#MySchema") and that the file exists at the specified path.`);let o=(0,le.findFileExtensionSafe)(e.file);if(o&&!ue.VALID_OBJECT_SOURCE_EXTENSIONS.includes(o))throw Error(`The provided schema file input "${e.file}" has an invalid file extension (.${o}). Please ensure that the file has one of the following extensions: ${(0,fe.list)(ue.VALID_OBJECT_SOURCE_EXTENSIONS,{conjunction:`or`})}.`);let c;t.storage&&(c=r.t(t.storage));let l=await(0,de.loadSafe)(i,{...t,fs:c});l??=await Qi(i,{...t,fs:c});let u=Pi(l);a=n.Y(u)?u.source:n.K(u)?{hash:$(`json-schema`,u.schema),variant:`json-schema`,schema:u.schema}:Zi(Ji(u),u)}else if([`json-schema`,`standard-schema`,`zod3`,`untyped`,`valibot`,`reflection`].includes(o))a=Zi(o,i);else throw Error(`Invalid schema definition input "${o}". The variant must be one of "file-reference", "json-schema", "standard-schema", "zod3", "valibot", "untyped", or "reflection".`);return{variant:o,source:a,schema:await Xi(a.schema,a.variant),hash:c}}async function ea(e,t={}){let r=Pi(e);if(n.Y(r)||n.J(r))return r;let i=await $i(e,t);if(!i?.schema)throw Error(`Failed to extract a valid schema from the provided input. The input must be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, or a reflected Deepkit Type object.`);return i}exports.JSON_SCHEMA_METADATA_KEYS=t.t,exports.JSON_SCHEMA_PRIMITIVE_TYPES=t.n,exports.JSON_SCHEMA_TYPES=t.r,exports.JsonSchemaTypeNames=t.i,exports.SCHEMA_ARRAY_CONCAT_KEYWORDS=t.a,exports.SCHEMA_RECORD_KEYWORDS=t.o,exports.SCHEMA_SINGLE_KEYWORDS=t.s,exports.addProperty=n.t,exports.applyJsonSchemaMetadata=n.nt,exports.assertSchemasDoNotContradict=Ce,exports.bundleReferences=Hi,exports.createStoragePromises=r.n,exports.extract=ea,exports.extractHash=$,exports.extractJsonSchema=qi,exports.extractResolvedVariant=Ji,exports.extractSchema=Xi,exports.extractSchemaWithSource=$i,exports.extractSource=Zi,exports.extractTSType=Qi,exports.extractVariant=Yi,exports.findSchemaContradictions=Se,exports.getJsonSchema=n.n,exports.getJsonSchemaObject=n.r,exports.getPrimarySchemaType=n.rt,exports.getProperties=n.i,exports.getPropertiesList=n.a,exports.getProperty=n.o,exports.isFileReference=n.p,exports.isJsonSchema=n.m,exports.isJsonSchemaAllOf=n.h,exports.isJsonSchemaAny=n.g,exports.isJsonSchemaAnyOf=n._,exports.isJsonSchemaArray=n.v,exports.isJsonSchemaBigint=n.y,exports.isJsonSchemaBoolean=n.b,exports.isJsonSchemaDate=n.x,exports.isJsonSchemaDecimal=n.S,exports.isJsonSchemaEnum=n.C,exports.isJsonSchemaInteger=n.w,exports.isJsonSchemaKeywords=n.T,exports.isJsonSchemaLiteral=n.E,exports.isJsonSchemaMap=n.D,exports.isJsonSchemaNativeEnum=n.O,exports.isJsonSchemaNever=n.k,exports.isJsonSchemaNull=n.A,exports.isJsonSchemaNullable=n.j,exports.isJsonSchemaNumber=n.M,exports.isJsonSchemaObject=n.N,exports.isJsonSchemaPrimitiveType=n.P,exports.isJsonSchemaPrimitiveUnion=n.F,exports.isJsonSchemaRecord=n.I,exports.isJsonSchemaRef=n.L,exports.isJsonSchemaSet=n.R,exports.isJsonSchemaString=n.z,exports.isJsonSchemaTuple=n.B,exports.isJsonSchemaType=n.V,exports.isJsonSchemaUndefined=n.H,exports.isJsonSchemaUnion=n.U,exports.isJsonSchemaUnknown=n.W,exports.isNullOnlyJsonSchema=n.G,exports.isPropertyOptional=n.s,exports.isSchema=n.K,exports.isSchemaNullable=n.c,exports.isSchemaObject=n.q,exports.isSchemaOf=n.J,exports.isSchemaWithSource=n.Y,exports.isStandardSchema=n.X,exports.isUntypedConfig=n.Z,exports.isUntypedConfigStrict=n.Q,exports.isUntypedSchema=n.$,exports.isUntypedSchemaStrict=n.et,exports.isValibotSchema=n.tt,exports.isValidSchemaConfigFile=n.l,exports.mapStorageToFileSystem=r.t,exports.merge=n.u,exports.mergeMetadata=n.d,exports.normalizeKey=r.r,exports.readSchemaTypes=n.it,exports.traverseSchema=n.f;
|
|
11
|
+
`)}`,{cause:i});return(0,_.correctPath)(r)}async function ji(e,t={}){try{return await Ai(e,t)}catch{return}}const Mi=`https://power-plant.invalid/`;function Ni(e){return!(!(0,i.isSetObject)(e)||!(`schema`in e)||`hash`in e||`variant`in e||`source`in e)}function Pi(e){return Ni(e)?e.schema:e}function Fi(e){return e.endsWith(`#`)?e.slice(0,-1):e}function Ii(e){let t=e.indexOf(`#`);return t>=0?e.slice(0,t):e}function Li(e){return e.replaceAll(`~`,`~0`).replaceAll(`/`,`~1`)}function Ri(e){return e.length===0?``:`/${e.map(e=>Li(e)).join(`/`)}`}function zi(e,t){try{return Fi(new URL(e,t).toString())}catch{return Fi(e)}}function Bi(e,t,n,r,a){if(!(0,i.isSetObject)(e))return;let s=e,c=Ri(t),l=(0,o.isSetString)(s.$id)?zi(s.$id,n):n,u=Ii(l);if(r.set(l,c),r.set(u,c),(0,o.isSetString)(s.$anchor)&&r.set(`${u}#${s.$anchor}`,c),(0,o.isSetString)(s.$dynamicAnchor)){let e=`${u}#${s.$dynamicAnchor}`;r.set(e,c),a.set(e,`#${s.$dynamicAnchor}`)}for(let[e,n]of Object.entries(s)){if(Array.isArray(n)){n.forEach((n,i)=>{Bi(n,[...t,e,String(i)],l,r,a)});continue}Bi(n,[...t,e],l,r,a)}}function Vi(e,t,n,r,a){if(!(0,i.isSetObject)(e))return;let s=e,c=(0,o.isSetString)(s.$id)?zi(s.$id,n):n;if((0,o.isSetString)(s.$ref)){let e=zi(s.$ref,c),t=r.get(e)??r.get(Ii(e));t!==void 0&&(s.$ref=t.length>0?`#${t}`:`#`)}if((0,o.isSetString)(s.$dynamicRef)){let e=zi(s.$dynamicRef,c),t=a.get(e);if(t)s.$dynamicRef=t;else{let t=r.get(e)??r.get(Ii(e));t!==void 0&&(s.$dynamicRef=t.length>0?`#${t}`:`#`)}}for(let[e,n]of Object.entries(s)){if(Array.isArray(n)){n.forEach((n,i)=>{Vi(n,[...t,e,String(i)],c,r,a)});continue}Vi(n,[...t,e],c,r,a)}}function Hi(e){if(!(0,i.isSetObject)(e))return e;let t=(0,se.deepClone)(e),n=(0,o.isSetString)(t.$id)?zi(t.$id,Mi):Mi,r=new Map,a=new Map;return Bi(t,[],n,r,a),Vi(t,[],n,r,a),t}function Ui(e){if(n.$(e))return Q(e);if((0,i.isSetObject)(e)){if(n.Z(e))return Ki(e);let t=e;if(`$schema`in t&&n.$(t.$schema))return Q(t.$schema)}return e}function Wi(e){return Array.isArray(e)?e.map(e=>Ui(e)):e}function Gi(e){return(0,me.toJsonSchema)(e,{target:`draft-2020-12`})}function Q(e){let t=e,n={};for(let[e,r]of Object.entries(t))if(e!==`tsType`&&e!==`markdownType`&&e!==`tags`&&e!==`args`&&e!==`resolve`){if(e===`id`&&(0,o.isSetString)(r)){n.$id=r;continue}if(e===`properties`||e===`patternProperties`||e===`dependentSchemas`||e===`$defs`||e===`definitions`){if(!(0,i.isSetObject)(r)){n[e]=r;continue}n[e]=Object.fromEntries(Object.entries(r).map(([e,t])=>[e,Ui(t)]));continue}if(e===`items`||e===`contains`||e===`if`||e===`then`||e===`else`||e===`not`||e===`propertyNames`||e===`additionalProperties`||e===`unevaluatedProperties`){n[e]=Ui(r);continue}if(e===`oneOf`||e===`anyOf`||e===`allOf`){n[e]=Wi(r);continue}n[e]=r}return n}function Ki(e){let t=e,r=n.$(t.$schema)?Q(t.$schema):{},a={};for(let[e,r]of Object.entries(t)){if(e.startsWith(`$`)||!(0,i.isSetObject)(r))continue;if(n.Z(r)){a[e]=Ki(r);continue}let t=r;if(`$schema`in t&&n.$(t.$schema)){a[e]=Q(t.$schema);continue}n.$(r)&&(a[e]=Q(r))}if(!n.N(r))throw Error(`Failed to convert untyped input to JSON Schema. The base schema must be a valid JSON Schema object.`);let o={...(0,i.isSetObject)(r.properties)?r.properties:{},...a};return{...r,type:r.type??`object`,...Object.keys(o).length>0?{properties:o}:{}}}function $(e,t){let r=Pi(t);if(n.Y(r)||n.K(r))return(0,v.murmurhash)({variant:e,input:r.schema});if((0,o.isSetString)(r)||typeof r==`boolean`)return(0,v.murmurhash)({variant:e,input:r});if((0,i.isSetObject)(r)){if((0,pe.isZod3Type)(r))return(0,v.murmurhash)({variant:e,input:r._def});if((0,ce.isStandardJsonSchema)(r))return(0,v.murmurhash)({variant:e,input:r[`~standard`]});if(n.m(r))return(0,v.murmurhash)({variant:e,input:r});if(n.tt(r))return(0,v.murmurhash)({variant:e,input:Gi(r)});if(n.Z(r))return(0,v.murmurhash)({variant:e,input:Ki(r)});if(n.$(r))return(0,v.murmurhash)({variant:e,input:Q(r)})}throw Error(`Failed to create an input hash for the provided schema definition input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, or a reflected Deepkit Type object.`)}function qi(e){if((0,i.isSetObject)(e)){if((0,pe.isZod3Type)(e))return(0,pe.extractJsonSchema)(e,{target:`draft-2020-12`});if(n.Q(e))return Ki(e);if(n.et(e))return Q(e);if((0,ce.isStandardJsonSchema)(e))return e[`~standard`].jsonSchema.input({target:`draft-2020-12`});if(n.tt(e))return Gi(e);if(n.m(e))return e}}function Ji(e){if((0,i.isSetObject)(e)){if((0,pe.isZod3Type)(e))return`zod3`;if(n.Q(e)||n.et(e))return`untyped`;if((0,ce.isStandardJsonSchema)(e))return`standard-schema`;if(n.m(e))return`json-schema`;if(n.tt(e))return`valibot`}throw Error(`Failed to determine the variant of the provided schema definition input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, a reflected Deepkit Type object, or an Untyped schema.`)}function Yi(e){let t=Pi(e);return n.Y(t)||n.K(t)?t.variant:(0,o.isSetString)(t)||n.p(t)?`file-reference`:Ji(t)}async function Xi(e,t){if(n.Y(e))return e.schema;let r=t??Ji(e),i;if((r===`zod3`||r===`json-schema`||r===`standard-schema`||r===`untyped`||r===`valibot`)&&(i=qi(e)),i)return Hi(i);throw Error(`Failed to extract a valid schema from the provided input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, an untyped schema, or a reflected Deepkit Type object.`)}function Zi(e,t){if(e===`zod3`)return{hash:$(e,t),variant:`zod3`,schema:t};if(e===`untyped`)return{hash:$(e,t),variant:`untyped`,schema:t};if(e===`standard-schema`)return{hash:$(e,t),variant:`standard-schema`,schema:t};if(e===`json-schema`)return{hash:$(e,t),variant:`json-schema`,schema:t};if(e===`valibot`)return{hash:$(e,t),variant:`valibot`,schema:t};throw Error(`Failed to extract source information from the provided input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, an untyped schema, or a reflected Deepkit Type object.`)}async function Qi(e,t={}){let n=(0,s.extractFileReference)(e);if(!n)throw Error(`Failed to extract a file reference from the provided input. The input must be a string or an object with a "file" property that specifies the file path and optional export name.`);let r=n.export??`*`,i=await ji(n.file,{fs:t.fs});try{return(0,he.createGenerator)({path:i||n.file,type:r,expose:`all`,jsDoc:`extended`,markdownDescription:!0,fullDescription:!0,skipTypeCheck:!0,...t}).createSchema(r)}catch(e){throw Error(`Failed to generate a JSON schema for "${n.file}"${i&&i!==n.file?` (resolved: ${i})`:``} using the type "${r}". Error: ${e.message}`)}}async function $i(e,t={}){let i=Pi(e);if(n.Y(i))return i;if(n.K(i))return{...i,source:{hash:$(`json-schema`,i.schema),variant:`json-schema`,schema:i.schema}};let a,o=Yi(i),c=$(o,i);if(o===`file-reference`){let e=(0,s.extractFileReference)(i);if(!e)throw Error(`Failed to extract a valid file reference from the provided input "${JSON.stringify(i)}". Please ensure that the input is correctly formatted as a file reference (e.g. "./schema.ts#MySchema") and that the file exists at the specified path.`);let o=(0,le.findFileExtensionSafe)(e.file);if(o&&!ue.VALID_OBJECT_SOURCE_EXTENSIONS.includes(o))throw Error(`The provided schema file input "${e.file}" has an invalid file extension (.${o}). Please ensure that the file has one of the following extensions: ${(0,fe.list)(ue.VALID_OBJECT_SOURCE_EXTENSIONS,{conjunction:`or`})}.`);let c;t.storage&&(c=r.t(t.storage));let l=await(0,de.loadSafe)(i,{...t,fs:c});l??=await Qi(i,{...t,fs:c});let u=Pi(l);a=n.Y(u)?u.source:n.K(u)?{hash:$(`json-schema`,u.schema),variant:`json-schema`,schema:u.schema}:Zi(Ji(u),u)}else if([`json-schema`,`standard-schema`,`zod3`,`untyped`,`valibot`,`reflection`].includes(o))a=Zi(o,i);else throw Error(`Invalid schema definition input "${o}". The variant must be one of "file-reference", "json-schema", "standard-schema", "zod3", "valibot", "untyped", or "reflection".`);return{variant:o,source:a,schema:await Xi(a.schema,a.variant),hash:c}}async function ea(e,t={}){let r=Pi(e);if(n.Y(r)||n.J(r))return r;let i=await $i(e,t);if(!i?.schema)throw Error(`Failed to extract a valid schema from the provided input. The input must be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, or a reflected Deepkit Type object.`);return i}exports.JSON_SCHEMA_METADATA_KEYS=t.t,exports.JSON_SCHEMA_PRIMITIVE_TYPES=t.n,exports.JSON_SCHEMA_TYPES=t.r,exports.JsonSchemaTypeNames=t.i,exports.SCHEMA_ARRAY_CONCAT_KEYWORDS=t.a,exports.SCHEMA_RECORD_KEYWORDS=t.o,exports.SCHEMA_SINGLE_KEYWORDS=t.s,exports.addProperty=n.t,exports.applyJsonSchemaMetadata=n.nt,exports.assertSchemasDoNotContradict=Ce,exports.bundleReferences=Hi,exports.createStoragePromises=r.n,exports.extract=ea,exports.extractHash=$,exports.extractJsonSchema=qi,exports.extractResolvedVariant=Ji,exports.extractSchema=Xi,exports.extractSchemaWithSource=$i,exports.extractSource=Zi,exports.extractTSType=Qi,exports.extractVariant=Yi,exports.findSchemaContradictions=Se,exports.getJsonSchema=n.n,exports.getJsonSchemaObject=n.r,exports.getPrimarySchemaType=n.rt,exports.getProperties=n.i,exports.getPropertiesList=n.a,exports.getProperty=n.o,exports.isFileReference=n.p,exports.isJsonSchema=n.m,exports.isJsonSchemaAllOf=n.h,exports.isJsonSchemaAny=n.g,exports.isJsonSchemaAnyOf=n._,exports.isJsonSchemaArray=n.v,exports.isJsonSchemaBigint=n.y,exports.isJsonSchemaBoolean=n.b,exports.isJsonSchemaDate=n.x,exports.isJsonSchemaDecimal=n.S,exports.isJsonSchemaEnum=n.C,exports.isJsonSchemaInteger=n.w,exports.isJsonSchemaKeywords=n.T,exports.isJsonSchemaLiteral=n.E,exports.isJsonSchemaMap=n.D,exports.isJsonSchemaNativeEnum=n.O,exports.isJsonSchemaNever=n.k,exports.isJsonSchemaNull=n.A,exports.isJsonSchemaNullable=n.j,exports.isJsonSchemaNumber=n.M,exports.isJsonSchemaObject=n.N,exports.isJsonSchemaPrimitiveType=n.P,exports.isJsonSchemaPrimitiveUnion=n.F,exports.isJsonSchemaRecord=n.I,exports.isJsonSchemaRef=n.L,exports.isJsonSchemaSet=n.R,exports.isJsonSchemaString=n.z,exports.isJsonSchemaTuple=n.B,exports.isJsonSchemaType=n.V,exports.isJsonSchemaUndefined=n.H,exports.isJsonSchemaUnion=n.U,exports.isJsonSchemaUnknown=n.W,exports.isNullOnlyJsonSchema=n.G,exports.isPropertyOptional=n.s,exports.isSchema=n.K,exports.isSchemaNullable=n.c,exports.isSchemaObject=n.q,exports.isSchemaOf=n.J,exports.isSchemaWithSource=n.Y,exports.isStandardSchema=n.X,exports.isUntypedConfig=n.Z,exports.isUntypedConfigStrict=n.Q,exports.isUntypedSchema=n.$,exports.isUntypedSchemaStrict=n.et,exports.isValibotSchema=n.tt,exports.isValidSchemaConfigFile=n.l,exports.mapStorageToFileSystem=r.t,exports.merge=n.u,exports.mergeMetadata=n.d,exports.normalizeKey=r.r,exports.readSchemaTypes=n.it,exports.traverseSchema=n.f;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as SchemaSourceVariant, A as JsonSchemaNumberFormat, B as JsonSchemaString, C as JsonSchemaMap, D as JsonSchemaNull, E as JsonSchemaNever, F as JsonSchemaRecord, G as JsonSchemaUnion, H as JsonSchemaTuple, I as JsonSchemaRecordPropertyNames, J as SchemaConfigVariant, K as JsonSchemaUnknown, L as JsonSchemaRef, M as JsonSchemaOf, N as JsonSchemaPrimitiveType, O as JsonSchemaNullable, P as JsonSchemaPrimitiveUnion, Q as SchemaSourceConfig, R as JsonSchemaSchemaSource, S as JsonSchemaLogicKeywords, T as JsonSchemaNativeEnum, U as JsonSchemaType, V as JsonSchemaStringFormat, W as JsonSchemaUndefined, X as SchemaEnvelopeOf, Y as SchemaEnvelope, Z as SchemaSource, _ as JsonSchemaInteger, a as JsonSchema, at as ValibotSchema, b as JsonSchemaLike, c as JsonSchemaAnyOf, ct as JSON_SCHEMA_METADATA_KEYS, d as JsonSchemaBoolean, dt as JsonSchemaTypeNames, et as SpecOf, f as JsonSchemaConditionalKeywords, ft as SCHEMA_ARRAY_CONCAT_KEYWORDS, g as JsonSchemaEnum, h as JsonSchemaDecimalFormat, i as InferExtractOptions, it as UntypedSchemaSource, j as JsonSchemaObject, k as JsonSchemaNumber, l as JsonSchemaArray, lt as JSON_SCHEMA_PRIMITIVE_TYPES, m as JsonSchemaDecimal, mt as SCHEMA_SINGLE_KEYWORDS, n as BaseSchemaSource, nt as UntypedConfigObject, o as JsonSchemaAllOf, ot as ValibotSchemaSource, p as JsonSchemaDate, pt as SCHEMA_RECORD_KEYWORDS, q as SchemaConfig, r as ExtractedSchemaEnvelope, rt as UntypedSchema, s as JsonSchemaAny, st as Zod3SchemaSource, t as BaseExtractOptions, tt as StandardSchemaSchemaSource, u as JsonSchemaBigint, ut as JSON_SCHEMA_TYPES, v as JsonSchemaIntegerFormat, w as JsonSchemaMetadataKeywords, x as JsonSchemaLiteral, y as JsonSchemaKeywords, z as JsonSchemaSet } from "./types-BhEdUeyR.cjs";
|
|
2
2
|
import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "./index-ldf5lukz.cjs";
|
|
3
3
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
4
|
import { InferLoadOptions } from "@stryke/resolve/types";
|
|
@@ -653,5 +653,5 @@ declare function isSchemaWithSource(input: unknown): input is ExtractedSchemaEnv
|
|
|
653
653
|
*/
|
|
654
654
|
declare function isSchemaObject(input: unknown): input is SchemaEnvelope<JsonSchemaObject>;
|
|
655
655
|
//#endregion
|
|
656
|
-
export { type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createStoragePromises, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
|
|
656
|
+
export { type BaseExtractOptions, type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createStoragePromises, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
|
|
657
657
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/compatibility.ts","../src/extract.ts","../src/helpers.ts","../src/metadata.ts","../src/type-checks.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;iBAwGgB,yBACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBAqHc,6BACd,MAAM,YACN,UAAU,YACV;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/compatibility.ts","../src/extract.ts","../src/helpers.ts","../src/metadata.ts","../src/type-checks.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;iBAwGgB,yBACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBAqHc,6BACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBCgCc,iBAAiB,QAAQ,aAAa;;;;iBAgMtC,YACd,SAAS,qBACT,OAAO;;;;;;;iBAgDO,kBAAkB,kBAAkB;;;;;;;;iBAoCpC,uBACd,OAAO,qBACN;;;;;;;iBA0Ba,eAAe,OAAO,eAAe;;;;;;;;;iBAsB/B,cACpB,OAAO,oBACP,UAAU,sBACT,QAAQ;;;;;;;;;iBAmCK,cACd,SAAS,qBAC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;;;;;;;;;;iBAyD1C,sBAAsB,iBAAiB,SAAS;;;;;;;;;;iBAahD,gBAAgB,iBAAiB,SAAS;;;;;;;;;;;iBA0B1C,sBACd,iBACC,SAAS;;;;;;;iBAuBI,SAAS,iBAAiB,SAAS;;;;;;;iBAkBnC,WAAW,OACzB,iBACC,SAAS,iBAAiB;;;;;;;iBAUb,mBAAmB,iBAAiB,SAAS;;;;;;;iBAiB7C,eACd,iBACC,SAAS,eAAe"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as SchemaSourceVariant, A as JsonSchemaNumberFormat, B as JsonSchemaString, C as JsonSchemaMap, D as JsonSchemaNull, E as JsonSchemaNever, F as JsonSchemaRecord, G as JsonSchemaUnion, H as JsonSchemaTuple, I as JsonSchemaRecordPropertyNames, J as SchemaConfigVariant, K as JsonSchemaUnknown, L as JsonSchemaRef, M as JsonSchemaOf, N as JsonSchemaPrimitiveType, O as JsonSchemaNullable, P as JsonSchemaPrimitiveUnion, Q as SchemaSourceConfig, R as JsonSchemaSchemaSource, S as JsonSchemaLogicKeywords, T as JsonSchemaNativeEnum, U as JsonSchemaType, V as JsonSchemaStringFormat, W as JsonSchemaUndefined, X as SchemaEnvelopeOf, Y as SchemaEnvelope, Z as SchemaSource, _ as JsonSchemaInteger, a as JsonSchema, at as ValibotSchema, b as JsonSchemaLike, c as JsonSchemaAnyOf, ct as JSON_SCHEMA_METADATA_KEYS, d as JsonSchemaBoolean, dt as JsonSchemaTypeNames, et as SpecOf, f as JsonSchemaConditionalKeywords, ft as SCHEMA_ARRAY_CONCAT_KEYWORDS, g as JsonSchemaEnum, h as JsonSchemaDecimalFormat, i as InferExtractOptions, it as UntypedSchemaSource, j as JsonSchemaObject, k as JsonSchemaNumber, l as JsonSchemaArray, lt as JSON_SCHEMA_PRIMITIVE_TYPES, m as JsonSchemaDecimal, mt as SCHEMA_SINGLE_KEYWORDS, n as BaseSchemaSource, nt as UntypedConfigObject, o as JsonSchemaAllOf, ot as ValibotSchemaSource, p as JsonSchemaDate, pt as SCHEMA_RECORD_KEYWORDS, q as SchemaConfig, r as ExtractedSchemaEnvelope, rt as UntypedSchema, s as JsonSchemaAny, st as Zod3SchemaSource, t as BaseExtractOptions, tt as StandardSchemaSchemaSource, u as JsonSchemaBigint, ut as JSON_SCHEMA_TYPES, v as JsonSchemaIntegerFormat, w as JsonSchemaMetadataKeywords, x as JsonSchemaLiteral, y as JsonSchemaKeywords, z as JsonSchemaSet } from "./types-BMC57p-g.mjs";
|
|
2
2
|
import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "./index-C7q4X7Bo.mjs";
|
|
3
3
|
import { BaseSchema } from "valibot";
|
|
4
4
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -653,5 +653,5 @@ declare function isSchemaWithSource(input: unknown): input is ExtractedSchemaEnv
|
|
|
653
653
|
*/
|
|
654
654
|
declare function isSchemaObject(input: unknown): input is SchemaEnvelope<JsonSchemaObject>;
|
|
655
655
|
//#endregion
|
|
656
|
-
export { type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createStoragePromises, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
|
|
656
|
+
export { type BaseExtractOptions, type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createStoragePromises, extract, extractHash, extractJsonSchema, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
|
|
657
657
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -8,5 +8,5 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
|
|
|
8
8
|
`&&++this.pos;case`
|
|
9
9
|
`:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,`Unterminated template`)},X.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
|
10
10
|
`;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return N(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!==`0`||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return yn(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},X.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},X.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(C(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?S:C)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=N(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},X.readWord=function(){var e=this.readWord1(),t=k.name;return this.keywords.test(e)&&(t=_n[e]),this.finishToken(t,e)},L.acorn={Parser:L,version:`8.17.0`,defaultOptions:Mn,Position:kn,SourceLocation:An,getLineInfo:jn,Node:mr,TokenType:w,tokTypes:k,keywordTypes:_n,TokContext:H,tokContexts:U,isIdentifierChar:C,isIdentifierStart:S,Token:ni,isNewLine:yn,lineBreak:A,lineBreakG:vn,nonASCIIwhitespace:xn},String.fromCharCode;const oi=/\/$|\/\?|\/#/,si=/^\.?\//;function ci(e=``,t){return t?oi.test(e):e.endsWith(`/`)}function li(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(ci(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function ui(e){return e&&e!==`/`}function di(e,...t){let n=e||``;for(let e of t.filter(e=>ui(e)))if(n){let t=e.replace(si,``);n=li(n)+t}else n=e;return n}const fi=new Set(Qe);function pi(e){return e.replace(/\\/g,`/`)}const mi={}.hasOwnProperty,hi=/^([A-Z][a-z\d]*)+$/,gi=new Set([`string`,`function`,`number`,`object`,`Function`,`Object`,`boolean`,`bigint`,`symbol`]),Z={};function _i(e,t=`and`){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(`, `)}, ${t} ${e[e.length-1]}`}const vi=new Map;let yi;Z.ERR_INVALID_ARG_TYPE=Q(`ERR_INVALID_ARG_TYPE`,(e,t,n)=>{y.ok(typeof e==`string`,`'name' must be a string`),Array.isArray(t)||(t=[t]);let r=`The `;if(e.endsWith(` argument`))r+=`${e} `;else{let t=e.includes(`.`)?`property`:`argument`;r+=`"${e}" ${t} `}r+=`must be `;let i=[],a=[],o=[];for(let e of t)y.ok(typeof e==`string`,`All expected entries have to be of type string`),gi.has(e)?i.push(e.toLowerCase()):hi.exec(e)===null?(y.ok(e!==`object`,`The value "object" should be written as "Object"`),o.push(e)):a.push(e);if(a.length>0){let e=i.indexOf(`object`);e!==-1&&(i.slice(e,1),a.push(`Object`))}return i.length>0&&(r+=`${i.length>1?`one of type`:`of type`} ${_i(i,`or`)}`,(a.length>0||o.length>0)&&(r+=` or `)),a.length>0&&(r+=`an instance of ${_i(a,`or`)}`,o.length>0&&(r+=` or `)),o.length>0&&(o.length>1?r+=`one of ${_i(o,`or`)}`:(o[0].toLowerCase()!==o[0]&&(r+=`an `),r+=`${o[0]}`)),r+=`. Received ${Ti(n)}`,r},TypeError),Z.ERR_INVALID_MODULE_SPECIFIER=Q(`ERR_INVALID_MODULE_SPECIFIER`,(e,t,n=void 0)=>`Invalid module "${e}" ${t}${n?` imported from ${n}`:``}`,TypeError),Z.ERR_INVALID_PACKAGE_CONFIG=Q(`ERR_INVALID_PACKAGE_CONFIG`,(e,t,n)=>`Invalid package config ${e}${t?` while importing ${t}`:``}${n?`. ${n}`:``}`,Error),Z.ERR_INVALID_PACKAGE_TARGET=Q(`ERR_INVALID_PACKAGE_TARGET`,(e,t,n,r=!1,i=void 0)=>{let a=typeof n==`string`&&!r&&n.length>0&&!n.startsWith(`./`);return t===`.`?(y.ok(r===!1),`Invalid "exports" main target ${JSON.stringify(n)} defined in the package config ${e}package.json${i?` imported from ${i}`:``}${a?`; targets must start with "./"`:``}`):`Invalid "${r?`imports`:`exports`}" target ${JSON.stringify(n)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:``}${a?`; targets must start with "./"`:``}`},Error),Z.ERR_MODULE_NOT_FOUND=Q(`ERR_MODULE_NOT_FOUND`,(e,t,n=!1)=>`Cannot find ${n?`module`:`package`} '${e}' imported from ${t}`,Error),Z.ERR_NETWORK_IMPORT_DISALLOWED=Q(`ERR_NETWORK_IMPORT_DISALLOWED`,`import of '%s' by %s is not supported: %s`,Error),Z.ERR_PACKAGE_IMPORT_NOT_DEFINED=Q(`ERR_PACKAGE_IMPORT_NOT_DEFINED`,(e,t,n)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:``} imported from ${n}`,TypeError),Z.ERR_PACKAGE_PATH_NOT_EXPORTED=Q(`ERR_PACKAGE_PATH_NOT_EXPORTED`,(e,t,n=void 0)=>t===`.`?`No "exports" main defined in ${e}package.json${n?` imported from ${n}`:``}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${n?` imported from ${n}`:``}`,Error),Z.ERR_UNSUPPORTED_DIR_IMPORT=Q(`ERR_UNSUPPORTED_DIR_IMPORT`,`Directory import '%s' is not supported resolving ES modules imported from %s`,Error),Z.ERR_UNSUPPORTED_RESOLVE_REQUEST=Q(`ERR_UNSUPPORTED_RESOLVE_REQUEST`,`Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.`,TypeError),Z.ERR_UNKNOWN_FILE_EXTENSION=Q(`ERR_UNKNOWN_FILE_EXTENSION`,(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError),Z.ERR_INVALID_ARG_VALUE=Q(`ERR_INVALID_ARG_VALUE`,(e,t,n=`is invalid`)=>{let r=ht(t);return r.length>128&&(r=`${r.slice(0,128)}...`),`The ${e.includes(`.`)?`property`:`argument`} '${e}' ${n}. Received ${r}`},TypeError);function Q(e,t,n){return vi.set(e,t),bi(n,e)}function bi(e,t){return n;function n(...n){let r=Error.stackTraceLimit;xi()&&(Error.stackTraceLimit=0);let i=new e;xi()&&(Error.stackTraceLimit=r);let a=wi(t,n,i);return Object.defineProperties(i,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Ci(i),i.code=t,i}}function xi(){try{if(pt.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):mi.call(e,`writable`)&&e.writable!==void 0?e.writable:e.set!==void 0}function Si(e){let t=`__node_internal_`+e.name;return Object.defineProperty(e,"name",{value:t}),e}const Ci=Si(function(e){let t=xi();return t&&(yi=Error.stackTraceLimit,Error.stackTraceLimit=1/0),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=yi),e});function wi(e,t,n){let r=vi.get(e);if(y.ok(r!==void 0,"expected `message` to be found"),typeof r==`function`)return y.ok(r.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${r.length}).`),Reflect.apply(r,n,t);let i=/%[dfijoOs]/g,a=0;for(;i.exec(r)!==null;)a++;return y.ok(a===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${a}).`),t.length===0?r:(t.unshift(r),Reflect.apply(mt,null,t))}function Ti(e){if(e==null)return String(e);if(typeof e==`function`&&e.name)return`function ${e.name}`;if(typeof e==`object`)return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${ht(e,{depth:-1})}`;let t=ht(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}const Ei={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:Di}=Z,Oi=new Map;function ki(e,{base:t,specifier:n}){let r=Oi.get(e);if(r)return r;let i;try{i=tt.readFileSync(ut.toNamespacedPath(e),`utf8`)}catch(e){let t=e;if(t.code!==`ENOENT`)throw t}let a={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:`none`,exports:void 0,imports:void 0};if(i!==void 0){let r;try{r=JSON.parse(i)}catch(r){let i=r,a=new Di(e,(t?`"${n}" from `:``)+v(t||n),i.message);throw a.cause=i,a}a.exists=!0,Ei.call(r,`name`)&&typeof r.name==`string`&&(a.name=r.name),Ei.call(r,`main`)&&typeof r.main==`string`&&(a.main=r.main),Ei.call(r,`exports`)&&(a.exports=r.exports),Ei.call(r,`imports`)&&(a.imports=r.imports),Ei.call(r,`type`)&&(r.type===`commonjs`||r.type===`module`)&&(a.type=r.type)}return Oi.set(e,a),a}function Ai(e){let t=new URL(`package.json`,e);for(;!t.pathname.endsWith(`node_modules/package.json`);){let n=ki(v(t),{specifier:e});if(n.exists)return n;let r=t;if(t=new URL(`../package.json`,t),t.pathname===r.pathname)break}return{pjsonPath:v(t),exists:!1,type:`none`}}function ji(e){return Ai(e).type}const{ERR_UNKNOWN_FILE_EXTENSION:Mi}=Z,Ni={}.hasOwnProperty,Pi={__proto__:null,".cjs":`commonjs`,".js":`module`,".json":`json`,".mjs":`module`};function Fi(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?`module`:e===`application/json`?`json`:null}const Ii={__proto__:null,"data:":Li,"file:":zi,"http:":Bi,"https:":Bi,"node:"(){return`builtin`}};function Li(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return Fi(t)}function Ri(e){let t=e.pathname,n=t.length;for(;n--;){let e=t.codePointAt(n);if(e===47)return``;if(e===46)return t.codePointAt(n-1)===47?``:t.slice(n)}return``}function zi(e,t,n){let r=Ri(e);if(r===`.js`){let t=ji(e);return t===`none`?`commonjs`:t}if(r===``){let t=ji(e);return t===`none`||t===`commonjs`?`commonjs`:`module`}let i=Pi[r];if(i)return i;if(n)return;let a=v(e);throw new Mi(r,a)}function Bi(){}function Vi(e,t){let n=e.protocol;return Ni.call(Ii,n)&&Ii[n](e,t,!0)||null}const Hi=Object.freeze([`node`,`import`]),Ui=new Set(Hi);function Wi(){return Ui}function Gi(e){return Wi()}const Ki=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:qi,ERR_INVALID_PACKAGE_CONFIG:Ji,ERR_INVALID_PACKAGE_TARGET:Yi,ERR_MODULE_NOT_FOUND:Xi,ERR_PACKAGE_IMPORT_NOT_DEFINED:Zi,ERR_PACKAGE_PATH_NOT_EXPORTED:Qi,ERR_UNSUPPORTED_DIR_IMPORT:$i,ERR_UNSUPPORTED_RESOLVE_REQUEST:ea}=Z,ta={}.hasOwnProperty,na=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,ra=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,ia=/^\.|%|\\/,aa=/\*/g,oa=/%2f|%5c/i,sa=new Set,ca=/[/\\]{2}/;function la(e,t,n,r,i,a,o){if(b.noDeprecation)return;let s=v(r),c=ca.exec(o?e:t)!==null;b.emitWarning(`Use of deprecated ${c?`double slash`:`leading or trailing slash matching`} resolving "${e}" for module request "${t}" ${t===n?``:`matched to "${n}" `}in the "${i?`imports`:`exports`}" field module resolution of the package at ${s}${a?` imported from ${v(a)}`:``}.`,`DeprecationWarning`,`DEP0166`)}function ua(e,t,n,r){if(b.noDeprecation||Vi(e,{parentURL:n.href})!==`module`)return;let i=v(e.href),a=v(new URL(`.`,t)),o=v(n);r?ut.resolve(a,r)!==i&&b.emitWarning(`Package ${a} has a "main" field set to "${r}", excluding the full filename and extension to the resolved file at "${i.slice(a.length)}", imported from ${o}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`,`DeprecationWarning`,`DEP0151`):b.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${i.slice(a.length)}", imported from ${o}.\nDefault "index" lookups for the main are deprecated for ES modules.`,`DeprecationWarning`,`DEP0151`)}function da(e){try{return it(e)}catch{}}function fa(e){let t=it(e,{throwIfNoEntry:!1});return(t?t.isFile():void 0)??!1}function pa(e,t,n){let r;if(t.main!==void 0){if(r=new URL(t.main,e),fa(r))return r;let i=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],a=-1;for(;++a<i.length&&(r=new URL(i[a],e),!fa(r));)r=void 0;if(r)return ua(r,e,n,t.main),r}let i=[`./index.js`,`./index.json`,`./index.node`],a=-1;for(;++a<i.length&&(r=new URL(i[a],e),!fa(r));)r=void 0;if(r)return ua(r,e,n,t.main),r;throw new Xi(v(new URL(`.`,e)),v(n))}function ma(e,t,n){if(oa.exec(e.pathname)!==null)throw new qi(e.pathname,`must not include encoded "/" or "\\" characters`,v(t));let r;try{r=v(e)}catch(n){let r=n;throw Object.defineProperty(r,"input",{value:String(e)}),Object.defineProperty(r,"module",{value:String(t)}),r}let i=da(r.endsWith(`/`)?r.slice(-1):r);if(i&&i.isDirectory()){let n=new $i(r,v(t));throw n.url=String(e),n}if(!i||!i.isFile()){let n=new Xi(r||e.pathname,t&&v(t),!0);throw n.url=String(e),n}{let t=rt(r),{search:n,hash:i}=e;e=ft(t+(r.endsWith(ut.sep)?`/`:``)),e.search=n,e.hash=i}return e}function ha(e,t,n){return new Zi(e,t&&v(new URL(`.`,t)),v(n))}function ga(e,t,n){return new Qi(v(new URL(`.`,t)),e,n&&v(n))}function _a(e,t,n,r,i){let a=`request is not a valid match in pattern "${t}" for the "${r?`imports`:`exports`}" resolution of ${v(n)}`;throw new qi(e,a,i&&v(i))}function va(e,t,n,r,i){return t=typeof t==`object`&&t?JSON.stringify(t,null,``):`${t}`,new Yi(v(new URL(`.`,n)),e,t,r,i&&v(i))}function ya(e,t,n,r,i,a,o,s,c){if(t!==``&&!a&&e[e.length-1]!==`/`)throw va(n,e,r,o,i);if(!e.startsWith(`./`)){if(o&&!e.startsWith(`../`)&&!e.startsWith(`/`)){let n=!1;try{new URL(e),n=!0}catch{}if(!n)return Oa(a?Ki.call(aa,e,()=>t):e+t,r,c)}throw va(n,e,r,o,i)}if(na.exec(e.slice(2))!==null)if(ra.exec(e.slice(2))===null){if(!s){let s=a?n.replace(`*`,()=>t):n+t;la(a?Ki.call(aa,e,()=>t):e,s,n,r,o,i,!0)}}else throw va(n,e,r,o,i);let l=new URL(e,r),u=l.pathname,d=new URL(`.`,r).pathname;if(!u.startsWith(d))throw va(n,e,r,o,i);if(t===``)return l;if(na.exec(t)!==null){let c=a?n.replace(`*`,()=>t):n+t;ra.exec(t)===null?s||la(a?Ki.call(aa,e,()=>t):e,c,n,r,o,i,!1):_a(c,n,r,o,i)}return a?new URL(Ki.call(aa,l.href,()=>t)):new URL(t,l)}function ba(e){let t=Number(e);return`${t}`===e&&t>=0&&t<4294967295}function xa(e,t,n,r,i,a,o,s,c){if(typeof t==`string`)return ya(t,n,r,e,i,a,o,s,c);if(Array.isArray(t)){let l=t;if(l.length===0)return null;let u,d=-1;for(;++d<l.length;){let t=l[d],f;try{f=xa(e,t,n,r,i,a,o,s,c)}catch(e){let t=e;if(u=t,t.code===`ERR_INVALID_PACKAGE_TARGET`)continue;throw e}if(f!==void 0){if(f===null){u=null;continue}return f}}if(u==null)return null;throw u}if(typeof t==`object`&&t){let l=Object.getOwnPropertyNames(t),u=-1;for(;++u<l.length;){let t=l[u];if(ba(t))throw new Ji(v(e),i,`"exports" cannot contain numeric property keys.`)}for(u=-1;++u<l.length;){let d=l[u];if(d==="default"||c&&c.has(d)){let l=t[d],u=xa(e,l,n,r,i,a,o,s,c);if(u===void 0)continue;return u}}return null}if(t===null)return null;throw va(r,t,e,o,i)}function Sa(e,t,n){if(typeof e==`string`||Array.isArray(e))return!0;if(typeof e!=`object`||!e)return!1;let r=Object.getOwnPropertyNames(e),i=!1,a=0,o=-1;for(;++o<r.length;){let e=r[o],s=e===``||e[0]!==`.`;if(a++===0)i=s;else if(i!==s)throw new Ji(v(t),n,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return i}function Ca(e,t,n){if(b.noDeprecation)return;let r=v(t);sa.has(r+`|`+e)||(sa.add(r+`|`+e),b.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${r}${n?` imported from ${v(n)}`:``}. Mapping specifiers ending in "/" is no longer supported.`,`DeprecationWarning`,`DEP0155`))}function wa(e,t,n,r,i){let a=n.exports;if(Sa(a,e,r)&&(a={".":a}),ta.call(a,t)&&!t.includes(`*`)&&!t.endsWith(`/`)){let n=a[t],o=xa(e,n,``,t,r,!1,!1,!1,i);if(o==null)throw ga(t,e,r);return o}let o=``,s=``,c=Object.getOwnPropertyNames(a),l=-1;for(;++l<c.length;){let n=c[l],i=n.indexOf(`*`);if(i!==-1&&t.startsWith(n.slice(0,i))){t.endsWith(`/`)&&Ca(t,e,r);let a=n.slice(i+1);t.length>=n.length&&t.endsWith(a)&&Ta(o,n)===1&&n.lastIndexOf(`*`)===i&&(o=n,s=t.slice(i,t.length-a.length))}}if(o){let n=a[o],c=xa(e,n,s,o,r,!0,!1,t.endsWith(`/`),i);if(c==null)throw ga(t,e,r);return c}throw ga(t,e,r)}function Ta(e,t){let n=e.indexOf(`*`),r=t.indexOf(`*`),i=n===-1?e.length:n+1,a=r===-1?t.length:r+1;return i>a?-1:a>i||n===-1?1:r===-1||e.length>t.length?-1:+(t.length>e.length)}function Ea(e,t,n){if(e===`#`||e.startsWith(`#/`)||e.endsWith(`/`))throw new qi(e,`is not a valid internal imports specifier name`,v(t));let r,i=Ai(t);if(i.exists){r=ft(i.pjsonPath);let a=i.imports;if(a)if(ta.call(a,e)&&!e.includes(`*`)){let i=xa(r,a[e],``,e,t,!1,!0,!1,n);if(i!=null)return i}else{let i=``,o=``,s=Object.getOwnPropertyNames(a),c=-1;for(;++c<s.length;){let t=s[c],n=t.indexOf(`*`);if(n!==-1&&e.startsWith(t.slice(0,-1))){let r=t.slice(n+1);e.length>=t.length&&e.endsWith(r)&&Ta(i,t)===1&&t.lastIndexOf(`*`)===n&&(i=t,o=e.slice(n,e.length-r.length))}}if(i){let e=a[i],s=xa(r,e,o,i,t,!0,!0,!1,n);if(s!=null)return s}}}throw ha(e,r,t)}function Da(e,t){let n=e.indexOf(`/`),r=!0,i=!1;e[0]===`@`&&(i=!0,n===-1||e.length===0?r=!1:n=e.indexOf(`/`,n+1));let a=n===-1?e:e.slice(0,n);if(ia.exec(a)!==null&&(r=!1),!r)throw new qi(e,`is not a valid package name`,v(t));return{packageName:a,packageSubpath:`.`+(n===-1?``:e.slice(n)),isScoped:i}}function Oa(e,t,n){if(Qe.includes(e))return new URL(`node:`+e);let{packageName:r,packageSubpath:i,isScoped:a}=Da(e,t),o=Ai(t);if(o.exists){let e=ft(o.pjsonPath);if(o.name===r&&o.exports!==void 0&&o.exports!==null)return wa(e,i,o,t,n)}let s=new URL(`./node_modules/`+r+`/package.json`,t),c=v(s),l;do{let o=da(c.slice(0,-13));if(!o||!o.isDirectory()){l=c,s=new URL((a?`../../../../node_modules/`:`../../../node_modules/`)+r+`/package.json`,s),c=v(s);continue}let u=ki(c,{base:t,specifier:e});return u.exports!==void 0&&u.exports!==null?wa(s,i,u,t,n):i===`.`?pa(s,u,t):new URL(i,s)}while(c.length!==l.length);throw new Xi(r,v(t),!1)}function ka(e){return!(e[0]!==`.`||e.length!==1&&e[1]!==`/`&&(e[1]!==`.`||e.length!==2&&e[2]!==`/`))}function Aa(e){return e===``?!1:e[0]===`/`||ka(e)}function ja(e,t,n,r){n===void 0&&(n=Gi());let i=t.protocol,a=i===`data:`||i===`http:`||i===`https:`,o;if(Aa(e))try{o=new URL(e,t)}catch(n){let r=new ea(e,t);throw r.cause=n,r}else if(i===`file:`&&e[0]===`#`)o=Ea(e,t,n);else try{o=new URL(e)}catch(r){if(a&&!Qe.includes(e)){let n=new ea(e,t);throw n.cause=r,n}o=Oa(e,t,n)}return y.ok(o!==void 0,`expected to be defined`),o.protocol===`file:`?ma(o,t):o}function Ma(e){return typeof e==`string`&&!e.startsWith(`file://`)?pi(e):pi(v(e))}function Na(e){return ft(Ma(e)).toString()}function Pa(e){return typeof e!=`string`&&(e=e.toString()),/(?:node|data|http|https|file):/.test(e)?e:fi.has(e)?`node:`+e:`file://`+encodeURI(pi(e))}const Fa=new Set([`node`,`import`]),Ia=[`.mjs`,`.cjs`,`.js`,`.json`],La=new Set([`ERR_MODULE_NOT_FOUND`,`ERR_UNSUPPORTED_DIR_IMPORT`,`MODULE_NOT_FOUND`,`ERR_PACKAGE_PATH_NOT_EXPORTED`]);function Ra(e,t,n){try{return ja(e,t,n)}catch(e){if(!La.has(e?.code))throw e}}function za(e,t={}){if(typeof e!=`string`)if(e instanceof URL)e=Ma(e);else throw TypeError("input must be a `string` or `URL`");if(/(?:node|data|http|https):/.test(e))return e;if(fi.has(e))return`node:`+e;if(e.startsWith(`file://`)&&(e=Ma(e)),an(e))try{if(it(e).isFile())return Na(e)}catch(e){if(e?.code!==`ENOENT`)throw e}let n=t.conditions?new Set(t.conditions):Fa,r=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(e=>new URL(Pa(e.toString())));r.length===0&&r.push(new URL(Na(process.cwd())));let i=[...r];for(let e of r)e.protocol===`file:`&&i.push(new URL(`./`,e),new URL(di(e.pathname,`_index.js`),e),new URL(`node_modules`,e));let a;for(let r of i){if(a=Ra(e,r,n),a)break;for(let i of[``,`/index`]){for(let o of t.extensions||Ia)if(a=Ra(di(e,i)+o,r,n),a)break;if(a)break}if(a)break}if(!a){let t=Error(`Cannot find module ${e} imported from ${i.join(`, `)}`);throw t.code=`ERR_MODULE_NOT_FOUND`,t}return Na(a)}function Ba(e,t){return za(e,t)}function Va(e,t){return Ma(Ba(e,t))}function Ha(e,t){try{return Promise.resolve(Va(e,t))}catch(e){return Promise.reject(e)}}const Ua=`.all-contributorsrc,.commitlintrc,.github,.git,.husky,.huskyrc,.lintstagedrc,.log4brains.yml,.npmrc,.nx,.storm-workspace.js,.storm-workspace.json,.storm-workspace.ts,.storm-workspace.yaml,.storm-workspace.yml,.vscode,.whitesource,bun.lock,bun.lockb,lefthook.yaml,lefthook.yml,lerna.json,npm-lock.json,npm-lock.yaml,npm-lock.yml,npm-workspace.json,npm-workspace.yaml,npm-workspace.yml,nx.json,package-lock.json,patches,pnpm-lock.json,pnpm-lock.yaml,pnpm-lock.yml,pnpm-workspace.json,pnpm-workspace.yaml,pnpm-workspace.yml,socket.yaml,storm-workspace.js,storm-workspace.json,storm-workspace.ts,storm-workspace.yaml,storm-workspace.yml,syncpack.config.js,syncpack.json,turbo.json,yarn-lock.json,yarn-lock.yaml,yarn-lock.yml,yarn-workspace.json,yarn-workspace.yaml,yarn-workspace.yml,yarn.lock`.split(`,`);function Wa(e=ct()){if(process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH)return process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH;let t=nn(e);if(t)return t;let n=Ht(Ua,e);if(n)return n;for(n=e;n&&!gt(n);)if(n=Ht(`storm-workspace.json`,n,{skipCwd:!0,includeNameInResults:!1}),n)return n;return e}const Ga=[`js`,`jsx`,`mjs`,`cjs`,`ts`,`tsx`,`mts`,`cts`,`json`,`jsonc`,`json5`,`node`];function Ka(e=[]){let t=e;t.includes(ct())||t.push(ct());let n=Wa();return t.includes(n)||t.push(n),t=yt(t.filter(Boolean).map(e=>_t(e)).reduce((e,t,r,i)=>(e.push(t),bt(t)||(e.push(vt(t,ct())),e.push(vt(t,n)),i.forEach(n=>{e.push(vt(t,n))})),e),[])),t}function qa(e=[]){return yt(e.reduce((e,t)=>(lt(t)===`node_modules`&&e.push(_t(t)),Bt(at(t,`node_modules`))&&e.push(_t(at(t,`node_modules`))),e),[]))}async function Ja(e,t={}){let n=Ka(t.paths);xt(e)?n=qa(n):n.push(...qa(n));let r,i;try{r=await Ha(e,{url:n,extensions:t.extensions??Ga,conditions:t.conditions,fs:t.fs?{statSync:t.fs.statSync,realpathSync:t.fs.realpathSync,readFileSync:t.fs.readFileSync,stat:t.fs.promises?.stat,realpath:t.fs.promises?.realpath,readFile:t.fs.promises?.readFile}:void 0})}catch(e){i=e}if(!r)throw Error(`Unable to resolve module "${e}". The following import paths were tried: \n${n.join(`
|
|
11
|
-
`)}`,{cause:i});return _t(r)}async function Ya(e,t={}){try{return await Ja(e,t)}catch{return}}const Xa=`https://power-plant.invalid/`;function Za(e){return!(!g(e)||!(`schema`in e)||`hash`in e||`variant`in e||`source`in e)}function Qa(e){return Za(e)?e.schema:e}function $a(e){return e.endsWith(`#`)?e.slice(0,-1):e}function eo(e){let t=e.indexOf(`#`);return t>=0?e.slice(0,t):e}function to(e){return e.replaceAll(`~`,`~0`).replaceAll(`/`,`~1`)}function no(e){return e.length===0?``:`/${e.map(e=>to(e)).join(`/`)}`}function ro(e,t){try{return $a(new URL(e,t).toString())}catch{return $a(e)}}function io(e,t,n,r,i){if(!g(e))return;let a=e,o=no(t),s=_(a.$id)?ro(a.$id,n):n,c=eo(s);if(r.set(s,o),r.set(c,o),_(a.$anchor)&&r.set(`${c}#${a.$anchor}`,o),_(a.$dynamicAnchor)){let e=`${c}#${a.$dynamicAnchor}`;r.set(e,o),i.set(e,`#${a.$dynamicAnchor}`)}for(let[e,n]of Object.entries(a)){if(Array.isArray(n)){n.forEach((n,a)=>{io(n,[...t,e,String(a)],s,r,i)});continue}io(n,[...t,e],s,r,i)}}function ao(e,t,n,r,i){if(!g(e))return;let a=e,o=_(a.$id)?ro(a.$id,n):n;if(_(a.$ref)){let e=ro(a.$ref,o),t=r.get(e)??r.get(eo(e));t!==void 0&&(a.$ref=t.length>0?`#${t}`:`#`)}if(_(a.$dynamicRef)){let e=ro(a.$dynamicRef,o),t=i.get(e);if(t)a.$dynamicRef=t;else{let t=r.get(e)??r.get(eo(e));t!==void 0&&(a.$dynamicRef=t.length>0?`#${t}`:`#`)}}for(let[e,n]of Object.entries(a)){if(Array.isArray(n)){n.forEach((n,a)=>{ao(n,[...t,e,String(a)],o,r,i)});continue}ao(n,[...t,e],o,r,i)}}function oo(e){if(!g(e))return e;let t=St(e),n=_(t.$id)?ro(t.$id,Xa):Xa,r=new Map,i=new Map;return io(t,[],n,r,i),ao(t,[],n,r,i),t}function so(e){if(s(e))return uo(e);if(g(e)){if(ve(e))return fo(e);let t=e;if(`$schema`in t&&s(t.$schema))return uo(t.$schema)}return e}function co(e){return Array.isArray(e)?e.map(e=>so(e)):e}function lo(e){return At(e,{target:`draft-2020-12`})}function uo(e){let t=e,n={};for(let[e,r]of Object.entries(t))if(e!==`tsType`&&e!==`markdownType`&&e!==`tags`&&e!==`args`&&e!==`resolve`){if(e===`id`&&_(r)){n.$id=r;continue}if(e===`properties`||e===`patternProperties`||e===`dependentSchemas`||e===`$defs`||e===`definitions`){if(!g(r)){n[e]=r;continue}n[e]=Object.fromEntries(Object.entries(r).map(([e,t])=>[e,so(t)]));continue}if(e===`items`||e===`contains`||e===`if`||e===`then`||e===`else`||e===`not`||e===`propertyNames`||e===`additionalProperties`||e===`unevaluatedProperties`){n[e]=so(r);continue}if(e===`oneOf`||e===`anyOf`||e===`allOf`){n[e]=co(r);continue}n[e]=r}return n}function fo(e){let t=e,n=s(t.$schema)?uo(t.$schema):{},r={};for(let[e,n]of Object.entries(t)){if(e.startsWith(`$`)||!g(n))continue;if(ve(n)){r[e]=fo(n);continue}let t=n;if(`$schema`in t&&s(t.$schema)){r[e]=uo(t.$schema);continue}s(n)&&(r[e]=uo(n))}if(!se(n))throw Error(`Failed to convert untyped input to JSON Schema. The base schema must be a valid JSON Schema object.`);let i={...g(n.properties)?n.properties:{},...r};return{...n,type:n.type??`object`,...Object.keys(i).length>0?{properties:i}:{}}}function $(e,t){let n=Qa(t);if(m(n)||ie(n))return x({variant:e,input:n.schema});if(_(n)||typeof n==`boolean`)return x({variant:e,input:n});if(g(n)){if(kt(n))return x({variant:e,input:n._def});if(Ct(n))return x({variant:e,input:n[`~standard`]});if(h(n))return x({variant:e,input:n});if(He(n))return x({variant:e,input:lo(n)});if(ve(n))return x({variant:e,input:fo(n)});if(s(n))return x({variant:e,input:uo(n)})}throw Error(`Failed to create an input hash for the provided schema definition input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, or a reflected Deepkit Type object.`)}function po(e){if(g(e)){if(kt(e))return Ot(e,{target:`draft-2020-12`});if(ue(e))return fo(e);if(we(e))return uo(e);if(Ct(e))return e[`~standard`].jsonSchema.input({target:`draft-2020-12`});if(He(e))return lo(e);if(h(e))return e}}function mo(e){if(g(e)){if(kt(e))return`zod3`;if(ue(e)||we(e))return`untyped`;if(Ct(e))return`standard-schema`;if(h(e))return`json-schema`;if(He(e))return`valibot`}throw Error(`Failed to determine the variant of the provided schema definition input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, a reflected Deepkit Type object, or an Untyped schema.`)}function ho(e){let t=Qa(e);return m(t)||ie(t)?t.variant:_(t)||Ie(t)?`file-reference`:mo(t)}async function go(e,t){if(m(e))return e.schema;let n=t??mo(e),r;if((n===`zod3`||n===`json-schema`||n===`standard-schema`||n===`untyped`||n===`valibot`)&&(r=po(e)),r)return oo(r);throw Error(`Failed to extract a valid schema from the provided input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, an untyped schema, or a reflected Deepkit Type object.`)}function _o(e,t){if(e===`zod3`)return{hash:$(e,t),variant:`zod3`,schema:t};if(e===`untyped`)return{hash:$(e,t),variant:`untyped`,schema:t};if(e===`standard-schema`)return{hash:$(e,t),variant:`standard-schema`,schema:t};if(e===`json-schema`)return{hash:$(e,t),variant:`json-schema`,schema:t};if(e===`valibot`)return{hash:$(e,t),variant:`valibot`,schema:t};throw Error(`Failed to extract source information from the provided input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, an untyped schema, or a reflected Deepkit Type object.`)}async function vo(e,t={}){let n=et(e);if(!n)throw Error(`Failed to extract a file reference from the provided input. The input must be a string or an object with a "file" property that specifies the file path and optional export name.`);let r=n.export??`*`,i=await Ya(n.file,{fs:t.fs});try{return jt({path:i||n.file,type:r,expose:`all`,jsDoc:`extended
|
|
11
|
+
`)}`,{cause:i});return _t(r)}async function Ya(e,t={}){try{return await Ja(e,t)}catch{return}}const Xa=`https://power-plant.invalid/`;function Za(e){return!(!g(e)||!(`schema`in e)||`hash`in e||`variant`in e||`source`in e)}function Qa(e){return Za(e)?e.schema:e}function $a(e){return e.endsWith(`#`)?e.slice(0,-1):e}function eo(e){let t=e.indexOf(`#`);return t>=0?e.slice(0,t):e}function to(e){return e.replaceAll(`~`,`~0`).replaceAll(`/`,`~1`)}function no(e){return e.length===0?``:`/${e.map(e=>to(e)).join(`/`)}`}function ro(e,t){try{return $a(new URL(e,t).toString())}catch{return $a(e)}}function io(e,t,n,r,i){if(!g(e))return;let a=e,o=no(t),s=_(a.$id)?ro(a.$id,n):n,c=eo(s);if(r.set(s,o),r.set(c,o),_(a.$anchor)&&r.set(`${c}#${a.$anchor}`,o),_(a.$dynamicAnchor)){let e=`${c}#${a.$dynamicAnchor}`;r.set(e,o),i.set(e,`#${a.$dynamicAnchor}`)}for(let[e,n]of Object.entries(a)){if(Array.isArray(n)){n.forEach((n,a)=>{io(n,[...t,e,String(a)],s,r,i)});continue}io(n,[...t,e],s,r,i)}}function ao(e,t,n,r,i){if(!g(e))return;let a=e,o=_(a.$id)?ro(a.$id,n):n;if(_(a.$ref)){let e=ro(a.$ref,o),t=r.get(e)??r.get(eo(e));t!==void 0&&(a.$ref=t.length>0?`#${t}`:`#`)}if(_(a.$dynamicRef)){let e=ro(a.$dynamicRef,o),t=i.get(e);if(t)a.$dynamicRef=t;else{let t=r.get(e)??r.get(eo(e));t!==void 0&&(a.$dynamicRef=t.length>0?`#${t}`:`#`)}}for(let[e,n]of Object.entries(a)){if(Array.isArray(n)){n.forEach((n,a)=>{ao(n,[...t,e,String(a)],o,r,i)});continue}ao(n,[...t,e],o,r,i)}}function oo(e){if(!g(e))return e;let t=St(e),n=_(t.$id)?ro(t.$id,Xa):Xa,r=new Map,i=new Map;return io(t,[],n,r,i),ao(t,[],n,r,i),t}function so(e){if(s(e))return uo(e);if(g(e)){if(ve(e))return fo(e);let t=e;if(`$schema`in t&&s(t.$schema))return uo(t.$schema)}return e}function co(e){return Array.isArray(e)?e.map(e=>so(e)):e}function lo(e){return At(e,{target:`draft-2020-12`})}function uo(e){let t=e,n={};for(let[e,r]of Object.entries(t))if(e!==`tsType`&&e!==`markdownType`&&e!==`tags`&&e!==`args`&&e!==`resolve`){if(e===`id`&&_(r)){n.$id=r;continue}if(e===`properties`||e===`patternProperties`||e===`dependentSchemas`||e===`$defs`||e===`definitions`){if(!g(r)){n[e]=r;continue}n[e]=Object.fromEntries(Object.entries(r).map(([e,t])=>[e,so(t)]));continue}if(e===`items`||e===`contains`||e===`if`||e===`then`||e===`else`||e===`not`||e===`propertyNames`||e===`additionalProperties`||e===`unevaluatedProperties`){n[e]=so(r);continue}if(e===`oneOf`||e===`anyOf`||e===`allOf`){n[e]=co(r);continue}n[e]=r}return n}function fo(e){let t=e,n=s(t.$schema)?uo(t.$schema):{},r={};for(let[e,n]of Object.entries(t)){if(e.startsWith(`$`)||!g(n))continue;if(ve(n)){r[e]=fo(n);continue}let t=n;if(`$schema`in t&&s(t.$schema)){r[e]=uo(t.$schema);continue}s(n)&&(r[e]=uo(n))}if(!se(n))throw Error(`Failed to convert untyped input to JSON Schema. The base schema must be a valid JSON Schema object.`);let i={...g(n.properties)?n.properties:{},...r};return{...n,type:n.type??`object`,...Object.keys(i).length>0?{properties:i}:{}}}function $(e,t){let n=Qa(t);if(m(n)||ie(n))return x({variant:e,input:n.schema});if(_(n)||typeof n==`boolean`)return x({variant:e,input:n});if(g(n)){if(kt(n))return x({variant:e,input:n._def});if(Ct(n))return x({variant:e,input:n[`~standard`]});if(h(n))return x({variant:e,input:n});if(He(n))return x({variant:e,input:lo(n)});if(ve(n))return x({variant:e,input:fo(n)});if(s(n))return x({variant:e,input:uo(n)})}throw Error(`Failed to create an input hash for the provided schema definition input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, or a reflected Deepkit Type object.`)}function po(e){if(g(e)){if(kt(e))return Ot(e,{target:`draft-2020-12`});if(ue(e))return fo(e);if(we(e))return uo(e);if(Ct(e))return e[`~standard`].jsonSchema.input({target:`draft-2020-12`});if(He(e))return lo(e);if(h(e))return e}}function mo(e){if(g(e)){if(kt(e))return`zod3`;if(ue(e)||we(e))return`untyped`;if(Ct(e))return`standard-schema`;if(h(e))return`json-schema`;if(He(e))return`valibot`}throw Error(`Failed to determine the variant of the provided schema definition input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, a reflected Deepkit Type object, or an Untyped schema.`)}function ho(e){let t=Qa(e);return m(t)||ie(t)?t.variant:_(t)||Ie(t)?`file-reference`:mo(t)}async function go(e,t){if(m(e))return e.schema;let n=t??mo(e),r;if((n===`zod3`||n===`json-schema`||n===`standard-schema`||n===`untyped`||n===`valibot`)&&(r=po(e)),r)return oo(r);throw Error(`Failed to extract a valid schema from the provided input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, an untyped schema, or a reflected Deepkit Type object.`)}function _o(e,t){if(e===`zod3`)return{hash:$(e,t),variant:`zod3`,schema:t};if(e===`untyped`)return{hash:$(e,t),variant:`untyped`,schema:t};if(e===`standard-schema`)return{hash:$(e,t),variant:`standard-schema`,schema:t};if(e===`json-schema`)return{hash:$(e,t),variant:`json-schema`,schema:t};if(e===`valibot`)return{hash:$(e,t),variant:`valibot`,schema:t};throw Error(`Failed to extract source information from the provided input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, an untyped schema, or a reflected Deepkit Type object.`)}async function vo(e,t={}){let n=et(e);if(!n)throw Error(`Failed to extract a file reference from the provided input. The input must be a string or an object with a "file" property that specifies the file path and optional export name.`);let r=n.export??`*`,i=await Ya(n.file,{fs:t.fs});try{return jt({path:i||n.file,type:r,expose:`all`,jsDoc:`extended`,markdownDescription:!0,fullDescription:!0,skipTypeCheck:!0,...t}).createSchema(r)}catch(e){throw Error(`Failed to generate a JSON schema for "${n.file}"${i&&i!==n.file?` (resolved: ${i})`:``} using the type "${r}". Error: ${e.message}`)}}async function yo(e,t={}){let n=Qa(e);if(m(n))return n;if(ie(n))return{...n,source:{hash:$(`json-schema`,n.schema),variant:`json-schema`,schema:n.schema}};let r,i=ho(n),a=$(i,n);if(i===`file-reference`){let e=et(n);if(!e)throw Error(`Failed to extract a valid file reference from the provided input "${JSON.stringify(n)}". Please ensure that the input is correctly formatted as a file reference (e.g. "./schema.ts#MySchema") and that the file exists at the specified path.`);let i=wt(e.file);if(i&&!Tt.includes(i))throw Error(`The provided schema file input "${e.file}" has an invalid file extension (.${i}). Please ensure that the file has one of the following extensions: ${Dt(Tt,{conjunction:`or`})}.`);let a;t.storage&&(a=Ze(t.storage));let o=await Et(n,{...t,fs:a});o??=await vo(n,{...t,fs:a});let s=Qa(o);r=m(s)?s.source:ie(s)?{hash:$(`json-schema`,s.schema),variant:`json-schema`,schema:s.schema}:_o(mo(s),s)}else if([`json-schema`,`standard-schema`,`zod3`,`untyped`,`valibot`,`reflection`].includes(i))r=_o(i,n);else throw Error(`Invalid schema definition input "${i}". The variant must be one of "file-reference", "json-schema", "standard-schema", "zod3", "valibot", "untyped", or "reflection".`);return{variant:i,source:r,schema:await go(r.schema,r.variant),hash:a}}async function bo(e,t={}){let n=Qa(e);if(m(n)||p(n))return n;let r=await yo(e,t);if(!r?.schema)throw Error(`Failed to extract a valid schema from the provided input. The input must be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, or a reflected Deepkit Type object.`);return r}export{o as JSON_SCHEMA_METADATA_KEYS,n as JSON_SCHEMA_PRIMITIVE_TYPES,i as JSON_SCHEMA_TYPES,t as JsonSchemaTypeNames,e as SCHEMA_ARRAY_CONCAT_KEYWORDS,r as SCHEMA_RECORD_KEYWORDS,a as SCHEMA_SINGLE_KEYWORDS,Ve as addProperty,Pe as applyJsonSchemaMetadata,zt as assertSchemasDoNotContradict,oo as bundleReferences,Ye as createStoragePromises,bo as extract,$ as extractHash,po as extractJsonSchema,mo as extractResolvedVariant,go as extractSchema,yo as extractSchemaWithSource,_o as extractSource,vo as extractTSType,ho as extractVariant,Rt as findSchemaContradictions,Ne as getJsonSchema,Re as getJsonSchemaObject,ze as getPrimarySchemaType,Oe as getProperties,be as getPropertiesList,Fe as getProperty,Ie as isFileReference,h as isJsonSchema,De as isJsonSchemaAllOf,Ee as isJsonSchemaAny,ye as isJsonSchemaAnyOf,We as isJsonSchemaArray,qe as isJsonSchemaBigint,xe as isJsonSchemaBoolean,Ke as isJsonSchemaDate,fe as isJsonSchemaDecimal,u as isJsonSchemaEnum,Ge as isJsonSchemaInteger,pe as isJsonSchemaKeywords,f as isJsonSchemaLiteral,d as isJsonSchemaMap,ce as isJsonSchemaNativeEnum,je as isJsonSchemaNever,c as isJsonSchemaNull,Ae as isJsonSchemaNullable,oe as isJsonSchemaNumber,se as isJsonSchemaObject,le as isJsonSchemaPrimitiveType,ee as isJsonSchemaPrimitiveUnion,re as isJsonSchemaRecord,ae as isJsonSchemaRef,de as isJsonSchemaSet,Je as isJsonSchemaString,l as isJsonSchemaTuple,he as isJsonSchemaType,ne as isJsonSchemaUndefined,me as isJsonSchemaUnion,ge as isJsonSchemaUnknown,te as isNullOnlyJsonSchema,Be as isPropertyOptional,ie as isSchema,Se as isSchemaNullable,Le as isSchemaObject,p as isSchemaOf,m as isSchemaWithSource,_e as isStandardSchema,ve as isUntypedConfig,ue as isUntypedConfigStrict,s as isUntypedSchema,we as isUntypedSchemaStrict,He as isValibotSchema,Me as isValidSchemaConfigFile,Ze as mapStorageToFileSystem,Ue as merge,Ce as mergeMetadata,Xe as normalizeKey,ke as readSchemaTypes,Te as traverseSchema};
|
|
12
12
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -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
|
|
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
|
-
|
|
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 {
|
|
1341
|
-
//# sourceMappingURL=types-
|
|
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
|
|
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
|
-
|
|
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 {
|
|
1341
|
-
//# sourceMappingURL=types-
|
|
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/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BAAuB,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"}
|
package/dist/valibot.d.cts
CHANGED
package/dist/valibot.d.mts
CHANGED
package/dist/zod.d.cts
CHANGED
package/dist/zod.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@power-plant/schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Power Plant utility package to help managing schemas.",
|
|
6
6
|
"keywords": [
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
"untyped": "^1.5.2"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
|
143
|
-
"@powerlines/plugin-tsdown": "^0.1.
|
|
143
|
+
"@powerlines/plugin-tsdown": "^0.1.550",
|
|
144
144
|
"@types/node": "^25.9.5",
|
|
145
|
-
"powerlines": "^0.47.
|
|
145
|
+
"powerlines": "^0.47.149",
|
|
146
146
|
"valibot": "^1.4.2",
|
|
147
147
|
"zod": "^4.4.3"
|
|
148
148
|
},
|
|
@@ -163,5 +163,5 @@
|
|
|
163
163
|
"pathe": "2.0.3",
|
|
164
164
|
"ufo": "1.6.4"
|
|
165
165
|
},
|
|
166
|
-
"gitHead": "
|
|
166
|
+
"gitHead": "567dd1673a289b304fde97bdc939319fcd9f6208"
|
|
167
167
|
}
|
|
@@ -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-Dfjg_d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