@visulima/cerebro 1.1.32 → 1.1.34

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,32 @@
1
+ ## @visulima/cerebro [1.1.34](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.33...@visulima/cerebro@1.1.34) (2025-01-22)
2
+
3
+ ### Styles
4
+
5
+ * cs fixes ([f615a6a](https://github.com/visulima/visulima/commit/f615a6af4c0d4fb9ec054565fe5c93e88df487e9))
6
+
7
+ ### Miscellaneous Chores
8
+
9
+ * updated all dev dependencies and all dependencies in the app folder ([87f4ccb](https://github.com/visulima/visulima/commit/87f4ccbf9f7900ec5b56f3c1477bc4a0ef571bcf))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * **@visulima/boxen:** upgraded to 1.0.28
15
+ * **@visulima/colorize:** upgraded to 1.4.19
16
+ * **@visulima/find-cache-dir:** upgraded to 1.0.23
17
+ * **@visulima/pail:** upgraded to 2.1.19
18
+
19
+ ## @visulima/cerebro [1.1.33](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.32...@visulima/cerebro@1.1.33) (2025-01-13)
20
+
21
+
22
+ ### Dependencies
23
+
24
+ * **@visulima/boxen:** upgraded to 1.0.27
25
+ * **@visulima/colorize:** upgraded to 1.4.18
26
+ * **@visulima/find-cache-dir:** upgraded to 1.0.22
27
+ * **@visulima/pail:** upgraded to 2.1.18
28
+ * **@visulima/path:** upgraded to 1.3.3
29
+
1
30
  ## @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
31
 
3
32
  ### Bug Fixes
@@ -24,273 +24,138 @@ const semverGt = /* @__PURE__ */ __name$4((version1, version2) => {
24
24
 
25
25
  var __defProp$3 = Object.defineProperty;
26
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($);
27
+ var __defProp$2$1 = Object.defineProperty;
28
+ var __name$2$1 = /* @__PURE__ */ __name$3((target, value) => __defProp$2$1(target, "name", { value, configurable: true }), "__name$2");
29
+ const DRIVE_LETTER_START_RE = /^[A-Z]:\//i;
30
+ const normalizeWindowsPath = /* @__PURE__ */ __name$2$1((input = "") => {
31
+ if (!input) {
32
+ return input;
33
+ }
34
+ return input.replaceAll("\\", "/").replace(DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
35
+ }, "normalizeWindowsPath");
36
+ var __defProp2 = Object.defineProperty;
37
+ var __name2 = /* @__PURE__ */ __name$3((target, value) => __defProp2(target, "name", { value, configurable: true }), "__name");
38
+ const UNC_REGEX = /^[/\\]{2}/;
39
+ const IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i;
40
+ const DRIVE_LETTER_RE = /^[A-Z]:$/i;
41
+ const normalizeString = /* @__PURE__ */ __name2((path2, allowAboveRoot) => {
42
+ let result = "";
43
+ let lastSegmentLength = 0;
44
+ let lastSlash = -1;
45
+ let dots = 0;
46
+ let char = null;
47
+ for (let index = 0; index <= path2.length; ++index) {
48
+ if (index < path2.length) {
49
+ char = path2[index];
50
+ } else if (char === "/") {
51
+ break;
52
+ } else {
53
+ char = "/";
54
+ }
55
+ if (char === "/") {
56
+ if (lastSlash === index - 1 || dots === 1) ;
57
+ else if (dots === 2) {
58
+ if (result.length < 2 || lastSegmentLength !== 2 || !result.endsWith(".") || result.at(-2) !== ".") {
59
+ if (result.length > 2) {
60
+ const lastSlashIndex = result.lastIndexOf("/");
61
+ if (lastSlashIndex === -1) {
62
+ result = "";
63
+ lastSegmentLength = 0;
64
+ } else {
65
+ result = result.slice(0, lastSlashIndex);
66
+ lastSegmentLength = result.length - 1 - result.lastIndexOf("/");
67
+ }
68
+ lastSlash = index;
69
+ dots = 0;
70
+ continue;
71
+ } else if (result.length > 0) {
72
+ result = "";
73
+ lastSegmentLength = 0;
74
+ lastSlash = index;
75
+ dots = 0;
76
+ continue;
71
77
  }
72
- o.indexMax = Math.max(o.indexMax, o.index);
73
78
  }
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);
79
+ if (allowAboveRoot) {
80
+ result += result.length > 0 ? "/.." : "..";
81
+ lastSegmentLength = 2;
94
82
  }
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;
83
+ } else {
84
+ if (result.length > 0) {
85
+ result += `/${path2.slice(lastSlash + 1, index)}`;
86
+ } else {
87
+ result = path2.slice(lastSlash + 1, index);
104
88
  }
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);
89
+ lastSegmentLength = index - lastSlash - 1;
173
90
  }
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 = "/";
91
+ lastSlash = index;
92
+ dots = 0;
93
+ } else if (char === "." && dots !== -1) {
94
+ ++dots;
95
+ } else {
96
+ dots = -1;
217
97
  }
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
98
  }
235
- return a;
99
+ return result;
236
100
  }, "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);
101
+ const isAbsolute = /* @__PURE__ */ __name2((path2) => IS_ABSOLUTE_RE.test(path2), "isAbsolute");
102
+ const normalize = /* @__PURE__ */ __name2(function(path2) {
103
+ if (path2.length === 0) {
104
+ return ".";
105
+ }
106
+ path2 = normalizeWindowsPath(path2);
107
+ const isUNCPath = UNC_REGEX.exec(path2);
108
+ const isPathAbsolute = isAbsolute(path2);
109
+ const trailingSeparator = path2.at(-1) === "/";
110
+ path2 = normalizeString(path2, !isPathAbsolute);
111
+ if (path2.length === 0) {
112
+ if (isPathAbsolute) {
113
+ return "/";
114
+ }
115
+ return trailingSeparator ? "./" : ".";
116
+ }
117
+ if (trailingSeparator) {
118
+ path2 += "/";
119
+ }
120
+ if (DRIVE_LETTER_RE.test(path2)) {
121
+ path2 += "/";
122
+ }
123
+ if (isUNCPath) {
124
+ if (!isPathAbsolute) {
125
+ return `//./${path2}`;
126
+ }
127
+ return `//${path2}`;
128
+ }
129
+ return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
243
130
  }, "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));
131
+ const join = /* @__PURE__ */ __name2((...segments) => {
132
+ let path2 = "";
133
+ for (const seg of segments) {
134
+ if (!seg) {
135
+ continue;
136
+ }
137
+ if (path2.length > 0) {
138
+ const pathTrailing = path2[path2.length - 1] === "/";
139
+ const segLeading = seg[0] === "/";
140
+ const both = pathTrailing && segLeading;
141
+ if (both) {
142
+ path2 += seg.slice(1);
143
+ } else {
144
+ path2 += pathTrailing || segLeading ? seg : `/${seg}`;
145
+ }
146
+ } else {
147
+ path2 += seg;
148
+ }
258
149
  }
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();
150
+ return normalize(path2);
151
+ }, "join");
152
+ const dirname = /* @__PURE__ */ __name2((path2) => {
153
+ const segments = normalizeWindowsPath(path2).replace(/\/$/, "").split("/").slice(0, -1);
154
+ if (segments.length === 1 && DRIVE_LETTER_RE.test(segments[0])) {
155
+ segments[0] += "/";
274
156
  }
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) ? "/" : ".");
157
+ return segments.join("/") || (isAbsolute(path2) ? "/" : ".");
280
158
  }, "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
159
 
295
160
  var __defProp$2 = Object.defineProperty;
296
161
  var __name$2 = (target, value) => __defProp$2(target, "name", { value, configurable: true });
@@ -300,7 +165,7 @@ const getConfigFile = /* @__PURE__ */ __name$2((packageName) => {
300
165
  if (cacheDirectory === undefined) {
301
166
  throw new Error("Could not find cache directory");
302
167
  }
303
- return Ct(cacheDirectory, FILE_NAME);
168
+ return join(cacheDirectory, FILE_NAME);
304
169
  }, "getConfigFile");
305
170
  const getLastUpdate = /* @__PURE__ */ __name$2((packageName) => {
306
171
  const configFile = getConfigFile(packageName);
@@ -316,7 +181,7 @@ const getLastUpdate = /* @__PURE__ */ __name$2((packageName) => {
316
181
  }, "getLastUpdate");
317
182
  const saveLastUpdate = /* @__PURE__ */ __name$2((packageName) => {
318
183
  const configFile = getConfigFile(packageName);
319
- const configDirectory = ue(configFile);
184
+ const configDirectory = dirname(configFile);
320
185
  if (!node_fs.existsSync(configDirectory)) {
321
186
  node_fs.mkdirSync(configDirectory, { recursive: true });
322
187
  }
@@ -20,273 +20,138 @@ const semverGt = /* @__PURE__ */ __name$4((version1, version2) => {
20
20
 
21
21
  var __defProp$3 = Object.defineProperty;
22
22
  var __name$3 = (target, value) => __defProp$3(target, "name", { value, configurable: true });
23
- var $t = Object.defineProperty;
24
- var Z = /* @__PURE__ */ __name$3((r, i) => $t(r, "name", { value: i, configurable: true }), "Z");
25
- var bt = Object.defineProperty;
26
- var vt = Z((r, i) => bt(r, "name", { value: i, configurable: true }), "t");
27
- const yt = /^[A-Z]:\//i;
28
- const w = vt((r = "") => r && r.replaceAll("\\", "/").replace(yt, (i) => i.toUpperCase()), "normalizeWindowsPath");
29
- var At = Object.defineProperty;
30
- var s = Z((r, i) => At(r, "name", { value: i, configurable: true }), "u$1");
31
- let ie = s(() => {
32
- var r = (() => {
33
- var i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, p = Object.getOwnPropertyNames, h = Object.prototype.hasOwnProperty, x = s((e, t) => {
34
- for (var n in t) i(e, n, { get: t[n], enumerable: true });
35
- }, "q"), A = s((e, t, n, o) => {
36
- 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 });
37
- return e;
38
- }, "H"), g = s((e) => A(i({}, "__esModule", { value: true }), e), "J"), M = {};
39
- x(M, { zeptomatch: s(() => xt, "zeptomatch") });
40
- 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) => {
41
- const t = /* @__PURE__ */ new Map();
42
- return (n) => {
43
- const o = t.get(n);
44
- if (o) return o;
45
- const l = e(n);
46
- return t.set(n, l), l;
47
- };
48
- }, "Y"), xe = s((e, t, n = {}) => {
49
- const o = { cache: {}, input: e, index: 0, indexMax: 0, options: n, output: [] };
50
- if (y(t)(o) && o.index === e.length) return o.output;
51
- throw new Error(`Failed to parse at index ${o.indexMax}`);
52
- }, "rr"), u = s((e, t) => G(e) ? me(e, t) : L(e) ? be(e, t) : $e(e, t), "i"), me = s((e, t) => {
53
- const n = {};
54
- for (const o of e) {
55
- if (o.length !== 1) throw new Error(`Invalid character: "${o}"`);
56
- const l = o.charCodeAt(0);
57
- n[l] = true;
58
- }
59
- return (o) => {
60
- const l = o.index, c = o.input;
61
- for (; o.index < c.length && c.charCodeAt(o.index) in n; ) o.index += 1;
62
- const f = o.index;
63
- if (f > l) {
64
- if (!j(t) && !o.options.silent) {
65
- const m = o.input.slice(l, f), $ = O(t) ? t(m, c, String(l)) : t;
66
- j($) || o.output.push($);
23
+ var __defProp$2$1 = Object.defineProperty;
24
+ var __name$2$1 = /* @__PURE__ */ __name$3((target, value) => __defProp$2$1(target, "name", { value, configurable: true }), "__name$2");
25
+ const DRIVE_LETTER_START_RE = /^[A-Z]:\//i;
26
+ const normalizeWindowsPath = /* @__PURE__ */ __name$2$1((input = "") => {
27
+ if (!input) {
28
+ return input;
29
+ }
30
+ return input.replaceAll("\\", "/").replace(DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
31
+ }, "normalizeWindowsPath");
32
+ var __defProp2 = Object.defineProperty;
33
+ var __name2 = /* @__PURE__ */ __name$3((target, value) => __defProp2(target, "name", { value, configurable: true }), "__name");
34
+ const UNC_REGEX = /^[/\\]{2}/;
35
+ const IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i;
36
+ const DRIVE_LETTER_RE = /^[A-Z]:$/i;
37
+ const normalizeString = /* @__PURE__ */ __name2((path2, allowAboveRoot) => {
38
+ let result = "";
39
+ let lastSegmentLength = 0;
40
+ let lastSlash = -1;
41
+ let dots = 0;
42
+ let char = null;
43
+ for (let index = 0; index <= path2.length; ++index) {
44
+ if (index < path2.length) {
45
+ char = path2[index];
46
+ } else if (char === "/") {
47
+ break;
48
+ } else {
49
+ char = "/";
50
+ }
51
+ if (char === "/") {
52
+ if (lastSlash === index - 1 || dots === 1) ;
53
+ else if (dots === 2) {
54
+ if (result.length < 2 || lastSegmentLength !== 2 || !result.endsWith(".") || result.at(-2) !== ".") {
55
+ if (result.length > 2) {
56
+ const lastSlashIndex = result.lastIndexOf("/");
57
+ if (lastSlashIndex === -1) {
58
+ result = "";
59
+ lastSegmentLength = 0;
60
+ } else {
61
+ result = result.slice(0, lastSlashIndex);
62
+ lastSegmentLength = result.length - 1 - result.lastIndexOf("/");
63
+ }
64
+ lastSlash = index;
65
+ dots = 0;
66
+ continue;
67
+ } else if (result.length > 0) {
68
+ result = "";
69
+ lastSegmentLength = 0;
70
+ lastSlash = index;
71
+ dots = 0;
72
+ continue;
67
73
  }
68
- o.indexMax = Math.max(o.indexMax, o.index);
69
74
  }
70
- return true;
71
- };
72
- }, "er"), $e = s((e, t) => {
73
- const n = e.source, o = e.flags.replace(/y|$/, "y"), l = new RegExp(n, o);
74
- return S((c) => {
75
- l.lastIndex = c.index;
76
- const f = l.exec(c.input);
77
- if (f) {
78
- if (!j(t) && !c.options.silent) {
79
- const m = O(t) ? t(...f, c.input, String(c.index)) : t;
80
- j(m) || c.output.push(m);
81
- }
82
- return c.index += f[0].length, c.indexMax = Math.max(c.indexMax, c.index), true;
83
- } else return false;
84
- });
85
- }, "nr"), be = s((e, t) => (n) => {
86
- if (n.input.startsWith(e, n.index)) {
87
- if (!j(t) && !n.options.silent) {
88
- const o = O(t) ? t(e, n.input, String(n.index)) : t;
89
- j(o) || n.output.push(o);
75
+ if (allowAboveRoot) {
76
+ result += result.length > 0 ? "/.." : "..";
77
+ lastSegmentLength = 2;
90
78
  }
91
- return n.index += e.length, n.indexMax = Math.max(n.indexMax, n.index), true;
92
- } else return false;
93
- }, "tr"), T = s((e, t, n, o) => {
94
- const l = y(e);
95
- return S(E(U((c) => {
96
- let f = 0;
97
- for (; f < n; ) {
98
- const m = c.index;
99
- if (!l(c) || (f += 1, c.index === m)) break;
79
+ } else {
80
+ if (result.length > 0) {
81
+ result += `/${path2.slice(lastSlash + 1, index)}`;
82
+ } else {
83
+ result = path2.slice(lastSlash + 1, index);
100
84
  }
101
- return f >= t;
102
- }), o));
103
- }, "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) => {
104
- const n = e.map(y);
105
- return S(E(U((o) => {
106
- for (let l = 0, c = n.length; l < c; l++) if (!n[l](o)) return false;
107
- return true;
108
- }), t));
109
- }, "x"), b = s((e, t) => {
110
- const n = e.map(y);
111
- return S(E((o) => {
112
- for (let l = 0, c = n.length; l < c; l++) if (n[l](o)) return true;
113
- return false;
114
- }, t));
115
- }, "l"), U = s((e, t = false) => {
116
- const n = y(e);
117
- return (o) => {
118
- const l = o.index, c = o.output.length, f = n(o);
119
- return (!f || t) && (o.index = l, o.output.length !== c && (o.output.length = c)), f;
120
- };
121
- }, "M"), E = s((e, t) => {
122
- const n = y(e);
123
- return t ? (o) => {
124
- if (o.options.silent) return n(o);
125
- const l = o.output.length;
126
- if (n(o)) {
127
- const c = o.output.splice(l, 1 / 0), f = t(c);
128
- return j(f) || o.output.push(f), true;
129
- } else return false;
130
- } : n;
131
- }, "_"), S = /* @__PURE__ */ (() => {
132
- let e = 0;
133
- return (t) => {
134
- const n = y(t), o = e += 1;
135
- return (l) => {
136
- var c;
137
- if (l.options.memoization === false) return n(l);
138
- const f = l.index, m = (c = l.cache)[o] || (c[o] = /* @__PURE__ */ new Map()), $ = m.get(f);
139
- if ($ === false) return false;
140
- if (fe($)) return l.index = $, true;
141
- if ($) return l.index = $.index, $.output?.length && l.output.push(...$.output), true;
142
- {
143
- const ne = l.output.length;
144
- if (n(l)) {
145
- const re = l.index, oe = l.output.length;
146
- if (oe > ne) {
147
- const mt = l.output.slice(ne, oe);
148
- m.set(f, { index: re, output: mt });
149
- } else m.set(f, re);
150
- return true;
151
- } else return m.set(f, false), false;
152
- }
153
- };
154
- };
155
- })(), B = s((e) => {
156
- let t;
157
- return (n) => (t || (t = y(e())), t(n));
158
- }, "E"), y = ge((e) => {
159
- if (O(e)) return pe(e) ? B(e) : e;
160
- if (L(e) || de(e)) return u(e);
161
- if (G(e)) return P(e);
162
- if (he(e)) return b(Object.values(e));
163
- throw new Error("Invalid rule");
164
- }), D = "abcdefghijklmnopqrstuvwxyz", ye = s((e) => {
165
- let t = "";
166
- for (; e > 0; ) {
167
- const n = (e - 1) % 26;
168
- t = D[n] + t, e = Math.floor((e - 1) / 26);
85
+ lastSegmentLength = index - lastSlash - 1;
169
86
  }
170
- return t;
171
- }, "ir"), F = s((e) => {
172
- let t = 0;
173
- for (let n = 0, o = e.length; n < o; n++) t = t * 26 + D.indexOf(e[n]) + 1;
174
- return t;
175
- }, "z"), I = s((e, t) => {
176
- if (t < e) return I(t, e);
177
- const n = [];
178
- for (; e <= t; ) n.push(e++);
179
- return n;
180
- }, "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) => {
181
- const t = {};
182
- return (n) => t[n] ?? (t[n] = e(n));
183
- }, "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) => {
184
- const n = Array.isArray(e) ? e : [e];
185
- if (!n.length) return false;
186
- const o = n.map(k.compile), l = n.every((f) => /(\/(?:\*\*)?|\[\/\])$/.test(f)), c = t.replace(/[\\\/]+/g, "/").replace(/\/$/, l ? "/" : "");
187
- return o.some((f) => f.test(c));
188
- }, "$");
189
- k.compile = (e) => new RegExp(`^${te(gt(e))}$`, "s");
190
- var xt = k;
191
- return g(M);
192
- })();
193
- return r.default || r;
194
- }, "_lazyMatch");
195
- let R;
196
- const jt = s((r, i) => (R || (R = ie(), ie = null), R(r, i)), "default");
197
- var wt = Object.defineProperty;
198
- var d = Z((r, i) => wt(r, "name", { value: i, configurable: true }), "r");
199
- const zt = /^[/\\]{2}/;
200
- const Mt = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i;
201
- const le = /^[A-Z]:$/i;
202
- const ae = /^\/([A-Z]:)?$/i;
203
- const Ot = /.(\.[^./]+)$/;
204
- const _t = /^[/\\]|^[a-z]:[/\\]/i;
205
- const Pt = d(() => typeof process.cwd == "function" ? process.cwd().replaceAll("\\", "/") : "/", "cwd");
206
- const N = d((r, i) => {
207
- let a = "", p = 0, h = -1, x = 0, A = null;
208
- for (let g = 0; g <= r.length; ++g) {
209
- if (g < r.length) A = r[g];
210
- else {
211
- if (A === "/") break;
212
- A = "/";
87
+ lastSlash = index;
88
+ dots = 0;
89
+ } else if (char === "." && dots !== -1) {
90
+ ++dots;
91
+ } else {
92
+ dots = -1;
213
93
  }
214
- if (A === "/") {
215
- if (!(h === g - 1 || x === 1)) if (x === 2) {
216
- if (a.length < 2 || p !== 2 || !a.endsWith(".") || a.at(-2) !== ".") {
217
- if (a.length > 2) {
218
- const M = a.lastIndexOf("/");
219
- M === -1 ? (a = "", p = 0) : (a = a.slice(0, M), p = a.length - 1 - a.lastIndexOf("/")), h = g, x = 0;
220
- continue;
221
- } else if (a.length > 0) {
222
- a = "", p = 0, h = g, x = 0;
223
- continue;
224
- }
225
- }
226
- i && (a += a.length > 0 ? "/.." : "..", p = 2);
227
- } else a.length > 0 ? a += `/${r.slice(h + 1, g)}` : a = r.slice(h + 1, g), p = g - h - 1;
228
- h = g, x = 0;
229
- } else A === "." && x !== -1 ? ++x : x = -1;
230
94
  }
231
- return a;
95
+ return result;
232
96
  }, "normalizeString");
233
- const z = d((r) => Mt.test(r), "isAbsolute");
234
- const q = d(function(r) {
235
- if (r.length === 0) return ".";
236
- r = w(r);
237
- const i = zt.exec(r), a = z(r), p = r.at(-1) === "/";
238
- 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);
97
+ const isAbsolute = /* @__PURE__ */ __name2((path2) => IS_ABSOLUTE_RE.test(path2), "isAbsolute");
98
+ const normalize = /* @__PURE__ */ __name2(function(path2) {
99
+ if (path2.length === 0) {
100
+ return ".";
101
+ }
102
+ path2 = normalizeWindowsPath(path2);
103
+ const isUNCPath = UNC_REGEX.exec(path2);
104
+ const isPathAbsolute = isAbsolute(path2);
105
+ const trailingSeparator = path2.at(-1) === "/";
106
+ path2 = normalizeString(path2, !isPathAbsolute);
107
+ if (path2.length === 0) {
108
+ if (isPathAbsolute) {
109
+ return "/";
110
+ }
111
+ return trailingSeparator ? "./" : ".";
112
+ }
113
+ if (trailingSeparator) {
114
+ path2 += "/";
115
+ }
116
+ if (DRIVE_LETTER_RE.test(path2)) {
117
+ path2 += "/";
118
+ }
119
+ if (isUNCPath) {
120
+ if (!isPathAbsolute) {
121
+ return `//./${path2}`;
122
+ }
123
+ return `//${path2}`;
124
+ }
125
+ return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
239
126
  }, "normalize");
240
- const Ct = d((...r) => {
241
- let i = "";
242
- for (const a of r) if (a) if (i.length > 0) {
243
- const p = i[i.length - 1] === "/", h = a[0] === "/";
244
- p && h ? i += a.slice(1) : i += p || h ? a : `/${a}`;
245
- } else i += a;
246
- return q(i);
247
- }, "join");
248
- const C = d(function(...r) {
249
- r = r.map((p) => w(p));
250
- let i = "", a = false;
251
- for (let p = r.length - 1; p >= -1 && !a; p--) {
252
- const h = p >= 0 ? r[p] : Pt();
253
- !h || h.length === 0 || (i = `${h}/${i}`, a = z(h));
127
+ const join = /* @__PURE__ */ __name2((...segments) => {
128
+ let path2 = "";
129
+ for (const seg of segments) {
130
+ if (!seg) {
131
+ continue;
132
+ }
133
+ if (path2.length > 0) {
134
+ const pathTrailing = path2[path2.length - 1] === "/";
135
+ const segLeading = seg[0] === "/";
136
+ const both = pathTrailing && segLeading;
137
+ if (both) {
138
+ path2 += seg.slice(1);
139
+ } else {
140
+ path2 += pathTrailing || segLeading ? seg : `/${seg}`;
141
+ }
142
+ } else {
143
+ path2 += seg;
144
+ }
254
145
  }
255
- return i = N(i, !a), a && !z(i) ? `/${i}` : i.length > 0 ? i : ".";
256
- }, "resolve");
257
- d(function(r) {
258
- return w(r);
259
- }, "toNamespacedPath");
260
- const se = d(function(r) {
261
- return Ot.exec(w(r))?.[1] ?? "";
262
- }, "extname");
263
- d(function(r, i) {
264
- const a = C(r).replace(ae, "$1").split("/"), p = C(i).replace(ae, "$1").split("/");
265
- if (p[0][1] === ":" && a[0][1] === ":" && a[0] !== p[0]) return p.join("/");
266
- const h = [...a];
267
- for (const x of h) {
268
- if (p[0] !== x) break;
269
- a.shift(), p.shift();
146
+ return normalize(path2);
147
+ }, "join");
148
+ const dirname = /* @__PURE__ */ __name2((path2) => {
149
+ const segments = normalizeWindowsPath(path2).replace(/\/$/, "").split("/").slice(0, -1);
150
+ if (segments.length === 1 && DRIVE_LETTER_RE.test(segments[0])) {
151
+ segments[0] += "/";
270
152
  }
271
- return [...a.map(() => ".."), ...p].join("/");
272
- }, "relative");
273
- const ue = d((r) => {
274
- const i = w(r).replace(/\/$/, "").split("/").slice(0, -1);
275
- return i.length === 1 && le.test(i[0]) && (i[0] += "/"), i.join("/") || (z(r) ? "/" : ".");
153
+ return segments.join("/") || (isAbsolute(path2) ? "/" : ".");
276
154
  }, "dirname");
277
- d(function(r) {
278
- const i = [r.root, r.dir, r.base ?? r.name + r.ext].filter(Boolean);
279
- return w(r.root ? C(...i) : i.join("/"));
280
- }, "format");
281
- const ce = d((r, i) => {
282
- const a = w(r).split("/").pop();
283
- return i && a.endsWith(i) ? a.slice(0, -i.length) : a;
284
- }, "basename");
285
- d(function(r) {
286
- const i = _t.exec(r)?.[0]?.replace(/\\/g, "/") ?? "", a = ce(r), p = se(a);
287
- return { base: a, dir: ue(r), ext: p, name: a.slice(0, a.length - p.length), root: i };
288
- }, "parse");
289
- d((r, i) => jt(i, q(r)), "matchesGlob");
290
155
 
291
156
  var __defProp$2 = Object.defineProperty;
292
157
  var __name$2 = (target, value) => __defProp$2(target, "name", { value, configurable: true });
@@ -296,7 +161,7 @@ const getConfigFile = /* @__PURE__ */ __name$2((packageName) => {
296
161
  if (cacheDirectory === undefined) {
297
162
  throw new Error("Could not find cache directory");
298
163
  }
299
- return Ct(cacheDirectory, FILE_NAME);
164
+ return join(cacheDirectory, FILE_NAME);
300
165
  }, "getConfigFile");
301
166
  const getLastUpdate = /* @__PURE__ */ __name$2((packageName) => {
302
167
  const configFile = getConfigFile(packageName);
@@ -312,7 +177,7 @@ const getLastUpdate = /* @__PURE__ */ __name$2((packageName) => {
312
177
  }, "getLastUpdate");
313
178
  const saveLastUpdate = /* @__PURE__ */ __name$2((packageName) => {
314
179
  const configFile = getConfigFile(packageName);
315
- const configDirectory = ue(configFile);
180
+ const configDirectory = dirname(configFile);
316
181
  if (!existsSync(configDirectory)) {
317
182
  mkdirSync(configDirectory, { recursive: true });
318
183
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/cerebro",
3
- "version": "1.1.32",
3
+ "version": "1.1.34",
4
4
  "description": "A delightful toolkit for building Node-powered CLIs.",
5
5
  "keywords": [
6
6
  "command",
@@ -86,50 +86,14 @@
86
86
  "LICENSE.md"
87
87
  ],
88
88
  "dependencies": {
89
- "@visulima/boxen": "1.0.26",
90
- "@visulima/colorize": "1.4.17",
91
- "@visulima/find-cache-dir": "1.0.21",
92
- "@visulima/pail": "2.1.17",
89
+ "@visulima/boxen": "1.0.28",
90
+ "@visulima/colorize": "1.4.19",
91
+ "@visulima/find-cache-dir": "1.0.23",
92
+ "@visulima/pail": "2.1.19",
93
93
  "cli-table3": "^0.6.5",
94
94
  "command-line-args": "^6.0.0",
95
95
  "fastest-levenshtein": "^1.0.16"
96
96
  },
97
- "devDependencies": {
98
- "@anolilab/eslint-config": "^15.0.3",
99
- "@anolilab/prettier-config": "^5.0.14",
100
- "@anolilab/semantic-release-pnpm": "^1.1.6",
101
- "@anolilab/semantic-release-preset": "^9.0.3",
102
- "@arethetypeswrong/cli": "^0.17.2",
103
- "@babel/core": "^7.26.0",
104
- "@eslint-types/deprecation": "^2.0.0",
105
- "@eslint-types/import": "^2.29.1",
106
- "@eslint-types/jsdoc": "^48.2.2",
107
- "@eslint-types/typescript-eslint": "^7.5.0",
108
- "@eslint-types/unicorn": "^52.0.0",
109
- "@rushstack/eslint-plugin-security": "^0.8.3",
110
- "@total-typescript/ts-reset": "^0.6.1",
111
- "@types/command-line-args": "^5.2.3",
112
- "@types/node": "18.19.15",
113
- "@visulima/nextra-theme-docs": "4.0.26",
114
- "@visulima/packem": "1.10.7",
115
- "@visulima/path": "1.3.2",
116
- "@vitest/coverage-v8": "^2.1.8",
117
- "camelcase": "8.0.0",
118
- "conventional-changelog-conventionalcommits": "8.0.0",
119
- "cross-env": "^7.0.3",
120
- "esbuild": "0.24.2",
121
- "eslint": "8.57.0",
122
- "eslint-plugin-deprecation": "^3.0.0",
123
- "eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
124
- "eslint-plugin-mdx": "^3.1.5",
125
- "eslint-plugin-vitest": "^0.4.1",
126
- "eslint-plugin-vitest-globals": "^1.5.0",
127
- "prettier": "^3.4.2",
128
- "rimraf": "6.0.1",
129
- "semantic-release": "24.2.1",
130
- "typescript": "5.7.3",
131
- "vitest": "^2.1.8"
132
- },
133
97
  "engines": {
134
98
  "node": ">=18.* <=23.*"
135
99
  },
@@ -141,35 +105,5 @@
141
105
  "publishConfig": {
142
106
  "access": "public",
143
107
  "provenance": true
144
- },
145
- "anolilab": {
146
- "eslint-config": {
147
- "plugin": {
148
- "tsdoc": false,
149
- "etc": false
150
- },
151
- "warn_on_unsupported_typescript_version": false,
152
- "info_on_disabling_jsx_react_rule": false,
153
- "info_on_disabling_prettier_conflict_rule": false,
154
- "info_on_disabling_jsonc_sort_keys_rule": false,
155
- "info_on_disabling_etc_no_deprecated": false
156
- }
157
- },
158
- "scripts": {
159
- "build": "cross-env NODE_ENV=development packem build",
160
- "build:prod": "cross-env NODE_ENV=production packem build",
161
- "clean": "rimraf node_modules dist .eslintcache",
162
- "dev": "pnpm run build --watch",
163
- "lint:attw": "attw --pack",
164
- "lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs",
165
- "lint:eslint:fix": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs --fix",
166
- "lint:package-json": "publint --strict",
167
- "lint:prettier": "prettier --config=.prettierrc.cjs --check .",
168
- "lint:prettier:fix": "prettier --config=.prettierrc.cjs --write .",
169
- "lint:types": "tsc --noEmit --project tsconfig.json",
170
- "test": "vitest run",
171
- "test:coverage": "vitest run --coverage",
172
- "test:ui": "vitest --ui --coverage.enabled=true",
173
- "test:watch": "vitest"
174
108
  }
175
109
  }