@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 +34 -0
- package/LICENSE.md +177 -0
- package/dist/chunks/has-new-version.cjs +1 -1
- package/dist/chunks/has-new-version.mjs +1 -1
- package/package.json +11 -11
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
|
|
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
|
|
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.
|
|
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.
|
|
80
|
-
"@visulima/colorize": "1.4.
|
|
81
|
-
"@visulima/find-cache-dir": "1.0.
|
|
82
|
-
"@visulima/pail": "2.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.
|
|
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.
|
|
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.
|
|
104
|
-
"@visulima/path": "1.0.
|
|
105
|
-
"@vitest/coverage-v8": "^2.0.
|
|
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.
|
|
121
|
+
"vitest": "^2.0.5"
|
|
122
122
|
},
|
|
123
123
|
"engines": {
|
|
124
124
|
"node": ">=18.* <=22.*"
|