@lntvow/dev 5.0.8 → 5.0.9

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/cli.cjs CHANGED
@@ -42,4 +42,4 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
42
42
  `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};N.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
43
43
  `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Ye(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 r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(s,8);return i>255&&(s=s.slice(0,-1),i=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return At(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};N.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};N.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(at(i,s))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?Ve:at)(a,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=Ye(a),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};N.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=Ei[e]),this.finishToken(t,e)};var Ld="8.15.0";oe.acorn={Parser:oe,version:Ld,defaultOptions:wi,Position:Yt,SourceLocation:Ur,getLineInfo:_u,Node:qr,TokenType:$,tokTypes:o,keywordTypes:Ei,TokContext:De,tokContexts:H,isIdentifierChar:at,isIdentifierStart:Ve,Token:Pi,isNewLine:At,lineBreak:ke,lineBreakG:sd,nonASCIIwhitespace:gu};var tr=require("module"),Je=ie(require("fs"),1);y();var w0=String.fromCharCode;var Dd=/\/$|\/\?|\/#/,$d=/^\.?\//;function Fd(e="",t){return t?Dd.test(e):e.endsWith("/")}function Md(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(Fd(e,!0))return e||"/";let r=e,s="",i=e.indexOf("#");if(i!==-1&&(r=e.slice(0,i),s=e.slice(i),!r))return s;let[n,...a]=r.split("?");return n+"/"+(a.length>0?`?${a.join("?")}`:"")+s}function Vd(e){return e&&e!=="/"}function Ii(e,...t){let r=e||"";for(let s of t.filter(i=>Vd(i)))if(r){let i=s.replace($d,"");r=Md(r)+i}else r=s;return r}var C0=Symbol.for("ufo:protocolRelative");y();y();var jd=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;var Ni=function(e){return jd.test(e)};var C=require("url"),Ze=ie(require("assert"),1),ut=ie(require("process"),1),rr=ie(require("path"),1),oc=ie(require("v8"),1),Pt=require("util"),uc=new Set(tr.builtinModules);function Mi(e){return e.replace(/\\/g,"/")}var Gd={}.hasOwnProperty,Wd=/^([A-Z][a-z\d]*)+$/,Hd=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),ge={};function Li(e,t="and"){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}var cc=new Map,qd="__node_internal_",Ku;ge.ERR_INVALID_ARG_TYPE=Ie("ERR_INVALID_ARG_TYPE",(e,t,r)=>{(0,Ze.default)(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let s="The ";if(e.endsWith(" argument"))s+=`${e} `;else{let u=e.includes(".")?"property":"argument";s+=`"${e}" ${u} `}s+="must be ";let i=[],n=[],a=[];for(let u of t)(0,Ze.default)(typeof u=="string","All expected entries have to be of type string"),Hd.has(u)?i.push(u.toLowerCase()):Wd.exec(u)===null?((0,Ze.default)(u!=="object",'The value "object" should be written as "Object"'),a.push(u)):n.push(u);if(n.length>0){let u=i.indexOf("object");u!==-1&&(i.slice(u,1),n.push("Object"))}return i.length>0&&(s+=`${i.length>1?"one of type":"of type"} ${Li(i,"or")}`,(n.length>0||a.length>0)&&(s+=" or ")),n.length>0&&(s+=`an instance of ${Li(n,"or")}`,a.length>0&&(s+=" or ")),a.length>0&&(a.length>1?s+=`one of ${Li(a,"or")}`:(a[0].toLowerCase()!==a[0]&&(s+="an "),s+=`${a[0]}`)),s+=`. Received ${Xd(r)}`,s},TypeError);ge.ERR_INVALID_MODULE_SPECIFIER=Ie("ERR_INVALID_MODULE_SPECIFIER",(e,t,r=void 0)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError);ge.ERR_INVALID_PACKAGE_CONFIG=Ie("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error);ge.ERR_INVALID_PACKAGE_TARGET=Ie("ERR_INVALID_PACKAGE_TARGET",(e,t,r,s=!1,i=void 0)=>{let n=typeof r=="string"&&!s&&r.length>0&&!r.startsWith("./");return t==="."?((0,Ze.default)(s===!1),`Invalid "exports" main target ${JSON.stringify(r)} defined in the package config ${e}package.json${i?` imported from ${i}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${JSON.stringify(r)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:""}${n?'; targets must start with "./"':""}`},Error);ge.ERR_MODULE_NOT_FOUND=Ie("ERR_MODULE_NOT_FOUND",(e,t,r=!1)=>`Cannot find ${r?"module":"package"} '${e}' imported from ${t}`,Error);ge.ERR_NETWORK_IMPORT_DISALLOWED=Ie("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);ge.ERR_PACKAGE_IMPORT_NOT_DEFINED=Ie("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,r)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${r}`,TypeError);ge.ERR_PACKAGE_PATH_NOT_EXPORTED=Ie("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,r=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${r?` imported from ${r}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${r?` imported from ${r}`:""}`,Error);ge.ERR_UNSUPPORTED_DIR_IMPORT=Ie("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);ge.ERR_UNSUPPORTED_RESOLVE_REQUEST=Ie("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError);ge.ERR_UNKNOWN_FILE_EXTENSION=Ie("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);ge.ERR_INVALID_ARG_VALUE=Ie("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let s=(0,Pt.inspect)(t);return s.length>128&&(s=`${s.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${s}`},TypeError);function Ie(e,t,r){return cc.set(e,t),zd(r,e)}function zd(e,t){return r;function r(...s){let i=Error.stackTraceLimit;Vi()&&(Error.stackTraceLimit=0);let n=new e;Vi()&&(Error.stackTraceLimit=i);let a=Qd(t,s,n);return Object.defineProperties(n,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Yd(n),n.code=t,n}}function Vi(){try{if(oc.default.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):Gd.call(e,"writable")&&e.writable!==void 0?e.writable:e.set!==void 0}function Kd(e){let t=qd+e.name;return Object.defineProperty(e,"name",{value:t}),e}var Yd=Kd(function(e){let t=Vi();return t&&(Ku=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=Ku),e});function Qd(e,t,r){let s=cc.get(e);if((0,Ze.default)(s!==void 0,"expected `message` to be found"),typeof s=="function")return(0,Ze.default)(s.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${s.length}).`),Reflect.apply(s,r,t);let i=/%[dfijoOs]/g,n=0;for(;i.exec(s)!==null;)n++;return(0,Ze.default)(n===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${n}).`),t.length===0?s:(t.unshift(s),Reflect.apply(Pt.format,null,t))}function Xd(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,Pt.inspect)(e,{depth:-1})}`;let t=(0,Pt.inspect)(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}var Jt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:Zd}=ge,Yu=new Map;function lc(e,{base:t,specifier:r}){let s=Yu.get(e);if(s)return s;let i;try{i=Je.default.readFileSync(rr.default.toNamespacedPath(e),"utf8")}catch(a){let u=a;if(u.code!=="ENOENT")throw u}let n={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(i!==void 0){let a;try{a=JSON.parse(i)}catch(u){let c=u,f=new Zd(e,(t?`"${r}" from `:"")+(0,C.fileURLToPath)(t||r),c.message);throw f.cause=c,f}n.exists=!0,Jt.call(a,"name")&&typeof a.name=="string"&&(n.name=a.name),Jt.call(a,"main")&&typeof a.main=="string"&&(n.main=a.main),Jt.call(a,"exports")&&(n.exports=a.exports),Jt.call(a,"imports")&&(n.imports=a.imports),Jt.call(a,"type")&&(a.type==="commonjs"||a.type==="module")&&(n.type=a.type)}return Yu.set(e,n),n}function ji(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let i=lc((0,C.fileURLToPath)(t),{specifier:e});if(i.exists)return i;let n=t;if(t=new URL("../package.json",t),t.pathname===n.pathname)break}return{pjsonPath:(0,C.fileURLToPath)(t),exists:!1,type:"none"}}function Qu(e){return ji(e).type}var{ERR_UNKNOWN_FILE_EXTENSION:Jd}=ge,em={}.hasOwnProperty,tm={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};function rm(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?"module":e==="application/json"?"json":null}var Xu={__proto__:null,"data:":sm,"file:":nm,"http:":Zu,"https:":Zu,"node:"(){return"builtin"}};function sm(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return rm(t)}function im(e){let t=e.pathname,r=t.length;for(;r--;){let s=t.codePointAt(r);if(s===47)return"";if(s===46)return t.codePointAt(r-1)===47?"":t.slice(r)}return""}function nm(e,t,r){let s=im(e);if(s===".js"){let a=Qu(e);return a!=="none"?a:"commonjs"}if(s===""){let a=Qu(e);return a==="none"||a==="commonjs"?"commonjs":"module"}let i=tm[s];if(i)return i;if(r)return;let n=(0,C.fileURLToPath)(e);throw new Jd(s,n)}function Zu(){}function am(e,t){let r=e.protocol;return em.call(Xu,r)&&Xu[r](e,t,!0)||null}var Kr=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:q0,ERR_INVALID_MODULE_SPECIFIER:Xr,ERR_INVALID_PACKAGE_CONFIG:hc,ERR_INVALID_PACKAGE_TARGET:om,ERR_MODULE_NOT_FOUND:Bi,ERR_PACKAGE_IMPORT_NOT_DEFINED:um,ERR_PACKAGE_PATH_NOT_EXPORTED:cm,ERR_UNSUPPORTED_DIR_IMPORT:lm,ERR_UNSUPPORTED_RESOLVE_REQUEST:Ju}=ge,fc={}.hasOwnProperty,ec=/(^|\\|\/)((\.|%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,tc=/(^|\\|\/)((\.|%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,hm=/^\.|%|\\/,Yr=/\*/g,fm=/%2f|%5c/i,rc=new Set,pm=/[/\\]{2}/;function sc(e,t,r,s,i,n,a){if(ut.default.noDeprecation)return;let u=(0,C.fileURLToPath)(s),c=pm.exec(a?e:t)!==null;ut.default.emitWarning(`Use of deprecated ${c?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===r?"":`matched to "${r}" `}in the "${i?"imports":"exports"}" field module resolution of the package at ${u}${n?` imported from ${(0,C.fileURLToPath)(n)}`:""}.`,"DeprecationWarning","DEP0166")}function ic(e,t,r,s){if(ut.default.noDeprecation||am(e,{parentURL:r.href})!=="module")return;let n=(0,C.fileURLToPath)(e.href),a=(0,C.fileURLToPath)(new C.URL(".",t)),u=(0,C.fileURLToPath)(r);s?rr.default.resolve(a,s)!==n&&ut.default.emitWarning(`Package ${a} has a "main" field set to "${s}", excluding the full filename and extension to the resolved file at "${n.slice(a.length)}", imported from ${u}.
44
44
  Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):ut.default.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${n.slice(a.length)}", imported from ${u}.
