@visulima/cerebro 1.1.56 → 1.1.58
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## @visulima/cerebro [1.1.58](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.57...@visulima/cerebro@1.1.58) (2025-10-22)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* Downgraded '@visulima/pail' from 3.0.2 to 2.1.31 in package.json ([e910dcd](https://github.com/visulima/visulima/commit/e910dcd29eec9b451d3ec2c6d19ffd04082b0b7b))
|
|
6
|
+
|
|
7
|
+
## @visulima/cerebro [1.1.57](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.56...@visulima/cerebro@1.1.57) (2025-10-22)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Downgraded @visulima/pail dependency from version 3.0.1 to 2.1.31 in package.json. ([ef8ca71](https://github.com/visulima/visulima/commit/ef8ca714f6e64d6a00b57c120bbb88fd13573997))
|
|
12
|
+
|
|
13
|
+
### Miscellaneous Chores
|
|
14
|
+
|
|
15
|
+
* update package dependencies and configurations ([7bfe7e7](https://github.com/visulima/visulima/commit/7bfe7e71869580900aab50efb064b4293994ed9a))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Dependencies
|
|
19
|
+
|
|
20
|
+
* **@visulima/boxen:** upgraded to 2.0.6
|
|
21
|
+
* **@visulima/pail:** upgraded to 3.0.2
|
|
22
|
+
|
|
1
23
|
## @visulima/cerebro [1.1.56](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.55...@visulima/cerebro@1.1.56) (2025-10-21)
|
|
2
24
|
|
|
3
25
|
### Bug Fixes
|
package/LICENSE.md
CHANGED
|
@@ -34,7 +34,7 @@ Repository: git+https://github.com/visulima/visulima.git
|
|
|
34
34
|
|
|
35
35
|
> MIT License
|
|
36
36
|
>
|
|
37
|
-
> Copyright (c)
|
|
37
|
+
> Copyright (c) 2025 visulima
|
|
38
38
|
>
|
|
39
39
|
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
40
40
|
> of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Mt=Object.defineProperty;var z=(n,r)=>Mt(n,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("node:fs"),zt=require("@visulima/find-cache-dir"),Pt=require("node:https");var _t=Object.defineProperty,Ct=z((n,r)=>_t(n,"name",{value:r,configurable:!0}),"o$1");const St=Ct((n,r)=>{const i=n.split(".").map(Number),u=r.split(".").map(Number);for(const[d,h]of i.entries()){if(h>u[d])return!0;if(h<u[d])return!1}return!1},"semverGt");var Et=Object.defineProperty,Nt=z((n,r)=>Et(n,"name",{value:r,configurable:!0}),"ce"),Ut=Object.defineProperty,F=Nt((n,r)=>Ut(n,"name",{value:r,configurable:!0}),"C"),It=Object.defineProperty,c=F((n,r)=>It(n,"name",{value:r,configurable:!0}),"u$1");let ue=c(()=>{var n=(()=>{var r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,h=c((e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})},"J"),x=c((e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of u(t))!d.call(e,s)&&s!==o&&r(e,s,{get:c(()=>t[s],"get"),enumerable:!(a=i(t,s))||a.enumerable});return e},"T"),g=c(e=>x(r({},"__esModule",{value:!0}),e),"W"),y={};h(y,{zeptomatch:c(()=>wt,"zeptomatch")});var W=c(e=>Array.isArray(e),"k"),P=c(e=>typeof e=="function","x"),ge=c(e=>e.length===0,"K"),me=(()=>{const{toString:e}=Function.prototype,t=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return o=>(o.length===0||o.length===1)&&t.test(e.call(o))})(),xe=c(e=>typeof e=="number","Y"),ve=c(e=>typeof e=="object"&&e!==null,"rr"),$e=c(e=>e instanceof RegExp,"er"),ye=(()=>{const e=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return t=>e.test(t.source)})(),be=(()=>{const e=/^[a-zA-Z0-9_-]+$/;return t=>e.test(t.source)&&!t.flags.includes("i")})(),T=c(e=>typeof e=="string","M"),O=c(e=>e===void 0,"f"),we=c(e=>{const t=new Map;return o=>{const a=t.get(o);if(a!==void 0)return a;const s=e(o);return t.set(o,s),s}},"ar"),je=c((e,t,o={})=>{const a={cache:{},input:e,index:0,indexBacktrackMax:0,options:o,output:[]},s=k(t)(a),f=Math.max(a.index,a.indexBacktrackMax);if(s&&a.index===e.length)return a.output;throw new Error(`Failed to parse at index ${f}`)},"or"),l=c((e,t)=>W(e)?Oe(e,t):T(e)?J(e,t):ke(e,t),"o"),Oe=c((e,t)=>{const o={};for(const a of e){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const s=a.charCodeAt(0);o[s]=!0}return a=>{const s=a.input;let f=a.index,p=f;for(;p<s.length&&s.charCodeAt(p)in o;)p+=1;if(p>f){if(!O(t)&&!a.options.silent){const m=s.slice(f,p),$=P(t)?t(m,s,`${f}`):t;O($)||a.output.push($)}a.index=p}return!0}},"ir"),ke=c((e,t)=>{if(be(e))return J(e.source,t);{const o=e.source,a=e.flags.replace(/y|$/,"y"),s=new RegExp(o,a);return ye(e)&&P(t)&&!me(t)?Ae(s,t):Me(s,t)}},"ur"),Ae=c((e,t)=>o=>{const a=o.index,s=o.input;e.lastIndex=a;const f=e.exec(s);if(f){const p=e.lastIndex;if(!o.options.silent){const m=t(...f,s,`${a}`);O(m)||o.output.push(m)}return o.index=p,!0}else return!1},"sr"),Me=c((e,t)=>o=>{const a=o.index,s=o.input;if(e.lastIndex=a,e.test(s)){const f=e.lastIndex;if(!O(t)&&!o.options.silent){const p=P(t)?t(s.slice(a,f),s,`${a}`):t;O(p)||o.output.push(p)}return o.index=f,!0}else return!1},"cr"),J=c((e,t)=>o=>{const a=o.index,s=o.input;if(s.startsWith(e,a)){if(!O(t)&&!o.options.silent){const f=P(t)?t(e,s,`${a}`):t;O(f)||o.output.push(f)}return o.index+=e.length,!0}else return!1},"R"),G=c((e,t,o,a)=>{const s=k(e),f=t>1;return Z(I(V(p=>{let m=0;for(;m<o;){const $=p.index;if(!s(p)||(m+=1,p.index===$))break}return m>=t},f),a))},"O"),ze=c((e,t)=>G(e,0,1,t),"lr"),E=c((e,t)=>G(e,0,1/0,t),"m"),N=c((e,t)=>{const o=e.map(k);return Z(I(V(a=>{for(let s=0,f=o.length;s<f;s++)if(!o[s](a))return!1;return!0}),t))},"S"),w=c((e,t)=>{const o=e.map(k);return Z(I(a=>{for(let s=0,f=o.length;s<f;s++)if(o[s](a))return!0;return!1},t))},"p"),V=c((e,t=!0,o=!1)=>{const a=k(e);return t?s=>{const f=s.index,p=s.output.length,m=a(s);return!m&&!o&&(s.indexBacktrackMax=Math.max(s.indexBacktrackMax,s.index)),(!m||o)&&(s.index=f,s.output.length!==p&&(s.output.length=p)),m}:a},"P"),I=c((e,t)=>{const o=k(e);return t?a=>{if(a.options.silent)return o(a);const s=a.output.length;if(o(a)){const f=a.output.splice(s,1/0),p=t(f);return O(p)||a.output.push(p),!0}else return!1}:o},"C"),Z=(()=>{let e=0;return t=>{const o=k(t),a=e+=1;return s=>{var f;if(s.options.memoization===!1)return o(s);const p=s.index,m=(f=s.cache)[a]||(f[a]={indexMax:-1,queue:[]}),$=m.queue;if(p<=m.indexMax){const _=m.store||(m.store=new Map);if($.length){for(let M=0,Ot=$.length;M<Ot;M+=2){const kt=$[M*2],At=$[M*2+1];_.set(kt,At)}$.length=0}const b=_.get(p);if(b===!1)return!1;if(xe(b))return s.index=b,!0;if(b)return s.index=b.index,b.output?.length&&s.output.push(...b.output),!0}const ae=s.output.length,jt=o(s);if(m.indexMax=Math.max(m.indexMax,p),jt){const _=s.index,b=s.output.length;if(b>ae){const M=s.output.slice(ae,b);$.push(p,{index:_,output:M})}else $.push(p,_);return!0}else return $.push(p,!1),!1}}})(),K=c(e=>{let t;return o=>(t||(t=k(e())),t(o))},"A"),k=we(e=>{if(P(e))return ge(e)?K(e):e;if(T(e)||$e(e))return l(e);if(W(e))return N(e);if(ve(e))return w(Object.values(e));throw new Error("Invalid rule")}),j=c(e=>e,"v"),Y=c(e=>t=>je(t,e,{memoization:!1}).join(""),"z"),Pe=c(e=>{const t={};return o=>t[o]??(t[o]=e(o))},"pr"),H="abcdefghijklmnopqrstuvwxyz",_e=c(e=>{let t="";for(;e>0;){const o=(e-1)%26;t=H[o]+t,e=Math.floor((e-1)/26)}return t},"vr"),Q=c(e=>{let t=0;for(let o=0,a=e.length;o<a;o++)t=t*26+H.indexOf(e[o])+1;return t},"N"),D=c((e,t)=>{if(t<e)return D(t,e);const o=[];for(;e<=t;)o.push(e++);return o},"$"),Ce=c((e,t,o)=>D(e,t).map(a=>String(a).padStart(o,"0")),"fr"),X=c((e,t)=>D(Q(e),Q(t)).map(_e),"j"),L=l(/\\./,j),Se=l(/[$.*+?^(){}[\]\|]/,e=>`\\${e}`),Ee=l(/[\\/]/,"[\\\\/]"),Ne=l(/./,j),Ue=l(/^(?:!!)*!(.*)$/,(e,t)=>`(?!^${ie(t)}$).*?`),Ie=l(/^(!!)+/,""),Ze=w([Ue,Ie]),De=l(/\/(\*\*\/)+/,"(?:[\\\\/].+[\\\\/]|[\\\\/])"),Le=l(/^(\*\*\/)+/,"(?:^|.*[\\\\/])"),qe=l(/\/(\*\*)$/,"(?:[\\\\/].*|$)"),Be=l(/\*\*/,".*"),ee=w([De,Le,qe,Be]),Fe=l(/\*\/(?!\*\*\/|\*$)/,"[^\\\\/]*[\\\\/]"),Re=l(/\*/,"[^\\\\/]*"),te=w([Fe,Re]),ne=l("?","[^\\\\/]"),We=l("[",j),Te=l("]",j),Je=l(/[!^]/,"^\\\\/"),Ge=l(/[a-z]-[a-z]|[0-9]-[0-9]/i,j),Ve=l(/[$.*+?^(){}[\|]/,e=>`\\${e}`),Ke=l(/[^\]]/,j),Ye=w([L,Ve,Ge,Ke]),re=N([We,ze(Je),E(Ye),Te]),He=l("{","(?:"),Qe=l("}",")"),Xe=l(/(\d+)\.\.(\d+)/,(e,t,o)=>Ce(+t,+o,Math.min(t.length,o.length)).join("|")),et=l(/([a-z]+)\.\.([a-z]+)/,(e,t,o)=>X(t,o).join("|")),tt=l(/([A-Z]+)\.\.([A-Z]+)/,(e,t,o)=>X(t.toLowerCase(),o.toLowerCase()).join("|").toUpperCase()),nt=w([Xe,et,tt]),oe=N([He,nt,Qe]),rt=l("{","(?:"),ot=l("}",")"),st=l(",","|"),it=l(/[$.*+?^(){[\]\|]/,e=>`\\${e}`),at=l(/[^}]/,j),ut=K(()=>se),ct=w([ee,te,ne,re,oe,ut,L,it,st,at]),se=N([rt,E(ct),ot]),lt=E(w([Ze,ee,te,ne,re,oe,se,L,Se,Ee,Ne])),ft=lt,pt=Y(ft),ie=pt,dt=l(/\\./,j),ht=l(/./,j),gt=l(/\*\*\*+/,"*"),mt=l(/([^/{[(!])\*\*/,(e,t)=>`${t}*`),xt=l(/(^|.)\*\*(?=[^*/)\]}])/,(e,t)=>`${t}*`),vt=E(w([dt,gt,mt,xt,ht])),$t=vt,yt=Y($t),bt=yt,U=c((e,t)=>Array.isArray(e)?e.map(U.compile).some(o=>o.test(t)):U.compile(e).test(t),"_");U.compile=Pe(e=>new RegExp(`^${ie(bt(e))}[\\\\/]?$`,"s"));var wt=U;return g(y)})();return n.default||n},"_lazyMatch"),q;const Zt=c((n,r)=>(q||(q=ue(),ue=null),q(n,r)),"default");var Dt=Object.defineProperty,Lt=F((n,r)=>Dt(n,"name",{value:r,configurable:!0}),"t");const qt=/^[A-Z]:\//i,A=Lt((n="")=>n&&n.replaceAll("\\","/").replace(qt,r=>r.toUpperCase()),"normalizeWindowsPath");var Bt=Object.defineProperty,v=F((n,r)=>Bt(n,"name",{value:r,configurable:!0}),"r");const Ft=/^[/\\]{2}/,Rt=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,le=/^[A-Z]:$/i,ce=/^\/([A-Z]:)?$/i,Wt=/.(\.[^./]+)$/,Tt=/^[/\\]|^[a-z]:[/\\]/i,Jt=v(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),fe=v((n,r)=>{let i="",u=0,d=-1,h=0,x;for(let g=0;g<=n.length;++g){if(g<n.length)x=n[g];else{if(x==="/")break;x="/"}if(x==="/"){if(!(d===g-1||h===1))if(h===2){if(i.length<2||u!==2||!i.endsWith(".")||i.at(-2)!=="."){if(i.length>2){const y=i.lastIndexOf("/");y===-1?(i="",u=0):(i=i.slice(0,y),u=i.length-1-i.lastIndexOf("/")),d=g,h=0;continue}else if(i.length>0){i="",u=0,d=g,h=0;continue}}r&&(i+=i.length>0?"/..":"..",u=2)}else i.length>0?i+=`/${n.slice(d+1,g)}`:i=n.slice(d+1,g),u=g-d-1;d=g,h=0}else x==="."&&h!==-1?++h:h=-1}return i},"normalizeString"),S=v(n=>Rt.test(n),"isAbsolute"),pe=v(function(n){if(n.length===0)return".";n=A(n);const r=Ft.exec(n),i=S(n),u=n.at(-1)==="/";return n=fe(n,!i),n.length===0?i?"/":u?"./":".":(u&&(n+="/"),le.test(n)&&(n+="/"),r?i?`//${n}`:`//./${n}`:i&&!S(n)?`/${n}`:n)},"normalize"),Gt=v((...n)=>{let r="";for(const i of n)if(i)if(r.length>0){const u=r[r.length-1]==="/",d=i[0]==="/";u&&d?r+=i.slice(1):r+=u||d?i:`/${i}`}else r+=i;return pe(r)},"join"),B=v(function(...n){n=n.map(u=>A(u));let r="",i=!1;for(let u=n.length-1;u>=-1&&!i;u--){const d=u>=0?n[u]:Jt();!d||d.length===0||(r=`${d}/${r}`,i=S(d))}return r=fe(r,!i),i&&!S(r)?`/${r}`:r.length>0?r:"."},"resolve");v(function(n){return A(n)},"toNamespacedPath");const Vt=v(function(n){return Wt.exec(A(n))?.[1]??""},"extname");v(function(n,r){const i=B(n).replace(ce,"$1").split("/"),u=B(r).replace(ce,"$1").split("/");if(u[0][1]===":"&&i[0][1]===":"&&i[0]!==u[0])return u.join("/");const d=[...i];for(const h of d){if(u[0]!==h)break;i.shift(),u.shift()}return[...i.map(()=>".."),...u].join("/")},"relative");const de=v(n=>{const r=A(n).replace(/\/$/,"").split("/").slice(0,-1);return r.length===1&&le.test(r[0])&&(r[0]+="/"),r.join("/")||(S(n)?"/":".")},"dirname");v(function(n){const r=[n.root,n.dir,n.base??n.name+n.ext].filter(Boolean);return A(n.root?B(...r):r.join("/"))},"format");const Kt=v((n,r)=>{const i=A(n).split("/").pop();return r&&i.endsWith(r)?i.slice(0,-r.length):i},"basename");v(function(n){const r=Tt.exec(n)?.[0]?.replaceAll("\\","/")??"",i=Kt(n),u=Vt(i);return{base:i,dir:de(n),ext:u,name:i.slice(0,i.length-u.length),root:r}},"parse");v((n,r)=>Zt(r,pe(n)),"matchesGlob");var Yt=Object.defineProperty,R=z((n,r)=>Yt(n,"name",{value:r,configurable:!0}),"r");const Ht="last-update-check.json",he=R(n=>{const r=zt.findCacheDirSync(n);if(r===void 0)throw new Error("Could not find cache directory");return Gt(r,Ht)},"getConfigFile"),Qt=R(n=>{const r=he(n);try{if(!C.existsSync(r))return;const{lastUpdateCheck:i}=JSON.parse(C.readFileSync(r,"utf8"));return i}catch{return}},"getLastUpdate"),Xt=R(n=>{const r=he(n),i=de(r);C.existsSync(i)||C.mkdirSync(i,{recursive:!0}),C.writeFileSync(r,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var en=Object.defineProperty,tn=z((n,r)=>en(n,"name",{value:r,configurable:!0}),"g");const nn=tn(async(n,r,i)=>{const u=i.replace("__NAME__",n);return await new Promise((d,h)=>{Pt.get(u,x=>{let g="";x.on("data",y=>g+=y),x.on("end",()=>{try{const y=JSON.parse(g)[r];y||h(new Error("Error getting version")),d(y)}catch{h(new Error("Could not parse version response"))}})}).on("error",x=>h(x))})},"getDistributionVersion");var rn=Object.defineProperty,on=z((n,r)=>rn(n,"name",{value:r,configurable:!0}),"i");const sn=on(async({alwaysRun:n,debug:r,distTag:i="latest",pkg:u,registryUrl:d="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:h=1e3*60*60*24})=>{const x=Qt(u.name);if(n||!x||x<Date.now()-h){const g=await nn(u.name,i,d);if(Xt(u.name),St(g,u.version))return g;r&&console.error(`Latest version (${g}) not newer than current version (${u.version})`)}else r&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${h}ms but only ${Date.now()-x}ms since last check.`);return null},"hasNewVersion");exports.default=sn;
|
|
1
|
+
"use strict";var Kt=Object.defineProperty;var P=(s,a)=>Kt(s,"name",{value:a,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("node:fs"),Qt=require("@visulima/find-cache-dir"),Xt=require("node:https");var Yt=Object.defineProperty,en=P((s,a)=>Yt(s,"name",{value:a,configurable:!0}),"o$1");const tn=en((s,a)=>{const u=s.split(".").map(Number),f=a.split(".").map(Number);for(const[g,d]of u.entries()){if(d>f[g])return!0;if(d<f[g])return!1}return!1},"semverGt");var nn=Object.defineProperty,rn=P((s,a)=>nn(s,"name",{value:a,configurable:!0}),"$e"),on=Object.defineProperty,V=rn((s,a)=>on(s,"name",{value:a,configurable:!0}),"W"),sn=Object.defineProperty,l=V((s,a)=>sn(s,"name",{value:a,configurable:!0}),"u$1");let xe=l(()=>{var s=(()=>{var a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,d=l((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},"ne"),$=l((e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of f(t))!g.call(e,r)&&r!==n&&a(e,r,{get:l(()=>t[r],"get"),enumerable:!(o=u(t,r))||o.enumerable});return e},"ae"),x=l(e=>$(a({},"__esModule",{value:!0}),e),"oe"),b={};d(b,{zeptomatch:l(()=>de,"zeptomatch")});var K=l(e=>{const t=new Set,n=[e];for(let o=0;o<n.length;o++){const r=n[o];if(t.has(r))continue;t.add(r);const{children:i}=r;if(i?.length)for(let c=0,h=i.length;c<h;c++)n.push(i[c])}return Array.from(t)},"M"),je=l(e=>{let t="";const n=K(e);for(let o=0,r=n.length;o<r;o++){const i=n[o];if(!i.regex)continue;const c=i.regex.flags;if(t||(t=c),t!==c)throw new Error(`Inconsistent RegExp flags used: "${t}" and "${c}"`)}return t},"se"),Q=l((e,t,n)=>{const o=n.get(e);if(o!==void 0)return o;const r=e.partial??t;let i="";if(e.regex&&(i+=r?"(?:$|":"",i+=e.regex.source),e.children?.length){const c=Oe(e.children.map(h=>Q(h,t,n)).filter(Boolean));if(c?.length){const h=e.children.some(N=>!N.regex||!(N.partial??t)),v=c.length>1||r&&(!i.length||h);i+=v?r?"(?:$|":"(?:":"",i+=c.join("|"),i+=v?")":""}}return e.regex&&(i+=r?")":""),n.set(e,i),i},"O"),ke=l((e,t)=>{const n=new Map,o=K(e);for(let r=o.length-1;r>=0;r--){const i=Q(o[r],t,n);if(!(r>0))return i}return""},"ie"),Oe=l(e=>Array.from(new Set(e)),"ue"),q=l((e,t,n)=>q.compile(e,n).test(t),"R");q.compile=(e,t)=>{const n=t?.partial??!1,o=ke(e,n),r=je(e);return new RegExp(`^(?:${o})$`,r)};var Me=q,Ae=l((e,t)=>{const n=Me.compile(e,t),o=`${n.source.slice(0,-1)}[\\\\/]?$`,r=n.flags;return new RegExp(o,r)},"le"),Ee=Ae,ze=l(e=>{const t=e.map(o=>o.source).join("|")||"$^",n=e[0]?.flags;return new RegExp(t,n)},"ve"),Se=ze,X=l(e=>Array.isArray(e),"j"),C=l(e=>typeof e=="function","_"),_e=l(e=>e.length===0,"he"),Pe=(()=>{const{toString:e}=Function.prototype,t=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return n=>(n.length===0||n.length===1)&&t.test(e.call(n))})(),Ce=l(e=>typeof e=="number","de"),Ie=l(e=>typeof e=="object"&&e!==null,"xe"),Ne=l(e=>e instanceof RegExp,"me"),Re=(()=>{const e=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return t=>e.test(t.source)})(),Ue=(()=>{const e=/^[a-zA-Z0-9_-]+$/;return t=>e.test(t.source)&&!t.flags.includes("i")})(),Y=l(e=>typeof e=="string","A"),k=l(e=>e===void 0,"f"),Be=l(e=>{const t=new Map;return n=>{const o=t.get(n);if(o!==void 0)return o;const r=e(n);return t.set(n,r),r}},"ye"),ee=l((e,t,n={})=>{const o={cache:{},input:e,index:0,indexBacktrackMax:0,options:n,output:[]},r=O(t)(o),i=Math.max(o.index,o.indexBacktrackMax);if(r&&o.index===e.length)return o.output;throw new Error(`Failed to parse at index ${i}`)},"I"),p=l((e,t)=>X(e)?Le(e,t):Y(e)?te(e,t):qe(e,t),"i"),Le=l((e,t)=>{const n={};for(const o of e){if(o.length!==1)throw new Error(`Invalid character: "${o}"`);const r=o.charCodeAt(0);n[r]=!0}return o=>{const r=o.input;let i=o.index,c=i;for(;c<r.length&&r.charCodeAt(c)in n;)c+=1;if(c>i){if(!k(t)&&!o.options.silent){const h=r.slice(i,c),v=C(t)?t(h,r,`${i}`):t;k(v)||o.output.push(v)}o.index=c}return!0}},"we"),qe=l((e,t)=>{if(Ue(e))return te(e.source,t);{const n=e.source,o=e.flags.replace(/y|$/,"y"),r=new RegExp(n,o);return Re(e)&&C(t)&&!Pe(t)?We(r,t):Ze(r,t)}},"$e"),We=l((e,t)=>n=>{const o=n.index,r=n.input;e.lastIndex=o;const i=e.exec(r);if(i){const c=e.lastIndex;if(!n.options.silent){const h=t(...i,r,`${o}`);k(h)||n.output.push(h)}return n.index=c,!0}else return!1},"Ee"),Ze=l((e,t)=>n=>{const o=n.index,r=n.input;if(e.lastIndex=o,e.test(r)){const i=e.lastIndex;if(!k(t)&&!n.options.silent){const c=C(t)?t(r.slice(o,i),r,`${o}`):t;k(c)||n.output.push(c)}return n.index=i,!0}else return!1},"Ce"),te=l((e,t)=>n=>{const o=n.index,r=n.input;if(r.startsWith(e,o)){if(!k(t)&&!n.options.silent){const i=C(t)?t(e,r,`${o}`):t;k(i)||n.output.push(i)}return n.index+=e.length,!0}else return!1},"F"),W=l((e,t,n,o)=>{const r=O(e),i=t>1;return D(Z(re(c=>{let h=0;for(;h<n;){const v=c.index;if(!r(c)||(h+=1,c.index===v))break}return h>=t},i),o))},"k"),ne=l((e,t)=>W(e,0,1,t),"L"),L=l((e,t)=>W(e,0,1/0,t),"$"),De=l((e,t)=>W(e,1,1/0,t),"Re"),z=l((e,t)=>{const n=e.map(O);return D(Z(re(o=>{for(let r=0,i=n.length;r<i;r++)if(!n[r](o))return!1;return!0}),t))},"x"),w=l((e,t)=>{const n=e.map(O);return D(Z(o=>{for(let r=0,i=n.length;r<i;r++)if(n[r](o))return!0;return!1},t))},"p"),re=l((e,t=!0,n=!1)=>{const o=O(e);return t?r=>{const i=r.index,c=r.output.length,h=o(r);return!h&&!n&&(r.indexBacktrackMax=Math.max(r.indexBacktrackMax,r.index)),(!h||n)&&(r.index=i,r.output.length!==c&&(r.output.length=c)),h}:o},"q"),Z=l((e,t)=>{const n=O(e);return t?o=>{if(o.options.silent)return n(o);const r=o.output.length;if(n(o)){const i=o.output.splice(r,1/0),c=t(i);return k(c)||o.output.push(c),!0}else return!1}:n},"B"),D=(()=>{let e=0;return t=>{const n=O(t),o=e+=1;return r=>{var i;if(r.options.memoization===!1)return n(r);const c=r.index,h=(i=r.cache)[o]||(i[o]={indexMax:-1,queue:[]}),v=h.queue;if(c<=h.indexMax){const R=h.store||(h.store=new Map);if(v.length){for(let _=0,Tt=v.length;_<Tt;_+=2){const Vt=v[_*2],Ht=v[_*2+1];R.set(Vt,Ht)}v.length=0}const j=R.get(c);if(j===!1)return!1;if(Ce(j))return r.index=j,!0;if(j)return r.index=j.index,j.output?.length&&r.output.push(...j.output),!0}const N=r.output.length,Jt=n(r);if(h.indexMax=Math.max(h.indexMax,c),Jt){const R=r.index,j=r.output.length;if(j>N){const _=r.output.slice(N,j);v.push(c,{index:R,output:_})}else v.push(c,R);return!0}else return v.push(c,!1),!1}}})(),oe=l(e=>{let t;return n=>(t||(t=O(e())),t(n))},"G"),O=Be(e=>{if(C(e))return _e(e)?oe(e):e;if(Y(e)||Ne(e))return p(e);if(X(e))return z(e);if(Ie(e))return w(Object.values(e));throw new Error("Invalid rule")}),A=l(e=>e,"d"),Fe=l(e=>typeof e=="string","ke"),Ge=l(e=>{const t=new WeakMap,n=new WeakMap;return(o,r)=>{const i=r?.partial?n:t,c=i.get(o);if(c!==void 0)return c;const h=e(o,r);return i.set(o,h),h}},"Be"),Je=l(e=>{const t={},n={};return(o,r)=>{const i=r?.partial?n:t;return i[o]??(i[o]=e(o,r))}},"Pe"),Te=p(/\\./,A),Ve=p(/./,A),He=p(/\*\*\*+/,"*"),Ke=p(/([^/{[(!])\*\*/,(e,t)=>`${t}*`),Qe=p(/(^|.)\*\*(?=[^*/)\]}])/,(e,t)=>`${t}*`),Xe=L(w([Te,He,Ke,Qe,Ve])),Ye=Xe,et=l(e=>ee(e,Ye,{memoization:!1}).join(""),"Ie"),tt=et,se="abcdefghijklmnopqrstuvwxyz",nt=l(e=>{let t="";for(;e>0;){const n=(e-1)%26;t=se[n]+t,e=Math.floor((e-1)/26)}return t},"Le"),ae=l(e=>{let t=0;for(let n=0,o=e.length;n<o;n++)t=t*26+se.indexOf(e[n])+1;return t},"V"),F=l((e,t)=>{if(t<e)return F(t,e);const n=[];for(;e<=t;)n.push(e++);return n},"b"),rt=l((e,t,n)=>F(e,t).map(o=>String(o).padStart(n,"0")),"qe"),ue=l((e,t)=>F(ae(e),ae(t)).map(nt),"W"),m=l(e=>({partial:!1,regex:new RegExp(e,"s"),children:[]}),"c"),I=l(e=>({children:e}),"y"),S=(()=>{const e=l((t,n,o)=>{if(o.has(t))return;o.add(t);const{children:r}=t;if(!r.length)r.push(n);else for(let i=0,c=r.length;i<c;i++)e(r[i],n,o)},"e");return t=>{if(!t.length)return I([]);for(let n=t.length-1;n>=1;n--){const o=new Set,r=t[n-1],i=t[n];e(r,i,o)}return t[0]}})(),M=l(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),ot=p(/\\./,m),st=p(/[$.*+?^(){}[\]\|]/,e=>m(`\\${e}`)),at=p(/[\\\/]/,M),ut=p(/[^$.*+?^(){}[\]\|\\\/]+/,m),it=p(/^(?:!!)*!(.*)$/,(e,t)=>m(`(?!^${de.compile(t).source}$).*?`)),lt=p(/^(!!)+/),ct=w([it,lt]),ft=p(/\/(\*\*\/)+/,()=>I([S([M(),m(".+?"),M()]),M()])),pt=p(/^(\*\*\/)+/,()=>I([m("^"),S([m(".*?"),M()])])),ht=p(/\/(\*\*)$/,()=>I([S([M(),m(".*?")]),m("$")])),gt=p(/\*\*/,()=>m(".*?")),ie=w([ft,pt,ht,gt]),dt=p(/\*\/(?!\*\*\/|\*$)/,()=>S([m("[^\\\\/]*?"),M()])),xt=p(/\*/,()=>m("[^\\\\/]*")),le=w([dt,xt]),ce=p("?",()=>m("[^\\\\/]")),mt=p("[",A),$t=p("]",A),vt=p(/[!^]/,"^\\\\/"),yt=p(/[a-z]-[a-z]|[0-9]-[0-9]/i,A),bt=p(/\\./,A),wt=p(/[$.*+?^(){}[\|]/,e=>`\\${e}`),jt=p(/[\\\/]/,"\\\\/"),kt=p(/[^$.*+?^(){}[\]\|\\\/]+/,A),Ot=w([bt,wt,jt,yt,kt]),fe=z([mt,ne(vt),L(Ot),$t],e=>m(e.join(""))),Mt=p("{","(?:"),At=p("}",")"),Et=p(/(\d+)\.\.(\d+)/,(e,t,n)=>rt(+t,+n,Math.min(t.length,n.length)).join("|")),zt=p(/([a-z]+)\.\.([a-z]+)/,(e,t,n)=>ue(t,n).join("|")),St=p(/([A-Z]+)\.\.([A-Z]+)/,(e,t,n)=>ue(t.toLowerCase(),n.toLowerCase()).join("|").toUpperCase()),_t=w([Et,zt,St]),pe=z([Mt,_t,At],e=>m(e.join(""))),Pt=p("{"),Ct=p("}"),It=p(","),Nt=p(/\\./,m),Rt=p(/[$.*+?^(){[\]\|]/,e=>m(`\\${e}`)),Ut=p(/[\\\/]/,M),Bt=p(/[^$.*+?^(){}[\]\|\\\/,]+/,m),Lt=oe(()=>ge),qt=p("",()=>m("(?:)")),Wt=De(w([ie,le,ce,fe,pe,Lt,Nt,Rt,Ut,Bt]),S),he=w([Wt,qt]),ge=z([Pt,ne(z([he,L(z([It,he]))])),Ct],I),Zt=L(w([ct,ie,le,ce,fe,pe,ge,ot,st,at,ut]),S),Dt=Zt,Ft=l(e=>ee(e,Dt,{memoization:!1})[0],"kr"),Gt=Ft,G=l((e,t,n)=>G.compile(e,n).test(t),"N");G.compile=(()=>{const e=Je((n,o)=>Ee(Gt(tt(n)),o)),t=Ge((n,o)=>Se(n.map(r=>e(r,o))));return(n,o)=>Fe(n)?e(n,o):t(n,o)})();var de=G;return x(b)})();return s.default||s},"_lazyMatch"),J;const an=l((s,a)=>(J||(J=xe(),xe=null),J(s,a)),"default");var un=Object.defineProperty,ln=V((s,a)=>un(s,"name",{value:a,configurable:!0}),"t");const cn=/^[A-Z]:\//i,E=ln((s="")=>s&&s.replaceAll("\\","/").replace(cn,a=>a.toUpperCase()),"normalizeWindowsPath");var fn=Object.defineProperty,y=V((s,a)=>fn(s,"name",{value:a,configurable:!0}),"r");const pn=/^[/\\]{2}/,hn=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,$e=/^[A-Z]:$/i,me=/^\/([A-Z]:)?$/i,gn=/.(\.[^./]+)$/,dn=/^[/\\]|^[a-z]:[/\\]/i,xn=y(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),ve=y((s,a)=>{let u="",f=0,g=-1,d=0,$;for(let x=0;x<=s.length;++x){if(x<s.length)$=s[x];else{if($==="/")break;$="/"}if($==="/"){if(!(g===x-1||d===1))if(d===2){if(u.length<2||f!==2||!u.endsWith(".")||u.at(-2)!=="."){if(u.length>2){const b=u.lastIndexOf("/");b===-1?(u="",f=0):(u=u.slice(0,b),f=u.length-1-u.lastIndexOf("/")),g=x,d=0;continue}else if(u.length>0){u="",f=0,g=x,d=0;continue}}a&&(u+=u.length>0?"/..":"..",f=2)}else u.length>0?u+=`/${s.slice(g+1,x)}`:u=s.slice(g+1,x),f=x-g-1;g=x,d=0}else $==="."&&d!==-1?++d:d=-1}return u},"normalizeString"),B=y(s=>hn.test(s),"isAbsolute"),ye=y(function(s){if(s.length===0)return".";s=E(s);const a=pn.exec(s),u=B(s),f=s.at(-1)==="/";return s=ve(s,!u),s.length===0?u?"/":f?"./":".":(f&&(s+="/"),$e.test(s)&&(s+="/"),a?u?`//${s}`:`//./${s}`:u&&!B(s)?`/${s}`:s)},"normalize"),mn=y((...s)=>{let a="";for(const u of s)if(u)if(a.length>0){const f=a[a.length-1]==="/",g=u[0]==="/";f&&g?a+=u.slice(1):a+=f||g?u:`/${u}`}else a+=u;return ye(a)},"join"),T=y(function(...s){s=s.map(f=>E(f));let a="",u=!1;for(let f=s.length-1;f>=-1&&!u;f--){const g=f>=0?s[f]:xn();!g||g.length===0||(a=`${g}/${a}`,u=B(g))}return a=ve(a,!u),u&&!B(a)?`/${a}`:a.length>0?a:"."},"resolve");y(function(s){return E(s)},"toNamespacedPath");const $n=y(function(s){return gn.exec(E(s))?.[1]??""},"extname");y(function(s,a){const u=T(s).replace(me,"$1").split("/"),f=T(a).replace(me,"$1").split("/");if(f[0][1]===":"&&u[0][1]===":"&&u[0]!==f[0])return f.join("/");const g=[...u];for(const d of g){if(f[0]!==d)break;u.shift(),f.shift()}return[...u.map(()=>".."),...f].join("/")},"relative");const be=y(s=>{const a=E(s).replace(/\/$/,"").split("/").slice(0,-1);return a.length===1&&$e.test(a[0])&&(a[0]+="/"),a.join("/")||(B(s)?"/":".")},"dirname");y(function(s){const a=[s.root,s.dir,s.base??s.name+s.ext].filter(Boolean);return E(s.root?T(...a):a.join("/"))},"format");const vn=y((s,a)=>{const u=E(s).split("/").pop();return a&&u.endsWith(a)?u.slice(0,-a.length):u},"basename");y(function(s){const a=dn.exec(s)?.[0]?.replaceAll("\\","/")??"",u=vn(s),f=$n(u);return{base:u,dir:be(s),ext:f,name:u.slice(0,u.length-f.length),root:a}},"parse");y((s,a)=>an(a,ye(s)),"matchesGlob");var yn=Object.defineProperty,H=P((s,a)=>yn(s,"name",{value:a,configurable:!0}),"r");const bn="last-update-check.json",we=H(s=>{const a=Qt.findCacheDirSync(s);if(a===void 0)throw new Error("Could not find cache directory");return mn(a,bn)},"getConfigFile"),wn=H(s=>{const a=we(s);try{if(!U.existsSync(a))return;const{lastUpdateCheck:u}=JSON.parse(U.readFileSync(a,"utf8"));return u}catch{return}},"getLastUpdate"),jn=H(s=>{const a=we(s),u=be(a);U.existsSync(u)||U.mkdirSync(u,{recursive:!0}),U.writeFileSync(a,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var kn=Object.defineProperty,On=P((s,a)=>kn(s,"name",{value:a,configurable:!0}),"g");const Mn=On(async(s,a,u)=>{const f=u.replace("__NAME__",s);return await new Promise((g,d)=>{Xt.get(f,$=>{let x="";$.on("data",b=>x+=b),$.on("end",()=>{try{const b=JSON.parse(x)[a];b||d(new Error("Error getting version")),g(b)}catch{d(new Error("Could not parse version response"))}})}).on("error",$=>d($))})},"getDistributionVersion");var An=Object.defineProperty,En=P((s,a)=>An(s,"name",{value:a,configurable:!0}),"i");const zn=En(async({alwaysRun:s,debug:a,distTag:u="latest",pkg:f,registryUrl:g="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:d=1e3*60*60*24})=>{const $=wn(f.name);if(s||!$||$<Date.now()-d){const x=await Mn(f.name,u,g);if(jn(f.name),tn(x,f.version))return x;a&&console.error(`Latest version (${x}) not newer than current version (${f.version})`)}else a&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${d}ms but only ${Date.now()-$}ms since last check.`);return null},"hasNewVersion");exports.default=zn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var zt=Object.defineProperty;var k=(n,r)=>zt(n,"name",{value:r,configurable:!0});import{createRequire as Pt}from"node:module";import{findCacheDirSync as Ut}from"@visulima/find-cache-dir";const Ct=Pt(import.meta.url),C=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,le=k(n=>{if(typeof C<"u"&&C.versions&&C.versions.node){const[r,s]=C.versions.node.split(".").map(Number);if(r>22||r===22&&s>=3||r===20&&s>=16)return C.getBuiltinModule(n)}return Ct(n)},"__cjs_getBuiltinModule"),{existsSync:fe,mkdirSync:Nt,writeFileSync:St,readFileSync:Et}=le("node:fs"),{get:It}=le("node:https");var Zt=Object.defineProperty,Bt=k((n,r)=>Zt(n,"name",{value:r,configurable:!0}),"o$1");const Lt=Bt((n,r)=>{const s=n.split(".").map(Number),u=r.split(".").map(Number);for(const[d,h]of s.entries()){if(h>u[d])return!0;if(h<u[d])return!1}return!1},"semverGt");var Rt=Object.defineProperty,qt=k((n,r)=>Rt(n,"name",{value:r,configurable:!0}),"ce"),Dt=Object.defineProperty,D=qt((n,r)=>Dt(n,"name",{value:r,configurable:!0}),"C"),Tt=Object.defineProperty,c=D((n,r)=>Tt(n,"name",{value:r,configurable:!0}),"u$1");let ue=c(()=>{var n=(()=>{var r=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,h=c((e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})},"J"),x=c((e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of u(t))!d.call(e,i)&&i!==o&&r(e,i,{get:c(()=>t[i],"get"),enumerable:!(a=s(t,i))||a.enumerable});return e},"T"),g=c(e=>x(r({},"__esModule",{value:!0}),e),"W"),b={};h(b,{zeptomatch:c(()=>_t,"zeptomatch")});var F=c(e=>Array.isArray(e),"k"),z=c(e=>typeof e=="function","x"),xe=c(e=>e.length===0,"K"),ve=(()=>{const{toString:e}=Function.prototype,t=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return o=>(o.length===0||o.length===1)&&t.test(e.call(o))})(),$e=c(e=>typeof e=="number","Y"),be=c(e=>typeof e=="object"&&e!==null,"rr"),ye=c(e=>e instanceof RegExp,"er"),we=(()=>{const e=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return t=>e.test(t.source)})(),je=(()=>{const e=/^[a-zA-Z0-9_-]+$/;return t=>e.test(t.source)&&!t.flags.includes("i")})(),W=c(e=>typeof e=="string","M"),_=c(e=>e===void 0,"f"),_e=c(e=>{const t=new Map;return o=>{const a=t.get(o);if(a!==void 0)return a;const i=e(o);return t.set(o,i),i}},"ar"),Oe=c((e,t,o={})=>{const a={cache:{},input:e,index:0,indexBacktrackMax:0,options:o,output:[]},i=O(t)(a),f=Math.max(a.index,a.indexBacktrackMax);if(i&&a.index===e.length)return a.output;throw new Error(`Failed to parse at index ${f}`)},"or"),l=c((e,t)=>F(e)?ke(e,t):W(e)?J(e,t):Ae(e,t),"o"),ke=c((e,t)=>{const o={};for(const a of e){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const i=a.charCodeAt(0);o[i]=!0}return a=>{const i=a.input;let f=a.index,p=f;for(;p<i.length&&i.charCodeAt(p)in o;)p+=1;if(p>f){if(!_(t)&&!a.options.silent){const m=i.slice(f,p),$=z(t)?t(m,i,`${f}`):t;_($)||a.output.push($)}a.index=p}return!0}},"ir"),Ae=c((e,t)=>{if(je(e))return J(e.source,t);{const o=e.source,a=e.flags.replace(/y|$/,"y"),i=new RegExp(o,a);return we(e)&&z(t)&&!ve(t)?Me(i,t):ze(i,t)}},"ur"),Me=c((e,t)=>o=>{const a=o.index,i=o.input;e.lastIndex=a;const f=e.exec(i);if(f){const p=e.lastIndex;if(!o.options.silent){const m=t(...f,i,`${a}`);_(m)||o.output.push(m)}return o.index=p,!0}else return!1},"sr"),ze=c((e,t)=>o=>{const a=o.index,i=o.input;if(e.lastIndex=a,e.test(i)){const f=e.lastIndex;if(!_(t)&&!o.options.silent){const p=z(t)?t(i.slice(a,f),i,`${a}`):t;_(p)||o.output.push(p)}return o.index=f,!0}else return!1},"cr"),J=c((e,t)=>o=>{const a=o.index,i=o.input;if(i.startsWith(e,a)){if(!_(t)&&!o.options.silent){const f=z(t)?t(e,i,`${a}`):t;_(f)||o.output.push(f)}return o.index+=e.length,!0}else return!1},"R"),G=c((e,t,o,a)=>{const i=O(e),f=t>1;return Z(I(V(p=>{let m=0;for(;m<o;){const $=p.index;if(!i(p)||(m+=1,p.index===$))break}return m>=t},f),a))},"O"),Pe=c((e,t)=>G(e,0,1,t),"lr"),S=c((e,t)=>G(e,0,1/0,t),"m"),E=c((e,t)=>{const o=e.map(O);return Z(I(V(a=>{for(let i=0,f=o.length;i<f;i++)if(!o[i](a))return!1;return!0}),t))},"S"),w=c((e,t)=>{const o=e.map(O);return Z(I(a=>{for(let i=0,f=o.length;i<f;i++)if(o[i](a))return!0;return!1},t))},"p"),V=c((e,t=!0,o=!1)=>{const a=O(e);return t?i=>{const f=i.index,p=i.output.length,m=a(i);return!m&&!o&&(i.indexBacktrackMax=Math.max(i.indexBacktrackMax,i.index)),(!m||o)&&(i.index=f,i.output.length!==p&&(i.output.length=p)),m}:a},"P"),I=c((e,t)=>{const o=O(e);return t?a=>{if(a.options.silent)return o(a);const i=a.output.length;if(o(a)){const f=a.output.splice(i,1/0),p=t(f);return _(p)||a.output.push(p),!0}else return!1}:o},"C"),Z=(()=>{let e=0;return t=>{const o=O(t),a=e+=1;return i=>{var f;if(i.options.memoization===!1)return o(i);const p=i.index,m=(f=i.cache)[a]||(f[a]={indexMax:-1,queue:[]}),$=m.queue;if(p<=m.indexMax){const P=m.store||(m.store=new Map);if($.length){for(let M=0,kt=$.length;M<kt;M+=2){const At=$[M*2],Mt=$[M*2+1];P.set(At,Mt)}$.length=0}const y=P.get(p);if(y===!1)return!1;if($e(y))return i.index=y,!0;if(y)return i.index=y.index,y.output?.length&&i.output.push(...y.output),!0}const ae=i.output.length,Ot=o(i);if(m.indexMax=Math.max(m.indexMax,p),Ot){const P=i.index,y=i.output.length;if(y>ae){const M=i.output.slice(ae,y);$.push(p,{index:P,output:M})}else $.push(p,P);return!0}else return $.push(p,!1),!1}}})(),K=c(e=>{let t;return o=>(t||(t=O(e())),t(o))},"A"),O=_e(e=>{if(z(e))return xe(e)?K(e):e;if(W(e)||ye(e))return l(e);if(F(e))return E(e);if(be(e))return w(Object.values(e));throw new Error("Invalid rule")}),j=c(e=>e,"v"),Y=c(e=>t=>Oe(t,e,{memoization:!1}).join(""),"z"),Ce=c(e=>{const t={};return o=>t[o]??(t[o]=e(o))},"pr"),H="abcdefghijklmnopqrstuvwxyz",Ne=c(e=>{let t="";for(;e>0;){const o=(e-1)%26;t=H[o]+t,e=Math.floor((e-1)/26)}return t},"vr"),Q=c(e=>{let t=0;for(let o=0,a=e.length;o<a;o++)t=t*26+H.indexOf(e[o])+1;return t},"N"),B=c((e,t)=>{if(t<e)return B(t,e);const o=[];for(;e<=t;)o.push(e++);return o},"$"),Se=c((e,t,o)=>B(e,t).map(a=>String(a).padStart(o,"0")),"fr"),X=c((e,t)=>B(Q(e),Q(t)).map(Ne),"j"),L=l(/\\./,j),Ee=l(/[$.*+?^(){}[\]\|]/,e=>`\\${e}`),Ue=l(/[\\/]/,"[\\\\/]"),Ie=l(/./,j),Ze=l(/^(?:!!)*!(.*)$/,(e,t)=>`(?!^${ie(t)}$).*?`),Be=l(/^(!!)+/,""),Le=w([Ze,Be]),Re=l(/\/(\*\*\/)+/,"(?:[\\\\/].+[\\\\/]|[\\\\/])"),qe=l(/^(\*\*\/)+/,"(?:^|.*[\\\\/])"),De=l(/\/(\*\*)$/,"(?:[\\\\/].*|$)"),Te=l(/\*\*/,".*"),ee=w([Re,qe,De,Te]),Fe=l(/\*\/(?!\*\*\/|\*$)/,"[^\\\\/]*[\\\\/]"),We=l(/\*/,"[^\\\\/]*"),te=w([Fe,We]),ne=l("?","[^\\\\/]"),Je=l("[",j),Ge=l("]",j),Ve=l(/[!^]/,"^\\\\/"),Ke=l(/[a-z]-[a-z]|[0-9]-[0-9]/i,j),Ye=l(/[$.*+?^(){}[\|]/,e=>`\\${e}`),He=l(/[^\]]/,j),Qe=w([L,Ye,Ke,He]),re=E([Je,Pe(Ve),S(Qe),Ge]),Xe=l("{","(?:"),et=l("}",")"),tt=l(/(\d+)\.\.(\d+)/,(e,t,o)=>Se(+t,+o,Math.min(t.length,o.length)).join("|")),nt=l(/([a-z]+)\.\.([a-z]+)/,(e,t,o)=>X(t,o).join("|")),rt=l(/([A-Z]+)\.\.([A-Z]+)/,(e,t,o)=>X(t.toLowerCase(),o.toLowerCase()).join("|").toUpperCase()),ot=w([tt,nt,rt]),oe=E([Xe,ot,et]),st=l("{","(?:"),it=l("}",")"),at=l(",","|"),ut=l(/[$.*+?^(){[\]\|]/,e=>`\\${e}`),ct=l(/[^}]/,j),lt=K(()=>se),ft=w([ee,te,ne,re,oe,lt,L,ut,at,ct]),se=E([st,S(ft),it]),pt=S(w([Le,ee,te,ne,re,oe,se,L,Ee,Ue,Ie])),dt=pt,ht=Y(dt),ie=ht,gt=l(/\\./,j),mt=l(/./,j),xt=l(/\*\*\*+/,"*"),vt=l(/([^/{[(!])\*\*/,(e,t)=>`${t}*`),$t=l(/(^|.)\*\*(?=[^*/)\]}])/,(e,t)=>`${t}*`),bt=S(w([gt,xt,vt,$t,mt])),yt=bt,wt=Y(yt),jt=wt,U=c((e,t)=>Array.isArray(e)?e.map(U.compile).some(o=>o.test(t)):U.compile(e).test(t),"_");U.compile=Ce(e=>new RegExp(`^${ie(jt(e))}[\\\\/]?$`,"s"));var _t=U;return g(b)})();return n.default||n},"_lazyMatch"),R;const Ft=c((n,r)=>(R||(R=ue(),ue=null),R(n,r)),"default");var Wt=Object.defineProperty,Jt=D((n,r)=>Wt(n,"name",{value:r,configurable:!0}),"t");const Gt=/^[A-Z]:\//i,A=Jt((n="")=>n&&n.replaceAll("\\","/").replace(Gt,r=>r.toUpperCase()),"normalizeWindowsPath");var Vt=Object.defineProperty,v=D((n,r)=>Vt(n,"name",{value:r,configurable:!0}),"r");const Kt=/^[/\\]{2}/,Yt=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,pe=/^[A-Z]:$/i,ce=/^\/([A-Z]:)?$/i,Ht=/.(\.[^./]+)$/,Qt=/^[/\\]|^[a-z]:[/\\]/i,Xt=v(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),de=v((n,r)=>{let s="",u=0,d=-1,h=0,x;for(let g=0;g<=n.length;++g){if(g<n.length)x=n[g];else{if(x==="/")break;x="/"}if(x==="/"){if(!(d===g-1||h===1))if(h===2){if(s.length<2||u!==2||!s.endsWith(".")||s.at(-2)!=="."){if(s.length>2){const b=s.lastIndexOf("/");b===-1?(s="",u=0):(s=s.slice(0,b),u=s.length-1-s.lastIndexOf("/")),d=g,h=0;continue}else if(s.length>0){s="",u=0,d=g,h=0;continue}}r&&(s+=s.length>0?"/..":"..",u=2)}else s.length>0?s+=`/${n.slice(d+1,g)}`:s=n.slice(d+1,g),u=g-d-1;d=g,h=0}else x==="."&&h!==-1?++h:h=-1}return s},"normalizeString"),N=v(n=>Yt.test(n),"isAbsolute"),he=v(function(n){if(n.length===0)return".";n=A(n);const r=Kt.exec(n),s=N(n),u=n.at(-1)==="/";return n=de(n,!s),n.length===0?s?"/":u?"./":".":(u&&(n+="/"),pe.test(n)&&(n+="/"),r?s?`//${n}`:`//./${n}`:s&&!N(n)?`/${n}`:n)},"normalize"),en=v((...n)=>{let r="";for(const s of n)if(s)if(r.length>0){const u=r[r.length-1]==="/",d=s[0]==="/";u&&d?r+=s.slice(1):r+=u||d?s:`/${s}`}else r+=s;return he(r)},"join"),q=v(function(...n){n=n.map(u=>A(u));let r="",s=!1;for(let u=n.length-1;u>=-1&&!s;u--){const d=u>=0?n[u]:Xt();!d||d.length===0||(r=`${d}/${r}`,s=N(d))}return r=de(r,!s),s&&!N(r)?`/${r}`:r.length>0?r:"."},"resolve");v(function(n){return A(n)},"toNamespacedPath");const tn=v(function(n){return Ht.exec(A(n))?.[1]??""},"extname");v(function(n,r){const s=q(n).replace(ce,"$1").split("/"),u=q(r).replace(ce,"$1").split("/");if(u[0][1]===":"&&s[0][1]===":"&&s[0]!==u[0])return u.join("/");const d=[...s];for(const h of d){if(u[0]!==h)break;s.shift(),u.shift()}return[...s.map(()=>".."),...u].join("/")},"relative");const ge=v(n=>{const r=A(n).replace(/\/$/,"").split("/").slice(0,-1);return r.length===1&&pe.test(r[0])&&(r[0]+="/"),r.join("/")||(N(n)?"/":".")},"dirname");v(function(n){const r=[n.root,n.dir,n.base??n.name+n.ext].filter(Boolean);return A(n.root?q(...r):r.join("/"))},"format");const nn=v((n,r)=>{const s=A(n).split("/").pop();return r&&s.endsWith(r)?s.slice(0,-r.length):s},"basename");v(function(n){const r=Qt.exec(n)?.[0]?.replaceAll("\\","/")??"",s=nn(n),u=tn(s);return{base:s,dir:ge(n),ext:u,name:s.slice(0,s.length-u.length),root:r}},"parse");v((n,r)=>Ft(r,he(n)),"matchesGlob");var rn=Object.defineProperty,T=k((n,r)=>rn(n,"name",{value:r,configurable:!0}),"r");const on="last-update-check.json",me=T(n=>{const r=Ut(n);if(r===void 0)throw new Error("Could not find cache directory");return en(r,on)},"getConfigFile"),sn=T(n=>{const r=me(n);try{if(!fe(r))return;const{lastUpdateCheck:s}=JSON.parse(Et(r,"utf8"));return s}catch{return}},"getLastUpdate"),an=T(n=>{const r=me(n),s=ge(r);fe(s)||Nt(s,{recursive:!0}),St(r,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var un=Object.defineProperty,cn=k((n,r)=>un(n,"name",{value:r,configurable:!0}),"g");const ln=cn(async(n,r,s)=>{const u=s.replace("__NAME__",n);return await new Promise((d,h)=>{It(u,x=>{let g="";x.on("data",b=>g+=b),x.on("end",()=>{try{const b=JSON.parse(g)[r];b||h(new Error("Error getting version")),d(b)}catch{h(new Error("Could not parse version response"))}})}).on("error",x=>h(x))})},"getDistributionVersion");var fn=Object.defineProperty,pn=k((n,r)=>fn(n,"name",{value:r,configurable:!0}),"i");const mn=pn(async({alwaysRun:n,debug:r,distTag:s="latest",pkg:u,registryUrl:d="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:h=1e3*60*60*24})=>{const x=sn(u.name);if(n||!x||x<Date.now()-h){const g=await ln(u.name,s,d);if(an(u.name),Lt(g,u.version))return g;r&&console.error(`Latest version (${g}) not newer than current version (${u.version})`)}else r&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${h}ms but only ${Date.now()-x}ms since last check.`);return null},"hasNewVersion");export{mn as default};
|
|
1
|
+
var Xt=Object.defineProperty;var A=(o,a)=>Xt(o,"name",{value:a,configurable:!0});import{createRequire as Yt}from"node:module";import{findCacheDirSync as on}from"@visulima/find-cache-dir";const en=Yt(import.meta.url),B=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$e=A(o=>{if(typeof B<"u"&&B.versions&&B.versions.node){const[a,i]=B.versions.node.split(".").map(Number);if(a>22||a===22&&i>=3||a===20&&i>=16)return B.getBuiltinModule(o)}return en(o)},"__cjs_getBuiltinModule"),{existsSync:ve,mkdirSync:tn,writeFileSync:nn,readFileSync:rn}=$e("node:fs"),{get:sn}=$e("node:https");var an=Object.defineProperty,cn=A((o,a)=>an(o,"name",{value:a,configurable:!0}),"o$1");const un=cn((o,a)=>{const i=o.split(".").map(Number),f=a.split(".").map(Number);for(const[h,d]of i.entries()){if(d>f[h])return!0;if(d<f[h])return!1}return!1},"semverGt");var ln=Object.defineProperty,fn=A((o,a)=>ln(o,"name",{value:a,configurable:!0}),"$e"),pn=Object.defineProperty,V=fn((o,a)=>pn(o,"name",{value:a,configurable:!0}),"W"),gn=Object.defineProperty,u=V((o,a)=>gn(o,"name",{value:a,configurable:!0}),"u$1");let me=u(()=>{var o=(()=>{var a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,h=Object.prototype.hasOwnProperty,d=u((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},"ne"),$=u((e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of f(t))!h.call(e,r)&&r!==n&&a(e,r,{get:u(()=>t[r],"get"),enumerable:!(s=i(t,r))||s.enumerable});return e},"ae"),m=u(e=>$(a({},"__esModule",{value:!0}),e),"oe"),y={};d(y,{zeptomatch:u(()=>de,"zeptomatch")});var K=u(e=>{const t=new Set,n=[e];for(let s=0;s<n.length;s++){const r=n[s];if(t.has(r))continue;t.add(r);const{children:c}=r;if(c?.length)for(let l=0,g=c.length;l<g;l++)n.push(c[l])}return Array.from(t)},"M"),ke=u(e=>{let t="";const n=K(e);for(let s=0,r=n.length;s<r;s++){const c=n[s];if(!c.regex)continue;const l=c.regex.flags;if(t||(t=l),t!==l)throw new Error(`Inconsistent RegExp flags used: "${t}" and "${l}"`)}return t},"se"),Q=u((e,t,n)=>{const s=n.get(e);if(s!==void 0)return s;const r=e.partial??t;let c="";if(e.regex&&(c+=r?"(?:$|":"",c+=e.regex.source),e.children?.length){const l=Oe(e.children.map(g=>Q(g,t,n)).filter(Boolean));if(l?.length){const g=e.children.some(N=>!N.regex||!(N.partial??t)),v=l.length>1||r&&(!c.length||g);c+=v?r?"(?:$|":"(?:":"",c+=l.join("|"),c+=v?")":""}}return e.regex&&(c+=r?")":""),n.set(e,c),c},"O"),Me=u((e,t)=>{const n=new Map,s=K(e);for(let r=s.length-1;r>=0;r--){const c=Q(s[r],t,n);if(!(r>0))return c}return""},"ie"),Oe=u(e=>Array.from(new Set(e)),"ue"),q=u((e,t,n)=>q.compile(e,n).test(t),"R");q.compile=(e,t)=>{const n=t?.partial??!1,s=Me(e,n),r=ke(e);return new RegExp(`^(?:${s})$`,r)};var Ae=q,Ee=u((e,t)=>{const n=Ae.compile(e,t),s=`${n.source.slice(0,-1)}[\\\\/]?$`,r=n.flags;return new RegExp(s,r)},"le"),ze=Ee,Pe=u(e=>{const t=e.map(s=>s.source).join("|")||"$^",n=e[0]?.flags;return new RegExp(t,n)},"ve"),Se=Pe,X=u(e=>Array.isArray(e),"j"),C=u(e=>typeof e=="function","_"),Ce=u(e=>e.length===0,"he"),Ie=(()=>{const{toString:e}=Function.prototype,t=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return n=>(n.length===0||n.length===1)&&t.test(e.call(n))})(),Ne=u(e=>typeof e=="number","de"),Re=u(e=>typeof e=="object"&&e!==null,"xe"),Be=u(e=>e instanceof RegExp,"me"),Ue=(()=>{const e=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return t=>e.test(t.source)})(),Le=(()=>{const e=/^[a-zA-Z0-9_-]+$/;return t=>e.test(t.source)&&!t.flags.includes("i")})(),Y=u(e=>typeof e=="string","A"),_=u(e=>e===void 0,"f"),qe=u(e=>{const t=new Map;return n=>{const s=t.get(n);if(s!==void 0)return s;const r=e(n);return t.set(n,r),r}},"ye"),ee=u((e,t,n={})=>{const s={cache:{},input:e,index:0,indexBacktrackMax:0,options:n,output:[]},r=k(t)(s),c=Math.max(s.index,s.indexBacktrackMax);if(r&&s.index===e.length)return s.output;throw new Error(`Failed to parse at index ${c}`)},"I"),p=u((e,t)=>X(e)?We(e,t):Y(e)?te(e,t):Ze(e,t),"i"),We=u((e,t)=>{const n={};for(const s of e){if(s.length!==1)throw new Error(`Invalid character: "${s}"`);const r=s.charCodeAt(0);n[r]=!0}return s=>{const r=s.input;let c=s.index,l=c;for(;l<r.length&&r.charCodeAt(l)in n;)l+=1;if(l>c){if(!_(t)&&!s.options.silent){const g=r.slice(c,l),v=C(t)?t(g,r,`${c}`):t;_(v)||s.output.push(v)}s.index=l}return!0}},"we"),Ze=u((e,t)=>{if(Le(e))return te(e.source,t);{const n=e.source,s=e.flags.replace(/y|$/,"y"),r=new RegExp(n,s);return Ue(e)&&C(t)&&!Ie(t)?De(r,t):Fe(r,t)}},"$e"),De=u((e,t)=>n=>{const s=n.index,r=n.input;e.lastIndex=s;const c=e.exec(r);if(c){const l=e.lastIndex;if(!n.options.silent){const g=t(...c,r,`${s}`);_(g)||n.output.push(g)}return n.index=l,!0}else return!1},"Ee"),Fe=u((e,t)=>n=>{const s=n.index,r=n.input;if(e.lastIndex=s,e.test(r)){const c=e.lastIndex;if(!_(t)&&!n.options.silent){const l=C(t)?t(r.slice(s,c),r,`${s}`):t;_(l)||n.output.push(l)}return n.index=c,!0}else return!1},"Ce"),te=u((e,t)=>n=>{const s=n.index,r=n.input;if(r.startsWith(e,s)){if(!_(t)&&!n.options.silent){const c=C(t)?t(e,r,`${s}`):t;_(c)||n.output.push(c)}return n.index+=e.length,!0}else return!1},"F"),W=u((e,t,n,s)=>{const r=k(e),c=t>1;return D(Z(re(l=>{let g=0;for(;g<n;){const v=l.index;if(!r(l)||(g+=1,l.index===v))break}return g>=t},c),s))},"k"),ne=u((e,t)=>W(e,0,1,t),"L"),L=u((e,t)=>W(e,0,1/0,t),"$"),Te=u((e,t)=>W(e,1,1/0,t),"Re"),z=u((e,t)=>{const n=e.map(k);return D(Z(re(s=>{for(let r=0,c=n.length;r<c;r++)if(!n[r](s))return!1;return!0}),t))},"x"),w=u((e,t)=>{const n=e.map(k);return D(Z(s=>{for(let r=0,c=n.length;r<c;r++)if(n[r](s))return!0;return!1},t))},"p"),re=u((e,t=!0,n=!1)=>{const s=k(e);return t?r=>{const c=r.index,l=r.output.length,g=s(r);return!g&&!n&&(r.indexBacktrackMax=Math.max(r.indexBacktrackMax,r.index)),(!g||n)&&(r.index=c,r.output.length!==l&&(r.output.length=l)),g}:s},"q"),Z=u((e,t)=>{const n=k(e);return t?s=>{if(s.options.silent)return n(s);const r=s.output.length;if(n(s)){const c=s.output.splice(r,1/0),l=t(c);return _(l)||s.output.push(l),!0}else return!1}:n},"B"),D=(()=>{let e=0;return t=>{const n=k(t),s=e+=1;return r=>{var c;if(r.options.memoization===!1)return n(r);const l=r.index,g=(c=r.cache)[s]||(c[s]={indexMax:-1,queue:[]}),v=g.queue;if(l<=g.indexMax){const R=g.store||(g.store=new Map);if(v.length){for(let S=0,Ht=v.length;S<Ht;S+=2){const Kt=v[S*2],Qt=v[S*2+1];R.set(Kt,Qt)}v.length=0}const j=R.get(l);if(j===!1)return!1;if(Ne(j))return r.index=j,!0;if(j)return r.index=j.index,j.output?.length&&r.output.push(...j.output),!0}const N=r.output.length,Vt=n(r);if(g.indexMax=Math.max(g.indexMax,l),Vt){const R=r.index,j=r.output.length;if(j>N){const S=r.output.slice(N,j);v.push(l,{index:R,output:S})}else v.push(l,R);return!0}else return v.push(l,!1),!1}}})(),oe=u(e=>{let t;return n=>(t||(t=k(e())),t(n))},"G"),k=qe(e=>{if(C(e))return Ce(e)?oe(e):e;if(Y(e)||Be(e))return p(e);if(X(e))return z(e);if(Re(e))return w(Object.values(e));throw new Error("Invalid rule")}),O=u(e=>e,"d"),Ge=u(e=>typeof e=="string","ke"),Je=u(e=>{const t=new WeakMap,n=new WeakMap;return(s,r)=>{const c=r?.partial?n:t,l=c.get(s);if(l!==void 0)return l;const g=e(s,r);return c.set(s,g),g}},"Be"),Ve=u(e=>{const t={},n={};return(s,r)=>{const c=r?.partial?n:t;return c[s]??(c[s]=e(s,r))}},"Pe"),He=p(/\\./,O),Ke=p(/./,O),Qe=p(/\*\*\*+/,"*"),Xe=p(/([^/{[(!])\*\*/,(e,t)=>`${t}*`),Ye=p(/(^|.)\*\*(?=[^*/)\]}])/,(e,t)=>`${t}*`),et=L(w([He,Qe,Xe,Ye,Ke])),tt=et,nt=u(e=>ee(e,tt,{memoization:!1}).join(""),"Ie"),rt=nt,se="abcdefghijklmnopqrstuvwxyz",ot=u(e=>{let t="";for(;e>0;){const n=(e-1)%26;t=se[n]+t,e=Math.floor((e-1)/26)}return t},"Le"),ae=u(e=>{let t=0;for(let n=0,s=e.length;n<s;n++)t=t*26+se.indexOf(e[n])+1;return t},"V"),F=u((e,t)=>{if(t<e)return F(t,e);const n=[];for(;e<=t;)n.push(e++);return n},"b"),st=u((e,t,n)=>F(e,t).map(s=>String(s).padStart(n,"0")),"qe"),ie=u((e,t)=>F(ae(e),ae(t)).map(ot),"W"),x=u(e=>({partial:!1,regex:new RegExp(e,"s"),children:[]}),"c"),I=u(e=>({children:e}),"y"),P=(()=>{const e=u((t,n,s)=>{if(s.has(t))return;s.add(t);const{children:r}=t;if(!r.length)r.push(n);else for(let c=0,l=r.length;c<l;c++)e(r[c],n,s)},"e");return t=>{if(!t.length)return I([]);for(let n=t.length-1;n>=1;n--){const s=new Set,r=t[n-1],c=t[n];e(r,c,s)}return t[0]}})(),M=u(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),at=p(/\\./,x),it=p(/[$.*+?^(){}[\]\|]/,e=>x(`\\${e}`)),ct=p(/[\\\/]/,M),ut=p(/[^$.*+?^(){}[\]\|\\\/]+/,x),lt=p(/^(?:!!)*!(.*)$/,(e,t)=>x(`(?!^${de.compile(t).source}$).*?`)),ft=p(/^(!!)+/),pt=w([lt,ft]),gt=p(/\/(\*\*\/)+/,()=>I([P([M(),x(".+?"),M()]),M()])),ht=p(/^(\*\*\/)+/,()=>I([x("^"),P([x(".*?"),M()])])),dt=p(/\/(\*\*)$/,()=>I([P([M(),x(".*?")]),x("$")])),mt=p(/\*\*/,()=>x(".*?")),ce=w([gt,ht,dt,mt]),xt=p(/\*\/(?!\*\*\/|\*$)/,()=>P([x("[^\\\\/]*?"),M()])),$t=p(/\*/,()=>x("[^\\\\/]*")),ue=w([xt,$t]),le=p("?",()=>x("[^\\\\/]")),vt=p("[",O),bt=p("]",O),yt=p(/[!^]/,"^\\\\/"),wt=p(/[a-z]-[a-z]|[0-9]-[0-9]/i,O),jt=p(/\\./,O),_t=p(/[$.*+?^(){}[\|]/,e=>`\\${e}`),kt=p(/[\\\/]/,"\\\\/"),Mt=p(/[^$.*+?^(){}[\]\|\\\/]+/,O),Ot=w([jt,_t,kt,wt,Mt]),fe=z([vt,ne(yt),L(Ot),bt],e=>x(e.join(""))),At=p("{","(?:"),Et=p("}",")"),zt=p(/(\d+)\.\.(\d+)/,(e,t,n)=>st(+t,+n,Math.min(t.length,n.length)).join("|")),Pt=p(/([a-z]+)\.\.([a-z]+)/,(e,t,n)=>ie(t,n).join("|")),St=p(/([A-Z]+)\.\.([A-Z]+)/,(e,t,n)=>ie(t.toLowerCase(),n.toLowerCase()).join("|").toUpperCase()),Ct=w([zt,Pt,St]),pe=z([At,Ct,Et],e=>x(e.join(""))),It=p("{"),Nt=p("}"),Rt=p(","),Bt=p(/\\./,x),Ut=p(/[$.*+?^(){[\]\|]/,e=>x(`\\${e}`)),Lt=p(/[\\\/]/,M),qt=p(/[^$.*+?^(){}[\]\|\\\/,]+/,x),Wt=oe(()=>he),Zt=p("",()=>x("(?:)")),Dt=Te(w([ce,ue,le,fe,pe,Wt,Bt,Ut,Lt,qt]),P),ge=w([Dt,Zt]),he=z([It,ne(z([ge,L(z([Rt,ge]))])),Nt],I),Ft=L(w([pt,ce,ue,le,fe,pe,he,at,it,ct,ut]),P),Tt=Ft,Gt=u(e=>ee(e,Tt,{memoization:!1})[0],"kr"),Jt=Gt,T=u((e,t,n)=>T.compile(e,n).test(t),"N");T.compile=(()=>{const e=Ve((n,s)=>ze(Jt(rt(n)),s)),t=Je((n,s)=>Se(n.map(r=>e(r,s))));return(n,s)=>Ge(n)?e(n,s):t(n,s)})();var de=T;return m(y)})();return o.default||o},"_lazyMatch"),G;const hn=u((o,a)=>(G||(G=me(),me=null),G(o,a)),"default");var dn=Object.defineProperty,mn=V((o,a)=>dn(o,"name",{value:a,configurable:!0}),"t");const xn=/^[A-Z]:\//i,E=mn((o="")=>o&&o.replaceAll("\\","/").replace(xn,a=>a.toUpperCase()),"normalizeWindowsPath");var $n=Object.defineProperty,b=V((o,a)=>$n(o,"name",{value:a,configurable:!0}),"r");const vn=/^[/\\]{2}/,bn=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,be=/^[A-Z]:$/i,xe=/^\/([A-Z]:)?$/i,yn=/.(\.[^./]+)$/,wn=/^[/\\]|^[a-z]:[/\\]/i,jn=b(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),ye=b((o,a)=>{let i="",f=0,h=-1,d=0,$;for(let m=0;m<=o.length;++m){if(m<o.length)$=o[m];else{if($==="/")break;$="/"}if($==="/"){if(!(h===m-1||d===1))if(d===2){if(i.length<2||f!==2||!i.endsWith(".")||i.at(-2)!=="."){if(i.length>2){const y=i.lastIndexOf("/");y===-1?(i="",f=0):(i=i.slice(0,y),f=i.length-1-i.lastIndexOf("/")),h=m,d=0;continue}else if(i.length>0){i="",f=0,h=m,d=0;continue}}a&&(i+=i.length>0?"/..":"..",f=2)}else i.length>0?i+=`/${o.slice(h+1,m)}`:i=o.slice(h+1,m),f=m-h-1;h=m,d=0}else $==="."&&d!==-1?++d:d=-1}return i},"normalizeString"),U=b(o=>bn.test(o),"isAbsolute"),we=b(function(o){if(o.length===0)return".";o=E(o);const a=vn.exec(o),i=U(o),f=o.at(-1)==="/";return o=ye(o,!i),o.length===0?i?"/":f?"./":".":(f&&(o+="/"),be.test(o)&&(o+="/"),a?i?`//${o}`:`//./${o}`:i&&!U(o)?`/${o}`:o)},"normalize"),_n=b((...o)=>{let a="";for(const i of o)if(i)if(a.length>0){const f=a[a.length-1]==="/",h=i[0]==="/";f&&h?a+=i.slice(1):a+=f||h?i:`/${i}`}else a+=i;return we(a)},"join"),J=b(function(...o){o=o.map(f=>E(f));let a="",i=!1;for(let f=o.length-1;f>=-1&&!i;f--){const h=f>=0?o[f]:jn();!h||h.length===0||(a=`${h}/${a}`,i=U(h))}return a=ye(a,!i),i&&!U(a)?`/${a}`:a.length>0?a:"."},"resolve");b(function(o){return E(o)},"toNamespacedPath");const kn=b(function(o){return yn.exec(E(o))?.[1]??""},"extname");b(function(o,a){const i=J(o).replace(xe,"$1").split("/"),f=J(a).replace(xe,"$1").split("/");if(f[0][1]===":"&&i[0][1]===":"&&i[0]!==f[0])return f.join("/");const h=[...i];for(const d of h){if(f[0]!==d)break;i.shift(),f.shift()}return[...i.map(()=>".."),...f].join("/")},"relative");const je=b(o=>{const a=E(o).replace(/\/$/,"").split("/").slice(0,-1);return a.length===1&&be.test(a[0])&&(a[0]+="/"),a.join("/")||(U(o)?"/":".")},"dirname");b(function(o){const a=[o.root,o.dir,o.base??o.name+o.ext].filter(Boolean);return E(o.root?J(...a):a.join("/"))},"format");const Mn=b((o,a)=>{const i=E(o).split("/").pop();return a&&i.endsWith(a)?i.slice(0,-a.length):i},"basename");b(function(o){const a=wn.exec(o)?.[0]?.replaceAll("\\","/")??"",i=Mn(o),f=kn(i);return{base:i,dir:je(o),ext:f,name:i.slice(0,i.length-f.length),root:a}},"parse");b((o,a)=>hn(a,we(o)),"matchesGlob");var On=Object.defineProperty,H=A((o,a)=>On(o,"name",{value:a,configurable:!0}),"r");const An="last-update-check.json",_e=H(o=>{const a=on(o);if(a===void 0)throw new Error("Could not find cache directory");return _n(a,An)},"getConfigFile"),En=H(o=>{const a=_e(o);try{if(!ve(a))return;const{lastUpdateCheck:i}=JSON.parse(rn(a,"utf8"));return i}catch{return}},"getLastUpdate"),zn=H(o=>{const a=_e(o),i=je(a);ve(i)||tn(i,{recursive:!0}),nn(a,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var Pn=Object.defineProperty,Sn=A((o,a)=>Pn(o,"name",{value:a,configurable:!0}),"g");const Cn=Sn(async(o,a,i)=>{const f=i.replace("__NAME__",o);return await new Promise((h,d)=>{sn(f,$=>{let m="";$.on("data",y=>m+=y),$.on("end",()=>{try{const y=JSON.parse(m)[a];y||d(new Error("Error getting version")),h(y)}catch{d(new Error("Could not parse version response"))}})}).on("error",$=>d($))})},"getDistributionVersion");var In=Object.defineProperty,Nn=A((o,a)=>In(o,"name",{value:a,configurable:!0}),"i");const Ln=Nn(async({alwaysRun:o,debug:a,distTag:i="latest",pkg:f,registryUrl:h="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:d=1e3*60*60*24})=>{const $=En(f.name);if(o||!$||$<Date.now()-d){const m=await Cn(f.name,i,h);if(zn(f.name),un(m,f.version))return m;a&&console.error(`Latest version (${m}) not newer than current version (${f.version})`)}else a&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${d}ms but only ${Date.now()-$}ms since last check.`);return null},"hasNewVersion");export{Ln as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/cerebro",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.58",
|
|
4
4
|
"description": "A delightful toolkit for building Node-powered CLIs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"command",
|
|
@@ -86,10 +86,10 @@
|
|
|
86
86
|
"LICENSE.md"
|
|
87
87
|
],
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@visulima/boxen": "2.0.
|
|
89
|
+
"@visulima/boxen": "2.0.6",
|
|
90
90
|
"@visulima/colorize": "1.4.25",
|
|
91
91
|
"@visulima/find-cache-dir": "2.0.2",
|
|
92
|
-
"@visulima/pail": "3.0.
|
|
92
|
+
"@visulima/pail": "3.0.2",
|
|
93
93
|
"cli-table3": "^0.6.5",
|
|
94
94
|
"command-line-args": "^6.0.1",
|
|
95
95
|
"fastest-levenshtein": "^1.0.16"
|