@visulima/cerebro 1.1.12 → 1.1.14

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,37 @@
1
+ ## @visulima/cerebro [1.1.14](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.13...@visulima/cerebro@1.1.14) (2024-08-04)
2
+
3
+
4
+ ### Dependencies
5
+
6
+ * **@visulima/boxen:** upgraded to 1.0.13
7
+ * **@visulima/colorize:** upgraded to 1.4.5
8
+ * **@visulima/find-cache-dir:** upgraded to 1.0.5
9
+ * **@visulima/pail:** upgraded to 2.1.3
10
+ * **@visulima/path:** upgraded to 1.0.4
11
+
12
+ ## @visulima/cerebro [1.1.13](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.12...@visulima/cerebro@1.1.13) (2024-08-01)
13
+
14
+ ### Bug Fixes
15
+
16
+ * upgraded @visulima/packem ([dc0cb57](https://github.com/visulima/visulima/commit/dc0cb5701b30f3f81404346c909fd4daf891b894))
17
+
18
+ ### Styles
19
+
20
+ * cs fixes ([6f727ec](https://github.com/visulima/visulima/commit/6f727ec36437384883ca4b764d920cf03ffe44df))
21
+
22
+ ### Miscellaneous Chores
23
+
24
+ * updated dev dependencies ([ac67ec1](https://github.com/visulima/visulima/commit/ac67ec1bcba16175d225958e318199f60b10d179))
25
+
26
+
27
+ ### Dependencies
28
+
29
+ * **@visulima/boxen:** upgraded to 1.0.12
30
+ * **@visulima/colorize:** upgraded to 1.4.4
31
+ * **@visulima/find-cache-dir:** upgraded to 1.0.4
32
+ * **@visulima/pail:** upgraded to 2.1.2
33
+ * **@visulima/path:** upgraded to 1.0.3
34
+
1
35
  ## @visulima/cerebro [1.1.12](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.11...@visulima/cerebro@1.1.12) (2024-07-22)
2
36
 
3
37
 
package/LICENSE.md CHANGED
@@ -100,6 +100,183 @@ Repository: git+https://github.com/visulima/visulima.git
100
100
  > DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
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
+ >
104
+ > <!-- DEPENDENCIES -->
105
+ >
106
+ > # Licenses of bundled dependencies
107
+ > The published @visulima/path artifact additionally contains code with the following licenses:
108
+ > MIT
109
+ >
110
+ > # Bundled dependencies:
111
+ > ## binary-extensions
112
+ > License: MIT
113
+ > By: Sindre Sorhus
114
+ > Repository: sindresorhus/binary-extensions
115
+ >
116
+ > > MIT License
117
+ > >
118
+ > > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
119
+ > > Copyright (c) Paul Miller (https://paulmillr.com)
120
+ > >
121
+ > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
122
+ > >
123
+ > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
124
+ > >
125
+ > > 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.
126
+ >
127
+ > <!-- DEPENDENCIES -->
128
+ >
129
+ > <!-- TYPE_DEPENDENCIES -->
130
+ > <!-- TYPE_DEPENDENCIES -->
131
+
132
+ ---------------------------------------
133
+
134
+ ## camelcase
135
+ License: MIT
136
+ By: Sindre Sorhus
137
+ Repository: sindresorhus/camelcase
138
+
139
+ > MIT License
140
+ >
141
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
142
+ >
143
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
144
+ >
145
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
146
+ >
147
+ > 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.
148
+
149
+ <!-- DEPENDENCIES -->
150
+ >
151
+ > # Licenses of bundled dependencies
152
+ > The published @visulima/path artifact additionally contains code with the following licenses:
153
+ > MIT
154
+ >
155
+ > # Bundled dependencies:
156
+ > ## binary-extensions
157
+ > License: MIT
158
+ > By: Sindre Sorhus
159
+ > Repository: sindresorhus/binary-extensions
160
+ >
161
+ > > MIT License
162
+ > >
163
+ > > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
164
+ > > Copyright (c) Paul Miller (https://paulmillr.com)
165
+ > >
166
+ > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
167
+ > >
168
+ > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
169
+ > >
170
+ > > 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.
171
+ >
172
+ > <!-- DEPENDENCIES -->
173
+
174
+ # Licenses of bundled dependencies
175
+ The published @visulima/cerebro artifact additionally contains code with the following licenses:
176
+ MIT
177
+
178
+ # Bundled dependencies:
179
+ ## @visulima/path
180
+ License: MIT
181
+ By: Daniel Bannert
182
+ Repository: git+https://github.com/visulima/visulima.git
183
+
184
+ > MIT License
185
+ >
186
+ > Copyright (c) 2024 visulima
187
+ >
188
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
189
+ > of this software and associated documentation files (the "Software"), to deal
190
+ > in the Software without restriction, including without limitation the rights
191
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
192
+ > copies of the Software, and to permit persons to whom the Software is
193
+ > furnished to do so, subject to the following conditions:
194
+ >
195
+ > The above copyright notice and this permission notice shall be included in all
196
+ > copies or substantial portions of the Software.
197
+ >
198
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
199
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
200
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
201
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
202
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
203
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
204
+ > SOFTWARE.
205
+ >
206
+ > ---
207
+ >
208
+ > MIT License
209
+ >
210
+ > Copyright (c) Pooya Parsa <pooya@pi0.io> - Daniel Roe <daniel@roe.dev>
211
+ >
212
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
213
+ > of this software and associated documentation files (the "Software"), to deal
214
+ > in the Software without restriction, including without limitation the rights
215
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
216
+ > copies of the Software, and to permit persons to whom the Software is
217
+ > furnished to do so, subject to the following conditions:
218
+ >
219
+ > The above copyright notice and this permission notice shall be included in all
220
+ > copies or substantial portions of the Software.
221
+ >
222
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
223
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
224
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
225
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
226
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
227
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
228
+ > SOFTWARE.
229
+ >
230
+ > ---
231
+ >
232
+ > Copyright Joyent, Inc. and other Node contributors.
233
+ >
234
+ > Permission is hereby granted, free of charge, to any person obtaining a
235
+ > copy of this software and associated documentation files (the
236
+ > "Software"), to deal in the Software without restriction, including
237
+ > without limitation the rights to use, copy, modify, merge, publish,
238
+ > distribute, sublicense, and/or sell copies of the Software, and to permit
239
+ > persons to whom the Software is furnished to do so, subject to the
240
+ > following conditions:
241
+ >
242
+ > The above copyright notice and this permission notice shall be included
243
+ > in all copies or substantial portions of the Software.
244
+ >
245
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
246
+ > OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
247
+ > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
248
+ > NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
249
+ > DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
250
+ > OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
251
+ > USE OR OTHER DEALINGS IN THE SOFTWARE.
252
+ >
253
+ > <!-- DEPENDENCIES -->
254
+ >
255
+ > # Licenses of bundled dependencies
256
+ > The published @visulima/path artifact additionally contains code with the following licenses:
257
+ > MIT
258
+ >
259
+ > # Bundled dependencies:
260
+ > ## binary-extensions
261
+ > License: MIT
262
+ > By: Sindre Sorhus
263
+ > Repository: sindresorhus/binary-extensions
264
+ >
265
+ > > MIT License
266
+ > >
267
+ > > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
268
+ > > Copyright (c) Paul Miller (https://paulmillr.com)
269
+ > >
270
+ > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
271
+ > >
272
+ > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
273
+ > >
274
+ > > 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.
275
+ >
276
+ > <!-- DEPENDENCIES -->
277
+ >
278
+ > <!-- TYPE_DEPENDENCIES -->
279
+ > <!-- TYPE_DEPENDENCIES -->
103
280
 
104
281
  ---------------------------------------
105
282
 
@@ -1 +1 @@
1
- "use strict";var k=Object.defineProperty;var i=(e,t)=>k(e,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("node:fs"),A=require("@visulima/find-cache-dir"),N=require("node:https");var O=Object.defineProperty,_=i((e,t)=>O(e,"name",{value:t,configurable:!0}),"o$1");const x=_((e,t)=>{const r=e.split(".").map(Number),n=t.split(".").map(Number);for(const[o,s]of r.entries()){if(s>n[o])return!0;if(s<n[o])return!1}return!1},"semverGt");var C=Object.defineProperty,U=i((e,t)=>{for(var r in t)C(e,r,{get:t[r],enumerable:!0})},"A"),P=/^[A-Z]:\//i,E=i((e="")=>e&&e.replaceAll("\\","/").replace(P,t=>t.toUpperCase()),"T"),c=E,D={};U(D,{basename:i(()=>j,"basename"),delimiter:i(()=>z,"delimiter"),dirname:i(()=>h,"dirname"),extname:i(()=>w,"extname"),format:i(()=>M,"format"),isAbsolute:i(()=>f,"isAbsolute"),join:i(()=>b,"join"),normalize:i(()=>y,"normalize"),normalizeString:i(()=>g,"normalizeString"),parse:i(()=>W,"parse"),relative:i(()=>J,"relative"),resolve:i(()=>d,"resolve"),sep:i(()=>q,"sep"),toNamespacedPath:i(()=>F,"toNamespacedPath")});var L=/^[/\\]{2}/,I=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,$=/^[A-Z]:$/i,m=/^\/([A-Z]:)?$/i,T=/.(\.[^./]+)$/,Z=i(()=>typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","_"),q="/",z=":",g=i((e,t)=>{let r="",n=0,o=-1,s=0,l=null;for(let a=0;a<=e.length;++a){if(a<e.length)l=e[a];else{if(l==="/")break;l="/"}if(l==="/"){if(!(o===a-1||s===1))if(s===2){if(r.length<2||n!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){let u=r.lastIndexOf("/");u===-1?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),o=a,s=0;continue}else if(r.length>0){r="",n=0,o=a,s=0;continue}}t&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${e.slice(o+1,a)}`:r=e.slice(o+1,a),n=a-o-1;o=a,s=0}else l==="."&&s!==-1?++s:s=-1}return r},"g$2"),f=i(e=>I.test(e),"f"),y=i(function(e){if(e.length===0)return".";e=c(e);let t=L.exec(e),r=f(e),n=e.at(-1)==="/";return e=g(e,!r),e.length===0?r?"/":n?"./":".":(n&&(e+="/"),$.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!f(e)?`/${e}`:e)},"m$1"),b=i(function(...e){if(e.length===0)return".";let t;for(let r of e)r&&r.length>0&&(t===void 0?t=r:t+=`/${r}`);return t===void 0?".":y(t.replaceAll(/\/{2,}/g,"/"))},"z"),d=i(function(...e){e=e.map(n=>c(n));let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){let o=n>=0?e[n]:Z();!o||o.length===0||(t=`${o}/${t}`,r=f(o))}return t=g(t,!r),r&&!f(t)?`/${t}`:t.length>0?t:"."},"a"),F=i(function(e){return c(e)},"L"),w=i(function(e){return T.exec(c(e))?.[1]??""},"h"),J=i(function(e,t){let r=d(e).replace(m,"$1").split("/"),n=d(t).replace(m,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");let o=[...r];for(let s of o){if(n[0]!==s)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},"N"),h=i(e=>{let t=c(e).replace(/\/$/,"").split("/").slice(0,-1);return t.length===1&&$.test(t[0])&&(t[0]+="/"),t.join("/")||(f(e)?"/":".")},"x"),M=i(function(e){let t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return c(e.root?d(...t):t.join("/"))},"C"),j=i((e,t)=>{let r=c(e).split("/").pop();return t&&r.endsWith(t)?r.slice(0,-t.length):r},"E"),W=i(function(e){let t=c(e).split("/").shift();t===""?t="/":t+="/";let r=j(e),n=w(r);return{base:r,dir:h(e),ext:n,name:r.slice(0,r.length-n.length),root:t}},"U"),V=Object.defineProperty,v=i((e,t)=>V(e,"name",{value:t,configurable:!0}),"r");const B="last-update-check.json",S=v(e=>{const t=A.findCacheDirSync(e);if(t===void 0)throw new Error("Could not find cache directory");return b(t,B)},"getConfigFile"),G=v(e=>{const t=S(e);try{if(!p.existsSync(t))return;const{lastUpdateCheck:r}=JSON.parse(p.readFileSync(t,"utf8"));return r}catch{return}},"getLastUpdate"),R=v(e=>{const t=S(e),r=h(t);p.existsSync(r)||p.mkdirSync(r,{recursive:!0}),p.writeFileSync(t,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var H=Object.defineProperty,K=i((e,t)=>H(e,"name",{value:t,configurable:!0}),"g");const Q=K(async(e,t,r)=>{const n=r.replace("__NAME__",e);return await new Promise((o,s)=>{N.get(n,l=>{let a="";l.on("data",u=>a+=u),l.on("end",()=>{try{const u=JSON.parse(a)[t];u||s(new Error("Error getting version")),o(u)}catch{s(new Error("Could not parse version response"))}})}).on("error",l=>s(l))})},"getDistributionVersion");var X=Object.defineProperty,Y=i((e,t)=>X(e,"name",{value:t,configurable:!0}),"i");const ee=Y(async({alwaysRun:e,debug:t,distTag:r="latest",pkg:n,registryUrl:o="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:s=1e3*60*60*24})=>{const l=G(n.name);if(e||!l||l<Date.now()-s){const a=await Q(n.name,r,o);if(R(n.name),x(a,n.version))return a;t&&console.error(`Latest version (${a}) not newer than current version (${n.version})`)}else t&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${s}ms but only ${Date.now()-l}ms since last check.`);return null},"hasNewVersion");exports.default=ee;
1
+ "use strict";var j=Object.defineProperty;var f=(e,n)=>j(e,"name",{value:n,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("node:fs"),O=require("@visulima/find-cache-dir"),S=require("node:https");var k=Object.defineProperty,P=f((e,n)=>k(e,"name",{value:n,configurable:!0}),"o$1");const A=P((e,n)=>{const r=e.split(".").map(Number),t=n.split(".").map(Number);for(const[o,s]of r.entries()){if(s>t[o])return!0;if(s<t[o])return!1}return!1},"semverGt");var x=Object.defineProperty,m=f((e,n)=>x(e,"name",{value:n,configurable:!0}),"p"),N=Object.defineProperty,_=m((e,n)=>N(e,"name",{value:n,configurable:!0}),"t");const C=/^[A-Z]:\//i,l=_((e="")=>e&&e.replaceAll("\\","/").replace(C,n=>n.toUpperCase()),"normalizeWindowsPath");var U=Object.defineProperty,c=m((e,n)=>U(e,"name",{value:n,configurable:!0}),"r");const D=/^[/\\]{2}/,E=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,b=/^[A-Z]:$/i,v=/^\/([A-Z]:)?$/i,L=/.(\.[^./]+)$/,Z=c(()=>typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),y=c((e,n)=>{let r="",t=0,o=-1,s=0,a=null;for(let i=0;i<=e.length;++i){if(i<e.length)a=e[i];else{if(a==="/")break;a="/"}if(a==="/"){if(!(o===i-1||s===1))if(s===2){if(r.length<2||t!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const u=r.lastIndexOf("/");u===-1?(r="",t=0):(r=r.slice(0,u),t=r.length-1-r.lastIndexOf("/")),o=i,s=0;continue}else if(r.length>0){r="",t=0,o=i,s=0;continue}}n&&(r+=r.length>0?"/..":"..",t=2)}else r.length>0?r+=`/${e.slice(o+1,i)}`:r=e.slice(o+1,i),t=i-o-1;o=i,s=0}else a==="."&&s!==-1?++s:s=-1}return r},"normalizeString"),d=c(e=>E.test(e),"isAbsolute"),z=c(function(e){if(e.length===0)return".";e=l(e);const n=D.exec(e),r=d(e),t=e.at(-1)==="/";return e=y(e,!r),e.length===0?r?"/":t?"./":".":(t&&(e+="/"),b.test(e)&&(e+="/"),n?r?`//${e}`:`//./${e}`:r&&!d(e)?`/${e}`:e)},"normalize"),q=c(function(...e){if(e.length===0)return".";let n;for(const r of e)r&&r.length>0&&(n===void 0?n=r:n+=`/${r}`);return n===void 0?".":z(n.replaceAll(/\/{2,}/g,"/"))},"join"),g=c(function(...e){e=e.map(t=>l(t));let n="",r=!1;for(let t=e.length-1;t>=-1&&!r;t--){const o=t>=0?e[t]:Z();!o||o.length===0||(n=`${o}/${n}`,r=d(o))}return n=y(n,!r),r&&!d(n)?`/${n}`:n.length>0?n:"."},"resolve");c(function(e){return l(e)},"toNamespacedPath");const F=c(function(e){return L.exec(l(e))?.[1]??""},"extname");c(function(e,n){const r=g(e).replace(v,"$1").split("/"),t=g(n).replace(v,"$1").split("/");if(t[0][1]===":"&&r[0][1]===":"&&r[0]!==t[0])return t.join("/");const o=[...r];for(const s of o){if(t[0]!==s)break;r.shift(),t.shift()}return[...r.map(()=>".."),...t].join("/")},"relative");const $=c(e=>{const n=l(e).replace(/\/$/,"").split("/").slice(0,-1);return n.length===1&&b.test(n[0])&&(n[0]+="/"),n.join("/")||(d(e)?"/":".")},"dirname");c(function(e){const n=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return l(e.root?g(...n):n.join("/"))},"format");const I=c((e,n)=>{const r=l(e).split("/").pop();return n&&r.endsWith(n)?r.slice(0,-n.length):r},"basename");c(function(e){let n=l(e).split("/").shift();n===""?n="/":n+="/";const r=I(e),t=F(r);return{base:r,dir:$(e),ext:t,name:r.slice(0,r.length-t.length),root:n}},"parse");var J=Object.defineProperty,h=f((e,n)=>J(e,"name",{value:n,configurable:!0}),"r");const M="last-update-check.json",w=h(e=>{const n=O.findCacheDirSync(e);if(n===void 0)throw new Error("Could not find cache directory");return q(n,M)},"getConfigFile"),T=h(e=>{const n=w(e);try{if(!p.existsSync(n))return;const{lastUpdateCheck:r}=JSON.parse(p.readFileSync(n,"utf8"));return r}catch{return}},"getLastUpdate"),W=h(e=>{const n=w(e),r=$(n);p.existsSync(r)||p.mkdirSync(r,{recursive:!0}),p.writeFileSync(n,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var V=Object.defineProperty,B=f((e,n)=>V(e,"name",{value:n,configurable:!0}),"g");const G=B(async(e,n,r)=>{const t=r.replace("__NAME__",e);return await new Promise((o,s)=>{S.get(t,a=>{let i="";a.on("data",u=>i+=u),a.on("end",()=>{try{const u=JSON.parse(i)[n];u||s(new Error("Error getting version")),o(u)}catch{s(new Error("Could not parse version response"))}})}).on("error",a=>s(a))})},"getDistributionVersion");var R=Object.defineProperty,H=f((e,n)=>R(e,"name",{value:n,configurable:!0}),"i");const K=H(async({alwaysRun:e,debug:n,distTag:r="latest",pkg:t,registryUrl:o="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:s=1e3*60*60*24})=>{const a=T(t.name);if(e||!a||a<Date.now()-s){const i=await G(t.name,r,o);if(W(t.name),A(i,t.version))return i;n&&console.error(`Latest version (${i}) not newer than current version (${t.version})`)}else n&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${s}ms but only ${Date.now()-a}ms since last check.`);return null},"hasNewVersion");exports.default=K;
@@ -1 +1 @@
1
- var A=Object.defineProperty;var o=(e,t)=>A(e,"name",{value:t,configurable:!0});import{existsSync as v,readFileSync as N,mkdirSync as x,writeFileSync as O}from"node:fs";import{findCacheDirSync as S}from"@visulima/find-cache-dir";import{get as U}from"node:https";var C=Object.defineProperty,_=o((e,t)=>C(e,"name",{value:t,configurable:!0}),"o$1");const P=_((e,t)=>{const r=e.split(".").map(Number),n=t.split(".").map(Number);for(const[i,a]of r.entries()){if(a>n[i])return!0;if(a<n[i])return!1}return!1},"semverGt");var E=Object.defineProperty,L=o((e,t)=>{for(var r in t)E(e,r,{get:t[r],enumerable:!0})},"A"),D=/^[A-Z]:\//i,I=o((e="")=>e&&e.replaceAll("\\","/").replace(D,t=>t.toUpperCase()),"T"),c=I,Z={};L(Z,{basename:o(()=>j,"basename"),delimiter:o(()=>M,"delimiter"),dirname:o(()=>d,"dirname"),extname:o(()=>w,"extname"),format:o(()=>G,"format"),isAbsolute:o(()=>u,"isAbsolute"),join:o(()=>b,"join"),normalize:o(()=>y,"normalize"),normalizeString:o(()=>g,"normalizeString"),parse:o(()=>R,"parse"),relative:o(()=>B,"relative"),resolve:o(()=>p,"resolve"),sep:o(()=>W,"sep"),toNamespacedPath:o(()=>V,"toNamespacedPath")});var z=/^[/\\]{2}/,F=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,$=/^[A-Z]:$/i,m=/^\/([A-Z]:)?$/i,J=/.(\.[^./]+)$/,T=o(()=>typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","_"),W="/",M=":",g=o((e,t)=>{let r="",n=0,i=-1,a=0,l=null;for(let s=0;s<=e.length;++s){if(s<e.length)l=e[s];else{if(l==="/")break;l="/"}if(l==="/"){if(!(i===s-1||a===1))if(a===2){if(r.length<2||n!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){let f=r.lastIndexOf("/");f===-1?(r="",n=0):(r=r.slice(0,f),n=r.length-1-r.lastIndexOf("/")),i=s,a=0;continue}else if(r.length>0){r="",n=0,i=s,a=0;continue}}t&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${e.slice(i+1,s)}`:r=e.slice(i+1,s),n=s-i-1;i=s,a=0}else l==="."&&a!==-1?++a:a=-1}return r},"g$2"),u=o(e=>F.test(e),"f"),y=o(function(e){if(e.length===0)return".";e=c(e);let t=z.exec(e),r=u(e),n=e.at(-1)==="/";return e=g(e,!r),e.length===0?r?"/":n?"./":".":(n&&(e+="/"),$.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!u(e)?`/${e}`:e)},"m$1"),b=o(function(...e){if(e.length===0)return".";let t;for(let r of e)r&&r.length>0&&(t===void 0?t=r:t+=`/${r}`);return t===void 0?".":y(t.replaceAll(/\/{2,}/g,"/"))},"z"),p=o(function(...e){e=e.map(n=>c(n));let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){let i=n>=0?e[n]:T();!i||i.length===0||(t=`${i}/${t}`,r=u(i))}return t=g(t,!r),r&&!u(t)?`/${t}`:t.length>0?t:"."},"a"),V=o(function(e){return c(e)},"L"),w=o(function(e){return J.exec(c(e))?.[1]??""},"h"),B=o(function(e,t){let r=p(e).replace(m,"$1").split("/"),n=p(t).replace(m,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");let i=[...r];for(let a of i){if(n[0]!==a)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},"N"),d=o(e=>{let t=c(e).replace(/\/$/,"").split("/").slice(0,-1);return t.length===1&&$.test(t[0])&&(t[0]+="/"),t.join("/")||(u(e)?"/":".")},"x"),G=o(function(e){let t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return c(e.root?p(...t):t.join("/"))},"C"),j=o((e,t)=>{let r=c(e).split("/").pop();return t&&r.endsWith(t)?r.slice(0,-t.length):r},"E"),R=o(function(e){let t=c(e).split("/").shift();t===""?t="/":t+="/";let r=j(e),n=w(r);return{base:r,dir:d(e),ext:n,name:r.slice(0,r.length-n.length),root:t}},"U"),q=Object.defineProperty,h=o((e,t)=>q(e,"name",{value:t,configurable:!0}),"r");const H="last-update-check.json",k=h(e=>{const t=S(e);if(t===void 0)throw new Error("Could not find cache directory");return b(t,H)},"getConfigFile"),K=h(e=>{const t=k(e);try{if(!v(t))return;const{lastUpdateCheck:r}=JSON.parse(N(t,"utf8"));return r}catch{return}},"getLastUpdate"),Q=h(e=>{const t=k(e),r=d(t);v(r)||x(r,{recursive:!0}),O(t,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var X=Object.defineProperty,Y=o((e,t)=>X(e,"name",{value:t,configurable:!0}),"g");const ee=Y(async(e,t,r)=>{const n=r.replace("__NAME__",e);return await new Promise((i,a)=>{U(n,l=>{let s="";l.on("data",f=>s+=f),l.on("end",()=>{try{const f=JSON.parse(s)[t];f||a(new Error("Error getting version")),i(f)}catch{a(new Error("Could not parse version response"))}})}).on("error",l=>a(l))})},"getDistributionVersion");var te=Object.defineProperty,re=o((e,t)=>te(e,"name",{value:t,configurable:!0}),"i");const se=re(async({alwaysRun:e,debug:t,distTag:r="latest",pkg:n,registryUrl:i="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:a=1e3*60*60*24})=>{const l=K(n.name);if(e||!l||l<Date.now()-a){const s=await ee(n.name,r,i);if(Q(n.name),P(s,n.version))return s;t&&console.error(`Latest version (${s}) not newer than current version (${n.version})`)}else t&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${a}ms but only ${Date.now()-l}ms since last check.`);return null},"hasNewVersion");export{se as default};
1
+ var j=Object.defineProperty;var f=(e,n)=>j(e,"name",{value:n,configurable:!0});import{existsSync as h,readFileSync as O,mkdirSync as k,writeFileSync as A}from"node:fs";import{findCacheDirSync as P}from"@visulima/find-cache-dir";import{get as x}from"node:https";var N=Object.defineProperty,S=f((e,n)=>N(e,"name",{value:n,configurable:!0}),"o$1");const U=S((e,n)=>{const r=e.split(".").map(Number),t=n.split(".").map(Number);for(const[o,a]of r.entries()){if(a>t[o])return!0;if(a<t[o])return!1}return!1},"semverGt");var C=Object.defineProperty,v=f((e,n)=>C(e,"name",{value:n,configurable:!0}),"p"),_=Object.defineProperty,E=v((e,n)=>_(e,"name",{value:n,configurable:!0}),"t");const D=/^[A-Z]:\//i,l=E((e="")=>e&&e.replaceAll("\\","/").replace(D,n=>n.toUpperCase()),"normalizeWindowsPath");var L=Object.defineProperty,c=v((e,n)=>L(e,"name",{value:n,configurable:!0}),"r");const Z=/^[/\\]{2}/,z=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,$=/^[A-Z]:$/i,m=/^\/([A-Z]:)?$/i,F=/.(\.[^./]+)$/,I=c(()=>typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),b=c((e,n)=>{let r="",t=0,o=-1,a=0,s=null;for(let i=0;i<=e.length;++i){if(i<e.length)s=e[i];else{if(s==="/")break;s="/"}if(s==="/"){if(!(o===i-1||a===1))if(a===2){if(r.length<2||t!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const u=r.lastIndexOf("/");u===-1?(r="",t=0):(r=r.slice(0,u),t=r.length-1-r.lastIndexOf("/")),o=i,a=0;continue}else if(r.length>0){r="",t=0,o=i,a=0;continue}}n&&(r+=r.length>0?"/..":"..",t=2)}else r.length>0?r+=`/${e.slice(o+1,i)}`:r=e.slice(o+1,i),t=i-o-1;o=i,a=0}else s==="."&&a!==-1?++a:a=-1}return r},"normalizeString"),p=c(e=>z.test(e),"isAbsolute"),J=c(function(e){if(e.length===0)return".";e=l(e);const n=Z.exec(e),r=p(e),t=e.at(-1)==="/";return e=b(e,!r),e.length===0?r?"/":t?"./":".":(t&&(e+="/"),$.test(e)&&(e+="/"),n?r?`//${e}`:`//./${e}`:r&&!p(e)?`/${e}`:e)},"normalize"),W=c(function(...e){if(e.length===0)return".";let n;for(const r of e)r&&r.length>0&&(n===void 0?n=r:n+=`/${r}`);return n===void 0?".":J(n.replaceAll(/\/{2,}/g,"/"))},"join"),g=c(function(...e){e=e.map(t=>l(t));let n="",r=!1;for(let t=e.length-1;t>=-1&&!r;t--){const o=t>=0?e[t]:I();!o||o.length===0||(n=`${o}/${n}`,r=p(o))}return n=b(n,!r),r&&!p(n)?`/${n}`:n.length>0?n:"."},"resolve");c(function(e){return l(e)},"toNamespacedPath");const M=c(function(e){return F.exec(l(e))?.[1]??""},"extname");c(function(e,n){const r=g(e).replace(m,"$1").split("/"),t=g(n).replace(m,"$1").split("/");if(t[0][1]===":"&&r[0][1]===":"&&r[0]!==t[0])return t.join("/");const o=[...r];for(const a of o){if(t[0]!==a)break;r.shift(),t.shift()}return[...r.map(()=>".."),...t].join("/")},"relative");const y=c(e=>{const n=l(e).replace(/\/$/,"").split("/").slice(0,-1);return n.length===1&&$.test(n[0])&&(n[0]+="/"),n.join("/")||(p(e)?"/":".")},"dirname");c(function(e){const n=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return l(e.root?g(...n):n.join("/"))},"format");const T=c((e,n)=>{const r=l(e).split("/").pop();return n&&r.endsWith(n)?r.slice(0,-n.length):r},"basename");c(function(e){let n=l(e).split("/").shift();n===""?n="/":n+="/";const r=T(e),t=M(r);return{base:r,dir:y(e),ext:t,name:r.slice(0,r.length-t.length),root:n}},"parse");var V=Object.defineProperty,d=f((e,n)=>V(e,"name",{value:n,configurable:!0}),"r");const B="last-update-check.json",w=d(e=>{const n=P(e);if(n===void 0)throw new Error("Could not find cache directory");return W(n,B)},"getConfigFile"),G=d(e=>{const n=w(e);try{if(!h(n))return;const{lastUpdateCheck:r}=JSON.parse(O(n,"utf8"));return r}catch{return}},"getLastUpdate"),R=d(e=>{const n=w(e),r=y(n);h(r)||k(r,{recursive:!0}),A(n,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var q=Object.defineProperty,H=f((e,n)=>q(e,"name",{value:n,configurable:!0}),"g");const K=H(async(e,n,r)=>{const t=r.replace("__NAME__",e);return await new Promise((o,a)=>{x(t,s=>{let i="";s.on("data",u=>i+=u),s.on("end",()=>{try{const u=JSON.parse(i)[n];u||a(new Error("Error getting version")),o(u)}catch{a(new Error("Could not parse version response"))}})}).on("error",s=>a(s))})},"getDistributionVersion");var Q=Object.defineProperty,X=f((e,n)=>Q(e,"name",{value:n,configurable:!0}),"i");const te=X(async({alwaysRun:e,debug:n,distTag:r="latest",pkg:t,registryUrl:o="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:a=1e3*60*60*24})=>{const s=G(t.name);if(e||!s||s<Date.now()-a){const i=await K(t.name,r,o);if(R(t.name),U(i,t.version))return i;n&&console.error(`Latest version (${i}) not newer than current version (${t.version})`)}else n&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${a}ms but only ${Date.now()-s}ms since last check.`);return null},"hasNewVersion");export{te as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/cerebro",
3
- "version": "1.1.12",
3
+ "version": "1.1.14",
4
4
  "description": "A delightful toolkit for building Node-powered CLIs.",
5
5
  "keywords": [
6
6
  "command",
@@ -76,10 +76,10 @@
76
76
  "LICENSE.md"
77
77
  ],
78
78
  "dependencies": {
79
- "@visulima/boxen": "1.0.11",
80
- "@visulima/colorize": "1.4.3",
81
- "@visulima/find-cache-dir": "1.0.3",
82
- "@visulima/pail": "2.1.1",
79
+ "@visulima/boxen": "1.0.13",
80
+ "@visulima/colorize": "1.4.5",
81
+ "@visulima/find-cache-dir": "1.0.5",
82
+ "@visulima/pail": "2.1.3",
83
83
  "cli-table3": "^0.6.5",
84
84
  "command-line-args": "^6.0.0",
85
85
  "fastest-levenshtein": "^1.0.16"
@@ -89,20 +89,20 @@
89
89
  "@anolilab/prettier-config": "^5.0.14",
90
90
  "@anolilab/semantic-release-pnpm": "^1.1.3",
91
91
  "@anolilab/semantic-release-preset": "^9.0.0",
92
- "@babel/core": "^7.24.9",
92
+ "@babel/core": "^7.25.2",
93
93
  "@eslint-types/deprecation": "^2.0.0",
94
94
  "@eslint-types/import": "^2.29.1",
95
95
  "@eslint-types/jsdoc": "^48.2.2",
96
96
  "@eslint-types/typescript-eslint": "^7.5.0",
97
97
  "@eslint-types/unicorn": "^52.0.0",
98
- "@rushstack/eslint-plugin-security": "^0.8.1",
98
+ "@rushstack/eslint-plugin-security": "^0.8.2",
99
99
  "@total-typescript/ts-reset": "^0.5.1",
100
100
  "@types/command-line-args": "^5.2.3",
101
101
  "@types/node": "18.19.15",
102
102
  "@visulima/nextra-theme-docs": "4.0.26",
103
- "@visulima/packem": "1.0.0-alpha.45",
104
- "@visulima/path": "1.0.2",
105
- "@vitest/coverage-v8": "^2.0.3",
103
+ "@visulima/packem": "^1.0.0-alpha.60",
104
+ "@visulima/path": "1.0.4",
105
+ "@vitest/coverage-v8": "^2.0.5",
106
106
  "camelcase": "8.0.0",
107
107
  "conventional-changelog-conventionalcommits": "8.0.0",
108
108
  "cross-env": "^7.0.3",
@@ -118,7 +118,7 @@
118
118
  "semantic-release": "24.0.0",
119
119
  "strip-ansi": "^7.1.0",
120
120
  "typescript": "5.4.5",
121
- "vitest": "^2.0.3"
121
+ "vitest": "^2.0.5"
122
122
  },
123
123
  "engines": {
124
124
  "node": ">=18.* <=22.*"