Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lskjs/log

Package Overview
Dependencies
Maintainers
11
Versions
260
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lskjs/log - npm Package Compare versions

Comparing version 3.0.0-alpha.36 to 3.1.0-alpha.0

4

lib/cli.js
#!/usr/bin/env node
"use strict";var Be=Object.create;var I=Object.defineProperty;var _e=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Pe=Object.getPrototypeOf,Ae=Object.prototype.hasOwnProperty;var Fe=(e,r)=>{for(var t in r)I(e,t,{get:r[t],enumerable:!0})},x=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ce(r))!Ae.call(e,n)&&n!==t&&I(e,n,{get:()=>r[n],enumerable:!(o=_e(r,n))||o.enumerable});return e},h=(e,r,t)=>(x(e,r,"default"),t&&x(t,r,"default")),f=(e,r,t)=>(t=e!=null?Be(Pe(e)):{},x(r||!e||!e.__esModule?I(t,"default",{value:e,enumerable:!0}):t,e));var de=f(require("readline")),he=f(require("split")),ve=f(require("through"));var D=require("@lskjs/algos"),a=require("@lskjs/env");function N(e=""){let r=[],t=[],o,n=(typeof e=="string"?e:"").split(/[\s,]+/);for(o=0;o<n.length;o++){if(!n[o])continue;let s=n[o].replace(/\*/g,".*?");s[0]==="-"?t.push(new RegExp(`^${s.slice(1)}$`)):r.push(new RegExp(`^${s}$`))}return{on:r,off:t}}var k=a.isDev||a.isClient?"pretty":"lsk",$=()=>{let e=(0,a.getEnvVar)("DEBUG","")||"",r=typeof process&&process.argv?.includes("--silent"),t=e.startsWith("lsk")||e.startsWith("*"),o=(0,a.getEnvVar)("LOG_FORMAT",(0,a.getEnvVar)("DEBUG_FORMAT",k)),{on:n,off:s}=N(e),l=(0,a.getEnvVar)("LOG_LEVEL",(0,a.getEnvVar)("DEBUG_LEVEL",r?"error":t?"trace":"debug"));return(0,D.omitNull)({format:o,level:l,on:n,off:s})};var me=require("@lskjs/algos");var w={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},z={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},T=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],E=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var u=require("@lskjs/err");var c={};Fe(c,{default:()=>G.default,stringify:()=>v.default});h(c,require("fast-safe-stringify"));var v=f(require("fast-safe-stringify")),G=f(require("fast-safe-stringify"));var g=(e,r=null,t=0)=>typeof e=="object"?(0,v.default)(e,r,t):String(e);var U=e=>e.map(r=>(0,u.isError)(r)?(0,u.getCode)(r):null).filter(Boolean)[0],V=e=>e.length?e.map(r=>(0,u.isError)(r)?(0,u.getMessage)(r):g(r)).join(" "):null;var K=require("@lskjs/env"),m=(e,r)=>{let t=[];return e!==null&&t.push((0,K.tryJSONparse)(e)),Object.keys(r).length&&t.push(r),t};var Oe={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"},We={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60},J=e=>Boolean(e.name&&e.hostname&&e.pid&&e.msg&&e.time),Y=e=>{let{level:r,time:t,msg:o,hostname:n,pid:s,v:i,...l}=e;return{format:"bunyan",meta:{level:Oe[r],time:new Date(t)},args:m(o,l)}},H=e=>{let{level:r,time:t,...o}=e;return g({level:We[r],time:t.toISOString(),...o})};var Ne=["trace","debug","info","warning","error","fatal","panic"],De={trace:"trace",debug:"debug",info:"info",warning:"warn",error:"error",fatal:"fatal",panic:"fatal"},$e={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"},Q=e=>Boolean(e.msg&&Ne.includes(e.level)),X=e=>{let{level:r,time:t,msg:o,...n}=e;return{format:"logrus",meta:{level:De[r],time:new Date(t)},args:m(o,n)}},Z=e=>{let{level:r,time:t,...o}=e;return g({level:$e[r],time:t.toISOString(),...o})};var j=["trace","debug","info","warn","error","fatal"];var q=e=>Boolean(j.includes(e.level)&&e.ns),ee=e=>Boolean(j.includes(e.level)),p=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url)),R=e=>Boolean(p(e)&&(e.status||e.duration||e.length)),S=e=>{let{level:r,time:t,msg:o,ns:n,name:s,...i}=e,l={level:r,time:t,msg:o,ns:n,name:s};if(!p(e))return{format:"lsklogweb",meta:l,args:m(o,i)};let{reqId:be,method:xe,host:Ie,ua:ke,ip:we,url:Te,status:Ee,length:Me,duration:Re,...Se}=i;return{format:"lsklog",meta:{...l,method:xe,host:Ie,reqId:be,ua:ke,ip:we,url:Te,status:Ee,duration:Re,length:Me},args:m(o,Se)}},re=e=>{let{level:r,time:t,...o}=e;return g({level:r,time:+t,...o})};function ze(e){return J(e)?"bunyan":q(e)?"lsklog":p(e)?"lsklogweb":Q(e)?"logrus":ee(e)?"lsklog":null}function te(e,r,...t){let o=U(t),n=V(t),s={code:o,...r,msg:n};return e==="bunyan"?H(s):e==="logrus"?Z(s):re(s)}function oe(e){let r=ze(e);return r==="bunyan"?Y(e):r==="lsklogweb"?S(e):r==="lsklog"?S(e):r==="logrus"?X(e):{format:r,meta:{},args:[e]}}var se=require("@lskjs/colors"),ie=require("@lskjs/env"),le=f(require("pretty-bytes")),ae=f(require("pretty-time"));var _=require("@lskjs/colors");var B=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((r,t)=>{let o=(r<<5)-r+t.charCodeAt(0);return o&o},0)-48),ne=B;function C(e,r){let t=T[ne(r||"")%T.length]||[];return(0,_.colorize)(e,t)}function L(e,r){let t=r?z[r]:[];return(0,_.colorize)(e,t)}var Ge=(0,ie.getEnvVar)("LOG_VIEW","short"),d=(e,r)=>String(e).padStart(r),Ue=(e,r)=>String(e).padEnd(r),P=20,Ve=(e,r=0)=>(P=Math.max(e&&e.length||0,P,r),Ue(e,P)),ge=e=>e>=500?"error":e>=400?"warn":e>=300?"debug":null,Ke=e=>{let r=ge(e);return r||(r=e!==200?"log":null),L(d(String(e),3),r)},Je=e=>d(`#${e}`,3),Ye=e=>{let r=e==="REMOVE"?"error":e==="WS"?"debug":null;return L(d(e,4),r)},He=(e,r="")=>{if(!Number.isFinite(e))return null;let t=e>=10*1e3?"error":e>=3*1e3?"warn":null,n=["m","s","ms"].includes(r)?r:"",s=Math.floor(Math.abs(e)*10**6),i=(0,ae.default)(s,n);return L(d(i,5),t)},Qe=(e,r="")=>{if(!Number.isFinite(e))return null;let t=(0,le.default)(e,{maximumFractionDigits:1}).split(" "),o=t[1];return`${+t[0]>=100?Math.round(+t[0]):+t[0]}${r}${o}`},pe=(e,r)=>[...e,r].filter(Boolean).map(String).map(o=>C(o,o)).join(":");function Xe(e){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],t=r[B(e)%r.length];return C(t,String(e))}var A=e=>{let r=Ge==="short"?(e[0]||"").toLowerCase():d(e,5);return r=`[${r}]`,L(r,e)},Ze=/\[[^"\]]+]/gm,fe=(...e)=>{let r=[];return e.forEach(t=>{if(typeof t=="string"){let o=0;r.push(t.replace(Ze,n=>(0,se.colorize)(n,E[o++%E.length])))}else r.push(t)}),r},je=e=>ge(e.status)||R(e)?"debug":"trace",ue=e=>{let r=R(e),t=je(e);return[A(t),[Xe(e.reqId),Ye(e.method)].join(""),Ve(e.url),Je(e.reqId),r&&e.method!=="WS"?Ke(e.status):null,!r&&"\u29D7\u29D6\u29D7",r&&He(e.duration),r&&e.method!=="WS"?Qe(e.length):null].filter(Boolean).join(" ")};function qe(e,r){let t=0;return e.forEach((o,n)=>{n===t&&r(o)&&(t+=1)}),t}function er(...e){let r=qe(e,t=>typeof t=="string");return[e.slice(0,r).join(" "),...e.slice(r)]}function y(e,...r){let t=e?.ns,o=e?.name,n=e?.level||"log",s=r;if(p(e))return[ue(e)];let i=(t||"").split(":").filter(Boolean).map(String),l=[A(n)];return(i.length||o)&&l.push(pe(i,o)),er(...l,...fe(...s))}function F(e,r){Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++)if(e[t].test(r))return!0;return!1}var b=class{prefix;ns;name;format=k;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:t,name:o,level:n,format:s,on:i=[],off:l=[]}){if(r&&(this.prefix=r),t&&(this.ns=t),i&&(this.on=i),l&&(this.off=l),o&&(this.name=o),s&&(this.format=s),n){if(!w[n])throw new Error(`Incorrect level: ${this.level}`);this.level=n}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let t=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:t},...r)}getLevelPriority(r){return w[r]||0}canLog(r){let t=this.getLevelPriority(r),o=this.getLevelPriority(this.level);return this.ns&&F(this.off,this.ns)?!1:this.ns&&F(this.on,this.ns)?!0:t>=o}fatal(...r){!this.canLog("fatal")||this.__log("fatal",...r)}error(...r){!this.canLog("error")||this.__log("error",...r)}warn(...r){!this.canLog("warn")||this.__log("warn",...r)}debug(...r){!this.canLog("debug")||this.__log("debug",...r)}info(...r){!this.canLog("info")||this.__log("info",...r)}trace(...r){!this.canLog("trace")||this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...t){let[o,...n]=t,s={name:this.name,ns:this.ns,level:r,time:new Date},i=t;if(p(o)&&(s={...s,...o},i=n),this.format==="none")return;let l=(0,me.omitNull)(s);if(this.format==="pretty"){this.log(...y(l,...i));return}this.log(te(this.format||"lsk",l,...i))}};var O=new b($());var Le=require("@lskjs/env");var ce=require("@lskjs/algos"),rr=require("logfmt"),ye=(e,r=e)=>{try{if(typeof e!="string")return e;if(!e.trim())return r;let t=rr.parse(e);return Object.keys(t).includes("")||Object.keys(t).length<2||(0,ce.count)(t,o=>o===!0)>=Object.keys(t).length/2?r:t}catch{return r}};var W=(e,r)=>{let t,o;if(typeof r=="string"&&(!t&&!!r.trim()&&(t=(0,Le.tryJSONparse)(r,null),t!==null&&(o="json")),!t&&!!r.trim()&&(t=ye(r,null),t!==null&&(o="logfmt"))),t===null&&(t=null,o="raw"),!t){e.log(...y({},r));return}if(typeof t!="object"){e.log(...y({},t));return}let{meta:n,args:s=[]}=oe(t);e.log(...y(n,...s))};process.env.LSK_LOG_READLINE!=="0"?de.default.createInterface({input:process.stdin}).on("line",e=>{W(O,e)}):process.stdin.pipe((0,he.default)()).pipe((0,ve.default)(function(e){if(!e){this.emit("data",`${e}
`);return}W(O,e)})).pipe(process.stdout);
"use strict";var Ot=Object.create;var v=Object.defineProperty;var It=Object.getOwnPropertyDescriptor;var Wt=Object.getOwnPropertyNames;var At=Object.getPrototypeOf,Mt=Object.prototype.hasOwnProperty;var o=(t,r)=>v(t,"name",{value:r,configurable:!0});var Nt=(t,r)=>{for(var e in r)v(t,e,{get:r[e],enumerable:!0})},S=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of Wt(r))!Mt.call(t,s)&&s!==e&&v(t,s,{get:()=>r[s],enumerable:!(n=It(r,s))||n.enumerable});return t},k=(t,r,e)=>(S(t,r,"default"),e&&S(e,r,"default")),m=(t,r,e)=>(e=t!=null?Ot(At(t)):{},S(r||!t||!t.__esModule?v(e,"default",{value:t,enumerable:!0}):e,t));var xt=m(require("readline")),Lt=m(require("split")),bt=m(require("through"));var T=require("@lskjs/algos"),p=require("@lskjs/env");function D(t=""){let r=[],e=[],n,s=(typeof t=="string"?t:"").split(/[\s,]+/);for(n=0;n<s.length;n++){if(!s[n])continue;let i=s[n].replace(/\*/g,".*?");i[0]==="-"?e.push(new RegExp(`^${i.slice(1)}$`)):r.push(new RegExp(`^${i}$`))}return{on:r,off:e}}o(D,"parseNs");var _=p.isDev||p.isClient?"pretty":"lsk",z=o(()=>{let t=(0,p.getEnvVar)("DEBUG","")||"",r=process.argv?.includes("--silent"),e=t.startsWith("lsk")||t.startsWith("*"),n=(0,p.getEnvVar)("LOG_FORMAT",(0,p.getEnvVar)("DEBUG_FORMAT",_)),{on:s,off:i}=D(t),a=(0,p.getEnvVar)("LOG_LEVEL",(0,p.getEnvVar)("DEBUG_LEVEL",r?"error":e?"trace":"debug"));return(0,T.omitNull)({format:n,level:a,on:s,off:i})},"getEnvConfig");var gt=require("@lskjs/algos");var E={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},G={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},B=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],C=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var f;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(f||(f={}));var g=require("@lskjs/err");var d={};Nt(d,{default:()=>U.default,stringify:()=>w.default});k(d,require("fast-safe-stringify"));var w=m(require("fast-safe-stringify")),U=m(require("fast-safe-stringify"));var u=o((t,r=null,e=0)=>typeof t=="object"?(0,w.default)(t,r,e):String(t),"toString");var V=o(t=>t.map(r=>(0,g.isError)(r)?(0,g.getCode)(r):null).filter(Boolean)[0],"getErrCode"),J=o(t=>t.length?t.map(r=>(0,g.isError)(r)?(0,g.getMessage)(r):u(r)).join(" "):null,"createMsg");var Y=require("@lskjs/env");var h=o((t,r)=>{let e=[];return t!==null&&e.push((0,Y.tryJSONparse)(t)),Object.keys(r).length&&e.push(r),e},"parseArgs");var Pt={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"},$t={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60},H=o(t=>Boolean(t.name&&t.hostname&&t.pid&&t.msg&&t.time),"isBunyan"),K=o(t=>{let{level:r,time:e,msg:n,hostname:s,pid:i,v:l,...a}=t;return{format:f.bunyan,meta:{level:Pt[r],time:new Date(e)},args:h(n,a)}},"parseBunyan"),Q=o(t=>{let{level:r,time:e,...n}=t;return u({level:$t[r],time:e.toISOString(),...n})},"stringifyBunyan");var Dt=["trace","debug","info","warning","error","fatal","panic"],Tt={trace:"trace",debug:"debug",info:"info",warning:"warn",error:"error",fatal:"fatal",panic:"fatal"},zt={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"},X=o(t=>Boolean(t.msg&&Dt.includes(t.level)),"isLogrus"),Z=o(t=>{let{level:r,time:e,msg:n,...s}=t;return{format:f.logrus,meta:{level:Tt[r],time:new Date(e)},args:h(n,s)}},"parseLogrus"),j=o(t=>{let{level:r,time:e,...n}=t;return u({level:zt[r],time:e.toISOString(),...n})},"stringifyLogrus");var q=["trace","debug","info","warn","error","fatal"];var tt=o(t=>Boolean(q.includes(t.level)&&t.ns),"isLsklog"),rt=o(t=>Boolean(q.includes(t.level)),"isLskLikelog"),c=o(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb"),R=o(t=>Boolean(c(t)&&(t.status||t.duration||t.length)),"isLsklogWebFinal"),F=o(t=>{let{level:r,time:e,msg:n,ns:s,name:i,...l}=t,a={level:r,time:e,msg:n,ns:s,name:i};if(!c(t))return{format:f.lsklogweb,meta:a,args:h(n,l)};let{reqId:vt,method:kt,host:wt,ua:St,ip:_t,url:Et,status:Bt,length:Ct,duration:Rt,...Ft}=l;return{format:f.lsklog,meta:{...a,method:kt,host:wt,reqId:vt,ua:St,ip:_t,url:Et,status:Bt,duration:Rt,length:Ct},args:h(n,Ft)}},"parseLsklog"),et=o(t=>{let{level:r,time:e,...n}=t;return u({level:r,time:+e,...n})},"stringifyLsklog");function Gt(t){return H(t)?f.bunyan:tt(t)?f.lsklog:c(t)?f.lsklogweb:X(t)?f.logrus:rt(t)?f.lsklog:null}o(Gt,"detectFormat");function ot(t,r,...e){let n=V(e),s=J(e),i={code:n,...r,msg:s};return t==="bunyan"?Q(i):t==="logrus"?j(i):et(i)}o(ot,"stringify");function nt(t){let r=Gt(t);return r==="bunyan"?K(t):r==="lsklogweb"?F(t):r==="lsklog"?F(t):r==="logrus"?Z(t):{format:r,meta:{},args:[t]}}o(nt,"parse");var it=require("@lskjs/colors"),lt=require("@lskjs/env"),at=m(require("pretty-bytes")),ft=m(require("pretty-time"));var I=require("@lskjs/colors");var O=o(t=>typeof t=="number"?t:Math.abs(String(t).split("").reduce((r,e)=>{let n=(r<<5)-r+e.charCodeAt(0);return n&n},0)-48),"hashCode"),st=O;function W(t,r){let e=B[st(r||"")%B.length]||[];return(0,I.colorize)(t,e)}o(W,"themeizeRandom");function x(t,r){let e=r?G[r]:[];return(0,I.colorize)(t,e)}o(x,"themeize");var Ut=(0,lt.getEnvVar)("LOG_VIEW","short"),L=o((t,r)=>String(t).padStart(r),"leftPad"),Vt=o((t,r)=>String(t).padEnd(r),"rightPad"),A=20,Jt=o((t,r=0)=>(A=Math.max(t&&t.length||0,A,r),Vt(t,A)),"prettyPath"),pt=o(t=>t>=500?"error":t>=400?"warn":t>=300?"debug":null,"getStatusLevel"),Yt=o(t=>{let r=pt(t);return r||(r=t!==200?"log":null),x(L(String(t),3),r)},"prettyStatus"),Ht=o(t=>L(`#${t}`,3),"prettyReqId"),Kt=o(t=>{let r=t==="REMOVE"?"error":t==="WS"?"debug":null;return x(L(t,4),r)},"prettyMethod"),Qt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=t>=10*1e3?"error":t>=3*1e3?"warn":null,s=["m","s","ms"].includes(r)?r:"",i=Math.floor(Math.abs(t)*10**6),l=(0,ft.default)(i,s);return x(L(l,5),e)},"prettyTime"),Xt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=(0,at.default)(t,{maximumFractionDigits:1}).split(" "),n=e[1];return`${+e[0]>=100?Math.round(+e[0]):+e[0]}${r}${n}`},"prettySize"),ut=o((t,r)=>[...t,r].filter(Boolean).map(String).map(n=>W(n,n)).join(":"),"prettyNs");function Zt(t){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],e=r[O(t)%r.length];return W(e,String(t))}o(Zt,"prettyMarker");var M=o(t=>{let r=Ut==="short"?(t[0]||"").toLowerCase():L(t,5);return r=`[${r}]`,x(r,t)},"prettyLevel"),jt=/\[[^"\]]+]/gm,ct=o((...t)=>{let r=[];return t.forEach(e=>{if(typeof e=="string"){let n=0;r.push(e.replace(jt,s=>(0,it.colorize)(s,C[n++%C.length])))}else r.push(e)}),r},"prettyContent"),qt=o(t=>pt(t.status)||R(t)?"debug":"trace","getUrlLevel"),mt=o(t=>{let r=R(t),e=qt(t);return[M(e),[Zt(t.reqId),Kt(t.method)].join(""),Jt(t.url),Ht(t.reqId),r&&t.method!=="WS"?Yt(t.status):null,!r&&"\u29D7\u29D6\u29D7",r&&Qt(t.duration),r&&t.method!=="WS"?Xt(t.length):null].filter(Boolean).join(" ")},"prettyUrl");function tr(t,r){let e=0;return t.forEach((n,s)=>{s===e&&r(n)&&(e+=1)}),e}o(tr,"countInRow");function rr(...t){let r=tr(t,e=>typeof e=="string");return[t.slice(0,r).join(" "),...t.slice(r)]}o(rr,"concatFirstStrings");function y(t,...r){let e=t?.ns,n=t?.name,s=t?.level||"log",i=r;if(c(t))return[mt(t)];let l=(e||"").split(":").filter(Boolean).map(String),a=[M(s)];return(l.length||n)&&a.push(ut(l,n)),rr(...a,...ct(...i))}o(y,"prettyFormat");function N(t,r){Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++)if(t[e].test(r))return!0;return!1}o(N,"anyRegExps");var b=class{format=_;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:e,name:n,level:s,format:i,on:l=[],off:a=[]}){if(r&&(this.prefix=r),e&&(this.ns=e),l&&(this.on=l),a&&(this.off=a),n&&(this.name=n),i&&(this.format=i),s){if(!E[s])throw new Error(`Incorrect level: ${this.level}`);this.level=s}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let e=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:e},...r)}getLevelPriority(r){return E[r]||0}canLog(r){let e=this.getLevelPriority(r),n=this.getLevelPriority(this.level);return this.ns&&N(this.off,this.ns)?!1:this.ns&&N(this.on,this.ns)?!0:e>=n}fatal(...r){this.canLog("fatal")&&this.__log("fatal",...r)}error(...r){this.canLog("error")&&this.__log("error",...r)}warn(...r){this.canLog("warn")&&this.__log("warn",...r)}debug(...r){this.canLog("debug")&&this.__log("debug",...r)}info(...r){this.canLog("info")&&this.__log("info",...r)}trace(...r){this.canLog("trace")&&this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...e){let[n,...s]=e,i={name:this.name,ns:this.ns,level:r,time:new Date},l=e;if(c(n)&&(i={...i,...n},l=s),this.format==="none")return;let a=(0,gt.omitNull)(i);if(this.format==="pretty"){this.log(...y(a,...l));return}this.log(ot(this.format||"lsk",a,...l))}};o(b,"Logger");var P=new b(z());var yt=require("@lskjs/env");var ht=require("@lskjs/algos");var er=require("logfmt"),dt=o((t,r=t)=>{try{if(typeof t!="string")return t;if(!t.trim())return r;let e=er.parse(t);return Object.keys(e).includes("")||Object.keys(e).length<2||(0,ht.count)(e,n=>n===!0)>=Object.keys(e).length/2?r:e}catch{return r}},"tryLogfmtParse");var $=o((t,r)=>{let e,n;if(typeof r=="string"&&(!e&&r.trim()&&(e=(0,yt.tryJSONparse)(r,null),e!==null&&(n="json")),!e&&r.trim()&&(e=dt(r,null),e!==null&&(n="logfmt"))),e===null&&(e=null,n="raw"),!e){t.log(...y({},r));return}if(typeof e!="object"){t.log(...y({},e));return}let{meta:s,args:i=[]}=nt(e);t.log(...y(s,...i))},"prettyRawLog");process.env.LSK_LOG_READLINE!=="0"?xt.default.createInterface({input:process.stdin}).on("line",t=>{$(P,t)}):process.stdin.pipe((0,Lt.default)()).pipe((0,bt.default)(function(t){if(!t){this.emit("data",`${t}
`);return}$(P,t)})).pipe(process.stdout);
//# sourceMappingURL=cli.js.map

@@ -1,2 +0,2 @@

"use strict";var re=Object.create;var L=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty;var P=(e,r)=>{for(var t in r)L(e,t,{get:r[t],enumerable:!0})},y=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of oe(r))!se.call(e,n)&&n!==t&&L(e,n,{get:()=>r[n],enumerable:!(o=te(r,n))||o.enumerable});return e},d=(e,r,t)=>(y(e,r,"default"),t&&y(t,r,"default")),h=(e,r,t)=>(t=e!=null?re(ne(e)):{},y(r||!e||!e.__esModule?L(t,"default",{value:e,enumerable:!0}):t,e)),ie=e=>y(L({},"__esModule",{value:!0}),e);var ke={};P(ke,{Logger:()=>b,default:()=>k});module.exports=ie(ke);var ee=require("@lskjs/algos");var x={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},A={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},I=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],w=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var le=require("@lskjs/algos"),f=require("@lskjs/env");var F=f.isDev||f.isClient?"pretty":"lsk";var g=require("@lskjs/err");var p={};P(p,{default:()=>W.default,stringify:()=>v.default});d(p,require("fast-safe-stringify"));var v=h(require("fast-safe-stringify")),W=h(require("fast-safe-stringify"));var a=(e,r=null,t=0)=>typeof e=="object"?(0,v.default)(e,r,t):String(e);var N=e=>e.map(r=>(0,g.isError)(r)?(0,g.getCode)(r):null).filter(Boolean)[0],O=e=>e.length?e.map(r=>(0,g.isError)(r)?(0,g.getMessage)(r):a(r)).join(" "):null;var ae=require("@lskjs/env");var ge={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60};var $=e=>{let{level:r,time:t,...o}=e;return a({level:ge[r],time:t.toISOString(),...o})};var pe={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"};var z=e=>{let{level:r,time:t,...o}=e;return a({level:pe[r],time:t.toISOString(),...o})};var u=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url)),M=e=>Boolean(u(e)&&(e.status||e.duration||e.length));var G=e=>{let{level:r,time:t,...o}=e;return a({level:r,time:+t,...o})};function U(e,r,...t){let o=N(t),n=O(t),s={code:o,...r,msg:n};return e==="bunyan"?$(s):e==="logrus"?z(s):G(s)}var K=require("@lskjs/colors"),J=require("@lskjs/env"),Y=h(require("pretty-bytes")),H=h(require("pretty-time"));var E=require("@lskjs/colors");var B=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((r,t)=>{let o=(r<<5)-r+t.charCodeAt(0);return o&o},0)-48),V=B;function R(e,r){let t=I[V(r||"")%I.length]||[];return(0,E.colorize)(e,t)}function m(e,r){let t=r?A[r]:[];return(0,E.colorize)(e,t)}var ue=(0,J.getEnvVar)("LOG_VIEW","short"),c=(e,r)=>String(e).padStart(r),fe=(e,r)=>String(e).padEnd(r),S=20,me=(e,r=0)=>(S=Math.max(e&&e.length||0,S,r),fe(e,S)),Q=e=>e>=500?"error":e>=400?"warn":e>=300?"debug":null,ce=e=>{let r=Q(e);return r||(r=e!==200?"log":null),m(c(String(e),3),r)},ye=e=>c(`#${e}`,3),Le=e=>{let r=e==="REMOVE"?"error":e==="WS"?"debug":null;return m(c(e,4),r)},de=(e,r="")=>{if(!Number.isFinite(e))return null;let t=e>=10*1e3?"error":e>=3*1e3?"warn":null,n=["m","s","ms"].includes(r)?r:"",s=Math.floor(Math.abs(e)*10**6),i=(0,H.default)(s,n);return m(c(i,5),t)},he=(e,r="")=>{if(!Number.isFinite(e))return null;let t=(0,Y.default)(e,{maximumFractionDigits:1}).split(" "),o=t[1];return`${+t[0]>=100?Math.round(+t[0]):+t[0]}${r}${o}`},X=(e,r)=>[...e,r].filter(Boolean).map(String).map(o=>R(o,o)).join(":");function ve(e){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],t=r[B(e)%r.length];return R(t,String(e))}var _=e=>{let r=ue==="short"?(e[0]||"").toLowerCase():c(e,5);return r=`[${r}]`,m(r,e)},be=/\[[^"\]]+]/gm,Z=(...e)=>{let r=[];return e.forEach(t=>{if(typeof t=="string"){let o=0;r.push(t.replace(be,n=>(0,K.colorize)(n,w[o++%w.length])))}else r.push(t)}),r},xe=e=>Q(e.status)||M(e)?"debug":"trace",j=e=>{let r=M(e),t=xe(e);return[_(t),[ve(e.reqId),Le(e.method)].join(""),me(e.url),ye(e.reqId),r&&e.method!=="WS"?ce(e.status):null,!r&&"\u29D7\u29D6\u29D7",r&&de(e.duration),r&&e.method!=="WS"?he(e.length):null].filter(Boolean).join(" ")};function Ie(e,r){let t=0;return e.forEach((o,n)=>{n===t&&r(o)&&(t+=1)}),t}function we(...e){let r=Ie(e,t=>typeof t=="string");return[e.slice(0,r).join(" "),...e.slice(r)]}function q(e,...r){let t=e?.ns,o=e?.name,n=e?.level||"log",s=r;if(u(e))return[j(e)];let i=(t||"").split(":").filter(Boolean).map(String),l=[_(n)];return(i.length||o)&&l.push(X(i,o)),we(...l,...Z(...s))}function C(e,r){Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++)if(e[t].test(r))return!0;return!1}var b=class{prefix;ns;name;format=F;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:t,name:o,level:n,format:s,on:i=[],off:l=[]}){if(r&&(this.prefix=r),t&&(this.ns=t),i&&(this.on=i),l&&(this.off=l),o&&(this.name=o),s&&(this.format=s),n){if(!x[n])throw new Error(`Incorrect level: ${this.level}`);this.level=n}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let t=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:t},...r)}getLevelPriority(r){return x[r]||0}canLog(r){let t=this.getLevelPriority(r),o=this.getLevelPriority(this.level);return this.ns&&C(this.off,this.ns)?!1:this.ns&&C(this.on,this.ns)?!0:t>=o}fatal(...r){!this.canLog("fatal")||this.__log("fatal",...r)}error(...r){!this.canLog("error")||this.__log("error",...r)}warn(...r){!this.canLog("warn")||this.__log("warn",...r)}debug(...r){!this.canLog("debug")||this.__log("debug",...r)}info(...r){!this.canLog("info")||this.__log("info",...r)}trace(...r){!this.canLog("trace")||this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...t){let[o,...n]=t,s={name:this.name,ns:this.ns,level:r,time:new Date},i=t;if(u(o)&&(s={...s,...o},i=n),this.format==="none")return;let l=(0,ee.omitNull)(s);if(this.format==="pretty"){this.log(...q(l,...i));return}this.log(U(this.format||"lsk",l,...i))}},k=b;0&&(module.exports={Logger});
"use strict";var et=Object.create;var m=Object.defineProperty;var ot=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var st=Object.getPrototypeOf,it=Object.prototype.hasOwnProperty;var o=(t,r)=>m(t,"name",{value:r,configurable:!0});var I=(t,r)=>{for(var e in r)m(t,e,{get:r[e],enumerable:!0})},b=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of nt(r))!it.call(t,s)&&s!==e&&m(t,s,{get:()=>r[s],enumerable:!(n=ot(r,s))||n.enumerable});return t},L=(t,r,e)=>(b(t,r,"default"),e&&b(e,r,"default")),v=(t,r,e)=>(e=t!=null?et(st(t)):{},b(r||!t||!t.__esModule?m(e,"default",{value:t,enumerable:!0}):e,t)),lt=t=>b(m({},"__esModule",{value:!0}),t);var _t={};I(_t,{Logger:()=>y,default:()=>B});module.exports=lt(_t);var rt=require("@lskjs/algos");var w={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},N={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},S=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],_=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var at=require("@lskjs/algos"),h=require("@lskjs/env");var O=h.isDev||h.isClient?"pretty":"lsk";var c;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(c||(c={}));var u=require("@lskjs/err");var p={};I(p,{default:()=>P.default,stringify:()=>k.default});L(p,require("fast-safe-stringify"));var k=v(require("fast-safe-stringify")),P=v(require("fast-safe-stringify"));var f=o((t,r=null,e=0)=>typeof t=="object"?(0,k.default)(t,r,e):String(t),"toString");var $=o(t=>t.map(r=>(0,u.isError)(r)?(0,u.getCode)(r):null).filter(Boolean)[0],"getErrCode"),T=o(t=>t.length?t.map(r=>(0,u.isError)(r)?(0,u.getMessage)(r):f(r)).join(" "):null,"createMsg");var ft=require("@lskjs/env");var ut={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60};var D=o(t=>{let{level:r,time:e,...n}=t;return f({level:ut[r],time:e.toISOString(),...n})},"stringifyBunyan");var ct={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"};var G=o(t=>{let{level:r,time:e,...n}=t;return f({level:ct[r],time:e.toISOString(),...n})},"stringifyLogrus");var g=o(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb"),E=o(t=>Boolean(g(t)&&(t.status||t.duration||t.length)),"isLsklogWebFinal");var U=o(t=>{let{level:r,time:e,...n}=t;return f({level:r,time:+e,...n})},"stringifyLsklog");function V(t,r,...e){let n=$(e),s=T(e),i={code:n,...r,msg:s};return t==="bunyan"?D(i):t==="logrus"?G(i):U(i)}o(V,"stringify");var Y=require("@lskjs/colors"),H=require("@lskjs/env"),Q=v(require("pretty-bytes")),X=v(require("pretty-time"));var F=require("@lskjs/colors");var C=o(t=>typeof t=="number"?t:Math.abs(String(t).split("").reduce((r,e)=>{let n=(r<<5)-r+e.charCodeAt(0);return n&n},0)-48),"hashCode"),J=C;function W(t,r){let e=S[J(r||"")%S.length]||[];return(0,F.colorize)(t,e)}o(W,"themeizeRandom");function d(t,r){let e=r?N[r]:[];return(0,F.colorize)(t,e)}o(d,"themeize");var pt=(0,H.getEnvVar)("LOG_VIEW","short"),x=o((t,r)=>String(t).padStart(r),"leftPad"),gt=o((t,r)=>String(t).padEnd(r),"rightPad"),M=20,mt=o((t,r=0)=>(M=Math.max(t&&t.length||0,M,r),gt(t,M)),"prettyPath"),Z=o(t=>t>=500?"error":t>=400?"warn":t>=300?"debug":null,"getStatusLevel"),ht=o(t=>{let r=Z(t);return r||(r=t!==200?"log":null),d(x(String(t),3),r)},"prettyStatus"),dt=o(t=>x(`#${t}`,3),"prettyReqId"),xt=o(t=>{let r=t==="REMOVE"?"error":t==="WS"?"debug":null;return d(x(t,4),r)},"prettyMethod"),yt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=t>=10*1e3?"error":t>=3*1e3?"warn":null,s=["m","s","ms"].includes(r)?r:"",i=Math.floor(Math.abs(t)*10**6),l=(0,X.default)(i,s);return d(x(l,5),e)},"prettyTime"),bt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=(0,Q.default)(t,{maximumFractionDigits:1}).split(" "),n=e[1];return`${+e[0]>=100?Math.round(+e[0]):+e[0]}${r}${n}`},"prettySize"),K=o((t,r)=>[...t,r].filter(Boolean).map(String).map(n=>W(n,n)).join(":"),"prettyNs");function Lt(t){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],e=r[C(t)%r.length];return W(e,String(t))}o(Lt,"prettyMarker");var R=o(t=>{let r=pt==="short"?(t[0]||"").toLowerCase():x(t,5);return r=`[${r}]`,d(r,t)},"prettyLevel"),vt=/\[[^"\]]+]/gm,j=o((...t)=>{let r=[];return t.forEach(e=>{if(typeof e=="string"){let n=0;r.push(e.replace(vt,s=>(0,Y.colorize)(s,_[n++%_.length])))}else r.push(e)}),r},"prettyContent"),kt=o(t=>Z(t.status)||E(t)?"debug":"trace","getUrlLevel"),q=o(t=>{let r=E(t),e=kt(t);return[R(e),[Lt(t.reqId),xt(t.method)].join(""),mt(t.url),dt(t.reqId),r&&t.method!=="WS"?ht(t.status):null,!r&&"\u29D7\u29D6\u29D7",r&&yt(t.duration),r&&t.method!=="WS"?bt(t.length):null].filter(Boolean).join(" ")},"prettyUrl");function wt(t,r){let e=0;return t.forEach((n,s)=>{s===e&&r(n)&&(e+=1)}),e}o(wt,"countInRow");function St(...t){let r=wt(t,e=>typeof e=="string");return[t.slice(0,r).join(" "),...t.slice(r)]}o(St,"concatFirstStrings");function tt(t,...r){let e=t?.ns,n=t?.name,s=t?.level||"log",i=r;if(g(t))return[q(t)];let l=(e||"").split(":").filter(Boolean).map(String),a=[R(s)];return(l.length||n)&&a.push(K(l,n)),St(...a,...j(...i))}o(tt,"prettyFormat");function A(t,r){Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++)if(t[e].test(r))return!0;return!1}o(A,"anyRegExps");var y=class{format=O;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:e,name:n,level:s,format:i,on:l=[],off:a=[]}){if(r&&(this.prefix=r),e&&(this.ns=e),l&&(this.on=l),a&&(this.off=a),n&&(this.name=n),i&&(this.format=i),s){if(!w[s])throw new Error(`Incorrect level: ${this.level}`);this.level=s}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let e=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:e},...r)}getLevelPriority(r){return w[r]||0}canLog(r){let e=this.getLevelPriority(r),n=this.getLevelPriority(this.level);return this.ns&&A(this.off,this.ns)?!1:this.ns&&A(this.on,this.ns)?!0:e>=n}fatal(...r){this.canLog("fatal")&&this.__log("fatal",...r)}error(...r){this.canLog("error")&&this.__log("error",...r)}warn(...r){this.canLog("warn")&&this.__log("warn",...r)}debug(...r){this.canLog("debug")&&this.__log("debug",...r)}info(...r){this.canLog("info")&&this.__log("info",...r)}trace(...r){this.canLog("trace")&&this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...e){let[n,...s]=e,i={name:this.name,ns:this.ns,level:r,time:new Date},l=e;if(g(n)&&(i={...i,...n},l=s),this.format==="none")return;let a=(0,rt.omitNull)(i);if(this.format==="pretty"){this.log(...tt(a,...l));return}this.log(V(this.format||"lsk",a,...l))}};o(y,"Logger");var B=y;0&&(module.exports={Logger});
//# sourceMappingURL=client.js.map

@@ -1,2 +0,2 @@

"use strict";var t=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var g=(e,o)=>{for(var l in o)t(e,l,{get:o[l],enumerable:!0})},c=(e,o,l,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of a(o))!d.call(e,r)&&r!==l&&t(e,r,{get:()=>o[r],enumerable:!(n=b(o,r))||n.enumerable});return e};var s=e=>c(t({},"__esModule",{value:!0}),e);var f={};g(f,{contentColors:()=>w,levelsPriority:()=>m,randomColors:()=>y,theme:()=>i});module.exports=s(f);var m={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},i={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},y=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],w=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];0&&(module.exports={contentColors,levelsPriority,randomColors,theme});
"use strict";var t=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var g=(o,e)=>{for(var r in e)t(o,r,{get:e[r],enumerable:!0})},c=(o,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of a(e))!d.call(o,l)&&l!==r&&t(o,l,{get:()=>e[l],enumerable:!(n=b(e,l))||n.enumerable});return o};var s=o=>c(t({},"__esModule",{value:!0}),o);var f={};g(f,{contentColors:()=>u,levelsPriority:()=>y,randomColors:()=>w,theme:()=>i});module.exports=s(f);var y={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},i={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},w=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],u=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];0&&(module.exports={contentColors,levelsPriority,randomColors,theme});
//# sourceMappingURL=config.js.map