45
- Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function pc(e){try{return(0,Je.statSync)(e)}catch{}}function Di(e){let t=(0,Je.statSync)(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function dm(e,t,r){let s;if(t.main!==void 0){if(s=new C.URL(t.main,e),Di(s))return s;let a=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],u=-1;for(;++u<a.length&&(s=new C.URL(a[u],e),!Di(s));)s=void 0;if(s)return ic(s,e,r,t.main),s}let i=["./index.js","./index.json","./index.node"],n=-1;for(;++n<i.length&&(s=new C.URL(i[n],e),!Di(s));)s=void 0;if(s)return ic(s,e,r,t.main),s;throw new Bi((0,C.fileURLToPath)(new C.URL(".",e)),(0,C.fileURLToPath)(r))}function mm(e,t,r){if(fm.exec(e.pathname)!==null)throw new Xr(e.pathname,'must not include encoded "/" or "\\" characters',(0,C.fileURLToPath)(t));let s;try{s=(0,C.fileURLToPath)(e)}catch(n){let a=n;throw Object.defineProperty(a,"input",{value:String(e)}),Object.defineProperty(a,"module",{value:String(t)}),a}let i=pc(s.endsWith("/")?s.slice(-1):s);if(i&&i.isDirectory()){let n=new lm(s,(0,C.fileURLToPath)(t));throw n.url=String(e),n}if(!i||!i.isFile()){let n=new Bi(s||e.pathname,t&&(0,C.fileURLToPath)(t),!0);throw n.url=String(e),n}{let n=(0,Je.realpathSync)(s),{search:a,hash:u}=e;e=(0,C.pathToFileURL)(n+(s.endsWith(rr.default.sep)?"/":"")),e.search=a,e.hash=u}return e}function gm(e,t,r){return new um(e,t&&(0,C.fileURLToPath)(new C.URL(".",t)),(0,C.fileURLToPath)(r))}function $i(e,t,r){return new cm((0,C.fileURLToPath)(new C.URL(".",t)),e,r&&(0,C.fileURLToPath)(r))}function xm(e,t,r,s,i){let n=`request is not a valid match in pattern "${t}" for the "${s?"imports":"exports"}" resolution of ${(0,C.fileURLToPath)(r)}`;throw new Xr(e,n,i&&(0,C.fileURLToPath)(i))}function er(e,t,r,s,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new om((0,C.fileURLToPath)(new C.URL(".",r)),e,t,s,i&&(0,C.fileURLToPath)(i))}function _m(e,t,r,s,i,n,a,u,c){if(t!==""&&!n&&e[e.length-1]!=="/")throw er(r,e,s,a,i);if(!e.startsWith("./")){if(a&&!e.startsWith("../")&&!e.startsWith("/")){let p=!1;try{new C.URL(e),p=!0}catch{}if(!p){let d=n?Kr.call(Yr,e,()=>t):e+t;return mc(d,s,c)}}throw er(r,e,s,a,i)}if(ec.exec(e.slice(2))!==null)if(tc.exec(e.slice(2))===null){if(!u){let p=n?r.replace("*",()=>t):r+t,d=n?Kr.call(Yr,e,()=>t):e;sc(d,p,r,s,a,i,!0)}}else throw er(r,e,s,a,i);let f=new C.URL(e,s),l=f.pathname,h=new C.URL(".",s).pathname;if(!l.startsWith(h))throw er(r,e,s,a,i);if(t==="")return f;if(ec.exec(t)!==null){let p=n?r.replace("*",()=>t):r+t;if(tc.exec(t)===null){if(!u){let d=n?Kr.call(Yr,e,()=>t):e;sc(d,p,r,s,a,i,!1)}}else xm(p,r,s,a,i)}return n?new C.URL(Kr.call(Yr,f.href,()=>t)):new C.URL(t,f)}function ym(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function It(e,t,r,s,i,n,a,u,c){if(typeof t=="string")return _m(t,r,s,e,i,n,a,u,c);if(Array.isArray(t)){let f=t;if(f.length===0)return null;let l,h=-1;for(;++h<f.length;){let p=f[h],d;try{d=It(e,p,r,s,i,n,a,u,c)}catch(j){let G=j;if(l=G,G.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw j}if(d!==void 0){if(d===null){l=null;continue}return d}}if(l==null)return null;throw l}if(typeof t=="object"&&t!==null){let f=Object.getOwnPropertyNames(t),l=-1;for(;++l<f.length;){let h=f[l];if(ym(h))throw new hc((0,C.fileURLToPath)(e),i,'"exports" cannot contain numeric property keys.')}for(l=-1;++l<f.length;){let h=f[l];if(h==="default"||c&&c.has(h)){let p=t[h],d=It(e,p,r,s,i,n,a,u,c);if(d===void 0)continue;return d}}return null}if(t===null)return null;throw er(s,t,e,a,i)}function vm(e,t,r){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let s=Object.getOwnPropertyNames(e),i=!1,n=0,a=-1;for(;++a<s.length;){let u=s[a],c=u===""||u[0]!==".";if(n++===0)i=c;else if(i!==c)throw new hc((0,C.fileURLToPath)(t),r,`"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 bm(e,t,r){if(ut.default.noDeprecation)return;let s=(0,C.fileURLToPath)(t);rc.has(s+"|"+e)||(rc.add(s+"|"+e),ut.default.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${s}${r?` imported from ${(0,C.fileURLToPath)(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function nc(e,t,r,s,i){let n=r.exports;if(vm(n,e,s)&&(n={".":n}),fc.call(n,t)&&!t.includes("*")&&!t.endsWith("/")){let l=n[t],h=It(e,l,"",t,s,!1,!1,!1,i);if(h==null)throw $i(t,e,s);return h}let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&t.startsWith(l.slice(0,h))){t.endsWith("/")&&bm(t,e,s);let p=l.slice(h+1);t.length>=l.length&&t.endsWith(p)&&dc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=t.slice(h,t.length-p.length))}}if(a){let l=n[a],h=It(e,l,u,a,s,!0,!1,t.endsWith("/"),i);if(h==null)throw $i(t,e,s);return h}throw $i(t,e,s)}function dc(e,t){let r=e.indexOf("*"),s=t.indexOf("*"),i=r===-1?e.length:r+1,n=s===-1?t.length:s+1;return i>n?-1:n>i||r===-1?1:s===-1||e.length>t.length?-1:t.length>e.length?1:0}function wm(e,t,r){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let n="is not a valid internal imports specifier name";throw new Xr(e,n,(0,C.fileURLToPath)(t))}let s,i=ji(t);if(i.exists){s=(0,C.pathToFileURL)(i.pjsonPath);let n=i.imports;if(n)if(fc.call(n,e)&&!e.includes("*")){let a=It(s,n[e],"",e,t,!1,!0,!1,r);if(a!=null)return a}else{let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&e.startsWith(l.slice(0,-1))){let p=l.slice(h+1);e.length>=l.length&&e.endsWith(p)&&dc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=e.slice(h,e.length-p.length))}}if(a){let l=n[a],h=It(s,l,u,a,t,!0,!0,!1,r);if(h!=null)return h}}}throw gm(e,s,t)}function Cm(e,t){let r=e.indexOf("/"),s=!0,i=!1;e[0]==="@"&&(i=!0,r===-1||e.length===0?s=!1:r=e.indexOf("/",r+1));let n=r===-1?e:e.slice(0,r);if(hm.exec(n)!==null&&(s=!1),!s)throw new Xr(e,"is not a valid package name",(0,C.fileURLToPath)(t));let a="."+(r===-1?"":e.slice(r));return{packageName:n,packageSubpath:a,isScoped:i}}function mc(e,t,r){if(tr.builtinModules.includes(e))return new C.URL("node:"+e);let{packageName:s,packageSubpath:i,isScoped:n}=Cm(e,t),a=ji(t);if(a.exists){let l=(0,C.pathToFileURL)(a.pjsonPath);if(a.name===s&&a.exports!==void 0&&a.exports!==null)return nc(l,i,a,t,r)}let u=new C.URL("./node_modules/"+s+"/package.json",t),c=(0,C.fileURLToPath)(u),f;do{let l=pc(c.slice(0,-13));if(!l||!l.isDirectory()){f=c,u=new C.URL((n?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",u),c=(0,C.fileURLToPath)(u);continue}let h=lc(c,{base:t,specifier:e});return h.exports!==void 0&&h.exports!==null?nc(u,i,h,t,r):i==="."?dm(u,h,t):new C.URL(i,u)}while(c.length!==f.length);throw new Bi(s,(0,C.fileURLToPath)(t),!1)}function km(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Em(e){return e===""?!1:e[0]==="/"?!0:km(e)}function Sm(e,t,r,s){let i=t.protocol,a=i==="data:"||i==="http:"||i==="https:",u;if(Em(e))try{u=new C.URL(e,t)}catch(c){let f=new Ju(e,t);throw f.cause=c,f}else if(i==="file:"&&e[0]==="#")u=wm(e,t,r);else try{u=new C.URL(e)}catch(c){if(a&&!tr.builtinModules.includes(e)){let f=new Ju(e,t);throw f.cause=c,f}u=mc(e,t,r)}return(0,Ze.default)(u!==void 0,"expected to be defined"),u.protocol!=="file:"?u:mm(u,t)}function Qr(e){return typeof e=="string"&&!e.startsWith("file://")?Mi(e):Mi((0,C.fileURLToPath)(e))}function Fi(e){return(0,C.pathToFileURL)(Qr(e)).toString()}function Am(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:uc.has(e)?"node:"+e:"file://"+encodeURI(Mi(e))}var Tm=new Set(["node","import"]),Om=[".mjs",".cjs",".js",".json"],Rm=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function ac(e,t,r){try{return Sm(e,t,r)}catch(s){if(!Rm.has(s?.code))throw s}}function Pm(e,t={}){if(typeof e!="string")if(e instanceof URL)e=Qr(e);else throw new TypeError("input must be a `string` or `URL`");if(/(node|data|http|https):/.test(e))return e;if(uc.has(e))return"node:"+e;if(e.startsWith("file://")&&(e=Qr(e)),Ni(e))try{if((0,Je.statSync)(e).isFile())return Fi(e)}catch(a){if(a?.code!=="ENOENT")throw a}let r=t.conditions?new Set(t.conditions):Tm,s=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(a=>new URL(Am(a.toString())));s.length===0&&s.push(new URL(Fi(process.cwd())));let i=[...s];for(let a of s)a.protocol==="file:"&&i.push(new URL("./",a),new URL(Ii(a.pathname,"_index.js"),a),new URL("node_modules",a));let n;for(let a of i){if(n=ac(e,a,r),n)break;for(let u of["","/index"]){for(let c of t.extensions||Om)if(n=ac(Ii(e,u)+c,a,r),n)break;if(n)break}if(n)break}if(!n){let a=new Error(`Cannot find module ${e} imported from ${i.join(", ")}`);throw a.code="ERR_MODULE_NOT_FOUND",a}return Fi(n)}function Im(e,t){return Pm(e,t)}function gc(e,t){return Qr(Im(e,t))}y();y();var xc=Symbol.for("quansync.getIsAsync"),Zr=class extends Error{constructor(t="Unexpected promise in sync context"){super(t),this.name="QuansyncError"}};function Gi(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Nm(e){return e&&typeof e=="object"&&typeof e[Symbol.iterator]=="function"&&"__quansync"in e}function Wi(e){let t=function*(...s){return(yield xc)?yield e.async.apply(this,s):e.sync.apply(this,s)};function r(...s){let i=t.apply(this,s);return i.then=(...n)=>e.async.apply(this,s).then(...n),i.__quansync=!0,i}return r.sync=e.sync,r.async=e.async,r}function Lm(e){return Wi({async:()=>Promise.resolve(e),sync:()=>{if(Gi(e))throw new Zr;return e}})}function Ui(e,t){if(e===xc)return t;if(Nm(e))return t?vc(e):yc(e);if(!t&&Gi(e))throw new Zr;return e}var _c=e=>e;function yc(e,t=_c){let r=e.next();for(;!r.done;)try{r=e.next(Ui(t(r.value,!1)))}catch(s){r=e.throw(s)}return Ui(r.value)}async function vc(e,t=_c){let r=e.next();for(;!r.done;)try{r=e.next(await Ui(t(r.value,!0),!0))}catch(s){r=e.throw(s)}return r.value}function Dm(e,t){return Wi({name:e.name,async(...r){return vc(e.apply(this,r),t?.onYield)},sync(...r){return yc(e.apply(this,r),t?.onYield)}})}function Hi(e,t){return Gi(e)?Lm(e):typeof e=="function"?Dm(e,t):Wi(e)}var Y0=Hi({async:()=>Promise.resolve(!0),sync:()=>!1});var Nt=Hi;var Jr=e=>e instanceof URL?(0,kc.fileURLToPath)(e):e;async function $m(e,{cwd:t=xt.default.cwd(),type:r="file",stopAt:s}={}){let i=re.default.resolve(Jr(t)??""),{root:n}=re.default.parse(i);s=re.default.resolve(i,Jr(s??n));let a=re.default.isAbsolute(e);for(;i;){let u=a?e:re.default.join(i,e);try{let c=await Cc.default.stat(u);if(r==="file"&&c.isFile()||r==="directory"&&c.isDirectory())return u}catch{}if(i===s||i===n)break;i=re.default.dirname(i)}}function Fm(e,{cwd:t=xt.default.cwd(),type:r="file",stopAt:s}={}){let i=re.default.resolve(Jr(t)??""),{root:n}=re.default.parse(i);s=re.default.resolve(i,Jr(s)??n);let a=re.default.isAbsolute(e);for(;i;){let u=a?e:re.default.join(i,e);try{let c=Lt.default.statSync(u,{throwIfNoEntry:!1});if(r==="file"&&c?.isFile()||r==="directory"&&c?.isDirectory())return u}catch{}if(i===s||i===n)break;i=re.default.dirname(i)}}function bc(e,t={}){if((t.platform==="auto"||!t.platform)&&(t.platform=xt.default.platform==="win32"?"win32":"posix"),xt.default.versions.pnp){let s=t.paths||[];s.length===0&&s.push(xt.default.cwd());let i=(0,wc.createRequire)(L);try{return i.resolve(e,{paths:s})}catch{}}let r=gc(e,{url:t.paths});return t.platform==="win32"?re.win32.normalize(r):r}function Ec(e,t={}){return!!Ac(e,t)}function Mm(e,t={}){let r=Ac(e,t);if(r)return jm(r)}var Sc=Nt({async:e=>Lt.default.promises.readFile(e,"utf8"),sync:e=>Lt.default.readFileSync(e,"utf8")}),Vm=Nt(function*(e,t={}){let r=Mm(e,t);if(!r)return;let s=JSON.parse(yield Sc(r));return{name:e,version:s.version,rootPath:(0,re.dirname)(r),packageJsonPath:r,packageJson:s}}),ix=Vm.sync;function Ac(e,t={}){try{return bc(`${e}/package.json`,t)}catch{}try{return bc(e,t)}catch(r){return r.code!=="MODULE_NOT_FOUND"&&r.code!=="ERR_MODULE_NOT_FOUND"&&console.error(r),!1}}function jm(e){let t;for(;;){if(!e)return;let r=(0,re.dirname)(e);if(r===e)return;if(e=r,t=(0,re.join)(e,"package.json"),Lt.default.existsSync(t))break}return t}var Bm=Nt({sync:Fm,async:$m}),Tc=Nt(function*(e=xt.default.cwd()){let t=yield Bm("package.json",{cwd:e});return!t||!Lt.default.existsSync(t)?null:JSON.parse(yield Sc(t))}),nx=Tc.sync,Um=Nt(function*(e,t){let r=(yield Tc(t))||{};return e in(r.dependencies||{})||e in(r.devDependencies||{})}),ax=Um.sync;var Rc="@lntvow/dev",Pc="5.0.8";y();var Ic=require("child_process"),Nc=require("fs"),Lc=require("path"),sr=ie(vs(),1),X={info:e=>console.log(sr.default.blue(`\u25CF ${e}`)),success:e=>console.log(sr.default.green(`\u2713 ${e}`)),warn:e=>console.log(sr.default.yellow(`\u25B2 ${e}`)),error:e=>console.log(sr.default.red(`\u2717 ${e}`))};function qi(e,t={}){try{return(0,Ic.execSync)(e,{stdio:"inherit",...t})}catch(r){throw X.error(`\u547D\u4EE4\u6267\u884C\u5931\u8D25: ${e}`),r}}function Dc(){let e=[{file:"pnpm-lock.yaml",manager:"pnpm"},{file:"yarn.lock",manager:"yarn"},{file:"package-lock.json",manager:"npm"}];for(let{file:r,manager:s}of e)if((0,Nc.existsSync)((0,Lc.resolve)(process.cwd(),r)))return s;let t=process.env.npm_config_user_agent||"";return t.startsWith("pnpm")?"pnpm":t.startsWith("yarn")?"yarn":"npm"}y();var $c={postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u --reject @types/node && pnpm install",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"},Fc=["simple-git-hooks","commitizen","cz-conventional-changelog","lint-staged","@commitlint/cli","@commitlint/config-conventional","@lntvow/eslint-config","eslint","prettier","npm-run-all","bumpp"];y();var Dt=ie(require("fs"),1),es=ie(require("path"),1);function zi(e,t){if(Dt.default.statSync(e).isDirectory()){if(es.default.basename(e)==="node_modules")return;Dt.default.mkdirSync(t,{recursive:!0}),Dt.default.readdirSync(e).forEach(s=>{zi(es.default.resolve(e,s),es.default.resolve(t,s))})}else{if(Dt.default.existsSync(t))return;Dt.default.copyFileSync(e,t)}}var Gm=(0,Mc.fileURLToPath)(L),Wm=(0,nr.dirname)(Gm);Mt.name(Rc).version(Pc,"-v, --version","output the version number");Mt.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").description("init project").action(async e=>{X.success("Init project by @lntvow/dev"),X.info(`Cwd is ${process.cwd()}`);let{temp:t,git:r,scripts:s}=e;try{Km(),t&&Hm(),s&&zm(),r&&qm(),X.success("Project initialization completed successfully!")}catch(i){X.error(`Initialization failed: ${i.message}`),process.exit(1)}});function Hm(){X.info("Copying template files..."),zi((0,nr.resolve)(Wm,"./configs"),process.cwd()),X.success("Template files copied successfully")}function qm(){if(!Ec("simple-git-hooks")){X.warn("simple-git-hooks not installed, skipping initialization");return}try{X.info("Initializing Git hooks..."),qi("npx simple-git-hooks"),X.success("Git hooks initialized successfully")}catch(e){X.error(`Failed to initialize Git hooks: ${e.message}`)}}function zm(){X.info("Updating package.json scripts...");let e=(0,nr.resolve)(process.cwd(),"package.json"),t;try{t=(0,ir.readFileSync)(e,"utf-8");let r=JSON.parse(t),s={...r,scripts:{...$c,...r.scripts}};(0,ir.writeFileSync)(e,JSON.stringify(s,null,2)),X.success("Package.json scripts updated successfully")}catch(r){t&&(0,ir.writeFileSync)(e,t),X.error(`Failed to update package.json: ${r.message}`),process.exit(1)}}function Km(){try{let e=Fc.map(s=>`${s}@latest`).join(" "),t=Dc(),r="";t==="pnpm"?r=`pnpm add -D ${e}`:t==="yarn"?r=`yarn add -D ${e}`:r=`npm install -D ${e}`,X.info(`Installing dependencies: ${r}`),qi(r),X.success("Dependencies installed successfully")}catch(e){X.error(`Dependency installation failed: ${e.message}`),process.exit(1)}}Mt.command("release").description("git release").action(async()=>{console.log(Vc.default.green("Release project..."));try{await Ym(),X.success("Release completed successfully!")}catch(e){X.error(`Release failed: ${e.message}`),process.exit(1)}});async function Ym(){let e=ou(process.cwd());try{let t=(0,jc.default)().format("YYYYMMDD HH:mm");await e.pull(),await e.add("."),await e.commit(t,["--no-verify"]),await e.push("origin"),X.success(`\u63D0\u4EA4\u6210\u529F: ${t}`)}catch(t){X.error(`Git\u64CD\u4F5C\u5931\u8D25: ${t.message}`),process.exit(1)}}Mt.parse();
45
+ Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function pc(e){try{return(0,Je.statSync)(e)}catch{}}function Di(e){let t=(0,Je.statSync)(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function dm(e,t,r){let s;if(t.main!==void 0){if(s=new C.URL(t.main,e),Di(s))return s;let a=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],u=-1;for(;++u<a.length&&(s=new C.URL(a[u],e),!Di(s));)s=void 0;if(s)return ic(s,e,r,t.main),s}let i=["./index.js","./index.json","./index.node"],n=-1;for(;++n<i.length&&(s=new C.URL(i[n],e),!Di(s));)s=void 0;if(s)return ic(s,e,r,t.main),s;throw new Bi((0,C.fileURLToPath)(new C.URL(".",e)),(0,C.fileURLToPath)(r))}function mm(e,t,r){if(fm.exec(e.pathname)!==null)throw new Xr(e.pathname,'must not include encoded "/" or "\\" characters',(0,C.fileURLToPath)(t));let s;try{s=(0,C.fileURLToPath)(e)}catch(n){let a=n;throw Object.defineProperty(a,"input",{value:String(e)}),Object.defineProperty(a,"module",{value:String(t)}),a}let i=pc(s.endsWith("/")?s.slice(-1):s);if(i&&i.isDirectory()){let n=new lm(s,(0,C.fileURLToPath)(t));throw n.url=String(e),n}if(!i||!i.isFile()){let n=new Bi(s||e.pathname,t&&(0,C.fileURLToPath)(t),!0);throw n.url=String(e),n}{let n=(0,Je.realpathSync)(s),{search:a,hash:u}=e;e=(0,C.pathToFileURL)(n+(s.endsWith(rr.default.sep)?"/":"")),e.search=a,e.hash=u}return e}function gm(e,t,r){return new um(e,t&&(0,C.fileURLToPath)(new C.URL(".",t)),(0,C.fileURLToPath)(r))}function $i(e,t,r){return new cm((0,C.fileURLToPath)(new C.URL(".",t)),e,r&&(0,C.fileURLToPath)(r))}function xm(e,t,r,s,i){let n=`request is not a valid match in pattern "${t}" for the "${s?"imports":"exports"}" resolution of ${(0,C.fileURLToPath)(r)}`;throw new Xr(e,n,i&&(0,C.fileURLToPath)(i))}function er(e,t,r,s,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new om((0,C.fileURLToPath)(new C.URL(".",r)),e,t,s,i&&(0,C.fileURLToPath)(i))}function _m(e,t,r,s,i,n,a,u,c){if(t!==""&&!n&&e[e.length-1]!=="/")throw er(r,e,s,a,i);if(!e.startsWith("./")){if(a&&!e.startsWith("../")&&!e.startsWith("/")){let p=!1;try{new C.URL(e),p=!0}catch{}if(!p){let d=n?Kr.call(Yr,e,()=>t):e+t;return mc(d,s,c)}}throw er(r,e,s,a,i)}if(ec.exec(e.slice(2))!==null)if(tc.exec(e.slice(2))===null){if(!u){let p=n?r.replace("*",()=>t):r+t,d=n?Kr.call(Yr,e,()=>t):e;sc(d,p,r,s,a,i,!0)}}else throw er(r,e,s,a,i);let f=new C.URL(e,s),l=f.pathname,h=new C.URL(".",s).pathname;if(!l.startsWith(h))throw er(r,e,s,a,i);if(t==="")return f;if(ec.exec(t)!==null){let p=n?r.replace("*",()=>t):r+t;if(tc.exec(t)===null){if(!u){let d=n?Kr.call(Yr,e,()=>t):e;sc(d,p,r,s,a,i,!1)}}else xm(p,r,s,a,i)}return n?new C.URL(Kr.call(Yr,f.href,()=>t)):new C.URL(t,f)}function ym(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function It(e,t,r,s,i,n,a,u,c){if(typeof t=="string")return _m(t,r,s,e,i,n,a,u,c);if(Array.isArray(t)){let f=t;if(f.length===0)return null;let l,h=-1;for(;++h<f.length;){let p=f[h],d;try{d=It(e,p,r,s,i,n,a,u,c)}catch(j){let G=j;if(l=G,G.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw j}if(d!==void 0){if(d===null){l=null;continue}return d}}if(l==null)return null;throw l}if(typeof t=="object"&&t!==null){let f=Object.getOwnPropertyNames(t),l=-1;for(;++l<f.length;){let h=f[l];if(ym(h))throw new hc((0,C.fileURLToPath)(e),i,'"exports" cannot contain numeric property keys.')}for(l=-1;++l<f.length;){let h=f[l];if(h==="default"||c&&c.has(h)){let p=t[h],d=It(e,p,r,s,i,n,a,u,c);if(d===void 0)continue;return d}}return null}if(t===null)return null;throw er(s,t,e,a,i)}function vm(e,t,r){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let s=Object.getOwnPropertyNames(e),i=!1,n=0,a=-1;for(;++a<s.length;){let u=s[a],c=u===""||u[0]!==".";if(n++===0)i=c;else if(i!==c)throw new hc((0,C.fileURLToPath)(t),r,`"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 bm(e,t,r){if(ut.default.noDeprecation)return;let s=(0,C.fileURLToPath)(t);rc.has(s+"|"+e)||(rc.add(s+"|"+e),ut.default.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${s}${r?` imported from ${(0,C.fileURLToPath)(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function nc(e,t,r,s,i){let n=r.exports;if(vm(n,e,s)&&(n={".":n}),fc.call(n,t)&&!t.includes("*")&&!t.endsWith("/")){let l=n[t],h=It(e,l,"",t,s,!1,!1,!1,i);if(h==null)throw $i(t,e,s);return h}let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&t.startsWith(l.slice(0,h))){t.endsWith("/")&&bm(t,e,s);let p=l.slice(h+1);t.length>=l.length&&t.endsWith(p)&&dc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=t.slice(h,t.length-p.length))}}if(a){let l=n[a],h=It(e,l,u,a,s,!0,!1,t.endsWith("/"),i);if(h==null)throw $i(t,e,s);return h}throw $i(t,e,s)}function dc(e,t){let r=e.indexOf("*"),s=t.indexOf("*"),i=r===-1?e.length:r+1,n=s===-1?t.length:s+1;return i>n?-1:n>i||r===-1?1:s===-1||e.length>t.length?-1:t.length>e.length?1:0}function wm(e,t,r){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let n="is not a valid internal imports specifier name";throw new Xr(e,n,(0,C.fileURLToPath)(t))}let s,i=ji(t);if(i.exists){s=(0,C.pathToFileURL)(i.pjsonPath);let n=i.imports;if(n)if(fc.call(n,e)&&!e.includes("*")){let a=It(s,n[e],"",e,t,!1,!0,!1,r);if(a!=null)return a}else{let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&e.startsWith(l.slice(0,-1))){let p=l.slice(h+1);e.length>=l.length&&e.endsWith(p)&&dc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=e.slice(h,e.length-p.length))}}if(a){let l=n[a],h=It(s,l,u,a,t,!0,!0,!1,r);if(h!=null)return h}}}throw gm(e,s,t)}function Cm(e,t){let r=e.indexOf("/"),s=!0,i=!1;e[0]==="@"&&(i=!0,r===-1||e.length===0?s=!1:r=e.indexOf("/",r+1));let n=r===-1?e:e.slice(0,r);if(hm.exec(n)!==null&&(s=!1),!s)throw new Xr(e,"is not a valid package name",(0,C.fileURLToPath)(t));let a="."+(r===-1?"":e.slice(r));return{packageName:n,packageSubpath:a,isScoped:i}}function mc(e,t,r){if(tr.builtinModules.includes(e))return new C.URL("node:"+e);let{packageName:s,packageSubpath:i,isScoped:n}=Cm(e,t),a=ji(t);if(a.exists){let l=(0,C.pathToFileURL)(a.pjsonPath);if(a.name===s&&a.exports!==void 0&&a.exports!==null)return nc(l,i,a,t,r)}let u=new C.URL("./node_modules/"+s+"/package.json",t),c=(0,C.fileURLToPath)(u),f;do{let l=pc(c.slice(0,-13));if(!l||!l.isDirectory()){f=c,u=new C.URL((n?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",u),c=(0,C.fileURLToPath)(u);continue}let h=lc(c,{base:t,specifier:e});return h.exports!==void 0&&h.exports!==null?nc(u,i,h,t,r):i==="."?dm(u,h,t):new C.URL(i,u)}while(c.length!==f.length);throw new Bi(s,(0,C.fileURLToPath)(t),!1)}function km(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Em(e){return e===""?!1:e[0]==="/"?!0:km(e)}function Sm(e,t,r,s){let i=t.protocol,a=i==="data:"||i==="http:"||i==="https:",u;if(Em(e))try{u=new C.URL(e,t)}catch(c){let f=new Ju(e,t);throw f.cause=c,f}else if(i==="file:"&&e[0]==="#")u=wm(e,t,r);else try{u=new C.URL(e)}catch(c){if(a&&!tr.builtinModules.includes(e)){let f=new Ju(e,t);throw f.cause=c,f}u=mc(e,t,r)}return(0,Ze.default)(u!==void 0,"expected to be defined"),u.protocol!=="file:"?u:mm(u,t)}function Qr(e){return typeof e=="string"&&!e.startsWith("file://")?Mi(e):Mi((0,C.fileURLToPath)(e))}function Fi(e){return(0,C.pathToFileURL)(Qr(e)).toString()}function Am(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:uc.has(e)?"node:"+e:"file://"+encodeURI(Mi(e))}var Tm=new Set(["node","import"]),Om=[".mjs",".cjs",".js",".json"],Rm=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function ac(e,t,r){try{return Sm(e,t,r)}catch(s){if(!Rm.has(s?.code))throw s}}function Pm(e,t={}){if(typeof e!="string")if(e instanceof URL)e=Qr(e);else throw new TypeError("input must be a `string` or `URL`");if(/(node|data|http|https):/.test(e))return e;if(uc.has(e))return"node:"+e;if(e.startsWith("file://")&&(e=Qr(e)),Ni(e))try{if((0,Je.statSync)(e).isFile())return Fi(e)}catch(a){if(a?.code!=="ENOENT")throw a}let r=t.conditions?new Set(t.conditions):Tm,s=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(a=>new URL(Am(a.toString())));s.length===0&&s.push(new URL(Fi(process.cwd())));let i=[...s];for(let a of s)a.protocol==="file:"&&i.push(new URL("./",a),new URL(Ii(a.pathname,"_index.js"),a),new URL("node_modules",a));let n;for(let a of i){if(n=ac(e,a,r),n)break;for(let u of["","/index"]){for(let c of t.extensions||Om)if(n=ac(Ii(e,u)+c,a,r),n)break;if(n)break}if(n)break}if(!n){let a=new Error(`Cannot find module ${e} imported from ${i.join(", ")}`);throw a.code="ERR_MODULE_NOT_FOUND",a}return Fi(n)}function Im(e,t){return Pm(e,t)}function gc(e,t){return Qr(Im(e,t))}y();y();var xc=Symbol.for("quansync.getIsAsync"),Zr=class extends Error{constructor(t="Unexpected promise in sync context"){super(t),this.name="QuansyncError"}};function Gi(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Nm(e){return e&&typeof e=="object"&&typeof e[Symbol.iterator]=="function"&&"__quansync"in e}function Wi(e){let t=function*(...s){return(yield xc)?yield e.async.apply(this,s):e.sync.apply(this,s)};function r(...s){let i=t.apply(this,s);return i.then=(...n)=>e.async.apply(this,s).then(...n),i.__quansync=!0,i}return r.sync=e.sync,r.async=e.async,r}function Lm(e){return Wi({async:()=>Promise.resolve(e),sync:()=>{if(Gi(e))throw new Zr;return e}})}function Ui(e,t){if(e===xc)return t;if(Nm(e))return t?vc(e):yc(e);if(!t&&Gi(e))throw new Zr;return e}var _c=e=>e;function yc(e,t=_c){let r=e.next();for(;!r.done;)try{r=e.next(Ui(t(r.value,!1)))}catch(s){r=e.throw(s)}return Ui(r.value)}async function vc(e,t=_c){let r=e.next();for(;!r.done;)try{r=e.next(await Ui(t(r.value,!0),!0))}catch(s){r=e.throw(s)}return r.value}function Dm(e,t){return Wi({name:e.name,async(...r){return vc(e.apply(this,r),t?.onYield)},sync(...r){return yc(e.apply(this,r),t?.onYield)}})}function Hi(e,t){return Gi(e)?Lm(e):typeof e=="function"?Dm(e,t):Wi(e)}var Y0=Hi({async:()=>Promise.resolve(!0),sync:()=>!1});var Nt=Hi;var Jr=e=>e instanceof URL?(0,kc.fileURLToPath)(e):e;async function $m(e,{cwd:t=xt.default.cwd(),type:r="file",stopAt:s}={}){let i=re.default.resolve(Jr(t)??""),{root:n}=re.default.parse(i);s=re.default.resolve(i,Jr(s??n));let a=re.default.isAbsolute(e);for(;i;){let u=a?e:re.default.join(i,e);try{let c=await Cc.default.stat(u);if(r==="file"&&c.isFile()||r==="directory"&&c.isDirectory())return u}catch{}if(i===s||i===n)break;i=re.default.dirname(i)}}function Fm(e,{cwd:t=xt.default.cwd(),type:r="file",stopAt:s}={}){let i=re.default.resolve(Jr(t)??""),{root:n}=re.default.parse(i);s=re.default.resolve(i,Jr(s)??n);let a=re.default.isAbsolute(e);for(;i;){let u=a?e:re.default.join(i,e);try{let c=Lt.default.statSync(u,{throwIfNoEntry:!1});if(r==="file"&&c?.isFile()||r==="directory"&&c?.isDirectory())return u}catch{}if(i===s||i===n)break;i=re.default.dirname(i)}}function bc(e,t={}){if((t.platform==="auto"||!t.platform)&&(t.platform=xt.default.platform==="win32"?"win32":"posix"),xt.default.versions.pnp){let s=t.paths||[];s.length===0&&s.push(xt.default.cwd());let i=(0,wc.createRequire)(L);try{return i.resolve(e,{paths:s})}catch{}}let r=gc(e,{url:t.paths});return t.platform==="win32"?re.win32.normalize(r):r}function Ec(e,t={}){return!!Ac(e,t)}function Mm(e,t={}){let r=Ac(e,t);if(r)return jm(r)}var Sc=Nt({async:e=>Lt.default.promises.readFile(e,"utf8"),sync:e=>Lt.default.readFileSync(e,"utf8")}),Vm=Nt(function*(e,t={}){let r=Mm(e,t);if(!r)return;let s=JSON.parse(yield Sc(r));return{name:e,version:s.version,rootPath:(0,re.dirname)(r),packageJsonPath:r,packageJson:s}}),ix=Vm.sync;function Ac(e,t={}){try{return bc(`${e}/package.json`,t)}catch{}try{return bc(e,t)}catch(r){return r.code!=="MODULE_NOT_FOUND"&&r.code!=="ERR_MODULE_NOT_FOUND"&&console.error(r),!1}}function jm(e){let t;for(;;){if(!e)return;let r=(0,re.dirname)(e);if(r===e)return;if(e=r,t=(0,re.join)(e,"package.json"),Lt.default.existsSync(t))break}return t}var Bm=Nt({sync:Fm,async:$m}),Tc=Nt(function*(e=xt.default.cwd()){let t=yield Bm("package.json",{cwd:e});return!t||!Lt.default.existsSync(t)?null:JSON.parse(yield Sc(t))}),nx=Tc.sync,Um=Nt(function*(e,t){let r=(yield Tc(t))||{};return e in(r.dependencies||{})||e in(r.devDependencies||{})}),ax=Um.sync;var Rc="@lntvow/dev",Pc="5.0.9";y();var Ic=require("child_process"),Nc=require("fs"),Lc=require("path"),sr=ie(vs(),1),X={info:e=>console.log(sr.default.blue(`\u25CF ${e}`)),success:e=>console.log(sr.default.green(`\u2713 ${e}`)),warn:e=>console.log(sr.default.yellow(`\u25B2 ${e}`)),error:e=>console.log(sr.default.red(`\u2717 ${e}`))};function qi(e,t={}){try{return(0,Ic.execSync)(e,{stdio:"inherit",...t})}catch(r){throw X.error(`\u547D\u4EE4\u6267\u884C\u5931\u8D25: ${e}`),r}}function Dc(){let e=[{file:"pnpm-lock.yaml",manager:"pnpm"},{file:"yarn.lock",manager:"yarn"},{file:"package-lock.json",manager:"npm"}];for(let{file:r,manager:s}of e)if((0,Nc.existsSync)((0,Lc.resolve)(process.cwd(),r)))return s;let t=process.env.npm_config_user_agent||"";return t.startsWith("pnpm")?"pnpm":t.startsWith("yarn")?"yarn":"npm"}y();var $c={postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u --reject @types/node && pnpm install",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"},Fc=["typescript","simple-git-hooks","commitizen","cz-conventional-changelog","lint-staged","@commitlint/cli","@commitlint/config-conventional","@lntvow/eslint-config","eslint","prettier","npm-run-all","bumpp"];y();var Dt=ie(require("fs"),1),es=ie(require("path"),1);function zi(e,t){if(Dt.default.statSync(e).isDirectory()){if(es.default.basename(e)==="node_modules")return;Dt.default.mkdirSync(t,{recursive:!0}),Dt.default.readdirSync(e).forEach(s=>{zi(es.default.resolve(e,s),es.default.resolve(t,s))})}else{if(Dt.default.existsSync(t))return;Dt.default.copyFileSync(e,t)}}var Gm=(0,Mc.fileURLToPath)(L),Wm=(0,nr.dirname)(Gm);Mt.name(Rc).version(Pc,"-v, --version","output the version number");Mt.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").description("init project").action(async e=>{X.success("Init project by @lntvow/dev"),X.info(`Cwd is ${process.cwd()}`);let{temp:t,git:r,scripts:s}=e;try{Km(),t&&Hm(),s&&zm(),r&&qm(),X.success("Project initialization completed successfully!")}catch(i){X.error(`Initialization failed: ${i.message}`),process.exit(1)}});function Hm(){X.info("Copying template files..."),zi((0,nr.resolve)(Wm,"./configs"),process.cwd()),X.success("Template files copied successfully")}function qm(){if(!Ec("simple-git-hooks")){X.warn("simple-git-hooks not installed, skipping initialization");return}try{X.info("Initializing Git hooks..."),qi("npx simple-git-hooks"),X.success("Git hooks initialized successfully")}catch(e){X.error(`Failed to initialize Git hooks: ${e.message}`)}}function zm(){X.info("Updating package.json scripts...");let e=(0,nr.resolve)(process.cwd(),"package.json"),t;try{t=(0,ir.readFileSync)(e,"utf-8");let r=JSON.parse(t),s={...r,scripts:{...$c,...r.scripts}};(0,ir.writeFileSync)(e,JSON.stringify(s,null,2)),X.success("Package.json scripts updated successfully")}catch(r){t&&(0,ir.writeFileSync)(e,t),X.error(`Failed to update package.json: ${r.message}`),process.exit(1)}}function Km(){try{let e=Fc.map(s=>`${s}@latest`).join(" "),t=Dc(),r="";t==="pnpm"?r=`pnpm add -D ${e}`:t==="yarn"?r=`yarn add -D ${e}`:r=`npm install -D ${e}`,X.info(`Installing dependencies: ${r}`),qi(r),X.success("Dependencies installed successfully")}catch(e){X.error(`Dependency installation failed: ${e.message}`),process.exit(1)}}Mt.command("release").description("git release").action(async()=>{console.log(Vc.default.green("Release project..."));try{await Ym(),X.success("Release completed successfully!")}catch(e){X.error(`Release failed: ${e.message}`),process.exit(1)}});async function Ym(){let e=ou(process.cwd());try{let t=(0,jc.default)().format("YYYYMMDD HH:mm");await e.pull(),await e.add("."),await e.commit(t,["--no-verify"]),await e.push("origin"),X.success(`\u63D0\u4EA4\u6210\u529F: ${t}`)}catch(t){X.error(`Git\u64CD\u4F5C\u5931\u8D25: ${t.message}`),process.exit(1)}}Mt.parse();
package/dist/cli.mjs CHANGED
@@ -43,4 +43,4 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
43
43
  `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};I.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
44
44
  `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Xe(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 r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(s,8);return i>255&&(s=s.slice(0,-1),i=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Tt(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};I.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};I.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(ot(i,s))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?je:ot)(a,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=Xe(a),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};I.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=wi[e]),this.finishToken(t,e)};var Rd="8.15.0";oe.acorn={Parser:oe,version:Rd,defaultOptions:yi,Position:Kt,SourceLocation:Vr,getLineInfo:xu,Node:Gr,TokenType:L,tokTypes:o,keywordTypes:wi,TokContext:$e,tokContexts:q,isIdentifierChar:ot,isIdentifierStart:je,Token:Ti,isNewLine:Tt,lineBreak:ke,lineBreakG:Jp,nonASCIIwhitespace:mu};import{builtinModules as Mi,createRequire as cx}from"module";import Vd,{realpathSync as jd,statSync as Vi,promises as hx}from"fs";y();var j0=String.fromCharCode;var Pd=/\/$|\/\?|\/#/,Id=/^\.?\//;function Nd(e="",t){return t?Pd.test(e):e.endsWith("/")}function Ld(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(Nd(e,!0))return e||"/";let r=e,s="",i=e.indexOf("#");if(i!==-1&&(r=e.slice(0,i),s=e.slice(i),!r))return s;let[n,...a]=r.split("?");return n+"/"+(a.length>0?`?${a.join("?")}`:"")+s}function Dd(e){return e&&e!=="/"}function Oi(e,...t){let r=e||"";for(let s of t.filter(i=>Dd(i)))if(r){let i=s.replace(Id,"");r=Ld(r)+i}else r=s;return r}var B0=Symbol.for("ufo:protocolRelative");y();y();var $d=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;var Ri=function(e){return $d.test(e)};import{fileURLToPath as D,URL as ie,pathToFileURL as Kr}from"url";import ct from"assert";import _t from"process";import ji,{dirname as _x}from"path";import Bd from"v8";import{format as Ud,inspect as Di}from"util";var ac=new Set(Mi);function $i(e){return e.replace(/\\/g,"/")}var Gd={}.hasOwnProperty,Wd=/^([A-Z][a-z\d]*)+$/,Hd=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),ge={};function Pi(e,t="and"){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}var oc=new Map,qd="__node_internal_",zu;ge.ERR_INVALID_ARG_TYPE=Ie("ERR_INVALID_ARG_TYPE",(e,t,r)=>{ct(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let s="The ";if(e.endsWith(" argument"))s+=`${e} `;else{let u=e.includes(".")?"property":"argument";s+=`"${e}" ${u} `}s+="must be ";let i=[],n=[],a=[];for(let u of t)ct(typeof u=="string","All expected entries have to be of type string"),Hd.has(u)?i.push(u.toLowerCase()):Wd.exec(u)===null?(ct(u!=="object",'The value "object" should be written as "Object"'),a.push(u)):n.push(u);if(n.length>0){let u=i.indexOf("object");u!==-1&&(i.slice(u,1),n.push("Object"))}return i.length>0&&(s+=`${i.length>1?"one of type":"of type"} ${Pi(i,"or")}`,(n.length>0||a.length>0)&&(s+=" or ")),n.length>0&&(s+=`an instance of ${Pi(n,"or")}`,a.length>0&&(s+=" or ")),a.length>0&&(a.length>1?s+=`one of ${Pi(a,"or")}`:(a[0].toLowerCase()!==a[0]&&(s+="an "),s+=`${a[0]}`)),s+=`. Received ${Xd(r)}`,s},TypeError);ge.ERR_INVALID_MODULE_SPECIFIER=Ie("ERR_INVALID_MODULE_SPECIFIER",(e,t,r=void 0)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError);ge.ERR_INVALID_PACKAGE_CONFIG=Ie("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error);ge.ERR_INVALID_PACKAGE_TARGET=Ie("ERR_INVALID_PACKAGE_TARGET",(e,t,r,s=!1,i=void 0)=>{let n=typeof r=="string"&&!s&&r.length>0&&!r.startsWith("./");return t==="."?(ct(s===!1),`Invalid "exports" main target ${JSON.stringify(r)} defined in the package config ${e}package.json${i?` imported from ${i}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${JSON.stringify(r)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:""}${n?'; targets must start with "./"':""}`},Error);ge.ERR_MODULE_NOT_FOUND=Ie("ERR_MODULE_NOT_FOUND",(e,t,r=!1)=>`Cannot find ${r?"module":"package"} '${e}' imported from ${t}`,Error);ge.ERR_NETWORK_IMPORT_DISALLOWED=Ie("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);ge.ERR_PACKAGE_IMPORT_NOT_DEFINED=Ie("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,r)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${r}`,TypeError);ge.ERR_PACKAGE_PATH_NOT_EXPORTED=Ie("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,r=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${r?` imported from ${r}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${r?` imported from ${r}`:""}`,Error);ge.ERR_UNSUPPORTED_DIR_IMPORT=Ie("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);ge.ERR_UNSUPPORTED_RESOLVE_REQUEST=Ie("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError);ge.ERR_UNKNOWN_FILE_EXTENSION=Ie("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);ge.ERR_INVALID_ARG_VALUE=Ie("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let s=Di(t);return s.length>128&&(s=`${s.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${s}`},TypeError);function Ie(e,t,r){return oc.set(e,t),zd(r,e)}function zd(e,t){return r;function r(...s){let i=Error.stackTraceLimit;Fi()&&(Error.stackTraceLimit=0);let n=new e;Fi()&&(Error.stackTraceLimit=i);let a=Qd(t,s,n);return Object.defineProperties(n,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Yd(n),n.code=t,n}}function Fi(){try{if(Bd.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):Gd.call(e,"writable")&&e.writable!==void 0?e.writable:e.set!==void 0}function Kd(e){let t=qd+e.name;return Object.defineProperty(e,"name",{value:t}),e}var Yd=Kd(function(e){let t=Fi();return t&&(zu=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=zu),e});function Qd(e,t,r){let s=oc.get(e);if(ct(s!==void 0,"expected `message` to be found"),typeof s=="function")return ct(s.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${s.length}).`),Reflect.apply(s,r,t);let i=/%[dfijoOs]/g,n=0;for(;i.exec(s)!==null;)n++;return ct(n===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${n}).`),t.length===0?s:(t.unshift(s),Reflect.apply(Ud,null,t))}function Xd(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}`:`${Di(e,{depth:-1})}`;let t=Di(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}var Zt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:Zd}=ge,Ku=new Map;function uc(e,{base:t,specifier:r}){let s=Ku.get(e);if(s)return s;let i;try{i=Vd.readFileSync(ji.toNamespacedPath(e),"utf8")}catch(a){let u=a;if(u.code!=="ENOENT")throw u}let n={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(i!==void 0){let a;try{a=JSON.parse(i)}catch(u){let c=u,f=new Zd(e,(t?`"${r}" from `:"")+D(t||r),c.message);throw f.cause=c,f}n.exists=!0,Zt.call(a,"name")&&typeof a.name=="string"&&(n.name=a.name),Zt.call(a,"main")&&typeof a.main=="string"&&(n.main=a.main),Zt.call(a,"exports")&&(n.exports=a.exports),Zt.call(a,"imports")&&(n.imports=a.imports),Zt.call(a,"type")&&(a.type==="commonjs"||a.type==="module")&&(n.type=a.type)}return Ku.set(e,n),n}function Bi(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let i=uc(D(t),{specifier:e});if(i.exists)return i;let n=t;if(t=new URL("../package.json",t),t.pathname===n.pathname)break}return{pjsonPath:D(t),exists:!1,type:"none"}}function Yu(e){return Bi(e).type}var{ERR_UNKNOWN_FILE_EXTENSION:Jd}=ge,em={}.hasOwnProperty,tm={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};function rm(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?"module":e==="application/json"?"json":null}var Qu={__proto__:null,"data:":sm,"file:":nm,"http:":Xu,"https:":Xu,"node:"(){return"builtin"}};function sm(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return rm(t)}function im(e){let t=e.pathname,r=t.length;for(;r--;){let s=t.codePointAt(r);if(s===47)return"";if(s===46)return t.codePointAt(r-1)===47?"":t.slice(r)}return""}function nm(e,t,r){let s=im(e);if(s===".js"){let a=Yu(e);return a!=="none"?a:"commonjs"}if(s===""){let a=Yu(e);return a==="none"||a==="commonjs"?"commonjs":"module"}let i=tm[s];if(i)return i;if(r)return;let n=D(e);throw new Jd(s,n)}function Xu(){}function am(e,t){let r=e.protocol;return em.call(Qu,r)&&Qu[r](e,t,!0)||null}var Hr=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:bx,ERR_INVALID_MODULE_SPECIFIER:Yr,ERR_INVALID_PACKAGE_CONFIG:cc,ERR_INVALID_PACKAGE_TARGET:om,ERR_MODULE_NOT_FOUND:Ui,ERR_PACKAGE_IMPORT_NOT_DEFINED:um,ERR_PACKAGE_PATH_NOT_EXPORTED:cm,ERR_UNSUPPORTED_DIR_IMPORT:lm,ERR_UNSUPPORTED_RESOLVE_REQUEST:Zu}=ge,lc={}.hasOwnProperty,Ju=/(^|\\|\/)((\.|%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,ec=/(^|\\|\/)((\.|%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,hm=/^\.|%|\\/,qr=/\*/g,fm=/%2f|%5c/i,tc=new Set,pm=/[/\\]{2}/;function rc(e,t,r,s,i,n,a){if(_t.noDeprecation)return;let u=D(s),c=pm.exec(a?e:t)!==null;_t.emitWarning(`Use of deprecated ${c?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===r?"":`matched to "${r}" `}in the "${i?"imports":"exports"}" field module resolution of the package at ${u}${n?` imported from ${D(n)}`:""}.`,"DeprecationWarning","DEP0166")}function sc(e,t,r,s){if(_t.noDeprecation||am(e,{parentURL:r.href})!=="module")return;let n=D(e.href),a=D(new ie(".",t)),u=D(r);s?ji.resolve(a,s)!==n&&_t.emitWarning(`Package ${a} has a "main" field set to "${s}", excluding the full filename and extension to the resolved file at "${n.slice(a.length)}", imported from ${u}.
45
45
  Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):_t.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${n.slice(a.length)}", imported from ${u}.
46
- Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function hc(e){try{return Vi(e)}catch{}}function Ii(e){let t=Vi(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function dm(e,t,r){let s;if(t.main!==void 0){if(s=new ie(t.main,e),Ii(s))return s;let a=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],u=-1;for(;++u<a.length&&(s=new ie(a[u],e),!Ii(s));)s=void 0;if(s)return sc(s,e,r,t.main),s}let i=["./index.js","./index.json","./index.node"],n=-1;for(;++n<i.length&&(s=new ie(i[n],e),!Ii(s));)s=void 0;if(s)return sc(s,e,r,t.main),s;throw new Ui(D(new ie(".",e)),D(r))}function mm(e,t,r){if(fm.exec(e.pathname)!==null)throw new Yr(e.pathname,'must not include encoded "/" or "\\" characters',D(t));let s;try{s=D(e)}catch(n){let a=n;throw Object.defineProperty(a,"input",{value:String(e)}),Object.defineProperty(a,"module",{value:String(t)}),a}let i=hc(s.endsWith("/")?s.slice(-1):s);if(i&&i.isDirectory()){let n=new lm(s,D(t));throw n.url=String(e),n}if(!i||!i.isFile()){let n=new Ui(s||e.pathname,t&&D(t),!0);throw n.url=String(e),n}{let n=jd(s),{search:a,hash:u}=e;e=Kr(n+(s.endsWith(ji.sep)?"/":"")),e.search=a,e.hash=u}return e}function gm(e,t,r){return new um(e,t&&D(new ie(".",t)),D(r))}function Ni(e,t,r){return new cm(D(new ie(".",t)),e,r&&D(r))}function xm(e,t,r,s,i){let n=`request is not a valid match in pattern "${t}" for the "${s?"imports":"exports"}" resolution of ${D(r)}`;throw new Yr(e,n,i&&D(i))}function Jt(e,t,r,s,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new om(D(new ie(".",r)),e,t,s,i&&D(i))}function _m(e,t,r,s,i,n,a,u,c){if(t!==""&&!n&&e[e.length-1]!=="/")throw Jt(r,e,s,a,i);if(!e.startsWith("./")){if(a&&!e.startsWith("../")&&!e.startsWith("/")){let p=!1;try{new ie(e),p=!0}catch{}if(!p){let d=n?Hr.call(qr,e,()=>t):e+t;return pc(d,s,c)}}throw Jt(r,e,s,a,i)}if(Ju.exec(e.slice(2))!==null)if(ec.exec(e.slice(2))===null){if(!u){let p=n?r.replace("*",()=>t):r+t,d=n?Hr.call(qr,e,()=>t):e;rc(d,p,r,s,a,i,!0)}}else throw Jt(r,e,s,a,i);let f=new ie(e,s),l=f.pathname,h=new ie(".",s).pathname;if(!l.startsWith(h))throw Jt(r,e,s,a,i);if(t==="")return f;if(Ju.exec(t)!==null){let p=n?r.replace("*",()=>t):r+t;if(ec.exec(t)===null){if(!u){let d=n?Hr.call(qr,e,()=>t):e;rc(d,p,r,s,a,i,!1)}}else xm(p,r,s,a,i)}return n?new ie(Hr.call(qr,f.href,()=>t)):new ie(t,f)}function ym(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function It(e,t,r,s,i,n,a,u,c){if(typeof t=="string")return _m(t,r,s,e,i,n,a,u,c);if(Array.isArray(t)){let f=t;if(f.length===0)return null;let l,h=-1;for(;++h<f.length;){let p=f[h],d;try{d=It(e,p,r,s,i,n,a,u,c)}catch(B){let W=B;if(l=W,W.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw B}if(d!==void 0){if(d===null){l=null;continue}return d}}if(l==null)return null;throw l}if(typeof t=="object"&&t!==null){let f=Object.getOwnPropertyNames(t),l=-1;for(;++l<f.length;){let h=f[l];if(ym(h))throw new cc(D(e),i,'"exports" cannot contain numeric property keys.')}for(l=-1;++l<f.length;){let h=f[l];if(h==="default"||c&&c.has(h)){let p=t[h],d=It(e,p,r,s,i,n,a,u,c);if(d===void 0)continue;return d}}return null}if(t===null)return null;throw Jt(s,t,e,a,i)}function vm(e,t,r){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let s=Object.getOwnPropertyNames(e),i=!1,n=0,a=-1;for(;++a<s.length;){let u=s[a],c=u===""||u[0]!==".";if(n++===0)i=c;else if(i!==c)throw new cc(D(t),r,`"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 bm(e,t,r){if(_t.noDeprecation)return;let s=D(t);tc.has(s+"|"+e)||(tc.add(s+"|"+e),_t.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${s}${r?` imported from ${D(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function ic(e,t,r,s,i){let n=r.exports;if(vm(n,e,s)&&(n={".":n}),lc.call(n,t)&&!t.includes("*")&&!t.endsWith("/")){let l=n[t],h=It(e,l,"",t,s,!1,!1,!1,i);if(h==null)throw Ni(t,e,s);return h}let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&t.startsWith(l.slice(0,h))){t.endsWith("/")&&bm(t,e,s);let p=l.slice(h+1);t.length>=l.length&&t.endsWith(p)&&fc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=t.slice(h,t.length-p.length))}}if(a){let l=n[a],h=It(e,l,u,a,s,!0,!1,t.endsWith("/"),i);if(h==null)throw Ni(t,e,s);return h}throw Ni(t,e,s)}function fc(e,t){let r=e.indexOf("*"),s=t.indexOf("*"),i=r===-1?e.length:r+1,n=s===-1?t.length:s+1;return i>n?-1:n>i||r===-1?1:s===-1||e.length>t.length?-1:t.length>e.length?1:0}function wm(e,t,r){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let n="is not a valid internal imports specifier name";throw new Yr(e,n,D(t))}let s,i=Bi(t);if(i.exists){s=Kr(i.pjsonPath);let n=i.imports;if(n)if(lc.call(n,e)&&!e.includes("*")){let a=It(s,n[e],"",e,t,!1,!0,!1,r);if(a!=null)return a}else{let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&e.startsWith(l.slice(0,-1))){let p=l.slice(h+1);e.length>=l.length&&e.endsWith(p)&&fc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=e.slice(h,e.length-p.length))}}if(a){let l=n[a],h=It(s,l,u,a,t,!0,!0,!1,r);if(h!=null)return h}}}throw gm(e,s,t)}function Cm(e,t){let r=e.indexOf("/"),s=!0,i=!1;e[0]==="@"&&(i=!0,r===-1||e.length===0?s=!1:r=e.indexOf("/",r+1));let n=r===-1?e:e.slice(0,r);if(hm.exec(n)!==null&&(s=!1),!s)throw new Yr(e,"is not a valid package name",D(t));let a="."+(r===-1?"":e.slice(r));return{packageName:n,packageSubpath:a,isScoped:i}}function pc(e,t,r){if(Mi.includes(e))return new ie("node:"+e);let{packageName:s,packageSubpath:i,isScoped:n}=Cm(e,t),a=Bi(t);if(a.exists){let l=Kr(a.pjsonPath);if(a.name===s&&a.exports!==void 0&&a.exports!==null)return ic(l,i,a,t,r)}let u=new ie("./node_modules/"+s+"/package.json",t),c=D(u),f;do{let l=hc(c.slice(0,-13));if(!l||!l.isDirectory()){f=c,u=new ie((n?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",u),c=D(u);continue}let h=uc(c,{base:t,specifier:e});return h.exports!==void 0&&h.exports!==null?ic(u,i,h,t,r):i==="."?dm(u,h,t):new ie(i,u)}while(c.length!==f.length);throw new Ui(s,D(t),!1)}function km(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Em(e){return e===""?!1:e[0]==="/"?!0:km(e)}function Sm(e,t,r,s){let i=t.protocol,a=i==="data:"||i==="http:"||i==="https:",u;if(Em(e))try{u=new ie(e,t)}catch(c){let f=new Zu(e,t);throw f.cause=c,f}else if(i==="file:"&&e[0]==="#")u=wm(e,t,r);else try{u=new ie(e)}catch(c){if(a&&!Mi.includes(e)){let f=new Zu(e,t);throw f.cause=c,f}u=pc(e,t,r)}return ct(u!==void 0,"expected to be defined"),u.protocol!=="file:"?u:mm(u,t)}function zr(e){return typeof e=="string"&&!e.startsWith("file://")?$i(e):$i(D(e))}function Li(e){return Kr(zr(e)).toString()}function Am(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:ac.has(e)?"node:"+e:"file://"+encodeURI($i(e))}var Tm=new Set(["node","import"]),Om=[".mjs",".cjs",".js",".json"],Rm=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function nc(e,t,r){try{return Sm(e,t,r)}catch(s){if(!Rm.has(s?.code))throw s}}function Pm(e,t={}){if(typeof e!="string")if(e instanceof URL)e=zr(e);else throw new TypeError("input must be a `string` or `URL`");if(/(node|data|http|https):/.test(e))return e;if(ac.has(e))return"node:"+e;if(e.startsWith("file://")&&(e=zr(e)),Ri(e))try{if(Vi(e).isFile())return Li(e)}catch(a){if(a?.code!=="ENOENT")throw a}let r=t.conditions?new Set(t.conditions):Tm,s=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(a=>new URL(Am(a.toString())));s.length===0&&s.push(new URL(Li(process.cwd())));let i=[...s];for(let a of s)a.protocol==="file:"&&i.push(new URL("./",a),new URL(Oi(a.pathname,"_index.js"),a),new URL("node_modules",a));let n;for(let a of i){if(n=nc(e,a,r),n)break;for(let u of["","/index"]){for(let c of t.extensions||Om)if(n=nc(Oi(e,u)+c,a,r),n)break;if(n)break}if(n)break}if(!n){let a=new Error(`Cannot find module ${e} imported from ${i.join(", ")}`);throw a.code="ERR_MODULE_NOT_FOUND",a}return Li(n)}function Im(e,t){return Pm(e,t)}function dc(e,t){return zr(Im(e,t))}y();y();var mc=Symbol.for("quansync.getIsAsync"),Qr=class extends Error{constructor(t="Unexpected promise in sync context"){super(t),this.name="QuansyncError"}};function Wi(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Nm(e){return e&&typeof e=="object"&&typeof e[Symbol.iterator]=="function"&&"__quansync"in e}function Hi(e){let t=function*(...s){return(yield mc)?yield e.async.apply(this,s):e.sync.apply(this,s)};function r(...s){let i=t.apply(this,s);return i.then=(...n)=>e.async.apply(this,s).then(...n),i.__quansync=!0,i}return r.sync=e.sync,r.async=e.async,r}function Lm(e){return Hi({async:()=>Promise.resolve(e),sync:()=>{if(Wi(e))throw new Qr;return e}})}function Gi(e,t){if(e===mc)return t;if(Nm(e))return t?_c(e):xc(e);if(!t&&Wi(e))throw new Qr;return e}var gc=e=>e;function xc(e,t=gc){let r=e.next();for(;!r.done;)try{r=e.next(Gi(t(r.value,!1)))}catch(s){r=e.throw(s)}return Gi(r.value)}async function _c(e,t=gc){let r=e.next();for(;!r.done;)try{r=e.next(await Gi(t(r.value,!0),!0))}catch(s){r=e.throw(s)}return r.value}function Dm(e,t){return Hi({name:e.name,async(...r){return _c(e.apply(this,r),t?.onYield)},sync(...r){return xc(e.apply(this,r),t?.onYield)}})}function qi(e,t){return Wi(e)?Lm(e):typeof e=="function"?Dm(e,t):Hi(e)}var kx=qi({async:()=>Promise.resolve(!0),sync:()=>!1});var Nt=qi;var Xr=e=>e instanceof URL?jm(e):e;async function Bm(e,{cwd:t=Lt.cwd(),type:r="file",stopAt:s}={}){let i=Ne.resolve(Xr(t)??""),{root:n}=Ne.parse(i);s=Ne.resolve(i,Xr(s??n));let a=Ne.isAbsolute(e);for(;i;){let u=a?e:Ne.join(i,e);try{let c=await Vm.stat(u);if(r==="file"&&c.isFile()||r==="directory"&&c.isDirectory())return u}catch{}if(i===s||i===n)break;i=Ne.dirname(i)}}function Um(e,{cwd:t=Lt.cwd(),type:r="file",stopAt:s}={}){let i=Ne.resolve(Xr(t)??""),{root:n}=Ne.parse(i);s=Ne.resolve(i,Xr(s)??n);let a=Ne.isAbsolute(e);for(;i;){let u=a?e:Ne.join(i,e);try{let c=er.statSync(u,{throwIfNoEntry:!1});if(r==="file"&&c?.isFile()||r==="directory"&&c?.isDirectory())return u}catch{}if(i===s||i===n)break;i=Ne.dirname(i)}}function yc(e,t={}){if((t.platform==="auto"||!t.platform)&&(t.platform=Lt.platform==="win32"?"win32":"posix"),Lt.versions.pnp){let s=t.paths||[];s.length===0&&s.push(Lt.cwd());let i=$m(import.meta.url);try{return i.resolve(e,{paths:s})}catch{}}let r=dc(e,{url:t.paths});return t.platform==="win32"?Mm.normalize(r):r}function bc(e,t={}){return!!Cc(e,t)}function Gm(e,t={}){let r=Cc(e,t);if(r)return Hm(r)}var wc=Nt({async:e=>er.promises.readFile(e,"utf8"),sync:e=>er.readFileSync(e,"utf8")}),Wm=Nt(function*(e,t={}){let r=Gm(e,t);if(!r)return;let s=JSON.parse(yield wc(r));return{name:e,version:s.version,rootPath:vc(r),packageJsonPath:r,packageJson:s}}),Vx=Wm.sync;function Cc(e,t={}){try{return yc(`${e}/package.json`,t)}catch{}try{return yc(e,t)}catch(r){return r.code!=="MODULE_NOT_FOUND"&&r.code!=="ERR_MODULE_NOT_FOUND"&&console.error(r),!1}}function Hm(e){let t;for(;;){if(!e)return;let r=vc(e);if(r===e)return;if(e=r,t=Fm(e,"package.json"),er.existsSync(t))break}return t}var qm=Nt({sync:Um,async:Bm}),kc=Nt(function*(e=Lt.cwd()){let t=yield qm("package.json",{cwd:e});return!t||!er.existsSync(t)?null:JSON.parse(yield wc(t))}),jx=kc.sync,zm=Nt(function*(e,t){let r=(yield kc(t))||{};return e in(r.dependencies||{})||e in(r.devDependencies||{})}),Bx=zm.sync;var Sc="@lntvow/dev",Ac="5.0.8";y();var tr=st(xs(),1);import{execSync as Km}from"child_process";import{existsSync as Ym}from"fs";import{resolve as Qm}from"path";var Z={info:e=>console.log(tr.default.blue(`\u25CF ${e}`)),success:e=>console.log(tr.default.green(`\u2713 ${e}`)),warn:e=>console.log(tr.default.yellow(`\u25B2 ${e}`)),error:e=>console.log(tr.default.red(`\u2717 ${e}`))};function zi(e,t={}){try{return Km(e,{stdio:"inherit",...t})}catch(r){throw Z.error(`\u547D\u4EE4\u6267\u884C\u5931\u8D25: ${e}`),r}}function Tc(){let e=[{file:"pnpm-lock.yaml",manager:"pnpm"},{file:"yarn.lock",manager:"yarn"},{file:"package-lock.json",manager:"npm"}];for(let{file:r,manager:s}of e)if(Ym(Qm(process.cwd(),r)))return s;let t=process.env.npm_config_user_agent||"";return t.startsWith("pnpm")?"pnpm":t.startsWith("yarn")?"yarn":"npm"}y();var Oc={postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u --reject @types/node && pnpm install",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"},Rc=["simple-git-hooks","commitizen","cz-conventional-changelog","lint-staged","@commitlint/cli","@commitlint/config-conventional","@lntvow/eslint-config","eslint","prettier","npm-run-all","bumpp"];y();import rr from"fs";import Ki from"path";function Yi(e,t){if(rr.statSync(e).isDirectory()){if(Ki.basename(e)==="node_modules")return;rr.mkdirSync(t,{recursive:!0}),rr.readdirSync(e).forEach(s=>{Yi(Ki.resolve(e,s),Ki.resolve(t,s))})}else{if(rr.existsSync(t))return;rr.copyFileSync(e,t)}}var eg=Jm(import.meta.url),tg=Zm(eg);Ft.name(Sc).version(Ac,"-v, --version","output the version number");Ft.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").description("init project").action(async e=>{Z.success("Init project by @lntvow/dev"),Z.info(`Cwd is ${process.cwd()}`);let{temp:t,git:r,scripts:s}=e;try{ng(),t&&rg(),s&&ig(),r&&sg(),Z.success("Project initialization completed successfully!")}catch(i){Z.error(`Initialization failed: ${i.message}`),process.exit(1)}});function rg(){Z.info("Copying template files..."),Yi(Ic(tg,"./configs"),process.cwd()),Z.success("Template files copied successfully")}function sg(){if(!bc("simple-git-hooks")){Z.warn("simple-git-hooks not installed, skipping initialization");return}try{Z.info("Initializing Git hooks..."),zi("npx simple-git-hooks"),Z.success("Git hooks initialized successfully")}catch(e){Z.error(`Failed to initialize Git hooks: ${e.message}`)}}function ig(){Z.info("Updating package.json scripts...");let e=Ic(process.cwd(),"package.json"),t;try{t=Xm(e,"utf-8");let r=JSON.parse(t),s={...r,scripts:{...Oc,...r.scripts}};Pc(e,JSON.stringify(s,null,2)),Z.success("Package.json scripts updated successfully")}catch(r){t&&Pc(e,t),Z.error(`Failed to update package.json: ${r.message}`),process.exit(1)}}function ng(){try{let e=Rc.map(s=>`${s}@latest`).join(" "),t=Tc(),r="";t==="pnpm"?r=`pnpm add -D ${e}`:t==="yarn"?r=`yarn add -D ${e}`:r=`npm install -D ${e}`,Z.info(`Installing dependencies: ${r}`),zi(r),Z.success("Dependencies installed successfully")}catch(e){Z.error(`Dependency installation failed: ${e.message}`),process.exit(1)}}Ft.command("release").description("git release").action(async()=>{console.log(Nc.default.green("Release project..."));try{await ag(),Z.success("Release completed successfully!")}catch(e){Z.error(`Release failed: ${e.message}`),process.exit(1)}});async function ag(){let e=au(process.cwd());try{let t=(0,Lc.default)().format("YYYYMMDD HH:mm");await e.pull(),await e.add("."),await e.commit(t,["--no-verify"]),await e.push("origin"),Z.success(`\u63D0\u4EA4\u6210\u529F: ${t}`)}catch(t){Z.error(`Git\u64CD\u4F5C\u5931\u8D25: ${t.message}`),process.exit(1)}}Ft.parse();
46
+ Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function hc(e){try{return Vi(e)}catch{}}function Ii(e){let t=Vi(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function dm(e,t,r){let s;if(t.main!==void 0){if(s=new ie(t.main,e),Ii(s))return s;let a=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],u=-1;for(;++u<a.length&&(s=new ie(a[u],e),!Ii(s));)s=void 0;if(s)return sc(s,e,r,t.main),s}let i=["./index.js","./index.json","./index.node"],n=-1;for(;++n<i.length&&(s=new ie(i[n],e),!Ii(s));)s=void 0;if(s)return sc(s,e,r,t.main),s;throw new Ui(D(new ie(".",e)),D(r))}function mm(e,t,r){if(fm.exec(e.pathname)!==null)throw new Yr(e.pathname,'must not include encoded "/" or "\\" characters',D(t));let s;try{s=D(e)}catch(n){let a=n;throw Object.defineProperty(a,"input",{value:String(e)}),Object.defineProperty(a,"module",{value:String(t)}),a}let i=hc(s.endsWith("/")?s.slice(-1):s);if(i&&i.isDirectory()){let n=new lm(s,D(t));throw n.url=String(e),n}if(!i||!i.isFile()){let n=new Ui(s||e.pathname,t&&D(t),!0);throw n.url=String(e),n}{let n=jd(s),{search:a,hash:u}=e;e=Kr(n+(s.endsWith(ji.sep)?"/":"")),e.search=a,e.hash=u}return e}function gm(e,t,r){return new um(e,t&&D(new ie(".",t)),D(r))}function Ni(e,t,r){return new cm(D(new ie(".",t)),e,r&&D(r))}function xm(e,t,r,s,i){let n=`request is not a valid match in pattern "${t}" for the "${s?"imports":"exports"}" resolution of ${D(r)}`;throw new Yr(e,n,i&&D(i))}function Jt(e,t,r,s,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new om(D(new ie(".",r)),e,t,s,i&&D(i))}function _m(e,t,r,s,i,n,a,u,c){if(t!==""&&!n&&e[e.length-1]!=="/")throw Jt(r,e,s,a,i);if(!e.startsWith("./")){if(a&&!e.startsWith("../")&&!e.startsWith("/")){let p=!1;try{new ie(e),p=!0}catch{}if(!p){let d=n?Hr.call(qr,e,()=>t):e+t;return pc(d,s,c)}}throw Jt(r,e,s,a,i)}if(Ju.exec(e.slice(2))!==null)if(ec.exec(e.slice(2))===null){if(!u){let p=n?r.replace("*",()=>t):r+t,d=n?Hr.call(qr,e,()=>t):e;rc(d,p,r,s,a,i,!0)}}else throw Jt(r,e,s,a,i);let f=new ie(e,s),l=f.pathname,h=new ie(".",s).pathname;if(!l.startsWith(h))throw Jt(r,e,s,a,i);if(t==="")return f;if(Ju.exec(t)!==null){let p=n?r.replace("*",()=>t):r+t;if(ec.exec(t)===null){if(!u){let d=n?Hr.call(qr,e,()=>t):e;rc(d,p,r,s,a,i,!1)}}else xm(p,r,s,a,i)}return n?new ie(Hr.call(qr,f.href,()=>t)):new ie(t,f)}function ym(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function It(e,t,r,s,i,n,a,u,c){if(typeof t=="string")return _m(t,r,s,e,i,n,a,u,c);if(Array.isArray(t)){let f=t;if(f.length===0)return null;let l,h=-1;for(;++h<f.length;){let p=f[h],d;try{d=It(e,p,r,s,i,n,a,u,c)}catch(B){let W=B;if(l=W,W.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw B}if(d!==void 0){if(d===null){l=null;continue}return d}}if(l==null)return null;throw l}if(typeof t=="object"&&t!==null){let f=Object.getOwnPropertyNames(t),l=-1;for(;++l<f.length;){let h=f[l];if(ym(h))throw new cc(D(e),i,'"exports" cannot contain numeric property keys.')}for(l=-1;++l<f.length;){let h=f[l];if(h==="default"||c&&c.has(h)){let p=t[h],d=It(e,p,r,s,i,n,a,u,c);if(d===void 0)continue;return d}}return null}if(t===null)return null;throw Jt(s,t,e,a,i)}function vm(e,t,r){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let s=Object.getOwnPropertyNames(e),i=!1,n=0,a=-1;for(;++a<s.length;){let u=s[a],c=u===""||u[0]!==".";if(n++===0)i=c;else if(i!==c)throw new cc(D(t),r,`"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 bm(e,t,r){if(_t.noDeprecation)return;let s=D(t);tc.has(s+"|"+e)||(tc.add(s+"|"+e),_t.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${s}${r?` imported from ${D(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function ic(e,t,r,s,i){let n=r.exports;if(vm(n,e,s)&&(n={".":n}),lc.call(n,t)&&!t.includes("*")&&!t.endsWith("/")){let l=n[t],h=It(e,l,"",t,s,!1,!1,!1,i);if(h==null)throw Ni(t,e,s);return h}let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&t.startsWith(l.slice(0,h))){t.endsWith("/")&&bm(t,e,s);let p=l.slice(h+1);t.length>=l.length&&t.endsWith(p)&&fc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=t.slice(h,t.length-p.length))}}if(a){let l=n[a],h=It(e,l,u,a,s,!0,!1,t.endsWith("/"),i);if(h==null)throw Ni(t,e,s);return h}throw Ni(t,e,s)}function fc(e,t){let r=e.indexOf("*"),s=t.indexOf("*"),i=r===-1?e.length:r+1,n=s===-1?t.length:s+1;return i>n?-1:n>i||r===-1?1:s===-1||e.length>t.length?-1:t.length>e.length?1:0}function wm(e,t,r){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let n="is not a valid internal imports specifier name";throw new Yr(e,n,D(t))}let s,i=Bi(t);if(i.exists){s=Kr(i.pjsonPath);let n=i.imports;if(n)if(lc.call(n,e)&&!e.includes("*")){let a=It(s,n[e],"",e,t,!1,!0,!1,r);if(a!=null)return a}else{let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&e.startsWith(l.slice(0,-1))){let p=l.slice(h+1);e.length>=l.length&&e.endsWith(p)&&fc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=e.slice(h,e.length-p.length))}}if(a){let l=n[a],h=It(s,l,u,a,t,!0,!0,!1,r);if(h!=null)return h}}}throw gm(e,s,t)}function Cm(e,t){let r=e.indexOf("/"),s=!0,i=!1;e[0]==="@"&&(i=!0,r===-1||e.length===0?s=!1:r=e.indexOf("/",r+1));let n=r===-1?e:e.slice(0,r);if(hm.exec(n)!==null&&(s=!1),!s)throw new Yr(e,"is not a valid package name",D(t));let a="."+(r===-1?"":e.slice(r));return{packageName:n,packageSubpath:a,isScoped:i}}function pc(e,t,r){if(Mi.includes(e))return new ie("node:"+e);let{packageName:s,packageSubpath:i,isScoped:n}=Cm(e,t),a=Bi(t);if(a.exists){let l=Kr(a.pjsonPath);if(a.name===s&&a.exports!==void 0&&a.exports!==null)return ic(l,i,a,t,r)}let u=new ie("./node_modules/"+s+"/package.json",t),c=D(u),f;do{let l=hc(c.slice(0,-13));if(!l||!l.isDirectory()){f=c,u=new ie((n?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",u),c=D(u);continue}let h=uc(c,{base:t,specifier:e});return h.exports!==void 0&&h.exports!==null?ic(u,i,h,t,r):i==="."?dm(u,h,t):new ie(i,u)}while(c.length!==f.length);throw new Ui(s,D(t),!1)}function km(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Em(e){return e===""?!1:e[0]==="/"?!0:km(e)}function Sm(e,t,r,s){let i=t.protocol,a=i==="data:"||i==="http:"||i==="https:",u;if(Em(e))try{u=new ie(e,t)}catch(c){let f=new Zu(e,t);throw f.cause=c,f}else if(i==="file:"&&e[0]==="#")u=wm(e,t,r);else try{u=new ie(e)}catch(c){if(a&&!Mi.includes(e)){let f=new Zu(e,t);throw f.cause=c,f}u=pc(e,t,r)}return ct(u!==void 0,"expected to be defined"),u.protocol!=="file:"?u:mm(u,t)}function zr(e){return typeof e=="string"&&!e.startsWith("file://")?$i(e):$i(D(e))}function Li(e){return Kr(zr(e)).toString()}function Am(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:ac.has(e)?"node:"+e:"file://"+encodeURI($i(e))}var Tm=new Set(["node","import"]),Om=[".mjs",".cjs",".js",".json"],Rm=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function nc(e,t,r){try{return Sm(e,t,r)}catch(s){if(!Rm.has(s?.code))throw s}}function Pm(e,t={}){if(typeof e!="string")if(e instanceof URL)e=zr(e);else throw new TypeError("input must be a `string` or `URL`");if(/(node|data|http|https):/.test(e))return e;if(ac.has(e))return"node:"+e;if(e.startsWith("file://")&&(e=zr(e)),Ri(e))try{if(Vi(e).isFile())return Li(e)}catch(a){if(a?.code!=="ENOENT")throw a}let r=t.conditions?new Set(t.conditions):Tm,s=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(a=>new URL(Am(a.toString())));s.length===0&&s.push(new URL(Li(process.cwd())));let i=[...s];for(let a of s)a.protocol==="file:"&&i.push(new URL("./",a),new URL(Oi(a.pathname,"_index.js"),a),new URL("node_modules",a));let n;for(let a of i){if(n=nc(e,a,r),n)break;for(let u of["","/index"]){for(let c of t.extensions||Om)if(n=nc(Oi(e,u)+c,a,r),n)break;if(n)break}if(n)break}if(!n){let a=new Error(`Cannot find module ${e} imported from ${i.join(", ")}`);throw a.code="ERR_MODULE_NOT_FOUND",a}return Li(n)}function Im(e,t){return Pm(e,t)}function dc(e,t){return zr(Im(e,t))}y();y();var mc=Symbol.for("quansync.getIsAsync"),Qr=class extends Error{constructor(t="Unexpected promise in sync context"){super(t),this.name="QuansyncError"}};function Wi(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Nm(e){return e&&typeof e=="object"&&typeof e[Symbol.iterator]=="function"&&"__quansync"in e}function Hi(e){let t=function*(...s){return(yield mc)?yield e.async.apply(this,s):e.sync.apply(this,s)};function r(...s){let i=t.apply(this,s);return i.then=(...n)=>e.async.apply(this,s).then(...n),i.__quansync=!0,i}return r.sync=e.sync,r.async=e.async,r}function Lm(e){return Hi({async:()=>Promise.resolve(e),sync:()=>{if(Wi(e))throw new Qr;return e}})}function Gi(e,t){if(e===mc)return t;if(Nm(e))return t?_c(e):xc(e);if(!t&&Wi(e))throw new Qr;return e}var gc=e=>e;function xc(e,t=gc){let r=e.next();for(;!r.done;)try{r=e.next(Gi(t(r.value,!1)))}catch(s){r=e.throw(s)}return Gi(r.value)}async function _c(e,t=gc){let r=e.next();for(;!r.done;)try{r=e.next(await Gi(t(r.value,!0),!0))}catch(s){r=e.throw(s)}return r.value}function Dm(e,t){return Hi({name:e.name,async(...r){return _c(e.apply(this,r),t?.onYield)},sync(...r){return xc(e.apply(this,r),t?.onYield)}})}function qi(e,t){return Wi(e)?Lm(e):typeof e=="function"?Dm(e,t):Hi(e)}var kx=qi({async:()=>Promise.resolve(!0),sync:()=>!1});var Nt=qi;var Xr=e=>e instanceof URL?jm(e):e;async function Bm(e,{cwd:t=Lt.cwd(),type:r="file",stopAt:s}={}){let i=Ne.resolve(Xr(t)??""),{root:n}=Ne.parse(i);s=Ne.resolve(i,Xr(s??n));let a=Ne.isAbsolute(e);for(;i;){let u=a?e:Ne.join(i,e);try{let c=await Vm.stat(u);if(r==="file"&&c.isFile()||r==="directory"&&c.isDirectory())return u}catch{}if(i===s||i===n)break;i=Ne.dirname(i)}}function Um(e,{cwd:t=Lt.cwd(),type:r="file",stopAt:s}={}){let i=Ne.resolve(Xr(t)??""),{root:n}=Ne.parse(i);s=Ne.resolve(i,Xr(s)??n);let a=Ne.isAbsolute(e);for(;i;){let u=a?e:Ne.join(i,e);try{let c=er.statSync(u,{throwIfNoEntry:!1});if(r==="file"&&c?.isFile()||r==="directory"&&c?.isDirectory())return u}catch{}if(i===s||i===n)break;i=Ne.dirname(i)}}function yc(e,t={}){if((t.platform==="auto"||!t.platform)&&(t.platform=Lt.platform==="win32"?"win32":"posix"),Lt.versions.pnp){let s=t.paths||[];s.length===0&&s.push(Lt.cwd());let i=$m(import.meta.url);try{return i.resolve(e,{paths:s})}catch{}}let r=dc(e,{url:t.paths});return t.platform==="win32"?Mm.normalize(r):r}function bc(e,t={}){return!!Cc(e,t)}function Gm(e,t={}){let r=Cc(e,t);if(r)return Hm(r)}var wc=Nt({async:e=>er.promises.readFile(e,"utf8"),sync:e=>er.readFileSync(e,"utf8")}),Wm=Nt(function*(e,t={}){let r=Gm(e,t);if(!r)return;let s=JSON.parse(yield wc(r));return{name:e,version:s.version,rootPath:vc(r),packageJsonPath:r,packageJson:s}}),Vx=Wm.sync;function Cc(e,t={}){try{return yc(`${e}/package.json`,t)}catch{}try{return yc(e,t)}catch(r){return r.code!=="MODULE_NOT_FOUND"&&r.code!=="ERR_MODULE_NOT_FOUND"&&console.error(r),!1}}function Hm(e){let t;for(;;){if(!e)return;let r=vc(e);if(r===e)return;if(e=r,t=Fm(e,"package.json"),er.existsSync(t))break}return t}var qm=Nt({sync:Um,async:Bm}),kc=Nt(function*(e=Lt.cwd()){let t=yield qm("package.json",{cwd:e});return!t||!er.existsSync(t)?null:JSON.parse(yield wc(t))}),jx=kc.sync,zm=Nt(function*(e,t){let r=(yield kc(t))||{};return e in(r.dependencies||{})||e in(r.devDependencies||{})}),Bx=zm.sync;var Sc="@lntvow/dev",Ac="5.0.9";y();var tr=st(xs(),1);import{execSync as Km}from"child_process";import{existsSync as Ym}from"fs";import{resolve as Qm}from"path";var Z={info:e=>console.log(tr.default.blue(`\u25CF ${e}`)),success:e=>console.log(tr.default.green(`\u2713 ${e}`)),warn:e=>console.log(tr.default.yellow(`\u25B2 ${e}`)),error:e=>console.log(tr.default.red(`\u2717 ${e}`))};function zi(e,t={}){try{return Km(e,{stdio:"inherit",...t})}catch(r){throw Z.error(`\u547D\u4EE4\u6267\u884C\u5931\u8D25: ${e}`),r}}function Tc(){let e=[{file:"pnpm-lock.yaml",manager:"pnpm"},{file:"yarn.lock",manager:"yarn"},{file:"package-lock.json",manager:"npm"}];for(let{file:r,manager:s}of e)if(Ym(Qm(process.cwd(),r)))return s;let t=process.env.npm_config_user_agent||"";return t.startsWith("pnpm")?"pnpm":t.startsWith("yarn")?"yarn":"npm"}y();var Oc={postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u --reject @types/node && pnpm install",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"},Rc=["typescript","simple-git-hooks","commitizen","cz-conventional-changelog","lint-staged","@commitlint/cli","@commitlint/config-conventional","@lntvow/eslint-config","eslint","prettier","npm-run-all","bumpp"];y();import rr from"fs";import Ki from"path";function Yi(e,t){if(rr.statSync(e).isDirectory()){if(Ki.basename(e)==="node_modules")return;rr.mkdirSync(t,{recursive:!0}),rr.readdirSync(e).forEach(s=>{Yi(Ki.resolve(e,s),Ki.resolve(t,s))})}else{if(rr.existsSync(t))return;rr.copyFileSync(e,t)}}var eg=Jm(import.meta.url),tg=Zm(eg);Ft.name(Sc).version(Ac,"-v, --version","output the version number");Ft.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").description("init project").action(async e=>{Z.success("Init project by @lntvow/dev"),Z.info(`Cwd is ${process.cwd()}`);let{temp:t,git:r,scripts:s}=e;try{ng(),t&&rg(),s&&ig(),r&&sg(),Z.success("Project initialization completed successfully!")}catch(i){Z.error(`Initialization failed: ${i.message}`),process.exit(1)}});function rg(){Z.info("Copying template files..."),Yi(Ic(tg,"./configs"),process.cwd()),Z.success("Template files copied successfully")}function sg(){if(!bc("simple-git-hooks")){Z.warn("simple-git-hooks not installed, skipping initialization");return}try{Z.info("Initializing Git hooks..."),zi("npx simple-git-hooks"),Z.success("Git hooks initialized successfully")}catch(e){Z.error(`Failed to initialize Git hooks: ${e.message}`)}}function ig(){Z.info("Updating package.json scripts...");let e=Ic(process.cwd(),"package.json"),t;try{t=Xm(e,"utf-8");let r=JSON.parse(t),s={...r,scripts:{...Oc,...r.scripts}};Pc(e,JSON.stringify(s,null,2)),Z.success("Package.json scripts updated successfully")}catch(r){t&&Pc(e,t),Z.error(`Failed to update package.json: ${r.message}`),process.exit(1)}}function ng(){try{let e=Rc.map(s=>`${s}@latest`).join(" "),t=Tc(),r="";t==="pnpm"?r=`pnpm add -D ${e}`:t==="yarn"?r=`yarn add -D ${e}`:r=`npm install -D ${e}`,Z.info(`Installing dependencies: ${r}`),zi(r),Z.success("Dependencies installed successfully")}catch(e){Z.error(`Dependency installation failed: ${e.message}`),process.exit(1)}}Ft.command("release").description("git release").action(async()=>{console.log(Nc.default.green("Release project..."));try{await ag(),Z.success("Release completed successfully!")}catch(e){Z.error(`Release failed: ${e.message}`),process.exit(1)}});async function ag(){let e=au(process.cwd());try{let t=(0,Lc.default)().format("YYYYMMDD HH:mm");await e.pull(),await e.add("."),await e.commit(t,["--no-verify"]),await e.push("origin"),Z.success(`\u63D0\u4EA4\u6210\u529F: ${t}`)}catch(t){Z.error(`Git\u64CD\u4F5C\u5931\u8D25: ${t.message}`),process.exit(1)}}Ft.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/dev",
3
- "version": "5.0.8",
3
+ "version": "5.0.9",
4
4
  "type": "module",
5
5
  "description": "Development environment dependencies package",
6
6
  "keywords": [