+1
-1
@@ -1,1 +0,1 @@ | ||
| var t=require("fs/promises"),e=require("fs"),s=require("path"),r=Object.defineProperty,i={};((t,e)=>{for(var s in e)r(t,s,{get:e[s],enumerable:!0})})(i,{bgBlack:()=>w,bgBlue:()=>k,bgColor256:()=>N,bgCyan:()=>j,bgGreen:()=>v,bgHex:()=>I,bgMagenta:()=>O,bgRed:()=>x,bgRgb:()=>L,bgWhite:()=>C,bgYellow:()=>y,black:()=>f,blue:()=>u,bold:()=>E,color256:()=>F,cyan:()=>b,dim:()=>T,format:()=>c,gray:()=>$,green:()=>m,hex:()=>A,inverse:()=>M,isColorSupported:()=>o,italic:()=>S,magenta:()=>d,red:()=>l,reset:()=>h,rgb:()=>R,stripAnsi:()=>q,underline:()=>z,white:()=>g,yellow:()=>p});var n=process.env,o=!n.NO_COLOR&&(n.FORCE_COLOR||process.stdout&&process.stdout.isTTY||"xterm-256color"===n.TERM||"true"===n.CI),a=(t,e)=>o?`[${t}m${e}[0m`:e,c=a,h=t=>a(0,t),f=t=>a(30,t),l=t=>a(31,t),m=t=>a(32,t),p=t=>a(33,t),u=t=>a(34,t),d=t=>a(35,t),b=t=>a(36,t),g=t=>a(37,t),$=t=>a(90,t),w=t=>a(40,t),x=t=>a(41,t),v=t=>a(42,t),y=t=>a(43,t),k=t=>a(44,t),O=t=>a(45,t),j=t=>a(46,t),C=t=>a(47,t),E=t=>a(1,t),T=t=>a(2,t),S=t=>a(3,t),z=t=>a(4,t),M=t=>a(7,t),R=(t,e,s,r)=>o?`[38;2;${t};${e};${s}m${r}[0m`:r,L=(t,e,s,r)=>o?`[48;2;${t};${e};${s}m${r}[0m`:r,A=(t,e)=>{if(!o)return e;const s=t.replace("#","");return 6===s.length?R(parseInt(s.slice(0,2),16),parseInt(s.slice(2,4),16),parseInt(s.slice(4,6),16),e):e},I=(t,e)=>{if(!o)return e;const s=t.replace("#","");return 6===s.length?L(parseInt(s.slice(0,2),16),parseInt(s.slice(2,4),16),parseInt(s.slice(4,6),16),e):e},F=(t,e)=>o?`[38;5;${t}m${e}[0m`:e,N=(t,e)=>o?`[48;5;${t}m${e}[0m`:e,q=t=>t.replace(/\x1b\[[0-9;]*m/g,""),P={success:t=>A("#10b981",t),error:t=>A("#f43f5e",t),warn:t=>A("#f59e0b",t),info:t=>A("#38bdf8",t),prefix:{success:A("#10b981","β")+" "+A("#34d399",T("success")),error:A("#f43f5e","β")+" "+A("#fb7185",T("error")),warn:A("#f59e0b","β ")+" "+A("#fbbf24",T("warn")),info:A("#38bdf8","βΉ")+" "+A("#7dd3fc",T("info"))}},W={success:t=>t,error:t=>t,warn:t=>t,info:t=>t,prefix:{success:A("#10b981","β"),error:A("#f43f5e","β"),warn:A("#f59e0b","β "),info:A("#38bdf8","βΉ")}},B={success:t=>m(t),error:t=>l(t),warn:t=>p(t),info:t=>b(t),prefix:{success:m("SUCCESS"),error:l("ERROR"),warn:p("WARN"),info:b("INFO")}},U=P,D=(t=>(t[t.trace=10]="trace",t[t.debug=20]="debug",t[t.info=30]="info",t[t.success=35]="success",t[t.warn=40]="warn",t[t.error=50]="error",t[t.fatal=60]="fatal",t[t.none=100]="none",t))(D||{}),J=class{write(t){(t.levelValue>=50?console.error:console.log)(t.formatted)}},_={iso:"",formatted:""},V=new Set;function Y(t,e){V.clear();const s=JSON.stringify(t,(t,e)=>{if("object"==typeof e&&null!==e){if(V.has(e))return"[Circular]";V.add(e)}return e},e);return V.clear(),s}function G(t,e){if("object"!=typeof t||null===t||t instanceof Error)return t;if(Array.isArray(t))return t.map(t=>G(t,e));const s={};for(const[r,i]of Object.entries(t))s[r]=e.has(r.toLowerCase())?"[REDACTED]":"object"!=typeof i||null===i||i instanceof Error?i:G(i,e);return s}var H=class t{t;ts;c;lv;m;tr;tc={t:"",s:""};sp;rk;ns;gd=0;tm=new Map;sc=new Map;dm;constructor(t={},e={}){this.t={...U,...t.theme,prefix:{...U.prefix,...t.theme?.prefix}},this.ts=t.timestamps??!1,this.c=t.colors??Boolean(o),this.lv=D[t.level??"trace"],this.m=t.mode??"text",this.tr=t.transports??[new J],this.sp=t.sampling??{},this.rk=new Set((t.redact??[]).map(t=>t.toLowerCase())),this.ns=t.namespace??"",this.dm=e}child(e){const{namespace:s,...r}=e;return new t({theme:this.t,timestamps:this.ts,colors:this.c,level:Object.keys(D).find(t=>D[t]===this.lv),mode:this.m,transports:this.tr,sampling:this.sp,redact:Array.from(this.rk),namespace:s?this.ns?`${this.ns}:${s}`:s:this.ns},{...this.dm,...r})}group(t){if(30<this.lv)return;const e=this.getTs(),s=this.nsPrefix(),r=" ".repeat(this.gd);if("json"===this.m){const s=Y({level:"info",type:"groupStart",label:t,time:e.iso});this.dispatch("info",30,[t],s,s,e.iso)}else{const i=`${e.formatted}${s}${r}${this.c?E(b(`βΈ ${t}`)):`βΈ ${t}`}`;this.dispatch("info",30,[t],i,q(i),e.iso)}this.gd++}groupEnd(){this.gd>0&&this.gd--}time(t){this.tm.set(t,performance.now())}timeEnd(t){const e=this.tm.get(t);if(void 0===e)return;this.tm.delete(t);const s=performance.now()-e;this.info(`${t}: ${s<1?s.toFixed(3):Math.round(s)}ms`)}getTs(){if(!this.ts)return _;const t=(new Date).toISOString(),e=t.slice(11,19);if(this.tc.t===e)return{iso:t,formatted:this.tc.s};const s=$(`[${e}] `);return this.tc={t:e,s:s},{iso:t,formatted:s}}nsPrefix(){return this.ns?this.c?A("#a78bfa",`[${this.ns}] `):`[${this.ns}] `:""}hlJson(t){return!this.c||t.length>5e3?t:t.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,t=>'"'===t[0]?t.endsWith(":")?A("#9ca3af",t.slice(0,-1))+":":A("#34d399",t):A("true"===t||"false"===t?"#c084fc":"null"===t?"#f87171":"#fbbf24",t))}fmtErr(t){const e=t.stack||t.message;return this.c?e.split("\n").map((t,e)=>{if(0===e)return E(l(t));const s=t.match(/^(\s+at\s+)(.+?)(\s+\()?(.+?):(\d+):(\d+)\)?$/);return s?s[4].includes("node_modules")||s[4].startsWith("node:")?T(t):`${T(s[1])}${p(s[2])}${T(s[3]||" ")}${b(s[4])}:${A("#fbbf24",s[5])}:${T(s[6])}${s[3]?T(")"):""}`:t.match(/^\s+at\s+/)?T(t):l(t)}).join("\n"):e}fmtMsg(t){return t.map(t=>{if("string"==typeof t)return t;if(t instanceof Error)return"\n"+this.fmtErr(t);try{return"\n"+this.hlJson(Y(this.rk.size?G(t,this.rk):t,2))}catch{return"[Unserializable]"}}).join(" ")}emit(t,e,s,r){const i=D[t];if(i<this.lv)return;const n=this.getTs(),o=this.nsPrefix(),a=" ".repeat(this.gd);let c,h;if("json"===this.m){const e=r.map(t=>"object"!=typeof t||null===t||t instanceof Error||!this.rk.size?t:G(t,this.rk)),s={level:t,time:n.iso,message:1===e.length?e[0]:e};this.ns&&(s.namespace=this.ns),Object.keys(this.dm).length&&Object.assign(s,this.dm),c=h=Y(s)}else c=`${n.formatted}${o}${a}${e} ${s(this.fmtMsg(r))}`,h=q(c),this.c||(c=h);this.dispatch(t,i,r,c,h,n.iso)}dispatch(t,e,s,r,i,n){const o={level:t,levelValue:e,message:s,formatted:r,raw:i,timestamp:n,namespace:this.ns||void 0,meta:Object.keys(this.dm).length?this.dm:void 0};for(let t=0;t<this.tr.length;t++)this.tr[t]?.write(o)}success(...t){this.emit("success",this.t.prefix.success,this.t.success,t)}error(...t){this.emit("error",this.t.prefix.error,this.t.error,t)}warn(...t){this.emit("warn",this.t.prefix.warn,this.t.warn,t)}info(...t){this.emit("info",this.t.prefix.info,this.t.info,t)}trace(...t){this.emit("trace",$("π"),$,t)}debug(...t){this.emit("debug",A("#94a3b8","π"),t=>A("#94a3b8",t),t)}fatal(...t){this.emit("fatal",A("#be123c","π"),t=>A("#be123c",t),t)}box(t,e){if(30<this.lv)return;const s=e.split("\n"),r=Math.max(t.length,...s.map(t=>q(t).length))+4,i=`ββ ${t} ${"β".repeat(r-t.length-3)}β`,n=`β${"β".repeat(r)}β`;let o=[i,...s.map(t=>`β ${t}${" ".repeat(Math.max(0,r-q(t).length-2))} β`),n].join("\n");const a=q(o),c=this.getTs();if("json"===this.m){const s=Y({level:"info",time:c.iso,title:t,message:e});return void this.dispatch("info",30,[e],s,s,c.iso)}this.c&&(o=A("#38bdf8",o)),this.dispatch("info",30,[e],o,a,c.iso)}},K={b:1,kb:1024,mb:1048576,gb:1073741824};exports.ConsoleTransport=J,exports.FileTransport=class{fp;ms;mf;rot;sz=0;q=Promise.resolve();init=!1;constructor(t){this.fp=t.path,this.ms=function(t){if("number"==typeof t)return t;const e=t.trim().toLowerCase().match(/^([\d.]+)\s*(b|kb|mb|gb)?$/);return e?Math.floor(parseFloat(e[1])*K[e[2]||"b"]):10485760}(t.maxSize??"10mb"),this.mf=t.maxFiles??5,this.rot=t.rotate??!0;const r=s.dirname(this.fp);e.existsSync(r)||e.mkdirSync(r,{recursive:!0})}write(t){const e=t.raw+"\n";this.q=this.q.then(()=>this.flush(e))}async flush(e){if(!this.init){try{this.sz=(await t.stat(this.fp)).size}catch{this.sz=0}this.init=!0}const s=Buffer.byteLength(e,"utf8");if(this.rot&&this.sz+s>this.ms){for(let e=this.mf-1;e>=1;e--)try{await t.rename(1===e?this.fp:`${this.fp}.${e-1}`,`${this.fp}.${e}`)}catch{}try{await t.unlink(this.fp)}catch{}this.sz=0}await t.appendFile(this.fp,e,"utf8"),this.sz+=s}},exports.LogLevel=D,exports.Logger=H,exports.ansi=i,exports.classicTheme=B,exports.createLogger=t=>new H(t),exports.defaultTheme=U,exports.httpMiddleware=function(t,e={}){const s=e.warnAbove??400,r=e.errorAbove??500;return(e,i,n)=>{const o=performance.now(),a=e.method??"UNKNOWN",c=e.originalUrl??e.url??"/",h=()=>{const e=Math.round(performance.now()-o),n=i.statusCode??0,h=`${a} ${c} ${n} ${e}ms`;n>=r?t.error(h):n>=s?t.warn(h):t.info(h)},f=i.on,l=i.once;"function"==typeof f?f.call(i,"finish",h):"function"==typeof l&&l.call(i,"close",h),n()}},exports.minimalTheme=W,exports.modernTheme=P; | ||
| "use strict";var t=require("fs/promises"),e=require("fs"),s=require("path"),r=Object.defineProperty,i={};((t,e)=>{for(var s in e)r(t,s,{get:e[s],enumerable:!0})})(i,{bgBlack:()=>w,bgBlue:()=>k,bgColor256:()=>N,bgCyan:()=>j,bgGreen:()=>v,bgHex:()=>I,bgMagenta:()=>O,bgRed:()=>x,bgRgb:()=>L,bgWhite:()=>C,bgYellow:()=>y,black:()=>f,blue:()=>u,bold:()=>E,color256:()=>F,cyan:()=>b,dim:()=>T,format:()=>c,gray:()=>$,green:()=>m,hex:()=>A,inverse:()=>M,isColorSupported:()=>o,italic:()=>S,magenta:()=>d,red:()=>l,reset:()=>h,rgb:()=>R,stripAnsi:()=>q,underline:()=>z,white:()=>g,yellow:()=>p});var n=process.env,o=!n.NO_COLOR&&(n.FORCE_COLOR||process.stdout&&process.stdout.isTTY||"xterm-256color"===n.TERM||"true"===n.CI),a=(t,e)=>o?`[${t}m${e}[0m`:e,c=a,h=t=>a(0,t),f=t=>a(30,t),l=t=>a(31,t),m=t=>a(32,t),p=t=>a(33,t),u=t=>a(34,t),d=t=>a(35,t),b=t=>a(36,t),g=t=>a(37,t),$=t=>a(90,t),w=t=>a(40,t),x=t=>a(41,t),v=t=>a(42,t),y=t=>a(43,t),k=t=>a(44,t),O=t=>a(45,t),j=t=>a(46,t),C=t=>a(47,t),E=t=>a(1,t),T=t=>a(2,t),S=t=>a(3,t),z=t=>a(4,t),M=t=>a(7,t),R=(t,e,s,r)=>o?`[38;2;${t};${e};${s}m${r}[0m`:r,L=(t,e,s,r)=>o?`[48;2;${t};${e};${s}m${r}[0m`:r,A=(t,e)=>{if(!o)return e;const s=t.replace("#","");return 6===s.length?R(parseInt(s.slice(0,2),16),parseInt(s.slice(2,4),16),parseInt(s.slice(4,6),16),e):e},I=(t,e)=>{if(!o)return e;const s=t.replace("#","");return 6===s.length?L(parseInt(s.slice(0,2),16),parseInt(s.slice(2,4),16),parseInt(s.slice(4,6),16),e):e},F=(t,e)=>o?`[38;5;${t}m${e}[0m`:e,N=(t,e)=>o?`[48;5;${t}m${e}[0m`:e,q=t=>t.replace(/\x1b\[[0-9;]*m/g,""),P={success:t=>A("#10b981",t),error:t=>A("#f43f5e",t),warn:t=>A("#f59e0b",t),info:t=>A("#38bdf8",t),prefix:{success:A("#10b981","β")+" "+A("#34d399",T("success")),error:A("#f43f5e","β")+" "+A("#fb7185",T("error")),warn:A("#f59e0b","β ")+" "+A("#fbbf24",T("warn")),info:A("#38bdf8","βΉ")+" "+A("#7dd3fc",T("info"))}},W={success:t=>t,error:t=>t,warn:t=>t,info:t=>t,prefix:{success:A("#10b981","β"),error:A("#f43f5e","β"),warn:A("#f59e0b","β "),info:A("#38bdf8","βΉ")}},B={success:t=>m(t),error:t=>l(t),warn:t=>p(t),info:t=>b(t),prefix:{success:m("SUCCESS"),error:l("ERROR"),warn:p("WARN"),info:b("INFO")}},U=P,D=(t=>(t[t.trace=10]="trace",t[t.debug=20]="debug",t[t.info=30]="info",t[t.success=35]="success",t[t.warn=40]="warn",t[t.error=50]="error",t[t.fatal=60]="fatal",t[t.none=100]="none",t))(D||{}),J=class{write(t){(t.levelValue>=50?console.error:console.log)(t.formatted)}},_={iso:"",formatted:""},V=new Set;function Y(t,e){V.clear();const s=JSON.stringify(t,(t,e)=>{if("object"==typeof e&&null!==e){if(V.has(e))return"[Circular]";V.add(e)}return e},e);return V.clear(),s}function G(t,e){if("object"!=typeof t||null===t||t instanceof Error)return t;if(Array.isArray(t))return t.map(t=>G(t,e));const s={};for(const[r,i]of Object.entries(t))s[r]=e.has(r.toLowerCase())?"[REDACTED]":"object"!=typeof i||null===i||i instanceof Error?i:G(i,e);return s}var H=class t{t;ts;c;lv;m;tr;tc={t:"",s:""};sp;rk;ns;gd=0;tm=new Map;sc=new Map;dm;constructor(t={},e={}){this.t={...U,...t.theme,prefix:{...U.prefix,...t.theme?.prefix}},this.ts=t.timestamps??!1,this.c=t.colors??Boolean(o),this.lv=D[t.level??"trace"],this.m=t.mode??"text",this.tr=t.transports??[new J],this.sp=t.sampling??{},this.rk=new Set((t.redact??[]).map(t=>t.toLowerCase())),this.ns=t.namespace??"",this.dm=e}child(e){const{namespace:s,...r}=e;return new t({theme:this.t,timestamps:this.ts,colors:this.c,level:Object.keys(D).find(t=>D[t]===this.lv),mode:this.m,transports:this.tr,sampling:this.sp,redact:Array.from(this.rk),namespace:s?this.ns?`${this.ns}:${s}`:s:this.ns},{...this.dm,...r})}group(t){if(30<this.lv)return;const e=this.getTs(),s=this.nsPrefix(),r=" ".repeat(this.gd);if("json"===this.m){const s=Y({level:"info",type:"groupStart",label:t,time:e.iso});this.dispatch("info",30,[t],s,s,e.iso)}else{const i=`${e.formatted}${s}${r}${this.c?E(b(`βΈ ${t}`)):`βΈ ${t}`}`;this.dispatch("info",30,[t],i,q(i),e.iso)}this.gd++}groupEnd(){this.gd>0&&this.gd--}time(t){this.tm.set(t,performance.now())}timeEnd(t){const e=this.tm.get(t);if(void 0===e)return;this.tm.delete(t);const s=performance.now()-e;this.info(`${t}: ${s<1?s.toFixed(3):Math.round(s)}ms`)}getTs(){if(!this.ts)return _;const t=(new Date).toISOString(),e=t.slice(11,19);if(this.tc.t===e)return{iso:t,formatted:this.tc.s};const s=$(`[${e}] `);return this.tc={t:e,s:s},{iso:t,formatted:s}}nsPrefix(){return this.ns?this.c?A("#a78bfa",`[${this.ns}] `):`[${this.ns}] `:""}hlJson(t){return!this.c||t.length>5e3?t:t.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,t=>'"'===t[0]?t.endsWith(":")?A("#9ca3af",t.slice(0,-1))+":":A("#34d399",t):A("true"===t||"false"===t?"#c084fc":"null"===t?"#f87171":"#fbbf24",t))}fmtErr(t){const e=t.stack||t.message;return this.c?e.split("\n").map((t,e)=>{if(0===e)return E(l(t));const s=t.match(/^(\s+at\s+)(.+?)(\s+\()?(.+?):(\d+):(\d+)\)?$/);return s?s[4].includes("node_modules")||s[4].startsWith("node:")?T(t):`${T(s[1])}${p(s[2])}${T(s[3]||" ")}${b(s[4])}:${A("#fbbf24",s[5])}:${T(s[6])}${s[3]?T(")"):""}`:t.match(/^\s+at\s+/)?T(t):l(t)}).join("\n"):e}fmtMsg(t){return t.map(t=>{if("string"==typeof t)return t;if(t instanceof Error)return"\n"+this.fmtErr(t);try{return"\n"+this.hlJson(Y(this.rk.size?G(t,this.rk):t,2))}catch{return"[Unserializable]"}}).join(" ")}emit(t,e,s,r){const i=D[t];if(i<this.lv)return;const n=this.getTs(),o=this.nsPrefix(),a=" ".repeat(this.gd);let c,h;if("json"===this.m){const e=r.map(t=>"object"!=typeof t||null===t||t instanceof Error||!this.rk.size?t:G(t,this.rk)),s={level:t,time:n.iso,message:1===e.length?e[0]:e};this.ns&&(s.namespace=this.ns),Object.keys(this.dm).length&&Object.assign(s,this.dm),c=h=Y(s)}else c=`${n.formatted}${o}${a}${e} ${s(this.fmtMsg(r))}`,h=q(c),this.c||(c=h);this.dispatch(t,i,r,c,h,n.iso)}dispatch(t,e,s,r,i,n){const o={level:t,levelValue:e,message:s,formatted:r,raw:i,timestamp:n,namespace:this.ns||void 0,meta:Object.keys(this.dm).length?this.dm:void 0};for(let t=0;t<this.tr.length;t++)this.tr[t]?.write(o)}success(...t){this.emit("success",this.t.prefix.success,this.t.success,t)}error(...t){this.emit("error",this.t.prefix.error,this.t.error,t)}warn(...t){this.emit("warn",this.t.prefix.warn,this.t.warn,t)}info(...t){this.emit("info",this.t.prefix.info,this.t.info,t)}trace(...t){this.emit("trace",$("π"),$,t)}debug(...t){this.emit("debug",A("#94a3b8","π"),t=>A("#94a3b8",t),t)}fatal(...t){this.emit("fatal",A("#be123c","π"),t=>A("#be123c",t),t)}box(t,e){if(30<this.lv)return;const s=e.split("\n"),r=Math.max(t.length,...s.map(t=>q(t).length))+4,i=`ββ ${t} ${"β".repeat(r-t.length-3)}β`,n=`β${"β".repeat(r)}β`;let o=[i,...s.map(t=>`β ${t}${" ".repeat(Math.max(0,r-q(t).length-2))} β`),n].join("\n");const a=q(o),c=this.getTs();if("json"===this.m){const s=Y({level:"info",time:c.iso,title:t,message:e});return void this.dispatch("info",30,[e],s,s,c.iso)}this.c&&(o=A("#38bdf8",o)),this.dispatch("info",30,[e],o,a,c.iso)}},K={b:1,kb:1024,mb:1048576,gb:1073741824};exports.ConsoleTransport=J,exports.FileTransport=class{fp;ms;mf;rot;sz=0;q=Promise.resolve();init=!1;constructor(t){this.fp=t.path,this.ms=function(t){if("number"==typeof t)return t;const e=t.trim().toLowerCase().match(/^([\d.]+)\s*(b|kb|mb|gb)?$/);return e?Math.floor(parseFloat(e[1])*K[e[2]||"b"]):10485760}(t.maxSize??"10mb"),this.mf=t.maxFiles??5,this.rot=t.rotate??!0;const r=s.dirname(this.fp);e.existsSync(r)||e.mkdirSync(r,{recursive:!0})}write(t){const e=t.raw+"\n";this.q=this.q.then(()=>this.flush(e))}async flush(e){if(!this.init){try{this.sz=(await t.stat(this.fp)).size}catch{this.sz=0}this.init=!0}const s=Buffer.byteLength(e,"utf8");if(this.rot&&this.sz+s>this.ms){for(let e=this.mf-1;e>=1;e--)try{await t.rename(1===e?this.fp:`${this.fp}.${e-1}`,`${this.fp}.${e}`)}catch{}try{await t.unlink(this.fp)}catch{}this.sz=0}await t.appendFile(this.fp,e,"utf8"),this.sz+=s}},exports.LogLevel=D,exports.Logger=H,exports.ansi=i,exports.classicTheme=B,exports.createLogger=t=>new H(t),exports.defaultTheme=U,exports.httpMiddleware=function(t,e={}){const s=e.warnAbove??400,r=e.errorAbove??500;return(e,i,n)=>{const o=performance.now(),a=e.method??"UNKNOWN",c=e.originalUrl??e.url??"/",h=()=>{const e=Math.round(performance.now()-o),n=i.statusCode??0,h=`${a} ${c} ${n} ${e}ms`;n>=r?t.error(h):n>=s?t.warn(h):t.info(h)},f=i.on,l=i.once;"function"==typeof f?f.call(i,"finish",h):"function"==typeof l&&l.call(i,"close",h),n()}},exports.minimalTheme=W,exports.modernTheme=P; |
+1
-1
| { | ||
| "name": "devink", | ||
| "version": "2.0.0", | ||
| "version": "2.0.1", | ||
| "description": "Fast, lightweight, professional TypeScript logger with child loggers, HTTP middleware, file transport, log sampling, field redaction, and zero dependencies.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
+16
-37
@@ -20,3 +20,3 @@ <p align="center"> | ||
| ## π Features | ||
| ## Features | ||
@@ -32,4 +32,4 @@ - **Zero Dependencies** β Ultra-fast, nothing in `node_modules` except your own code. | ||
| - **Pretty Error Formatting** β Colored stack traces with highlighted source locations. | ||
| - **Full ANSI & 256/RGB Color Support** β Beautiful, soothing UI themes for the terminal. | ||
| - **Structured JSON Logging** β One-line switch to JSON for Datadog, ELK, AWS CloudWatch, and more. | ||
| - **Full ANSI & 256/RGB Color Support** β Beautiful themes for the terminal. | ||
| - **Structured JSON Logging** β One-line switch to JSON for Datadog, ELK, and more. | ||
| - **Log Levels & Priority Filtering** β Granular control via `trace`, `debug`, `info`, `warn`, `error`, and `fatal`. | ||
@@ -43,3 +43,3 @@ - **Custom Transports** β Route logs to files, external APIs, or custom formatting engines. | ||
| ## π¦ Installation | ||
| ## Installation | ||
@@ -60,3 +60,3 @@ ```bash | ||
| ## π» Quick Start | ||
| ## Quick Start | ||
@@ -124,3 +124,3 @@ ### Basic Logger | ||
| ## π HTTP Request Middleware | ||
| ## HTTP Request Middleware | ||
@@ -148,3 +148,3 @@ Framework-agnostic middleware that auto-logs every HTTP request with method, path, status code, and response time: | ||
| ## π Log Grouping / Indented Sections | ||
| ## Log Grouping | ||
@@ -177,3 +177,3 @@ Visually group related log lines for multi-step operations: | ||
| ## β± Performance Timers | ||
| ## Performance Timers | ||
@@ -198,3 +198,3 @@ Measure execution time for any operation directly from the logger: | ||
| ## π Log Sampling / Rate Limiting | ||
| ## Log Sampling | ||
@@ -217,3 +217,3 @@ In high-throughput production environments, log only a fraction of repetitive events: | ||
| ## π Async File Transport | ||
| ## File Transport | ||
@@ -243,3 +243,3 @@ Built-in file transport with async writes and automatic log rotation: | ||
| ## π Sensitive Field Redaction | ||
| ## Field Redaction | ||
@@ -261,3 +261,3 @@ Automatically mask sensitive data before it reaches any transport: | ||
| ## π₯ Pretty Error Formatting | ||
| ## Error Formatting | ||
@@ -282,3 +282,3 @@ When you pass an `Error` object, devink renders a beautiful, colored stack trace instead of a raw dump: | ||
| ## π Boxed Output | ||
| ## Boxed Output | ||
@@ -298,3 +298,3 @@ Make important startup messages or critical alerts pop in the console: | ||
| ## βοΈ Configuration | ||
| ## Configuration | ||
@@ -352,3 +352,3 @@ The `createLogger` function accepts an optional `LoggerOptions` object: | ||
| ## π¨ ANSI Utilities | ||
| ## ANSI Utilities | ||
@@ -368,26 +368,5 @@ Build your own CLI tools with devink's high-performance, zero-dependency ANSI utilities: | ||
| ## π Comparison: devink vs pino vs winston vs bunyan | ||
| | Feature | devink | pino | winston | bunyan | | ||
| | -------------------------- | ------ | -------------- | -------------- | ------------- | | ||
| | Zero Dependencies | β | β | β | β | | ||
| | TypeScript Native | β | β (types pkg) | β (types pkg) | β | | ||
| | Child Loggers | β | β | β | β | | ||
| | HTTP Middleware (built-in) | β | β (separate) | β (separate) | β | | ||
| | File Transport (built-in) | β | β (separate) | β | β | | ||
| | Log Rotation (built-in) | β | β | β (separate) | β (separate) | | ||
| | Log Sampling | β | β | β | β | | ||
| | Field Redaction | β | β | β | β | | ||
| | Pretty Error Formatting | β | β (separate) | β | β | | ||
| | Log Grouping | β | β | β | β | | ||
| | Performance Timers | β | β | β | β | | ||
| | Colored ANSI Output | β | β (separate) | β (separate) | β | | ||
| | Boxed Output | β | β | β | β | | ||
| | JSON Structured Logging | β | β | β | β | | ||
| | Custom Themes | β | β | β | β | | ||
| | Bundle Size | ~8KB | ~120KB | ~280KB | ~95KB | | ||
| --- | ||
| ## πΊοΈ Roadmap | ||
| ## Roadmap | ||
@@ -394,0 +373,0 @@ These features are planned for upcoming releases: |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
0
-100%46005
-3.98%373
-5.33%