@@ -1,2 +0,2 @@

"use strict";var l=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)l(t,n,{get:e[n],enumerable:!0})},L=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of m(e))!E.call(t,s)&&s!==n&&l(t,s,{get:()=>e[s],enumerable:!(o=g(e,s))||o.enumerable});return t};var v=t=>L(l({},"__esModule",{value:!0}),t);var h={};d(h,{default:()=>x,defaultFormat:()=>f,getEnvConfig:()=>a});module.exports=v(h);var p=require("@lskjs/algos"),r=require("@lskjs/env");function c(t=""){let e=[],n=[],o,s=(typeof t=="string"?t:"").split(/[\s,]+/);for(o=0;o<s.length;o++){if(!s[o])continue;let i=s[o].replace(/\*/g,".*?");i[0]==="-"?n.push(new RegExp(`^${i.slice(1)}$`)):e.push(new RegExp(`^${i}$`))}return{on:e,off:n}}var f=r.isDev||r.isClient?"pretty":"lsk",a=()=>{let t=(0,r.getEnvVar)("DEBUG","")||"",e=typeof process&&process.argv?.includes("--silent"),n=t.startsWith("lsk")||t.startsWith("*"),o=(0,r.getEnvVar)("LOG_FORMAT",(0,r.getEnvVar)("DEBUG_FORMAT",f)),{on:s,off:i}=c(t),u=(0,r.getEnvVar)("LOG_LEVEL",(0,r.getEnvVar)("DEBUG_LEVEL",e?"error":n?"trace":"debug"));return(0,p.omitNull)({format:o,level:u,on:s,off:i})},x=a;0&&(module.exports={defaultFormat,getEnvConfig});
"use strict";var l=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var c=(t,e)=>l(t,"name",{value:e,configurable:!0});var L=(t,e)=>{for(var n in e)l(t,n,{get:e[n],enumerable:!0})},v=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of E(e))!d.call(t,s)&&s!==n&&l(t,s,{get:()=>e[s],enumerable:!(o=m(e,s))||o.enumerable});return t};var x=t=>v(l({},"__esModule",{value:!0}),t);var G={};L(G,{default:()=>h,defaultFormat:()=>a,getEnvConfig:()=>u});module.exports=x(G);var f=require("@lskjs/algos"),r=require("@lskjs/env");function p(t=""){let e=[],n=[],o,s=(typeof t=="string"?t:"").split(/[\s,]+/);for(o=0;o<s.length;o++){if(!s[o])continue;let i=s[o].replace(/\*/g,".*?");i[0]==="-"?n.push(new RegExp(`^${i.slice(1)}$`)):e.push(new RegExp(`^${i}$`))}return{on:e,off:n}}c(p,"parseNs");var a=r.isDev||r.isClient?"pretty":"lsk",u=c(()=>{let t=(0,r.getEnvVar)("DEBUG","")||"",e=process.argv?.includes("--silent"),n=t.startsWith("lsk")||t.startsWith("*"),o=(0,r.getEnvVar)("LOG_FORMAT",(0,r.getEnvVar)("DEBUG_FORMAT",a)),{on:s,off:i}=p(t),g=(0,r.getEnvVar)("LOG_LEVEL",(0,r.getEnvVar)("DEBUG_LEVEL",e?"error":n?"trace":"debug"));return(0,f.omitNull)({format:o,level:g,on:s,off:i})},"getEnvConfig"),h=u;0&&(module.exports={defaultFormat,getEnvConfig});
//# sourceMappingURL=getEnvConfig.js.map

@@ -1,2 +0,2 @@

