@visulima/cerebro 1.1.30 → 1.1.32

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.32](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.31...@visulima/cerebro@1.1.32) (2025-01-12)
2
+
3
+ ### Bug Fixes
4
+
5
+ * updated @visulima/packem, and all other dev dependencies ([7797a1c](https://github.com/visulima/visulima/commit/7797a1c3e6f1fc532895247bd88285a8a9883c40))
6
+
7
+
8
+ ### Dependencies
9
+
10
+ * **@visulima/boxen:** upgraded to 1.0.26
11
+ * **@visulima/colorize:** upgraded to 1.4.17
12
+ * **@visulima/find-cache-dir:** upgraded to 1.0.21
13
+ * **@visulima/pail:** upgraded to 2.1.17
14
+ * **@visulima/path:** upgraded to 1.3.2
15
+
16
+ ## @visulima/cerebro [1.1.31](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.30...@visulima/cerebro@1.1.31) (2025-01-09)
17
+
18
+
19
+ ### Dependencies
20
+
21
+ * **@visulima/pail:** upgraded to 2.1.16
22
+
1
23
  ## @visulima/cerebro [1.1.30](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.29...@visulima/cerebro@1.1.30) (2025-01-08)
2
24
 
3
25
 
package/LICENSE.md CHANGED
@@ -101,42 +101,40 @@ Repository: git+https://github.com/visulima/visulima.git
101
101
  > OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
102
102
  > USE OR OTHER DEALINGS IN THE SOFTWARE.
103
103
  >
104
+ > ---
104
105
  >
106
+ > Bundled zeptomatch (https://github.com/fabiospampinato/zeptomatch)
105
107
  >
106
- > # Licenses of bundled dependencies
107
- > The published @visulima/path artifact additionally contains code with the following licenses:
108
- > ISC, MIT
108
+ > The MIT License (MIT)
109
109
  >
110
- > # Bundled dependencies:
111
- > ## balanced-match
112
- > License: MIT
113
- > By: Julian Gruber
114
- > Repository: git://github.com/juliangruber/balanced-match.git
110
+ > Copyright (c) 2023-present Fabio Spampinato
111
+ >
112
+ > Permission is hereby granted, free of charge, to any person obtaining a
113
+ > copy of this software and associated documentation files (the "Software"),
114
+ > to deal in the Software without restriction, including without limitation
115
+ > the rights to use, copy, modify, merge, publish, distribute, sublicense,
116
+ > and/or sell copies of the Software, and to permit persons to whom the
117
+ > Software is furnished to do so, subject to the following conditions:
118
+ >
119
+ > The above copyright notice and this permission notice shall be included in
120
+ > all copies or substantial portions of the Software.
121
+ >
122
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
123
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
124
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
125
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
126
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
127
+ > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
128
+ > DEALINGS IN THE SOFTWARE.
115
129
  >
116
- > > (MIT)
117
- > >
118
- > > Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
119
- > >
120
- > > Permission is hereby granted, free of charge, to any person obtaining a copy of
121
- > > this software and associated documentation files (the "Software"), to deal in
122
- > > the Software without restriction, including without limitation the rights to
123
- > > use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
124
- > > of the Software, and to permit persons to whom the Software is furnished to do
125
- > > so, subject to the following conditions:
126
- > >
127
- > > The above copyright notice and this permission notice shall be included in all
128
- > > copies or substantial portions of the Software.
129
- > >
130
- > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
131
- > > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
132
- > > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
133
- > > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
134
- > > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
135
- > > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
136
- > > SOFTWARE.
137
130
  >
138
- > ---------------------------------------
139
131
  >
132
+ >
133
+ > # Licenses of bundled dependencies
134
+ > The published @visulima/path artifact additionally contains code with the following licenses:
135
+ > MIT
136
+ >
137
+ > # Bundled dependencies:
140
138
  > ## binary-extensions
141
139
  > License: MIT
142
140
  > By: Sindre Sorhus
@@ -152,58 +150,6 @@ Repository: git+https://github.com/visulima/visulima.git
152
150
  > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
153
151
  > >
154
152
  > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
155
- >
156
- > ---------------------------------------
157
- >
158
- > ## brace-expansion
159
- > License: MIT
160
- > By: Julian Gruber
161
- > Repository: git://github.com/juliangruber/brace-expansion.git
162
- >
163
- > > MIT License
164
- > >
165
- > > Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
166
- > >
167
- > > Permission is hereby granted, free of charge, to any person obtaining a copy
168
- > > of this software and associated documentation files (the "Software"), to deal
169
- > > in the Software without restriction, including without limitation the rights
170
- > > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
171
- > > copies of the Software, and to permit persons to whom the Software is
172
- > > furnished to do so, subject to the following conditions:
173
- > >
174
- > > The above copyright notice and this permission notice shall be included in all
175
- > > copies or substantial portions of the Software.
176
- > >
177
- > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
178
- > > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
179
- > > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
180
- > > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
181
- > > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
182
- > > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
183
- > > SOFTWARE.
184
- >
185
- > ---------------------------------------
186
- >
187
- > ## minimatch
188
- > License: ISC
189
- > By: Isaac Z. Schlueter
190
- > Repository: git://github.com/isaacs/minimatch.git
191
- >
192
- > > The ISC License
193
- > >
194
- > > Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
195
- > >
196
- > > Permission to use, copy, modify, and/or distribute this software for any
197
- > > purpose with or without fee is hereby granted, provided that the above
198
- > > copyright notice and this permission notice appear in all copies.
199
- > >
200
- > > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
201
- > > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
202
- > > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
203
- > > ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
204
- > > WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
205
- > > ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
206
- > > IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
207
153
 
208
154
  ---------------------------------------
209
155
 
package/dist/index.cjs CHANGED
@@ -1 +1,7 @@
1
- "use strict";const e=require("./packem_shared/default-B6w1KajL.cjs");module.exports=e.Cli;
1
+ 'use strict';
2
+
3
+ const _default = require('./packem_shared/default-F355sbNC.cjs');
4
+
5
+
6
+
7
+ module.exports = _default.Cli;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{Cli as f}from"./packem_shared/default-DNNnCan-.mjs";export{f as default};
1
+ export { Cli as default } from './packem_shared/default-E15sg8JS.mjs';
@@ -1,3 +1,378 @@
1
- "use strict";var zt=Object.defineProperty;var v=(s,t)=>zt(s,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("node:fs"),Dt=require("@visulima/find-cache-dir"),Rt=require("node:https");var Gt=Object.defineProperty,Bt=v((s,t)=>Gt(s,"name",{value:t,configurable:!0}),"o$1");const Ut=Bt((s,t)=>{const e=s.split(".").map(Number),i=t.split(".").map(Number);for(const[n,r]of e.entries()){if(r>i[n])return!0;if(r<i[n])return!1}return!1},"semverGt");var _t=Object.defineProperty,x=v((s,t)=>_t(s,"name",{value:t,configurable:!0}),"w"),Ft=Object.defineProperty,y=x((s,t)=>Ft(s,"name",{value:t,configurable:!0}),"y");function Y(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}v(Y,"Y");x(Y,"Wt");y(Y,"getDefaultExportFromCjs");var K,ut;function tt(){if(ut)return K;ut=1;var s=Object.defineProperty,t=y((r,o)=>s(r,"name",{value:o,configurable:!0}),"u");K=e;function e(r,o,a){r instanceof RegExp&&(r=i(r,a)),o instanceof RegExp&&(o=i(o,a));var h=n(r,o,a);return h&&{start:h[0],end:h[1],pre:a.slice(0,h[0]),body:a.slice(h[0]+r.length,h[1]),post:a.slice(h[1]+o.length)}}v(e,"e"),x(e,"e"),y(e,"balanced"),t(e,"balanced");function i(r,o){var a=o.match(r);return a?a[0]:null}v(i,"s"),x(i,"s"),y(i,"maybeMatch"),t(i,"maybeMatch"),e.range=n;function n(r,o,a){var h,c,l,g,u,p=a.indexOf(r),f=a.indexOf(o,p+1),m=p;if(p>=0&&f>0){if(r===o)return[p,f];for(h=[],l=a.length;m>=0&&!u;)m==p?(h.push(m),p=a.indexOf(r,m+1)):h.length==1?u=[h.pop(),f]:(c=h.pop(),c<l&&(l=c,g=f),f=a.indexOf(o,m+1)),m=p<f&&p>=0?p:f;h.length&&(u=[l,g])}return u}return v(n,"i"),x(n,"r"),y(n,"range"),t(n,"range"),K}v(tt,"xt");x(tt,"Ct");y(tt,"requireBalancedMatch");var Q,ft;function et(){if(ft)return Q;ft=1;var s=Object.defineProperty,t=y((d,O)=>s(d,"name",{value:O,configurable:!0}),"o"),e=tt();Q=u;var i="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",a="\0PERIOD"+Math.random()+"\0";function h(d){return parseInt(d,10)==d?parseInt(d,10):d.charCodeAt(0)}v(h,"h"),x(h,"h"),y(h,"numeric"),t(h,"numeric");function c(d){return d.split("\\\\").join(i).split("\\{").join(n).split("\\}").join(r).split("\\,").join(o).split("\\.").join(a)}v(c,"c"),x(c,"c"),y(c,"escapeBraces"),t(c,"escapeBraces");function l(d){return d.split(i).join("\\").split(n).join("{").split(r).join("}").split(o).join(",").split(a).join(".")}v(l,"l"),x(l,"l"),y(l,"unescapeBraces"),t(l,"unescapeBraces");function g(d){if(!d)return[""];var O=[],S=e("{","}",d);if(!S)return d.split(",");var w=S.pre,G=S.body,W=S.post,P=w.split(",");P[P.length-1]+="{"+G+"}";var L=g(W);return W.length&&(P[P.length-1]+=L.shift(),P.push.apply(P,L)),O.push.apply(O,P),O}v(g,"g"),x(g,"g"),y(g,"parseCommaParts"),t(g,"parseCommaParts");function u(d){return d?(d.substr(0,2)==="{}"&&(d="\\{\\}"+d.substr(2)),j(c(d),!0).map(l)):[]}v(u,"u"),x(u,"u"),y(u,"expandTop"),t(u,"expandTop");function p(d){return"{"+d+"}"}v(p,"p"),x(p,"p"),y(p,"embrace"),t(p,"embrace");function f(d){return/^-?0\d/.test(d)}v(f,"f"),x(f,"f"),y(f,"isPadded"),t(f,"isPadded");function m(d,O){return d<=O}v(m,"m"),x(m,"m"),y(m,"lte"),t(m,"lte");function A(d,O){return d>=O}v(A,"O"),x(A,"M"),y(A,"gte"),t(A,"gte");function j(d,O){var S=[],w=e("{","}",d);if(!w)return[d];var G=w.pre,W=w.post.length?j(w.post,!1):[""];if(/\$$/.test(w.pre))for(var P=0;P<W.length;P++){var L=G+"{"+w.body+"}"+W[P];S.push(L)}else{var jt=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(w.body),nt=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(w.body),q=jt||nt,Tt=w.body.indexOf(",")>=0;if(!q&&!Tt)return w.post.match(/,.*\}/)?(d=w.pre+"{"+w.body+r+w.post,j(d)):[d];var $;if(q)$=w.body.split(/\.\./);else if($=g(w.body),$.length===1&&($=j($[0],!1).map(p),$.length===1))return W.map(function(Lt){return w.pre+$[0]+Lt});var z;if(q){var ot=h($[0]),at=h($[1]),Ct=Math.max($[0].length,$[1].length),ht=$.length==3?Math.abs(h($[2])):1,ct=m,kt=at<ot;kt&&(ht*=-1,ct=A);var Wt=$.some(f);z=[];for(var B=ot;ct(B,at);B+=ht){var k;if(nt)k=String.fromCharCode(B),k==="\\"&&(k="");else if(k=String(B),Wt){var lt=Ct-k.length;if(lt>0){var pt=new Array(lt+1).join("0");B<0?k="-"+pt+k.slice(1):k=pt+k}}z.push(k)}}else{z=[];for(var D=0;D<$.length;D++)z.push.apply(z,j($[D],!1))}for(var D=0;D<z.length;D++)for(var P=0;P<W.length;P++){var L=G+z[D]+W[P];(!O||q||L)&&S.push(L)}}return S}return v(j,"$"),x(j,"A"),y(j,"expand"),t(j,"expand"),Q}v(et,"St");x(et,"Rt");y(et,"requireBraceExpansion");var Zt=et();const qt=Y(Zt);var It=Object.defineProperty,Jt=y((s,t)=>It(s,"name",{value:t,configurable:!0}),"r$1");const J=Jt(s=>{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var Ht=Object.defineProperty,H=y((s,t)=>Ht(s,"name",{value:t,configurable:!0}),"p$1");const Vt={"[: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]},U=H(s=>s.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Kt=H(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),gt=H(s=>s.join(""),"rangesToString"),Qt=H((s,t)=>{const e=t;if(s.charAt(e)!=="[")throw new Error("not in a brace expression");const i=[],n=[];let r=e+1,o=!1,a=!1,h=!1,c=!1,l=e,g="";t:for(;r<s.length;){const f=s.charAt(r);if((f==="!"||f==="^")&&r===e+1){c=!0,r++;continue}if(f==="]"&&o&&!h){l=r+1;break}if(o=!0,f==="\\"&&!h){h=!0,r++;continue}if(f==="["&&!h){for(const[m,[A,j,d]]of Object.entries(Vt))if(s.startsWith(m,r)){if(g)return["$.",!1,s.length-e,!0];r+=m.length,d?n.push(A):i.push(A),a=a||j;continue t}}if(h=!1,g){f>g?i.push(U(g)+"-"+U(f)):f===g&&i.push(U(f)),g="",r++;continue}if(s.startsWith("-]",r+1)){i.push(U(f+"-")),r+=2;continue}if(s.startsWith("-",r+1)){g=f,r+=2;continue}i.push(U(f)),r++}if(l<r)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,s.length-e,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!c){const f=i[0].length===2?i[0].slice(-1):i[0];return[Kt(f),!1,l-e,!1]}const u="["+(c?"^":"")+gt(i)+"]",p="["+(c?"":"^")+gt(n)+"]";return[i.length&&n.length?"("+u+"|"+p+")":i.length?u:p,a,l-e,!0]},"parseClass");var Xt=Object.defineProperty,Yt=y((s,t)=>Xt(s,"name",{value:t,configurable:!0}),"a$2");const _=Yt((s,{windowsPathsNoEscape:t=!1}={})=>t?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");var te=Object.defineProperty,st=y((s,t)=>te(s,"name",{value:t,configurable:!0}),"E$1");const ee=new Set(["!","?","+","*","@"]),dt=st(s=>ee.has(s),"isExtglobType"),se="(?!(?:^|/)\\.\\.?(?:$|/))",I="(?!\\.)",ie=new Set(["[","."]),re=new Set(["..","."]),ne=new Set("().*{}+?[]^$\\!"),oe=st(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),it="[^/]",mt=it+"*?",bt=it+"+?";class M{static{v(this,"j")}static{x(this,"O")}static{y(this,"AST")}static{st(this,"AST")}type;#s;#i;#n=!1;#t=[];#e;#o;#h;#a=!1;#r;#c;#p=!1;constructor(t,e,i={}){this.type=t,t&&(this.#i=!0),this.#e=e,this.#s=this.#e?this.#e.#s:this,this.#r=this.#s===this?i:this.#s.#r,this.#h=this.#s===this?[]:this.#s.#h,t==="!"&&!this.#s.#a&&this.#h.push(this),this.#o=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#c=this.#t.map(t=>String(t)).join("")}#f(){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.#h.pop();){if(t.type!=="!")continue;let e=t,i=e.#e;for(;i;){for(let n=e.#o+1;!i.type&&n<i.#t.length;n++)for(const r of t.#t){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(i.#t[n])}e=i,i=e.#e}}return this}push(...t){for(const e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof M&&e.#e===this))throw new Error("invalid part: "+e);this.#t.push(e)}}toJSON(){const 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.#o===0)return!0;const t=this.#e;for(let e=0;e<this.#o;e++){const i=t.#t[e];if(!(i instanceof M&&i.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();const t=this.#e?this.#e.#t.length:0;return this.#o===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const e=new M(this.type,t);for(const i of this.#t)e.copyIn(i);return e}static#l(t,e,i,n){let r=!1,o=!1,a=-1,h=!1;if(e.type===null){let p=i,f="";for(;p<t.length;){const m=t.charAt(p++);if(r||m==="\\"){r=!r,f+=m;continue}if(o){p===a+1?(m==="^"||m==="!")&&(h=!0):m==="]"&&!(p===a+2&&h)&&(o=!1),f+=m;continue}else if(m==="["){o=!0,a=p,h=!1,f+=m;continue}if(!n.noext&&dt(m)&&t.charAt(p)==="("){e.push(f),f="";const A=new M(m,e);p=M.#l(t,A,p,n),e.push(A);continue}f+=m}return e.push(f),p}let c=i+1,l=new M(null,e);const g=[];let u="";for(;c<t.length;){const p=t.charAt(c++);if(r||p==="\\"){r=!r,u+=p;continue}if(o){c===a+1?(p==="^"||p==="!")&&(h=!0):p==="]"&&!(c===a+2&&h)&&(o=!1),u+=p;continue}else if(p==="["){o=!0,a=c,h=!1,u+=p;continue}if(dt(p)&&t.charAt(c)==="("){l.push(u),u="";const f=new M(p,l);l.push(f),c=M.#l(t,f,c,n);continue}if(p==="|"){l.push(u),u="",g.push(l),l=new M(null,e);continue}if(p===")")return u===""&&e.#t.length===0&&(e.#p=!0),l.push(u),u="",e.push(...g,l),c;u+=p}return e.type=null,e.#i=void 0,e.#t=[t.substring(i-1)],c}static fromGlob(t,e={}){const i=new M(null,void 0,e);return M.#l(t,i,0,e),i}toMMPattern(){if(this!==this.#s)return this.#s.toMMPattern();const t=this.toString(),[e,i,n,r]=this.toRegExpSource();if(!(n||this.#i||this.#r.nocase&&!this.#r.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;const o=(this.#r.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#r}toRegExpSource(t){const e=t??!!this.#r.dot;if(this.#s===this&&this.#f(),!this.type){const h=this.isStart()&&this.isEnd(),c=this.#t.map(u=>{const[p,f,m,A]=typeof u=="string"?M.#g(u,this.#i,h):u.toRegExpSource(t);return this.#i=this.#i||m,this.#n=this.#n||A,p}).join("");let l="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&re.has(this.#t[0]))){const u=ie,p=e&&u.has(c.charAt(0))||c.startsWith("\\.")&&u.has(c.charAt(2))||c.startsWith("\\.\\.")&&u.has(c.charAt(4)),f=!e&&!t&&u.has(c.charAt(0));l=p?se:f?I:""}let g="";return this.isEnd()&&this.#s.#a&&this.#e?.type==="!"&&(g="(?:$|\\/)"),[l+c+g,_(c),this.#i=!!this.#i,this.#n]}const i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:";let r=this.#u(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){const h=this.toString();return this.#t=[h],this.type=null,this.#i=void 0,[h,_(this.toString()),!1,!1]}let o=!i||t||e||!I?"":this.#u(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let a="";if(this.type==="!"&&this.#p)a=(this.isStart()&&!e?I:"")+bt;else{const h=this.type==="!"?"))"+(this.isStart()&&!e&&!t?I:"")+mt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=n+r+h}return[a,_(r),this.#i=!!this.#i,this.#n]}#u(t){return this.#t.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[i,n,r,o]=e.toRegExpSource(t);return this.#n=this.#n||o,i}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#g(t,e,i=!1){let n=!1,r="",o=!1;for(let a=0;a<t.length;a++){const h=t.charAt(a);if(n){n=!1,r+=(ne.has(h)?"\\":"")+h;continue}if(h==="\\"){a===t.length-1?r+="\\\\":n=!0;continue}if(h==="["){const[c,l,g,u]=Qt(t,a);if(g){r+=c,o=o||l,a+=g-1,e=e||u;continue}}if(h==="*"){i&&t==="*"?r+=bt:r+=mt,e=!0;continue}if(h==="?"){r+=it,e=!0;continue}r+=oe(h)}return[r,_(t),!!e,o]}}var ae=Object.defineProperty,he=y((s,t)=>ae(s,"name",{value:t,configurable:!0}),"a$1");const ce=he((s,{windowsPathsNoEscape:t=!1}={})=>t?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var le=Object.defineProperty,b=y((s,t)=>le(s,"name",{value:t,configurable:!0}),"h$1");const E=b((s,t,e={})=>(J(t),!e.nocomment&&t.charAt(0)==="#"?!1:new V(t,e).match(s)),"minimatch"),pe=/^\*+([^+@!?\*\[\(]*)$/,ue=b(s=>t=>!t.startsWith(".")&&t.endsWith(s),"starDotExtTest"),fe=b(s=>t=>t.endsWith(s),"starDotExtTestDot"),ge=b(s=>(s=s.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(s)),"starDotExtTestNocase"),de=b(s=>(s=s.toLowerCase(),t=>t.toLowerCase().endsWith(s)),"starDotExtTestNocaseDot"),me=/^\*+\.\*+$/,be=b(s=>!s.startsWith(".")&&s.includes("."),"starDotStarTest"),ye=b(s=>s!=="."&&s!==".."&&s.includes("."),"starDotStarTestDot"),ve=/^\.\*+$/,we=b(s=>s!=="."&&s!==".."&&s.startsWith("."),"dotStarTest"),xe=/^\*+$/,Oe=b(s=>s.length!==0&&!s.startsWith("."),"starTest"),$e=b(s=>s.length!==0&&s!=="."&&s!=="..","starTestDot"),Ee=/^\?+([^+@!?\*\[\(]*)?$/,Se=b(([s,t=""])=>{const e=xt([s]);return t?(t=t.toLowerCase(),i=>e(i)&&i.toLowerCase().endsWith(t)):e},"qmarksTestNocase"),Pe=b(([s,t=""])=>{const e=Ot([s]);return t?(t=t.toLowerCase(),i=>e(i)&&i.toLowerCase().endsWith(t)):e},"qmarksTestNocaseDot"),Me=b(([s,t=""])=>{const e=Ot([s]);return t?i=>e(i)&&i.endsWith(t):e},"qmarksTestDot"),Ae=b(([s,t=""])=>{const e=xt([s]);return t?i=>e(i)&&i.endsWith(t):e},"qmarksTest"),xt=b(([s])=>{const t=s.length;return e=>e.length===t&&!e.startsWith(".")},"qmarksTestNoExt"),Ot=b(([s])=>{const t=s.length;return e=>e.length===t&&e!=="."&&e!==".."},"qmarksTestNoExtDot"),$t=process?process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",yt={win32:{sep:"\\"},posix:{sep:"/"}},Ne=$t==="win32"?yt.win32.sep:yt.posix.sep;E.sep=Ne;const C=Symbol("globstar **");E.GLOBSTAR=C;const je="[^/]",Te=je+"*?",Ce="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ke="(?:(?!(?:\\/|^)\\.).)*?",We=b((s,t={})=>e=>E(e,s,t),"filter");E.filter=We;const T=b((s,t={})=>Object.assign({},s,t),"ext"),Le=b(s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return E;const t=E;return Object.assign(b((e,i,n={})=>t(e,i,T(s,n)),"m"),{Minimatch:class extends t.Minimatch{static{v(this,"Minimatch")}static{x(this,"Minimatch")}static{y(this,"Minimatch")}static{b(this,"Minimatch")}constructor(e,i={}){super(e,T(s,i))}static defaults(e){return t.defaults(T(s,e)).Minimatch}},AST:class extends t.AST{static{v(this,"AST")}static{x(this,"AST")}static{y(this,"AST")}static{b(this,"AST")}constructor(e,i,n={}){super(e,i,T(s,n))}static fromGlob(e,i={}){return t.AST.fromGlob(e,T(s,i))}},unescape:b((e,i={})=>t.unescape(e,T(s,i)),"unescape"),escape:b((e,i={})=>t.escape(e,T(s,i)),"escape"),filter:b((e,i={})=>t.filter(e,T(s,i)),"filter"),defaults:b(e=>t.defaults(T(s,e)),"defaults"),makeRe:b((e,i={})=>t.makeRe(e,T(s,i)),"makeRe"),braceExpand:b((e,i={})=>t.braceExpand(e,T(s,i)),"braceExpand"),match:b((e,i,n={})=>t.match(e,i,T(s,n)),"match"),sep:t.sep,GLOBSTAR:C})},"defaults");E.defaults=Le;const Et=b((s,t={})=>(J(s),t.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:qt(s)),"braceExpand");E.braceExpand=Et;const ze=b((s,t={})=>new V(s,t).makeRe(),"makeRe");E.makeRe=ze;const De=b((s,t,e={})=>{const i=new V(t,e);return s=s.filter(n=>i.match(n)),i.options.nonull&&!s.length&&s.push(t),s},"match");E.match=De;const vt=/[?*]|[+@!]\(.*?\)|\[|\]/,Re=b(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape");class V{static{v(this,"U")}static{x(this,"H")}static{y(this,"Minimatch")}static{b(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){J(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||$t,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!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(const t of this.set)for(const e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){const 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);const i=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((r,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const h=r[0]===""&&r[1]===""&&(r[2]==="?"||!vt.test(r[2]))&&!vt.test(r[3]),c=/^[a-z]:/i.test(r[0]);if(h)return[...r.slice(0,4),...r.slice(4).map(l=>this.parse(l))];if(c)return[r[0],...r.slice(1).map(l=>this.parse(l))]}return r.map(h=>this.parse(h))});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++){const 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 i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");const{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 i=-1;for(;(i=e.indexOf("**",i+1))!==-1;){let n=i;for(;e[n+1]==="**";)n++;n!==i&&e.splice(i,n-i)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((i,n)=>{const r=i[i.length-1];return n==="**"&&r==="**"?i:n===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(i.pop(),i):(i.push(n),i)},[]),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++){const 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 i=0;for(;(i=t.indexOf("..",i+1))!==-1;){const n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(e=!0,t.splice(i-1,2),i-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let o=n;for(;i[o+1]==="**";)o++;o>n&&i.splice(n+1,o-n);let a=i[n+1];const h=i[n+2],c=i[n+3];if(a!==".."||!h||h==="."||h===".."||!c||c==="."||c==="..")continue;e=!0,i.splice(n,1);const l=i.slice(0);l[n]="**",t.push(l),n--}if(!this.preserveMultipleSlashes){for(let o=1;o<i.length-1;o++){const a=i[o];o===1&&a===""&&i[0]===""||(a==="."||a==="")&&(e=!0,i.splice(o,1),o--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(e=!0,i.pop())}let r=0;for(;(r=i.indexOf("..",r+1))!==-1;){const o=i[r-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=!0;const a=r===1&&i[r+1]==="**"?["."]:[];i.splice(r-1,2,...a),i.length===0&&i.push(""),r-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let i=e+1;i<t.length;i++){const n=this.partsMatch(t[e],t[i],!this.preserveMultipleSlashes);if(n){t[e]=[],t[i]=n;break}}return t.filter(e=>e.length)}partsMatch(t,e,i=!1){let n=0,r=0,o=[],a="";for(;n<t.length&&r<e.length;)if(t[n]===e[r])o.push(a==="b"?e[r]:t[n]),n++,r++;else if(i&&t[n]==="**"&&e[r]===t[n+1])o.push(t[n]),n++;else if(i&&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(a==="b")return!1;a="a",o.push(t[n]),n++,r++}else if(e[r]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(a==="a")return!1;a="b",o.push(e[r]),n++,r++}else return!1;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)e=!e,i++;i&&(this.pattern=t.slice(i)),this.negate=e}matchOne(t,e,i=!1){const n=this.options;if(this.isWindows){const m=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),A=!m&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),j=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),d=!j&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),O=A?3:m?0:void 0,S=d?3:j?0:void 0;if(typeof O=="number"&&typeof S=="number"){const[w,G]=[t[O],e[S]];w.toLowerCase()===G.toLowerCase()&&(e[S]=w,S>O?e=e.slice(S):O>S&&(t=t.slice(O)))}}const{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,a=0,h=t.length,c=e.length;o<h&&a<c;o++,a++){this.debug("matchOne loop");var l=e[a],g=t[o];if(this.debug(e,l,g),l===!1)return!1;if(l===C){this.debug("GLOBSTAR",[e,l,g]);var u=o,p=a+1;if(p===c){for(this.debug("** at the end");o<h;o++)if(t[o]==="."||t[o]===".."||!n.dot&&t[o].charAt(0)===".")return!1;return!0}for(;u<h;){var f=t[u];if(this.debug(`
2
- globstar while`,t,u,e,p,f),this.matchOne(t.slice(u),e.slice(p),i))return this.debug("globstar found match!",u,h,f),!0;if(f==="."||f===".."||!n.dot&&f.charAt(0)==="."){this.debug("dot detected!",t,u,e,p);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(i&&(this.debug(`
3
- >>> no match, partial?`,t,u,e,p),u===h))}let m;if(typeof l=="string"?(m=g===l,this.debug("string match",l,g,m)):(m=l.test(g),this.debug("pattern match",l,g,m)),!m)return!1}if(o===h&&a===c)return!0;if(o===h)return i;if(a===c)return o===h-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Et(this.pattern,this.options)}parse(t){J(t);const e=this.options;if(t==="**")return C;if(t==="")return"";let i,n=null;(i=t.match(xe))?n=e.dot?$e:Oe:(i=t.match(pe))?n=(e.nocase?e.dot?de:ge:e.dot?fe:ue)(i[1]):(i=t.match(Ee))?n=(e.nocase?e.dot?Pe:Se:e.dot?Me:Ae)(i):(i=t.match(me))?n=e.dot?ye:be:(i=t.match(ve))&&(n=we);const r=M.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;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,i=e.noglobstar?Te:e.dot?Ce:ke,n=new Set(e.nocase?["i"]:[]);let r=t.map(h=>{const c=h.map(l=>{if(l instanceof RegExp)for(const g of l.flags.split(""))n.add(g);return typeof l=="string"?Re(l):l===C?C:l._src});return c.forEach((l,g)=>{const u=c[g+1],p=c[g-1];l!==C||p===C||(p===void 0?u!==void 0&&u!==C?c[g+1]="(?:\\/|"+i+"\\/)?"+u:c[g]=i:u===void 0?c[g-1]=p+"(?:\\/|"+i+")?":u!==C&&(c[g-1]=p+"(?:\\/|\\/"+i+"\\/)"+u,c[g+1]=C))}),c.filter(l=>l!==C).join("/")}).join("|");const[o,a]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+a+"$",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;const i=this.options;this.isWindows&&(t=t.split("\\").join("/"));const n=this.slashSplit(t);this.debug(this.pattern,"split",n);const r=this.set;this.debug(this.pattern,"set",r);let o=n[n.length-1];if(!o)for(let a=n.length-2;!o&&a>=0;a--)o=n[a];for(let a=0;a<r.length;a++){const h=r[a];let c=n;if(i.matchBase&&h.length===1&&(c=[o]),this.matchOne(c,h,e))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return E.defaults(t).Minimatch}}E.AST=M;E.Minimatch=V;E.escape=ce;E.unescape=_;var Ge=Object.defineProperty,Be=y((s,t)=>Ge(s,"name",{value:t,configurable:!0}),"t");const Ue=/^[A-Z]:\//i,R=Be((s="")=>s&&s.replaceAll("\\","/").replace(Ue,t=>t.toUpperCase()),"normalizeWindowsPath");var _e=Object.defineProperty,N=y((s,t)=>_e(s,"name",{value:t,configurable:!0}),"r");const Fe=/^[/\\]{2}/,Ze=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,St=/^[A-Z]:$/i,wt=/^\/([A-Z]:)?$/i,qe=/.(\.[^./]+)$/,Ie=/^[/\\]|^[a-z]:[/\\]/i,Je=N(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Pt=N((s,t)=>{let e="",i=0,n=-1,r=0,o=null;for(let a=0;a<=s.length;++a){if(a<s.length)o=s[a];else{if(o==="/")break;o="/"}if(o==="/"){if(!(n===a-1||r===1))if(r===2){if(e.length<2||i!==2||!e.endsWith(".")||e.at(-2)!=="."){if(e.length>2){const h=e.lastIndexOf("/");h===-1?(e="",i=0):(e=e.slice(0,h),i=e.length-1-e.lastIndexOf("/")),n=a,r=0;continue}else if(e.length>0){e="",i=0,n=a,r=0;continue}}t&&(e+=e.length>0?"/..":"..",i=2)}else e.length>0?e+=`/${s.slice(n+1,a)}`:e=s.slice(n+1,a),i=a-n-1;n=a,r=0}else o==="."&&r!==-1?++r:r=-1}return e},"normalizeString"),Z=N(s=>Ze.test(s),"isAbsolute"),Mt=N(function(s){if(s.length===0)return".";s=R(s);const t=Fe.exec(s),e=Z(s),i=s.at(-1)==="/";return s=Pt(s,!e),s.length===0?e?"/":i?"./":".":(i&&(s+="/"),St.test(s)&&(s+="/"),t?e?`//${s}`:`//./${s}`:e&&!Z(s)?`/${s}`:s)},"normalize"),He=N((...s)=>{let t="";for(const e of s)if(e)if(t.length>0){const i=t[t.length-1]==="/",n=e[0]==="/";i&&n?t+=e.slice(1):t+=i||n?e:`/${e}`}else t+=e;return Mt(t)},"join"),X=N(function(...s){s=s.map(i=>R(i));let t="",e=!1;for(let i=s.length-1;i>=-1&&!e;i--){const n=i>=0?s[i]:Je();!n||n.length===0||(t=`${n}/${t}`,e=Z(n))}return t=Pt(t,!e),e&&!Z(t)?`/${t}`:t.length>0?t:"."},"resolve");N(function(s){return R(s)},"toNamespacedPath");const Ve=N(function(s){return qe.exec(R(s))?.[1]??""},"extname");N(function(s,t){const e=X(s).replace(wt,"$1").split("/"),i=X(t).replace(wt,"$1").split("/");if(i[0][1]===":"&&e[0][1]===":"&&e[0]!==i[0])return i.join("/");const n=[...e];for(const r of n){if(i[0]!==r)break;e.shift(),i.shift()}return[...e.map(()=>".."),...i].join("/")},"relative");const At=N(s=>{const t=R(s).replace(/\/$/,"").split("/").slice(0,-1);return t.length===1&&St.test(t[0])&&(t[0]+="/"),t.join("/")||(Z(s)?"/":".")},"dirname");N(function(s){const t=[s.root,s.dir,s.base??s.name+s.ext].filter(Boolean);return R(s.root?X(...t):t.join("/"))},"format");const Ke=N((s,t)=>{const e=R(s).split("/").pop();return t&&e.endsWith(t)?e.slice(0,-t.length):e},"basename");N(function(s){const t=Ie.exec(s)?.[0]?.replace(/\\/g,"/")??"",e=Ke(s),i=Ve(e);return{base:e,dir:At(s),ext:i,name:e.slice(0,e.length-i.length),root:t}},"parse");N((s,t)=>E(Mt(s),t,{nocaseMagicOnly:!0,nocomment:!0,nonegate:!0,optimizationLevel:2,windowsPathsNoEscape:!0}),"matchesGlob");var Qe=Object.defineProperty,rt=v((s,t)=>Qe(s,"name",{value:t,configurable:!0}),"r");const Xe="last-update-check.json",Nt=rt(s=>{const t=Dt.findCacheDirSync(s);if(t===void 0)throw new Error("Could not find cache directory");return He(t,Xe)},"getConfigFile"),Ye=rt(s=>{const t=Nt(s);try{if(!F.existsSync(t))return;const{lastUpdateCheck:e}=JSON.parse(F.readFileSync(t,"utf8"));return e}catch{return}},"getLastUpdate"),ts=rt(s=>{const t=Nt(s),e=At(t);F.existsSync(e)||F.mkdirSync(e,{recursive:!0}),F.writeFileSync(t,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var es=Object.defineProperty,ss=v((s,t)=>es(s,"name",{value:t,configurable:!0}),"g");const is=ss(async(s,t,e)=>{const i=e.replace("__NAME__",s);return await new Promise((n,r)=>{Rt.get(i,o=>{let a="";o.on("data",h=>a+=h),o.on("end",()=>{try{const h=JSON.parse(a)[t];h||r(new Error("Error getting version")),n(h)}catch{r(new Error("Could not parse version response"))}})}).on("error",o=>r(o))})},"getDistributionVersion");var rs=Object.defineProperty,ns=v((s,t)=>rs(s,"name",{value:t,configurable:!0}),"i");const os=ns(async({alwaysRun:s,debug:t,distTag:e="latest",pkg:i,registryUrl:n="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:r=1e3*60*60*24})=>{const o=Ye(i.name);if(s||!o||o<Date.now()-r){const a=await is(i.name,e,n);if(ts(i.name),Ut(a,i.version))return a;t&&console.error(`Latest version (${a}) not newer than current version (${i.version})`)}else t&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${r}ms but only ${Date.now()-o}ms since last check.`);return null},"hasNewVersion");exports.default=os;
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const node_fs = require('node:fs');
6
+ const findCacheDir = require('@visulima/find-cache-dir');
7
+ const node_https = require('node:https');
8
+
9
+ var __defProp$4 = Object.defineProperty;
10
+ var __name$4 = (target, value) => __defProp$4(target, "name", { value, configurable: true });
11
+ const semverGt = /* @__PURE__ */ __name$4((version1, version2) => {
12
+ const v1Components = version1.split(".").map(Number);
13
+ const v2Components = version2.split(".").map(Number);
14
+ for (const [index, v1Component] of v1Components.entries()) {
15
+ if (v1Component > v2Components[index]) {
16
+ return true;
17
+ }
18
+ if (v1Component < v2Components[index]) {
19
+ return false;
20
+ }
21
+ }
22
+ return false;
23
+ }, "semverGt");
24
+
25
+ var __defProp$3 = Object.defineProperty;
26
+ var __name$3 = (target, value) => __defProp$3(target, "name", { value, configurable: true });
27
+ var $t = Object.defineProperty;
28
+ var Z = /* @__PURE__ */ __name$3((r, i) => $t(r, "name", { value: i, configurable: true }), "Z");
29
+ var bt = Object.defineProperty;
30
+ var vt = Z((r, i) => bt(r, "name", { value: i, configurable: true }), "t");
31
+ const yt = /^[A-Z]:\//i;
32
+ const w = vt((r = "") => r && r.replaceAll("\\", "/").replace(yt, (i) => i.toUpperCase()), "normalizeWindowsPath");
33
+ var At = Object.defineProperty;
34
+ var s = Z((r, i) => At(r, "name", { value: i, configurable: true }), "u$1");
35
+ let ie = s(() => {
36
+ var r = (() => {
37
+ var i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, p = Object.getOwnPropertyNames, h = Object.prototype.hasOwnProperty, x = s((e, t) => {
38
+ for (var n in t) i(e, n, { get: t[n], enumerable: true });
39
+ }, "q"), A = s((e, t, n, o) => {
40
+ if (t && typeof t == "object" || typeof t == "function") for (let l of p(t)) !h.call(e, l) && l !== n && i(e, l, { get: s(() => t[l], "get"), enumerable: !(o = a(t, l)) || o.enumerable });
41
+ return e;
42
+ }, "H"), g = s((e) => A(i({}, "__esModule", { value: true }), e), "J"), M = {};
43
+ x(M, { zeptomatch: s(() => xt, "zeptomatch") });
44
+ var G = s((e) => Array.isArray(e), "A"), O = s((e) => typeof e == "function", "d"), pe = s((e) => e.length === 0, "Q"), fe = s((e) => typeof e == "number", "W"), he = s((e) => typeof e == "object" && e !== null, "K"), de = s((e) => e instanceof RegExp, "X"), L = s((e) => typeof e == "string", "b"), j = s((e) => e === undefined, "h"), ge = s((e) => {
45
+ const t = /* @__PURE__ */ new Map();
46
+ return (n) => {
47
+ const o = t.get(n);
48
+ if (o) return o;
49
+ const l = e(n);
50
+ return t.set(n, l), l;
51
+ };
52
+ }, "Y"), xe = s((e, t, n = {}) => {
53
+ const o = { cache: {}, input: e, index: 0, indexMax: 0, options: n, output: [] };
54
+ if (y(t)(o) && o.index === e.length) return o.output;
55
+ throw new Error(`Failed to parse at index ${o.indexMax}`);
56
+ }, "rr"), u = s((e, t) => G(e) ? me(e, t) : L(e) ? be(e, t) : $e(e, t), "i"), me = s((e, t) => {
57
+ const n = {};
58
+ for (const o of e) {
59
+ if (o.length !== 1) throw new Error(`Invalid character: "${o}"`);
60
+ const l = o.charCodeAt(0);
61
+ n[l] = true;
62
+ }
63
+ return (o) => {
64
+ const l = o.index, c = o.input;
65
+ for (; o.index < c.length && c.charCodeAt(o.index) in n; ) o.index += 1;
66
+ const f = o.index;
67
+ if (f > l) {
68
+ if (!j(t) && !o.options.silent) {
69
+ const m = o.input.slice(l, f), $ = O(t) ? t(m, c, String(l)) : t;
70
+ j($) || o.output.push($);
71
+ }
72
+ o.indexMax = Math.max(o.indexMax, o.index);
73
+ }
74
+ return true;
75
+ };
76
+ }, "er"), $e = s((e, t) => {
77
+ const n = e.source, o = e.flags.replace(/y|$/, "y"), l = new RegExp(n, o);
78
+ return S((c) => {
79
+ l.lastIndex = c.index;
80
+ const f = l.exec(c.input);
81
+ if (f) {
82
+ if (!j(t) && !c.options.silent) {
83
+ const m = O(t) ? t(...f, c.input, String(c.index)) : t;
84
+ j(m) || c.output.push(m);
85
+ }
86
+ return c.index += f[0].length, c.indexMax = Math.max(c.indexMax, c.index), true;
87
+ } else return false;
88
+ });
89
+ }, "nr"), be = s((e, t) => (n) => {
90
+ if (n.input.startsWith(e, n.index)) {
91
+ if (!j(t) && !n.options.silent) {
92
+ const o = O(t) ? t(e, n.input, String(n.index)) : t;
93
+ j(o) || n.output.push(o);
94
+ }
95
+ return n.index += e.length, n.indexMax = Math.max(n.indexMax, n.index), true;
96
+ } else return false;
97
+ }, "tr"), T = s((e, t, n, o) => {
98
+ const l = y(e);
99
+ return S(E(U((c) => {
100
+ let f = 0;
101
+ for (; f < n; ) {
102
+ const m = c.index;
103
+ if (!l(c) || (f += 1, c.index === m)) break;
104
+ }
105
+ return f >= t;
106
+ }), o));
107
+ }, "C"), ve = s((e, t) => T(e, 0, 1, t), "ar"), _ = s((e, t) => T(e, 0, 1 / 0, t), "f"), P = s((e, t) => {
108
+ const n = e.map(y);
109
+ return S(E(U((o) => {
110
+ for (let l = 0, c = n.length; l < c; l++) if (!n[l](o)) return false;
111
+ return true;
112
+ }), t));
113
+ }, "x"), b = s((e, t) => {
114
+ const n = e.map(y);
115
+ return S(E((o) => {
116
+ for (let l = 0, c = n.length; l < c; l++) if (n[l](o)) return true;
117
+ return false;
118
+ }, t));
119
+ }, "l"), U = s((e, t = false) => {
120
+ const n = y(e);
121
+ return (o) => {
122
+ const l = o.index, c = o.output.length, f = n(o);
123
+ return (!f || t) && (o.index = l, o.output.length !== c && (o.output.length = c)), f;
124
+ };
125
+ }, "M"), E = s((e, t) => {
126
+ const n = y(e);
127
+ return t ? (o) => {
128
+ if (o.options.silent) return n(o);
129
+ const l = o.output.length;
130
+ if (n(o)) {
131
+ const c = o.output.splice(l, 1 / 0), f = t(c);
132
+ return j(f) || o.output.push(f), true;
133
+ } else return false;
134
+ } : n;
135
+ }, "_"), S = /* @__PURE__ */ (() => {
136
+ let e = 0;
137
+ return (t) => {
138
+ const n = y(t), o = e += 1;
139
+ return (l) => {
140
+ var c;
141
+ if (l.options.memoization === false) return n(l);
142
+ const f = l.index, m = (c = l.cache)[o] || (c[o] = /* @__PURE__ */ new Map()), $ = m.get(f);
143
+ if ($ === false) return false;
144
+ if (fe($)) return l.index = $, true;
145
+ if ($) return l.index = $.index, $.output?.length && l.output.push(...$.output), true;
146
+ {
147
+ const ne = l.output.length;
148
+ if (n(l)) {
149
+ const re = l.index, oe = l.output.length;
150
+ if (oe > ne) {
151
+ const mt = l.output.slice(ne, oe);
152
+ m.set(f, { index: re, output: mt });
153
+ } else m.set(f, re);
154
+ return true;
155
+ } else return m.set(f, false), false;
156
+ }
157
+ };
158
+ };
159
+ })(), B = s((e) => {
160
+ let t;
161
+ return (n) => (t || (t = y(e())), t(n));
162
+ }, "E"), y = ge((e) => {
163
+ if (O(e)) return pe(e) ? B(e) : e;
164
+ if (L(e) || de(e)) return u(e);
165
+ if (G(e)) return P(e);
166
+ if (he(e)) return b(Object.values(e));
167
+ throw new Error("Invalid rule");
168
+ }), D = "abcdefghijklmnopqrstuvwxyz", ye = s((e) => {
169
+ let t = "";
170
+ for (; e > 0; ) {
171
+ const n = (e - 1) % 26;
172
+ t = D[n] + t, e = Math.floor((e - 1) / 26);
173
+ }
174
+ return t;
175
+ }, "ir"), F = s((e) => {
176
+ let t = 0;
177
+ for (let n = 0, o = e.length; n < o; n++) t = t * 26 + D.indexOf(e[n]) + 1;
178
+ return t;
179
+ }, "z"), I = s((e, t) => {
180
+ if (t < e) return I(t, e);
181
+ const n = [];
182
+ for (; e <= t; ) n.push(e++);
183
+ return n;
184
+ }, "S"), Ae = s((e, t, n) => I(e, t).map((o) => String(o).padStart(n, "0")), "or"), H = s((e, t) => I(F(e), F(t)).map(ye), "O"), v = s((e) => e, "p"), J = s((e) => je((t) => xe(t, e, { memoization: false }).join("")), "R"), je = s((e) => {
185
+ const t = {};
186
+ return (n) => t[n] ?? (t[n] = e(n));
187
+ }, "ur"), we = u(/^\*\*\/\*$/, ".*"), ze = u(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (e, t, n) => `.*${t ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}`), Me = u(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (e, t, n, o) => `.*${t ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}(?:${o.replaceAll(",", "|").replaceAll(".", "\\.")})`), W = u(/\\./, v), Oe = u(/[$.*+?^(){}[\]\|]/, (e) => `\\${e}`), _e = u(/./, v), Pe = u(/^(?:!!)*!(.*)$/, (e, t) => `(?!^${te(t)}$).*?`), Se = u(/^(!!)+/, ""), Ze = b([Pe, Se]), Ce = u(/\/(\*\*\/)+/, "(?:/.+/|/)"), Ee = u(/^(\*\*\/)+/, "(?:^|.*/)"), Ie = u(/\/(\*\*)$/, "(?:/.*|$)"), We = u(/\*\*/, ".*"), K = b([Ce, Ee, Ie, We]), ke = u(/\*\/(?!\*\*\/)/, "[^/]*/"), Re = u(/\*/, "[^/]*"), Q = b([ke, Re]), X = u("?", "[^/]"), Ne = u("[", v), qe = u("]", v), Ge = u(/[!^]/, "^/"), Le = u(/[a-z]-[a-z]|[0-9]-[0-9]/i, v), Te = u(/[$.*+?^(){}[\|]/, (e) => `\\${e}`), Ue = u(/[^\]]/, v), Be = b([W, Te, Le, Ue]), Y = P([Ne, ve(Ge), _(Be), qe]), De = u("{", "(?:"), Fe = u("}", ")"), He = u(/(\d+)\.\.(\d+)/, (e, t, n) => Ae(+t, +n, Math.min(t.length, n.length)).join("|")), Je = u(/([a-z]+)\.\.([a-z]+)/, (e, t, n) => H(t, n).join("|")), Ke = u(/([A-Z]+)\.\.([A-Z]+)/, (e, t, n) => H(t.toLowerCase(), n.toLowerCase()).join("|").toUpperCase()), Qe = b([He, Je, Ke]), V = P([De, Qe, Fe]), Xe = u("{", "(?:"), Ye = u("}", ")"), Ve = u(",", "|"), et = u(/[$.*+?^(){[\]\|]/, (e) => `\\${e}`), tt = u(/[^}]/, v), nt = B(() => ee), rt = b([K, Q, X, Y, V, nt, W, et, Ve, tt]), ee = P([Xe, _(rt), Ye]), ot = _(b([we, ze, Me, Ze, K, Q, X, Y, V, ee, W, Oe, _e])), it = ot, at = J(it), te = at, lt = u(/\\./, v), st = u(/./, v), ut = u(/\*\*\*+/, "*"), ct = u(/([^/{[(!])\*\*/, (e, t) => `${t}*`), pt = u(/(^|.)\*\*(?=[^*/)\]}])/, (e, t) => `${t}*`), ft = _(b([lt, ut, ct, pt, st])), ht = ft, dt = J(ht), gt = dt, k = s((e, t) => {
188
+ const n = Array.isArray(e) ? e : [e];
189
+ if (!n.length) return false;
190
+ const o = n.map(k.compile), l = n.every((f) => /(\/(?:\*\*)?|\[\/\])$/.test(f)), c = t.replace(/[\\\/]+/g, "/").replace(/\/$/, l ? "/" : "");
191
+ return o.some((f) => f.test(c));
192
+ }, "$");
193
+ k.compile = (e) => new RegExp(`^${te(gt(e))}$`, "s");
194
+ var xt = k;
195
+ return g(M);
196
+ })();
197
+ return r.default || r;
198
+ }, "_lazyMatch");
199
+ let R;
200
+ const jt = s((r, i) => (R || (R = ie(), ie = null), R(r, i)), "default");
201
+ var wt = Object.defineProperty;
202
+ var d = Z((r, i) => wt(r, "name", { value: i, configurable: true }), "r");
203
+ const zt = /^[/\\]{2}/;
204
+ const Mt = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i;
205
+ const le = /^[A-Z]:$/i;
206
+ const ae = /^\/([A-Z]:)?$/i;
207
+ const Ot = /.(\.[^./]+)$/;
208
+ const _t = /^[/\\]|^[a-z]:[/\\]/i;
209
+ const Pt = d(() => typeof process.cwd == "function" ? process.cwd().replaceAll("\\", "/") : "/", "cwd");
210
+ const N = d((r, i) => {
211
+ let a = "", p = 0, h = -1, x = 0, A = null;
212
+ for (let g = 0; g <= r.length; ++g) {
213
+ if (g < r.length) A = r[g];
214
+ else {
215
+ if (A === "/") break;
216
+ A = "/";
217
+ }
218
+ if (A === "/") {
219
+ if (!(h === g - 1 || x === 1)) if (x === 2) {
220
+ if (a.length < 2 || p !== 2 || !a.endsWith(".") || a.at(-2) !== ".") {
221
+ if (a.length > 2) {
222
+ const M = a.lastIndexOf("/");
223
+ M === -1 ? (a = "", p = 0) : (a = a.slice(0, M), p = a.length - 1 - a.lastIndexOf("/")), h = g, x = 0;
224
+ continue;
225
+ } else if (a.length > 0) {
226
+ a = "", p = 0, h = g, x = 0;
227
+ continue;
228
+ }
229
+ }
230
+ i && (a += a.length > 0 ? "/.." : "..", p = 2);
231
+ } else a.length > 0 ? a += `/${r.slice(h + 1, g)}` : a = r.slice(h + 1, g), p = g - h - 1;
232
+ h = g, x = 0;
233
+ } else A === "." && x !== -1 ? ++x : x = -1;
234
+ }
235
+ return a;
236
+ }, "normalizeString");
237
+ const z = d((r) => Mt.test(r), "isAbsolute");
238
+ const q = d(function(r) {
239
+ if (r.length === 0) return ".";
240
+ r = w(r);
241
+ const i = zt.exec(r), a = z(r), p = r.at(-1) === "/";
242
+ return r = N(r, !a), r.length === 0 ? a ? "/" : p ? "./" : "." : (p && (r += "/"), le.test(r) && (r += "/"), i ? a ? `//${r}` : `//./${r}` : a && !z(r) ? `/${r}` : r);
243
+ }, "normalize");
244
+ const Ct = d((...r) => {
245
+ let i = "";
246
+ for (const a of r) if (a) if (i.length > 0) {
247
+ const p = i[i.length - 1] === "/", h = a[0] === "/";
248
+ p && h ? i += a.slice(1) : i += p || h ? a : `/${a}`;
249
+ } else i += a;
250
+ return q(i);
251
+ }, "join");
252
+ const C = d(function(...r) {
253
+ r = r.map((p) => w(p));
254
+ let i = "", a = false;
255
+ for (let p = r.length - 1; p >= -1 && !a; p--) {
256
+ const h = p >= 0 ? r[p] : Pt();
257
+ !h || h.length === 0 || (i = `${h}/${i}`, a = z(h));
258
+ }
259
+ return i = N(i, !a), a && !z(i) ? `/${i}` : i.length > 0 ? i : ".";
260
+ }, "resolve");
261
+ d(function(r) {
262
+ return w(r);
263
+ }, "toNamespacedPath");
264
+ const se = d(function(r) {
265
+ return Ot.exec(w(r))?.[1] ?? "";
266
+ }, "extname");
267
+ d(function(r, i) {
268
+ const a = C(r).replace(ae, "$1").split("/"), p = C(i).replace(ae, "$1").split("/");
269
+ if (p[0][1] === ":" && a[0][1] === ":" && a[0] !== p[0]) return p.join("/");
270
+ const h = [...a];
271
+ for (const x of h) {
272
+ if (p[0] !== x) break;
273
+ a.shift(), p.shift();
274
+ }
275
+ return [...a.map(() => ".."), ...p].join("/");
276
+ }, "relative");
277
+ const ue = d((r) => {
278
+ const i = w(r).replace(/\/$/, "").split("/").slice(0, -1);
279
+ return i.length === 1 && le.test(i[0]) && (i[0] += "/"), i.join("/") || (z(r) ? "/" : ".");
280
+ }, "dirname");
281
+ d(function(r) {
282
+ const i = [r.root, r.dir, r.base ?? r.name + r.ext].filter(Boolean);
283
+ return w(r.root ? C(...i) : i.join("/"));
284
+ }, "format");
285
+ const ce = d((r, i) => {
286
+ const a = w(r).split("/").pop();
287
+ return i && a.endsWith(i) ? a.slice(0, -i.length) : a;
288
+ }, "basename");
289
+ d(function(r) {
290
+ const i = _t.exec(r)?.[0]?.replace(/\\/g, "/") ?? "", a = ce(r), p = se(a);
291
+ return { base: a, dir: ue(r), ext: p, name: a.slice(0, a.length - p.length), root: i };
292
+ }, "parse");
293
+ d((r, i) => jt(i, q(r)), "matchesGlob");
294
+
295
+ var __defProp$2 = Object.defineProperty;
296
+ var __name$2 = (target, value) => __defProp$2(target, "name", { value, configurable: true });
297
+ const FILE_NAME = "last-update-check.json";
298
+ const getConfigFile = /* @__PURE__ */ __name$2((packageName) => {
299
+ const cacheDirectory = findCacheDir.findCacheDirSync(packageName);
300
+ if (cacheDirectory === undefined) {
301
+ throw new Error("Could not find cache directory");
302
+ }
303
+ return Ct(cacheDirectory, FILE_NAME);
304
+ }, "getConfigFile");
305
+ const getLastUpdate = /* @__PURE__ */ __name$2((packageName) => {
306
+ const configFile = getConfigFile(packageName);
307
+ try {
308
+ if (!node_fs.existsSync(configFile)) {
309
+ return undefined;
310
+ }
311
+ const { lastUpdateCheck } = JSON.parse(node_fs.readFileSync(configFile, "utf8"));
312
+ return lastUpdateCheck;
313
+ } catch {
314
+ return undefined;
315
+ }
316
+ }, "getLastUpdate");
317
+ const saveLastUpdate = /* @__PURE__ */ __name$2((packageName) => {
318
+ const configFile = getConfigFile(packageName);
319
+ const configDirectory = ue(configFile);
320
+ if (!node_fs.existsSync(configDirectory)) {
321
+ node_fs.mkdirSync(configDirectory, { recursive: true });
322
+ }
323
+ node_fs.writeFileSync(configFile, JSON.stringify({ lastUpdateCheck: Date.now() }));
324
+ }, "saveLastUpdate");
325
+
326
+ var __defProp$1 = Object.defineProperty;
327
+ var __name$1 = (target, value) => __defProp$1(target, "name", { value, configurable: true });
328
+ const getDistributionVersion = /* @__PURE__ */ __name$1(async (packageName, distributionTag, registryUrl) => {
329
+ const url = registryUrl.replace("__NAME__", packageName);
330
+ return await new Promise((resolve, reject) => {
331
+ node_https.get(url, (message) => {
332
+ let body = "";
333
+ message.on("data", (chunk) => body += chunk);
334
+ message.on("end", () => {
335
+ try {
336
+ const json = JSON.parse(body);
337
+ const version = json[distributionTag];
338
+ if (!version) {
339
+ reject(new Error("Error getting version"));
340
+ }
341
+ resolve(version);
342
+ } catch {
343
+ reject(new Error("Could not parse version response"));
344
+ }
345
+ });
346
+ }).on("error", (error) => reject(error));
347
+ });
348
+ }, "getDistributionVersion");
349
+
350
+ var __defProp = Object.defineProperty;
351
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
352
+ const hasNewVersion = /* @__PURE__ */ __name(async ({
353
+ alwaysRun,
354
+ debug,
355
+ distTag: distributionTag = "latest",
356
+ pkg,
357
+ registryUrl = "https://registry.npmjs.org/-/package/__NAME__/dist-tags",
358
+ updateCheckInterval = 1e3 * 60 * 60 * 24
359
+ }) => {
360
+ const lastUpdateCheck = getLastUpdate(pkg.name);
361
+ if (alwaysRun || !lastUpdateCheck || lastUpdateCheck < Date.now() - updateCheckInterval) {
362
+ const latestVersion = await getDistributionVersion(pkg.name, distributionTag, registryUrl);
363
+ saveLastUpdate(pkg.name);
364
+ if (semverGt(latestVersion, pkg.version)) {
365
+ return latestVersion;
366
+ }
367
+ if (debug) {
368
+ console.error(`Latest version (${latestVersion}) not newer than current version (${pkg.version})`);
369
+ }
370
+ } else if (debug) {
371
+ console.error(
372
+ `Too recent to check for a new update. simpleUpdateNotifier() interval set to ${updateCheckInterval}ms but only ${Date.now() - lastUpdateCheck}ms since last check.`
373
+ );
374
+ }
375
+ return null;
376
+ }, "hasNewVersion");
377
+
378
+ exports.default = hasNewVersion;