monocart-coverage-reports 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -2
- package/README.zh-Hans.md +47 -2
- package/lib/converter/ast.js +23 -2
- package/lib/converter/collect-source-maps.js +33 -12
- package/lib/converter/converter.js +84 -15
- package/lib/converter/css-coverage.js +76 -0
- package/lib/converter/find-original-range.js +211 -3
- package/lib/converter/untested.js +4 -6
- package/lib/packages/monocart-coverage-assets.js +1 -1
- package/lib/packages/monocart-coverage-converter.js +11 -11
- package/lib/packages/monocart-coverage-vendor.js +1 -1
- package/lib/packages/monocart-coverage-vendor.js.LICENSE +3 -3
- package/lib/platform/share.js +7 -0
- package/lib/utils/source-path.js +21 -6
- package/lib/utils/util.js +6 -1
- package/package.json +161 -153
- package/skills/monocart-coverage-reports/SKILL.md +2 -2
- package/skills/monocart-coverage-reports/references/best-practices.md +218 -0
- package/skills/monocart-coverage-reports/references/collection.md +2 -0
- package/skills/monocart-coverage-reports/references/repository-map.md +7 -3
- package/lib/packages/chunks/chunk-RVOSNMVU.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import"./chunks/chunk-RVOSNMVU.js";var j=(i,t,e)=>{let s=i instanceof RegExp?Y(i,e):i,n=t instanceof RegExp?Y(t,e):t,r=s!==null&&n!=null&>(s,n,e);return r&&{start:r[0],end:r[1],pre:e.slice(0,r[0]),body:e.slice(r[0]+s.length,r[1]),post:e.slice(r[1]+n.length)}},Y=(i,t)=>{let e=t.match(i);return e?e[0]:null},gt=(i,t,e)=>{let s,n,r,o,c,l=e.indexOf(i),a=e.indexOf(t,l+1),h=l;if(l>=0&&a>0){if(i===t)return[l,a];for(s=[],r=e.length;h>=0&&!c;){if(h===l)s.push(h),l=e.indexOf(i,h+1);else if(s.length===1){let f=s.pop();f!==void 0&&(c=[f,a])}else n=s.pop(),n!==void 0&&n<r&&(r=n,o=a),a=e.indexOf(t,h+1);h=l<a&&l>=0?l:a}s.length&&o!==void 0&&(c=[r,o])}return c};var V="\0SLASH"+Math.random()+"\0",H="\0OPEN"+Math.random()+"\0",W="\0CLOSE"+Math.random()+"\0",X="\0COMMA"+Math.random()+"\0",Z="\0PERIOD"+Math.random()+"\0",mt=new RegExp(V,"g"),yt=new RegExp(H,"g"),wt=new RegExp(W,"g"),St=new RegExp(X,"g"),Et=new RegExp(Z,"g"),xt=/\\\\/g,bt=/\\{/g,Tt=/\\}/g,Ot=/\\,/g,Rt=/\\\./g,Mt=1e5,Nt=4e6;function D(i){return isNaN(i)?i.charCodeAt(0):parseInt(i,10)}function At(i){return i.replace(xt,V).replace(bt,H).replace(Tt,W).replace(Ot,X).replace(Rt,Z)}function vt(i){return i.replace(mt,"\\").replace(yt,"{").replace(wt,"}").replace(St,",").replace(Et,".")}function J(i){if(!i)return[""];let t=[],e=j("{","}",i);if(!e)return i.split(",");let{pre:s,body:n,post:r}=e,o=s.split(",");o[o.length-1]+="{"+n+"}";let c=J(r);return r.length&&(o[o.length-1]+=c.shift(),o.push.apply(o,c)),t.push.apply(t,o),t}function Q(i,t={}){if(!i)return[];let{max:e=Mt,maxLength:s=Nt}=t;return i.slice(0,2)==="{}"&&(i="\\{\\}"+i.slice(2)),F(At(i),e,s,!0).map(vt)}function Ct(i){return"{"+i+"}"}function Pt(i){return/^-?0\d/.test(i)}function _t(i,t){return i<=t}function $t(i,t){return i>=t}function C(i,t,e,s,n,r){let o=[],c=0;for(let l=0;l<i.length;l++)for(let a=0;a<e.length;a++){if(o.length>=s)return o;let h=i[l]+t+e[a];if(!(r&&!h)){if(c+h.length>n)return o;o.push(h),c+=h.length}}return o}function It(i,t,e,s){let n=i.split(/\.\./),r=[];if(n[0]===void 0||n[1]===void 0)return r;let o=D(n[0]),c=D(n[1]),l=Math.max(n[0].length,n[1].length),a=n.length===3&&n[2]!==void 0?Math.max(Math.abs(D(n[2])),1):1,h=_t;c<o&&(a*=-1,h=$t);let p=n.some(Pt),g=0;for(let d=o;h(d,c)&&r.length<e;d+=a){let u;if(t)u=String.fromCharCode(d),u==="\\"&&(u="");else if(u=String(d),p){let w=l-u.length;if(w>0){let m=new Array(w+1).join("0");d<0?u="-"+m+u.slice(1):u=m+u}}if(g+u.length>s)break;r.push(u),g+=u.length}return r}function F(i,t,e,s){let n=[""],r=!1,o=!0;for(;;){let c=j("{","}",i);if(!c)return C(n,i,[""],t,e,r);let l=c.pre;if(/\$$/.test(l)){if(n=C(n,l+"{"+c.body+"}",[""],t,e,r&&!c.post.length),o=!1,!c.post.length)break;i=c.post;continue}let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(c.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(c.body),f=a||h,p=c.body.indexOf(",")>=0;if(!f&&!p){if(c.post.match(/,(?!,).*\}/)){i=c.pre+"{"+c.body+W+c.post,s=!0;continue}return C(n,l+"{"+c.body+"}"+c.post,[""],t,e,r)}o&&(r=s&&!f,o=!1);let g;if(f)g=It(c.body,h,t,e);else{let d=J(c.body);if(d.length===1&&d[0]!==void 0&&(d=F(d[0],t,e,!1).map(Ct),d.length===1)){if(n=C(n,l+d[0],[""],t,e,r&&!c.post.length),!c.post.length)break;i=c.post;continue}let u=r&&!c.post.length&&!l;for(let m=0;u&&m<n.length;m++)n[m]&&(u=!1);g=[];let w=0;t:for(let m=0;m<d.length;m++){let S=F(d[m],t,e,!1);for(let T=0;T<S.length;T++){let M=S[T];if(!(u&&!M)){if(g.length>=t||w+M.length>e)break t;g.push(M),w+=M.length}}}}if(n=C(n,l,g,t,e,r&&!c.post.length),!c.post.length)break;i=c.post}return n}var P=i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>65536)throw new TypeError("pattern is too long")};var Lt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},_=i=>i.replace(/[[\]\\-]/g,"\\$&"),jt=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),K=i=>i.join(""),tt=(i,t)=>{let e=t;if(i.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],n=[],r=e+1,o=!1,c=!1,l=!1,a=!1,h=e,f="";t:for(;r<i.length;){let u=i.charAt(r);if((u==="!"||u==="^")&&r===e+1){a=!0,r++;continue}if(u==="]"&&o&&!l){h=r+1;break}if(o=!0,u==="\\"&&!l){l=!0,r++;continue}if(u==="["&&!l){for(let[w,[m,S,T]]of Object.entries(Lt))if(i.startsWith(w,r)){if(f)return["$.",!1,i.length-e,!0];r+=w.length,T?n.push(m):s.push(m),c=c||S;continue t}}if(l=!1,f){u>f?s.push(_(f)+"-"+_(u)):u===f&&s.push(_(u)),f="",r++;continue}if(i.startsWith("-]",r+1)){s.push(_(u+"-")),r+=2;continue}if(i.startsWith("-",r+1)){f=u,r+=2;continue}s.push(_(u)),r++}if(h<r)return["",!1,0,!1];if(!s.length&&!n.length)return["$.",!1,i.length-e,!0];if(n.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!a){let u=s[0].length===2?s[0].slice(-1):s[0];return[jt(u),!1,h-e,!1]}let p="["+(a?"^":"")+K(s)+"]",g="["+(a?"":"^")+K(n)+"]";return[s.length&&n.length?"("+p+"|"+g+")":s.length?p:g,c,h-e,!0]};var N=(i,{windowsPathsNoEscape:t=!1,magicalBraces:e=!0}={})=>e?t?i.replace(/\[([^/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?i.replace(/\[([^/\\{}])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var b,Dt=new Set(["!","?","+","*","@"]),k=i=>Dt.has(i),et=i=>k(i.type),Ft=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Wt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),kt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),st=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Gt="(?!(?:^|/)\\.\\.?(?:$|/))",I="(?!\\.)",zt=new Set(["[","."]),Ut=new Set(["..","."]),Bt=new Set("().*{}+?[]^$\\!"),qt=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),G="[^/]",nt=G+"*?",it=G+"+?",Yt=0,A=class{type;#s;#n;#i=!1;#t=[];#e;#c;#l;#a=!1;#r;#o;#h=!1;id=++Yt;get depth(){return(this.#e?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#s.id,parent:this.#e?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(t,e,s={}){this.type=t,t&&(this.#n=!0),this.#e=e,this.#s=this.#e?this.#e.#s:this,this.#r=this.#s===this?s:this.#s.#r,this.#l=this.#s===this?[]:this.#s.#l,t==="!"&&!this.#s.#a&&this.#l.push(this),this.#c=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#o=this.#t.map(t=>String(t)).join("")}#y(){if(this!==this.#s)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#l.pop();){if(t.type!=="!")continue;let e=t,s=e.#e;for(;s;){for(let n=e.#c+1;!s.type&&n<s.#t.length;n++)for(let r of t.#t){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(s.#t[n])}e=s,s=e.#e}}return this}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof b&&e.#e===this))throw new Error("invalid part: "+e);this.#t.push(e)}}toJSON(){let t=this.type===null?this.#t.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#t.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#s||this.#s.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#s===this)return!0;if(!this.#e?.isStart())return!1;if(this.#c===0)return!0;let t=this.#e;for(let e=0;e<this.#c;e++){let s=t.#t[e];if(!(s instanceof b&&s.type==="!"))return!1}return!0}isEnd(){if(this.#s===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();let t=this.#e?this.#e.#t.length:0;return this.#c===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let e=new b(this.type,t);for(let s of this.#t)e.copyIn(s);return e}static#f(t,e,s,n,r){let o=n.maxExtglobRecursion??2,c=!1,l=!1,a=-1,h=!1;if(e.type===null){let u=s,w="";for(;u<t.length;){let m=t.charAt(u++);if(c||m==="\\"){c=!c,w+=m;continue}if(l){u===a+1?(m==="^"||m==="!")&&(h=!0):m==="]"&&!(u===a+2&&h)&&(l=!1),w+=m;continue}else if(m==="["){l=!0,a=u,h=!1,w+=m;continue}if(!n.noext&&k(m)&&t.charAt(u)==="("&&r<=o){e.push(w),w="";let T=new b(m,e);u=b.#f(t,T,u,n,r+1),e.push(T);continue}w+=m}return e.push(w),u}let f=s+1,p=new b(null,e),g=[],d="";for(;f<t.length;){let u=t.charAt(f++);if(c||u==="\\"){c=!c,d+=u;continue}if(l){f===a+1?(u==="^"||u==="!")&&(h=!0):u==="]"&&!(f===a+2&&h)&&(l=!1),d+=u;continue}else if(u==="["){l=!0,a=f,h=!1,d+=u;continue}if(!n.noext&&k(u)&&t.charAt(f)==="("&&(r<=o||e&&e.#u(u))){let m=e&&e.#u(u)?0:1;p.push(d),d="";let S=new b(u,p);p.push(S),f=b.#f(t,S,f,n,r+m);continue}if(u==="|"){p.push(d),d="",g.push(p),p=new b(null,e);continue}if(u===")")return d===""&&e.#t.length===0&&(e.#h=!0),p.push(d),d="",e.push(...g,p),f;d+=u}return e.type=null,e.#n=void 0,e.#t=[t.substring(s-1)],f}#w(t){return this.#d(t,Wt)}#d(t,e=Ft){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null)return!1;let s=t.#t[0];return!s||typeof s!="object"||s.type===null?!1:this.#u(s.type,e)}#u(t,e=kt){return!!e.get(this.type)?.includes(t)}#S(t,e){let s=t.#t[0],n=new b(null,s,this.options);n.#t.push(""),s.push(n),this.#g(t,e)}#g(t,e){let s=t.#t[0];this.#t.splice(e,1,...s.#t);for(let n of s.#t)typeof n=="object"&&(n.#e=this);this.#o=void 0}#E(t){return!!st.get(this.type)?.has(t)}#x(t){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let e=t.#t[0];return!e||typeof e!="object"||e.type===null?!1:this.#E(e.type)}#b(t){let e=st.get(this.type),s=t.#t[0],n=e?.get(s.type);if(!n)return!1;this.#t=s.#t;for(let r of this.#t)typeof r=="object"&&(r.#e=this);this.type=n,this.#o=void 0,this.#h=!1}static fromGlob(t,e={}){let s=new b(null,void 0,e);return b.#f(t,s,0,e,0),s}toMMPattern(){if(this!==this.#s)return this.#s.toMMPattern();let t=this.toString(),[e,s,n,r]=this.toRegExpSource();if(!(n||this.#n||this.#r.nocase&&!this.#r.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;let c=(this.#r.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,c),{_src:e,_glob:t})}get options(){return this.#r}toRegExpSource(t){let e=t??!!this.#r.dot;if(this.#s===this&&(this.#p(),this.#y()),!et(this)){let l=this.isStart()&&this.isEnd()&&!this.#t.some(g=>typeof g!="string"),a=this.#t.map(g=>{let[d,u,w,m]=typeof g=="string"?b.#T(g,this.#n,l):g.toRegExpSource(t);return this.#n=this.#n||w,this.#i=this.#i||m,d}).join(""),h="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&Ut.has(this.#t[0]))){let d=zt,u=e&&d.has(a.charAt(0))||a.startsWith("\\.")&&d.has(a.charAt(2))||a.startsWith("\\.\\.")&&d.has(a.charAt(4)),w=!e&&!t&&d.has(a.charAt(0));h=u?Gt:w?I:""}let f="";return this.isEnd()&&this.#s.#a&&this.#e?.type==="!"&&(f="(?:$|\\/)"),[h+a+f,N(a),this.#n=!!this.#n,this.#i]}let s=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#m(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let l=this.toString(),a=this;return a.#t=[l],a.type=null,a.#n=void 0,[l,N(this.toString()),!1,!1]}let o=!s||t||e||!I?"":this.#m(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let c="";if(this.type==="!"&&this.#h)c=(this.isStart()&&!e?I:"")+it;else{let l=this.type==="!"?"))"+(this.isStart()&&!e&&!t?I:"")+nt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;c=n+r+l}return[c,N(r),this.#n=!!this.#n,this.#i]}#p(){if(et(this)){let t=0,e=!1;do{e=!0;for(let s=0;s<this.#t.length;s++){let n=this.#t[s];typeof n=="object"&&(n.#p(),this.#d(n)?(e=!1,this.#g(n,s)):this.#w(n)?(e=!1,this.#S(n,s)):this.#x(n)&&(e=!1,this.#b(n)))}}while(!e&&++t<10)}else for(let t of this.#t)typeof t=="object"&&t.#p();this.#o=void 0}#m(t){return this.#t.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,n,r,o]=e.toRegExpSource(t);return this.#i=this.#i||o,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#T(t,e,s=!1){let n=!1,r="",o=!1,c=!1;for(let l=0;l<t.length;l++){let a=t.charAt(l);if(n){n=!1,r+=(Bt.has(a)?"\\":"")+a;continue}if(a==="*"){if(c)continue;c=!0,r+=s&&/^[*]+$/.test(t)?it:nt,e=!0;continue}else c=!1;if(a==="\\"){l===t.length-1?r+="\\\\":n=!0;continue}if(a==="["){let[h,f,p,g]=tt(t,l);if(p){r+=h,o=o||f,l+=p-1,e=e||g;continue}}if(a==="?"){r+=G,e=!0;continue}r+=qt(a)}return[r,N(t),!!e,o]}};b=A;var z=(i,{windowsPathsNoEscape:t=!1,magicalBraces:e=!1}={})=>e?t?i.replace(/[?*()[\]{}]/g,"[$&]"):i.replace(/[?*()[\]\\{}]/g,"\\$&"):t?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&");var x=(i,t,e={})=>(P(t),!e.nocomment&&t.charAt(0)==="#"?!1:new v(t,e).match(i)),Vt=/^\*+([^+@!?*[(]*)$/,Ht=i=>t=>!t.startsWith(".")&&t.endsWith(i),Xt=i=>t=>t.endsWith(i),Zt=i=>(i=i.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(i)),Jt=i=>(i=i.toLowerCase(),t=>t.toLowerCase().endsWith(i)),Qt=/^\*+\.\*+$/,Kt=i=>!i.startsWith(".")&&i.includes("."),te=i=>i!=="."&&i!==".."&&i.includes("."),ee=/^\.\*+$/,se=i=>i!=="."&&i!==".."&&i.startsWith("."),ne=/^\*+$/,ie=i=>i.length!==0&&!i.startsWith("."),re=i=>i.length!==0&&i!=="."&&i!=="..",oe=/^\?+([^+@!?*[(]*)?$/,ce=([i,t=""])=>{let e=ct([i]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},ae=([i,t=""])=>{let e=at([i]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},le=([i,t=""])=>{let e=at([i]);return t?s=>e(s)&&s.endsWith(t):e},he=([i,t=""])=>{let e=ct([i]);return t?s=>e(s)&&s.endsWith(t):e},ct=([i])=>{let t=i.length;return e=>e.length===t&&!e.startsWith(".")},at=([i])=>{let t=i.length;return e=>e.length===t&&e!=="."&&e!==".."},lt=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",rt={win32:{sep:"\\"},posix:{sep:"/"}},fe=lt==="win32"?rt.win32.sep:rt.posix.sep;x.sep=fe;var E=Symbol("globstar **");x.GLOBSTAR=E;var ue="[^/]",pe=ue+"*?",de="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ge="(?:(?!(?:\\/|^)\\.).)*?",me=(i,t={})=>e=>x(e,i,t);x.filter=me;var O=(i,t={})=>Object.assign({},i,t),ye=i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return x;let t=x;return Object.assign((s,n,r={})=>t(s,n,O(i,r)),{Minimatch:class extends t.Minimatch{constructor(n,r={}){super(n,O(i,r))}static defaults(n){return t.defaults(O(i,n)).Minimatch}},AST:class extends t.AST{constructor(n,r,o={}){super(n,r,O(i,o))}static fromGlob(n,r={}){return t.AST.fromGlob(n,O(i,r))}},unescape:(s,n={})=>t.unescape(s,O(i,n)),escape:(s,n={})=>t.escape(s,O(i,n)),filter:(s,n={})=>t.filter(s,O(i,n)),defaults:s=>t.defaults(O(i,s)),makeRe:(s,n={})=>t.makeRe(s,O(i,n)),braceExpand:(s,n={})=>t.braceExpand(s,O(i,n)),match:(s,n,r={})=>t.match(s,n,O(i,r)),sep:t.sep,GLOBSTAR:E})};x.defaults=ye;var ht=(i,t={})=>(P(i),t.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:Q(i,{max:t.braceExpandMax}));x.braceExpand=ht;var we=(i,t={})=>new v(i,t).makeRe();x.makeRe=we;var Se=(i,t,e={})=>{let s=new v(t,e);return i=i.filter(n=>s.match(n)),s.options.nonull&&!i.length&&i.push(t),i};x.match=Se;var ot=/[?*]|[+@!]\(.*?\)|\[|\]/,Ee=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),v=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,e={}){P(t),e=e||{},this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion??200,this.pattern=t,this.platform=e.platform||lt,this.isWindows=this.platform==="win32";let s="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[s]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let n=this.globParts.map((r,o,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=r[0]===""&&r[1]===""&&(r[2]==="?"||!ot.test(r[2]))&&!ot.test(r[3]),a=/^[a-z]:/i.test(r[0]);if(l)return[...r.slice(0,4),...r.slice(4).map(h=>this.parse(h))];if(a)return[r[0],...r.slice(1).map(h=>this.parse(h))]}return r.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){let o=this.set[r];o[0]===""&&o[1]===""&&this.globParts[r][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let s of t)for(let n=0;n<s.length;n++)s[n]==="**"&&(s[n]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let n=s;for(;e[n+1]==="**";)n++;n!==s&&e.splice(s,n-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,n)=>{let r=s[s.length-1];return n==="**"&&r==="**"?s:n===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(n),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let r=t[n];n===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let s=0;for(;(s=t.indexOf("..",s+1))!==-1;){let n=t[s-1];n&&n!=="."&&n!==".."&&n!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(n))&&(e=!0,t.splice(s-1,2),s-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let s of t){let n=-1;for(;(n=s.indexOf("**",n+1))!==-1;){let o=n;for(;s[o+1]==="**";)o++;o>n&&s.splice(n+1,o-n);let c=s[n+1],l=s[n+2],a=s[n+3];if(c!==".."||!l||l==="."||l===".."||!a||a==="."||a==="..")continue;e=!0,s.splice(n,1);let h=s.slice(0);h[n]="**",t.push(h),n--}if(!this.preserveMultipleSlashes){for(let o=1;o<s.length-1;o++){let c=s[o];o===1&&c===""&&s[0]===""||(c==="."||c==="")&&(e=!0,s.splice(o,1),o--)}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(e=!0,s.pop())}let r=0;for(;(r=s.indexOf("..",r+1))!==-1;){let o=s[r-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=!0;let l=r===1&&s[r+1]==="**"?["."]:[];s.splice(r-1,2,...l),s.length===0&&s.push(""),r-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let s=e+1;s<t.length;s++){let n=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);if(n){t[e]=[],t[s]=n;break}}return t.filter(e=>e.length)}partsMatch(t,e,s=!1){let n=0,r=0,o=[],c="";for(;n<t.length&&r<e.length;)if(t[n]===e[r])o.push(c==="b"?e[r]:t[n]),n++,r++;else if(s&&t[n]==="**"&&e[r]===t[n+1])o.push(t[n]),n++;else if(s&&e[r]==="**"&&t[n]===e[r+1])o.push(e[r]),r++;else if(t[n]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(c==="b")return!1;c="a",o.push(t[n]),n++,r++}else if(e[r]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="a")return!1;c="b",o.push(e[r]),n++,r++}else return!1;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,s=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)e=!e,s++;s&&(this.pattern=t.slice(s)),this.negate=e}matchOne(t,e,s=!1){let n=0,r=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),h=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),f=l?3:c?0:void 0,p=h?3:a?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[g,d]=[t[f],e[p]];g.toLowerCase()===d.toLowerCase()&&(e[p]=g,r=p,n=f)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(t=this.levelTwoFileOptimize(t)),e.includes(E)?this.#s(t,e,s,n,r):this.#i(t,e,s,n,r)}#s(t,e,s,n,r){let o=e.indexOf(E,r),c=e.lastIndexOf(E),[l,a,h]=s?[e.slice(r,o),e.slice(o+1),[]]:[e.slice(r,o),e.slice(o+1,c),e.slice(c+1)];if(l.length){let S=t.slice(n,n+l.length);if(!this.#i(S,l,s,0,0))return!1;n+=l.length,r+=l.length}let f=0;if(h.length){if(h.length+n>t.length)return!1;let S=t.length-h.length;if(this.#i(t,h,s,S,0))f=h.length;else{if(t[t.length-1]!==""||n+h.length===t.length||(S--,!this.#i(t,h,s,S,0)))return!1;f=h.length+1}}if(!a.length){let S=!!f;for(let T=n;T<t.length-f;T++){let M=String(t[T]);if(S=!0,M==="."||M===".."||!this.options.dot&&M.startsWith("."))return!1}return s||S}let p=[[[],0]],g=p[0],d=0,u=[0];for(let S of a)S===E?(u.push(d),g=[[],0],p.push(g)):(g[0].push(S),d++);let w=p.length-1,m=t.length-f;for(let S of p)S[1]=m-(u[w--]+S[0].length);return!!this.#n(t,p,n,0,s,0,!!f)}#n(t,e,s,n,r,o,c){let l=e[n];if(!l){for(let f=s;f<t.length;f++){c=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[a,h]=l;for(;s<=h;){if(this.#i(t.slice(0,s+a.length),a,r,s,0)&&o<this.maxGlobstarRecursion){let g=this.#n(t,e,s+a.length,n+1,r,o+1,c);if(g!==!1)return g}let p=t[s];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;s++}return r||null}#i(t,e,s,n,r){let o,c,l,a;for(o=n,c=r,a=t.length,l=e.length;o<a&&c<l;o++,c++){this.debug("matchOne loop");let h=e[c],f=t[o];if(this.debug(e,h,f),h===!1||h===E)return!1;let p;if(typeof h=="string"?(p=f===h,this.debug("string match",h,f,p)):(p=h.test(f),this.debug("pattern match",h,f,p)),!p)return!1}if(o===a&&c===l)return!0;if(o===a)return s;if(c===l)return o===a-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return ht(this.pattern,this.options)}parse(t){P(t);let e=this.options;if(t==="**")return E;if(t==="")return"";let s,n=null;(s=t.match(ne))?n=e.dot?re:ie:(s=t.match(Vt))?n=(e.nocase?e.dot?Jt:Zt:e.dot?Xt:Ht)(s[1]):(s=t.match(oe))?n=(e.nocase?e.dot?ae:ce:e.dot?le:he)(s):(s=t.match(Qt))?n=e.dot?te:Kt:(s=t.match(ee))&&(n=se);let r=A.fromGlob(t,this.options).toMMPattern();return n&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:n}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?pe:e.dot?de:ge,n=new Set(e.nocase?["i"]:[]),r=t.map(l=>{let a=l.map(f=>{if(f instanceof RegExp)for(let p of f.flags.split(""))n.add(p);return typeof f=="string"?Ee(f):f===E?E:f._src});a.forEach((f,p)=>{let g=a[p+1],d=a[p-1];f!==E||d===E||(d===void 0?g!==void 0&&g!==E?a[p+1]="(?:\\/|"+s+"\\/)?"+g:a[p]=s:g===void 0?a[p-1]=d+"(?:\\/|\\/"+s+")?":g!==E&&(a[p-1]=d+"(?:\\/|\\/"+s+"\\/)"+g,a[p+1]=E))});let h=a.filter(f=>f!==E);if(this.partial&&h.length>=1){let f=[];for(let p=1;p<=h.length;p++)f.push(h.slice(0,p).join("/"));return"(?:"+f.join("|")+")"}return h.join("/")}).join("|"),[o,c]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+c+"$",this.partial&&(r="^(?:\\/|"+o+r.slice(1,-1)+c+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let r=this.set;this.debug(this.pattern,"set",r);let o=n[n.length-1];if(!o)for(let c=n.length-2;!o&&c>=0;c--)o=n[c];for(let c of r){let l=n;if(s.matchBase&&c.length===1&&(l=[o]),this.matchOne(l,c,e))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(t){return x.defaults(t).Minimatch}};x.AST=A;x.Minimatch=v;x.escape=z;x.unescape=N;import $ from"node:path";import xe from"node:process";import be from"node:path";import ft,{promises as ds}from"node:fs";import{fileURLToPath as Te}from"node:url";var ut={directory:"isDirectory",file:"isFile"};function Oe(i){if(!(i==="both"||Object.hasOwn(ut,i)))throw new Error(`Invalid type specified: ${i}`)}var Re=(i,t)=>i==="both"?t.isFile()||t.isDirectory():t[ut[i]](),Me=i=>i instanceof URL?Te(i):i;function U(i,{cwd:t=xe.cwd(),type:e="file",allowSymlinks:s=!0}={}){Oe(e),t=Me(t);let n=s?ft.statSync:ft.lstatSync;for(let r of i)try{let o=n(be.resolve(t,r),{throwIfNoEntry:!1});if(!o)continue;if(Re(e,o))return r}catch{}}import{promisify as Ne}from"node:util";import{execFile as Ae,execFileSync as Es}from"node:child_process";import{fileURLToPath as ve}from"node:url";var bs=Ne(Ae);function B(i){return i instanceof URL?ve(i):i}var Ts=10*1024*1024;var Ce=Symbol("findUpStop");function Pe(i,t={}){let e=$.resolve(B(t.cwd)??""),{root:s}=$.parse(e),n=$.resolve(e,B(t.stopAt)??s),r=t.limit??Number.POSITIVE_INFINITY,o=[i].flat(),c=a=>{if(typeof i!="function")return U(o,a);let h=i(a.cwd);return typeof h=="string"?U([h],a):h},l=[];for(;;){let a=c({...t,cwd:e});if(a===Ce||(a&&l.push($.resolve(e,a)),e===n||l.length>=r))break;e=$.dirname(e)}return l}function _e(i,t={}){return Pe(i,{...t,limit:1})[0]}import q from"node:process";import $e from"node:os";import pt from"node:tty";function R(i,t=globalThis.Deno?globalThis.Deno.args:q.argv){let e=i.startsWith("-")?"":i.length===1?"-":"--",s=t.indexOf(e+i),n=t.indexOf("--");return s!==-1&&(n===-1||s<n)}var{env:y}=q,L;R("no-color")||R("no-colors")||R("color=false")||R("color=never")?L=0:(R("color")||R("colors")||R("color=true")||R("color=always"))&&(L=1);function Ie(){if(!("FORCE_COLOR"in y))return;if(y.FORCE_COLOR==="true")return 1;if(y.FORCE_COLOR==="false")return 0;if(y.FORCE_COLOR.length===0)return 1;if(!/^\d+$/v.test(y.FORCE_COLOR))return;let i=Math.min(Number(y.FORCE_COLOR),3);if([0,1,2,3].includes(i))return i}function Le(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function je(i,{streamIsTTY:t,sniffFlags:e=!0}={}){let s=Ie();s!==void 0&&(L=s);let n=e?L:s;if(n===0)return 0;if(e){if(R("color=16m")||R("color=full")||R("color=truecolor"))return 3;if(R("color=256"))return 2}if(n!==void 0&&/^\d+$/v.test(y.FORCE_COLOR))return n;if("TF_BUILD"in y&&"AGENT_NAME"in y)return 1;if(i&&!t&&n===void 0)return 0;let r=n||0;if(y.TERM==="dumb")return r;if(q.platform==="win32"){let o=$e.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in y)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>Object.hasOwn(y,o))?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>Object.hasOwn(y,o))||y.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in y)return/^(?:9\.0*[1-9]\d*\.|\d{2,}\.)/v.test(y.TEAMCITY_VERSION)?1:0;if(y.COLORTERM==="truecolor"||y.TERM==="xterm-kitty"||y.TERM==="xterm-ghostty"||y.TERM==="wezterm")return 3;if("TERM_PROGRAM"in y){let o=Number((y.TERM_PROGRAM_VERSION||"").split(".",1)[0]);switch(y.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(?:color)?$/iv.test(y.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/iv.test(y.TERM)||"COLORTERM"in y?1:r}function dt(i,t={}){let e=je(i,{streamIsTTY:i&&i.isTTY,...t});return Le(e)}var De={stdout:dt({isTTY:pt.isatty(1)}),stderr:dt({isTTY:pt.isatty(2)})},Fe=De;export{v as Minimatch,_e as findUpSync,x as minimatch,Fe as supportsColor};
|
|
2
|
+
var j=(i,t,e)=>{let s=i instanceof RegExp?Y(i,e):i,n=t instanceof RegExp?Y(t,e):t,r=s!==null&&n!=null&>(s,n,e);return r&&{start:r[0],end:r[1],pre:e.slice(0,r[0]),body:e.slice(r[0]+s.length,r[1]),post:e.slice(r[1]+n.length)}},Y=(i,t)=>{let e=t.match(i);return e?e[0]:null},gt=(i,t,e)=>{let s,n,r,o,c,l=e.indexOf(i),a=e.indexOf(t,l+1),h=l;if(l>=0&&a>0){if(i===t)return[l,a];for(s=[],r=e.length;h>=0&&!c;){if(h===l)s.push(h),l=e.indexOf(i,h+1);else if(s.length===1){let f=s.pop();f!==void 0&&(c=[f,a])}else n=s.pop(),n!==void 0&&n<r&&(r=n,o=a),a=e.indexOf(t,h+1);h=l<a&&l>=0?l:a}s.length&&o!==void 0&&(c=[r,o])}return c};var V="\0SLASH"+Math.random()+"\0",H="\0OPEN"+Math.random()+"\0",W="\0CLOSE"+Math.random()+"\0",X="\0COMMA"+Math.random()+"\0",Z="\0PERIOD"+Math.random()+"\0",mt=new RegExp(V,"g"),yt=new RegExp(H,"g"),wt=new RegExp(W,"g"),St=new RegExp(X,"g"),Et=new RegExp(Z,"g"),xt=/\\\\/g,bt=/\\{/g,Tt=/\\}/g,Ot=/\\,/g,Rt=/\\\./g,Mt=1e5,Nt=4e6;function D(i){return isNaN(i)?i.charCodeAt(0):parseInt(i,10)}function At(i){return i.replace(xt,V).replace(bt,H).replace(Tt,W).replace(Ot,X).replace(Rt,Z)}function vt(i){return i.replace(mt,"\\").replace(yt,"{").replace(wt,"}").replace(St,",").replace(Et,".")}function J(i){if(!i)return[""];let t=[],e=j("{","}",i);if(!e)return i.split(",");let{pre:s,body:n,post:r}=e,o=s.split(",");o[o.length-1]+="{"+n+"}";let c=J(r);return r.length&&(o[o.length-1]+=c.shift(),o.push.apply(o,c)),t.push.apply(t,o),t}function Q(i,t={}){if(!i)return[];let{max:e=Mt,maxLength:s=Nt}=t;return i.slice(0,2)==="{}"&&(i="\\{\\}"+i.slice(2)),F(At(i),e,s,!0).map(vt)}function Ct(i){return"{"+i+"}"}function Pt(i){return/^-?0\d/.test(i)}function _t(i,t){return i<=t}function $t(i,t){return i>=t}function C(i,t,e,s,n,r){let o=[],c=0;for(let l=0;l<i.length;l++)for(let a=0;a<e.length;a++){if(o.length>=s)return o;let h=i[l]+t+e[a];if(!(r&&!h)){if(c+h.length>n)return o;o.push(h),c+=h.length}}return o}function It(i,t,e,s){let n=i.split(/\.\./),r=[];if(n[0]===void 0||n[1]===void 0)return r;let o=D(n[0]),c=D(n[1]),l=Math.max(n[0].length,n[1].length),a=n.length===3&&n[2]!==void 0?Math.max(Math.abs(D(n[2])),1):1,h=_t;c<o&&(a*=-1,h=$t);let p=n.some(Pt),g=0;for(let d=o;h(d,c)&&r.length<e;d+=a){let u;if(t)u=String.fromCharCode(d),u==="\\"&&(u="");else if(u=String(d),p){let w=l-u.length;if(w>0){let m=new Array(w+1).join("0");d<0?u="-"+m+u.slice(1):u=m+u}}if(g+u.length>s)break;r.push(u),g+=u.length}return r}function F(i,t,e,s){let n=[""],r=!1,o=!0;for(;;){let c=j("{","}",i);if(!c)return C(n,i,[""],t,e,r);let l=c.pre;if(/\$$/.test(l)){if(n=C(n,l+"{"+c.body+"}",[""],t,e,r&&!c.post.length),o=!1,!c.post.length)break;i=c.post;continue}let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(c.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(c.body),f=a||h,p=c.body.indexOf(",")>=0;if(!f&&!p){if(c.post.match(/,(?!,).*\}/)){i=c.pre+"{"+c.body+W+c.post,s=!0;continue}return C(n,l+"{"+c.body+"}"+c.post,[""],t,e,r)}o&&(r=s&&!f,o=!1);let g;if(f)g=It(c.body,h,t,e);else{let d=J(c.body);if(d.length===1&&d[0]!==void 0&&(d=F(d[0],t,e,!1).map(Ct),d.length===1)){if(n=C(n,l+d[0],[""],t,e,r&&!c.post.length),!c.post.length)break;i=c.post;continue}let u=r&&!c.post.length&&!l;for(let m=0;u&&m<n.length;m++)n[m]&&(u=!1);g=[];let w=0;t:for(let m=0;m<d.length;m++){let S=F(d[m],t,e,!1);for(let T=0;T<S.length;T++){let M=S[T];if(!(u&&!M)){if(g.length>=t||w+M.length>e)break t;g.push(M),w+=M.length}}}}if(n=C(n,l,g,t,e,r&&!c.post.length),!c.post.length)break;i=c.post}return n}var P=i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>65536)throw new TypeError("pattern is too long")};var Lt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},_=i=>i.replace(/[[\]\\-]/g,"\\$&"),jt=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),K=i=>i.join(""),tt=(i,t)=>{let e=t;if(i.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],n=[],r=e+1,o=!1,c=!1,l=!1,a=!1,h=e,f="";t:for(;r<i.length;){let u=i.charAt(r);if((u==="!"||u==="^")&&r===e+1){a=!0,r++;continue}if(u==="]"&&o&&!l){h=r+1;break}if(o=!0,u==="\\"&&!l){l=!0,r++;continue}if(u==="["&&!l){for(let[w,[m,S,T]]of Object.entries(Lt))if(i.startsWith(w,r)){if(f)return["$.",!1,i.length-e,!0];r+=w.length,T?n.push(m):s.push(m),c=c||S;continue t}}if(l=!1,f){u>f?s.push(_(f)+"-"+_(u)):u===f&&s.push(_(u)),f="",r++;continue}if(i.startsWith("-]",r+1)){s.push(_(u+"-")),r+=2;continue}if(i.startsWith("-",r+1)){f=u,r+=2;continue}s.push(_(u)),r++}if(h<r)return["",!1,0,!1];if(!s.length&&!n.length)return["$.",!1,i.length-e,!0];if(n.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!a){let u=s[0].length===2?s[0].slice(-1):s[0];return[jt(u),!1,h-e,!1]}let p="["+(a?"^":"")+K(s)+"]",g="["+(a?"":"^")+K(n)+"]";return[s.length&&n.length?"("+p+"|"+g+")":s.length?p:g,c,h-e,!0]};var N=(i,{windowsPathsNoEscape:t=!1,magicalBraces:e=!0}={})=>e?t?i.replace(/\[([^/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?i.replace(/\[([^/\\{}])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var b,Dt=new Set(["!","?","+","*","@"]),k=i=>Dt.has(i),et=i=>k(i.type),Ft=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Wt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),kt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),st=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Gt="(?!(?:^|/)\\.\\.?(?:$|/))",I="(?!\\.)",zt=new Set(["[","."]),Ut=new Set(["..","."]),Bt=new Set("().*{}+?[]^$\\!"),qt=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),G="[^/]",nt=G+"*?",it=G+"+?",Yt=0,A=class{type;#s;#n;#i=!1;#t=[];#e;#c;#l;#a=!1;#r;#o;#h=!1;id=++Yt;get depth(){return(this.#e?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#s.id,parent:this.#e?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(t,e,s={}){this.type=t,t&&(this.#n=!0),this.#e=e,this.#s=this.#e?this.#e.#s:this,this.#r=this.#s===this?s:this.#s.#r,this.#l=this.#s===this?[]:this.#s.#l,t==="!"&&!this.#s.#a&&this.#l.push(this),this.#c=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#o=this.#t.map(t=>String(t)).join("")}#y(){if(this!==this.#s)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#l.pop();){if(t.type!=="!")continue;let e=t,s=e.#e;for(;s;){for(let n=e.#c+1;!s.type&&n<s.#t.length;n++)for(let r of t.#t){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(s.#t[n])}e=s,s=e.#e}}return this}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof b&&e.#e===this))throw new Error("invalid part: "+e);this.#t.push(e)}}toJSON(){let t=this.type===null?this.#t.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#t.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#s||this.#s.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#s===this)return!0;if(!this.#e?.isStart())return!1;if(this.#c===0)return!0;let t=this.#e;for(let e=0;e<this.#c;e++){let s=t.#t[e];if(!(s instanceof b&&s.type==="!"))return!1}return!0}isEnd(){if(this.#s===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();let t=this.#e?this.#e.#t.length:0;return this.#c===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let e=new b(this.type,t);for(let s of this.#t)e.copyIn(s);return e}static#f(t,e,s,n,r){let o=n.maxExtglobRecursion??2,c=!1,l=!1,a=-1,h=!1;if(e.type===null){let u=s,w="";for(;u<t.length;){let m=t.charAt(u++);if(c||m==="\\"){c=!c,w+=m;continue}if(l){u===a+1?(m==="^"||m==="!")&&(h=!0):m==="]"&&!(u===a+2&&h)&&(l=!1),w+=m;continue}else if(m==="["){l=!0,a=u,h=!1,w+=m;continue}if(!n.noext&&k(m)&&t.charAt(u)==="("&&r<=o){e.push(w),w="";let T=new b(m,e);u=b.#f(t,T,u,n,r+1),e.push(T);continue}w+=m}return e.push(w),u}let f=s+1,p=new b(null,e),g=[],d="";for(;f<t.length;){let u=t.charAt(f++);if(c||u==="\\"){c=!c,d+=u;continue}if(l){f===a+1?(u==="^"||u==="!")&&(h=!0):u==="]"&&!(f===a+2&&h)&&(l=!1),d+=u;continue}else if(u==="["){l=!0,a=f,h=!1,d+=u;continue}if(!n.noext&&k(u)&&t.charAt(f)==="("&&(r<=o||e&&e.#u(u))){let m=e&&e.#u(u)?0:1;p.push(d),d="";let S=new b(u,p);p.push(S),f=b.#f(t,S,f,n,r+m);continue}if(u==="|"){p.push(d),d="",g.push(p),p=new b(null,e);continue}if(u===")")return d===""&&e.#t.length===0&&(e.#h=!0),p.push(d),d="",e.push(...g,p),f;d+=u}return e.type=null,e.#n=void 0,e.#t=[t.substring(s-1)],f}#w(t){return this.#d(t,Wt)}#d(t,e=Ft){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null)return!1;let s=t.#t[0];return!s||typeof s!="object"||s.type===null?!1:this.#u(s.type,e)}#u(t,e=kt){return!!e.get(this.type)?.includes(t)}#S(t,e){let s=t.#t[0],n=new b(null,s,this.options);n.#t.push(""),s.push(n),this.#g(t,e)}#g(t,e){let s=t.#t[0];this.#t.splice(e,1,...s.#t);for(let n of s.#t)typeof n=="object"&&(n.#e=this);this.#o=void 0}#E(t){return!!st.get(this.type)?.has(t)}#x(t){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let e=t.#t[0];return!e||typeof e!="object"||e.type===null?!1:this.#E(e.type)}#b(t){let e=st.get(this.type),s=t.#t[0],n=e?.get(s.type);if(!n)return!1;this.#t=s.#t;for(let r of this.#t)typeof r=="object"&&(r.#e=this);this.type=n,this.#o=void 0,this.#h=!1}static fromGlob(t,e={}){let s=new b(null,void 0,e);return b.#f(t,s,0,e,0),s}toMMPattern(){if(this!==this.#s)return this.#s.toMMPattern();let t=this.toString(),[e,s,n,r]=this.toRegExpSource();if(!(n||this.#n||this.#r.nocase&&!this.#r.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;let c=(this.#r.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,c),{_src:e,_glob:t})}get options(){return this.#r}toRegExpSource(t){let e=t??!!this.#r.dot;if(this.#s===this&&(this.#p(),this.#y()),!et(this)){let l=this.isStart()&&this.isEnd()&&!this.#t.some(g=>typeof g!="string"),a=this.#t.map(g=>{let[d,u,w,m]=typeof g=="string"?b.#T(g,this.#n,l):g.toRegExpSource(t);return this.#n=this.#n||w,this.#i=this.#i||m,d}).join(""),h="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&Ut.has(this.#t[0]))){let d=zt,u=e&&d.has(a.charAt(0))||a.startsWith("\\.")&&d.has(a.charAt(2))||a.startsWith("\\.\\.")&&d.has(a.charAt(4)),w=!e&&!t&&d.has(a.charAt(0));h=u?Gt:w?I:""}let f="";return this.isEnd()&&this.#s.#a&&this.#e?.type==="!"&&(f="(?:$|\\/)"),[h+a+f,N(a),this.#n=!!this.#n,this.#i]}let s=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#m(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let l=this.toString(),a=this;return a.#t=[l],a.type=null,a.#n=void 0,[l,N(this.toString()),!1,!1]}let o=!s||t||e||!I?"":this.#m(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let c="";if(this.type==="!"&&this.#h)c=(this.isStart()&&!e?I:"")+it;else{let l=this.type==="!"?"))"+(this.isStart()&&!e&&!t?I:"")+nt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;c=n+r+l}return[c,N(r),this.#n=!!this.#n,this.#i]}#p(){if(et(this)){let t=0,e=!1;do{e=!0;for(let s=0;s<this.#t.length;s++){let n=this.#t[s];typeof n=="object"&&(n.#p(),this.#d(n)?(e=!1,this.#g(n,s)):this.#w(n)?(e=!1,this.#S(n,s)):this.#x(n)&&(e=!1,this.#b(n)))}}while(!e&&++t<10)}else for(let t of this.#t)typeof t=="object"&&t.#p();this.#o=void 0}#m(t){return this.#t.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,n,r,o]=e.toRegExpSource(t);return this.#i=this.#i||o,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#T(t,e,s=!1){let n=!1,r="",o=!1,c=!1;for(let l=0;l<t.length;l++){let a=t.charAt(l);if(n){n=!1,r+=(Bt.has(a)?"\\":"")+a;continue}if(a==="*"){if(c)continue;c=!0,r+=s&&/^[*]+$/.test(t)?it:nt,e=!0;continue}else c=!1;if(a==="\\"){l===t.length-1?r+="\\\\":n=!0;continue}if(a==="["){let[h,f,p,g]=tt(t,l);if(p){r+=h,o=o||f,l+=p-1,e=e||g;continue}}if(a==="?"){r+=G,e=!0;continue}r+=qt(a)}return[r,N(t),!!e,o]}};b=A;var z=(i,{windowsPathsNoEscape:t=!1,magicalBraces:e=!1}={})=>e?t?i.replace(/[?*()[\]{}]/g,"[$&]"):i.replace(/[?*()[\]\\{}]/g,"\\$&"):t?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&");var x=(i,t,e={})=>(P(t),!e.nocomment&&t.charAt(0)==="#"?!1:new v(t,e).match(i)),Vt=/^\*+([^+@!?*[(]*)$/,Ht=i=>t=>!t.startsWith(".")&&t.endsWith(i),Xt=i=>t=>t.endsWith(i),Zt=i=>(i=i.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(i)),Jt=i=>(i=i.toLowerCase(),t=>t.toLowerCase().endsWith(i)),Qt=/^\*+\.\*+$/,Kt=i=>!i.startsWith(".")&&i.includes("."),te=i=>i!=="."&&i!==".."&&i.includes("."),ee=/^\.\*+$/,se=i=>i!=="."&&i!==".."&&i.startsWith("."),ne=/^\*+$/,ie=i=>i.length!==0&&!i.startsWith("."),re=i=>i.length!==0&&i!=="."&&i!=="..",oe=/^\?+([^+@!?*[(]*)?$/,ce=([i,t=""])=>{let e=ct([i]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},ae=([i,t=""])=>{let e=at([i]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},le=([i,t=""])=>{let e=at([i]);return t?s=>e(s)&&s.endsWith(t):e},he=([i,t=""])=>{let e=ct([i]);return t?s=>e(s)&&s.endsWith(t):e},ct=([i])=>{let t=i.length;return e=>e.length===t&&!e.startsWith(".")},at=([i])=>{let t=i.length;return e=>e.length===t&&e!=="."&&e!==".."},lt=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",rt={win32:{sep:"\\"},posix:{sep:"/"}},fe=lt==="win32"?rt.win32.sep:rt.posix.sep;x.sep=fe;var E=Symbol("globstar **");x.GLOBSTAR=E;var ue="[^/]",pe=ue+"*?",de="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ge="(?:(?!(?:\\/|^)\\.).)*?",me=(i,t={})=>e=>x(e,i,t);x.filter=me;var O=(i,t={})=>Object.assign({},i,t),ye=i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return x;let t=x;return Object.assign((s,n,r={})=>t(s,n,O(i,r)),{Minimatch:class extends t.Minimatch{constructor(n,r={}){super(n,O(i,r))}static defaults(n){return t.defaults(O(i,n)).Minimatch}},AST:class extends t.AST{constructor(n,r,o={}){super(n,r,O(i,o))}static fromGlob(n,r={}){return t.AST.fromGlob(n,O(i,r))}},unescape:(s,n={})=>t.unescape(s,O(i,n)),escape:(s,n={})=>t.escape(s,O(i,n)),filter:(s,n={})=>t.filter(s,O(i,n)),defaults:s=>t.defaults(O(i,s)),makeRe:(s,n={})=>t.makeRe(s,O(i,n)),braceExpand:(s,n={})=>t.braceExpand(s,O(i,n)),match:(s,n,r={})=>t.match(s,n,O(i,r)),sep:t.sep,GLOBSTAR:E})};x.defaults=ye;var ht=(i,t={})=>(P(i),t.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:Q(i,{max:t.braceExpandMax}));x.braceExpand=ht;var we=(i,t={})=>new v(i,t).makeRe();x.makeRe=we;var Se=(i,t,e={})=>{let s=new v(t,e);return i=i.filter(n=>s.match(n)),s.options.nonull&&!i.length&&i.push(t),i};x.match=Se;var ot=/[?*]|[+@!]\(.*?\)|\[|\]/,Ee=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),v=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,e={}){P(t),e=e||{},this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion??200,this.pattern=t,this.platform=e.platform||lt,this.isWindows=this.platform==="win32";let s="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[s]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let n=this.globParts.map((r,o,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=r[0]===""&&r[1]===""&&(r[2]==="?"||!ot.test(r[2]))&&!ot.test(r[3]),a=/^[a-z]:/i.test(r[0]);if(l)return[...r.slice(0,4),...r.slice(4).map(h=>this.parse(h))];if(a)return[r[0],...r.slice(1).map(h=>this.parse(h))]}return r.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){let o=this.set[r];o[0]===""&&o[1]===""&&this.globParts[r][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let s of t)for(let n=0;n<s.length;n++)s[n]==="**"&&(s[n]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let n=s;for(;e[n+1]==="**";)n++;n!==s&&e.splice(s,n-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,n)=>{let r=s[s.length-1];return n==="**"&&r==="**"?s:n===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(n),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let r=t[n];n===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let s=0;for(;(s=t.indexOf("..",s+1))!==-1;){let n=t[s-1];n&&n!=="."&&n!==".."&&n!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(n))&&(e=!0,t.splice(s-1,2),s-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let s of t){let n=-1;for(;(n=s.indexOf("**",n+1))!==-1;){let o=n;for(;s[o+1]==="**";)o++;o>n&&s.splice(n+1,o-n);let c=s[n+1],l=s[n+2],a=s[n+3];if(c!==".."||!l||l==="."||l===".."||!a||a==="."||a==="..")continue;e=!0,s.splice(n,1);let h=s.slice(0);h[n]="**",t.push(h),n--}if(!this.preserveMultipleSlashes){for(let o=1;o<s.length-1;o++){let c=s[o];o===1&&c===""&&s[0]===""||(c==="."||c==="")&&(e=!0,s.splice(o,1),o--)}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(e=!0,s.pop())}let r=0;for(;(r=s.indexOf("..",r+1))!==-1;){let o=s[r-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=!0;let l=r===1&&s[r+1]==="**"?["."]:[];s.splice(r-1,2,...l),s.length===0&&s.push(""),r-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let s=e+1;s<t.length;s++){let n=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);if(n){t[e]=[],t[s]=n;break}}return t.filter(e=>e.length)}partsMatch(t,e,s=!1){let n=0,r=0,o=[],c="";for(;n<t.length&&r<e.length;)if(t[n]===e[r])o.push(c==="b"?e[r]:t[n]),n++,r++;else if(s&&t[n]==="**"&&e[r]===t[n+1])o.push(t[n]),n++;else if(s&&e[r]==="**"&&t[n]===e[r+1])o.push(e[r]),r++;else if(t[n]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(c==="b")return!1;c="a",o.push(t[n]),n++,r++}else if(e[r]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="a")return!1;c="b",o.push(e[r]),n++,r++}else return!1;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,s=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)e=!e,s++;s&&(this.pattern=t.slice(s)),this.negate=e}matchOne(t,e,s=!1){let n=0,r=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),h=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),f=l?3:c?0:void 0,p=h?3:a?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[g,d]=[t[f],e[p]];g.toLowerCase()===d.toLowerCase()&&(e[p]=g,r=p,n=f)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(t=this.levelTwoFileOptimize(t)),e.includes(E)?this.#s(t,e,s,n,r):this.#i(t,e,s,n,r)}#s(t,e,s,n,r){let o=e.indexOf(E,r),c=e.lastIndexOf(E),[l,a,h]=s?[e.slice(r,o),e.slice(o+1),[]]:[e.slice(r,o),e.slice(o+1,c),e.slice(c+1)];if(l.length){let S=t.slice(n,n+l.length);if(!this.#i(S,l,s,0,0))return!1;n+=l.length,r+=l.length}let f=0;if(h.length){if(h.length+n>t.length)return!1;let S=t.length-h.length;if(this.#i(t,h,s,S,0))f=h.length;else{if(t[t.length-1]!==""||n+h.length===t.length||(S--,!this.#i(t,h,s,S,0)))return!1;f=h.length+1}}if(!a.length){let S=!!f;for(let T=n;T<t.length-f;T++){let M=String(t[T]);if(S=!0,M==="."||M===".."||!this.options.dot&&M.startsWith("."))return!1}return s||S}let p=[[[],0]],g=p[0],d=0,u=[0];for(let S of a)S===E?(u.push(d),g=[[],0],p.push(g)):(g[0].push(S),d++);let w=p.length-1,m=t.length-f;for(let S of p)S[1]=m-(u[w--]+S[0].length);return!!this.#n(t,p,n,0,s,0,!!f)}#n(t,e,s,n,r,o,c){let l=e[n];if(!l){for(let f=s;f<t.length;f++){c=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[a,h]=l;for(;s<=h;){if(this.#i(t.slice(0,s+a.length),a,r,s,0)&&o<this.maxGlobstarRecursion){let g=this.#n(t,e,s+a.length,n+1,r,o+1,c);if(g!==!1)return g}let p=t[s];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;s++}return r||null}#i(t,e,s,n,r){let o,c,l,a;for(o=n,c=r,a=t.length,l=e.length;o<a&&c<l;o++,c++){this.debug("matchOne loop");let h=e[c],f=t[o];if(this.debug(e,h,f),h===!1||h===E)return!1;let p;if(typeof h=="string"?(p=f===h,this.debug("string match",h,f,p)):(p=h.test(f),this.debug("pattern match",h,f,p)),!p)return!1}if(o===a&&c===l)return!0;if(o===a)return s;if(c===l)return o===a-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return ht(this.pattern,this.options)}parse(t){P(t);let e=this.options;if(t==="**")return E;if(t==="")return"";let s,n=null;(s=t.match(ne))?n=e.dot?re:ie:(s=t.match(Vt))?n=(e.nocase?e.dot?Jt:Zt:e.dot?Xt:Ht)(s[1]):(s=t.match(oe))?n=(e.nocase?e.dot?ae:ce:e.dot?le:he)(s):(s=t.match(Qt))?n=e.dot?te:Kt:(s=t.match(ee))&&(n=se);let r=A.fromGlob(t,this.options).toMMPattern();return n&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:n}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?pe:e.dot?de:ge,n=new Set(e.nocase?["i"]:[]),r=t.map(l=>{let a=l.map(f=>{if(f instanceof RegExp)for(let p of f.flags.split(""))n.add(p);return typeof f=="string"?Ee(f):f===E?E:f._src});a.forEach((f,p)=>{let g=a[p+1],d=a[p-1];f!==E||d===E||(d===void 0?g!==void 0&&g!==E?a[p+1]="(?:\\/|"+s+"\\/)?"+g:a[p]=s:g===void 0?a[p-1]=d+"(?:\\/|\\/"+s+")?":g!==E&&(a[p-1]=d+"(?:\\/|\\/"+s+"\\/)"+g,a[p+1]=E))});let h=a.filter(f=>f!==E);if(this.partial&&h.length>=1){let f=[];for(let p=1;p<=h.length;p++)f.push(h.slice(0,p).join("/"));return"(?:"+f.join("|")+")"}return h.join("/")}).join("|"),[o,c]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+c+"$",this.partial&&(r="^(?:\\/|"+o+r.slice(1,-1)+c+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let r=this.set;this.debug(this.pattern,"set",r);let o=n[n.length-1];if(!o)for(let c=n.length-2;!o&&c>=0;c--)o=n[c];for(let c of r){let l=n;if(s.matchBase&&c.length===1&&(l=[o]),this.matchOne(l,c,e))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(t){return x.defaults(t).Minimatch}};x.AST=A;x.Minimatch=v;x.escape=z;x.unescape=N;import $ from"node:path";import xe from"node:process";import be from"node:path";import ft,{promises as ds}from"node:fs";import{fileURLToPath as Te}from"node:url";var ut={directory:"isDirectory",file:"isFile"};function Oe(i){if(!(i==="both"||Object.hasOwn(ut,i)))throw new Error(`Invalid type specified: ${i}`)}var Re=(i,t)=>i==="both"?t.isFile()||t.isDirectory():t[ut[i]](),Me=i=>i instanceof URL?Te(i):i;function U(i,{cwd:t=xe.cwd(),type:e="file",allowSymlinks:s=!0}={}){Oe(e),t=Me(t);let n=s?ft.statSync:ft.lstatSync;for(let r of i)try{let o=n(be.resolve(t,r),{throwIfNoEntry:!1});if(!o)continue;if(Re(e,o))return r}catch{}}import{promisify as Ne}from"node:util";import{execFile as Ae,execFileSync as Es}from"node:child_process";import{fileURLToPath as ve}from"node:url";var bs=Ne(Ae);function B(i){return i instanceof URL?ve(i):i}var Ts=10*1024*1024;var Ce=Symbol("findUpStop");function Pe(i,t={}){let e=$.resolve(B(t.cwd)??""),{root:s}=$.parse(e),n=$.resolve(e,B(t.stopAt)??s),r=t.limit??Number.POSITIVE_INFINITY,o=[i].flat(),c=a=>{if(typeof i!="function")return U(o,a);let h=i(a.cwd);return typeof h=="string"?U([h],a):h},l=[];for(;;){let a=c({...t,cwd:e});if(a===Ce||(a&&l.push($.resolve(e,a)),e===n||l.length>=r))break;e=$.dirname(e)}return l}function _e(i,t={}){return Pe(i,{...t,limit:1})[0]}import q from"node:process";import $e from"node:os";import pt from"node:tty";function R(i,t=globalThis.Deno?globalThis.Deno.args:q.argv){let e=i.startsWith("-")?"":i.length===1?"-":"--",s=t.indexOf(e+i),n=t.indexOf("--");return s!==-1&&(n===-1||s<n)}var{env:y}=q,L;R("no-color")||R("no-colors")||R("color=false")||R("color=never")?L=0:(R("color")||R("colors")||R("color=true")||R("color=always"))&&(L=1);function Ie(){if(!("FORCE_COLOR"in y))return;if(y.FORCE_COLOR==="true")return 1;if(y.FORCE_COLOR==="false")return 0;if(y.FORCE_COLOR.length===0)return 1;if(!/^\d+$/v.test(y.FORCE_COLOR))return;let i=Math.min(Number(y.FORCE_COLOR),3);if([0,1,2,3].includes(i))return i}function Le(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function je(i,{streamIsTTY:t,sniffFlags:e=!0}={}){let s=Ie();s!==void 0&&(L=s);let n=e?L:s;if(n===0)return 0;if(e){if(R("color=16m")||R("color=full")||R("color=truecolor"))return 3;if(R("color=256"))return 2}if(n!==void 0&&/^\d+$/v.test(y.FORCE_COLOR))return n;if("TF_BUILD"in y&&"AGENT_NAME"in y)return 1;if(i&&!t&&n===void 0)return 0;let r=n||0;if(y.TERM==="dumb")return r;if(q.platform==="win32"){let o=$e.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in y)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>Object.hasOwn(y,o))?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>Object.hasOwn(y,o))||y.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in y)return/^(?:9\.0*[1-9]\d*\.|\d{2,}\.)/v.test(y.TEAMCITY_VERSION)?1:0;if(y.COLORTERM==="truecolor"||y.TERM==="xterm-kitty"||y.TERM==="xterm-ghostty"||y.TERM==="wezterm")return 3;if("TERM_PROGRAM"in y){let o=Number((y.TERM_PROGRAM_VERSION||"").split(".",1)[0]);switch(y.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(?:color)?$/iv.test(y.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/iv.test(y.TERM)||"COLORTERM"in y?1:r}function dt(i,t={}){let e=je(i,{streamIsTTY:i&&i.isTTY,...t});return Le(e)}var De={stdout:dt({isTTY:pt.isatty(1)}),stderr:dt({isTTY:pt.isatty(2)})},Fe=De;export{v as Minimatch,_e as findUpSync,x as minimatch,Fe as supportsColor};
|
|
@@ -12,7 +12,7 @@ The following inlined npm packages have license or notice files included below.
|
|
|
12
12
|
- minimatch@10.2.6 (https://github.com/isaacs/minimatch)
|
|
13
13
|
- nanoid@3.3.20 (https://github.com/ai/nanoid)
|
|
14
14
|
- picocolors@1.1.1 (https://github.com/alexeyraspopov/picocolors)
|
|
15
|
-
- postcss@8.5.
|
|
15
|
+
- postcss@8.5.31 (https://github.com/postcss/postcss)
|
|
16
16
|
- source-map-js@1.2.2 (https://github.com/7rulnik/source-map-js)
|
|
17
17
|
- supports-color@11.0.0 (https://github.com/chalk/supports-color)
|
|
18
18
|
- unicorn-magic@0.3.0 (https://github.com/sindresorhus/unicorn-magic)
|
|
@@ -224,7 +224,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
224
224
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
225
225
|
=========================================
|
|
226
226
|
END OF picocolors@1.1.1 NOTICES AND INFORMATION
|
|
227
|
-
%% postcss@8.5.
|
|
227
|
+
%% postcss@8.5.31 NOTICES AND INFORMATION BEGIN HERE
|
|
228
228
|
=========================================
|
|
229
229
|
The MIT License (MIT)
|
|
230
230
|
|
|
@@ -247,7 +247,7 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
247
247
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
248
248
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
249
249
|
=========================================
|
|
250
|
-
END OF postcss@8.5.
|
|
250
|
+
END OF postcss@8.5.31 NOTICES AND INFORMATION
|
|
251
251
|
%% source-map-js@1.2.2 NOTICES AND INFORMATION BEGIN HERE
|
|
252
252
|
=========================================
|
|
253
253
|
Copyright (c) 2009-2011, Mozilla Foundation and contributors
|
package/lib/platform/share.js
CHANGED
|
@@ -347,6 +347,13 @@ const Util = {
|
|
|
347
347
|
},
|
|
348
348
|
|
|
349
349
|
initLineCoverage: (lineItem) => {
|
|
350
|
+
// Default to covered because JS byte ranges normally span the whole file,
|
|
351
|
+
// so only wrapper offsets stay outside them. CSS ranges cover parsed
|
|
352
|
+
// rules only: a line outside every rule (for example an untested
|
|
353
|
+
// preprocessor variable or unused mixin definition) has no range and
|
|
354
|
+
// inherits this default. For such files, byte coverage remains the
|
|
355
|
+
// authoritative metric (see "Line coverage of untested preprocessor
|
|
356
|
+
// sources" in README).
|
|
350
357
|
lineItem.coveredCount = 1;
|
|
351
358
|
lineItem.uncoveredEntire = null;
|
|
352
359
|
lineItem.uncoveredPieces = [];
|
package/lib/utils/source-path.js
CHANGED
|
@@ -31,8 +31,13 @@ const resolveAnonymousUrl = (url, index, type) => {
|
|
|
31
31
|
|
|
32
32
|
const normalizePathDir = (sourcePath) => {
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
let str = `${sourcePath}`;
|
|
35
|
+
try {
|
|
36
|
+
// decodeURI("%20") to space
|
|
37
|
+
str = decodeURI(str);
|
|
38
|
+
} catch {
|
|
39
|
+
// Preserve unresolvable URI text instead of aborting the report.
|
|
40
|
+
}
|
|
36
41
|
str = str.replace(/\\/g, '/');
|
|
37
42
|
|
|
38
43
|
// remove / of start, end or double, ./ ../
|
|
@@ -55,15 +60,21 @@ const betterFileURLToPath = (url) => {
|
|
|
55
60
|
try {
|
|
56
61
|
url = fileURLToPath(url);
|
|
57
62
|
} catch (e) {
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
try {
|
|
64
|
+
url = decodeURIComponent(url);
|
|
65
|
+
url = fileURLToPath(url);
|
|
66
|
+
} catch {
|
|
67
|
+
// in case that it cannot be safely resolved, we pass it verbatim.
|
|
68
|
+
return url;
|
|
69
|
+
}
|
|
60
70
|
}
|
|
61
71
|
return url;
|
|
62
72
|
};
|
|
63
73
|
|
|
64
74
|
const normalizeSourcePath = (sourceUrl, baseDir) => {
|
|
65
75
|
|
|
66
|
-
//
|
|
76
|
+
// Best-effort report paths, not filesystem lookup paths. Leave special cases
|
|
77
|
+
// to sourcePath, which can use the original URL instead of guessing here.
|
|
67
78
|
|
|
68
79
|
// file url
|
|
69
80
|
if (sourceUrl.startsWith('file:')) {
|
|
@@ -120,11 +131,14 @@ const normalizeSourcePath = (sourceUrl, baseDir) => {
|
|
|
120
131
|
return normalizePathDir(relPath);
|
|
121
132
|
};
|
|
122
133
|
|
|
134
|
+
const cssTypes = new Set(['css', 'less', 'sass', 'scss', 'styl', 'stylus', 'postcss', 'pcss', 'sss']);
|
|
135
|
+
|
|
123
136
|
const getSourceType = (sourcePath) => {
|
|
124
137
|
let ext = path.extname(sourcePath);
|
|
125
138
|
let type = 'js';
|
|
126
139
|
if (ext) {
|
|
127
|
-
|
|
140
|
+
// extensions are case-insensitive, e.g. `.CSS` or `.SCSS`
|
|
141
|
+
ext = ext.slice(1).toLowerCase();
|
|
128
142
|
const reg = /^[a-z0-9]+$/;
|
|
129
143
|
if (reg.test(ext)) {
|
|
130
144
|
type = ext;
|
|
@@ -245,6 +259,7 @@ export {
|
|
|
245
259
|
resolveAnonymousUrl,
|
|
246
260
|
normalizeSourcePath,
|
|
247
261
|
getSourceType,
|
|
262
|
+
cssTypes,
|
|
248
263
|
getSourcePathReplacer,
|
|
249
264
|
initIstanbulSourcePath,
|
|
250
265
|
initSourceMapSourcesPath
|
package/lib/utils/util.js
CHANGED
|
@@ -226,7 +226,12 @@ const Util = {
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
// after decode url
|
|
229
|
-
|
|
229
|
+
try {
|
|
230
|
+
str = decodeURIComponent(str);
|
|
231
|
+
} catch {
|
|
232
|
+
// The raw path did not match and cannot be decoded. Let later rules run.
|
|
233
|
+
return false;
|
|
234
|
+
}
|
|
230
235
|
|
|
231
236
|
if (str.includes(pattern)) {
|
|
232
237
|
return true;
|
package/package.json
CHANGED
|
@@ -1,153 +1,161 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "monocart-coverage-reports",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "A code coverage tool to generate native V8 reports or Istanbul reports.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./lib/index.js",
|
|
7
|
-
"bin": {
|
|
8
|
-
"mcr": "./lib/cli.js"
|
|
9
|
-
},
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./lib/index.d.ts",
|
|
13
|
-
"default": "./lib/index.js"
|
|
14
|
-
},
|
|
15
|
-
"./register": "./lib/register/register.js",
|
|
16
|
-
"./converter": "./lib/converter/converter.js",
|
|
17
|
-
"./util": "./lib/utils/util.js",
|
|
18
|
-
"./package.json": "./package.json",
|
|
19
|
-
"./skills/*": "./skills/*"
|
|
20
|
-
},
|
|
21
|
-
"types": "./lib/index.d.ts",
|
|
22
|
-
"scripts": {
|
|
23
|
-
"dev": "vite",
|
|
24
|
-
"build": "vite build",
|
|
25
|
-
"postbuild": "npm run build-test",
|
|
26
|
-
"build-test": "node ./test/build/build-test.js",
|
|
27
|
-
"test-unit": "node --test \"test/unit/*.test.js\"",
|
|
28
|
-
"test-unit-coverage": "node ./lib/cli.js test -c test/mcr.config.unit.js",
|
|
29
|
-
"test-types": "tsc -p test/types/tsconfig.json",
|
|
30
|
-
"test-runtime": "node ./scripts/test-runtime.js",
|
|
31
|
-
"test-node-env": "cross-env NODE_V8_COVERAGE=.temp/v8-coverage-env node ./test/test-node-env.js && node ./test/generate-report.js",
|
|
32
|
-
"test-node-api": "cross-env NODE_V8_COVERAGE=.temp/v8-coverage-api node ./test/test-node-api.js",
|
|
33
|
-
"test-node-ins": "node ./test/test-node-ins.js",
|
|
34
|
-
"test-node-cdp": "node --inspect=9229 ./test/test-node-cdp.js",
|
|
35
|
-
"test-node-vm": "node ./test/test-node-vm.js",
|
|
36
|
-
"test-node-koa": "node ./test/test-node-koa.js",
|
|
37
|
-
"test-node-fgc": "node ./test/test-node-fgc.js",
|
|
38
|
-
"test-node": "node ./test/test.js --node",
|
|
39
|
-
"test-istanbul": "node ./test/test-istanbul.js",
|
|
40
|
-
"test-v8": "node ./test/test-v8.js",
|
|
41
|
-
"test-puppeteer": "node ./test/test-puppeteer.js",
|
|
42
|
-
"test-css": "node ./test/test-css.js",
|
|
43
|
-
"test-
|
|
44
|
-
"test-
|
|
45
|
-
"test-
|
|
46
|
-
"test-
|
|
47
|
-
"test-
|
|
48
|
-
"test-
|
|
49
|
-
"test-
|
|
50
|
-
"test-
|
|
51
|
-
"test-
|
|
52
|
-
"test-
|
|
53
|
-
"test-merge
|
|
54
|
-
"test-merge-
|
|
55
|
-
"test-merge-
|
|
56
|
-
"test-
|
|
57
|
-
"test-
|
|
58
|
-
"test-
|
|
59
|
-
"test-
|
|
60
|
-
"test": "
|
|
61
|
-
"test
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"lint
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"
|
|
83
|
-
"acorn
|
|
84
|
-
"acorn-
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"istanbul-lib-
|
|
92
|
-
"istanbul-
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"@actions/
|
|
102
|
-
"@
|
|
103
|
-
"@
|
|
104
|
-
"@rollup/plugin-
|
|
105
|
-
"@
|
|
106
|
-
"@
|
|
107
|
-
"@
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"babel-
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"eslint
|
|
118
|
-
"eslint-
|
|
119
|
-
"eslint-plugin-
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"koa
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"monocart-
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"rollup
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"stylelint
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"vite
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "monocart-coverage-reports",
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"description": "A code coverage tool to generate native V8 reports or Istanbul reports.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./lib/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mcr": "./lib/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./lib/index.d.ts",
|
|
13
|
+
"default": "./lib/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./register": "./lib/register/register.js",
|
|
16
|
+
"./converter": "./lib/converter/converter.js",
|
|
17
|
+
"./util": "./lib/utils/util.js",
|
|
18
|
+
"./package.json": "./package.json",
|
|
19
|
+
"./skills/*": "./skills/*"
|
|
20
|
+
},
|
|
21
|
+
"types": "./lib/index.d.ts",
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"build": "vite build",
|
|
25
|
+
"postbuild": "npm run build-test",
|
|
26
|
+
"build-test": "node ./test/build/build-test.js",
|
|
27
|
+
"test-unit": "node --test \"test/unit/*.test.js\"",
|
|
28
|
+
"test-unit-coverage": "node ./lib/cli.js test -c test/mcr.config.unit.js",
|
|
29
|
+
"test-types": "tsc -p test/types/tsconfig.json",
|
|
30
|
+
"test-runtime": "node ./scripts/test-runtime.js",
|
|
31
|
+
"test-node-env": "cross-env NODE_V8_COVERAGE=.temp/v8-coverage-env node ./test/test-node-env.js && node ./test/generate-report.js",
|
|
32
|
+
"test-node-api": "cross-env NODE_V8_COVERAGE=.temp/v8-coverage-api node ./test/test-node-api.js",
|
|
33
|
+
"test-node-ins": "node ./test/test-node-ins.js",
|
|
34
|
+
"test-node-cdp": "node --inspect=9229 ./test/test-node-cdp.js",
|
|
35
|
+
"test-node-vm": "node ./test/test-node-vm.js",
|
|
36
|
+
"test-node-koa": "node ./test/test-node-koa.js",
|
|
37
|
+
"test-node-fgc": "node ./test/test-node-fgc.js",
|
|
38
|
+
"test-node": "node ./test/test.js --node",
|
|
39
|
+
"test-istanbul": "node ./test/test-istanbul.js",
|
|
40
|
+
"test-v8": "node ./test/test-v8.js",
|
|
41
|
+
"test-puppeteer": "node ./test/test-puppeteer.js",
|
|
42
|
+
"test-css": "node ./test/test-css.js",
|
|
43
|
+
"test-css-min": "node ./test/test-css-min.js",
|
|
44
|
+
"test-minify": "node ./test/test-minify.js",
|
|
45
|
+
"test-esbuild": "node ./test/test-esbuild.js",
|
|
46
|
+
"test-rollup": "node ./test/test-rollup.js",
|
|
47
|
+
"test-sections": "node ./test/test-sections.js",
|
|
48
|
+
"test-swc": "node ./test/test-swc.js",
|
|
49
|
+
"test-v8-and-istanbul": "node ./test/test-v8-and-istanbul.js",
|
|
50
|
+
"test-browser": "node ./test/test.js --browser",
|
|
51
|
+
"test-cli": "node ./lib/cli.js node ./test/specs/node.test.js -c test/mcr.config.cli.js",
|
|
52
|
+
"test-demo": "node ./test/test-demo.js",
|
|
53
|
+
"test-merge": "node ./test/test-merge.js",
|
|
54
|
+
"test-merge-istanbul": "node ./test/test-merge-istanbul.js",
|
|
55
|
+
"test-merge-v8": "node ./test/test-merge-v8.js",
|
|
56
|
+
"test-merge-cli": "node ./lib/cli.js merge -r console-details,v8 --inputDir .temp/code-coverage/raw --outputDir .temp/merge-cli",
|
|
57
|
+
"test-client": "node ./test/test-client.js",
|
|
58
|
+
"test-cp": "node ./lib/cli.js node test/test-cp.mjs --outputDir .temp/test-cp",
|
|
59
|
+
"test-all": "node ./test/test.js",
|
|
60
|
+
"test-pr": "node --inspect=9230 ./test/test-pr.js",
|
|
61
|
+
"test": "npm run test-unit && npm run test-types && node ./lib/cli.js npm run test-all -c test/mcr.config.mcr.js && node ./scripts/docs.js",
|
|
62
|
+
"test:snap": "cross-env TEST_SNAPSHOT=true npm run test",
|
|
63
|
+
"open": "node ./scripts/open.js",
|
|
64
|
+
"eol": "git rm -rf --cached . && git reset --hard HEAD",
|
|
65
|
+
"lint": "eslint src/ test/unit/ --fix && stylelint src/**/*.scss && npm run lint:readme",
|
|
66
|
+
"lint:readme": "node ./scripts/lint-readme.js",
|
|
67
|
+
"version": "npm run build",
|
|
68
|
+
"publish": "node ./scripts/publish.js"
|
|
69
|
+
},
|
|
70
|
+
"files": [
|
|
71
|
+
"lib",
|
|
72
|
+
"README.zh-Hans.md",
|
|
73
|
+
"migrate-to-3.md",
|
|
74
|
+
"skills"
|
|
75
|
+
],
|
|
76
|
+
"license": "MIT",
|
|
77
|
+
"repository": {
|
|
78
|
+
"type": "git",
|
|
79
|
+
"url": "git+https://github.com/cenfun/monocart-coverage-reports.git"
|
|
80
|
+
},
|
|
81
|
+
"dependencies": {
|
|
82
|
+
"@jridgewell/sourcemap-codec": "^1.6.0",
|
|
83
|
+
"acorn": "^8.19.0",
|
|
84
|
+
"acorn-loose": "^8.5.2",
|
|
85
|
+
"acorn-walk": "^8.3.5",
|
|
86
|
+
"commander": "^15.0.0",
|
|
87
|
+
"console-grid": "^2.2.4",
|
|
88
|
+
"convert-source-map": "^2.0.0",
|
|
89
|
+
"eight-colors": "^1.3.3",
|
|
90
|
+
"execa": "^10.2.1",
|
|
91
|
+
"istanbul-lib-coverage": "^3.2.2",
|
|
92
|
+
"istanbul-lib-report": "^3.0.1",
|
|
93
|
+
"istanbul-reports": "^3.2.0",
|
|
94
|
+
"lz-utils": "^2.1.1",
|
|
95
|
+
"monocart-locator": "^1.0.6",
|
|
96
|
+
"node-stream-zip": "^1.16.0",
|
|
97
|
+
"ws": "^8.22.0",
|
|
98
|
+
"yazl": "^3.3.1"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@actions/core": "^3.0.1",
|
|
102
|
+
"@actions/github": "^9.1.1",
|
|
103
|
+
"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
|
|
104
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
105
|
+
"@rollup/plugin-typescript": "^12.3.1",
|
|
106
|
+
"@swc/core": "^1.16.20",
|
|
107
|
+
"@types/node": "^26.6.5",
|
|
108
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
109
|
+
"async-tick": "^1.0.2",
|
|
110
|
+
"axios": "^1.20.0",
|
|
111
|
+
"babel-loader": "^10.1.1",
|
|
112
|
+
"babel-plugin-istanbul": "^8.0.0",
|
|
113
|
+
"cross-env": "^10.1.0",
|
|
114
|
+
"diff-sequences": "^29.6.3",
|
|
115
|
+
"eight-colors": "^1.3.3",
|
|
116
|
+
"esbuild": "^0.28.2",
|
|
117
|
+
"eslint": "^10.13.0",
|
|
118
|
+
"eslint-config-plus": "^2.1.0",
|
|
119
|
+
"eslint-plugin-html": "^8.2.1",
|
|
120
|
+
"eslint-plugin-vue": "^10.11.1",
|
|
121
|
+
"find-up": "^8.0.0",
|
|
122
|
+
"koa": "^3.2.1",
|
|
123
|
+
"koa-static-resolver": "^1.1.0",
|
|
124
|
+
"minimatch": "^10.2.6",
|
|
125
|
+
"monocart-code-viewer": "^1.2.0",
|
|
126
|
+
"monocart-formatter": "^3.0.1",
|
|
127
|
+
"open": "^11.0.4",
|
|
128
|
+
"playwright": "^1.64.1",
|
|
129
|
+
"postcss": "^8.5.31",
|
|
130
|
+
"puppeteer": "^25.16.0",
|
|
131
|
+
"rollup": "^4.65.0",
|
|
132
|
+
"rollup-plugin-visualizer": "^7.1.1",
|
|
133
|
+
"sass": "^1.106.1",
|
|
134
|
+
"stylelint": "^17.16.0",
|
|
135
|
+
"stylelint-config-plus": "^1.2.0",
|
|
136
|
+
"supports-color": "^11.0.0",
|
|
137
|
+
"swc-loader": "^0.2.7",
|
|
138
|
+
"ts-loader": "^9.6.2",
|
|
139
|
+
"tslib": "^2.8.1",
|
|
140
|
+
"tsx": "^4.23.15",
|
|
141
|
+
"turbogrid": "^3.4.2",
|
|
142
|
+
"typescript": "^6.0.3",
|
|
143
|
+
"vine-ui": "^4.2.0",
|
|
144
|
+
"vite": "^8.3.5",
|
|
145
|
+
"vite-plugin-css-injected-by-js": "^5.0.2",
|
|
146
|
+
"webpack": "^5.112.2"
|
|
147
|
+
},
|
|
148
|
+
"engines": {
|
|
149
|
+
"node": ">=22.15.0"
|
|
150
|
+
},
|
|
151
|
+
"puppeteer": {
|
|
152
|
+
"skipDownload": true
|
|
153
|
+
},
|
|
154
|
+
"starfall": {
|
|
155
|
+
"outdate": {
|
|
156
|
+
"exclude": [
|
|
157
|
+
"typescript"
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|