"use strict";var oe=Object.create;var d=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var se=Object.getOwnPropertyNames;var ie=Object.getPrototypeOf,le=Object.prototype.hasOwnProperty;var P=(e,r)=>{for(var t in r)d(e,t,{get:r[t],enumerable:!0})},L=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of se(r))!le.call(e,n)&&n!==t&&d(e,n,{get:()=>r[n],enumerable:!(o=ne(r,n))||o.enumerable});return e},h=(e,r,t)=>(L(e,r,"default"),t&&L(t,r,"default")),v=(e,r,t)=>(t=e!=null?oe(ie(e)):{},L(r||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)),ae=e=>L(d({},"__esModule",{value:!0}),e);var Me={};P(Me,{ILoggerInternalMessageFormat:()=>u,Logger:()=>I,default:()=>te,defaultFormat:()=>b,getEnvConfig:()=>ge});module.exports=ae(Me);var u=(s=>(s.bunyan="bunyan",s.lsklog="lsklog",s.lsklogweb="lsklogweb",s.logrus="logrus",s.raw="raw",s))(u||{});var re=require("@lskjs/algos");var w={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},A={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},k=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],T=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var W=require("@lskjs/algos"),a=require("@lskjs/env");function F(e=""){let r=[],t=[],o,n=(typeof e=="string"?e:"").split(/[\s,]+/);for(o=0;o<n.length;o++){if(!n[o])continue;let s=n[o].replace(/\*/g,".*?");s[0]==="-"?t.push(new RegExp(`^${s.slice(1)}$`)):r.push(new RegExp(`^${s}$`))}return{on:r,off:t}}var b=a.isDev||a.isClient?"pretty":"lsk",ge=()=>{let e=(0,a.getEnvVar)("DEBUG","")||"",r=typeof process&&process.argv?.includes("--silent"),t=e.startsWith("lsk")||e.startsWith("*"),o=(0,a.getEnvVar)("LOG_FORMAT",(0,a.getEnvVar)("DEBUG_FORMAT",b)),{on:n,off:s}=F(e),l=(0,a.getEnvVar)("LOG_LEVEL",(0,a.getEnvVar)("DEBUG_LEVEL",r?"error":t?"trace":"debug"));return(0,W.omitNull)({format:o,level:l,on:n,off:s})};var p=require("@lskjs/err");var f={};P(f,{default:()=>N.default,stringify:()=>x.default});h(f,require("fast-safe-stringify"));var x=v(require("fast-safe-stringify")),N=v(require("fast-safe-stringify"));var g=(e,r=null,t=0)=>typeof e=="object"?(0,x.default)(e,r,t):String(e);var O=e=>e.map(r=>(0,p.isError)(r)?(0,p.getCode)(r):null).filter(Boolean)[0],D=e=>e.length?e.map(r=>(0,p.isError)(r)?(0,p.getMessage)(r):g(r)).join(" "):null;var pe=require("@lskjs/env");var ue={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60};var z=e=>{let{level:r,time:t,...o}=e;return g({level:ue[r],time:t.toISOString(),...o})};var fe={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"};var G=e=>{let{level:r,time:t,...o}=e;return g({level:fe[r],time:t.toISOString(),...o})};var m=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url)),M=e=>Boolean(m(e)&&(e.status||e.duration||e.length));var U=e=>{let{level:r,time:t,...o}=e;return g({level:r,time:+t,...o})};function V(e,r,...t){let o=O(t),n=D(t),s={code:o,...r,msg:n};return e==="bunyan"?z(s):e==="logrus"?G(s):U(s)}var J=require("@lskjs/colors"),Y=require("@lskjs/env"),H=v(require("pretty-bytes")),Q=v(require("pretty-time"));var E=require("@lskjs/colors");var B=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((r,t)=>{let o=(r<<5)-r+t.charCodeAt(0);return o&o},0)-48),K=B;function R(e,r){let t=k[K(r||"")%k.length]||[];return(0,E.colorize)(e,t)}function c(e,r){let t=r?A[r]:[];return(0,E.colorize)(e,t)}var me=(0,Y.getEnvVar)("LOG_VIEW","short"),y=(e,r)=>String(e).padStart(r),ce=(e,r)=>String(e).padEnd(r),S=20,ye=(e,r=0)=>(S=Math.max(e&&e.length||0,S,r),ce(e,S)),X=e=>e>=500?"error":e>=400?"warn":e>=300?"debug":null,Le=e=>{let r=X(e);return r||(r=e!==200?"log":null),c(y(String(e),3),r)},de=e=>y(`#${e}`,3),he=e=>{let r=e==="REMOVE"?"error":e==="WS"?"debug":null;return c(y(e,4),r)},ve=(e,r="")=>{if(!Number.isFinite(e))return null;let t=e>=10*1e3?"error":e>=3*1e3?"warn":null,n=["m","s","ms"].includes(r)?r:"",s=Math.floor(Math.abs(e)*10**6),i=(0,Q.default)(s,n);return c(y(i,5),t)},be=(e,r="")=>{if(!Number.isFinite(e))return null;let t=(0,H.default)(e,{maximumFractionDigits:1}).split(" "),o=t[1];return`${+t[0]>=100?Math.round(+t[0]):+t[0]}${r}${o}`},Z=(e,r)=>[...e,r].filter(Boolean).map(String).map(o=>R(o,o)).join(":");function xe(e){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],t=r[B(e)%r.length];return R(t,String(e))}var _=e=>{let r=me==="short"?(e[0]||"").toLowerCase():y(e,5);return r=`[${r}]`,c(r,e)},Ie=/\[[^"\]]+]/gm,j=(...e)=>{let r=[];return e.forEach(t=>{if(typeof t=="string"){let o=0;r.push(t.replace(Ie,n=>(0,J.colorize)(n,T[o++%T.length])))}else r.push(t)}),r},we=e=>X(e.status)||M(e)?"debug":"trace",q=e=>{let r=M(e),t=we(e);return[_(t),[xe(e.reqId),he(e.method)].join(""),ye(e.url),de(e.reqId),r&&e.method!=="WS"?Le(e.status):null,!r&&"\u29D7\u29D6\u29D7",r&&ve(e.duration),r&&e.method!=="WS"?be(e.length):null].filter(Boolean).join(" ")};function ke(e,r){let t=0;return e.forEach((o,n)=>{n===t&&r(o)&&(t+=1)}),t}function Te(...e){let r=ke(e,t=>typeof t=="string");return[e.slice(0,r).join(" "),...e.slice(r)]}function ee(e,...r){let t=e?.ns,o=e?.name,n=e?.level||"log",s=r;if(m(e))return[q(e)];let i=(t||"").split(":").filter(Boolean).map(String),l=[_(n)];return(i.length||o)&&l.push(Z(i,o)),Te(...l,...j(...s))}function C(e,r){Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++)if(e[t].test(r))return!0;return!1}var I=class{prefix;ns;name;format=b;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:t,name:o,level:n,format:s,on:i=[],off:l=[]}){if(r&&(this.prefix=r),t&&(this.ns=t),i&&(this.on=i),l&&(this.off=l),o&&(this.name=o),s&&(this.format=s),n){if(!w[n])throw new Error(`Incorrect level: ${this.level}`);this.level=n}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let t=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:t},...r)}getLevelPriority(r){return w[r]||0}canLog(r){let t=this.getLevelPriority(r),o=this.getLevelPriority(this.level);return this.ns&&C(this.off,this.ns)?!1:this.ns&&C(this.on,this.ns)?!0:t>=o}fatal(...r){!this.canLog("fatal")||this.__log("fatal",...r)}error(...r){!this.canLog("error")||this.__log("error",...r)}warn(...r){!this.canLog("warn")||this.__log("warn",...r)}debug(...r){!this.canLog("debug")||this.__log("debug",...r)}info(...r){!this.canLog("info")||this.__log("info",...r)}trace(...r){!this.canLog("trace")||this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...t){let[o,...n]=t,s={name:this.name,ns:this.ns,level:r,time:new Date},i=t;if(m(o)&&(s={...s,...o},i=n),this.format==="none")return;let l=(0,re.omitNull)(s);if(this.format==="pretty"){this.log(...ee(l,...i));return}this.log(V(this.format||"lsk",l,...i))}},te=I;0&&(module.exports={ILoggerInternalMessageFormat,Logger,defaultFormat,getEnvConfig});
"use strict";var nt=Object.create;var h=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var it=Object.getOwnPropertyNames;var lt=Object.getPrototypeOf,at=Object.prototype.hasOwnProperty;var o=(t,r)=>h(t,"name",{value:r,configurable:!0});var I=(t,r)=>{for(var e in r)h(t,e,{get:r[e],enumerable:!0})},b=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of it(r))!at.call(t,s)&&s!==e&&h(t,s,{get:()=>r[s],enumerable:!(n=st(r,s))||n.enumerable});return t},L=(t,r,e)=>(b(t,r,"default"),e&&b(e,r,"default")),v=(t,r,e)=>(e=t!=null?nt(lt(t)):{},b(r||!t||!t.__esModule?h(e,"default",{value:t,enumerable:!0}):e,t)),ft=t=>b(h({},"__esModule",{value:!0}),t);var Et={};I(Et,{ILoggerInternalMessageFormat:()=>c,Logger:()=>y,default:()=>ot,defaultFormat:()=>k,getEnvConfig:()=>ut});module.exports=ft(Et);var c;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(c||(c={}));var et=require("@lskjs/algos");var S={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},N={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},_=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],B=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var P=require("@lskjs/algos"),f=require("@lskjs/env");function O(t=""){let r=[],e=[],n,s=(typeof t=="string"?t:"").split(/[\s,]+/);for(n=0;n<s.length;n++){if(!s[n])continue;let i=s[n].replace(/\*/g,".*?");i[0]==="-"?e.push(new RegExp(`^${i.slice(1)}$`)):r.push(new RegExp(`^${i}$`))}return{on:r,off:e}}o(O,"parseNs");var k=f.isDev||f.isClient?"pretty":"lsk",ut=o(()=>{let t=(0,f.getEnvVar)("DEBUG","")||"",r=process.argv?.includes("--silent"),e=t.startsWith("lsk")||t.startsWith("*"),n=(0,f.getEnvVar)("LOG_FORMAT",(0,f.getEnvVar)("DEBUG_FORMAT",k)),{on:s,off:i}=O(t),a=(0,f.getEnvVar)("LOG_LEVEL",(0,f.getEnvVar)("DEBUG_LEVEL",r?"error":e?"trace":"debug"));return(0,P.omitNull)({format:n,level:a,on:s,off:i})},"getEnvConfig");var p=require("@lskjs/err");var g={};I(g,{default:()=>$.default,stringify:()=>w.default});L(g,require("fast-safe-stringify"));var w=v(require("fast-safe-stringify")),$=v(require("fast-safe-stringify"));var u=o((t,r=null,e=0)=>typeof t=="object"?(0,w.default)(t,r,e):String(t),"toString");var T=o(t=>t.map(r=>(0,p.isError)(r)?(0,p.getCode)(r):null).filter(Boolean)[0],"getErrCode"),z=o(t=>t.length?t.map(r=>(0,p.isError)(r)?(0,p.getMessage)(r):u(r)).join(" "):null,"createMsg");var ct=require("@lskjs/env");var pt={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60};var G=o(t=>{let{level:r,time:e,...n}=t;return u({level:pt[r],time:e.toISOString(),...n})},"stringifyBunyan");var gt={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"};var U=o(t=>{let{level:r,time:e,...n}=t;return u({level:gt[r],time:e.toISOString(),...n})},"stringifyLogrus");var m=o(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb"),E=o(t=>Boolean(m(t)&&(t.status||t.duration||t.length)),"isLsklogWebFinal");var V=o(t=>{let{level:r,time:e,...n}=t;return u({level:r,time:+e,...n})},"stringifyLsklog");function J(t,r,...e){let n=T(e),s=z(e),i={code:n,...r,msg:s};return t==="bunyan"?G(i):t==="logrus"?U(i):V(i)}o(J,"stringify");var H=require("@lskjs/colors"),Q=require("@lskjs/env"),X=v(require("pretty-bytes")),Z=v(require("pretty-time"));var F=require("@lskjs/colors");var C=o(t=>typeof t=="number"?t:Math.abs(String(t).split("").reduce((r,e)=>{let n=(r<<5)-r+e.charCodeAt(0);return n&n},0)-48),"hashCode"),Y=C;function W(t,r){let e=_[Y(r||"")%_.length]||[];return(0,F.colorize)(t,e)}o(W,"themeizeRandom");function d(t,r){let e=r?N[r]:[];return(0,F.colorize)(t,e)}o(d,"themeize");var mt=(0,Q.getEnvVar)("LOG_VIEW","short"),x=o((t,r)=>String(t).padStart(r),"leftPad"),ht=o((t,r)=>String(t).padEnd(r),"rightPad"),M=20,dt=o((t,r=0)=>(M=Math.max(t&&t.length||0,M,r),ht(t,M)),"prettyPath"),K=o(t=>t>=500?"error":t>=400?"warn":t>=300?"debug":null,"getStatusLevel"),xt=o(t=>{let r=K(t);return r||(r=t!==200?"log":null),d(x(String(t),3),r)},"prettyStatus"),yt=o(t=>x(`#${t}`,3),"prettyReqId"),bt=o(t=>{let r=t==="REMOVE"?"error":t==="WS"?"debug":null;return d(x(t,4),r)},"prettyMethod"),Lt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=t>=10*1e3?"error":t>=3*1e3?"warn":null,s=["m","s","ms"].includes(r)?r:"",i=Math.floor(Math.abs(t)*10**6),l=(0,Z.default)(i,s);return d(x(l,5),e)},"prettyTime"),vt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=(0,X.default)(t,{maximumFractionDigits:1}).split(" "),n=e[1];return`${+e[0]>=100?Math.round(+e[0]):+e[0]}${r}${n}`},"prettySize"),j=o((t,r)=>[...t,r].filter(Boolean).map(String).map(n=>W(n,n)).join(":"),"prettyNs");function kt(t){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],e=r[C(t)%r.length];return W(e,String(t))}o(kt,"prettyMarker");var R=o(t=>{let r=mt==="short"?(t[0]||"").toLowerCase():x(t,5);return r=`[${r}]`,d(r,t)},"prettyLevel"),wt=/\[[^"\]]+]/gm,q=o((...t)=>{let r=[];return t.forEach(e=>{if(typeof e=="string"){let n=0;r.push(e.replace(wt,s=>(0,H.colorize)(s,B[n++%B.length])))}else r.push(e)}),r},"prettyContent"),St=o(t=>K(t.status)||E(t)?"debug":"trace","getUrlLevel"),tt=o(t=>{let r=E(t),e=St(t);return[R(e),[kt(t.reqId),bt(t.method)].join(""),dt(t.url),yt(t.reqId),r&&t.method!=="WS"?xt(t.status):null,!r&&"\u29D7\u29D6\u29D7",r&&Lt(t.duration),r&&t.method!=="WS"?vt(t.length):null].filter(Boolean).join(" ")},"prettyUrl");function _t(t,r){let e=0;return t.forEach((n,s)=>{s===e&&r(n)&&(e+=1)}),e}o(_t,"countInRow");function Bt(...t){let r=_t(t,e=>typeof e=="string");return[t.slice(0,r).join(" "),...t.slice(r)]}o(Bt,"concatFirstStrings");function rt(t,...r){let e=t?.ns,n=t?.name,s=t?.level||"log",i=r;if(m(t))return[tt(t)];let l=(e||"").split(":").filter(Boolean).map(String),a=[R(s)];return(l.length||n)&&a.push(j(l,n)),Bt(...a,...q(...i))}o(rt,"prettyFormat");function A(t,r){Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++)if(t[e].test(r))return!0;return!1}o(A,"anyRegExps");var y=class{format=k;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:e,name:n,level:s,format:i,on:l=[],off:a=[]}){if(r&&(this.prefix=r),e&&(this.ns=e),l&&(this.on=l),a&&(this.off=a),n&&(this.name=n),i&&(this.format=i),s){if(!S[s])throw new Error(`Incorrect level: ${this.level}`);this.level=s}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let e=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:e},...r)}getLevelPriority(r){return S[r]||0}canLog(r){let e=this.getLevelPriority(r),n=this.getLevelPriority(this.level);return this.ns&&A(this.off,this.ns)?!1:this.ns&&A(this.on,this.ns)?!0:e>=n}fatal(...r){this.canLog("fatal")&&this.__log("fatal",...r)}error(...r){this.canLog("error")&&this.__log("error",...r)}warn(...r){this.canLog("warn")&&this.__log("warn",...r)}debug(...r){this.canLog("debug")&&this.__log("debug",...r)}info(...r){this.canLog("info")&&this.__log("info",...r)}trace(...r){this.canLog("trace")&&this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...e){let[n,...s]=e,i={name:this.name,ns:this.ns,level:r,time:new Date},l=e;if(m(n)&&(i={...i,...n},l=s),this.format==="none")return;let a=(0,et.omitNull)(i);if(this.format==="pretty"){this.log(...rt(a,...l));return}this.log(J(this.format||"lsk",a,...l))}};o(y,"Logger");var ot=y;0&&(module.exports={ILoggerInternalMessageFormat,Logger,defaultFormat,getEnvConfig});
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

"use strict";var ne=Object.create;var L=Object.defineProperty;var se=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var le=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty;var P=(e,r)=>{for(var t in r)L(e,t,{get:r[t],enumerable:!0})},y=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ie(r))!ae.call(e,n)&&n!==t&&L(e,n,{get:()=>r[n],enumerable:!(o=se(r,n))||o.enumerable});return e},d=(e,r,t)=>(y(e,r,"default"),t&&y(t,r,"default")),h=(e,r,t)=>(t=e!=null?ne(le(e)):{},y(r||!e||!e.__esModule?L(t,"default",{value:e,enumerable:!0}):t,e)),ge=e=>y(L({},"__esModule",{value:!0}),e);var Ee={};P(Ee,{default:()=>Me,log:()=>oe});module.exports=ge(Ee);var F=require("@lskjs/algos"),a=require("@lskjs/env");function A(e=""){let r=[],t=[],o,n=(typeof e=="string"?e:"").split(/[\s,]+/);for(o=0;o<n.length;o++){if(!n[o])continue;let s=n[o].replace(/\*/g,".*?");s[0]==="-"?t.push(new RegExp(`^${s.slice(1)}$`)):r.push(new RegExp(`^${s}$`))}return{on:r,off:t}}var x=a.isDev||a.isClient?"pretty":"lsk",W=()=>{let e=(0,a.getEnvVar)("DEBUG","")||"",r=typeof process&&process.argv?.includes("--silent"),t=e.startsWith("lsk")||e.startsWith("*"),o=(0,a.getEnvVar)("LOG_FORMAT",(0,a.getEnvVar)("DEBUG_FORMAT",x)),{on:n,off:s}=A(e),l=(0,a.getEnvVar)("LOG_LEVEL",(0,a.getEnvVar)("DEBUG_LEVEL",r?"error":t?"trace":"debug"));return(0,F.omitNull)({format:o,level:l,on:n,off:s})};var te=require("@lskjs/algos");var I={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},N={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},w=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],k=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var p=require("@lskjs/err");var u={};P(u,{default:()=>O.default,stringify:()=>v.default});d(u,require("fast-safe-stringify"));var v=h(require("fast-safe-stringify")),O=h(require("fast-safe-stringify"));var g=(e,r=null,t=0)=>typeof e=="object"?(0,v.default)(e,r,t):String(e);var D=e=>e.map(r=>(0,p.isError)(r)?(0,p.getCode)(r):null).filter(Boolean)[0],$=e=>e.length?e.map(r=>(0,p.isError)(r)?(0,p.getMessage)(r):g(r)).join(" "):null;var pe=require("@lskjs/env");var ue={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60};var G=e=>{let{level:r,time:t,...o}=e;return g({level:ue[r],time:t.toISOString(),...o})};var fe={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"};var U=e=>{let{level:r,time:t,...o}=e;return g({level:fe[r],time:t.toISOString(),...o})};var f=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url)),M=e=>Boolean(f(e)&&(e.status||e.duration||e.length));var V=e=>{let{level:r,time:t,...o}=e;return g({level:r,time:+t,...o})};function K(e,r,...t){let o=D(t),n=$(t),s={code:o,...r,msg:n};return e==="bunyan"?G(s):e==="logrus"?U(s):V(s)}var Y=require("@lskjs/colors"),H=require("@lskjs/env"),Q=h(require("pretty-bytes")),X=h(require("pretty-time"));var B=require("@lskjs/colors");var E=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((r,t)=>{let o=(r<<5)-r+t.charCodeAt(0);return o&o},0)-48),J=E;function R(e,r){let t=w[J(r||"")%w.length]||[];return(0,B.colorize)(e,t)}function m(e,r){let t=r?N[r]:[];return(0,B.colorize)(e,t)}var me=(0,H.getEnvVar)("LOG_VIEW","short"),c=(e,r)=>String(e).padStart(r),ce=(e,r)=>String(e).padEnd(r),S=20,ye=(e,r=0)=>(S=Math.max(e&&e.length||0,S,r),ce(e,S)),Z=e=>e>=500?"error":e>=400?"warn":e>=300?"debug":null,Le=e=>{let r=Z(e);return r||(r=e!==200?"log":null),m(c(String(e),3),r)},de=e=>c(`#${e}`,3),he=e=>{let r=e==="REMOVE"?"error":e==="WS"?"debug":null;return m(c(e,4),r)},ve=(e,r="")=>{if(!Number.isFinite(e))return null;let t=e>=10*1e3?"error":e>=3*1e3?"warn":null,n=["m","s","ms"].includes(r)?r:"",s=Math.floor(Math.abs(e)*10**6),i=(0,X.default)(s,n);return m(c(i,5),t)},be=(e,r="")=>{if(!Number.isFinite(e))return null;let t=(0,Q.default)(e,{maximumFractionDigits:1}).split(" "),o=t[1];return`${+t[0]>=100?Math.round(+t[0]):+t[0]}${r}${o}`},j=(e,r)=>[...e,r].filter(Boolean).map(String).map(o=>R(o,o)).join(":");function xe(e){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],t=r[E(e)%r.length];return R(t,String(e))}var C=e=>{let r=me==="short"?(e[0]||"").toLowerCase():c(e,5);return r=`[${r}]`,m(r,e)},Ie=/\[[^"\]]+]/gm,q=(...e)=>{let r=[];return e.forEach(t=>{if(typeof t=="string"){let o=0;r.push(t.replace(Ie,n=>(0,Y.colorize)(n,k[o++%k.length])))}else r.push(t)}),r},we=e=>Z(e.status)||M(e)?"debug":"trace",ee=e=>{let r=M(e),t=we(e);return[C(t),[xe(e.reqId),he(e.method)].join(""),ye(e.url),de(e.reqId),r&&e.method!=="WS"?Le(e.status):null,!r&&"\u29D7\u29D6\u29D7",r&&ve(e.duration),r&&e.method!=="WS"?be(e.length):null].filter(Boolean).join(" ")};function ke(e,r){let t=0;return e.forEach((o,n)=>{n===t&&r(o)&&(t+=1)}),t}function Te(...e){let r=ke(e,t=>typeof t=="string");return[e.slice(0,r).join(" "),...e.slice(r)]}function re(e,...r){let t=e?.ns,o=e?.name,n=e?.level||"log",s=r;if(f(e))return[ee(e)];let i=(t||"").split(":").filter(Boolean).map(String),l=[C(n)];return(i.length||o)&&l.push(j(i,o)),Te(...l,...q(...s))}function _(e,r){Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++)if(e[t].test(r))return!0;return!1}var b=class{prefix;ns;name;format=x;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:t,name:o,level:n,format:s,on:i=[],off:l=[]}){if(r&&(this.prefix=r),t&&(this.ns=t),i&&(this.on=i),l&&(this.off=l),o&&(this.name=o),s&&(this.format=s),n){if(!I[n])throw new Error(`Incorrect level: ${this.level}`);this.level=n}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let t=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:t},...r)}getLevelPriority(r){return I[r]||0}canLog(r){let t=this.getLevelPriority(r),o=this.getLevelPriority(this.level);return this.ns&&_(this.off,this.ns)?!1:this.ns&&_(this.on,this.ns)?!0:t>=o}fatal(...r){!this.canLog("fatal")||this.__log("fatal",...r)}error(...r){!this.canLog("error")||this.__log("error",...r)}warn(...r){!this.canLog("warn")||this.__log("warn",...r)}debug(...r){!this.canLog("debug")||this.__log("debug",...r)}info(...r){!this.canLog("info")||this.__log("info",...r)}trace(...r){!this.canLog("trace")||this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...t){let[o,...n]=t,s={name:this.name,ns:this.ns,level:r,time:new Date},i=t;if(f(o)&&(s={...s,...o},i=n),this.format==="none")return;let l=(0,te.omitNull)(s);if(this.format==="pretty"){this.log(...re(l,...i));return}this.log(K(this.format||"lsk",l,...i))}};var oe=new b(W()),Me=oe;0&&(module.exports={log});
"use strict";var st=Object.create;var h=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var lt=Object.getOwnPropertyNames;var at=Object.getPrototypeOf,ft=Object.prototype.hasOwnProperty;var o=(t,r)=>h(t,"name",{value:r,configurable:!0});var I=(t,r)=>{for(var e in r)h(t,e,{get:r[e],enumerable:!0})},b=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of lt(r))!ft.call(t,s)&&s!==e&&h(t,s,{get:()=>r[s],enumerable:!(n=it(r,s))||n.enumerable});return t},L=(t,r,e)=>(b(t,r,"default"),e&&b(e,r,"default")),v=(t,r,e)=>(e=t!=null?st(at(t)):{},b(r||!t||!t.__esModule?h(e,"default",{value:t,enumerable:!0}):e,t)),ut=t=>b(h({},"__esModule",{value:!0}),t);var Ct={};I(Ct,{default:()=>Et,log:()=>nt});module.exports=ut(Ct);var O=require("@lskjs/algos"),f=require("@lskjs/env");function N(t=""){let r=[],e=[],n,s=(typeof t=="string"?t:"").split(/[\s,]+/);for(n=0;n<s.length;n++){if(!s[n])continue;let i=s[n].replace(/\*/g,".*?");i[0]==="-"?e.push(new RegExp(`^${i.slice(1)}$`)):r.push(new RegExp(`^${i}$`))}return{on:r,off:e}}o(N,"parseNs");var w=f.isDev||f.isClient?"pretty":"lsk",P=o(()=>{let t=(0,f.getEnvVar)("DEBUG","")||"",r=process.argv?.includes("--silent"),e=t.startsWith("lsk")||t.startsWith("*"),n=(0,f.getEnvVar)("LOG_FORMAT",(0,f.getEnvVar)("DEBUG_FORMAT",w)),{on:s,off:i}=N(t),a=(0,f.getEnvVar)("LOG_LEVEL",(0,f.getEnvVar)("DEBUG_LEVEL",r?"error":e?"trace":"debug"));return(0,O.omitNull)({format:n,level:a,on:s,off:i})},"getEnvConfig");var ot=require("@lskjs/algos");var S={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},$={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},_=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],B=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var p;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(p||(p={}));var c=require("@lskjs/err");var g={};I(g,{default:()=>T.default,stringify:()=>k.default});L(g,require("fast-safe-stringify"));var k=v(require("fast-safe-stringify")),T=v(require("fast-safe-stringify"));var u=o((t,r=null,e=0)=>typeof t=="object"?(0,k.default)(t,r,e):String(t),"toString");var z=o(t=>t.map(r=>(0,c.isError)(r)?(0,c.getCode)(r):null).filter(Boolean)[0],"getErrCode"),D=o(t=>t.length?t.map(r=>(0,c.isError)(r)?(0,c.getMessage)(r):u(r)).join(" "):null,"createMsg");var ct=require("@lskjs/env");var pt={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60};var U=o(t=>{let{level:r,time:e,...n}=t;return u({level:pt[r],time:e.toISOString(),...n})},"stringifyBunyan");var gt={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"};var V=o(t=>{let{level:r,time:e,...n}=t;return u({level:gt[r],time:e.toISOString(),...n})},"stringifyLogrus");var m=o(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb"),E=o(t=>Boolean(m(t)&&(t.status||t.duration||t.length)),"isLsklogWebFinal");var J=o(t=>{let{level:r,time:e,...n}=t;return u({level:r,time:+e,...n})},"stringifyLsklog");function Y(t,r,...e){let n=z(e),s=D(e),i={code:n,...r,msg:s};return t==="bunyan"?U(i):t==="logrus"?V(i):J(i)}o(Y,"stringify");var Q=require("@lskjs/colors"),X=require("@lskjs/env"),Z=v(require("pretty-bytes")),K=v(require("pretty-time"));var F=require("@lskjs/colors");var C=o(t=>typeof t=="number"?t:Math.abs(String(t).split("").reduce((r,e)=>{let n=(r<<5)-r+e.charCodeAt(0);return n&n},0)-48),"hashCode"),H=C;function W(t,r){let e=_[H(r||"")%_.length]||[];return(0,F.colorize)(t,e)}o(W,"themeizeRandom");function d(t,r){let e=r?$[r]:[];return(0,F.colorize)(t,e)}o(d,"themeize");var mt=(0,X.getEnvVar)("LOG_VIEW","short"),x=o((t,r)=>String(t).padStart(r),"leftPad"),ht=o((t,r)=>String(t).padEnd(r),"rightPad"),M=20,dt=o((t,r=0)=>(M=Math.max(t&&t.length||0,M,r),ht(t,M)),"prettyPath"),j=o(t=>t>=500?"error":t>=400?"warn":t>=300?"debug":null,"getStatusLevel"),xt=o(t=>{let r=j(t);return r||(r=t!==200?"log":null),d(x(String(t),3),r)},"prettyStatus"),yt=o(t=>x(`#${t}`,3),"prettyReqId"),bt=o(t=>{let r=t==="REMOVE"?"error":t==="WS"?"debug":null;return d(x(t,4),r)},"prettyMethod"),Lt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=t>=10*1e3?"error":t>=3*1e3?"warn":null,s=["m","s","ms"].includes(r)?r:"",i=Math.floor(Math.abs(t)*10**6),l=(0,K.default)(i,s);return d(x(l,5),e)},"prettyTime"),vt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=(0,Z.default)(t,{maximumFractionDigits:1}).split(" "),n=e[1];return`${+e[0]>=100?Math.round(+e[0]):+e[0]}${r}${n}`},"prettySize"),q=o((t,r)=>[...t,r].filter(Boolean).map(String).map(n=>W(n,n)).join(":"),"prettyNs");function kt(t){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],e=r[C(t)%r.length];return W(e,String(t))}o(kt,"prettyMarker");var R=o(t=>{let r=mt==="short"?(t[0]||"").toLowerCase():x(t,5);return r=`[${r}]`,d(r,t)},"prettyLevel"),wt=/\[[^"\]]+]/gm,tt=o((...t)=>{let r=[];return t.forEach(e=>{if(typeof e=="string"){let n=0;r.push(e.replace(wt,s=>(0,Q.colorize)(s,B[n++%B.length])))}else r.push(e)}),r},"prettyContent"),St=o(t=>j(t.status)||E(t)?"debug":"trace","getUrlLevel"),rt=o(t=>{let r=E(t),e=St(t);return[R(e),[kt(t.reqId),bt(t.method)].join(""),dt(t.url),yt(t.reqId),r&&t.method!=="WS"?xt(t.status):null,!r&&"\u29D7\u29D6\u29D7",r&&Lt(t.duration),r&&t.method!=="WS"?vt(t.length):null].filter(Boolean).join(" ")},"prettyUrl");function _t(t,r){let e=0;return t.forEach((n,s)=>{s===e&&r(n)&&(e+=1)}),e}o(_t,"countInRow");function Bt(...t){let r=_t(t,e=>typeof e=="string");return[t.slice(0,r).join(" "),...t.slice(r)]}o(Bt,"concatFirstStrings");function et(t,...r){let e=t?.ns,n=t?.name,s=t?.level||"log",i=r;if(m(t))return[rt(t)];let l=(e||"").split(":").filter(Boolean).map(String),a=[R(s)];return(l.length||n)&&a.push(q(l,n)),Bt(...a,...tt(...i))}o(et,"prettyFormat");function A(t,r){Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++)if(t[e].test(r))return!0;return!1}o(A,"anyRegExps");var y=class{format=w;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:e,name:n,level:s,format:i,on:l=[],off:a=[]}){if(r&&(this.prefix=r),e&&(this.ns=e),l&&(this.on=l),a&&(this.off=a),n&&(this.name=n),i&&(this.format=i),s){if(!S[s])throw new Error(`Incorrect level: ${this.level}`);this.level=s}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let e=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:e},...r)}getLevelPriority(r){return S[r]||0}canLog(r){let e=this.getLevelPriority(r),n=this.getLevelPriority(this.level);return this.ns&&A(this.off,this.ns)?!1:this.ns&&A(this.on,this.ns)?!0:e>=n}fatal(...r){this.canLog("fatal")&&this.__log("fatal",...r)}error(...r){this.canLog("error")&&this.__log("error",...r)}warn(...r){this.canLog("warn")&&this.__log("warn",...r)}debug(...r){this.canLog("debug")&&this.__log("debug",...r)}info(...r){this.canLog("info")&&this.__log("info",...r)}trace(...r){this.canLog("trace")&&this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...e){let[n,...s]=e,i={name:this.name,ns:this.ns,level:r,time:new Date},l=e;if(m(n)&&(i={...i,...n},l=s),this.format==="none")return;let a=(0,ot.omitNull)(i);if(this.format==="pretty"){this.log(...et(a,...l));return}this.log(Y(this.format||"lsk",a,...l))}};o(y,"Logger");var nt=new y(P()),Et=nt;0&&(module.exports={log});
//# sourceMappingURL=log.js.map

@@ -1,2 +0,2 @@

"use strict";var re=Object.create;var L=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty;var C=(e,r)=>{for(var t in r)L(e,t,{get:r[t],enumerable:!0})},y=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of oe(r))!se.call(e,n)&&n!==t&&L(e,n,{get:()=>r[n],enumerable:!(o=te(r,n))||o.enumerable});return e},d=(e,r,t)=>(y(e,r,"default"),t&&y(t,r,"default")),h=(e,r,t)=>(t=e!=null?re(ne(e)):{},y(r||!e||!e.__esModule?L(t,"default",{value:e,enumerable:!0}):t,e)),ie=e=>y(L({},"__esModule",{value:!0}),e);var ke={};C(ke,{Logger:()=>b,default:()=>O});module.exports=ie(ke);var ee=require("@lskjs/algos");var x={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},P={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},I=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],w=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var le=require("@lskjs/algos"),f=require("@lskjs/env");var A=f.isDev||f.isClient?"pretty":"lsk";var g=require("@lskjs/err");var p={};C(p,{default:()=>F.default,stringify:()=>v.default});d(p,require("fast-safe-stringify"));var v=h(require("fast-safe-stringify")),F=h(require("fast-safe-stringify"));var a=(e,r=null,t=0)=>typeof e=="object"?(0,v.default)(e,r,t):String(e);var W=e=>e.map(r=>(0,g.isError)(r)?(0,g.getCode)(r):null).filter(Boolean)[0],N=e=>e.length?e.map(r=>(0,g.isError)(r)?(0,g.getMessage)(r):a(r)).join(" "):null;var ae=require("@lskjs/env");var ge={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60};var $=e=>{let{level:r,time:t,...o}=e;return a({level:ge[r],time:t.toISOString(),...o})};var pe={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"};var z=e=>{let{level:r,time:t,...o}=e;return a({level:pe[r],time:t.toISOString(),...o})};var u=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url)),T=e=>Boolean(u(e)&&(e.status||e.duration||e.length));var G=e=>{let{level:r,time:t,...o}=e;return a({level:r,time:+t,...o})};function U(e,r,...t){let o=W(t),n=N(t),s={code:o,...r,msg:n};return e==="bunyan"?$(s):e==="logrus"?z(s):G(s)}var K=require("@lskjs/colors"),J=require("@lskjs/env"),Y=h(require("pretty-bytes")),H=h(require("pretty-time"));var B=require("@lskjs/colors");var M=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((r,t)=>{let o=(r<<5)-r+t.charCodeAt(0);return o&o},0)-48),V=M;function E(e,r){let t=I[V(r||"")%I.length]||[];return(0,B.colorize)(e,t)}function m(e,r){let t=r?P[r]:[];return(0,B.colorize)(e,t)}var ue=(0,J.getEnvVar)("LOG_VIEW","short"),c=(e,r)=>String(e).padStart(r),fe=(e,r)=>String(e).padEnd(r),R=20,me=(e,r=0)=>(R=Math.max(e&&e.length||0,R,r),fe(e,R)),Q=e=>e>=500?"error":e>=400?"warn":e>=300?"debug":null,ce=e=>{let r=Q(e);return r||(r=e!==200?"log":null),m(c(String(e),3),r)},ye=e=>c(`#${e}`,3),Le=e=>{let r=e==="REMOVE"?"error":e==="WS"?"debug":null;return m(c(e,4),r)},de=(e,r="")=>{if(!Number.isFinite(e))return null;let t=e>=10*1e3?"error":e>=3*1e3?"warn":null,n=["m","s","ms"].includes(r)?r:"",s=Math.floor(Math.abs(e)*10**6),i=(0,H.default)(s,n);return m(c(i,5),t)},he=(e,r="")=>{if(!Number.isFinite(e))return null;let t=(0,Y.default)(e,{maximumFractionDigits:1}).split(" "),o=t[1];return`${+t[0]>=100?Math.round(+t[0]):+t[0]}${r}${o}`},X=(e,r)=>[...e,r].filter(Boolean).map(String).map(o=>E(o,o)).join(":");function ve(e){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],t=r[M(e)%r.length];return E(t,String(e))}var S=e=>{let r=ue==="short"?(e[0]||"").toLowerCase():c(e,5);return r=`[${r}]`,m(r,e)},be=/\[[^"\]]+]/gm,Z=(...e)=>{let r=[];return e.forEach(t=>{if(typeof t=="string"){let o=0;r.push(t.replace(be,n=>(0,K.colorize)(n,w[o++%w.length])))}else r.push(t)}),r},xe=e=>Q(e.status)||T(e)?"debug":"trace",j=e=>{let r=T(e),t=xe(e);return[S(t),[ve(e.reqId),Le(e.method)].join(""),me(e.url),ye(e.reqId),r&&e.method!=="WS"?ce(e.status):null,!r&&"\u29D7\u29D6\u29D7",r&&de(e.duration),r&&e.method!=="WS"?he(e.length):null].filter(Boolean).join(" ")};function Ie(e,r){let t=0;return e.forEach((o,n)=>{n===t&&r(o)&&(t+=1)}),t}function we(...e){let r=Ie(e,t=>typeof t=="string");return[e.slice(0,r).join(" "),...e.slice(r)]}function q(e,...r){let t=e?.ns,o=e?.name,n=e?.level||"log",s=r;if(u(e))return[j(e)];let i=(t||"").split(":").filter(Boolean).map(String),l=[S(n)];return(i.length||o)&&l.push(X(i,o)),we(...l,...Z(...s))}function _(e,r){Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++)if(e[t].test(r))return!0;return!1}var b=class{prefix;ns;name;format=A;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:t,name:o,level:n,format:s,on:i=[],off:l=[]}){if(r&&(this.prefix=r),t&&(this.ns=t),i&&(this.on=i),l&&(this.off=l),o&&(this.name=o),s&&(this.format=s),n){if(!x[n])throw new Error(`Incorrect level: ${this.level}`);this.level=n}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let t=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:t},...r)}getLevelPriority(r){return x[r]||0}canLog(r){let t=this.getLevelPriority(r),o=this.getLevelPriority(this.level);return this.ns&&_(this.off,this.ns)?!1:this.ns&&_(this.on,this.ns)?!0:t>=o}fatal(...r){!this.canLog("fatal")||this.__log("fatal",...r)}error(...r){!this.canLog("error")||this.__log("error",...r)}warn(...r){!this.canLog("warn")||this.__log("warn",...r)}debug(...r){!this.canLog("debug")||this.__log("debug",...r)}info(...r){!this.canLog("info")||this.__log("info",...r)}trace(...r){!this.canLog("trace")||this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...t){let[o,...n]=t,s={name:this.name,ns:this.ns,level:r,time:new Date},i=t;if(u(o)&&(s={...s,...o},i=n),this.format==="none")return;let l=(0,ee.omitNull)(s);if(this.format==="pretty"){this.log(...q(l,...i));return}this.log(U(this.format||"lsk",l,...i))}},O=b;0&&(module.exports={Logger});
"use strict";var et=Object.create;var m=Object.defineProperty;var ot=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var st=Object.getPrototypeOf,it=Object.prototype.hasOwnProperty;var o=(t,r)=>m(t,"name",{value:r,configurable:!0});var A=(t,r)=>{for(var e in r)m(t,e,{get:r[e],enumerable:!0})},b=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of nt(r))!it.call(t,s)&&s!==e&&m(t,s,{get:()=>r[s],enumerable:!(n=ot(r,s))||n.enumerable});return t},L=(t,r,e)=>(b(t,r,"default"),e&&b(e,r,"default")),v=(t,r,e)=>(e=t!=null?et(st(t)):{},b(r||!t||!t.__esModule?m(e,"default",{value:t,enumerable:!0}):e,t)),lt=t=>b(m({},"__esModule",{value:!0}),t);var _t={};A(_t,{Logger:()=>y,default:()=>T});module.exports=lt(_t);var rt=require("@lskjs/algos");var w={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},I={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},S=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],_=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var at=require("@lskjs/algos"),h=require("@lskjs/env");var N=h.isDev||h.isClient?"pretty":"lsk";var c;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(c||(c={}));var u=require("@lskjs/err");var p={};A(p,{default:()=>O.default,stringify:()=>k.default});L(p,require("fast-safe-stringify"));var k=v(require("fast-safe-stringify")),O=v(require("fast-safe-stringify"));var f=o((t,r=null,e=0)=>typeof t=="object"?(0,k.default)(t,r,e):String(t),"toString");var P=o(t=>t.map(r=>(0,u.isError)(r)?(0,u.getCode)(r):null).filter(Boolean)[0],"getErrCode"),$=o(t=>t.length?t.map(r=>(0,u.isError)(r)?(0,u.getMessage)(r):f(r)).join(" "):null,"createMsg");var ft=require("@lskjs/env");var ut={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60};var D=o(t=>{let{level:r,time:e,...n}=t;return f({level:ut[r],time:e.toISOString(),...n})},"stringifyBunyan");var ct={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"};var G=o(t=>{let{level:r,time:e,...n}=t;return f({level:ct[r],time:e.toISOString(),...n})},"stringifyLogrus");var g=o(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb"),B=o(t=>Boolean(g(t)&&(t.status||t.duration||t.length)),"isLsklogWebFinal");var U=o(t=>{let{level:r,time:e,...n}=t;return f({level:r,time:+e,...n})},"stringifyLsklog");function V(t,r,...e){let n=P(e),s=$(e),i={code:n,...r,msg:s};return t==="bunyan"?D(i):t==="logrus"?G(i):U(i)}o(V,"stringify");var Y=require("@lskjs/colors"),H=require("@lskjs/env"),Q=v(require("pretty-bytes")),X=v(require("pretty-time"));var C=require("@lskjs/colors");var E=o(t=>typeof t=="number"?t:Math.abs(String(t).split("").reduce((r,e)=>{let n=(r<<5)-r+e.charCodeAt(0);return n&n},0)-48),"hashCode"),J=E;function F(t,r){let e=S[J(r||"")%S.length]||[];return(0,C.colorize)(t,e)}o(F,"themeizeRandom");function d(t,r){let e=r?I[r]:[];return(0,C.colorize)(t,e)}o(d,"themeize");var pt=(0,H.getEnvVar)("LOG_VIEW","short"),x=o((t,r)=>String(t).padStart(r),"leftPad"),gt=o((t,r)=>String(t).padEnd(r),"rightPad"),W=20,mt=o((t,r=0)=>(W=Math.max(t&&t.length||0,W,r),gt(t,W)),"prettyPath"),Z=o(t=>t>=500?"error":t>=400?"warn":t>=300?"debug":null,"getStatusLevel"),ht=o(t=>{let r=Z(t);return r||(r=t!==200?"log":null),d(x(String(t),3),r)},"prettyStatus"),dt=o(t=>x(`#${t}`,3),"prettyReqId"),xt=o(t=>{let r=t==="REMOVE"?"error":t==="WS"?"debug":null;return d(x(t,4),r)},"prettyMethod"),yt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=t>=10*1e3?"error":t>=3*1e3?"warn":null,s=["m","s","ms"].includes(r)?r:"",i=Math.floor(Math.abs(t)*10**6),l=(0,X.default)(i,s);return d(x(l,5),e)},"prettyTime"),bt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=(0,Q.default)(t,{maximumFractionDigits:1}).split(" "),n=e[1];return`${+e[0]>=100?Math.round(+e[0]):+e[0]}${r}${n}`},"prettySize"),K=o((t,r)=>[...t,r].filter(Boolean).map(String).map(n=>F(n,n)).join(":"),"prettyNs");function Lt(t){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],e=r[E(t)%r.length];return F(e,String(t))}o(Lt,"prettyMarker");var M=o(t=>{let r=pt==="short"?(t[0]||"").toLowerCase():x(t,5);return r=`[${r}]`,d(r,t)},"prettyLevel"),vt=/\[[^"\]]+]/gm,j=o((...t)=>{let r=[];return t.forEach(e=>{if(typeof e=="string"){let n=0;r.push(e.replace(vt,s=>(0,Y.colorize)(s,_[n++%_.length])))}else r.push(e)}),r},"prettyContent"),kt=o(t=>Z(t.status)||B(t)?"debug":"trace","getUrlLevel"),q=o(t=>{let r=B(t),e=kt(t);return[M(e),[Lt(t.reqId),xt(t.method)].join(""),mt(t.url),dt(t.reqId),r&&t.method!=="WS"?ht(t.status):null,!r&&"\u29D7\u29D6\u29D7",r&&yt(t.duration),r&&t.method!=="WS"?bt(t.length):null].filter(Boolean).join(" ")},"prettyUrl");function wt(t,r){let e=0;return t.forEach((n,s)=>{s===e&&r(n)&&(e+=1)}),e}o(wt,"countInRow");function St(...t){let r=wt(t,e=>typeof e=="string");return[t.slice(0,r).join(" "),...t.slice(r)]}o(St,"concatFirstStrings");function tt(t,...r){let e=t?.ns,n=t?.name,s=t?.level||"log",i=r;if(g(t))return[q(t)];let l=(e||"").split(":").filter(Boolean).map(String),a=[M(s)];return(l.length||n)&&a.push(K(l,n)),St(...a,...j(...i))}o(tt,"prettyFormat");function R(t,r){Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++)if(t[e].test(r))return!0;return!1}o(R,"anyRegExps");var y=class{format=N;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:e,name:n,level:s,format:i,on:l=[],off:a=[]}){if(r&&(this.prefix=r),e&&(this.ns=e),l&&(this.on=l),a&&(this.off=a),n&&(this.name=n),i&&(this.format=i),s){if(!w[s])throw new Error(`Incorrect level: ${this.level}`);this.level=s}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let e=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:e},...r)}getLevelPriority(r){return w[r]||0}canLog(r){let e=this.getLevelPriority(r),n=this.getLevelPriority(this.level);return this.ns&&R(this.off,this.ns)?!1:this.ns&&R(this.on,this.ns)?!0:e>=n}fatal(...r){this.canLog("fatal")&&this.__log("fatal",...r)}error(...r){this.canLog("error")&&this.__log("error",...r)}warn(...r){this.canLog("warn")&&this.__log("warn",...r)}debug(...r){this.canLog("debug")&&this.__log("debug",...r)}info(...r){this.canLog("info")&&this.__log("info",...r)}trace(...r){this.canLog("trace")&&this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...e){let[n,...s]=e,i={name:this.name,ns:this.ns,level:r,time:new Date},l=e;if(g(n)&&(i={...i,...n},l=s),this.format==="none")return;let a=(0,rt.omitNull)(i);if(this.format==="pretty"){this.log(...tt(a,...l));return}this.log(V(this.format||"lsk",a,...l))}};o(y,"Logger");var T=y;0&&(module.exports={Logger});
//# sourceMappingURL=Logger.js.map

@@ -1,2 +0,2 @@

"use strict";var T=Object.create;var a=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var L=(e,r)=>{for(var t in r)a(e,t,{get:r[t],enumerable:!0})},l=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of B(r))!R.call(e,n)&&n!==t&&a(e,n,{get:()=>r[n],enumerable:!(o=M(r,n))||o.enumerable});return e},g=(e,r,t)=>(l(e,r,"default"),t&&l(t,r,"default")),p=(e,r,t)=>(t=e!=null?T(E(e)):{},l(r||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),S=e=>l(a({},"__esModule",{value:!0}),e);var $={};L($,{bunyanLevels:()=>N,isBunyan:()=>b,parseBunyan:()=>x,stringifyBunyan:()=>I});module.exports=S($);var W=require("@lskjs/algos");var _=require("@lskjs/algos"),m=require("@lskjs/env");var c=require("@lskjs/err");var s={};L(s,{default:()=>d.default,stringify:()=>u.default});g(s,require("fast-safe-stringify"));var u=p(require("fast-safe-stringify")),d=p(require("fast-safe-stringify"));var i=(e,r=null,t=0)=>typeof e=="object"?(0,u.default)(e,r,t):String(e);var h=require("@lskjs/env"),f=(e,r)=>{let t=[];return e!==null&&t.push((0,h.tryJSONparse)(e)),Object.keys(r).length&&t.push(r),t};var P=require("@lskjs/colors"),w=require("@lskjs/env"),A=p(require("pretty-bytes")),F=p(require("pretty-time"));var C=require("@lskjs/colors");var Ge=(0,w.getEnvVar)("LOG_VIEW","short");var N=[10,20,30,40,50,60],O={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"},D={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60},b=e=>Boolean(e.name&&e.hostname&&e.pid&&e.msg&&e.time),x=e=>{let{level:r,time:t,msg:o,hostname:n,pid:z,v:G,...k}=e;return{format:"bunyan",meta:{level:O[r],time:new Date(t)},args:f(o,k)}},I=e=>{let{level:r,time:t,...o}=e;return i({level:D[r],time:t.toISOString(),...o})};0&&(module.exports={bunyanLevels,isBunyan,parseBunyan,stringifyBunyan});
"use strict";var B=Object.create;var a=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var o=(t,r)=>a(t,"name",{value:r,configurable:!0});var x=(t,r)=>{for(var e in r)a(t,e,{get:r[e],enumerable:!0})},u=(t,r,e,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of C(r))!W.call(t,i)&&i!==e&&a(t,i,{get:()=>r[i],enumerable:!(s=E(r,i))||s.enumerable});return t},c=(t,r,e)=>(u(t,r,"default"),e&&u(e,r,"default")),p=(t,r,e)=>(e=t!=null?B(F(t)):{},u(r||!t||!t.__esModule?a(e,"default",{value:t,enumerable:!0}):e,t)),M=t=>u(a({},"__esModule",{value:!0}),t);var D={};x(D,{bunyanLevels:()=>$,isBunyan:()=>v,parseBunyan:()=>k,stringifyBunyan:()=>w});module.exports=M(D);var n;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(n||(n={}));var P=require("@lskjs/algos");var R=require("@lskjs/algos"),h=require("@lskjs/env");var d=require("@lskjs/err");var l={};x(l,{default:()=>y.default,stringify:()=>g.default});c(l,require("fast-safe-stringify"));var g=p(require("fast-safe-stringify")),y=p(require("fast-safe-stringify"));var f=o((t,r=null,e=0)=>typeof t=="object"?(0,g.default)(t,r,e):String(t),"toString");var b=require("@lskjs/env");var m=o((t,r)=>{let e=[];return t!==null&&e.push((0,b.tryJSONparse)(t)),Object.keys(r).length&&e.push(r),e},"parseArgs");var I=require("@lskjs/colors"),S=require("@lskjs/env"),N=p(require("pretty-bytes")),O=p(require("pretty-time"));var A=require("@lskjs/colors");var jt=(0,S.getEnvVar)("LOG_VIEW","short");var $=[10,20,30,40,50,60],T={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"},z={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60},v=o(t=>Boolean(t.name&&t.hostname&&t.pid&&t.msg&&t.time),"isBunyan"),k=o(t=>{let{level:r,time:e,msg:s,hostname:i,pid:G,v:U,..._}=t;return{format:n.bunyan,meta:{level:T[r],time:new Date(e)},args:m(s,_)}},"parseBunyan"),w=o(t=>{let{level:r,time:e,...s}=t;return f({level:z[r],time:e.toISOString(),...s})},"stringifyBunyan");0&&(module.exports={bunyanLevels,isBunyan,parseBunyan,stringifyBunyan});
//# sourceMappingURL=bunyan.js.map

@@ -1,2 +0,2 @@

"use strict";var Q=Object.create;var m=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var x=(e,r)=>{for(var t in r)m(e,t,{get:r[t],enumerable:!0})},f=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Z(r))!q.call(e,n)&&n!==t&&m(e,n,{get:()=>r[n],enumerable:!(o=X(r,n))||o.enumerable});return e},c=(e,r,t)=>(f(e,r,"default"),t&&f(t,r,"default")),y=(e,r,t)=>(t=e!=null?Q(j(e)):{},f(r||!e||!e.__esModule?m(t,"default",{value:e,enumerable:!0}):t,e)),ee=e=>f(m({},"__esModule",{value:!0}),e);var me={};x(me,{detectFormat:()=>O,parse:()=>fe,stringify:()=>_});module.exports=ee(me);var i=require("@lskjs/err");var g={};x(g,{default:()=>I.default,stringify:()=>L.default});c(g,require("fast-safe-stringify"));var L=y(require("fast-safe-stringify")),I=y(require("fast-safe-stringify"));var s=(e,r=null,t=0)=>typeof e=="object"?(0,L.default)(e,r,t):String(e);var w=e=>e.map(r=>(0,i.isError)(r)?(0,i.getCode)(r):null).filter(Boolean)[0],k=e=>e.length?e.map(r=>(0,i.isError)(r)?(0,i.getMessage)(r):s(r)).join(" "):null;var ie=require("@lskjs/algos");var re=require("@lskjs/algos"),h=require("@lskjs/env");var T=require("@lskjs/env"),l=(e,r)=>{let t=[];return e!==null&&t.push((0,T.tryJSONparse)(e)),Object.keys(r).length&&t.push(r),t};var M=["trace","debug","info","warn","error","fatal"];var B=e=>Boolean(M.includes(e.level)&&e.ns),E=e=>Boolean(M.includes(e.level)),p=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url));var b=e=>{let{level:r,time:t,msg:o,ns:n,name:a,...d}=e,u={level:r,time:t,msg:o,ns:n,name:a};if(!p(e))return{format:"lsklogweb",meta:u,args:l(o,d)};let{reqId:D,method:$,host:z,ua:G,ip:U,url:V,status:K,length:J,duration:Y,...H}=d;return{format:"lsklog",meta:{...u,method:$,host:z,reqId:D,ua:G,ip:U,url:V,status:K,duration:Y,length:J},args:l(o,H)}},R=e=>{let{level:r,time:t,...o}=e;return s({level:r,time:+t,...o})};var oe=require("@lskjs/colors"),S=require("@lskjs/env"),ne=y(require("pretty-bytes")),se=y(require("pretty-time"));var te=require("@lskjs/colors");var Ye=(0,S.getEnvVar)("LOG_VIEW","short");var le={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"},ae={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60},C=e=>Boolean(e.name&&e.hostname&&e.pid&&e.msg&&e.time),P=e=>{let{level:r,time:t,msg:o,hostname:n,pid:a,v:d,...u}=e;return{format:"bunyan",meta:{level:le[r],time:new Date(t)},args:l(o,u)}},A=e=>{let{level:r,time:t,...o}=e;return s({level:ae[r],time:t.toISOString(),...o})};var ge=["trace","debug","info","warning","error","fatal","panic"],pe={trace:"trace",debug:"debug",info:"info",warning:"warn",error:"error",fatal:"fatal",panic:"fatal"},ue={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"},F=e=>Boolean(e.msg&&ge.includes(e.level)),W=e=>{let{level:r,time:t,msg:o,...n}=e;return{format:"logrus",meta:{level:pe[r],time:new Date(t)},args:l(o,n)}},N=e=>{let{level:r,time:t,...o}=e;return s({level:ue[r],time:t.toISOString(),...o})};function O(e){return C(e)?"bunyan":B(e)?"lsklog":p(e)?"lsklogweb":F(e)?"logrus":E(e)?"lsklog":null}function _(e,r,...t){let o=w(t),n=k(t),a={code:o,...r,msg:n};return e==="bunyan"?A(a):e==="logrus"?N(a):R(a)}function fe(e){let r=O(e);return r==="bunyan"?P(e):r==="lsklogweb"?b(e):r==="lsklog"?b(e):r==="logrus"?W(e):{format:r,meta:{},args:[e]}}0&&(module.exports={detectFormat,parse,stringify});
"use strict";var Z=Object.create;var p=Object.defineProperty;var K=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty;var e=(t,r)=>p(t,"name",{value:r,configurable:!0});var k=(t,r)=>{for(var o in r)p(t,o,{get:r[o],enumerable:!0})},h=(t,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of j(r))!tt.call(t,i)&&i!==o&&p(t,i,{get:()=>r[i],enumerable:!(n=K(r,i))||n.enumerable});return t},d=(t,r,o)=>(h(t,r,"default"),o&&h(o,r,"default")),x=(t,r,o)=>(o=t!=null?Z(q(t)):{},h(r||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),rt=t=>h(p({},"__esModule",{value:!0}),t);var mt={};k(mt,{detectFormat:()=>T,parse:()=>gt,stringify:()=>R});module.exports=rt(mt);var s;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(s||(s={}));var a=require("@lskjs/err");var c={};k(c,{default:()=>w.default,stringify:()=>y.default});d(c,require("fast-safe-stringify"));var y=x(require("fast-safe-stringify")),w=x(require("fast-safe-stringify"));var l=e((t,r=null,o=0)=>typeof t=="object"?(0,y.default)(t,r,o):String(t),"toString");var S=e(t=>t.map(r=>(0,a.isError)(r)?(0,a.getCode)(r):null).filter(Boolean)[0],"getErrCode"),_=e(t=>t.length?t.map(r=>(0,a.isError)(r)?(0,a.getMessage)(r):l(r)).join(" "):null,"createMsg");var lt=require("@lskjs/algos");var et=require("@lskjs/algos"),L=require("@lskjs/env");var B=require("@lskjs/env");var f=e((t,r)=>{let o=[];return t!==null&&o.push((0,B.tryJSONparse)(t)),Object.keys(r).length&&o.push(r),o},"parseArgs");var E=["trace","debug","info","warn","error","fatal"];var C=e(t=>Boolean(E.includes(t.level)&&t.ns),"isLsklog"),F=e(t=>Boolean(E.includes(t.level)),"isLskLikelog"),g=e(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb");var v=e(t=>{let{level:r,time:o,msg:n,ns:i,name:u,...b}=t,m={level:r,time:o,msg:n,ns:i,name:u};if(!g(t))return{format:s.lsklogweb,meta:m,args:f(n,b)};let{reqId:z,method:D,host:G,ua:U,ip:V,url:J,status:Y,length:H,duration:Q,...X}=b;return{format:s.lsklog,meta:{...m,method:D,host:G,reqId:z,ua:U,ip:V,url:J,status:Y,duration:Q,length:H},args:f(n,X)}},"parseLsklog"),W=e(t=>{let{level:r,time:o,...n}=t;return l({level:r,time:+o,...n})},"stringifyLsklog");var nt=require("@lskjs/colors"),M=require("@lskjs/env"),st=x(require("pretty-bytes")),it=x(require("pretty-time"));var ot=require("@lskjs/colors");var er=(0,M.getEnvVar)("LOG_VIEW","short");var at={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"},ft={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60},A=e(t=>Boolean(t.name&&t.hostname&&t.pid&&t.msg&&t.time),"isBunyan"),I=e(t=>{let{level:r,time:o,msg:n,hostname:i,pid:u,v:b,...m}=t;return{format:s.bunyan,meta:{level:at[r],time:new Date(o)},args:f(n,m)}},"parseBunyan"),N=e(t=>{let{level:r,time:o,...n}=t;return l({level:ft[r],time:o.toISOString(),...n})},"stringifyBunyan");var ut=["trace","debug","info","warning","error","fatal","panic"],ct={trace:"trace",debug:"debug",info:"info",warning:"warn",error:"error",fatal:"fatal",panic:"fatal"},pt={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"},O=e(t=>Boolean(t.msg&&ut.includes(t.level)),"isLogrus"),P=e(t=>{let{level:r,time:o,msg:n,...i}=t;return{format:s.logrus,meta:{level:ct[r],time:new Date(o)},args:f(n,i)}},"parseLogrus"),$=e(t=>{let{level:r,time:o,...n}=t;return l({level:pt[r],time:o.toISOString(),...n})},"stringifyLogrus");function T(t){return A(t)?s.bunyan:C(t)?s.lsklog:g(t)?s.lsklogweb:O(t)?s.logrus:F(t)?s.lsklog:null}e(T,"detectFormat");function R(t,r,...o){let n=S(o),i=_(o),u={code:n,...r,msg:i};return t==="bunyan"?N(u):t==="logrus"?$(u):W(u)}e(R,"stringify");function gt(t){let r=T(t);return r==="bunyan"?I(t):r==="lsklogweb"?v(t):r==="lsklog"?v(t):r==="logrus"?P(t):{format:r,meta:{},args:[t]}}e(gt,"parse");0&&(module.exports={detectFormat,parse,stringify});
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

"use strict";var T=Object.create;var a=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var L=(e,r)=>{for(var t in r)a(e,t,{get:r[t],enumerable:!0})},l=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of B(r))!R.call(e,o)&&o!==t&&a(e,o,{get:()=>r[o],enumerable:!(n=M(r,o))||n.enumerable});return e},g=(e,r,t)=>(l(e,r,"default"),t&&l(t,r,"default")),p=(e,r,t)=>(t=e!=null?T(E(e)):{},l(r||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),S=e=>l(a({},"__esModule",{value:!0}),e);var D={};L(D,{isLogrus:()=>b,logrusLevels:()=>k,parseLogrus:()=>x,stringifyLogrus:()=>I});module.exports=S(D);var W=require("@lskjs/algos");var _=require("@lskjs/algos"),m=require("@lskjs/env");var c=require("@lskjs/err");var s={};L(s,{default:()=>d.default,stringify:()=>u.default});g(s,require("fast-safe-stringify"));var u=p(require("fast-safe-stringify")),d=p(require("fast-safe-stringify"));var i=(e,r=null,t=0)=>typeof e=="object"?(0,u.default)(e,r,t):String(e);var h=require("@lskjs/env"),f=(e,r)=>{let t=[];return e!==null&&t.push((0,h.tryJSONparse)(e)),Object.keys(r).length&&t.push(r),t};var P=require("@lskjs/colors"),w=require("@lskjs/env"),A=p(require("pretty-bytes")),F=p(require("pretty-time"));var C=require("@lskjs/colors");var De=(0,w.getEnvVar)("LOG_VIEW","short");var k=["trace","debug","info","warning","error","fatal","panic"],N={trace:"trace",debug:"debug",info:"info",warning:"warn",error:"error",fatal:"fatal",panic:"fatal"},O={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"},b=e=>Boolean(e.msg&&k.includes(e.level)),x=e=>{let{level:r,time:t,msg:n,...o}=e;return{format:"logrus",meta:{level:N[r],time:new Date(t)},args:f(n,o)}},I=e=>{let{level:r,time:t,...n}=e;return i({level:O[r],time:t.toISOString(),...n})};0&&(module.exports={isLogrus,logrusLevels,parseLogrus,stringifyLogrus});
"use strict";var B=Object.create;var a=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var o=(t,r)=>a(t,"name",{value:r,configurable:!0});var x=(t,r)=>{for(var e in r)a(t,e,{get:r[e],enumerable:!0})},u=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of C(r))!W.call(t,n)&&n!==e&&a(t,n,{get:()=>r[n],enumerable:!(i=E(r,n))||i.enumerable});return t},c=(t,r,e)=>(u(t,r,"default"),e&&u(e,r,"default")),p=(t,r,e)=>(e=t!=null?B(F(t)):{},u(r||!t||!t.__esModule?a(e,"default",{value:t,enumerable:!0}):e,t)),M=t=>u(a({},"__esModule",{value:!0}),t);var z={};x(z,{isLogrus:()=>v,logrusLevels:()=>_,parseLogrus:()=>k,stringifyLogrus:()=>w});module.exports=M(z);var s;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(s||(s={}));var P=require("@lskjs/algos");var R=require("@lskjs/algos"),h=require("@lskjs/env");var d=require("@lskjs/err");var l={};x(l,{default:()=>y.default,stringify:()=>g.default});c(l,require("fast-safe-stringify"));var g=p(require("fast-safe-stringify")),y=p(require("fast-safe-stringify"));var f=o((t,r=null,e=0)=>typeof t=="object"?(0,g.default)(t,r,e):String(t),"toString");var b=require("@lskjs/env");var m=o((t,r)=>{let e=[];return t!==null&&e.push((0,b.tryJSONparse)(t)),Object.keys(r).length&&e.push(r),e},"parseArgs");var I=require("@lskjs/colors"),S=require("@lskjs/env"),N=p(require("pretty-bytes")),O=p(require("pretty-time"));var A=require("@lskjs/colors");var Xt=(0,S.getEnvVar)("LOG_VIEW","short");var _=["trace","debug","info","warning","error","fatal","panic"],$={trace:"trace",debug:"debug",info:"info",warning:"warn",error:"error",fatal:"fatal",panic:"fatal"},T={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"},v=o(t=>Boolean(t.msg&&_.includes(t.level)),"isLogrus"),k=o(t=>{let{level:r,time:e,msg:i,...n}=t;return{format:s.logrus,meta:{level:$[r],time:new Date(e)},args:m(i,n)}},"parseLogrus"),w=o(t=>{let{level:r,time:e,...i}=t;return f({level:T[r],time:e.toISOString(),...i})},"stringifyLogrus");0&&(module.exports={isLogrus,logrusLevels,parseLogrus,stringifyLogrus});
//# sourceMappingURL=logrus.js.map

@@ -1,2 +0,2 @@

"use strict";var $=Object.create;var p=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var b=(e,r)=>{for(var t in r)p(e,t,{get:r[t],enumerable:!0})},g=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of G(r))!V.call(e,n)&&n!==t&&p(e,n,{get:()=>r[n],enumerable:!(o=z(r,n))||o.enumerable});return e},u=(e,r,t)=>(g(e,r,"default"),t&&g(t,r,"default")),f=(e,r,t)=>(t=e!=null?$(U(e)):{},g(r||!e||!e.__esModule?p(t,"default",{value:e,enumerable:!0}):t,e)),K=e=>g(p({},"__esModule",{value:!0}),e);var q={};b(q,{isLskLikelog:()=>k,isLsklog:()=>w,isLsklogWeb:()=>i,isLsklogWebFinal:()=>E,lsklogLevels:()=>d,lsklogWebLevels:()=>j,parseLsklog:()=>T,stringifyLsklog:()=>M});module.exports=K(q);var Z=require("@lskjs/algos");var J=require("@lskjs/algos"),c=require("@lskjs/env");var y=require("@lskjs/err");var s={};b(s,{default:()=>x.default,stringify:()=>m.default});u(s,require("fast-safe-stringify"));var m=f(require("fast-safe-stringify")),x=f(require("fast-safe-stringify"));var l=(e,r=null,t=0)=>typeof e=="object"?(0,m.default)(e,r,t):String(e);var I=require("@lskjs/env"),a=(e,r)=>{let t=[];return e!==null&&t.push((0,I.tryJSONparse)(e)),Object.keys(r).length&&t.push(r),t};var H=require("@lskjs/colors"),B=require("@lskjs/env"),Q=f(require("pretty-bytes")),X=f(require("pretty-time"));var Y=require("@lskjs/colors");var Ze=(0,B.getEnvVar)("LOG_VIEW","short");var d=["trace","debug","info","warn","error","fatal"],j=["reqId","method","host","ua","ip","url","status","length","duration"],w=e=>Boolean(d.includes(e.level)&&e.ns),k=e=>Boolean(d.includes(e.level)),i=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url)),E=e=>Boolean(i(e)&&(e.status||e.duration||e.length)),T=e=>{let{level:r,time:t,msg:o,ns:n,name:R,...h}=e,v={level:r,time:t,msg:o,ns:n,name:R};if(!i(e))return{format:"lsklogweb",meta:v,args:a(o,h)};let{reqId:S,method:_,host:C,ua:P,ip:A,url:F,status:W,length:N,duration:O,...D}=h;return{format:"lsklog",meta:{...v,method:_,host:C,reqId:S,ua:P,ip:A,url:F,status:W,duration:O,length:N},args:a(o,D)}},M=e=>{let{level:r,time:t,...o}=e;return l({level:r,time:+t,...o})};0&&(module.exports={isLskLikelog,isLsklog,isLsklogWeb,isLsklogWebFinal,lsklogLevels,lsklogWebLevels,parseLsklog,stringifyLsklog});
"use strict";var D=Object.create;var f=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var e=(t,r)=>f(t,"name",{value:r,configurable:!0});var v=(t,r)=>{for(var o in r)f(t,o,{get:r[o],enumerable:!0})},p=(t,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of U(r))!J.call(t,i)&&i!==o&&f(t,i,{get:()=>r[i],enumerable:!(n=G(r,i))||n.enumerable});return t},g=(t,r,o)=>(p(t,r,"default"),o&&p(o,r,"default")),m=(t,r,o)=>(o=t!=null?D(V(t)):{},p(r||!t||!t.__esModule?f(o,"default",{value:t,enumerable:!0}):o,t)),Y=t=>p(f({},"__esModule",{value:!0}),t);var tt={};v(tt,{isLskLikelog:()=>_,isLsklog:()=>S,isLsklogWeb:()=>a,isLsklogWebFinal:()=>F,lsklogLevels:()=>y,lsklogWebLevels:()=>q,parseLsklog:()=>B,stringifyLsklog:()=>E});module.exports=Y(tt);var s;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(s||(s={}));var j=require("@lskjs/algos");var H=require("@lskjs/algos"),d=require("@lskjs/env");var x=require("@lskjs/err");var l={};v(l,{default:()=>k.default,stringify:()=>h.default});g(l,require("fast-safe-stringify"));var h=m(require("fast-safe-stringify")),k=m(require("fast-safe-stringify"));var u=e((t,r=null,o=0)=>typeof t=="object"?(0,h.default)(t,r,o):String(t),"toString");var w=require("@lskjs/env");var c=e((t,r)=>{let o=[];return t!==null&&o.push((0,w.tryJSONparse)(t)),Object.keys(r).length&&o.push(r),o},"parseArgs");var X=require("@lskjs/colors"),C=require("@lskjs/env"),Z=m(require("pretty-bytes")),K=m(require("pretty-time"));var Q=require("@lskjs/colors");var lr=(0,C.getEnvVar)("LOG_VIEW","short");var y=["trace","debug","info","warn","error","fatal"],q=["reqId","method","host","ua","ip","url","status","length","duration"],S=e(t=>Boolean(y.includes(t.level)&&t.ns),"isLsklog"),_=e(t=>Boolean(y.includes(t.level)),"isLskLikelog"),a=e(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb"),F=e(t=>Boolean(a(t)&&(t.status||t.duration||t.length)),"isLsklogWebFinal"),B=e(t=>{let{level:r,time:o,msg:n,ns:i,name:W,...b}=t,L={level:r,time:o,msg:n,ns:i,name:W};if(!a(t))return{format:s.lsklogweb,meta:L,args:c(n,b)};let{reqId:M,method:R,host:A,ua:I,ip:N,url:O,status:P,length:$,duration:T,...z}=b;return{format:s.lsklog,meta:{...L,method:R,host:A,reqId:M,ua:I,ip:N,url:O,status:P,duration:T,length:$},args:c(n,z)}},"parseLsklog"),E=e(t=>{let{level:r,time:o,...n}=t;return u({level:r,time:+o,...n})},"stringifyLsklog");0&&(module.exports={isLskLikelog,isLsklog,isLsklogWeb,isLsklogWebFinal,lsklogLevels,lsklogWebLevels,parseLsklog,stringifyLsklog});
//# sourceMappingURL=lsklog.js.map

@@ -1,2 +0,2 @@

"use strict";var t=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(n,r)=>{for(var s in r)t(n,s,{get:r[s],enumerable:!0})},f=(n,r,s,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of a(r))!u.call(n,e)&&e!==s&&t(n,e,{get:()=>r[e],enumerable:!(p=y(r,e))||p.enumerable});return n};var h=n=>f(t({},"__esModule",{value:!0}),n);var l={};c(l,{parseArgs:()=>i});module.exports=h(l);var o=require("@lskjs/env"),i=(n,r)=>{let s=[];return n!==null&&s.push((0,o.tryJSONparse)(n)),Object.keys(r).length&&s.push(r),s};0&&(module.exports={parseArgs});
"use strict";var p=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var o=(s,r)=>p(s,"name",{value:r,configurable:!0});var i=(s,r)=>{for(var e in r)p(s,e,{get:r[e],enumerable:!0})},l=(s,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of f(r))!h.call(s,t)&&t!==e&&p(s,t,{get:()=>r[t],enumerable:!(n=c(r,t))||n.enumerable});return s};var g=s=>l(p({},"__esModule",{value:!0}),s);var O={};i(O,{parseArgs:()=>y});module.exports=g(O);var u=require("@lskjs/env");var y=o((s,r)=>{let e=[];return s!==null&&e.push((0,u.tryJSONparse)(s)),Object.keys(r).length&&e.push(r),e},"parseArgs");0&&(module.exports={parseArgs});
//# sourceMappingURL=utils.js.map

