@visulima/cerebro 3.0.3 → 3.0.5
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 +17 -0
- package/LICENSE.md +346 -0
- package/dist/commands/completion-command.d.ts +3 -3
- package/dist/commands/completion-command.js +1 -1
- package/dist/commands/help-command.d.ts +1 -1
- package/dist/commands/help-command.js +1 -1
- package/dist/commands/readme-command.d.ts +3 -3
- package/dist/commands/readme-command.js +17 -17
- package/dist/commands/version-command.d.ts +1 -1
- package/dist/index.d.ts +403 -433
- package/dist/index.js +1 -1
- package/dist/logger/create-pail-logger.d.ts +533 -555
- package/dist/logger/create-pail-logger.js +1 -1
- package/dist/packem_chunks/has-new-version.js +1 -1
- package/dist/packem_shared/Cerebro-58LHN3_T.js +4 -0
- package/dist/packem_shared/VisulimaError-k1qGkvab.js +76 -0
- package/dist/packem_shared/cerebro-error-DWpjBY_M.js +1 -0
- package/dist/packem_shared/command.d-B_G9vIYJ.d.ts +633 -0
- package/dist/packem_shared/{index-DvVGK4kr.js → index-Dpm7gUHe.js} +12 -12
- package/dist/packem_shared/index.d-CnnVYgSZ.d.ts +117 -0
- package/dist/packem_shared/renderError-BISXNU8L-B47ZikMV.js +27 -0
- package/dist/packem_shared/runtime-process-BEw54Ar-.js +1 -0
- package/dist/packem_shared/split-by-case-BZ6XOTIf.js +1 -0
- package/dist/plugins/error-handler-plugin.d.ts +18 -7
- package/dist/plugins/error-handler-plugin.js +1 -1
- package/dist/plugins/runtime-version-check-plugin.d.ts +5 -5
- package/dist/plugins/runtime-version-check-plugin.js +1 -1
- package/dist/plugins/update-notifier/update-notifier-plugin.d.ts +11 -10
- package/dist/plugins/update-notifier/update-notifier-plugin.js +1 -1
- package/dist/util/general/compile-cache.d.ts +37 -37
- package/dist/util/general/heap-tuning.d.ts +11 -11
- package/dist/util/general/heap-tuning.js +1 -1
- package/package.json +6 -6
- package/dist/packem_shared/Cerebro-Czc4t-75.js +0 -4
- package/dist/packem_shared/VisulimaError-C90oeIMu.js +0 -76
- package/dist/packem_shared/cerebro-error-BjBcYVRO.js +0 -1
- package/dist/packem_shared/command.d-DbhtfXF4.d.ts +0 -639
- package/dist/packem_shared/index.d-BL4NtVR3.d.ts +0 -127
- package/dist/packem_shared/renderError-B3ePOoBG-BmZlyMcr.js +0 -25
- package/dist/packem_shared/runtime-process-Dmz0vCJy.js +0 -1
- package/dist/packem_shared/split-by-case-Dbpgd7rf.js +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
type ColorizeMethod = (value: string) => string;
|
|
2
|
+
type CodeFrameOptions = {
|
|
3
|
+
color?: {
|
|
4
|
+
gutter?: ColorizeMethod;
|
|
5
|
+
marker?: ColorizeMethod;
|
|
6
|
+
message?: ColorizeMethod;
|
|
7
|
+
};
|
|
8
|
+
linesAbove?: number;
|
|
9
|
+
linesBelow?: number;
|
|
10
|
+
message?: string;
|
|
11
|
+
prefix?: string;
|
|
12
|
+
showGutter?: boolean;
|
|
13
|
+
showLineNumbers?: boolean;
|
|
14
|
+
tabWidth?: number | false;
|
|
15
|
+
};
|
|
16
|
+
interface ErrorProperties {
|
|
17
|
+
cause?: unknown;
|
|
18
|
+
hint?: ErrorHint;
|
|
19
|
+
location?: ErrorLocation;
|
|
20
|
+
message?: string;
|
|
21
|
+
name: string;
|
|
22
|
+
stack?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
}
|
|
25
|
+
interface ErrorLocation {
|
|
26
|
+
column?: number;
|
|
27
|
+
file?: string;
|
|
28
|
+
line?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A message that explains to the user how they can fix the error.
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const error = new VisulimaError({
|
|
35
|
+
* hint: "Try running `npm install` to install missing dependencies.",
|
|
36
|
+
* location: {
|
|
37
|
+
* file: "src/index.ts",
|
|
38
|
+
* line: 1,
|
|
39
|
+
* column: 1,
|
|
40
|
+
* },
|
|
41
|
+
* message: "Cannot find module 'react'",
|
|
42
|
+
* name: "ModuleNotFoundError",
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* For more complex hints, you can pass an array of strings or a single string in markdown format.
|
|
47
|
+
*/
|
|
48
|
+
type ErrorHint = string[] | string;
|
|
49
|
+
declare class VisulimaError extends Error {
|
|
50
|
+
loc: ErrorLocation | undefined;
|
|
51
|
+
title: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* A message that explains to the user how they can fix the error.
|
|
54
|
+
*/
|
|
55
|
+
hint: ErrorHint | undefined;
|
|
56
|
+
type: string;
|
|
57
|
+
constructor({ cause, hint, location, message, name, stack, title }: ErrorProperties);
|
|
58
|
+
setLocation(location: ErrorLocation): void;
|
|
59
|
+
setName(name: string): void;
|
|
60
|
+
setMessage(message: string): void;
|
|
61
|
+
setHint(hint: ErrorHint): void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The compiled position of a stack frame handed to a {@link SourceMapResolver}.
|
|
65
|
+
*/
|
|
66
|
+
interface SourceMapLocation {
|
|
67
|
+
column?: number;
|
|
68
|
+
file: string;
|
|
69
|
+
line: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The resolved original position returned by a {@link SourceMapResolver}. Any omitted field falls
|
|
73
|
+
* back to the compiled value. `source`, when provided, is used directly as the code-frame content
|
|
74
|
+
* (e.g. from an inlined `sourcesContent`) instead of reading the resolved file from disk.
|
|
75
|
+
*/
|
|
76
|
+
interface ResolvedSourceLocation {
|
|
77
|
+
column?: number;
|
|
78
|
+
file?: string;
|
|
79
|
+
line?: number;
|
|
80
|
+
source?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Pluggable hook that maps a compiled `*.js:line:col` position back to its original source position
|
|
84
|
+
* (e.g. TS/JSX). Return `undefined` (or throw) to leave the frame untouched. Synchronous so it can
|
|
85
|
+
* be used by the synchronous `renderError`; resolve/inline your maps ahead of time.
|
|
86
|
+
*/
|
|
87
|
+
type SourceMapResolver = (location: SourceMapLocation) => ResolvedSourceLocation | undefined;
|
|
88
|
+
type Options$1 = {
|
|
89
|
+
/**
|
|
90
|
+
* Read source files for code frames from anywhere on disk, including absolute paths outside
|
|
91
|
+
* `cwd`. Defaults to `false`, in which case only files resolving inside `cwd` are read — this
|
|
92
|
+
* prevents local file disclosure when rendering errors whose stack came from untrusted input
|
|
93
|
+
* (e.g. a deserialized error). Enable only for trusted, locally-thrown errors.
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
allowAllFilePaths: boolean;
|
|
97
|
+
color: CodeFrameOptions["color"] & {
|
|
98
|
+
fileLine: ColorizeMethod;
|
|
99
|
+
hint: ColorizeMethod;
|
|
100
|
+
method: ColorizeMethod;
|
|
101
|
+
title: ColorizeMethod;
|
|
102
|
+
};
|
|
103
|
+
cwd: string;
|
|
104
|
+
displayShortPath: boolean;
|
|
105
|
+
filterStacktrace: ((line: string) => boolean) | undefined;
|
|
106
|
+
framesMaxLimit: number;
|
|
107
|
+
hideErrorCauseCodeView: boolean;
|
|
108
|
+
hideErrorCodeView: boolean;
|
|
109
|
+
hideErrorErrorsCodeView: boolean;
|
|
110
|
+
hideErrorTitle: boolean;
|
|
111
|
+
hideMessage: boolean;
|
|
112
|
+
indentation: number | "\t";
|
|
113
|
+
prefix: string;
|
|
114
|
+
/** Optional source-map resolver to map compiled frame positions back to original source. */
|
|
115
|
+
sourceMap?: SourceMapResolver;
|
|
116
|
+
} & Omit<CodeFrameOptions, "message | prefix">;
|
|
117
|
+
export { Options$1 as O, VisulimaError as V };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const q=globalThis.process??Object.create(null),M={versions:{}},w=new Proxy(q,{get(e,t){if(t in e)return e[t];if(t in M)return M[t]}}),D=e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
+
`),Y=(e,t,r,n)=>{const o={column:0,line:-1,...e.start},i={...o,...e.end},l=o.line,s=o.column,a=i.line,d=i.column;let c=Math.max(l-(r+1),0),m=Math.min(t.length,a+n);l===-1&&(c=0),a===-1&&(m=t.length);const p=a-l,f={};if(p)for(let u=0;u<=p;u++){const h=u+l;if(!s)f[h]=!0;else if(u===0){const $=t[h-1]?.length;f[h]=[s,($??0)-s+1]}else if(u===p)f[h]=[0,d];else{const $=t[h-u]?.length;f[h]=[0,$]}}else s===d?f[l]=s?[s,0]:!0:f[l]=[s,(d??0)-(s??0)];return{end:m,markerLines:f,start:c}},H=w.platform==="win32"&&!w.env?.WT_SESSION?">":"❯",K=(e,t,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:u=>u,marker:u=>u,message:u=>u,...r?.color}},o=typeof t.start.column=="number";let i=(e.includes("\r")?D(e):e).split(`
|
|
3
|
+
`);typeof n.tabWidth=="number"&&e.includes(" ")&&(i=i.map(u=>u.replaceAll(" "," ".repeat(n.tabWidth))));const{end:l,markerLines:s,start:a}=Y(t,i,n.linesAbove,n.linesBelow),d=String(l).length,{gutter:c,marker:m,message:p}=n.color;let f=i.slice(a,l).map((u,h)=>{const $=a+1+h,x=s[$],R=String($).padStart(d),_=!s[$+1],N=` ${R}${n.showGutter?" |":""}`;if(x){let E="";if(Array.isArray(x)){const z=u.replaceAll(/[^\t]/g," ").slice(0,Math.max(x[0]-1,0)),U=x[1]||1;E=[`
|
|
4
|
+
`,n.prefix+c(N.replaceAll(/\d/g," "))," ",z,m("^").repeat(U)].join(""),_&&n.message&&(E+=` ${p(n.message)}`)}return[n.prefix+m(H),c(N),u.length>0?` ${u}`:"",E].join("")}return`${n.prefix} ${c(N)}${u.length>0?` ${u}`:""}`}).join(`
|
|
5
|
+
`);return n.message&&!o&&(f=`${n.prefix+" ".repeat(d+1)+n.message}
|
|
6
|
+
${f}`),f},b=e=>{let t;return()=>{if(t===void 0){if(typeof w.getBuiltinModule!="function")throw new TypeError(`[@visulima/error] Cannot load ${e}: this runtime implements no process.getBuiltinModule(). Requires Node ^22.14.0 || >=24.10.0, or another runtime providing process.getBuiltinModule().`);t=w.getBuiltinModule(e)}return t}},Q=()=>w.env?.DEBUG==="true",g=(e,...t)=>{if(Q()){const r=t.map(n=>typeof n=="function"?n():n);console.debug(`error:parse-stacktrace: ${e}`,...r)}},y="<unknown>",X=/^(?:node:internal\/|node:|internal\/)/,Z=e=>e!==void 0&&X.test(e),ee=/^.*?\s*at\s(?:(.+?\)(?:\s\[.+\])?|\(?.*?)\s?\((?:address\sat\s)?)?(?:async\s)?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,te=/\((\S+)\),\s(<[^>]+>)?:(\d+)?:(\d+)?\)?/,re=/(.*?):(\d+):(\d+)(?:\s<-\s.+:\d+:\d+)?/,ne=/eval\sat\s(<anonymous>)\s\((.*)\)?:(\d+)?:(\d+)\),\s*<anonymous>?:(\d+)?:(\d+)/,ie=/^\s*in\s(?:([^\\/]+(?:\s\[as\s\S+\])?)\s\(?)?\(at?\s?(.*?):(\d+)(?::(\d+))?\)?\s*$/,oe=/in\s(.*)\s\(at\s(.+)\)\sat/,se=/^(?:.*@)?(.*):(\d+):(\d+)$/,le=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ae=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ce=/(\S[^\s[]*\[.*\]|.*?)@(.*):(\d+):(\d+)/,L=/\(error: ([^)]*)\)/,de=/at\s/,ue=/^(\S+):(\d+):(\d+)$|^(\S+):(\d+)$/,fe=/Error: |AggregateError:/,C=/^Anonymous function$/,me=/^\s*in\s.*/,pe=/^.*?\s*at\s.*/,he=/^.*?\s*@.*|\[native code\]/,O=(e,t)=>{const r=e.includes("safari-extension"),n=e.includes("safari-web-extension");return r||n?[e.includes("@")?e.split("@")[0]:y,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},B=(e,t)=>{const r=re.exec(t);r&&(e.file=r[1],e.line=+r[2],e.column=+r[3])},ve=e=>{const t=oe.exec(e);if(t){g(`parse nested node error stack line: "${e}"`,()=>`found: ${JSON.stringify(t)}`);const n=t[2].split(":");return{column:n[2]?+n[2]:void 0,file:n[0],line:n[1]?+n[1]:void 0,methodName:t[1]??y,raw:e,type:void 0}}const r=ie.exec(e);if(r){g(`parse node error stack line: "${e}"`,()=>`found: ${JSON.stringify(r)}`);const n={column:r[4]?+r[4]:void 0,file:r[2]?r[2].replace(de,""):void 0,line:r[3]?+r[3]:void 0,methodName:r[1]??y,raw:e,type:e.startsWith("internal")?"internal":void 0};return B(n,`${r[2]}:${r[3]}:${r[4]}`),n}},$e=e=>{const t=ee.exec(e);if(t){g(`parse chrome error stack line: "${e}"`,()=>`found: ${JSON.stringify(t)}`);const r=t[2]?.startsWith("native"),n=t[2]?.startsWith("eval")||t[1]?.startsWith("eval");let o,i;if(n){const d=te.exec(e);if(d){const c=ue.exec(d[1]);c?(t[2]=c[4]??c[1],t[3]=c[5]??c[2],t[4]=c[3]):d[2]&&(t[2]=d[1]),d[2]&&(o={column:d[4]?+d[4]:void 0,file:d[2],line:d[3]?+d[3]:void 0,methodName:"eval",raw:e,type:"eval"})}else{const c=ne.exec(e);c&&(i={column:c[4]?+c[4]:void 0,file:c[2],line:c[3]?+c[3]:void 0},o={column:c[6]?+c[6]:void 0,file:c[1],line:c[5]?+c[5]:void 0,methodName:"eval",raw:c[0],type:"eval"})}}const[l,s]=O(t[1]?t[1].replace(C,"<anonymous>"):y,t[2]),a={column:t[4]?+t[4]:void 0,evalOrigin:o,file:s,line:t[3]?+t[3]:void 0,methodName:l,raw:e,type:n?"eval":r?"native":Z(s)?"internal":void 0};return i?(a.column=i.column,a.file=i.file,a.line=i.line):B(a,`${s}:${t[3]}:${t[4]}`),a}},ge=(e,t)=>{const r=le.exec(e);if(r){g(`parse gecko error stack line: "${e}"`,()=>`found: ${JSON.stringify(r)}`);const n=r[3]?.includes(" > eval"),o=n&&r[3]&&ae.exec(r[3]);let i;n&&o&&(r[3]=o[1],i={column:r[5]?+r[5]:void 0,file:r[3],line:r[4]?+r[4]:void 0,methodName:"eval",raw:e,type:"eval"},r[4]=o[2]);const[l,s]=O(r[1]?r[1].replace(C,"<anonymous>"):y,r[3]);let a;(t?.type==="safari"||!n&&t?.type==="firefox")&&t.column?a=t.column:!n&&r[5]&&(a=+r[5]);let d;return(t?.type==="safari"||!n&&t?.type==="firefox")&&t.line?d=t.line:r[4]&&(d=+r[4]),{column:a,evalOrigin:i,file:s,line:d,methodName:l,raw:e,type:n?"eval":s.includes("[native code]")?"native":void 0}}},ye=(e,t)=>{const r=ce.exec(e);if(!(r&&r[2].includes(" > eval"))&&r)return g(`parse firefox error stack line: "${e}"`,()=>`found: ${JSON.stringify(r)}`),{column:r[4]?+r[4]:t?.column??void 0,file:r[2],line:r[3]?+r[3]:t?.line??void 0,methodName:r[1]||y,raw:e,type:void 0}},we=e=>{const t=se.exec(e);if(t)return g(`parse react android native error stack line: "${e}"`,()=>`found: ${JSON.stringify(t)}`),{column:t[3]?+t[3]:void 0,file:t[1],line:t[2]?+t[2]:void 0,methodName:y,raw:e,type:void 0}},xe=/(?:^|[(@\s])(?:node:internal\/|node:|internal\/)/,Se=/node_modules[/\\]/,Oe={internals:e=>!xe.test(e),nodeModules:e=>!Se.test(e)},Be=(...e)=>t=>e.every(r=>r(t)),j=(e,{filter:t,frameLimit:r=50}={})=>{const n=e;let o=(typeof n.stacktrace=="string"?n.stacktrace:e.stack??"").split(`
|
|
7
|
+
`).map(i=>(L.test(i)?i.replace(L,"$1"):i).trim()).filter(i=>!fe.test(i)&&i!=="eval code");return t&&(o=o.filter(i=>t(i))),o=o.slice(0,r),o.reduce((i,l,s)=>{if(!l||l.length>1024)return i;let a;if(me.test(l))a=ve(l);else if(pe.test(l))a=$e(l);else if(he.test(l)){let d;if(s===0){const c=e,m=c.columnNumber,p=c.lineNumber,f=c.line,u=c.column;m||p?d={column:m,line:p,type:"firefox"}:(f||u)&&(d={column:u,line:f,type:"safari"})}a=ye(l,d)??ge(l,d)}else a=we(l);return a?i.push(a):g(`parse error stack line: "${l}"`,"not parser found"),i},[])},W=b("node:fs"),S=b("node:path"),be=b("node:process"),Ne=b("node:url"),v=(e,t,r)=>r===0?e:t===" "?e+" ".repeat(r):e+" ".repeat(t*r),T=e=>e.replaceAll("\\","/"),Ee=e=>{if(!e.startsWith("file:"))return e;try{return Ne().fileURLToPath(e)}catch{return e}},ke=(e,t)=>{const r=e.replace("async file:","file:");return T(S().relative(t,Ee(r)))},Ae=(e,t,r)=>{if(t)return r.title(e.message);const n=e.message?`: ${e.message}`:"";return r.title(e.name+n)},P=(e,{color:t,hideErrorTitle:r,indentation:n,prefix:o},i)=>`${v(o,n,i)}${Ae(e,r,t)}
|
|
8
|
+
`,G=(e,{color:t,indentation:r,prefix:n},o)=>{if(e.hint===void 0)return;const i=v(n,r,o);let l="";if(Array.isArray(e.hint))for(const s of e.hint)l+=`${i+s}
|
|
9
|
+
`;else l+=i+e.hint;return t.hint(l)},k=(e,t)=>{if(!t||e.file===void 0||e.line===void 0)return{trace:e};try{const r=t({column:e.column,file:e.file,line:e.line});return r?{source:r.source,trace:{...e,column:r.column??e.column,file:r.file??e.file,line:r.line??e.line}}:{trace:e}}catch{return{trace:e}}},A=(e,t,r=0)=>{const{color:n,cwd:o,displayShortPath:i,indentation:l,prefix:s}=t,{trace:a}=e;let d;a.file===void 0?d="<unknown>":d=i?ke(a.file,o):T(a.file);const{fileLine:c,method:m}=n;return`${v(s,l,r)}at ${a.methodName?`${m(a.methodName)} `:""}${c(d)}:${c(a.line?.toString()??"")}`},Me=(e,t)=>{if(t.allowAllFilePaths)return!0;const r=S().resolve(t.cwd),n=S().resolve(r,e);return n===r||n.startsWith(r+S().sep)},Le=e=>{try{return W().existsSync(e)?W().readFileSync(e,"utf8"):void 0}catch{return}},I=(e,t,r)=>{const{color:n,indentation:o,linesAbove:i,linesBelow:l,prefix:s,showGutter:a,showLineNumbers:d,tabWidth:c}=t,{source:m,trace:p}=e;if(p.file===void 0)return;let f;if(m===void 0){const u=p.file.replace("file://","");if(!Me(u,t))return;const h=Le(u);if(h===void 0)return;f=h}else f=m;return K(f,{start:{column:p.column,line:p.line}},{color:n,linesAbove:i,linesBelow:l,prefix:v(s,o,r),showGutter:a,showLineNumbers:d,tabWidth:c})},J=(e,t,r)=>{if(e.errors.length===0)return;let n=`${v(t.prefix,t.indentation,r)}Errors:
|
|
10
|
+
|
|
11
|
+
`,o=!0;for(const i of e.errors)o?o=!1:n+=`
|
|
12
|
+
|
|
13
|
+
`,n+=F(i,{...t,framesMaxLimit:1,hideErrorCodeView:t.hideErrorErrorsCodeView},r+1);return`
|
|
14
|
+
${n}`},We=e=>{if(typeof e=="object"&&e!==null)try{return JSON.stringify(e)}catch{return Object.prototype.toString.call(e)}return String(e)},V=(e,t,r,n=new Set)=>{n.add(e);let o=`${v(t.prefix,t.indentation,r)}Caused by:
|
|
15
|
+
|
|
16
|
+
`;const{cause:i}=e;if(!(i instanceof Error)){const a=We(i);return o+=`${v(t.prefix,t.indentation,r)}${t.color.title(a)}
|
|
17
|
+
`,`
|
|
18
|
+
${o}`}o+=P(i,t,r);const l=j(i).shift(),s=G(i,t,r);if(s&&(o+=`${s}
|
|
19
|
+
`),l){const a=k(l,t.sourceMap);if(o+=A(a,t,r),!t.hideErrorCauseCodeView){const d=I(a,t,r);d!==void 0&&(o+=`
|
|
20
|
+
${d}`)}}if(i instanceof AggregateError){const a=J(i,t,r);a!==void 0&&(o+=`
|
|
21
|
+
${a}`)}return i.cause&&(o+=n.has(i)?`
|
|
22
|
+
${v(t.prefix,t.indentation,r+1)}Caused by: [Circular]`:`
|
|
23
|
+
${V(i,t,r+1,n)}`),`
|
|
24
|
+
${o}`},Ce=(e,t)=>(e.length>0?`
|
|
25
|
+
`:"")+e.map(r=>A(k(r,t.sourceMap),t)).join(`
|
|
26
|
+
`),F=(e,t,r)=>{const n={allowAllFilePaths:!1,cwd:be().cwd(),displayShortPath:!1,filterStacktrace:void 0,framesMaxLimit:Number.POSITIVE_INFINITY,hideErrorCauseCodeView:!1,hideErrorCodeView:!1,hideErrorErrorsCodeView:!1,hideErrorTitle:!1,hideMessage:!1,indentation:4,linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,showLineNumbers:!0,tabWidth:4,...t,color:{fileLine:s=>s,gutter:s=>s,hint:s=>s,marker:s=>s,message:s=>s,method:s=>s,title:s=>s,...t.color}},o=j(e,{filter:t.filterStacktrace,frameLimit:n.framesMaxLimit}),i=o.shift(),l=i?k(i,n.sourceMap):void 0;return[t.hideMessage?void 0:P(e,n,r),G(e,n,r),l?A(l,n,r):void 0,l&&!n.hideErrorCodeView?I(l,n,r):void 0,e instanceof AggregateError?J(e,n,r):void 0,e.cause===void 0||e.cause===null?void 0:V(e,n,r),o.length>0?Ce(o,n):void 0].filter(Boolean).join(`
|
|
27
|
+
`)},je=(e,t={})=>{if(t.framesMaxLimit!==void 0&&t.framesMaxLimit<=0)throw new RangeError("The 'framesMaxLimit' option must be a positive number");return F(e,t,0)};export{je as G,Oe as R,H as S,K as W,Be as X,j as Y,b as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r=e=>"Deno"in e,t=e=>"Bun"in e,i=()=>{if(r(globalThis)){const e=globalThis.Deno,s=e.execPath();let o=s;try{const{importMeta:n}=globalThis;n?.url&&(o=n.url)}catch{}return[s,o,...e.args]}return process.argv},a=()=>r(globalThis)?globalThis.Deno.cwd():process.cwd(),l=()=>{if(r(globalThis)){const e=globalThis.Deno;return new Proxy(e.env.toObject(),{get:(s,o)=>typeof o=="string"?e.env.get(o):s[o],has:(s,o)=>typeof o=="string"?e.env.has(o):o in s,set:(s,o,n)=>typeof o=="string"?(n===void 0||e.env.set(o,n),!0):!1})}return process.env},c=()=>r(globalThis)?[]:process.execArgv,g=()=>r(globalThis)?globalThis.Deno.execPath():process.execPath,h=()=>{if(r(globalThis)){const e=globalThis.Deno.build?.os??"unknown";return e==="windows"?"win32":e}return process.platform},b=()=>{if(r(globalThis)){const e=globalThis.Deno.build?.arch??"unknown";return e==="x86_64"?"x64":e==="aarch64"?"arm64":e}return process.arch},v=()=>{if(r(globalThis)){const e=globalThis.Deno,s={};return e.version?.deno&&(s.deno=e.version.deno),e.version?.v8&&(s.v8=e.version.v8),e.version?.typescript&&(s.typescript=e.version.typescript),s}if(t(globalThis)){const e=globalThis.Bun,s={...process.versions};return e.version&&(s.bun=e.version),s}return process.versions},p=(e=0)=>{if(r(globalThis))throw globalThis.Deno.exit(e),new Error("Deno exit failed");process.exit(e)},u=(e,s)=>{if(r(globalThis))return()=>{};const o=process;return o.on(e,s),()=>{o.removeListener(e,s)}};export{h as a,b,l as c,i as d,p as e,a as f,v as g,g as h,c as i,u as o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const M=String.raw,z=M`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,J=()=>new RegExp(M`\p{RI}{2}|(?)${z}(?:\u200D${z})*`,"gu");Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]]));const Ue=/^[ \t]*(?:\r\n|\r|\n)/,We=/(?:\r\n|\r|\n)[ \t]*$/,ye=/^(?:[\r\n]|$)/,Ae=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,be=/^[ \t]*[\r\n][ \t\r\n]*$/,$e=/\r\n|\n|\r/g,me=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,Be=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,W=J(),N=/[-_./\s]+/g,A=/(\u001B\[[0-9;]*[a-z])/i,F=new RegExp("\\p{Script=Arabic}","u"),Q=new RegExp("\\p{Script=Bengali}","u"),y=new RegExp("\\p{Script=Cyrillic}","u"),V=new RegExp("\\p{Script=Devanagari}","u"),X=new RegExp("\\p{Script=Ethiopic}","u"),b=new RegExp("\\p{Script=Greek}","u"),I=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),Y=new RegExp("\\p{Script=Gujarati}","u"),ee=new RegExp("\\p{Script=Gurmukhi}","u"),O=new RegExp("\\p{Script=Hangul}","u"),T=new RegExp("\\p{Script=Hebrew}","u"),te=new RegExp("\\p{Script=Hiragana}","u"),v=new RegExp("\\p{Script=Han}","u"),se=new RegExp("\\p{Script=Kannada}","u"),ne=new RegExp("\\p{Script=Katakana}","u"),ae=new RegExp("\\p{Script=Khmer}","u"),ie=new RegExp("\\p{Script=Lao}","u"),S=new RegExp("\\p{Script=Latin}","u"),le=new RegExp("\\p{Script=Malayalam}","u"),re=new RegExp("\\p{Script=Myanmar}","u"),pe=new RegExp("\\p{Script=Oriya}","u"),ce=new RegExp("\\p{Script=Sinhala}","u"),oe=new RegExp("\\p{Script=Tamil}","u"),ue=new RegExp("\\p{Script=Telugu}","u"),he=new RegExp("\\p{Script=Thai}","u"),fe=new RegExp("\\p{Script=Tibetan}","u"),G=/[\u02BB\u02BC\u0027]/u,ge=e=>e.replace(W,"");class xe{capacity;cache;constructor(s){this.capacity=s,this.cache=new Map}get(s){if(!this.cache.has(s))return;const o=this.cache.get(s);return this.cache.delete(s),this.cache.set(s,o),o}has(s){return this.cache.has(s)}set(s,o){if(this.cache.has(s))this.cache.delete(s);else if(this.cache.size>=this.capacity){const f=this.cache.keys().next().value;f!==void 0&&this.cache.delete(f)}this.cache.set(s,o)}delete(s){this.cache.delete(s)}clear(){this.cache.clear()}size(){return this.cache.size}}const de=new RegExp("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))","g"),we=e=>{if(typeof e!="string")throw new TypeError(`The "value" argument must be of type string. Received ${typeof e}`);return e.replaceAll(de,"")},$=new xe(1e3),Ee=/[.*+?^${}()|[\]\\]/g,ke=e=>{const s=e.join("");if($.has(s)){const x=$.get(s);return x.lastIndex=0,x}const o=e.map(x=>x.replaceAll(Ee,String.raw`\$&`)).join("|"),f=new RegExp(o,"g");return $.set(s,f),f},Se=e=>{const s=[];let o=0,f;for(W.lastIndex=0;(f=W.exec(e))!==null;)f.index>o&&s.push(e.slice(o,f.index)),s.push(f[0]),o=W.lastIndex;return o<e.length&&s.push(e.slice(o)),s.filter(Boolean)},Re=/[ČŠŽĐ]/i,P=new Uint8Array(128),Z=new Uint8Array(128),K=new Uint8Array(128);for(let e=0;e<128;e++)P[e]=e>=65&&e<=90?1:0,Z[e]=e>=97&&e<=122?1:0,K[e]=e>=48&&e<=57?1:0;const m=e=>P[e],H=e=>Z[e],B=e=>K[e],U=(e,s,o,f,x)=>{if(e.length===0)return[];let h=!1;const k=Object.values(s);for(const i of k)if(i(e[0])){h=!0;break}if(!h&&!o)return[e];const g=[...e],w=[];let n=g[0],l="other";const c=Object.entries(s);for(const i of c){const[a,p]=i;if(p(g[0])){l=a;break}}let t=o&&f?g[0]===g[0].toLocaleUpperCase(f):!1;for(let i=1;i<g.length;i++){const a=g[i];let p="other";for(const d of c){const[E,R]=d;if(R(a)){p=E;break}}const u=o&&f?a===a.toLocaleUpperCase(f):!1;let r=!1;x?r=x(l,p,t,u,a,i,g):(l!==p&&l!=="other"&&p!=="other"&&(r=!0),o&&p!=="other"&&!t&&u&&(r=!0)),r?(w.push(n),n=a):n+=a,l=p,o&&(t=u)}return n&&n.length>0&&w.push(n),w.length>0?w:[e]},Ce=(e,s,o,f)=>{if(o.size===0)return s;for(const x of o)if(e.startsWith(x,s))return f.push(x),s+x.length;return s},q=(e,s=new Set)=>{if(e.length===0)return[];if(e.toUpperCase()===e)return[e];let o=0;const f=[],x=e.length;for(let h=1;h<x;h++){const k=Ce(e,o,s,f);if(k!==o){o=k,h=o-1;continue}const g=e.codePointAt(h-1),w=e.codePointAt(h),n=g&&g<128&&m(g),l=w&&w<128&&m(w),c=g&&g<128&&H(g),t=g&&g<128&&B(g),i=w&&w<128&&B(w);if(c&&l){f.push(e.slice(o,h)),o=h;continue}if(t&&!i||!t&&i){f.push(e.slice(o,h)),o=h;continue}if(i&&!t){let a=!1,p=!1;if(h+1<x){const u=e.codePointAt(h+1);a=u&&u<128&&m(u),p=u&&u<128&&B(u)}if(!p&&a){f.push(e.slice(o,h),e.slice(h,h+1)),o=h+1;continue}}if(h+1<x){const a=e.codePointAt(h+1),p=a&&a<128&&H(a);if(n&&l&&p){const u=e.slice(o,h+1);s.has(u)||(f.push(e.slice(o,h)),o=h)}}}return o<x&&f.push(e.slice(o)),f.filter(h=>h!=="")},D=(e,s,o)=>{if(e.length===0)return[];const f=e===e.toLocaleUpperCase(s);if(s.startsWith("de")){if(!f&&e.replaceAll("ß","SS")===e.toLocaleUpperCase(s))return[e];const n=[...e],l=n.length,c=[];let t=n[0],i=n[0]===n[0].toLocaleUpperCase(s),a=i,p=i?0:-1;for(let u=1;u<l;u++){const r=n[u],d=r===r.toLocaleUpperCase(s);if(d===i)t+=r;else if(d)t&&t.length>0&&(c.push(t),t=r),a=!0,p=u;else{if(a&&u-p>1){const E=n[u-1],R=t.slice(0,-1);R&&R.length>0&&c.push(R),t=E+r}else t+=r;a=!1,p=-1}i=d}return t&&t.length>0&&c.push(t),c}if(s.startsWith("uk")||s.startsWith("ru")||s.startsWith("bg")||s.startsWith("sr")||s.startsWith("mk")||s.startsWith("be")){if(!y.test(e)&&!S.test(e))return[e];const n=[...e],l=n.length,c=[];let t=n[0];const i=n[0];let a;y.test(i)?a=1:S.test(i)?a=2:a=0;let p=i===i.toLocaleUpperCase(s);for(let r=1;r<l;r++){const d=n[r];let E;y.test(d)?E=1:S.test(d)?E=2:E=0;const R=d===d.toLocaleUpperCase(s);a!==E&&(a===1||a===2)&&(E===1||E===2)||E===a&&!p&&R?(c.push(t),t=d):t+=d,a=E,p=R}t&&t.length>0&&c.push(t);const u=[];for(let r=0;r<c.length;r++)r<c.length-1&&c[r].length===1&&S.test(c[r])&&y.test(c[r+1][0])?(u.push(c[r]+c[r+1]),r+=1):u.push(c[r]);return u}if(s.startsWith("el")){if(!b.test(e)&&!S.test(e))return[e];const n=[];I.lastIndex=0;let l;for(;(l=I.exec(e))!==null;)n.push(l[0]);n.length===0&&n.push(e);const c=[];if(n.length===1){const t=n[0];if(!t||!b.test(t[0])||t.length===1)return[t??e]}for(const t of n){if(!t)continue;if(!b.test(t[0])||t.length===1){c.push(t);continue}const i=t.length;let a=t[0],p=t[0]===t[0].toLocaleUpperCase(s);for(let u=1;u<i;u++){const r=t[u],d=r===r.toLocaleUpperCase(s);!p&&d?(c.push(a),a=r):a+=r,p=d}a&&c.push(a)}return c}if(s.startsWith("ja")||s.startsWith("ko")){const n=s.startsWith("ja"),l=n?{hiragana:t=>te.test(t),kanji:t=>v.test(t),katakana:t=>ne.test(t),latin:t=>S.test(t)}:{hangul:t=>O.test(t),latin:t=>S.test(t)},c=new Set(["が","で","と","に","の","は","へ","も","や","を"]);if(n){const t=U(e,l,!1,s,(a,p)=>a==="hiragana"&&p==="katakana"||a==="katakana"&&p==="hiragana"||a==="hiragana"&&p==="latin"||a==="katakana"&&p==="latin"||a==="kanji"&&p==="latin"||a==="latin"&&(p==="hiragana"||p==="katakana"||p==="kanji")),i=[];for(const a of t){const p=a;p.length===1&&c.has(p)&&i.length>0?i[i.length-1]=i.at(-1)+p:i.push(p)}return i.length>0?i:[e]}return U(e,l,!1,s,(t,i)=>t==="hangul"&&i==="latin"||t==="latin"&&i==="hangul")}if(s.startsWith("sl")){const n=[...e],l=n.length,c=[];let t=n[0],i=n[0]===n[0].toLocaleUpperCase(s);for(let a=1;a<l;a++){const p=n[a],u=p===p.toLocaleUpperCase(s),r=Re.test(p),d=a<l-1&&n[a+1]===n[a+1].toLocaleUpperCase(s);!i&&u||r&&d?(c.push(t),t=p,r&&d&&(c.push(t),t="")):t+=p,i=u}return t&&t.length>0&&c.push(t),c}if(s.startsWith("zh"))return U(e,{han:n=>v.test(n),latin:n=>S.test(n)},!1,s);if(["ar","fa","he","ur"].includes(s.split("-")[0])){const n=l=>T.test(l)||F.test(l);return U(e,{latin:l=>S.test(l),rtl:l=>n(l)},!1,s)}if(["am","bn","gu","hi","km","kn","lo","ml","mr","ne","or","pa","si","ta","te","th"].includes(s.split("-")[0])){const n=l=>V.test(l)||Q.test(l)||Y.test(l)||ee.test(l)||se.test(l)||oe.test(l)||ue.test(l)||le.test(l)||ce.test(l)||he.test(l)||ie.test(l)||fe.test(l)||re.test(l)||X.test(l)||ae.test(l)||pe.test(l);return U(e,{indic:l=>n(l),latin:l=>S.test(l)},!1,s)}if(["be","bg","ru","sr","uk"].includes(s))return U(e,{cyrillic:n=>y.test(n),latin:n=>S.test(n)},!0,s);if(["ar","fa","he"].includes(s))return U(e,{latin:n=>S.test(n),rtl:n=>T.test(n)||F.test(n)},!1,s);if(s.startsWith("ko"))return U(e,{hangul:n=>O.test(n),latin:n=>S.test(n)},!1,s);if(s.startsWith("uz")){if(!y.test(e)&&!S.test(e))return[e];const n=[...e],l=n.length,c=[];let t=n[0],i=n[0]===n[0].toLocaleUpperCase(s);for(let a=1;a<l;a++){const p=n[a],u=p===p.toLocaleUpperCase(s);if(G.test(p)||G.test(n[a-1])){t+=p;continue}!i&&u?(c.push(t),t=p):t+=p,i=u}return t&&t.length>0&&c.push(t),c}const x=[...e],h=x.length,k=[];let g=x[0],w=x[0]===x[0].toLocaleUpperCase(s);for(const n of o)if(e.startsWith(n)){k.push(n),g=x[n.length],w=g===g.toLocaleUpperCase(s);break}for(let n=1;n<h;n++){const l=x[n],c=l===l.toLocaleUpperCase(s);let t=0;for(const i of o)if(e.startsWith(i,n)){k.push(g,i),t=i.length,g="";const a=i.at(-1);a&&(w=a===a.toLocaleUpperCase(s));break}if(t>0){n+=t-1;continue}!w&&c?(k.push(g),g=l):g+=l,w=c}return g&&k.push(g),k},Le=(e,s,o)=>{const f=[],x=A.test(e)?e.split(A).filter(Boolean):[e];for(const h of x){const k=h;if(A.test(k))f.push(k);else{W.lastIndex=0;const g=W.test(k)?Se(k).filter(Boolean):[k];for(const w of g)if(W.lastIndex=0,W.test(w))f.push(w);else if(s){const n=s.toLowerCase().split("-")[0];f.push(...D(w,n,o))}else f.push(...q(w,o))}}return f},je=(e,s={})=>{if(!e||typeof e!="string")return[];const{handleAnsi:o=!1,handleEmoji:f=!1,knownAcronyms:x=[],locale:h,normalize:k=!1,separators:g,stripAnsi:w=!1,stripEmoji:n=!1}=s,l=new Set([...x].toSorted((r,d)=>d.length-r.length));let c=e;w&&(c=we(c)),n&&(c=ge(c));let t;Array.isArray(g)?t=ke(g):g instanceof RegExp?t=g:t=N;const i=[];let a=c;const p=t.flags.includes("g")?t:new RegExp(t.source,`${t.flags}g`);for(;a.length>0;){const r=p.exec(a);if(!r){a===".."?i.push(".."):a==="."?i.push("."):a.length>0&&i.push(a);break}const d=r.index,E=r[0],R=E.length,j=a.slice(0,d),_=a.slice(d+R);if(E.startsWith("../"))i.push(".."),a=a.slice(d+3);else if(E.startsWith("./"))i.push("."),a=a.slice(d+2);else if(d===0&&E==="..")i.push(".."),a=a.slice(2);else if(d===0&&E===".")i.push("."),a=a.slice(1);else{j.length>0&&i.push(j);let C=0;for(;(C=E.indexOf("../",C))!==-1;)i.push(".."),C+=3;for(C=0;(C=E.indexOf("./",C))!==-1;)(C===0||E[C-1]!==".")&&i.push("."),C+=2;let L=_;for(;L.startsWith("../");)i.push(".."),L=L.slice(3);for(;L.startsWith("./");)i.push("."),L=L.slice(2);if(L===".."){i.push("..");break}else if(L==="."){i.push(".");break}else a=L}p.lastIndex=0}if(i.length===0){const r=c.split(t).filter(Boolean);i.push(...r)}let u=[];for(const r of i)o||f?u.push(...Le(r,h,l)):h?u.push(...D(r,h,l)):u.push(...q(r,l));return k&&(u=u.map(r=>l.has(r)?r:h&&r===r.toLocaleUpperCase(h)?r[0]+r.slice(1).toLocaleLowerCase(h):r.toUpperCase()===r&&!l.has(r)?r.slice(0,1)+r.slice(1).toLowerCase():r)),u};export{ye as B,Ae as F,We as R,je as W,me as d,A as k,be as l,$e as m,W as n,Ue as x,Be as y};
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
import { O as Options$1 } from "../packem_shared/index.d-
|
|
2
|
-
import { P as Plugin } from "../packem_shared/command.d-
|
|
1
|
+
import { O as Options$1 } from "../packem_shared/index.d-CnnVYgSZ.js";
|
|
2
|
+
import { P as Plugin } from "../packem_shared/command.d-B_G9vIYJ.js";
|
|
3
3
|
import '@visulima/tabular';
|
|
4
4
|
type ErrorHandlerOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* Predicate marking an error as an *expected* user-facing failure — a
|
|
7
|
+
* bad flag, a missing file, a non-zero task exit. Matching errors are
|
|
8
|
+
* logged as their message alone, with no stack trace, because the
|
|
9
|
+
* frames point into CLI internals the user cannot act on.
|
|
10
|
+
*
|
|
11
|
+
* Ignored when `detailed` is true, so a debug flag still surfaces the
|
|
12
|
+
* full stack for every error. `formatter`, when set, wins over this.
|
|
13
|
+
* @default undefined (every error renders with its stack)
|
|
14
|
+
*/
|
|
15
|
+
concise?: (error: Error) => boolean;
|
|
5
16
|
/** Show detailed error information including stack traces and code frames (default: false) */
|
|
6
17
|
detailed?: boolean;
|
|
7
18
|
/** Exit process after handling error (default: true) */
|
|
@@ -14,10 +25,10 @@ type ErrorHandlerOptions = {
|
|
|
14
25
|
renderOptions?: Partial<Options$1>;
|
|
15
26
|
};
|
|
16
27
|
/**
|
|
17
|
-
* Create an error handler plugin for enhanced error reporting.
|
|
18
|
-
* Uses \@visulima/error for beautiful error formatting with code frames and stack traces.
|
|
19
|
-
* @param options Error handler configuration options
|
|
20
|
-
* @returns Plugin instance
|
|
21
|
-
*/
|
|
28
|
+
* Create an error handler plugin for enhanced error reporting.
|
|
29
|
+
* Uses \@visulima/error for beautiful error formatting with code frames and stack traces.
|
|
30
|
+
* @param options Error handler configuration options
|
|
31
|
+
* @returns Plugin instance
|
|
32
|
+
*/
|
|
22
33
|
declare const errorHandlerPlugin: (options?: ErrorHandlerOptions) => Plugin;
|
|
23
34
|
export { ErrorHandlerOptions, errorHandlerPlugin };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{G as m}from"../packem_shared/renderError-BISXNU8L-B47ZikMV.js";import{e as h}from"../packem_shared/runtime-process-BEw54Ar-.js";const u=(s={})=>({description:"Enhanced error handling and reporting with beautiful code frames",name:"error-handler",onError:(e,n)=>{const{logger:r,runtime:t}=n,{concise:l,detailed:o=!1,exitOnError:a=!0,formatter:i,logErrors:d=!0,renderOptions:f={}}=s;if(d)if(i)r.error(i(e));else if(!o&&l?.(e))r.error(e.message);else if(o){const c=t.getCwd(),g=m(e,{cwd:c,hideErrorCodeView:!1,hideErrorTitle:!1,hideMessage:!1,linesAbove:2,linesBelow:3,...f});r.error(g)}else r.error(e);a&&h(1)},version:"1.0.0"});export{u as errorHandlerPlugin};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Plugin } from "../packem_shared/command.d-
|
|
1
|
+
import { P as Plugin } from "../packem_shared/command.d-B_G9vIYJ.js";
|
|
2
2
|
import '@visulima/tabular';
|
|
3
3
|
type RuntimeType = "bun" | "deno" | "node";
|
|
4
4
|
type RuntimeVersionRequirement = {
|
|
@@ -17,9 +17,9 @@ type RuntimeVersionCheckOptions = {
|
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
|
-
* Create a runtime version check plugin that supports Node.js, Bun, and Deno.
|
|
21
|
-
* @param options Configuration for runtime version requirements
|
|
22
|
-
* @returns Plugin instance that validates runtime version on initialization
|
|
23
|
-
*/
|
|
20
|
+
* Create a runtime version check plugin that supports Node.js, Bun, and Deno.
|
|
21
|
+
* @param options Configuration for runtime version requirements
|
|
22
|
+
* @returns Plugin instance that validates runtime version on initialization
|
|
23
|
+
*/
|
|
24
24
|
declare const runtimeVersionCheckPlugin: (options?: RuntimeVersionCheckOptions) => Plugin;
|
|
25
25
|
export { RuntimeType, RuntimeVersionCheckOptions, RuntimeVersionRequirement, runtimeVersionCheckPlugin };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,e as c,g as v}from"../packem_shared/runtime-process-
|
|
1
|
+
import{c as p,e as c,g as v}from"../packem_shared/runtime-process-BEw54Ar-.js";const i=r=>{if(!r||typeof r!="string")return 0;const o=r.split(".");if(o.length===0||!o[0])return 0;const e=Number.parseInt(o[0],10);return Number.isNaN(e)?0:e},a=r=>!r||typeof r!="string"?"":r.replace("v",""),d=()=>{if(typeof Bun<"u"){const e=Bun.version||"";return{major:i(e),type:"bun",version:e}}if(typeof Deno<"u"){const e=Deno.version?.deno||"";return{major:i(e),type:"deno",version:e}}const r=v().node??"",o=a(r);return{major:i(o),type:"node",version:o}},y=(r={})=>({description:"Checks if the current runtime version meets the minimum requirement",init:o=>{const e=d(),m={bun:1,deno:1,node:18};let n;try{const s=p().CEREBRO_MIN_NODE_VERSION,u=s===void 0?void 0:Number.parseInt(s,10);n=Number.isNaN(u)?void 0:u}catch{n=void 0}let t;r.runtimes?.[e.type]?.minVersion!==void 0?t=r.runtimes[e.type].minVersion:e.type==="node"&&n!==void 0?t=n:t=m[e.type],e.major<t&&(o.logger.error(`cerebro requires ${e.type} version ${String(t)} or higher. You have ${e.type} ${e.version}. Read our version support policy: https://github.com/visulima/visulima#supported-runtimes`),c(1)),o.logger.debug(`Runtime version check passed: ${e.type} ${e.version} >= ${String(t)}`)},name:"runtime-version-check",version:"1.0.0"});export{y as runtimeVersionCheckPlugin};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { a as CerebroFs, P as Plugin } from "../../packem_shared/command.d-
|
|
1
|
+
import { a as CerebroFs, P as Plugin } from "../../packem_shared/command.d-B_G9vIYJ.js";
|
|
2
2
|
import '@visulima/tabular';
|
|
3
3
|
type UpdateNotifierOptions = {
|
|
4
4
|
alwaysRun?: boolean;
|
|
5
5
|
debug?: boolean;
|
|
6
6
|
distTag?: string;
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
* Injectable filesystem adapter used to read/write the last-update-check
|
|
9
|
+
* cache. The plugin passes `toolbox.fs` so MCP / sandboxed runtimes can swap
|
|
10
|
+
* the filesystem; defaults to a `node:fs/promises` wrapper when omitted.
|
|
11
|
+
*/
|
|
12
12
|
fs?: Pick<CerebroFs, "access" | "mkdir" | "readFile" | "writeFile">;
|
|
13
13
|
pkg: {
|
|
14
14
|
name: string;
|
|
15
15
|
version: string;
|
|
16
16
|
};
|
|
17
17
|
registryUrl?: string;
|
|
18
|
-
shouldNotifyInNpmScript?: boolean;
|
|
18
|
+
shouldNotifyInNpmScript?: boolean;
|
|
19
|
+
/** Timeout (ms) for the registry request. Defaults to 5000. */
|
|
19
20
|
timeout?: number;
|
|
20
21
|
updateCheckInterval?: number;
|
|
21
22
|
};
|
|
22
23
|
type UpdateNotifierPluginOptions = Partial<Omit<UpdateNotifierOptions, "debug" | "fs" | "pkg">>;
|
|
23
24
|
/**
|
|
24
|
-
* Create an update notifier plugin that checks for package updates.
|
|
25
|
-
* @param options Update notifier configuration options.
|
|
26
|
-
* @returns Plugin instance.
|
|
27
|
-
*/
|
|
25
|
+
* Create an update notifier plugin that checks for package updates.
|
|
26
|
+
* @param options Update notifier configuration options.
|
|
27
|
+
* @returns Plugin instance.
|
|
28
|
+
*/
|
|
28
29
|
declare const updateNotifierPlugin: (options?: UpdateNotifierPluginOptions) => Plugin;
|
|
29
30
|
export { type UpdateNotifierPluginOptions, updateNotifierPlugin };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as A}from"../../packem_shared/runtime-process-
|
|
1
|
+
import{VERBOSITY_DEBUG as p}from"../../packem_shared/VERBOSITY_DEBUG-XPultrIA.js";import{c as A}from"../../packem_shared/runtime-process-BEw54Ar-.js";var R={},i,C;function m(){return C||(C=1,i=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Alpic",constant:"ALPIC",env:"ALPIC_HOST"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Cloudflare Pages",constant:"CLOUDFLARE_PAGES",env:"CF_PAGES"},{name:"Cloudflare Workers",constant:"CLOUDFLARE_WORKERS",env:"WORKERS_CI"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]),i}var U;function l(){return U||(U=1,(function(a){const r=m(),e=process.env;Object.defineProperty(a,"_vendors",{value:r.map(function(n){return n.constant})}),a.name=null,a.isPR=null,a.id=null,e.CI!=="false"&&r.forEach(function(n){const t=(Array.isArray(n.env)?n.env:[n.env]).every(function(o){return E(o)});a[n.constant]=t,t&&(a.name=n.name,a.isPR=I(n),a.id=n.constant)}),a.isCI=!!(e.CI!=="false"&&(e.BUILD_ID||e.BUILD_NUMBER||e.CI||e.CI_APP_ID||e.CI_BUILD_ID||e.CI_BUILD_NUMBER||e.CI_NAME||e.CONTINUOUS_INTEGRATION||e.RUN_ID||a.name));function E(n){return typeof n=="string"?!!e[n]:"env"in n?e[n.env]&&e[n.env].includes(n.includes):"any"in n?n.any.some(function(t){return!!e[t]}):Object.keys(n).every(function(t){return e[t]===n[t]})}function I(n){switch(typeof n.pr){case"string":return!!e[n.pr];case"object":return"env"in n.pr?"any"in n.pr?n.pr.any.some(function(t){return e[n.pr.env]===t}):n.pr.env in e&&e[n.pr.env]!==n.pr.ne:"any"in n.pr?n.pr.any.some(function(t){return!!e[t]}):E(n.pr);default:return null}}})(R)),R}var P=l();const d=5e3,N=(a={})=>({beforeCommand:async r=>{const{fs:e,logger:E,runtime:I}=r,n=I.getPackageName(),t=I.getPackageVersion();if(!n||!t){E.debug("Update notifier: package name or version not provided, skipping...");return}const o=A(),c={alwaysRun:!1,debug:o.CEREBRO_OUTPUT_LEVEL===String(p),distTag:"latest",fs:e,pkg:{name:n,version:t},timeout:d,updateCheckInterval:1e3*60*60*24,...a};if(!(c.alwaysRun||!(o.NO_UPDATE_NOTIFIER||o.NODE_ENV==="test"||r.argv.includes("--no-update-notifier")||P.isCI))){E.debug("Update notifier: skipping check (disabled by environment or flags)");return}try{const _=await(await import("../../packem_chunks/has-new-version.js").then(s=>s.default))(c);if(_){const[{boxen:s},{dim:L,green:v,reset:T,yellow:u}]=await Promise.all([import("@visulima/boxen"),import("@visulima/colorize")]),D=`Update available ${L(t)}${T(" → ")}${v(_)}`;E.log(s(D,{borderColor:S=>u(S),borderStyle:"round",margin:1,padding:1,textAlignment:"center"}))}}catch(_){E.debug("Update notifier: failed to check for updates",_)}},description:"Checks for package updates and notifies users",name:"update-notifier",version:"1.0.0"});export{N as updateNotifierPlugin};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* V8 compile cache helper for faster CLI startup.
|
|
3
|
-
*
|
|
4
|
-
* Enables the V8 compile cache so that subsequent runs of the CLI skip
|
|
5
|
-
* re-parsing and re-compiling JavaScript/TypeScript source files. This
|
|
6
|
-
* can reduce startup time by 30-70% for large CLI tools.
|
|
7
|
-
*
|
|
8
|
-
* ## When to use
|
|
9
|
-
*
|
|
10
|
-
* Call `enableCompileCache()` early in your CLI entry point, after heap
|
|
11
|
-
* tuning but before importing heavy modules:
|
|
12
|
-
*
|
|
13
|
-
* ```typescript
|
|
14
|
-
* // bin.ts
|
|
15
|
-
* import { applyHeapTuning } from "@visulima/cerebro/heap-tuning";
|
|
16
|
-
* import { enableCompileCache } from "@visulima/cerebro/compile-cache";
|
|
17
|
-
*
|
|
18
|
-
* applyHeapTuning();
|
|
19
|
-
* enableCompileCache();
|
|
20
|
-
*
|
|
21
|
-
* import { createCerebro } from "@visulima/cerebro";
|
|
22
|
-
* // ... rest of your CLI setup
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* ## How it works
|
|
26
|
-
*
|
|
27
|
-
* 1. Tries `module.enableCompileCache()` (Node.js 22.8+ native API) which
|
|
28
|
-
* stores compiled bytecode alongside source files for instant reuse.
|
|
29
|
-
* 2. If that's unavailable, falls back to the `v8-compile-cache` npm package
|
|
30
|
-
* which achieves a similar effect on older Node.js versions.
|
|
31
|
-
* 3. If neither is available, silently does nothing — startup is just slower.
|
|
32
|
-
* @module
|
|
33
|
-
*/
|
|
2
|
+
* V8 compile cache helper for faster CLI startup.
|
|
3
|
+
*
|
|
4
|
+
* Enables the V8 compile cache so that subsequent runs of the CLI skip
|
|
5
|
+
* re-parsing and re-compiling JavaScript/TypeScript source files. This
|
|
6
|
+
* can reduce startup time by 30-70% for large CLI tools.
|
|
7
|
+
*
|
|
8
|
+
* ## When to use
|
|
9
|
+
*
|
|
10
|
+
* Call `enableCompileCache()` early in your CLI entry point, after heap
|
|
11
|
+
* tuning but before importing heavy modules:
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* // bin.ts
|
|
15
|
+
* import { applyHeapTuning } from "@visulima/cerebro/heap-tuning";
|
|
16
|
+
* import { enableCompileCache } from "@visulima/cerebro/compile-cache";
|
|
17
|
+
*
|
|
18
|
+
* applyHeapTuning();
|
|
19
|
+
* enableCompileCache();
|
|
20
|
+
*
|
|
21
|
+
* import { createCerebro } from "@visulima/cerebro";
|
|
22
|
+
* // ... rest of your CLI setup
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* ## How it works
|
|
26
|
+
*
|
|
27
|
+
* 1. Tries `module.enableCompileCache()` (Node.js 22.8+ native API) which
|
|
28
|
+
* stores compiled bytecode alongside source files for instant reuse.
|
|
29
|
+
* 2. If that's unavailable, falls back to the `v8-compile-cache` npm package
|
|
30
|
+
* which achieves a similar effect on older Node.js versions.
|
|
31
|
+
* 3. If neither is available, silently does nothing — startup is just slower.
|
|
32
|
+
* @module
|
|
33
|
+
*/
|
|
34
34
|
/**
|
|
35
|
-
* Enable V8 compile cache for faster subsequent CLI startups.
|
|
36
|
-
*
|
|
37
|
-
* Safe to call unconditionally — silently no-ops if the runtime doesn't
|
|
38
|
-
* support compile caching or the fallback package isn't installed.
|
|
39
|
-
*/
|
|
35
|
+
* Enable V8 compile cache for faster subsequent CLI startups.
|
|
36
|
+
*
|
|
37
|
+
* Safe to call unconditionally — silently no-ops if the runtime doesn't
|
|
38
|
+
* support compile caching or the fallback package isn't installed.
|
|
39
|
+
*/
|
|
40
40
|
declare const enableCompileCache: () => void;
|
|
41
41
|
export { enableCompileCache as default };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
interface HeapTuningOptions {
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
* Fraction of total system memory to allocate as `--max-old-space-size`.
|
|
4
|
+
* Must be between 0 and 1. Default: `0.75` (75%).
|
|
5
|
+
*/
|
|
6
6
|
maxOldSpacePercent?: number;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* Apply heap memory tuning to the current process.
|
|
10
|
-
*
|
|
11
|
-
* When tuning is needed, this function re-spawns the process with computed
|
|
12
|
-
* V8 memory flags and **never returns** — the parent exits with the child's
|
|
13
|
-
* exit code. When no tuning is needed (flags already set), it returns
|
|
14
|
-
* immediately.
|
|
15
|
-
* @param options Optional configuration for heap tuning.
|
|
16
|
-
*/
|
|
9
|
+
* Apply heap memory tuning to the current process.
|
|
10
|
+
*
|
|
11
|
+
* When tuning is needed, this function re-spawns the process with computed
|
|
12
|
+
* V8 memory flags and **never returns** — the parent exits with the child's
|
|
13
|
+
* exit code. When no tuning is needed (flags already set), it returns
|
|
14
|
+
* immediately.
|
|
15
|
+
* @param options Optional configuration for heap tuning.
|
|
16
|
+
*/
|
|
17
17
|
declare const applyHeapTuning: (options?: HeapTuningOptions) => void;
|
|
18
18
|
export { type HeapTuningOptions, applyHeapTuning };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as g}from"node:module";import{d as
|
|
1
|
+
import{createRequire as g}from"node:module";import{d as y,h as b,c as j,e as d,i as M}from"../../packem_shared/runtime-process-BEw54Ar-.js";let _;const h=e=>(_??=g(import.meta.url))(e),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=e=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[t,s]=o.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return o.getBuiltinModule(e)}return h(e)},{execFileSync:v}=u("node:child_process"),{totalmem:x}=u("node:os"),q=/--max-old-space-size=(\d+)/,z=/--max-semi-space-size=(\d+)/,E=e=>Math.floor(x()/1024/1024*e),P=e=>e<=512?4:e<=1024?8:e<=2048?16:e<=4096?32:e<=8192?64:Math.floor(Math.log2(e))*8,l=(e,t)=>{for(const s of t){const r=e.exec(s);if(r)return Number.parseInt(r[1],10)}},A=e=>{const t=e?.maxOldSpacePercent??.75,s=[...M()],r=[...y()],n=l(q,s),c=l(z,s);if(n!==void 0&&c!==void 0)return;const a=n??E(t),m=c??P(a),i=[];if(n===void 0&&i.push(`--max-old-space-size=${String(a)}`),c===void 0&&i.push(`--max-semi-space-size=${String(m)}`),i.length!==0)try{v(b(),[...i,...s,...r.slice(1)],{env:j(),stdio:"inherit"}),d(0)}catch(f){const p=f.status;d(typeof p=="number"?p:1)}};export{A as applyHeapTuning};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/cerebro",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "A delightful toolkit for building cross-runtime CLIs for Node.js, Deno, and Bun.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ansi",
|
|
@@ -119,15 +119,15 @@
|
|
|
119
119
|
"provenance": true
|
|
120
120
|
},
|
|
121
121
|
"dependencies": {
|
|
122
|
-
"@visulima/colorize": "2.0
|
|
123
|
-
"@visulima/tabular": "4.
|
|
122
|
+
"@visulima/colorize": "2.1.0",
|
|
123
|
+
"@visulima/tabular": "4.1.0",
|
|
124
124
|
"fastest-levenshtein": "^1.0.16"
|
|
125
125
|
},
|
|
126
126
|
"peerDependencies": {
|
|
127
127
|
"@bomb.sh/tab": ">=0.0.16",
|
|
128
|
-
"@visulima/boxen": "3.
|
|
129
|
-
"@visulima/find-cache-dir": "3.0.
|
|
130
|
-
"@visulima/pail": "4.0
|
|
128
|
+
"@visulima/boxen": "3.1.0",
|
|
129
|
+
"@visulima/find-cache-dir": "3.0.1",
|
|
130
|
+
"@visulima/pail": "4.1.0",
|
|
131
131
|
"github-slugger": ">=2.0.0"
|
|
132
132
|
},
|
|
133
133
|
"peerDependenciesMeta": {
|