@batijs/core 0.0.542 → 0.0.544
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/index.js +558 -562
- package/dist/{jiti-ZW3ADF2F.js → jiti-PKZMRTZN.js} +1 -1
- package/package.json +7 -7
|
@@ -14,7 +14,7 @@ Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=1
|
|
|
14
14
|
`;break;default:t+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},E.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(n.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
|
15
15
|
`&&++this.pos;case`
|
|
16
16
|
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},E.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return`
|
|
17
|
-
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Q(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"),t){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,e=this.input.charCodeAt(this.pos),s==="0"&&e!==56&&e!==57||!this.strict&&!t||this.invalidStringToken(this.pos-1-s.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return ut(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},E.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return i===null&&this.invalidStringToken(e,"Bad character escape sequence"),i},E.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(X(r,s))this.pos+=r<=65535?1:2;else{if(r!==92)break;this.containsEsc=!0,t+=this.input.slice(i,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();(e?K:X)(o,s)||this.invalidStringToken(a,"Invalid Unicode escape"),t+=Q(o),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},E.readWord=function(){var t=this.readWord1(),e=n.name;return this.keywords.test(t)&&(e=Jt[t]),this.finishToken(e,t)},N.acorn={Parser:N,version:"8.15.0",defaultOptions:Yt,Position:St,SourceLocation:Pt,getLineInfo:Ae,Node:Dt,TokenType:S,tokTypes:n,keywordTypes:Jt,TokContext:G,tokContexts:R,isIdentifierChar:X,isIdentifierStart:K,Token:re,isNewLine:ut,lineBreak:M,lineBreakG:Ki,nonASCIIwhitespace:Ie};let mt=B("module"),D=B("fs");String.fromCharCode;let ls=/\/$|\/\?|\/#/,us=/^\.?\//;function fs(t="",e){return e?ls.test(t):t.endsWith("/")}function ds(t="",e){if(!e)return t.endsWith("/")?t:t+"/";if(fs(t,!0))return t||"/";let i=t,s="",r=t.indexOf("#");if(r!==-1&&(i=t.slice(0,r),s=t.slice(r),!i))return s;let[a,...o]=i.split("?");return a+"/"+(o.length>0?`?${o.join("?")}`:"")+s}function ms(t){return t&&t!=="/"}function Qe(t,...e){let i=t||"";for(let s of e.filter(r=>ms(r)))if(i){let r=s.replace(us,"");i=ds(i)+r}else i=s;return i}Symbol.for("ufo:protocolRelative");let gs=/^[A-Za-z]:\//;function gt(t=""){return t&&t.replace(/\\/g,"/").replace(gs,e=>e.toUpperCase())}let xs=/^[/\\]{2}/,vs=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Ze=/^[A-Za-z]:$/,ys=/.(\.[^./]+|\.)$/,_s=function(t){if(t.length===0)return".";let e=(t=gt(t)).match(xs),i=at(t),s=t[t.length-1]==="/";return(t=Xe(t,!i)).length===0?i?"/":s?"./":".":(s&&(t+="/"),Ze.test(t)&&(t+="/"),e?i?`//${t}`:`//./${t}`:i&&!at(t)?`/${t}`:t)},it=function(...t){let e="";for(let i of t)if(i)if(e.length>0){let s=e[e.length-1]==="/",r=i[0]==="/";e+=s&&r?i.slice(1):s||r?i:`/${i}`}else e+=i;return _s(e)};function Es(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}let bs=function(...t){let e="",i=!1;for(let s=(t=t.map(r=>gt(r))).length-1;s>=-1&&!i;s--){let r=s>=0?t[s]:Es();r&&r.length!==0&&(e=`${r}/${e}`,i=at(r))}return e=Xe(e,!i),i&&!at(e)?`/${e}`:e.length>0?e:"."};function Xe(t,e){let i="",s=0,r=-1,a=0,o=null;for(let h=0;h<=t.length;++h){if(h<t.length)o=t[h];else{if(o==="/")break;o="/"}if(o==="/"){if(!(r===h-1||a===1))if(a===2){if(i.length<2||s!==2||i[i.length-1]!=="."||i[i.length-2]!=="."){if(i.length>2){let c=i.lastIndexOf("/");c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf("/")),r=h,a=0;continue}if(i.length>0){i="",s=0,r=h,a=0;continue}}e&&(i+=i.length>0?"/..":"..",s=2)}else i.length>0?i+=`/${t.slice(r+1,h)}`:i=t.slice(r+1,h),s=h-r-1;r=h,a=0}else o==="."&&a!==-1?++a:a=-1}return i}let at=function(t){return vs.test(t)},ti=function(t){if(t==="..")return"";let e=ys.exec(gt(t));return e&&e[1]||""},Mt=function(t){let e=gt(t).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&Ze.test(e[0])&&(e[0]+="/"),e.join("/")||(at(t)?"/":".")},ei=function(t,e){let i=gt(t).split("/"),s="";for(let r=i.length-1;r>=0;r--){let a=i[r];if(a){s=a;break}}return e&&s.endsWith(e)?s.slice(0,-e.length):s},g=B("url"),st=B("assert"),ot=B("process"),ne=B("path"),Ss=B("v8"),jt=B("util"),ii=new Set(mt.builtinModules);function ae(t){return t.replace(/\\/g,"/")}let Cs={}.hasOwnProperty,Is=/^([A-Z][a-z\d]*)+$/,ks=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),V={};function oe(t,e="and"){return t.length<3?t.join(` ${e} `):`${t.slice(0,-1).join(", ")}, ${e} ${t[t.length-1]}`}let si=new Map,ri;function W(t,e,i){return si.set(t,e),(function(s,r){return a;function a(...o){let h=Error.stackTraceLimit;he()&&(Error.stackTraceLimit=0);let c=new s;he()&&(Error.stackTraceLimit=h);let l=(function(p,f,u){let v=si.get(p);if(st(v!==void 0,"expected `message` to be found"),typeof v=="function")return st(v.length<=f.length,`Code: ${p}; The provided arguments length (${f.length}) does not match the required ones (${v.length}).`),Reflect.apply(v,u,f);let w=/%[dfijoOs]/g,y=0;for(;w.exec(v)!==null;)y++;return st(y===f.length,`Code: ${p}; The provided arguments length (${f.length}) does not match the required ones (${y}).`),f.length===0?v:(f.unshift(v),Reflect.apply(jt.format,null,f))})(r,o,c);return Object.defineProperties(c,{message:{value:l,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${r}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),ws(c),c.code=r,c}})(i,t)}function he(){try{if(Ss.startupSnapshot.isBuildingSnapshot())return!1}catch{}let t=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return t===void 0?Object.isExtensible(Error):Cs.call(t,"writable")&&t.writable!==void 0?t.writable:t.set!==void 0}V.ERR_INVALID_ARG_TYPE=W("ERR_INVALID_ARG_TYPE",(t,e,i)=>{st(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let s="The ";if(t.endsWith(" argument"))s+=`${t} `;else{let h=t.includes(".")?"property":"argument";s+=`"${t}" ${h} `}s+="must be ";let r=[],a=[],o=[];for(let h of e)st(typeof h=="string","All expected entries have to be of type string"),ks.has(h)?r.push(h.toLowerCase()):Is.exec(h)===null?(st(h!=="object",'The value "object" should be written as "Object"'),o.push(h)):a.push(h);if(a.length>0){let h=r.indexOf("object");h!==-1&&(r.slice(h,1),a.push("Object"))}return r.length>0&&(s+=`${r.length>1?"one of type":"of type"} ${oe(r,"or")}`,(a.length>0||o.length>0)&&(s+=" or ")),a.length>0&&(s+=`an instance of ${oe(a,"or")}`,o.length>0&&(s+=" or ")),o.length>0&&(o.length>1?s+=`one of ${oe(o,"or")}`:(o[0].toLowerCase()!==o[0]&&(s+="an "),s+=`${o[0]}`)),s+=`. Received ${(function(h){if(h==null)return String(h);if(typeof h=="function"&&h.name)return`function ${h.name}`;if(typeof h=="object")return h.constructor&&h.constructor.name?`an instance of ${h.constructor.name}`:`${(0,jt.inspect)(h,{depth:-1})}`;let c=(0,jt.inspect)(h,{colors:!1});return c.length>28&&(c=`${c.slice(0,25)}...`),`type ${typeof h} (${c})`})(i)}`,s},TypeError),V.ERR_INVALID_MODULE_SPECIFIER=W("ERR_INVALID_MODULE_SPECIFIER",(t,e,i=void 0)=>`Invalid module "${t}" ${e}${i?` imported from ${i}`:""}`,TypeError),V.ERR_INVALID_PACKAGE_CONFIG=W("ERR_INVALID_PACKAGE_CONFIG",(t,e,i)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${i?`. ${i}`:""}`,Error),V.ERR_INVALID_PACKAGE_TARGET=W("ERR_INVALID_PACKAGE_TARGET",(t,e,i,s=!1,r=void 0)=>{let a=typeof i=="string"&&!s&&i.length>0&&!i.startsWith("./");return e==="."?(st(s===!1),`Invalid "exports" main target ${JSON.stringify(i)} defined in the package config ${t}package.json${r?` imported from ${r}`:""}${a?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${JSON.stringify(i)} defined for '${e}' in the package config ${t}package.json${r?` imported from ${r}`:""}${a?'; targets must start with "./"':""}`},Error),V.ERR_MODULE_NOT_FOUND=W("ERR_MODULE_NOT_FOUND",(t,e,i=!1)=>`Cannot find ${i?"module":"package"} '${t}' imported from ${e}`,Error),V.ERR_NETWORK_IMPORT_DISALLOWED=W("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error),V.ERR_PACKAGE_IMPORT_NOT_DEFINED=W("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,i)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${i}`,TypeError),V.ERR_PACKAGE_PATH_NOT_EXPORTED=W("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,i=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${i?` imported from ${i}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${i?` imported from ${i}`:""}`,Error),V.ERR_UNSUPPORTED_DIR_IMPORT=W("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error),V.ERR_UNSUPPORTED_RESOLVE_REQUEST=W("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),V.ERR_UNKNOWN_FILE_EXTENSION=W("ERR_UNKNOWN_FILE_EXTENSION",(t,e)=>`Unknown file extension "${t}" for ${e}`,TypeError),V.ERR_INVALID_ARG_VALUE=W("ERR_INVALID_ARG_VALUE",(t,e,i="is invalid")=>{let s=(0,jt.inspect)(e);return s.length>128&&(s=`${s.slice(0,128)}...`),`The ${t.includes(".")?"property":"argument"} '${t}' ${i}. Received ${s}`},TypeError);let ws=(function(t){let e="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:e}),t})(function(t){let e=he();return e&&(ri=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(t),e&&(Error.stackTraceLimit=ri),t}),kt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:Rs}=V,ni=new Map;function ai(t,{base:e,specifier:i}){let s=ni.get(t);if(s)return s;let r;try{r=D.readFileSync(ne.toNamespacedPath(t),"utf8")}catch(o){let h=o;if(h.code!=="ENOENT")throw h}let a={exists:!1,pjsonPath:t,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(r!==void 0){let o;try{o=JSON.parse(r)}catch(h){let c=h,l=new Rs(t,(e?`"${i}" from `:"")+(0,g.fileURLToPath)(e||i),c.message);throw l.cause=c,l}a.exists=!0,kt.call(o,"name")&&typeof o.name=="string"&&(a.name=o.name),kt.call(o,"main")&&typeof o.main=="string"&&(a.main=o.main),kt.call(o,"exports")&&(a.exports=o.exports),kt.call(o,"imports")&&(a.imports=o.imports),!kt.call(o,"type")||o.type!=="commonjs"&&o.type!=="module"||(a.type=o.type)}return ni.set(t,a),a}function ce(t){let e=new URL("package.json",t);for(;!e.pathname.endsWith("node_modules/package.json");){let i=ai((0,g.fileURLToPath)(e),{specifier:t});if(i.exists)return i;let s=e;if(e=new URL("../package.json",e),e.pathname===s.pathname)break}return{pjsonPath:(0,g.fileURLToPath)(e),exists:!1,type:"none"}}function oi(t){return ce(t).type}let{ERR_UNKNOWN_FILE_EXTENSION:As}=V,Ts={}.hasOwnProperty,Ps={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"},hi={__proto__:null,"data:":function(t){let{1:e}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(t.pathname)||[null,null,null];return(function(i){return i&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(i)?"module":i==="application/json"?"json":null})(e)},"file:":function(t,e,i){let s=(function(o){let h=o.pathname,c=h.length;for(;c--;){let l=h.codePointAt(c);if(l===47)return"";if(l===46)return h.codePointAt(c-1)===47?"":h.slice(c)}return""})(t);if(s===".js"){let o=oi(t);return o!=="none"?o:"commonjs"}if(s===""){let o=oi(t);return o==="none"||o==="commonjs"?"commonjs":"module"}let r=Ps[s];if(r)return r;if(i)return;let a=(0,g.fileURLToPath)(t);throw new As(s,a)},"http:":ci,"https:":ci,"node:":()=>"builtin"};function ci(){}let Bt=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:Ft,ERR_INVALID_PACKAGE_CONFIG:pi,ERR_INVALID_PACKAGE_TARGET:Ns,ERR_MODULE_NOT_FOUND:pe,ERR_PACKAGE_IMPORT_NOT_DEFINED:Ls,ERR_PACKAGE_PATH_NOT_EXPORTED:Os,ERR_UNSUPPORTED_DIR_IMPORT:Ds,ERR_UNSUPPORTED_RESOLVE_REQUEST:li}=V,ui={}.hasOwnProperty,fi=/(^|\\|\/)((\.|%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,di=/(^|\\|\/)((\.|%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,Vs=/^\.|%|\\/,$t=/\*/g,Us=/%2f|%5c/i,mi=new Set,Ms=/[/\\]{2}/;function gi(t,e,i,s,r,a,o){if(ot.noDeprecation)return;let h=(0,g.fileURLToPath)(s),c=Ms.exec(o?t:e)!==null;ot.emitWarning(`Use of deprecated ${c?"double slash":"leading or trailing slash matching"} resolving "${t}" for module request "${e}" ${e===i?"":`matched to "${i}" `}in the "${r?"imports":"exports"}" field module resolution of the package at ${h}${a?` imported from ${(0,g.fileURLToPath)(a)}`:""}.`,"DeprecationWarning","DEP0166")}function xi(t,e,i,s){if(ot.noDeprecation||(function(c,l){let p=c.protocol;return Ts.call(hi,p)&&hi[p](c,l,!0)||null})(t,{parentURL:i.href})!=="module")return;let a=(0,g.fileURLToPath)(t.href),o=(0,g.fileURLToPath)(new g.URL(".",e)),h=(0,g.fileURLToPath)(i);s?ne.resolve(o,s)!==a&&ot.emitWarning(`Package ${o} has a "main" field set to "${s}", excluding the full filename and extension to the resolved file at "${a.slice(o.length)}", imported from ${h}.
|
|
17
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Q(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"),t){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,e=this.input.charCodeAt(this.pos),s==="0"&&e!==56&&e!==57||!this.strict&&!t||this.invalidStringToken(this.pos-1-s.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return ut(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},E.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return i===null&&this.invalidStringToken(e,"Bad character escape sequence"),i},E.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(X(r,s))this.pos+=r<=65535?1:2;else{if(r!==92)break;this.containsEsc=!0,t+=this.input.slice(i,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();(e?K:X)(o,s)||this.invalidStringToken(a,"Invalid Unicode escape"),t+=Q(o),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},E.readWord=function(){var t=this.readWord1(),e=n.name;return this.keywords.test(t)&&(e=Jt[t]),this.finishToken(e,t)},N.acorn={Parser:N,version:"8.15.0",defaultOptions:Yt,Position:St,SourceLocation:Pt,getLineInfo:Ae,Node:Dt,TokenType:S,tokTypes:n,keywordTypes:Jt,TokContext:G,tokContexts:R,isIdentifierChar:X,isIdentifierStart:K,Token:re,isNewLine:ut,lineBreak:M,lineBreakG:Ki,nonASCIIwhitespace:Ie};let mt=B("module"),D=B("fs");String.fromCharCode;let ls=/\/$|\/\?|\/#/,us=/^\.?\//;function fs(t="",e){return e?ls.test(t):t.endsWith("/")}function ds(t="",e){if(!e)return t.endsWith("/")?t:t+"/";if(fs(t,!0))return t||"/";let i=t,s="",r=t.indexOf("#");if(r!==-1&&(i=t.slice(0,r),s=t.slice(r),!i))return s;let[a,...o]=i.split("?");return a+"/"+(o.length>0?`?${o.join("?")}`:"")+s}function ms(t){return t&&t!=="/"}function Qe(t,...e){let i=t||"";for(let s of e.filter(r=>ms(r)))if(i){let r=s.replace(us,"");i=ds(i)+r}else i=s;return i}let gs=/^[A-Za-z]:\//;function gt(t=""){return t&&t.replace(/\\/g,"/").replace(gs,e=>e.toUpperCase())}let xs=/^[/\\]{2}/,vs=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Ze=/^[A-Za-z]:$/,ys=/.(\.[^./]+|\.)$/,_s=function(t){if(t.length===0)return".";let e=(t=gt(t)).match(xs),i=at(t),s=t[t.length-1]==="/";return(t=Xe(t,!i)).length===0?i?"/":s?"./":".":(s&&(t+="/"),Ze.test(t)&&(t+="/"),e?i?`//${t}`:`//./${t}`:i&&!at(t)?`/${t}`:t)},it=function(...t){let e="";for(let i of t)if(i)if(e.length>0){let s=e[e.length-1]==="/",r=i[0]==="/";e+=s&&r?i.slice(1):s||r?i:`/${i}`}else e+=i;return _s(e)};function Es(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}let bs=function(...t){let e="",i=!1;for(let s=(t=t.map(r=>gt(r))).length-1;s>=-1&&!i;s--){let r=s>=0?t[s]:Es();r&&r.length!==0&&(e=`${r}/${e}`,i=at(r))}return e=Xe(e,!i),i&&!at(e)?`/${e}`:e.length>0?e:"."};function Xe(t,e){let i="",s=0,r=-1,a=0,o=null;for(let h=0;h<=t.length;++h){if(h<t.length)o=t[h];else{if(o==="/")break;o="/"}if(o==="/"){if(!(r===h-1||a===1))if(a===2){if(i.length<2||s!==2||i[i.length-1]!=="."||i[i.length-2]!=="."){if(i.length>2){let c=i.lastIndexOf("/");c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf("/")),r=h,a=0;continue}if(i.length>0){i="",s=0,r=h,a=0;continue}}e&&(i+=i.length>0?"/..":"..",s=2)}else i.length>0?i+=`/${t.slice(r+1,h)}`:i=t.slice(r+1,h),s=h-r-1;r=h,a=0}else o==="."&&a!==-1?++a:a=-1}return i}let at=function(t){return vs.test(t)},ti=function(t){if(t==="..")return"";let e=ys.exec(gt(t));return e&&e[1]||""},Mt=function(t){let e=gt(t).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&Ze.test(e[0])&&(e[0]+="/"),e.join("/")||(at(t)?"/":".")},ei=function(t,e){let i=gt(t).split("/"),s="";for(let r=i.length-1;r>=0;r--){let a=i[r];if(a){s=a;break}}return e&&s.endsWith(e)?s.slice(0,-e.length):s},g=B("url"),st=B("assert"),ot=B("process"),ne=B("path"),Ss=B("v8"),jt=B("util"),ii=new Set(mt.builtinModules);function ae(t){return t.replace(/\\/g,"/")}let Cs={}.hasOwnProperty,Is=/^([A-Z][a-z\d]*)+$/,ks=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),V={};function oe(t,e="and"){return t.length<3?t.join(` ${e} `):`${t.slice(0,-1).join(", ")}, ${e} ${t[t.length-1]}`}let si=new Map,ri;function W(t,e,i){return si.set(t,e),(function(s,r){return a;function a(...o){let h=Error.stackTraceLimit;he()&&(Error.stackTraceLimit=0);let c=new s;he()&&(Error.stackTraceLimit=h);let l=(function(p,f,u){let v=si.get(p);if(st(v!==void 0,"expected `message` to be found"),typeof v=="function")return st(v.length<=f.length,`Code: ${p}; The provided arguments length (${f.length}) does not match the required ones (${v.length}).`),Reflect.apply(v,u,f);let w=/%[dfijoOs]/g,y=0;for(;w.exec(v)!==null;)y++;return st(y===f.length,`Code: ${p}; The provided arguments length (${f.length}) does not match the required ones (${y}).`),f.length===0?v:(f.unshift(v),Reflect.apply(jt.format,null,f))})(r,o,c);return Object.defineProperties(c,{message:{value:l,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${r}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),ws(c),c.code=r,c}})(i,t)}function he(){try{if(Ss.startupSnapshot.isBuildingSnapshot())return!1}catch{}let t=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return t===void 0?Object.isExtensible(Error):Cs.call(t,"writable")&&t.writable!==void 0?t.writable:t.set!==void 0}V.ERR_INVALID_ARG_TYPE=W("ERR_INVALID_ARG_TYPE",(t,e,i)=>{st(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let s="The ";if(t.endsWith(" argument"))s+=`${t} `;else{let h=t.includes(".")?"property":"argument";s+=`"${t}" ${h} `}s+="must be ";let r=[],a=[],o=[];for(let h of e)st(typeof h=="string","All expected entries have to be of type string"),ks.has(h)?r.push(h.toLowerCase()):Is.exec(h)===null?(st(h!=="object",'The value "object" should be written as "Object"'),o.push(h)):a.push(h);if(a.length>0){let h=r.indexOf("object");h!==-1&&(r.slice(h,1),a.push("Object"))}return r.length>0&&(s+=`${r.length>1?"one of type":"of type"} ${oe(r,"or")}`,(a.length>0||o.length>0)&&(s+=" or ")),a.length>0&&(s+=`an instance of ${oe(a,"or")}`,o.length>0&&(s+=" or ")),o.length>0&&(o.length>1?s+=`one of ${oe(o,"or")}`:(o[0].toLowerCase()!==o[0]&&(s+="an "),s+=`${o[0]}`)),s+=`. Received ${(function(h){if(h==null)return String(h);if(typeof h=="function"&&h.name)return`function ${h.name}`;if(typeof h=="object")return h.constructor&&h.constructor.name?`an instance of ${h.constructor.name}`:`${(0,jt.inspect)(h,{depth:-1})}`;let c=(0,jt.inspect)(h,{colors:!1});return c.length>28&&(c=`${c.slice(0,25)}...`),`type ${typeof h} (${c})`})(i)}`,s},TypeError),V.ERR_INVALID_MODULE_SPECIFIER=W("ERR_INVALID_MODULE_SPECIFIER",(t,e,i=void 0)=>`Invalid module "${t}" ${e}${i?` imported from ${i}`:""}`,TypeError),V.ERR_INVALID_PACKAGE_CONFIG=W("ERR_INVALID_PACKAGE_CONFIG",(t,e,i)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${i?`. ${i}`:""}`,Error),V.ERR_INVALID_PACKAGE_TARGET=W("ERR_INVALID_PACKAGE_TARGET",(t,e,i,s=!1,r=void 0)=>{let a=typeof i=="string"&&!s&&i.length>0&&!i.startsWith("./");return e==="."?(st(s===!1),`Invalid "exports" main target ${JSON.stringify(i)} defined in the package config ${t}package.json${r?` imported from ${r}`:""}${a?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${JSON.stringify(i)} defined for '${e}' in the package config ${t}package.json${r?` imported from ${r}`:""}${a?'; targets must start with "./"':""}`},Error),V.ERR_MODULE_NOT_FOUND=W("ERR_MODULE_NOT_FOUND",(t,e,i=!1)=>`Cannot find ${i?"module":"package"} '${t}' imported from ${e}`,Error),V.ERR_NETWORK_IMPORT_DISALLOWED=W("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error),V.ERR_PACKAGE_IMPORT_NOT_DEFINED=W("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,i)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${i}`,TypeError),V.ERR_PACKAGE_PATH_NOT_EXPORTED=W("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,i=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${i?` imported from ${i}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${i?` imported from ${i}`:""}`,Error),V.ERR_UNSUPPORTED_DIR_IMPORT=W("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error),V.ERR_UNSUPPORTED_RESOLVE_REQUEST=W("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),V.ERR_UNKNOWN_FILE_EXTENSION=W("ERR_UNKNOWN_FILE_EXTENSION",(t,e)=>`Unknown file extension "${t}" for ${e}`,TypeError),V.ERR_INVALID_ARG_VALUE=W("ERR_INVALID_ARG_VALUE",(t,e,i="is invalid")=>{let s=(0,jt.inspect)(e);return s.length>128&&(s=`${s.slice(0,128)}...`),`The ${t.includes(".")?"property":"argument"} '${t}' ${i}. Received ${s}`},TypeError);let ws=(function(t){let e="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:e}),t})(function(t){let e=he();return e&&(ri=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(t),e&&(Error.stackTraceLimit=ri),t}),kt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:Rs}=V,ni=new Map;function ai(t,{base:e,specifier:i}){let s=ni.get(t);if(s)return s;let r;try{r=D.readFileSync(ne.toNamespacedPath(t),"utf8")}catch(o){let h=o;if(h.code!=="ENOENT")throw h}let a={exists:!1,pjsonPath:t,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(r!==void 0){let o;try{o=JSON.parse(r)}catch(h){let c=h,l=new Rs(t,(e?`"${i}" from `:"")+(0,g.fileURLToPath)(e||i),c.message);throw l.cause=c,l}a.exists=!0,kt.call(o,"name")&&typeof o.name=="string"&&(a.name=o.name),kt.call(o,"main")&&typeof o.main=="string"&&(a.main=o.main),kt.call(o,"exports")&&(a.exports=o.exports),kt.call(o,"imports")&&(a.imports=o.imports),!kt.call(o,"type")||o.type!=="commonjs"&&o.type!=="module"||(a.type=o.type)}return ni.set(t,a),a}function ce(t){let e=new URL("package.json",t);for(;!e.pathname.endsWith("node_modules/package.json");){let i=ai((0,g.fileURLToPath)(e),{specifier:t});if(i.exists)return i;let s=e;if(e=new URL("../package.json",e),e.pathname===s.pathname)break}return{pjsonPath:(0,g.fileURLToPath)(e),exists:!1,type:"none"}}function oi(t){return ce(t).type}let{ERR_UNKNOWN_FILE_EXTENSION:As}=V,Ts={}.hasOwnProperty,Ps={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"},hi={__proto__:null,"data:":function(t){let{1:e}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(t.pathname)||[null,null,null];return(function(i){return i&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(i)?"module":i==="application/json"?"json":null})(e)},"file:":function(t,e,i){let s=(function(o){let h=o.pathname,c=h.length;for(;c--;){let l=h.codePointAt(c);if(l===47)return"";if(l===46)return h.codePointAt(c-1)===47?"":h.slice(c)}return""})(t);if(s===".js"){let o=oi(t);return o!=="none"?o:"commonjs"}if(s===""){let o=oi(t);return o==="none"||o==="commonjs"?"commonjs":"module"}let r=Ps[s];if(r)return r;if(i)return;let a=(0,g.fileURLToPath)(t);throw new As(s,a)},"http:":ci,"https:":ci,"node:":()=>"builtin"};function ci(){}let Bt=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:Ft,ERR_INVALID_PACKAGE_CONFIG:pi,ERR_INVALID_PACKAGE_TARGET:Ns,ERR_MODULE_NOT_FOUND:pe,ERR_PACKAGE_IMPORT_NOT_DEFINED:Ls,ERR_PACKAGE_PATH_NOT_EXPORTED:Os,ERR_UNSUPPORTED_DIR_IMPORT:Ds,ERR_UNSUPPORTED_RESOLVE_REQUEST:li}=V,ui={}.hasOwnProperty,fi=/(^|\\|\/)((\.|%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,di=/(^|\\|\/)((\.|%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,Vs=/^\.|%|\\/,$t=/\*/g,Us=/%2f|%5c/i,mi=new Set,Ms=/[/\\]{2}/;function gi(t,e,i,s,r,a,o){if(ot.noDeprecation)return;let h=(0,g.fileURLToPath)(s),c=Ms.exec(o?t:e)!==null;ot.emitWarning(`Use of deprecated ${c?"double slash":"leading or trailing slash matching"} resolving "${t}" for module request "${e}" ${e===i?"":`matched to "${i}" `}in the "${r?"imports":"exports"}" field module resolution of the package at ${h}${a?` imported from ${(0,g.fileURLToPath)(a)}`:""}.`,"DeprecationWarning","DEP0166")}function xi(t,e,i,s){if(ot.noDeprecation||(function(c,l){let p=c.protocol;return Ts.call(hi,p)&&hi[p](c,l,!0)||null})(t,{parentURL:i.href})!=="module")return;let a=(0,g.fileURLToPath)(t.href),o=(0,g.fileURLToPath)(new g.URL(".",e)),h=(0,g.fileURLToPath)(i);s?ne.resolve(o,s)!==a&&ot.emitWarning(`Package ${o} has a "main" field set to "${s}", excluding the full filename and extension to the resolved file at "${a.slice(o.length)}", imported from ${h}.
|
|
18
18
|
Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):ot.emitWarning(`No "main" or "exports" field defined in the package.json for ${o} resolving the main entry point "${a.slice(o.length)}", imported from ${h}.
|
|
19
19
|
Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function vi(t){try{return(0,D.statSync)(t)}catch{}}function le(t){let e=(0,D.statSync)(t,{throwIfNoEntry:!1}),i=e?e.isFile():void 0;return i!=null&&i}function js(t,e,i){let s;if(e.main!==void 0){if(s=new g.URL(e.main,t),le(s))return s;let o=[`./${e.main}.js`,`./${e.main}.json`,`./${e.main}.node`,`./${e.main}/index.js`,`./${e.main}/index.json`,`./${e.main}/index.node`],h=-1;for(;++h<o.length&&(s=new g.URL(o[h],t),!le(s));)s=void 0;if(s)return xi(s,t,i,e.main),s}let r=["./index.js","./index.json","./index.node"],a=-1;for(;++a<r.length&&(s=new g.URL(r[a],t),!le(s));)s=void 0;if(s)return xi(s,t,i,e.main),s;throw new pe((0,g.fileURLToPath)(new g.URL(".",t)),(0,g.fileURLToPath)(i))}function ue(t,e,i){return new Os((0,g.fileURLToPath)(new g.URL(".",e)),t,i&&(0,g.fileURLToPath)(i))}function wt(t,e,i,s,r){return e=typeof e=="object"&&e!==null?JSON.stringify(e,null,""):`${e}`,new Ns((0,g.fileURLToPath)(new g.URL(".",i)),t,e,s,r&&(0,g.fileURLToPath)(r))}function Bs(t,e,i,s,r,a,o,h,c){if(e!==""&&!a&&t[t.length-1]!=="/")throw wt(i,t,s,o,r);if(!t.startsWith("./")){if(o&&!t.startsWith("../")&&!t.startsWith("/")){let u=!1;try{new g.URL(t),u=!0}catch{}if(!u)return Ei(a?Bt.call($t,t,()=>e):t+e,s,c)}throw wt(i,t,s,o,r)}if(fi.exec(t.slice(2))!==null){if(di.exec(t.slice(2))!==null)throw wt(i,t,s,o,r);if(!h){let u=a?i.replace("*",()=>e):i+e;gi(a?Bt.call($t,t,()=>e):t,u,i,s,o,r,!0)}}let l=new g.URL(t,s),p=l.pathname,f=new g.URL(".",s).pathname;if(!p.startsWith(f))throw wt(i,t,s,o,r);if(e==="")return l;if(fi.exec(e)!==null){let u=a?i.replace("*",()=>e):i+e;di.exec(e)===null?h||gi(a?Bt.call($t,t,()=>e):t,u,i,s,o,r,!1):(function(v,w,y,I,C){let k=`request is not a valid match in pattern "${w}" for the "${I?"imports":"exports"}" resolution of ${(0,g.fileURLToPath)(y)}`;throw new Ft(v,k,C&&(0,g.fileURLToPath)(C))})(u,i,s,o,r)}return a?new g.URL(Bt.call($t,l.href,()=>e)):new g.URL(e,l)}function Fs(t){let e=Number(t);return`${e}`===t&&e>=0&&e<4294967295}function xt(t,e,i,s,r,a,o,h,c){if(typeof e=="string")return Bs(e,i,s,t,r,a,o,h,c);if(Array.isArray(e)){let l=e;if(l.length===0)return null;let p,f=-1;for(;++f<l.length;){let u=l[f],v;try{v=xt(t,u,i,s,r,a,o,h,c)}catch(w){if(p=w,w.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw w}if(v!==void 0){if(v!==null)return v;p=null}}if(p==null)return null;throw p}if(typeof e=="object"&&e!==null){let l=Object.getOwnPropertyNames(e),p=-1;for(;++p<l.length;)if(Fs(l[p]))throw new pi((0,g.fileURLToPath)(t),r,'"exports" cannot contain numeric property keys.');for(p=-1;++p<l.length;){let f=l[p];if(f==="default"||c&&c.has(f)){let u=xt(t,e[f],i,s,r,a,o,h,c);if(u===void 0)continue;return u}}return null}if(e===null)return null;throw wt(s,e,t,o,r)}function $s(t,e,i){if(ot.noDeprecation)return;let s=(0,g.fileURLToPath)(e);mi.has(s+"|"+t)||(mi.add(s+"|"+t),ot.emitWarning(`Use of deprecated trailing slash pattern mapping "${t}" in the "exports" field module resolution of the package at ${s}${i?` imported from ${(0,g.fileURLToPath)(i)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function yi(t,e,i,s,r){let a=i.exports;if((function(p,f,u){if(typeof p=="string"||Array.isArray(p))return!0;if(typeof p!="object"||p===null)return!1;let v=Object.getOwnPropertyNames(p),w=!1,y=0,I=-1;for(;++I<v.length;){let C=v[I],k=C===""||C[0]!==".";if(y++===0)w=k;else if(w!==k)throw new pi((0,g.fileURLToPath)(f),u,`"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 w})(a,t,s)&&(a={".":a}),ui.call(a,e)&&!e.includes("*")&&!e.endsWith("/")){let p=xt(t,a[e],"",e,s,!1,!1,!1,r);if(p==null)throw ue(e,t,s);return p}let o="",h="",c=Object.getOwnPropertyNames(a),l=-1;for(;++l<c.length;){let p=c[l],f=p.indexOf("*");if(f!==-1&&e.startsWith(p.slice(0,f))){e.endsWith("/")&&$s(e,t,s);let u=p.slice(f+1);e.length>=p.length&&e.endsWith(u)&&_i(o,p)===1&&p.lastIndexOf("*")===f&&(o=p,h=e.slice(f,e.length-u.length))}}if(o){let p=xt(t,a[o],h,o,s,!0,!1,e.endsWith("/"),r);if(p==null)throw ue(e,t,s);return p}throw ue(e,t,s)}function _i(t,e){let i=t.indexOf("*"),s=e.indexOf("*"),r=i===-1?t.length:i+1,a=s===-1?e.length:s+1;return r>a?-1:a>r||i===-1?1:s===-1||t.length>e.length?-1:e.length>t.length?1:0}function qs(t,e,i){if(t==="#"||t.startsWith("#/")||t.endsWith("/"))throw new Ft(t,"is not a valid internal imports specifier name",(0,g.fileURLToPath)(e));let s,r=ce(e);if(r.exists){s=(0,g.pathToFileURL)(r.pjsonPath);let a=r.imports;if(a)if(ui.call(a,t)&&!t.includes("*")){let o=xt(s,a[t],"",t,e,!1,!0,!1,i);if(o!=null)return o}else{let o="",h="",c=Object.getOwnPropertyNames(a),l=-1;for(;++l<c.length;){let p=c[l],f=p.indexOf("*");if(f!==-1&&t.startsWith(p.slice(0,-1))){let u=p.slice(f+1);t.length>=p.length&&t.endsWith(u)&&_i(o,p)===1&&p.lastIndexOf("*")===f&&(o=p,h=t.slice(f,t.length-u.length))}}if(o){let p=xt(s,a[o],h,o,e,!0,!0,!1,i);if(p!=null)return p}}}throw(function(a,o,h){return new Ls(a,o&&(0,g.fileURLToPath)(new g.URL(".",o)),(0,g.fileURLToPath)(h))})(t,s,e)}function Ei(t,e,i){if(mt.builtinModules.includes(t))return new g.URL("node:"+t);let{packageName:s,packageSubpath:r,isScoped:a}=(function(p,f){let u=p.indexOf("/"),v=!0,w=!1;p[0]==="@"&&(w=!0,u===-1||p.length===0?v=!1:u=p.indexOf("/",u+1));let y=u===-1?p:p.slice(0,u);if(Vs.exec(y)!==null&&(v=!1),!v)throw new Ft(p,"is not a valid package name",(0,g.fileURLToPath)(f));return{packageName:y,packageSubpath:"."+(u===-1?"":p.slice(u)),isScoped:w}})(t,e),o=ce(e);if(o.exists){let p=(0,g.pathToFileURL)(o.pjsonPath);if(o.name===s&&o.exports!==void 0&&o.exports!==null)return yi(p,r,o,e,i)}let h,c=new g.URL("./node_modules/"+s+"/package.json",e),l=(0,g.fileURLToPath)(c);do{let p=vi(l.slice(0,-13));if(!p||!p.isDirectory()){h=l,c=new g.URL((a?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",c),l=(0,g.fileURLToPath)(c);continue}let f=ai(l,{base:e,specifier:t});return f.exports!==void 0&&f.exports!==null?yi(c,r,f,e,i):r==="."?js(c,f,e):new g.URL(r,c)}while(l.length!==h.length);throw new pe(s,(0,g.fileURLToPath)(e),!1)}function Ws(t,e,i,s){let r=e.protocol,a=r==="data:"||r==="http:"||r==="https:",o;if((function(h){return h!==""&&(h[0]==="/"||(function(c){return c[0]==="."&&(c.length===1||c[1]==="/"||c[1]==="."&&(c.length===2||c[2]==="/"))})(h))})(t))try{o=new g.URL(t,e)}catch(h){let c=new li(t,e);throw c.cause=h,c}else if(r==="file:"&&t[0]==="#")o=qs(t,e,i);else try{o=new g.URL(t)}catch(h){if(a&&!mt.builtinModules.includes(t)){let c=new li(t,e);throw c.cause=h,c}o=Ei(t,e,i)}return st(o!==void 0,"expected to be defined"),o.protocol!=="file:"?o:(function(h,c){if(Us.exec(h.pathname)!==null)throw new Ft(h.pathname,'must not include encoded "/" or "\\" characters',(0,g.fileURLToPath)(c));let l;try{l=(0,g.fileURLToPath)(h)}catch(f){let u=f;throw Object.defineProperty(u,"input",{value:String(h)}),Object.defineProperty(u,"module",{value:String(c)}),u}let p=vi(l.endsWith("/")?l.slice(-1):l);if(p&&p.isDirectory()){let f=new Ds(l,(0,g.fileURLToPath)(c));throw f.url=String(h),f}if(!p||!p.isFile()){let f=new pe(l||h.pathname,c&&(0,g.fileURLToPath)(c),!0);throw f.url=String(h),f}{let f=(0,D.realpathSync)(l),{search:u,hash:v}=h;(h=(0,g.pathToFileURL)(f+(l.endsWith(ne.sep)?"/":""))).search=u,h.hash=v}return h})(o,e)}function Rt(t){return typeof t!="string"||t.startsWith("file://")?ae((0,g.fileURLToPath)(t)):ae(t)}function vt(t){return(0,g.pathToFileURL)(Rt(t)).toString()}let Gs=new Set(["node","import"]),Hs=[".mjs",".cjs",".js",".json"],Ks=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function bi(t,e,i){try{return Ws(t,e,i)}catch(s){if(!Ks.has(s?.code))throw s}}function zs(t,e={}){if(typeof t!="string"){if(!(t instanceof URL))throw new TypeError("input must be a `string` or `URL`");t=Rt(t)}if(/(?:node|data|http|https):/.test(t))return t;if(ii.has(t))return"node:"+t;if(t.startsWith("file://")&&(t=Rt(t)),at(t))try{if((0,D.statSync)(t).isFile())return vt(t)}catch(o){if(o?.code!=="ENOENT")throw o}let i=e.conditions?new Set(e.conditions):Gs,s=(Array.isArray(e.url)?e.url:[e.url]).filter(Boolean).map(o=>new URL((function(h){return typeof h!="string"&&(h=h.toString()),/(?:node|data|http|https|file):/.test(h)?h:ii.has(h)?"node:"+h:"file://"+encodeURI(ae(h))})(o.toString())));s.length===0&&s.push(new URL(vt(process.cwd())));let r=[...s];for(let o of s)o.protocol==="file:"&&r.push(new URL("./",o),new URL(Qe(o.pathname,"_index.js"),o),new URL("node_modules",o));let a;for(let o of r){if(a=bi(t,o,i),a)break;for(let h of["","/index"]){for(let c of e.extensions||Hs)if(a=bi(Qe(t,h)+c,o,i),a)break;if(a)break}if(a)break}if(!a){let o=new Error(`Cannot find module ${t} imported from ${r.join(", ")}`);throw o.code="ERR_MODULE_NOT_FOUND",o}return vt(a)}function Js(t,e){return zs(t,e)}function Ys(t,e){return Rt(Js(t,e))}let Qs=/(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,Zs=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function Xs(t,e={}){return e.stripComments&&(t=t.replace(Zs,"")),Qs.test(t)}function Si(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}let tr=new Set(["/","\\",void 0]),Ci=Symbol.for("pathe:normalizedAlias"),er=/[/\\]/;function Ii(t){if(t[Ci])return t;let e=Object.fromEntries(Object.entries(t).sort(([i],[s])=>(function(r,a){return a.split("/").length-r.split("/").length})(i,s)));for(let i in e)for(let s in e)s===i||i.startsWith(s)||e[i]?.startsWith(s)&&tr.has(e[i][s.length])&&(e[i]=e[s]+e[i].slice(s.length));return Object.defineProperty(e,Ci,{value:!0,enumerable:!1}),e}function ki(t="/"){let e=t[t.length-1];return e==="/"||e==="\\"}var ir={rE:"2.6.1"};let sr=B("crypto");var fe=H.n(sr);let qt=Object.create(null),At=t=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?qt:globalThis),rt=new Proxy(qt,{get:(t,e)=>At()[e]??qt[e],has:(t,e)=>e in At()||e in qt,set:(t,e,i)=>(At(!0)[e]=i,!0),deleteProperty(t,e){return e?(delete At(!0)[e],!0):!1},ownKeys(){let t=At(!0);return Object.keys(t)}}),rr=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",nr=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]],wi=(function(){if(globalThis.process?.env)for(let t of nr){let e=t[1]||t[0];if(globalThis.process?.env[e])return{name:t[0].toLowerCase(),...t[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}})();wi.name;function ht(t){return!!t&&t!=="false"}let de=globalThis.process?.platform||"",Nr=ht(rt.CI)||wi.ci!==!1,ar=ht(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),Lr=(ht(rt.DEBUG),rr==="test"||ht(rt.TEST)),Ri=(ht(rt.MINIMAL),/^win/i.test(de)),or=(/^linux/i.test(de),/^darwin/i.test(de),!ht(rt.NO_COLOR)&&(ht(rt.FORCE_COLOR)||(ar||Ri)&&rt.TERM),(globalThis.process?.versions?.node||"").replace(/^v/,"")||null),hr=(Number(or?.split(".")[0]),globalThis.process||Object.create(null)),Ai={versions:{}},cr=(new Proxy(hr,{get:(t,e)=>e==="env"?rt:e in t?t[e]:e in Ai?Ai[e]:void 0}),globalThis.process?.release?.name==="node"),pr=!!globalThis.Bun||!!globalThis.process?.versions?.bun,lr=!!globalThis.Deno,ur=!!globalThis.fastly,fr=[[!!globalThis.Netlify,"netlify"],[!!globalThis.EdgeRuntime,"edge-light"],[globalThis.navigator?.userAgent==="Cloudflare-Workers","workerd"],[ur,"fastly"],[lr,"deno"],[pr,"bun"],[cr,"node"]];(function(){let t=fr.find(e=>e[0]);t&&t[1]})();let dr=B("tty"),mr=dr?.WriteStream?.prototype?.hasColors?.()??!1,_=(t,e)=>{if(!mr)return r=>r;let i=`\x1B[${t}m`,s=`\x1B[${e}m`;return r=>{let a=r+"",o=a.indexOf(s);if(o===-1)return i+a+s;let h=i,c=0,l=(e===22?s:"")+i;for(;o!==-1;)h+=a.slice(c,o)+l,c=o+s.length,o=a.indexOf(s,c);return h+=a.slice(c)+s,h}},Ti=(_(0,0),_(1,22),_(2,22),_(3,23),_(4,24),_(53,55),_(7,27),_(8,28),_(9,29),_(30,39),_(31,39)),yt=_(32,39),Wt=_(33,39),Pi=_(34,39),gr=(_(35,39),_(36,39)),xr=(_(37,39),_(90,39));_(40,49),_(41,49),_(42,49),_(43,49),_(44,49),_(45,49),_(46,49),_(47,49),_(100,49),_(91,39),_(92,39),_(93,39),_(94,39),_(95,39),_(96,39),_(97,39),_(101,49),_(102,49),_(103,49),_(104,49),_(105,49),_(106,49),_(107,49);function Ni(t){if(typeof t!="string"||t.startsWith("file://"))return!1;try{return(0,D.lstatSync)(t).isDirectory()}catch{return!1}}function Li(t,e=8){return((function(){if(_t!==void 0)return _t;try{return _t=!!fe().getFips?.(),_t}catch{return _t=!1,_t}})()?fe().createHash("sha256"):fe().createHash("md5")).update(t).digest("hex").slice(0,e)}let Oi={true:yt("true"),false:Wt("false"),"[rebuild]":Wt("[rebuild]"),"[esm]":Pi("[esm]"),"[cjs]":yt("[cjs]"),"[import]":Pi("[import]"),"[require]":yt("[require]"),"[native]":gr("[native]"),"[transpile]":Wt("[transpile]"),"[fallback]":Ti("[fallback]"),"[unknown]":Ti("[unknown]"),"[hit]":yt("[hit]"),"[miss]":Wt("[miss]"),"[json]":yt("[json]"),"[data]":yt("[data]")};function P(t,...e){if(!t.opts.debug)return;let i=process.cwd();console.log(xr(["[jiti]",...e.map(s=>s in Oi?Oi[s]:typeof s!="string"?JSON.stringify(s):s.replace(i,"."))].join(" ")))}function ct(t,e){return t.opts.interopDefault?(function(i){let s=typeof i;if(i===null||s!=="object"&&s!=="function")return i;let r=i.default,a=typeof r,o=r==null,h=a==="object"||a==="function";return o&&i instanceof Promise?i:new Proxy(i,{get(c,l,p){if(l==="__esModule")return!0;if(l==="default")return o?i:typeof r?.default=="function"&&i.__esModule?r.default:r;if(Reflect.has(c,l))return Reflect.get(c,l,p);if(h&&!(r instanceof Promise)){let f=Reflect.get(r,l,p);return typeof f=="function"&&(f=f.bind(r)),f}},apply:(c,l,p)=>typeof c=="function"?Reflect.apply(c,l,p):a==="function"?Reflect.apply(r,l,p):void 0})})(e):e}let _t;function Z(t,e){return!!Et(t,e)}function Et(t,e){let i=process.env[t];if(!(t in process.env))return e;try{return JSON.parse(i)}catch{return e}}let Di=/\.(c|m)?j(sx?)$/,Vi=/\.(c|m)?t(sx?)$/;function Tt(t,e,i){let s,r;if(t.isNativeRe.test(e))return e;t.alias&&(e=(function(h,c){let l=gt(h);c=Ii(c);for(let[p,f]of Object.entries(c)){if(!l.startsWith(p))continue;let u=ki(p)?p.slice(0,-1):p;if(ki(l[u.length]))return it(f,l.slice(p.length))}return l})(e,t.alias));let a=i?.parentURL||t.url;Ni(a)&&(a=it(a,"_index.js"));let o=(i?.async?[i?.conditions,["node","import"],["node","require"]]:[i?.conditions,["node","require"],["node","import"]]).filter(Boolean);for(let h of o){try{s=Ys(e,{url:a,conditions:h,extensions:t.opts.extensions})}catch(c){r=c}if(s)return s}try{return t.nativeRequire.resolve(e,{paths:i.paths})}catch(h){r=h}for(let h of t.additionalExts)if(s=me(t,e+h,a,i)||me(t,e+"/index"+h,a,i),s||(Vi.test(t.filename)||Vi.test(t.parentModule?.filename||"")||Di.test(e))&&(s=me(t,e.replace(Di,".$1t$2"),a,i),s))return s;if(!i?.try)throw r}function me(t,e,i,s){try{return t.nativeRequire.resolve(e,{...s,paths:[Mt(Rt(i)),...s?.paths||[]]})}catch{}}let Ui=B("perf_hooks"),vr=B("vm");var yr=H.n(vr);function ge(t,e,i){let s=t.parentCache||{};if(e.startsWith("node:"))return pt(t,e,i.async);if(e.startsWith("file:"))e=(0,g.fileURLToPath)(e);else if(e.startsWith("data:")){if(!i.async)throw new Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");return P(t,"[native]","[data]","[import]",e),pt(t,e,!0)}if(mt.builtinModules.includes(e)||e===".pnp.js")return pt(t,e,i.async);if(t.opts.tryNative&&!t.opts.transformOptions)try{if(!(e=Tt(t,e,i))&&i.try)return;if(P(t,"[try-native]",i.async&&t.nativeImport?"[import]":"[require]",e),i.async&&t.nativeImport)return t.nativeImport(e).then(h=>(t.opts.moduleCache===!1&&delete t.nativeRequire.cache[e],ct(t,h)));{let h=t.nativeRequire(e);return t.opts.moduleCache===!1&&delete t.nativeRequire.cache[e],ct(t,h)}}catch(h){P(t,`[try-native] Using fallback for ${e} because of an error:`,h)}let r=Tt(t,e,i);if(!r&&i.try)return;let a=ti(r);if(a===".json"){P(t,"[json]",r);let h=t.nativeRequire(r);return h&&!("default"in h)&&Object.defineProperty(h,"default",{value:h,enumerable:!1}),h}if(a&&!t.opts.extensions.includes(a))return P(t,"[native]","[unknown]",i.async?"[import]":"[require]",r),pt(t,r,i.async);if(t.isNativeRe.test(r))return P(t,"[native]",i.async?"[import]":"[require]",r),pt(t,r,i.async);if(s[r])return ct(t,s[r]?.exports);if(t.opts.moduleCache){let h=t.nativeRequire.cache[r];if(h?.loaded)return ct(t,h.exports)}let o=(0,D.readFileSync)(r,"utf8");return ve(t,o,{id:e,filename:r,ext:a,cache:s,async:i.async})}function pt(t,e,i){return i&&t.nativeImport?t.nativeImport((function(s){return Ri&&at(s)?vt(s):s})(e)).then(s=>ct(t,s)):ct(t,t.nativeRequire(e))}let _r="9";function Er(t,e,i){if(!t.opts.fsCache||!e.filename)return i();let s=` /* v${_r}-${Li(e.source,16)} */
|
|
20
20
|
`,r=`${ei(Mt(e.filename))}-${(function(c){let l=c.split(er).pop();if(!l)return;let p=l.lastIndexOf(".");return p<=0?l:l.slice(0,p)})(e.filename)}`+(t.opts.sourceMaps?"+map":"")+(e.interopDefault?".i":"")+`.${Li(e.filename)}`+(e.async?".mjs":".cjs");e.jsx&&e.filename.endsWith("x")&&(r+="x");let a=t.opts.fsCache,o=it(a,r);if(!t.opts.rebuildFsCache&&(0,D.existsSync)(o)){let c=(0,D.readFileSync)(o,"utf8");if(c.endsWith(s))return P(t,"[cache]","[hit]",e.filename,"~>",o),c}P(t,"[cache]","[miss]",e.filename);let h=i();return h.includes("__JITI_ERROR__")||((0,D.writeFileSync)(o,h+s,"utf8"),P(t,"[cache]","[store]",e.filename,"~>",o)),h}function br(t){if(t.opts.fsCache===!0&&(t.opts.fsCache=(function(e){let i=e.filename&&bs(e.filename,"../node_modules");if(i&&(0,D.existsSync)(i))return it(i,".cache/jiti");let s=(0,T.tmpdir)();if(process.env.TMPDIR&&s===process.cwd()&&!process.env.JITI_RESPECT_TMPDIR_ENV){let r=process.env.TMPDIR;delete process.env.TMPDIR,s=(0,T.tmpdir)(),process.env.TMPDIR=r}return it(s,"jiti")})(t)),t.opts.fsCache)try{if((0,D.mkdirSync)(t.opts.fsCache,{recursive:!0}),!(function(e){try{return(0,D.accessSync)(e,D.constants.W_OK),!0}catch{return!1}})(t.opts.fsCache))throw new Error("directory is not writable!")}catch(e){P(t,"Error creating cache directory at ",t.opts.fsCache,e),t.opts.fsCache=!1}}function xe(t,e){let i=Er(t,e,()=>{let s=t.opts.transform({...t.opts.transformOptions,babel:{...t.opts.sourceMaps?{sourceFileName:e.filename,sourceMaps:"inline"}:{},...t.opts.transformOptions?.babel},interopDefault:t.opts.interopDefault,...e});return s.error&&t.opts.debug&&P(t,s.error),s.code});return i.startsWith("#!")&&(i="// "+i),i}function ve(t,e,i={}){let s=i.id||(i.filename?ei(i.filename):`_jitiEval.${i.ext||(i.async?"mjs":"js")}`),r=i.filename||Tt(t,s,{async:i.async}),a=i.ext||ti(r),o=i.cache||t.parentCache||{},h=/\.[cm]?tsx?$/.test(a),c=a===".mjs"||a===".js"&&(function(k){for(;k&&k!=="."&&k!=="/";){k=it(k,"..");try{let lt=(0,D.readFileSync)(it(k,"package.json"),"utf8");try{return JSON.parse(lt)}catch{}break}catch{}}})(r)?.type==="module",l=a===".cjs",p=i.forceTranspile??(!l&&!(c&&i.async)&&(h||c||t.isTransformRe.test(r)||Xs(e))),f=Ui.performance.now();if(p){e=xe(t,{filename:r,source:e,ts:h,async:i.async??!1,jsx:t.opts.jsx});let k=Math.round(1e3*(Ui.performance.now()-f))/1e3;P(t,"[transpile]",i.async?"[esm]":"[cjs]",r,`(${k}ms)`)}else{if(P(t,"[native]",i.async?"[import]":"[require]",r),i.async)return Promise.resolve(pt(t,r,i.async)).catch(k=>(P(t,"Native import error:",k),P(t,"[fallback]",r),ve(t,e,{...i,forceTranspile:!0})));try{return pt(t,r,i.async)}catch(k){P(t,"Native require error:",k),P(t,"[fallback]",r),e=xe(t,{filename:r,source:e,ts:h,async:i.async??!1,jsx:t.opts.jsx})}}let u=new mt.Module(r);u.filename=r,t.parentModule&&(u.parent=t.parentModule,Array.isArray(t.parentModule.children)&&!t.parentModule.children.includes(u)&&t.parentModule.children.push(u));let v=Mi(r,t.opts,{parentModule:u,parentCache:o,nativeImport:t.nativeImport,onError:t.onError,createRequire:t.createRequire},!0),w;u.require=v,u.path=Mt(r),u.paths=mt.Module._nodeModulePaths(u.path),o[r]=u,t.opts.moduleCache&&(t.nativeRequire.cache[r]=u);let y=(function(k,lt){return`(${lt?.async?"async ":""}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${k}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@batijs/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.544",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"@types/estree": "^1.0.8",
|
|
14
14
|
"@types/node": "^20.19.25",
|
|
15
15
|
"@types/which": "^3.0.4",
|
|
16
|
-
"@typescript-eslint/parser": "^8.48.
|
|
17
|
-
"@typescript-eslint/utils": "^8.48.
|
|
16
|
+
"@typescript-eslint/parser": "^8.48.1",
|
|
17
|
+
"@typescript-eslint/utils": "^8.48.1",
|
|
18
18
|
"attributes-parser": "^2.2.3",
|
|
19
19
|
"colorette": "^2.0.20",
|
|
20
|
-
"esbuild": "^0.27.
|
|
20
|
+
"esbuild": "^0.27.1",
|
|
21
21
|
"eslint": "^9.39.1",
|
|
22
22
|
"eslint-plugin-solid": "^0.14.5",
|
|
23
23
|
"eslint-rule-composer": "^0.3.0",
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"mdast-util-to-markdown": "^2.1.2",
|
|
29
29
|
"mdast-util-to-string": "^4.0.0",
|
|
30
30
|
"mdast-util-toc": "^7.1.0",
|
|
31
|
-
"prettier": "^3.7.
|
|
31
|
+
"prettier": "^3.7.4",
|
|
32
32
|
"squirrelly": "^9.1.0",
|
|
33
33
|
"tsup": "^8.5.1",
|
|
34
34
|
"tsx": "^4.21.0",
|
|
35
35
|
"typescript": "^5.9.3",
|
|
36
36
|
"unplugin-purge-polyfills": "^0.1.0",
|
|
37
|
-
"vitest": "^4.0.
|
|
37
|
+
"vitest": "^4.0.15",
|
|
38
38
|
"vue-eslint-parser": "^10.2.0",
|
|
39
39
|
"which": "^6.0.0",
|
|
40
40
|
"yaml": "^2.8.2",
|
|
41
|
-
"@batijs/features": "0.0.
|
|
41
|
+
"@batijs/features": "0.0.544"
|
|
42
42
|
},
|
|
43
43
|
"exports": {
|
|
44
44
|
".": "./dist/index.js",
|