@@ -1,2 +0,2 @@

"use strict";var Ie=Object.create;var y=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Te=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var O=(e,r)=>{for(var t in r)y(e,t,{get:r[t],enumerable:!0})},c=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of we(r))!Me.call(e,n)&&n!==t&&y(e,n,{get:()=>r[n],enumerable:!(o=ke(r,n))||o.enumerable});return e},L=(e,r,t)=>(c(e,r,"default"),t&&c(t,r,"default")),h=(e,r,t)=>(t=e!=null?Ie(Te(e)):{},c(r||!e||!e.__esModule?y(t,"default",{value:e,enumerable:!0}):t,e)),Re=e=>c(y({},"__esModule",{value:!0}),e);var De={};O(De,{concatFirstStrings:()=>ae,countInRow:()=>le,getStatusLevel:()=>C,getUrlLevel:()=>ie,prettyContent:()=>F,prettyFormat:()=>f,prettyLevel:()=>d,prettyMarker:()=>se,prettyMethod:()=>te,prettyNs:()=>P,prettyPath:()=>q,prettyRawLog:()=>Ne,prettyReqId:()=>re,prettySize:()=>ne,prettyStatus:()=>ee,prettyTime:()=>oe,prettyUrl:()=>A});module.exports=Re(De);var Pe=require("@lskjs/algos");var W={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},v=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],x=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var Se=require("@lskjs/algos"),b=require("@lskjs/env");var w=require("@lskjs/err");var p={};O(p,{default:()=>N.default,stringify:()=>I.default});L(p,require("fast-safe-stringify"));var I=h(require("fast-safe-stringify")),N=h(require("fast-safe-stringify"));var D=require("@lskjs/env"),a=(e,r)=>{let t=[];return e!==null&&t.push((0,D.tryJSONparse)(e)),Object.keys(r).length&&t.push(r),t};var Be={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"};var $=e=>Boolean(e.name&&e.hostname&&e.pid&&e.msg&&e.time),z=e=>{let{level:r,time:t,msg:o,hostname:n,pid:s,v:i,...l}=e;return{format:"bunyan",meta:{level:Be[r],time:new Date(t)},args:a(o,l)}};var Ee=["trace","debug","info","warning","error","fatal","panic"],_e={trace:"trace",debug:"debug",info:"info",warning:"warn",error:"error",fatal:"fatal",panic:"fatal"};var G=e=>Boolean(e.msg&&Ee.includes(e.level)),U=e=>{let{level:r,time:t,msg:o,...n}=e;return{format:"logrus",meta:{level:_e[r],time:new Date(t)},args:a(o,n)}};function Ce(e){return $(e)?"bunyan":K(e)?"lsklog":g(e)?"lsklogweb":G(e)?"logrus":J(e)?"lsklog":null}function V(e){let r=Ce(e);return r==="bunyan"?z(e):r==="lsklogweb"?M(e):r==="lsklog"?M(e):r==="logrus"?U(e):{format:r,meta:{},args:[e]}}var Y=["trace","debug","info","warn","error","fatal"];var K=e=>Boolean(Y.includes(e.level)&&e.ns),J=e=>Boolean(Y.includes(e.level)),g=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url)),R=e=>Boolean(g(e)&&(e.status||e.duration||e.length)),M=e=>{let{level:r,time:t,msg:o,ns:n,name:s,...i}=e,l={level:r,time:t,msg:o,ns:n,name:s};if(!g(e))return{format:"lsklogweb",meta:l,args:a(o,i)};let{reqId:ue,method:me,host:ce,ua:ye,ip:Le,url:he,status:de,length:ve,duration:xe,...be}=i;return{format:"lsklog",meta:{...l,method:me,host:ce,reqId:ue,ua:ye,ip:Le,url:he,status:de,duration:xe,length:ve},args:a(o,be)}};var Q=require("@lskjs/colors"),X=require("@lskjs/env"),Z=h(require("pretty-bytes")),j=h(require("pretty-time"));var B=require("@lskjs/colors");var S=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((r,t)=>{let o=(r<<5)-r+t.charCodeAt(0);return o&o},0)-48),H=S;function E(e,r){let t=v[H(r||"")%v.length]||[];return(0,B.colorize)(e,t)}function u(e,r){let t=r?W[r]:[];return(0,B.colorize)(e,t)}var Fe=(0,X.getEnvVar)("LOG_VIEW","short"),m=(e,r)=>String(e).padStart(r),Ae=(e,r)=>String(e).padEnd(r),_=20,q=(e,r=0)=>(_=Math.max(e&&e.length||0,_,r),Ae(e,_)),C=e=>e>=500?"error":e>=400?"warn":e>=300?"debug":null,ee=e=>{let r=C(e);return r||(r=e!==200?"log":null),u(m(String(e),3),r)},re=e=>m(`#${e}`,3),te=e=>{let r=e==="REMOVE"?"error":e==="WS"?"debug":null;return u(m(e,4),r)},oe=(e,r="")=>{if(!Number.isFinite(e))return null;let t=e>=10*1e3?"error":e>=3*1e3?"warn":null,n=["m","s","ms"].includes(r)?r:"",s=Math.floor(Math.abs(e)*10**6),i=(0,j.default)(s,n);return u(m(i,5),t)},ne=(e,r="")=>{if(!Number.isFinite(e))return null;let t=(0,Z.default)(e,{maximumFractionDigits:1}).split(" "),o=t[1];return`${+t[0]>=100?Math.round(+t[0]):+t[0]}${r}${o}`},P=(e,r)=>[...e,r].filter(Boolean).map(String).map(o=>E(o,o)).join(":");function se(e){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],t=r[S(e)%r.length];return E(t,String(e))}var d=e=>{let r=Fe==="short"?(e[0]||"").toLowerCase():m(e,5);return r=`[${r}]`,u(r,e)},Oe=/\[[^"\]]+]/gm,F=(...e)=>{let r=[];return e.forEach(t=>{if(typeof t=="string"){let o=0;r.push(t.replace(Oe,n=>(0,Q.colorize)(n,x[o++%x.length])))}else r.push(t)}),r},ie=e=>C(e.status)||R(e)?"debug":"trace",A=e=>{let r=R(e),t=ie(e);return[d(t),[se(e.reqId),te(e.method)].join(""),q(e.url),re(e.reqId),r&&e.method!=="WS"?ee(e.status):null,!r&&"\u29D7\u29D6\u29D7",r&&oe(e.duration),r&&e.method!=="WS"?ne(e.length):null].filter(Boolean).join(" ")};function le(e,r){let t=0;return e.forEach((o,n)=>{n===t&&r(o)&&(t+=1)}),t}function ae(...e){let r=le(e,t=>typeof t=="string");return[e.slice(0,r).join(" "),...e.slice(r)]}function f(e,...r){let t=e?.ns,o=e?.name,n=e?.level||"log",s=r;if(g(e))return[A(e)];let i=(t||"").split(":").filter(Boolean).map(String),l=[d(n)];return(i.length||o)&&l.push(P(i,o)),ae(...l,...F(...s))}var fe=require("@lskjs/env");var ge=require("@lskjs/algos"),We=require("logfmt"),pe=(e,r=e)=>{try{if(typeof e!="string")return e;if(!e.trim())return r;let t=We.parse(e);return Object.keys(t).includes("")||Object.keys(t).length<2||(0,ge.count)(t,o=>o===!0)>=Object.keys(t).length/2?r:t}catch{return r}};var Ne=(e,r)=>{let t,o;if(typeof r=="string"&&(!t&&!!r.trim()&&(t=(0,fe.tryJSONparse)(r,null),t!==null&&(o="json")),!t&&!!r.trim()&&(t=pe(r,null),t!==null&&(o="logfmt"))),t===null&&(t=null,o="raw"),!t){e.log(...f({},r));return}if(typeof t!="object"){e.log(...f({},t));return}let{meta:n,args:s=[]}=V(t);e.log(...f(n,...s))};0&&(module.exports={concatFirstStrings,countInRow,getStatusLevel,getUrlLevel,prettyContent,prettyFormat,prettyLevel,prettyMarker,prettyMethod,prettyNs,prettyPath,prettyRawLog,prettyReqId,prettySize,prettyStatus,prettyTime,prettyUrl});
"use strict";var wt=Object.create;var g=Object.defineProperty;var St=Object.getOwnPropertyDescriptor;var _t=Object.getOwnPropertyNames;var Bt=Object.getPrototypeOf,Et=Object.prototype.hasOwnProperty;var o=(t,r)=>g(t,"name",{value:r,configurable:!0});var N=(t,r)=>{for(var e in r)g(t,e,{get:r[e],enumerable:!0})},y=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of _t(r))!Et.call(t,s)&&s!==e&&g(t,s,{get:()=>r[s],enumerable:!(n=St(r,s))||n.enumerable});return t},x=(t,r,e)=>(y(t,r,"default"),e&&y(e,r,"default")),b=(t,r,e)=>(e=t!=null?wt(Bt(t)):{},y(r||!t||!t.__esModule?g(e,"default",{value:t,enumerable:!0}):e,t)),Ct=t=>y(g({},"__esModule",{value:!0}),t);var zt={};N(zt,{concatFirstStrings:()=>ft,countInRow:()=>at,getStatusLevel:()=>M,getUrlLevel:()=>lt,prettyContent:()=>I,prettyFormat:()=>m,prettyLevel:()=>L,prettyMarker:()=>it,prettyMethod:()=>ot,prettyNs:()=>A,prettyPath:()=>tt,prettyRawLog:()=>Tt,prettyReqId:()=>et,prettySize:()=>st,prettyStatus:()=>rt,prettyTime:()=>nt,prettyUrl:()=>P});module.exports=Ct(zt);var i;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(i||(i={}));var At=require("@lskjs/algos");var $={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},v=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],k=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var Ft=require("@lskjs/algos"),w=require("@lskjs/env");var B=require("@lskjs/err");var p={};N(p,{default:()=>T.default,stringify:()=>S.default});x(p,require("fast-safe-stringify"));var S=b(require("fast-safe-stringify")),T=b(require("fast-safe-stringify"));var z=require("@lskjs/env");var u=o((t,r)=>{let e=[];return t!==null&&e.push((0,z.tryJSONparse)(t)),Object.keys(r).length&&e.push(r),e},"parseArgs");var Ot={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"};var D=o(t=>Boolean(t.name&&t.hostname&&t.pid&&t.msg&&t.time),"isBunyan"),G=o(t=>{let{level:r,time:e,msg:n,hostname:s,pid:l,v:a,...f}=t;return{format:i.bunyan,meta:{level:Ot[r],time:new Date(e)},args:u(n,f)}},"parseBunyan");var Rt=["trace","debug","info","warning","error","fatal","panic"],Wt={trace:"trace",debug:"debug",info:"info",warning:"warn",error:"error",fatal:"fatal",panic:"fatal"};var U=o(t=>Boolean(t.msg&&Rt.includes(t.level)),"isLogrus"),V=o(t=>{let{level:r,time:e,msg:n,...s}=t;return{format:i.logrus,meta:{level:Wt[r],time:new Date(e)},args:u(n,s)}},"parseLogrus");function Mt(t){return D(t)?i.bunyan:Y(t)?i.lsklog:c(t)?i.lsklogweb:U(t)?i.logrus:H(t)?i.lsklog:null}o(Mt,"detectFormat");function J(t){let r=Mt(t);return r==="bunyan"?G(t):r==="lsklogweb"?E(t):r==="lsklog"?E(t):r==="logrus"?V(t):{format:r,meta:{},args:[t]}}o(J,"parse");var Q=["trace","debug","info","warn","error","fatal"];var Y=o(t=>Boolean(Q.includes(t.level)&&t.ns),"isLsklog"),H=o(t=>Boolean(Q.includes(t.level)),"isLskLikelog"),c=o(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb"),C=o(t=>Boolean(c(t)&&(t.status||t.duration||t.length)),"isLsklogWebFinal"),E=o(t=>{let{level:r,time:e,msg:n,ns:s,name:l,...a}=t,f={level:r,time:e,msg:n,ns:s,name:l};if(!c(t))return{format:i.lsklogweb,meta:f,args:u(n,a)};let{reqId:mt,method:gt,host:ht,ua:dt,ip:yt,url:xt,status:bt,length:Lt,duration:vt,...kt}=a;return{format:i.lsklog,meta:{...f,method:gt,host:ht,reqId:mt,ua:dt,ip:yt,url:xt,status:bt,duration:vt,length:Lt},args:u(n,kt)}},"parseLsklog");var Z=require("@lskjs/colors"),K=require("@lskjs/env"),j=b(require("pretty-bytes")),q=b(require("pretty-time"));var O=require("@lskjs/colors");var F=o(t=>typeof t=="number"?t:Math.abs(String(t).split("").reduce((r,e)=>{let n=(r<<5)-r+e.charCodeAt(0);return n&n},0)-48),"hashCode"),X=F;function R(t,r){let e=v[X(r||"")%v.length]||[];return(0,O.colorize)(t,e)}o(R,"themeizeRandom");function h(t,r){let e=r?$[r]:[];return(0,O.colorize)(t,e)}o(h,"themeize");var It=(0,K.getEnvVar)("LOG_VIEW","short"),d=o((t,r)=>String(t).padStart(r),"leftPad"),Pt=o((t,r)=>String(t).padEnd(r),"rightPad"),W=20,tt=o((t,r=0)=>(W=Math.max(t&&t.length||0,W,r),Pt(t,W)),"prettyPath"),M=o(t=>t>=500?"error":t>=400?"warn":t>=300?"debug":null,"getStatusLevel"),rt=o(t=>{let r=M(t);return r||(r=t!==200?"log":null),h(d(String(t),3),r)},"prettyStatus"),et=o(t=>d(`#${t}`,3),"prettyReqId"),ot=o(t=>{let r=t==="REMOVE"?"error":t==="WS"?"debug":null;return h(d(t,4),r)},"prettyMethod"),nt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=t>=10*1e3?"error":t>=3*1e3?"warn":null,s=["m","s","ms"].includes(r)?r:"",l=Math.floor(Math.abs(t)*10**6),a=(0,q.default)(l,s);return h(d(a,5),e)},"prettyTime"),st=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=(0,j.default)(t,{maximumFractionDigits:1}).split(" "),n=e[1];return`${+e[0]>=100?Math.round(+e[0]):+e[0]}${r}${n}`},"prettySize"),A=o((t,r)=>[...t,r].filter(Boolean).map(String).map(n=>R(n,n)).join(":"),"prettyNs");function it(t){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],e=r[F(t)%r.length];return R(e,String(t))}o(it,"prettyMarker");var L=o(t=>{let r=It==="short"?(t[0]||"").toLowerCase():d(t,5);return r=`[${r}]`,h(r,t)},"prettyLevel"),Nt=/\[[^"\]]+]/gm,I=o((...t)=>{let r=[];return t.forEach(e=>{if(typeof e=="string"){let n=0;r.push(e.replace(Nt,s=>(0,Z.colorize)(s,k[n++%k.length])))}else r.push(e)}),r},"prettyContent"),lt=o(t=>M(t.status)||C(t)?"debug":"trace","getUrlLevel"),P=o(t=>{let r=C(t),e=lt(t);return[L(e),[it(t.reqId),ot(t.method)].join(""),tt(t.url),et(t.reqId),r&&t.method!=="WS"?rt(t.status):null,!r&&"\u29D7\u29D6\u29D7",r&&nt(t.duration),r&&t.method!=="WS"?st(t.length):null].filter(Boolean).join(" ")},"prettyUrl");function at(t,r){let e=0;return t.forEach((n,s)=>{s===e&&r(n)&&(e+=1)}),e}o(at,"countInRow");function ft(...t){let r=at(t,e=>typeof e=="string");return[t.slice(0,r).join(" "),...t.slice(r)]}o(ft,"concatFirstStrings");function m(t,...r){let e=t?.ns,n=t?.name,s=t?.level||"log",l=r;if(c(t))return[P(t)];let a=(e||"").split(":").filter(Boolean).map(String),f=[L(s)];return(a.length||n)&&f.push(A(a,n)),ft(...f,...I(...l))}o(m,"prettyFormat");var pt=require("@lskjs/env");var ut=require("@lskjs/algos");var $t=require("logfmt"),ct=o((t,r=t)=>{try{if(typeof t!="string")return t;if(!t.trim())return r;let e=$t.parse(t);return Object.keys(e).includes("")||Object.keys(e).length<2||(0,ut.count)(e,n=>n===!0)>=Object.keys(e).length/2?r:e}catch{return r}},"tryLogfmtParse");var Tt=o((t,r)=>{let e,n;if(typeof r=="string"&&(!e&&r.trim()&&(e=(0,pt.tryJSONparse)(r,null),e!==null&&(n="json")),!e&&r.trim()&&(e=ct(r,null),e!==null&&(n="logfmt"))),e===null&&(e=null,n="raw"),!e){t.log(...m({},r));return}if(typeof e!="object"){t.log(...m({},e));return}let{meta:s,args:l=[]}=J(e);t.log(...m(s,...l))},"prettyRawLog");0&&(module.exports={concatFirstStrings,countInRow,getStatusLevel,getUrlLevel,prettyContent,prettyFormat,prettyLevel,prettyMarker,prettyMethod,prettyNs,prettyPath,prettyRawLog,prettyReqId,prettySize,prettyStatus,prettyTime,prettyUrl});
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

"use strict";var K=Object.create;var u=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var S=(e,r)=>{for(var t in r)u(e,t,{get:r[t],enumerable:!0})},p=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Y(r))!Q.call(e,n)&&n!==t&&u(e,n,{get:()=>r[n],enumerable:!(o=J(r,n))||o.enumerable});return e},f=(e,r,t)=>(p(e,r,"default"),t&&p(t,r,"default")),m=(e,r,t)=>(t=e!=null?K(H(e)):{},p(r||!e||!e.__esModule?u(t,"default",{value:e,enumerable:!0}):t,e)),X=e=>p(u({},"__esModule",{value:!0}),e);var fe={};S(fe,{concatFirstStrings:()=>V,countInRow:()=>U,default:()=>ue,prettyFormat:()=>I});module.exports=X(fe);var q=require("@lskjs/algos");var _={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},y=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],L=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var Z=require("@lskjs/algos"),d=require("@lskjs/env");var b=require("@lskjs/err");var s={};S(s,{default:()=>C.default,stringify:()=>h.default});f(s,require("fast-safe-stringify"));var h=m(require("fast-safe-stringify")),C=m(require("fast-safe-stringify"));var j=require("@lskjs/env");var i=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url)),w=e=>Boolean(i(e)&&(e.status||e.duration||e.length));var F=require("@lskjs/colors"),W=require("@lskjs/env"),N=m(require("pretty-bytes")),O=m(require("pretty-time"));var T=require("@lskjs/colors");var k=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((r,t)=>{let o=(r<<5)-r+t.charCodeAt(0);return o&o},0)-48),A=k;function M(e,r){let t=y[A(r||"")%y.length]||[];return(0,T.colorize)(e,t)}function l(e,r){let t=r?_[r]:[];return(0,T.colorize)(e,t)}var ee=(0,W.getEnvVar)("LOG_VIEW","short"),a=(e,r)=>String(e).padStart(r),re=(e,r)=>String(e).padEnd(r),B=20,te=(e,r=0)=>(B=Math.max(e&&e.length||0,B,r),re(e,B)),D=e=>e>=500?"error":e>=400?"warn":e>=300?"debug":null,oe=e=>{let r=D(e);return r||(r=e!==200?"log":null),l(a(String(e),3),r)},ne=e=>a(`#${e}`,3),se=e=>{let r=e==="REMOVE"?"error":e==="WS"?"debug":null;return l(a(e,4),r)},ie=(e,r="")=>{if(!Number.isFinite(e))return null;let t=e>=10*1e3?"error":e>=3*1e3?"warn":null,n=["m","s","ms"].includes(r)?r:"",c=Math.floor(Math.abs(e)*10**6),g=(0,O.default)(c,n);return l(a(g,5),t)},le=(e,r="")=>{if(!Number.isFinite(e))return null;let t=(0,N.default)(e,{maximumFractionDigits:1}).split(" "),o=t[1];return`${+t[0]>=100?Math.round(+t[0]):+t[0]}${r}${o}`},$=(e,r)=>[...e,r].filter(Boolean).map(String).map(o=>M(o,o)).join(":");function ae(e){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],t=r[k(e)%r.length];return M(t,String(e))}var E=e=>{let r=ee==="short"?(e[0]||"").toLowerCase():a(e,5);return r=`[${r}]`,l(r,e)},ge=/\[[^"\]]+]/gm,z=(...e)=>{let r=[];return e.forEach(t=>{if(typeof t=="string"){let o=0;r.push(t.replace(ge,n=>(0,F.colorize)(n,L[o++%L.length])))}else r.push(t)}),r},pe=e=>D(e.status)||w(e)?"debug":"trace",G=e=>{let r=w(e),t=pe(e);return[E(t),[ae(e.reqId),se(e.method)].join(""),te(e.url),ne(e.reqId),r&&e.method!=="WS"?oe(e.status):null,!r&&"\u29D7\u29D6\u29D7",r&&ie(e.duration),r&&e.method!=="WS"?le(e.length):null].filter(Boolean).join(" ")};function U(e,r){let t=0;return e.forEach((o,n)=>{n===t&&r(o)&&(t+=1)}),t}function V(...e){let r=U(e,t=>typeof t=="string");return[e.slice(0,r).join(" "),...e.slice(r)]}function I(e,...r){let t=e?.ns,o=e?.name,n=e?.level||"log",c=r;if(i(e))return[G(e)];let g=(t||"").split(":").filter(Boolean).map(String),R=[E(n)];return(g.length||o)&&R.push($(g,o)),V(...R,...z(...c))}var ue=I;0&&(module.exports={concatFirstStrings,countInRow,prettyFormat});
"use strict";var Y=Object.create;var a=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var X=Object.getPrototypeOf,Z=Object.prototype.hasOwnProperty;var o=(t,r)=>a(t,"name",{value:r,configurable:!0});var M=(t,r)=>{for(var e in r)a(t,e,{get:r[e],enumerable:!0})},g=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of Q(r))!Z.call(t,s)&&s!==e&&a(t,s,{get:()=>r[s],enumerable:!(n=H(r,s))||n.enumerable});return t},m=(t,r,e)=>(g(t,r,"default"),e&&g(e,r,"default")),h=(t,r,e)=>(e=t!=null?Y(X(t)):{},g(r||!t||!t.__esModule?a(e,"default",{value:t,enumerable:!0}):e,t)),K=t=>g(a({},"__esModule",{value:!0}),t);var gt={};M(gt,{concatFirstStrings:()=>J,countInRow:()=>V,default:()=>pt,prettyFormat:()=>w});module.exports=K(gt);var i;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(i||(i={}));var tt=require("@lskjs/algos");var R={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},x=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],y=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var j=require("@lskjs/algos"),b=require("@lskjs/env");var k=require("@lskjs/err");var l={};M(l,{default:()=>A.default,stringify:()=>L.default});m(l,require("fast-safe-stringify"));var L=h(require("fast-safe-stringify")),A=h(require("fast-safe-stringify"));var q=require("@lskjs/env");var f=o(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb"),S=o(t=>Boolean(f(t)&&(t.status||t.duration||t.length)),"isLsklogWebFinal");var O=require("@lskjs/colors"),P=require("@lskjs/env"),$=h(require("pretty-bytes")),T=h(require("pretty-time"));var B=require("@lskjs/colors");var _=o(t=>typeof t=="number"?t:Math.abs(String(t).split("").reduce((r,e)=>{let n=(r<<5)-r+e.charCodeAt(0);return n&n},0)-48),"hashCode"),N=_;function E(t,r){let e=x[N(r||"")%x.length]||[];return(0,B.colorize)(t,e)}o(E,"themeizeRandom");function u(t,r){let e=r?R[r]:[];return(0,B.colorize)(t,e)}o(u,"themeize");var rt=(0,P.getEnvVar)("LOG_VIEW","short"),c=o((t,r)=>String(t).padStart(r),"leftPad"),et=o((t,r)=>String(t).padEnd(r),"rightPad"),C=20,ot=o((t,r=0)=>(C=Math.max(t&&t.length||0,C,r),et(t,C)),"prettyPath"),z=o(t=>t>=500?"error":t>=400?"warn":t>=300?"debug":null,"getStatusLevel"),nt=o(t=>{let r=z(t);return r||(r=t!==200?"log":null),u(c(String(t),3),r)},"prettyStatus"),st=o(t=>c(`#${t}`,3),"prettyReqId"),it=o(t=>{let r=t==="REMOVE"?"error":t==="WS"?"debug":null;return u(c(t,4),r)},"prettyMethod"),lt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=t>=10*1e3?"error":t>=3*1e3?"warn":null,s=["m","s","ms"].includes(r)?r:"",d=Math.floor(Math.abs(t)*10**6),p=(0,T.default)(d,s);return u(c(p,5),e)},"prettyTime"),at=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=(0,$.default)(t,{maximumFractionDigits:1}).split(" "),n=e[1];return`${+e[0]>=100?Math.round(+e[0]):+e[0]}${r}${n}`},"prettySize"),D=o((t,r)=>[...t,r].filter(Boolean).map(String).map(n=>E(n,n)).join(":"),"prettyNs");function ft(t){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],e=r[_(t)%r.length];return E(e,String(t))}o(ft,"prettyMarker");var F=o(t=>{let r=rt==="short"?(t[0]||"").toLowerCase():c(t,5);return r=`[${r}]`,u(r,t)},"prettyLevel"),ut=/\[[^"\]]+]/gm,G=o((...t)=>{let r=[];return t.forEach(e=>{if(typeof e=="string"){let n=0;r.push(e.replace(ut,s=>(0,O.colorize)(s,y[n++%y.length])))}else r.push(e)}),r},"prettyContent"),ct=o(t=>z(t.status)||S(t)?"debug":"trace","getUrlLevel"),U=o(t=>{let r=S(t),e=ct(t);return[F(e),[ft(t.reqId),it(t.method)].join(""),ot(t.url),st(t.reqId),r&&t.method!=="WS"?nt(t.status):null,!r&&"\u29D7\u29D6\u29D7",r&&lt(t.duration),r&&t.method!=="WS"?at(t.length):null].filter(Boolean).join(" ")},"prettyUrl");function V(t,r){let e=0;return t.forEach((n,s)=>{s===e&&r(n)&&(e+=1)}),e}o(V,"countInRow");function J(...t){let r=V(t,e=>typeof e=="string");return[t.slice(0,r).join(" "),...t.slice(r)]}o(J,"concatFirstStrings");function w(t,...r){let e=t?.ns,n=t?.name,s=t?.level||"log",d=r;if(f(t))return[U(t)];let p=(e||"").split(":").filter(Boolean).map(String),W=[F(s)];return(p.length||n)&&W.push(D(p,n)),J(...W,...G(...d))}o(w,"prettyFormat");var pt=w;0&&(module.exports={concatFirstStrings,countInRow,prettyFormat});
//# sourceMappingURL=prettyFormat.js.map

@@ -1,2 +0,2 @@

"use strict";var me=Object.create;var y=Object.defineProperty;var ce=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var C=(e,r)=>{for(var t in r)y(e,t,{get:r[t],enumerable:!0})},c=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ye(r))!he.call(e,n)&&n!==t&&y(e,n,{get:()=>r[n],enumerable:!(o=ce(r,n))||o.enumerable});return e},L=(e,r,t)=>(c(e,r,"default"),t&&c(t,r,"default")),h=(e,r,t)=>(t=e!=null?me(Le(e)):{},c(r||!e||!e.__esModule?y(t,"default",{value:e,enumerable:!0}):t,e)),de=e=>c(y({},"__esModule",{value:!0}),e);var $e={};C($e,{default:()=>De,prettyRawLog:()=>te});module.exports=de($e);var re=require("@lskjs/env");var P=require("@lskjs/algos"),ve=require("logfmt"),F=(e,r=e)=>{try{if(typeof e!="string")return e;if(!e.trim())return r;let t=ve.parse(e);return Object.keys(t).includes("")||Object.keys(t).length<2||(0,P.count)(t,o=>o===!0)>=Object.keys(t).length/2?r:t}catch{return r}};var b=require("@lskjs/err");var p={};C(p,{default:()=>A.default,stringify:()=>d.default});L(p,require("fast-safe-stringify"));var d=h(require("fast-safe-stringify")),A=h(require("fast-safe-stringify"));var Fe=require("@lskjs/algos");var O={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},x=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],I=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var be=require("@lskjs/algos"),k=require("@lskjs/env");var W=require("@lskjs/env"),a=(e,r)=>{let t=[];return e!==null&&t.push((0,W.tryJSONparse)(e)),Object.keys(r).length&&t.push(r),t};var N=["trace","debug","info","warn","error","fatal"];var D=e=>Boolean(N.includes(e.level)&&e.ns),$=e=>Boolean(N.includes(e.level)),g=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url)),T=e=>Boolean(g(e)&&(e.status||e.duration||e.length)),M=e=>{let{level:r,time:t,msg:o,ns:n,name:s,...i}=e,l={level:r,time:t,msg:o,ns:n,name:s};if(!g(e))return{format:"lsklogweb",meta:l,args:a(o,i)};let{reqId:oe,method:ne,host:se,ua:ie,ip:le,url:ae,status:ge,length:pe,duration:ue,...fe}=i;return{format:"lsklog",meta:{...l,method:ne,host:se,reqId:oe,ua:ie,ip:le,url:ae,status:ge,duration:ue,length:pe},args:a(o,fe)}};var G=require("@lskjs/colors"),U=require("@lskjs/env"),V=h(require("pretty-bytes")),K=h(require("pretty-time"));var S=require("@lskjs/colors");var R=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((r,t)=>{let o=(r<<5)-r+t.charCodeAt(0);return o&o},0)-48),z=R;function B(e,r){let t=x[z(r||"")%x.length]||[];return(0,S.colorize)(e,t)}function u(e,r){let t=r?O[r]:[];return(0,S.colorize)(e,t)}var xe=(0,U.getEnvVar)("LOG_VIEW","short"),f=(e,r)=>String(e).padStart(r),Ie=(e,r)=>String(e).padEnd(r),E=20,ke=(e,r=0)=>(E=Math.max(e&&e.length||0,E,r),Ie(e,E)),J=e=>e>=500?"error":e>=400?"warn":e>=300?"debug":null,we=e=>{let r=J(e);return r||(r=e!==200?"log":null),u(f(String(e),3),r)},Te=e=>f(`#${e}`,3),Me=e=>{let r=e==="REMOVE"?"error":e==="WS"?"debug":null;return u(f(e,4),r)},Re=(e,r="")=>{if(!Number.isFinite(e))return null;let t=e>=10*1e3?"error":e>=3*1e3?"warn":null,n=["m","s","ms"].includes(r)?r:"",s=Math.floor(Math.abs(e)*10**6),i=(0,K.default)(s,n);return u(f(i,5),t)},Se=(e,r="")=>{if(!Number.isFinite(e))return null;let t=(0,V.default)(e,{maximumFractionDigits:1}).split(" "),o=t[1];return`${+t[0]>=100?Math.round(+t[0]):+t[0]}${r}${o}`},Y=(e,r)=>[...e,r].filter(Boolean).map(String).map(o=>B(o,o)).join(":");function Be(e){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],t=r[R(e)%r.length];return B(t,String(e))}var _=e=>{let r=xe==="short"?(e[0]||"").toLowerCase():f(e,5);return r=`[${r}]`,u(r,e)},Ee=/\[[^"\]]+]/gm,H=(...e)=>{let r=[];return e.forEach(t=>{if(typeof t=="string"){let o=0;r.push(t.replace(Ee,n=>(0,G.colorize)(n,I[o++%I.length])))}else r.push(t)}),r},_e=e=>J(e.status)||T(e)?"debug":"trace",Q=e=>{let r=T(e),t=_e(e);return[_(t),[Be(e.reqId),Me(e.method)].join(""),ke(e.url),Te(e.reqId),r&&e.method!=="WS"?we(e.status):null,!r&&"\u29D7\u29D6\u29D7",r&&Re(e.duration),r&&e.method!=="WS"?Se(e.length):null].filter(Boolean).join(" ")};function Ce(e,r){let t=0;return e.forEach((o,n)=>{n===t&&r(o)&&(t+=1)}),t}function Pe(...e){let r=Ce(e,t=>typeof t=="string");return[e.slice(0,r).join(" "),...e.slice(r)]}function m(e,...r){let t=e?.ns,o=e?.name,n=e?.level||"log",s=r;if(g(e))return[Q(e)];let i=(t||"").split(":").filter(Boolean).map(String),l=[_(n)];return(i.length||o)&&l.push(Y(i,o)),Pe(...l,...H(...s))}var Ae={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"};var X=e=>Boolean(e.name&&e.hostname&&e.pid&&e.msg&&e.time),Z=e=>{let{level:r,time:t,msg:o,hostname:n,pid:s,v:i,...l}=e;return{format:"bunyan",meta:{level:Ae[r],time:new Date(t)},args:a(o,l)}};var Oe=["trace","debug","info","warning","error","fatal","panic"],We={trace:"trace",debug:"debug",info:"info",warning:"warn",error:"error",fatal:"fatal",panic:"fatal"};var j=e=>Boolean(e.msg&&Oe.includes(e.level)),q=e=>{let{level:r,time:t,msg:o,...n}=e;return{format:"logrus",meta:{level:We[r],time:new Date(t)},args:a(o,n)}};function Ne(e){return X(e)?"bunyan":D(e)?"lsklog":g(e)?"lsklogweb":j(e)?"logrus":$(e)?"lsklog":null}function ee(e){let r=Ne(e);return r==="bunyan"?Z(e):r==="lsklogweb"?M(e):r==="lsklog"?M(e):r==="logrus"?q(e):{format:r,meta:{},args:[e]}}var te=(e,r)=>{let t,o;if(typeof r=="string"&&(!t&&!!r.trim()&&(t=(0,re.tryJSONparse)(r,null),t!==null&&(o="json")),!t&&!!r.trim()&&(t=F(r,null),t!==null&&(o="logfmt"))),t===null&&(t=null,o="raw"),!t){e.log(...m({},r));return}if(typeof t!="object"){e.log(...m({},t));return}let{meta:n,args:s=[]}=ee(t);e.log(...m(n,...s))},De=te;0&&(module.exports={prettyRawLog});
"use strict";var gt=Object.create;var m=Object.defineProperty;var ht=Object.getOwnPropertyDescriptor;var dt=Object.getOwnPropertyNames;var yt=Object.getPrototypeOf,xt=Object.prototype.hasOwnProperty;var o=(t,r)=>m(t,"name",{value:r,configurable:!0});var M=(t,r)=>{for(var e in r)m(t,e,{get:r[e],enumerable:!0})},y=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of dt(r))!xt.call(t,s)&&s!==e&&m(t,s,{get:()=>r[s],enumerable:!(n=ht(r,s))||n.enumerable});return t},x=(t,r,e)=>(y(t,r,"default"),e&&y(e,r,"default")),b=(t,r,e)=>(e=t!=null?gt(yt(t)):{},y(r||!t||!t.__esModule?m(e,"default",{value:t,enumerable:!0}):e,t)),bt=t=>y(m({},"__esModule",{value:!0}),t);var Dt={};M(Dt,{default:()=>zt,prettyRawLog:()=>ot});module.exports=bt(Dt);var et=require("@lskjs/env");var A=require("@lskjs/algos");var Lt=require("logfmt"),I=o((t,r=t)=>{try{if(typeof t!="string")return t;if(!t.trim())return r;let e=Lt.parse(t);return Object.keys(e).includes("")||Object.keys(e).length<2||(0,A.count)(e,n=>n===!0)>=Object.keys(e).length/2?r:e}catch{return r}},"tryLogfmtParse");var i;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(i||(i={}));var k=require("@lskjs/err");var p={};M(p,{default:()=>P.default,stringify:()=>L.default});x(p,require("fast-safe-stringify"));var L=b(require("fast-safe-stringify")),P=b(require("fast-safe-stringify"));var It=require("@lskjs/algos");var N={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},w=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],S=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var vt=require("@lskjs/algos"),_=require("@lskjs/env");var $=require("@lskjs/env");var u=o((t,r)=>{let e=[];return t!==null&&e.push((0,$.tryJSONparse)(t)),Object.keys(r).length&&e.push(r),e},"parseArgs");var T=["trace","debug","info","warn","error","fatal"];var z=o(t=>Boolean(T.includes(t.level)&&t.ns),"isLsklog"),D=o(t=>Boolean(T.includes(t.level)),"isLskLikelog"),c=o(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb"),B=o(t=>Boolean(c(t)&&(t.status||t.duration||t.length)),"isLsklogWebFinal"),E=o(t=>{let{level:r,time:e,msg:n,ns:s,name:l,...a}=t,f={level:r,time:e,msg:n,ns:s,name:l};if(!c(t))return{format:i.lsklogweb,meta:f,args:u(n,a)};let{reqId:nt,method:st,host:it,ua:lt,ip:at,url:ft,status:ut,length:ct,duration:pt,...mt}=a;return{format:i.lsklog,meta:{...f,method:st,host:it,reqId:nt,ua:lt,ip:at,url:ft,status:ut,duration:pt,length:ct},args:u(n,mt)}},"parseLsklog");var U=require("@lskjs/colors"),V=require("@lskjs/env"),J=b(require("pretty-bytes")),Y=b(require("pretty-time"));var F=require("@lskjs/colors");var C=o(t=>typeof t=="number"?t:Math.abs(String(t).split("").reduce((r,e)=>{let n=(r<<5)-r+e.charCodeAt(0);return n&n},0)-48),"hashCode"),G=C;function O(t,r){let e=w[G(r||"")%w.length]||[];return(0,F.colorize)(t,e)}o(O,"themeizeRandom");function g(t,r){let e=r?N[r]:[];return(0,F.colorize)(t,e)}o(g,"themeize");var kt=(0,V.getEnvVar)("LOG_VIEW","short"),h=o((t,r)=>String(t).padStart(r),"leftPad"),wt=o((t,r)=>String(t).padEnd(r),"rightPad"),R=20,St=o((t,r=0)=>(R=Math.max(t&&t.length||0,R,r),wt(t,R)),"prettyPath"),H=o(t=>t>=500?"error":t>=400?"warn":t>=300?"debug":null,"getStatusLevel"),_t=o(t=>{let r=H(t);return r||(r=t!==200?"log":null),g(h(String(t),3),r)},"prettyStatus"),Bt=o(t=>h(`#${t}`,3),"prettyReqId"),Et=o(t=>{let r=t==="REMOVE"?"error":t==="WS"?"debug":null;return g(h(t,4),r)},"prettyMethod"),Ct=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=t>=10*1e3?"error":t>=3*1e3?"warn":null,s=["m","s","ms"].includes(r)?r:"",l=Math.floor(Math.abs(t)*10**6),a=(0,Y.default)(l,s);return g(h(a,5),e)},"prettyTime"),Ft=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=(0,J.default)(t,{maximumFractionDigits:1}).split(" "),n=e[1];return`${+e[0]>=100?Math.round(+e[0]):+e[0]}${r}${n}`},"prettySize"),Q=o((t,r)=>[...t,r].filter(Boolean).map(String).map(n=>O(n,n)).join(":"),"prettyNs");function Ot(t){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],e=r[C(t)%r.length];return O(e,String(t))}o(Ot,"prettyMarker");var W=o(t=>{let r=kt==="short"?(t[0]||"").toLowerCase():h(t,5);return r=`[${r}]`,g(r,t)},"prettyLevel"),Rt=/\[[^"\]]+]/gm,X=o((...t)=>{let r=[];return t.forEach(e=>{if(typeof e=="string"){let n=0;r.push(e.replace(Rt,s=>(0,U.colorize)(s,S[n++%S.length])))}else r.push(e)}),r},"prettyContent"),Wt=o(t=>H(t.status)||B(t)?"debug":"trace","getUrlLevel"),Z=o(t=>{let r=B(t),e=Wt(t);return[W(e),[Ot(t.reqId),Et(t.method)].join(""),St(t.url),Bt(t.reqId),r&&t.method!=="WS"?_t(t.status):null,!r&&"\u29D7\u29D6\u29D7",r&&Ct(t.duration),r&&t.method!=="WS"?Ft(t.length):null].filter(Boolean).join(" ")},"prettyUrl");function Mt(t,r){let e=0;return t.forEach((n,s)=>{s===e&&r(n)&&(e+=1)}),e}o(Mt,"countInRow");function At(...t){let r=Mt(t,e=>typeof e=="string");return[t.slice(0,r).join(" "),...t.slice(r)]}o(At,"concatFirstStrings");function d(t,...r){let e=t?.ns,n=t?.name,s=t?.level||"log",l=r;if(c(t))return[Z(t)];let a=(e||"").split(":").filter(Boolean).map(String),f=[W(s)];return(a.length||n)&&f.push(Q(a,n)),At(...f,...X(...l))}o(d,"prettyFormat");var Pt={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"};var K=o(t=>Boolean(t.name&&t.hostname&&t.pid&&t.msg&&t.time),"isBunyan"),j=o(t=>{let{level:r,time:e,msg:n,hostname:s,pid:l,v:a,...f}=t;return{format:i.bunyan,meta:{level:Pt[r],time:new Date(e)},args:u(n,f)}},"parseBunyan");var Nt=["trace","debug","info","warning","error","fatal","panic"],$t={trace:"trace",debug:"debug",info:"info",warning:"warn",error:"error",fatal:"fatal",panic:"fatal"};var q=o(t=>Boolean(t.msg&&Nt.includes(t.level)),"isLogrus"),tt=o(t=>{let{level:r,time:e,msg:n,...s}=t;return{format:i.logrus,meta:{level:$t[r],time:new Date(e)},args:u(n,s)}},"parseLogrus");function Tt(t){return K(t)?i.bunyan:z(t)?i.lsklog:c(t)?i.lsklogweb:q(t)?i.logrus:D(t)?i.lsklog:null}o(Tt,"detectFormat");function rt(t){let r=Tt(t);return r==="bunyan"?j(t):r==="lsklogweb"?E(t):r==="lsklog"?E(t):r==="logrus"?tt(t):{format:r,meta:{},args:[t]}}o(rt,"parse");var ot=o((t,r)=>{let e,n;if(typeof r=="string"&&(!e&&r.trim()&&(e=(0,et.tryJSONparse)(r,null),e!==null&&(n="json")),!e&&r.trim()&&(e=I(r,null),e!==null&&(n="logfmt"))),e===null&&(e=null,n="raw"),!e){t.log(...d({},r));return}if(typeof e!="object"){t.log(...d({},e));return}let{meta:s,args:l=[]}=rt(e);t.log(...d(s,...l))},"prettyRawLog"),zt=ot;0&&(module.exports={prettyRawLog});
//# sourceMappingURL=prettyRawLog.js.map

@@ -1,2 +0,2 @@

"use strict";var Q=Object.create;var g=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var B=(e,r)=>{for(var t in r)g(e,t,{get:r[t],enumerable:!0})},a=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Z(r))!q.call(e,n)&&n!==t&&g(e,n,{get:()=>r[n],enumerable:!(o=X(r,n))||o.enumerable});return e},p=(e,r,t)=>(a(e,r,"default"),t&&a(t,r,"default")),u=(e,r,t)=>(t=e!=null?Q(j(e)):{},a(r||!e||!e.__esModule?g(t,"default",{value:e,enumerable:!0}):t,e)),ee=e=>a(g({},"__esModule",{value:!0}),e);var le={};B(le,{getStatusLevel:()=>M,getUrlLevel:()=>J,prettyContent:()=>P,prettyLevel:()=>w,prettyMarker:()=>K,prettyMethod:()=>G,prettyNs:()=>C,prettyPath:()=>D,prettyReqId:()=>z,prettySize:()=>V,prettyStatus:()=>$,prettyTime:()=>U,prettyUrl:()=>A});module.exports=ee(le);var F=require("@lskjs/colors"),W=require("@lskjs/env"),N=u(require("pretty-bytes")),O=u(require("pretty-time"));var E={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},m=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],c=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var L=require("@lskjs/colors");var y=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((r,t)=>{let o=(r<<5)-r+t.charCodeAt(0);return o&o},0)-48),R=y;function d(e,r){let t=m[R(r||"")%m.length]||[];return(0,L.colorize)(e,t)}function i(e,r){let t=r?E[r]:[];return(0,L.colorize)(e,t)}var oe=require("@lskjs/algos");var re=require("@lskjs/algos"),h=require("@lskjs/env");var x=require("@lskjs/err");var s={};B(s,{default:()=>S.default,stringify:()=>v.default});p(s,require("fast-safe-stringify"));var v=u(require("fast-safe-stringify")),S=u(require("fast-safe-stringify"));var te=require("@lskjs/env");var f=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url)),k=e=>Boolean(f(e)&&(e.status||e.duration||e.length));var ne=(0,W.getEnvVar)("LOG_VIEW","short"),l=(e,r)=>String(e).padStart(r),se=(e,r)=>String(e).padEnd(r),T=20,D=(e,r=0)=>(T=Math.max(e&&e.length||0,T,r),se(e,T)),M=e=>e>=500?"error":e>=400?"warn":e>=300?"debug":null,$=e=>{let r=M(e);return r||(r=e!==200?"log":null),i(l(String(e),3),r)},z=e=>l(`#${e}`,3),G=e=>{let r=e==="REMOVE"?"error":e==="WS"?"debug":null;return i(l(e,4),r)},U=(e,r="")=>{if(!Number.isFinite(e))return null;let t=e>=10*1e3?"error":e>=3*1e3?"warn":null,n=["m","s","ms"].includes(r)?r:"",Y=Math.floor(Math.abs(e)*10**6),H=(0,O.default)(Y,n);return i(l(H,5),t)},V=(e,r="")=>{if(!Number.isFinite(e))return null;let t=(0,N.default)(e,{maximumFractionDigits:1}).split(" "),o=t[1];return`${+t[0]>=100?Math.round(+t[0]):+t[0]}${r}${o}`},C=(e,r)=>[...e,r].filter(Boolean).map(String).map(o=>d(o,o)).join(":");function K(e){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],t=r[y(e)%r.length];return d(t,String(e))}var w=e=>{let r=ne==="short"?(e[0]||"").toLowerCase():l(e,5);return r=`[${r}]`,i(r,e)},ie=/\[[^"\]]+]/gm,P=(...e)=>{let r=[];return e.forEach(t=>{if(typeof t=="string"){let o=0;r.push(t.replace(ie,n=>(0,F.colorize)(n,c[o++%c.length])))}else r.push(t)}),r},J=e=>M(e.status)||k(e)?"debug":"trace",A=e=>{let r=k(e),t=J(e);return[w(t),[K(e.reqId),G(e.method)].join(""),D(e.url),z(e.reqId),r&&e.method!=="WS"?$(e.status):null,!r&&"\u29D7\u29D6\u29D7",r&&U(e.duration),r&&e.method!=="WS"?V(e.length):null].filter(Boolean).join(" ")};0&&(module.exports={getStatusLevel,getUrlLevel,prettyContent,prettyLevel,prettyMarker,prettyMethod,prettyNs,prettyPath,prettyReqId,prettySize,prettyStatus,prettyTime,prettyUrl});
"use strict";var Z=Object.create;var a=Object.defineProperty;var K=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty;var e=(t,r)=>a(t,"name",{value:r,configurable:!0});var C=(t,r)=>{for(var o in r)a(t,o,{get:r[o],enumerable:!0})},c=(t,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of j(r))!tt.call(t,s)&&s!==o&&a(t,s,{get:()=>r[s],enumerable:!(n=K(r,s))||n.enumerable});return t},p=(t,r,o)=>(c(t,r,"default"),o&&c(o,r,"default")),g=(t,r,o)=>(o=t!=null?Z(q(t)):{},c(r||!t||!t.__esModule?a(o,"default",{value:t,enumerable:!0}):o,t)),rt=t=>c(a({},"__esModule",{value:!0}),t);var at={};C(at,{getStatusLevel:()=>E,getUrlLevel:()=>H,prettyContent:()=>I,prettyLevel:()=>S,prettyMarker:()=>Y,prettyMethod:()=>U,prettyNs:()=>A,prettyPath:()=>z,prettyReqId:()=>G,prettySize:()=>J,prettyStatus:()=>D,prettyTime:()=>V,prettyUrl:()=>N});module.exports=rt(at);var O=require("@lskjs/colors"),P=require("@lskjs/env"),$=g(require("pretty-bytes")),T=g(require("pretty-time"));var F={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},h=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],d=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var y=require("@lskjs/colors");var x=e(t=>typeof t=="number"?t:Math.abs(String(t).split("").reduce((r,o)=>{let n=(r<<5)-r+o.charCodeAt(0);return n&n},0)-48),"hashCode"),W=x;function b(t,r){let o=h[W(r||"")%h.length]||[];return(0,y.colorize)(t,o)}e(b,"themeizeRandom");function f(t,r){let o=r?F[r]:[];return(0,y.colorize)(t,o)}e(f,"themeize");var i;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(i||(i={}));var nt=require("@lskjs/algos");var et=require("@lskjs/algos"),L=require("@lskjs/env");var w=require("@lskjs/err");var l={};C(l,{default:()=>M.default,stringify:()=>v.default});p(l,require("fast-safe-stringify"));var v=g(require("fast-safe-stringify")),M=g(require("fast-safe-stringify"));var ot=require("@lskjs/env");var m=e(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb"),_=e(t=>Boolean(m(t)&&(t.status||t.duration||t.length)),"isLsklogWebFinal");var st=(0,P.getEnvVar)("LOG_VIEW","short"),u=e((t,r)=>String(t).padStart(r),"leftPad"),it=e((t,r)=>String(t).padEnd(r),"rightPad"),B=20,z=e((t,r=0)=>(B=Math.max(t&&t.length||0,B,r),it(t,B)),"prettyPath"),E=e(t=>t>=500?"error":t>=400?"warn":t>=300?"debug":null,"getStatusLevel"),D=e(t=>{let r=E(t);return r||(r=t!==200?"log":null),f(u(String(t),3),r)},"prettyStatus"),G=e(t=>u(`#${t}`,3),"prettyReqId"),U=e(t=>{let r=t==="REMOVE"?"error":t==="WS"?"debug":null;return f(u(t,4),r)},"prettyMethod"),V=e((t,r="")=>{if(!Number.isFinite(t))return null;let o=t>=10*1e3?"error":t>=3*1e3?"warn":null,s=["m","s","ms"].includes(r)?r:"",Q=Math.floor(Math.abs(t)*10**6),X=(0,T.default)(Q,s);return f(u(X,5),o)},"prettyTime"),J=e((t,r="")=>{if(!Number.isFinite(t))return null;let o=(0,$.default)(t,{maximumFractionDigits:1}).split(" "),n=o[1];return`${+o[0]>=100?Math.round(+o[0]):+o[0]}${r}${n}`},"prettySize"),A=e((t,r)=>[...t,r].filter(Boolean).map(String).map(n=>b(n,n)).join(":"),"prettyNs");function Y(t){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],o=r[x(t)%r.length];return b(o,String(t))}e(Y,"prettyMarker");var S=e(t=>{let r=st==="short"?(t[0]||"").toLowerCase():u(t,5);return r=`[${r}]`,f(r,t)},"prettyLevel"),lt=/\[[^"\]]+]/gm,I=e((...t)=>{let r=[];return t.forEach(o=>{if(typeof o=="string"){let n=0;r.push(o.replace(lt,s=>(0,O.colorize)(s,d[n++%d.length])))}else r.push(o)}),r},"prettyContent"),H=e(t=>E(t.status)||_(t)?"debug":"trace","getUrlLevel"),N=e(t=>{let r=_(t),o=H(t);return[S(o),[Y(t.reqId),U(t.method)].join(""),z(t.url),G(t.reqId),r&&t.method!=="WS"?D(t.status):null,!r&&"\u29D7\u29D6\u29D7",r&&V(t.duration),r&&t.method!=="WS"?J(t.length):null].filter(Boolean).join(" ")},"prettyUrl");0&&(module.exports={getStatusLevel,getUrlLevel,prettyContent,prettyLevel,prettyMarker,prettyMethod,prettyNs,prettyPath,prettyReqId,prettySize,prettyStatus,prettyTime,prettyUrl});
//# sourceMappingURL=utils.js.map

@@ -1,2 +0,2 @@

"use strict";var re=Object.create;var L=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty;var P=(e,r)=>{for(var t in r)L(e,t,{get:r[t],enumerable:!0})},y=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of oe(r))!se.call(e,n)&&n!==t&&L(e,n,{get:()=>r[n],enumerable:!(o=te(r,n))||o.enumerable});return e},d=(e,r,t)=>(y(e,r,"default"),t&&y(t,r,"default")),h=(e,r,t)=>(t=e!=null?re(ne(e)):{},y(r||!e||!e.__esModule?L(t,"default",{value:e,enumerable:!0}):t,e)),ie=e=>y(L({},"__esModule",{value:!0}),e);var ke={};P(ke,{Logger:()=>b,default:()=>k});module.exports=ie(ke);var ee=require("@lskjs/algos");var x={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},A={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},I=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],w=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var le=require("@lskjs/algos"),f=require("@lskjs/env");var F=f.isDev||f.isClient?"pretty":"lsk";var g=require("@lskjs/err");var p={};P(p,{default:()=>W.default,stringify:()=>v.default});d(p,require("fast-safe-stringify"));var v=h(require("fast-safe-stringify")),W=h(require("fast-safe-stringify"));var a=(e,r=null,t=0)=>typeof e=="object"?(0,v.default)(e,r,t):String(e);var N=e=>e.map(r=>(0,g.isError)(r)?(0,g.getCode)(r):null).filter(Boolean)[0],O=e=>e.length?e.map(r=>(0,g.isError)(r)?(0,g.getMessage)(r):a(r)).join(" "):null;var ae=require("@lskjs/env");var ge={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60};var $=e=>{let{level:r,time:t,...o}=e;return a({level:ge[r],time:t.toISOString(),...o})};var pe={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"};var z=e=>{let{level:r,time:t,...o}=e;return a({level:pe[r],time:t.toISOString(),...o})};var u=e=>Boolean(e&&(e.name==="req"||e.method&&e.host&&e.url)),M=e=>Boolean(u(e)&&(e.status||e.duration||e.length));var G=e=>{let{level:r,time:t,...o}=e;return a({level:r,time:+t,...o})};function U(e,r,...t){let o=N(t),n=O(t),s={code:o,...r,msg:n};return e==="bunyan"?$(s):e==="logrus"?z(s):G(s)}var K=require("@lskjs/colors"),J=require("@lskjs/env"),Y=h(require("pretty-bytes")),H=h(require("pretty-time"));var E=require("@lskjs/colors");var B=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((r,t)=>{let o=(r<<5)-r+t.charCodeAt(0);return o&o},0)-48),V=B;function R(e,r){let t=I[V(r||"")%I.length]||[];return(0,E.colorize)(e,t)}function m(e,r){let t=r?A[r]:[];return(0,E.colorize)(e,t)}var ue=(0,J.getEnvVar)("LOG_VIEW","short"),c=(e,r)=>String(e).padStart(r),fe=(e,r)=>String(e).padEnd(r),S=20,me=(e,r=0)=>(S=Math.max(e&&e.length||0,S,r),fe(e,S)),Q=e=>e>=500?"error":e>=400?"warn":e>=300?"debug":null,ce=e=>{let r=Q(e);return r||(r=e!==200?"log":null),m(c(String(e),3),r)},ye=e=>c(`#${e}`,3),Le=e=>{let r=e==="REMOVE"?"error":e==="WS"?"debug":null;return m(c(e,4),r)},de=(e,r="")=>{if(!Number.isFinite(e))return null;let t=e>=10*1e3?"error":e>=3*1e3?"warn":null,n=["m","s","ms"].includes(r)?r:"",s=Math.floor(Math.abs(e)*10**6),i=(0,H.default)(s,n);return m(c(i,5),t)},he=(e,r="")=>{if(!Number.isFinite(e))return null;let t=(0,Y.default)(e,{maximumFractionDigits:1}).split(" "),o=t[1];return`${+t[0]>=100?Math.round(+t[0]):+t[0]}${r}${o}`},X=(e,r)=>[...e,r].filter(Boolean).map(String).map(o=>R(o,o)).join(":");function ve(e){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],t=r[B(e)%r.length];return R(t,String(e))}var _=e=>{let r=ue==="short"?(e[0]||"").toLowerCase():c(e,5);return r=`[${r}]`,m(r,e)},be=/\[[^"\]]+]/gm,Z=(...e)=>{let r=[];return e.forEach(t=>{if(typeof t=="string"){let o=0;r.push(t.replace(be,n=>(0,K.colorize)(n,w[o++%w.length])))}else r.push(t)}),r},xe=e=>Q(e.status)||M(e)?"debug":"trace",j=e=>{let r=M(e),t=xe(e);return[_(t),[ve(e.reqId),Le(e.method)].join(""),me(e.url),ye(e.reqId),r&&e.method!=="WS"?ce(e.status):null,!r&&"\u29D7\u29D6\u29D7",r&&de(e.duration),r&&e.method!=="WS"?he(e.length):null].filter(Boolean).join(" ")};function Ie(e,r){let t=0;return e.forEach((o,n)=>{n===t&&r(o)&&(t+=1)}),t}function we(...e){let r=Ie(e,t=>typeof t=="string");return[e.slice(0,r).join(" "),...e.slice(r)]}function q(e,...r){let t=e?.ns,o=e?.name,n=e?.level||"log",s=r;if(u(e))return[j(e)];let i=(t||"").split(":").filter(Boolean).map(String),l=[_(n)];return(i.length||o)&&l.push(X(i,o)),we(...l,...Z(...s))}function C(e,r){Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++)if(e[t].test(r))return!0;return!1}var b=class{prefix;ns;name;format=F;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:t,name:o,level:n,format:s,on:i=[],off:l=[]}){if(r&&(this.prefix=r),t&&(this.ns=t),i&&(this.on=i),l&&(this.off=l),o&&(this.name=o),s&&(this.format=s),n){if(!x[n])throw new Error(`Incorrect level: ${this.level}`);this.level=n}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let t=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:t},...r)}getLevelPriority(r){return x[r]||0}canLog(r){let t=this.getLevelPriority(r),o=this.getLevelPriority(this.level);return this.ns&&C(this.off,this.ns)?!1:this.ns&&C(this.on,this.ns)?!0:t>=o}fatal(...r){!this.canLog("fatal")||this.__log("fatal",...r)}error(...r){!this.canLog("error")||this.__log("error",...r)}warn(...r){!this.canLog("warn")||this.__log("warn",...r)}debug(...r){!this.canLog("debug")||this.__log("debug",...r)}info(...r){!this.canLog("info")||this.__log("info",...r)}trace(...r){!this.canLog("trace")||this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...t){let[o,...n]=t,s={name:this.name,ns:this.ns,level:r,time:new Date},i=t;if(u(o)&&(s={...s,...o},i=n),this.format==="none")return;let l=(0,ee.omitNull)(s);if(this.format==="pretty"){this.log(...q(l,...i));return}this.log(U(this.format||"lsk",l,...i))}},k=b;0&&(module.exports={Logger});
"use strict";var et=Object.create;var m=Object.defineProperty;var ot=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var st=Object.getPrototypeOf,it=Object.prototype.hasOwnProperty;var o=(t,r)=>m(t,"name",{value:r,configurable:!0});var I=(t,r)=>{for(var e in r)m(t,e,{get:r[e],enumerable:!0})},b=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of nt(r))!it.call(t,s)&&s!==e&&m(t,s,{get:()=>r[s],enumerable:!(n=ot(r,s))||n.enumerable});return t},L=(t,r,e)=>(b(t,r,"default"),e&&b(e,r,"default")),v=(t,r,e)=>(e=t!=null?et(st(t)):{},b(r||!t||!t.__esModule?m(e,"default",{value:t,enumerable:!0}):e,t)),lt=t=>b(m({},"__esModule",{value:!0}),t);var _t={};I(_t,{Logger:()=>y,default:()=>B});module.exports=lt(_t);var rt=require("@lskjs/algos");var w={start:99,log:99,fatal:60,error:50,warn:40,success:35,info:30,debug:20,trace:10},N={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},S=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]],_=[["bold","white"],["bold","cyan"],["bold","green"],["white"]];var at=require("@lskjs/algos"),h=require("@lskjs/env");var O=h.isDev||h.isClient?"pretty":"lsk";var c;(function(t){t.bunyan="bunyan",t.lsklog="lsklog",t.lsklogweb="lsklogweb",t.logrus="logrus",t.raw="raw"})(c||(c={}));var u=require("@lskjs/err");var p={};I(p,{default:()=>P.default,stringify:()=>k.default});L(p,require("fast-safe-stringify"));var k=v(require("fast-safe-stringify")),P=v(require("fast-safe-stringify"));var f=o((t,r=null,e=0)=>typeof t=="object"?(0,k.default)(t,r,e):String(t),"toString");var $=o(t=>t.map(r=>(0,u.isError)(r)?(0,u.getCode)(r):null).filter(Boolean)[0],"getErrCode"),T=o(t=>t.length?t.map(r=>(0,u.isError)(r)?(0,u.getMessage)(r):f(r)).join(" "):null,"createMsg");var ft=require("@lskjs/env");var ut={log:10,trace:10,debug:20,info:30,warn:40,error:50,fatal:60};var D=o(t=>{let{level:r,time:e,...n}=t;return f({level:ut[r],time:e.toISOString(),...n})},"stringifyBunyan");var ct={log:"trace",trace:"trace",debug:"debug",info:"info",warn:"warning",error:"error",fatal:"fatal"};var G=o(t=>{let{level:r,time:e,...n}=t;return f({level:ct[r],time:e.toISOString(),...n})},"stringifyLogrus");var g=o(t=>Boolean(t&&(t.name==="req"||t.method&&t.host&&t.url)),"isLsklogWeb"),E=o(t=>Boolean(g(t)&&(t.status||t.duration||t.length)),"isLsklogWebFinal");var U=o(t=>{let{level:r,time:e,...n}=t;return f({level:r,time:+e,...n})},"stringifyLsklog");function V(t,r,...e){let n=$(e),s=T(e),i={code:n,...r,msg:s};return t==="bunyan"?D(i):t==="logrus"?G(i):U(i)}o(V,"stringify");var Y=require("@lskjs/colors"),H=require("@lskjs/env"),Q=v(require("pretty-bytes")),X=v(require("pretty-time"));var F=require("@lskjs/colors");var C=o(t=>typeof t=="number"?t:Math.abs(String(t).split("").reduce((r,e)=>{let n=(r<<5)-r+e.charCodeAt(0);return n&n},0)-48),"hashCode"),J=C;function W(t,r){let e=S[J(r||"")%S.length]||[];return(0,F.colorize)(t,e)}o(W,"themeizeRandom");function d(t,r){let e=r?N[r]:[];return(0,F.colorize)(t,e)}o(d,"themeize");var pt=(0,H.getEnvVar)("LOG_VIEW","short"),x=o((t,r)=>String(t).padStart(r),"leftPad"),gt=o((t,r)=>String(t).padEnd(r),"rightPad"),M=20,mt=o((t,r=0)=>(M=Math.max(t&&t.length||0,M,r),gt(t,M)),"prettyPath"),Z=o(t=>t>=500?"error":t>=400?"warn":t>=300?"debug":null,"getStatusLevel"),ht=o(t=>{let r=Z(t);return r||(r=t!==200?"log":null),d(x(String(t),3),r)},"prettyStatus"),dt=o(t=>x(`#${t}`,3),"prettyReqId"),xt=o(t=>{let r=t==="REMOVE"?"error":t==="WS"?"debug":null;return d(x(t,4),r)},"prettyMethod"),yt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=t>=10*1e3?"error":t>=3*1e3?"warn":null,s=["m","s","ms"].includes(r)?r:"",i=Math.floor(Math.abs(t)*10**6),l=(0,X.default)(i,s);return d(x(l,5),e)},"prettyTime"),bt=o((t,r="")=>{if(!Number.isFinite(t))return null;let e=(0,Q.default)(t,{maximumFractionDigits:1}).split(" "),n=e[1];return`${+e[0]>=100?Math.round(+e[0]):+e[0]}${r}${n}`},"prettySize"),K=o((t,r)=>[...t,r].filter(Boolean).map(String).map(n=>W(n,n)).join(":"),"prettyNs");function Lt(t){let r=["\u25CB","\u2022","\u2660","\u2660","\u2666","\u2665","\u263C","\u2642","\u2640","\u266A","\xA7"],e=r[C(t)%r.length];return W(e,String(t))}o(Lt,"prettyMarker");var R=o(t=>{let r=pt==="short"?(t[0]||"").toLowerCase():x(t,5);return r=`[${r}]`,d(r,t)},"prettyLevel"),vt=/\[[^"\]]+]/gm,j=o((...t)=>{let r=[];return t.forEach(e=>{if(typeof e=="string"){let n=0;r.push(e.replace(vt,s=>(0,Y.colorize)(s,_[n++%_.length])))}else r.push(e)}),r},"prettyContent"),kt=o(t=>Z(t.status)||E(t)?"debug":"trace","getUrlLevel"),q=o(t=>{let r=E(t),e=kt(t);return[R(e),[Lt(t.reqId),xt(t.method)].join(""),mt(t.url),dt(t.reqId),r&&t.method!=="WS"?ht(t.status):null,!r&&"\u29D7\u29D6\u29D7",r&&yt(t.duration),r&&t.method!=="WS"?bt(t.length):null].filter(Boolean).join(" ")},"prettyUrl");function wt(t,r){let e=0;return t.forEach((n,s)=>{s===e&&r(n)&&(e+=1)}),e}o(wt,"countInRow");function St(...t){let r=wt(t,e=>typeof e=="string");return[t.slice(0,r).join(" "),...t.slice(r)]}o(St,"concatFirstStrings");function tt(t,...r){let e=t?.ns,n=t?.name,s=t?.level||"log",i=r;if(g(t))return[q(t)];let l=(e||"").split(":").filter(Boolean).map(String),a=[R(s)];return(l.length||n)&&a.push(K(l,n)),St(...a,...j(...i))}o(tt,"prettyFormat");function A(t,r){Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++)if(t[e].test(r))return!0;return!1}o(A,"anyRegExps");var y=class{format=O;level="trace";on=[];off=[];constructor(r={}){this.setProps(r)}setProps({prefix:r,ns:e,name:n,level:s,format:i,on:l=[],off:a=[]}){if(r&&(this.prefix=r),e&&(this.ns=e),l&&(this.on=l),a&&(this.off=a),n&&(this.name=n),i&&(this.format=i),s){if(!w[s])throw new Error(`Incorrect level: ${this.level}`);this.level=s}this.level||(this.level="trace"),this.level||(this.level="trace"),this.format||(this.format="lsk"),this.off||(this.off=[]),this.on||(this.on=[])}static create(r){return new this(r)}createChild(...r){let e=[this.ns,this.name].filter(Boolean).join(".");return new this.constructor(this,{colors:null,ns:e},...r)}getLevelPriority(r){return w[r]||0}canLog(r){let e=this.getLevelPriority(r),n=this.getLevelPriority(this.level);return this.ns&&A(this.off,this.ns)?!1:this.ns&&A(this.on,this.ns)?!0:e>=n}fatal(...r){this.canLog("fatal")&&this.__log("fatal",...r)}error(...r){this.canLog("error")&&this.__log("error",...r)}warn(...r){this.canLog("warn")&&this.__log("warn",...r)}debug(...r){this.canLog("debug")&&this.__log("debug",...r)}info(...r){this.canLog("info")&&this.__log("info",...r)}trace(...r){this.canLog("trace")&&this.__log("trace",...r)}log(...r){console._log?console._log(...r):console.log(...r)}__log(r,...e){let[n,...s]=e,i={name:this.name,ns:this.ns,level:r,time:new Date},l=e;if(g(n)&&(i={...i,...n},l=s),this.format==="none")return;let a=(0,rt.omitNull)(i);if(this.format==="pretty"){this.log(...tt(a,...l));return}this.log(V(this.format||"lsk",a,...l))}};o(y,"Logger");var B=y;0&&(module.exports={Logger});
//# sourceMappingURL=server.js.map

@@ -1,2 +0,2 @@

"use strict";var l=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(e,o)=>{for(var r in o)l(e,r,{get:o[r],enumerable:!0})},u=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of b(o))!c.call(e,n)&&n!==r&&l(e,n,{get:()=>o[n],enumerable:!(t=s(o,n))||t.enumerable});return e};var h=e=>u(l({},"__esModule",{value:!0}),e);var C={};g(C,{themeize:()=>y,themeizeRandom:()=>f});module.exports=h(C);var i=require("@lskjs/colors");var a={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},m=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]];var p=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((o,r)=>{let t=(o<<5)-o+r.charCodeAt(0);return t&t},0)-48),d=p;function f(e,o){let r=m[d(o||"")%m.length]||[];return(0,i.colorize)(e,r)}function y(e,o){let r=o?a[o]:[];return(0,i.colorize)(e,r)}0&&(module.exports={themeize,themeizeRandom});
"use strict";var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var l=(e,o)=>a(e,"name",{value:o,configurable:!0});var u=(e,o)=>{for(var r in o)a(e,r,{get:o[r],enumerable:!0})},h=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of g(o))!m.call(e,n)&&n!==r&&a(e,n,{get:()=>o[n],enumerable:!(t=i(o,n))||t.enumerable});return e};var p=e=>h(a({},"__esModule",{value:!0}),e);var w={};u(w,{themeize:()=>y,themeizeRandom:()=>x});module.exports=p(w);var c=require("@lskjs/colors");var b={fatal:["bgRed"],error:["bold","bgRed"],warn:["bgYellow"],debug:["bold","cyan"],info:["bold","green"],trace:["gray"],log:["bgWhite"]},d=[["red"],["green"],["yellow"],["blue"],["magenta"],["cyan"],["bold","red"],["bold","green"],["bold","yellow"],["bold","blue"],["bold","magenta"],["bold","cyan"]];var f=l(e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((o,r)=>{let t=(o<<5)-o+r.charCodeAt(0);return t&t},0)-48),"hashCode"),s=f;function x(e,o){let r=d[s(o||"")%d.length]||[];return(0,c.colorize)(e,r)}l(x,"themeizeRandom");function y(e,o){let r=o?b[o]:[];return(0,c.colorize)(e,r)}l(y,"themeize");0&&(module.exports={themeize,themeizeRandom});
//# sourceMappingURL=themeize.js.map

@@ -1,2 +0,2 @@

"use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var y=(r,e)=>{for(var t in e)o(r,t,{get:e[t],enumerable:!0})},u=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l(e))!p.call(r,n)&&n!==t&&o(r,n,{get:()=>e[n],enumerable:!(a=i(e,n))||a.enumerable});return r};var m=r=>u(o({},"__esModule",{value:!0}),r);var d={};y(d,{ILoggerInternalMessageFormat:()=>s});module.exports=m(d);var s=(g=>(g.bunyan="bunyan",g.lsklog="lsklog",g.lsklogweb="lsklogweb",g.logrus="logrus",g.raw="raw",g))(s||{});0&&(module.exports={ILoggerInternalMessageFormat});
"use strict";var w=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var p=(l,u)=>{for(var k in u)w(l,k,{get:u[k],enumerable:!0})},v=(l,u,k,y)=>{if(u&&typeof u=="object"||typeof u=="function")for(let b of f(u))!i.call(l,b)&&b!==k&&w(l,b,{get:()=>u[b],enumerable:!(y=c(u,b))||y.enumerable});return l};var x=l=>v(w({},"__esModule",{value:!0}),l);var d={};p(d,{ILoggerInternalMessageFormat:()=>o});module.exports=x(d);var o;(function(l){l.bunyan="bunyan",l.lsklog="lsklog",l.lsklogweb="lsklogweb",l.logrus="logrus",l.raw="raw"})(o||(o={}));0&&(module.exports={ILoggerInternalMessageFormat});
//# sourceMappingURL=types.js.map

@@ -1,2 +0,2 @@

"use strict";var f=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var y=(t,e)=>{for(var r in e)f(t,r,{get:e[r],enumerable:!0})},R=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l(e))!o.call(t,n)&&n!==r&&f(t,n,{get:()=>e[n],enumerable:!(i=u(e,n))||i.enumerable});return t};var A=t=>R(f({},"__esModule",{value:!0}),t);var d={};y(d,{anyRegExps:()=>a,default:()=>c});module.exports=A(d);function a(t,e){Array.isArray(t)||(t=[t]);for(let r=0;r<t.length;r++)if(t[r].test(e))return!0;return!1}var c=a;0&&(module.exports={anyRegExps});
"use strict";var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var i=(t,r)=>n(t,"name",{value:r,configurable:!0});var A=(t,r)=>{for(var e in r)n(t,e,{get:r[e],enumerable:!0})},c=(t,r,e,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let f of o(r))!y.call(t,f)&&f!==e&&n(t,f,{get:()=>r[f],enumerable:!(a=l(r,f))||a.enumerable});return t};var d=t=>c(n({},"__esModule",{value:!0}),t);var R={};A(R,{anyRegExps:()=>u,default:()=>h});module.exports=d(R);function u(t,r){Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++)if(t[e].test(r))return!0;return!1}i(u,"anyRegExps");var h=u;0&&(module.exports={anyRegExps});
//# sourceMappingURL=anyRegExps.js.map

@@ -1,2 +0,2 @@

"use strict";var d=Object.create;var l=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var p=(t,r)=>{for(var e in r)l(t,e,{get:r[e],enumerable:!0})},i=(t,r,e,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let f of S(r))!C.call(t,f)&&f!==e&&l(t,f,{get:()=>r[f],enumerable:!(a=c(r,f))||a.enumerable});return t},m=(t,r,e)=>(i(t,r,"default"),e&&i(e,r,"default")),x=(t,r,e)=>(e=t!=null?d(j(t)):{},i(r||!t||!t.__esModule?l(e,"default",{value:t,enumerable:!0}):e,t)),E=t=>i(l({},"__esModule",{value:!0}),t);var h={};p(h,{createMsg:()=>y,default:()=>b,getErrCode:()=>M});module.exports=E(h);var o=require("@lskjs/err");var n={};p(n,{default:()=>g.default,stringify:()=>u.default});m(n,require("fast-safe-stringify"));var u=x(require("fast-safe-stringify")),g=x(require("fast-safe-stringify"));var s=(t,r=null,e=0)=>typeof t=="object"?(0,u.default)(t,r,e):String(t);var M=t=>t.map(r=>(0,o.isError)(r)?(0,o.getCode)(r):null).filter(Boolean)[0],y=t=>t.length?t.map(r=>(0,o.isError)(r)?(0,o.getMessage)(r):s(r)).join(" "):null,b=y;0&&(module.exports={createMsg,getErrCode});
"use strict";var y=Object.create;var i=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var l=(t,r)=>i(t,"name",{value:r,configurable:!0});var g=(t,r)=>{for(var e in r)i(t,e,{get:r[e],enumerable:!0})},m=(t,r,e,x)=>{if(r&&typeof r=="object"||typeof r=="function")for(let f of j(r))!E.call(t,f)&&f!==e&&i(t,f,{get:()=>r[f],enumerable:!(x=S(r,f))||x.enumerable});return t},u=(t,r,e)=>(m(t,r,"default"),e&&m(e,r,"default")),s=(t,r,e)=>(e=t!=null?y(C(t)):{},m(r||!t||!t.__esModule?i(e,"default",{value:t,enumerable:!0}):e,t)),M=t=>m(i({},"__esModule",{value:!0}),t);var B={};g(B,{createMsg:()=>c,default:()=>h,getErrCode:()=>b});module.exports=M(B);var o=require("@lskjs/err");var n={};g(n,{default:()=>a.default,stringify:()=>p.default});u(n,require("fast-safe-stringify"));var p=s(require("fast-safe-stringify")),a=s(require("fast-safe-stringify"));var d=l((t,r=null,e=0)=>typeof t=="object"?(0,p.default)(t,r,e):String(t),"toString");var b=l(t=>t.map(r=>(0,o.isError)(r)?(0,o.getCode)(r):null).filter(Boolean)[0],"getErrCode"),c=l(t=>t.length?t.map(r=>(0,o.isError)(r)?(0,o.getMessage)(r):d(r)).join(" "):null,"createMsg"),h=c;0&&(module.exports={createMsg,getErrCode});
//# sourceMappingURL=createMsg.js.map

@@ -1,2 +0,2 @@

"use strict";var o=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var h=(e,r)=>{for(var t in r)o(e,t,{get:r[t],enumerable:!0})},i=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of b(r))!d.call(e,u)&&u!==t&&o(e,u,{get:()=>r[u],enumerable:!(n=a(r,u))||n.enumerable});return e};var p=e=>i(o({},"__esModule",{value:!0}),e);var f={};h(f,{default:()=>s,hashCode:()=>c});module.exports=p(f);var c=e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((r,t)=>{let n=(r<<5)-r+t.charCodeAt(0);return n&n},0)-48),s=c;0&&(module.exports={hashCode});
"use strict";var u=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var c=(e,t)=>u(e,"name",{value:t,configurable:!0});var f=(e,t)=>{for(var r in t)u(e,r,{get:t[r],enumerable:!0})},i=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of h(t))!p.call(e,o)&&o!==r&&u(e,o,{get:()=>t[o],enumerable:!(n=d(t,o))||n.enumerable});return e};var s=e=>i(u({},"__esModule",{value:!0}),e);var l={};f(l,{default:()=>b,hashCode:()=>a});module.exports=s(l);var a=c(e=>typeof e=="number"?e:Math.abs(String(e).split("").reduce((t,r)=>{let n=(t<<5)-t+r.charCodeAt(0);return n&n},0)-48),"hashCode"),b=a;0&&(module.exports={hashCode});
//# sourceMappingURL=hashCode.js.map

@@ -1,2 +0,2 @@

"use strict";var p=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var u=(t,e)=>{for(var o in e)p(t,o,{get:e[o],enumerable:!0})},g=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l(e))!r.call(t,n)&&n!==o&&p(t,n,{get:()=>e[n],enumerable:!(s=f(e,n))||s.enumerable});return t};var x=t=>g(p({},"__esModule",{value:!0}),t);var h={};u(h,{default:()=>$,parseNs:()=>c});module.exports=x(h);function c(t=""){let e=[],o=[],s,n=(typeof t=="string"?t:"").split(/[\s,]+/);for(s=0;s<n.length;s++){if(!n[s])continue;let i=n[s].replace(/\*/g,".*?");i[0]==="-"?o.push(new RegExp(`^${i.slice(1)}$`)):e.push(new RegExp(`^${i}$`))}return{on:e,off:o}}var $=c;0&&(module.exports={parseNs});
"use strict";var i=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(t,e)=>i(t,"name",{value:e,configurable:!0});var g=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},x=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of r(e))!u.call(t,n)&&n!==o&&i(t,n,{get:()=>e[n],enumerable:!(s=l(e,n))||s.enumerable});return t};var $=t=>x(i({},"__esModule",{value:!0}),t);var a={};g(a,{default:()=>h,parseNs:()=>f});module.exports=$(a);function f(t=""){let e=[],o=[],s,n=(typeof t=="string"?t:"").split(/[\s,]+/);for(s=0;s<n.length;s++){if(!n[s])continue;let p=n[s].replace(/\*/g,".*?");p[0]==="-"?o.push(new RegExp(`^${p.slice(1)}$`)):e.push(new RegExp(`^${p}$`))}return{on:e,off:o}}c(f,"parseNs");var h=f;0&&(module.exports={parseNs});
//# sourceMappingURL=parseNs.js.map

@@ -1,2 +0,2 @@

"use strict";var f=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var L=(e,o)=>{for(var t in o)f(e,t,{get:o[t],enumerable:!0})},$=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of E(o))!d.call(e,r)&&r!==t&&f(e,r,{get:()=>o[r],enumerable:!(n=g(o,r))||n.enumerable});return e};var h=e=>$(f({},"__esModule",{value:!0}),e);var G={};L(G,{default:()=>y,safeLog:()=>m});module.exports=h(G);var c=require("@lskjs/algos"),s=require("@lskjs/env");function l(e=""){let o=[],t=[],n,r=(typeof e=="string"?e:"").split(/[\s,]+/);for(n=0;n<r.length;n++){if(!r[n])continue;let i=r[n].replace(/\*/g,".*?");i[0]==="-"?t.push(new RegExp(`^${i.slice(1)}$`)):o.push(new RegExp(`^${i}$`))}return{on:o,off:t}}var v=s.isDev||s.isClient?"pretty":"lsk",p=()=>{let e=(0,s.getEnvVar)("DEBUG","")||"",o=typeof process&&process.argv?.includes("--silent"),t=e.startsWith("lsk")||e.startsWith("*"),n=(0,s.getEnvVar)("LOG_FORMAT",(0,s.getEnvVar)("DEBUG_FORMAT",v)),{on:r,off:i}=l(e),u=(0,s.getEnvVar)("LOG_LEVEL",(0,s.getEnvVar)("DEBUG_LEVEL",o?"error":t?"trace":"debug"));return(0,c.omitNull)({format:n,level:u,on:r,off:i})};var{format:a}=p(),m=(e,o="error",...t)=>{if(e.log&&e.log[o])e.log[o](...t);else{if(a==="none")return;a==="lsk"?console.error({level:o,name:e.name||e.constructor.name},...t):console.error(`[${o[0]}] <${e.name||e.constructor.name}>`,...t)}},y=m;0&&(module.exports={safeLog});
"use strict";var l=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var i=(e,o)=>l(e,"name",{value:o,configurable:!0});var $=(e,o)=>{for(var t in o)l(e,t,{get:o[t],enumerable:!0})},h=(e,o,t,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of d(o))!L.call(e,r)&&r!==t&&l(e,r,{get:()=>o[r],enumerable:!(s=E(o,r))||s.enumerable});return e};var v=e=>h(l({},"__esModule",{value:!0}),e);var O={};$(O,{default:()=>D,safeLog:()=>u});module.exports=v(O);var p=require("@lskjs/algos"),n=require("@lskjs/env");function c(e=""){let o=[],t=[],s,r=(typeof e=="string"?e:"").split(/[\s,]+/);for(s=0;s<r.length;s++){if(!r[s])continue;let f=r[s].replace(/\*/g,".*?");f[0]==="-"?t.push(new RegExp(`^${f.slice(1)}$`)):o.push(new RegExp(`^${f}$`))}return{on:o,off:t}}i(c,"parseNs");var G=n.isDev||n.isClient?"pretty":"lsk",a=i(()=>{let e=(0,n.getEnvVar)("DEBUG","")||"",o=process.argv?.includes("--silent"),t=e.startsWith("lsk")||e.startsWith("*"),s=(0,n.getEnvVar)("LOG_FORMAT",(0,n.getEnvVar)("DEBUG_FORMAT",G)),{on:r,off:f}=c(e),g=(0,n.getEnvVar)("LOG_LEVEL",(0,n.getEnvVar)("DEBUG_LEVEL",o?"error":t?"trace":"debug"));return(0,p.omitNull)({format:s,level:g,on:r,off:f})},"getEnvConfig");var{format:m}=a(),u=i((e,o="error",...t)=>{if(e.log&&e.log[o])e.log[o](...t);else{if(m==="none")return;m==="lsk"?console.error({level:o,name:e.name||e.constructor.name},...t):console.error(`[${o[0]}] <${e.name||e.constructor.name}>`,...t)}},"safeLog"),D=u;0&&(module.exports={safeLog});
//# sourceMappingURL=safeLog.js.map

@@ -1,2 +0,2 @@

"use strict";var d=Object.create;var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var s=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var x=(t,o)=>{for(var r in o)i(t,r,{get:o[r],enumerable:!0})},n=(t,o,r,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let f of c(o))!S.call(t,f)&&f!==r&&i(t,f,{get:()=>o[f],enumerable:!(m=p(o,f))||m.enumerable});return t},a=(t,o,r)=>(n(t,o,"default"),r&&n(r,o,"default")),y=(t,o,r)=>(r=t!=null?d(s(t)):{},n(o||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),b=t=>n(i({},"__esModule",{value:!0}),t);var h={};x(h,{default:()=>j,toString:()=>u});module.exports=b(h);var e={};x(e,{default:()=>g.default,stringify:()=>l.default});a(e,require("fast-safe-stringify"));var l=y(require("fast-safe-stringify")),g=y(require("fast-safe-stringify"));var u=(t,o=null,r=0)=>typeof t=="object"?(0,l.default)(t,o,r):String(t),j=u;0&&(module.exports={toString});
"use strict";var y=Object.create;var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var a=(t,o)=>i(t,"name",{value:o,configurable:!0});var g=(t,o)=>{for(var r in o)i(t,r,{get:o[r],enumerable:!0})},n=(t,o,r,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let f of s(o))!b.call(t,f)&&f!==r&&i(t,f,{get:()=>o[f],enumerable:!(x=c(o,f))||x.enumerable});return t},l=(t,o,r)=>(n(t,o,"default"),r&&n(r,o,"default")),u=(t,o,r)=>(r=t!=null?y(S(t)):{},n(o||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),j=t=>n(i({},"__esModule",{value:!0}),t);var k={};g(k,{default:()=>h,toString:()=>p});module.exports=j(k);var e={};g(e,{default:()=>d.default,stringify:()=>m.default});l(e,require("fast-safe-stringify"));var m=u(require("fast-safe-stringify")),d=u(require("fast-safe-stringify"));var p=a((t,o=null,r=0)=>typeof t=="object"?(0,m.default)(t,o,r):String(t),"toString"),h=p;0&&(module.exports={toString});
//# sourceMappingURL=toString.js.map

@@ -1,2 +0,2 @@

"use strict";var c=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var u=(r,t)=>{for(var e in t)c(r,e,{get:t[e],enumerable:!0})},m=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of f(t))!g.call(r,n)&&n!==e&&c(r,n,{get:()=>t[n],enumerable:!(o=y(t,n))||o.enumerable});return r};var p=r=>m(c({},"__esModule",{value:!0}),r);var j={};u(j,{default:()=>h,tryLogfmtParse:()=>s});module.exports=p(j);var i=require("@lskjs/algos"),b=require("logfmt"),s=(r,t=r)=>{try{if(typeof r!="string")return r;if(!r.trim())return t;let e=b.parse(r);return Object.keys(e).includes("")||Object.keys(e).length<2||(0,i.count)(e,o=>o===!0)>=Object.keys(e).length/2?t:e}catch{return t}},h=s;0&&(module.exports={tryLogfmtParse});
"use strict";var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var i=(r,e)=>c(r,"name",{value:e,configurable:!0});var m=(r,e)=>{for(var t in e)c(r,t,{get:e[t],enumerable:!0})},p=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of y(e))!g.call(r,n)&&n!==t&&c(r,n,{get:()=>e[n],enumerable:!(o=u(e,n))||o.enumerable});return r};var b=r=>p(c({},"__esModule",{value:!0}),r);var k={};m(k,{default:()=>j,tryLogfmtParse:()=>f});module.exports=b(k);var s=require("@lskjs/algos");var h=require("logfmt"),f=i((r,e=r)=>{try{if(typeof r!="string")return r;if(!r.trim())return e;let t=h.parse(r);return Object.keys(t).includes("")||Object.keys(t).length<2||(0,s.count)(t,o=>o===!0)>=Object.keys(t).length/2?e:t}catch{return e}},"tryLogfmtParse"),j=f;0&&(module.exports={tryLogfmtParse});
//# sourceMappingURL=tryLogfmtParse.js.map
{
"name": "@lskjs/log",
"version": "3.0.0-alpha.36",
"version": "3.1.0-alpha.0",
"description": "Yet another logger whitch combines the best features of debug, bunyan, logfmt/logrus, morgan/winston",

@@ -10,6 +10,6 @@ "author": "Igor Suvorov <hi@isuvorov.com> (https://github.com/isuvorov)",

"dependencies": {
"@lskjs/algos": "^3.0.0-alpha.36",
"@lskjs/algos": "^3.1.0-alpha.0",
"@lskjs/colors": "^3.0.0-alpha.30",
"@lskjs/env": "^3.0.0-alpha.30",
"@lskjs/err": "^3.0.0-alpha.36",
"@lskjs/err": "^3.1.0-alpha.0",
"fast-safe-stringify": "2.1.1",

@@ -64,3 +64,3 @@ "pretty-bytes": "5.6.0",

],
"gitHead": "519056cccf5e2729c8a87d49e99eaca817d9da26"
"gitHead": "223ba1b4c6cb5b0bfa15ffdd440c4eb6fe8cb947"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc