New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@techor/log

Package Overview
Dependencies
Maintainers
1
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@techor/log - npm Package Compare versions

Comparing version 2.5.24 to 2.6.0

12

dist/index.js

@@ -1,11 +0,11 @@

var $e=Object.create;var S=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var Ne=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,xe=Object.prototype.hasOwnProperty;var ve=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Ae=(o,e)=>{for(var r in e)S(o,r,{get:e[r],enumerable:!0})},ee=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ne(e))!xe.call(o,i)&&i!==r&&S(o,i,{get:()=>e[i],enumerable:!(t=Te(e,i))||t.enumerable});return o};var E=(o,e,r)=>(r=o!=null?$e(ke(o)):{},ee(e||!o||!o.__esModule?S(r,"default",{value:o,enumerable:!0}):r,o)),Ce=o=>ee(S({},"__esModule",{value:!0}),o);var he=ve((Zr,Q)=>{"use strict";function Ye(o){var e=void 0;typeof o=="string"?e=[o]:e=o.raw;for(var r="",t=0;t<e.length;t++)r+=e[t].replace(/\\\n[ \t]*/g,"").replace(/\\`/g,"`"),t<(arguments.length<=1?0:arguments.length-1)&&(r+=arguments.length<=t+1?void 0:arguments[t+1]);var i=r.split(`
var he=Object.create;var S=Object.defineProperty;var be=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var $e=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Ne=(o,e)=>{for(var r in e)S(o,r,{get:e[r],enumerable:!0})},Q=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ye(e))!Te.call(o,i)&&i!==r&&S(o,i,{get:()=>e[i],enumerable:!(t=be(e,i))||t.enumerable});return o};var E=(o,e,r)=>(r=o!=null?he(Oe(o)):{},Q(e||!o||!o.__esModule?S(r,"default",{value:o,enumerable:!0}):r,o)),ke=o=>Q(S({},"__esModule",{value:!0}),o);var fe=$e((Hr,Z)=>{"use strict";function Pe(o){var e=void 0;typeof o=="string"?e=[o]:e=o.raw;for(var r="",t=0;t<e.length;t++)r+=e[t].replace(/\\\n[ \t]*/g,"").replace(/\\`/g,"`"),t<(arguments.length<=1?0:arguments.length-1)&&(r+=arguments.length<=t+1?void 0:arguments[t+1]);var i=r.split(`
`),s=null;return i.forEach(function(l){var u=l.match(/^(\s+)\S+/);if(u){var y=u[1].length;s?s=Math.min(s,y):s=y}}),s!==null&&(r=i.map(function(l){return l[0]===" "?l.slice(s):l}).join(`
`)),r=r.trim(),r.replace(/\\n/g,`
`)}typeof Q<"u"&&(Q.exports=Ye)});var De={};Ae(De,{a:()=>x,add:()=>x,chalk:()=>n,conflict:()=>M,d:()=>T,default:()=>We,del:()=>T,e:()=>v,error:()=>v,fail:()=>W,i:()=>R,info:()=>R,invalid:()=>C,o:()=>A,ok:()=>I,paint:()=>f,pass:()=>G,success:()=>_,tree:()=>Y,valid:()=>A,warn:()=>P,x:()=>C});module.exports=Ce(De);var d=(o,e)=>{if(!o)throw new Error(e)};var Re=o=>{let e={joined:!0,spacerNoNeighbour:" ",spacerNeighbour:"\u2502 ",keyNoNeighbour:"\u2514\u2500 ",keyNeighbour:"\u251C\u2500 ",separator:": ",renderFn:r=>["boolean","string","number"].includes(typeof r)?r:void 0,sortFn:null,breakCircularWith:" (circular ref.)",...o};return d(Object.keys(e).length===9,"Unexpected Option(s) provided"),d(typeof e.joined=="boolean",'Option "joined" has invalid format'),d(typeof e.spacerNoNeighbour=="string",'Option "spacerNoNeighbour" has invalid format'),d(typeof e.spacerNeighbour=="string",'Option "spacerNeighbour" has invalid format'),d(typeof e.keyNoNeighbour=="string",'Option "keyNoNeighbour" has invalid format'),d(typeof e.keyNeighbour=="string",'Option "keyNeighbour" has invalid format'),d(typeof e.separator=="string",'Option "separator" has invalid format'),d(typeof e.renderFn=="function",'Option "renderFn" has invalid format'),d(typeof e.sortFn=="function"||e.sortFn===null,'Option "sortFn" has invalid format'),d(typeof e.breakCircularWith=="string"||e.breakCircularWith===null,'Option "breakCircularWith" has invalid format'),e},B=(o,e={})=>{let r=Re(e),t=[],i=r.renderFn(o);i!==void 0&&t.push(String(i));let s=p=>r.sortFn===null?p.reverse():p.sort((b,L)=>r.sortFn(L,b)),l=[],u=s(Object.keys(o)).map(p=>[p]),y=[o];for(;u.length!==0;){let p=u.pop(),b=y[p.length-1][p[p.length-1]],L=r.breakCircularWith!==null&&y.includes(b);l[p.length-1]=u.length!==0&&u[u.length-1].length===p.length;let Oe=r.renderFn(b);t.push([l.slice(0,p.length-1).map(D=>D?r.spacerNeighbour:r.spacerNoNeighbour).join(""),l[p.length-1]?r.keyNeighbour:r.keyNoNeighbour,p[p.length-1],Oe===void 0?"":`${r.separator}${b}`,L?r.breakCircularWith:""].join("")),b instanceof Object&&!Array.isArray(b)&&!L&&(u.push(...s(Object.keys(b)).map(D=>p.concat(D))),y[p.length]=b)}return r.joined===!0?t.join(`
`):t};var re=(o=0)=>e=>`\x1B[${e+o}m`,oe=(o=0)=>e=>`\x1B[${38+o};5;${e}m`,te=(o=0)=>(e,r,t)=>`\x1B[${38+o};2;${e};${r};${t}m`,c={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},ne=Object.keys(c.modifier),U=Object.keys(c.color),V=Object.keys(c.bgColor),ie=[...U,...V];function Le(){let o=new Map;for(let[e,r]of Object.entries(c)){for(let[t,i]of Object.entries(r))c[t]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[t]=c[t],o.set(i[0],i[1]);Object.defineProperty(c,e,{value:r,enumerable:!1})}return Object.defineProperty(c,"codes",{value:o,enumerable:!1}),c.color.close="\x1B[39m",c.bgColor.close="\x1B[49m",c.color.ansi=re(),c.color.ansi256=oe(),c.color.ansi16m=te(),c.bgColor.ansi=re(10),c.bgColor.ansi256=oe(10),c.bgColor.ansi16m=te(10),Object.defineProperties(c,{rgbToAnsi256:{value(e,r,t){return e===r&&r===t?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(t/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[t]=r;t.length===3&&(t=[...t].map(s=>s+s).join(""));let i=Number.parseInt(t,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>c.rgbToAnsi256(...c.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,t,i;if(e>=232)r=((e-232)*10+8)/255,t=r,i=r;else{e-=16;let u=e%36;r=Math.floor(e/36)/5,t=Math.floor(u/6)/5,i=u%6/5}let s=Math.max(r,t,i)*2;if(s===0)return 30;let l=30+(Math.round(i)<<2|Math.round(t)<<1|Math.round(r));return s===2&&(l+=60),l},enumerable:!1},rgbToAnsi:{value:(e,r,t)=>c.ansi256ToAnsi(c.rgbToAnsi256(e,r,t)),enumerable:!1},hexToAnsi:{value:e=>c.ansi256ToAnsi(c.hexToAnsi256(e)),enumerable:!1}}),c}var Se=Le(),h=Se;var j=E(require("node:process"),1),le=E(require("node:os"),1),K=E(require("node:tty"),1);function g(o,e=globalThis.Deno?globalThis.Deno.args:j.default.argv){let r=o.startsWith("-")?"":o.length===1?"-":"--",t=e.indexOf(r+o),i=e.indexOf("--");return t!==-1&&(i===-1||t<i)}var{env:m}=j.default,F;g("no-color")||g("no-colors")||g("color=false")||g("color=never")?F=0:(g("color")||g("colors")||g("color=true")||g("color=always"))&&(F=1);function Ee(){if("FORCE_COLOR"in m)return m.FORCE_COLOR==="true"?1:m.FORCE_COLOR==="false"?0:m.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(m.FORCE_COLOR,10),3)}function Be(o){return o===0?!1:{level:o,hasBasic:!0,has256:o>=2,has16m:o>=3}}function Fe(o,{streamIsTTY:e,sniffFlags:r=!0}={}){let t=Ee();t!==void 0&&(F=t);let i=r?F:t;if(i===0)return 0;if(r){if(g("color=16m")||g("color=full")||g("color=truecolor"))return 3;if(g("color=256"))return 2}if("TF_BUILD"in m&&"AGENT_NAME"in m)return 1;if(o&&!e&&i===void 0)return 0;let s=i||0;if(m.TERM==="dumb")return s;if(j.default.platform==="win32"){let l=le.default.release().split(".");return Number(l[0])>=10&&Number(l[2])>=10586?Number(l[2])>=14931?3:2:1}if("CI"in m)return"GITHUB_ACTIONS"in m?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(l=>l in m)||m.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in m)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(m.TEAMCITY_VERSION)?1:0;if(m.COLORTERM==="truecolor"||m.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in m){let l=Number.parseInt((m.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(m.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(m.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(m.TERM)||"COLORTERM"in m?1:s}function se(o,e={}){let r=Fe(o,{streamIsTTY:o&&o.isTTY,...e});return Be(r)}var je={stdout:se({isTTY:K.default.isatty(1)}),stderr:se({isTTY:K.default.isatty(2)})},ae=je;function ce(o,e,r){let t=o.indexOf(e);if(t===-1)return o;let i=e.length,s=0,l="";do l+=o.slice(s,t)+e+r,s=t+i,t=o.indexOf(e,s);while(t!==-1);return l+=o.slice(s),l}function me(o,e,r,t){let i=0,s="";do{let l=o[t-1]==="\r";s+=o.slice(i,l?t-1:t)+e+(l?`\r
`)}typeof Z<"u"&&(Z.exports=Pe)});var Ye={};Ne(Ye,{a:()=>A,add:()=>A,chalk:()=>n,conflict:()=>M,d:()=>$,default:()=>Ge,del:()=>$,e:()=>x,error:()=>x,fail:()=>W,i:()=>R,info:()=>R,invalid:()=>v,o:()=>C,ok:()=>I,paint:()=>f,pass:()=>G,success:()=>_,tree:()=>Y,valid:()=>C,warn:()=>P,x:()=>v});module.exports=ke(Ye);var d=(o,e)=>{if(!o)throw new Error(e)};var Ae=o=>{let e={joined:!0,spacerNoNeighbour:" ",spacerNeighbour:"\u2502 ",keyNoNeighbour:"\u2514\u2500 ",keyNeighbour:"\u251C\u2500 ",separator:": ",renderFn:r=>["boolean","string","number"].includes(typeof r)?r:void 0,sortFn:null,breakCircularWith:" (circular ref.)",...o};return d(Object.keys(e).length===9,"Unexpected Option(s) provided"),d(typeof e.joined=="boolean",'Option "joined" has invalid format'),d(typeof e.spacerNoNeighbour=="string",'Option "spacerNoNeighbour" has invalid format'),d(typeof e.spacerNeighbour=="string",'Option "spacerNeighbour" has invalid format'),d(typeof e.keyNoNeighbour=="string",'Option "keyNoNeighbour" has invalid format'),d(typeof e.keyNeighbour=="string",'Option "keyNeighbour" has invalid format'),d(typeof e.separator=="string",'Option "separator" has invalid format'),d(typeof e.renderFn=="function",'Option "renderFn" has invalid format'),d(typeof e.sortFn=="function"||e.sortFn===null,'Option "sortFn" has invalid format'),d(typeof e.breakCircularWith=="string"||e.breakCircularWith===null,'Option "breakCircularWith" has invalid format'),e},B=(o,e={})=>{let r=Ae(e),t=[],i=r.renderFn(o);i!==void 0&&t.push(String(i));let s=p=>r.sortFn===null?p.reverse():p.sort((b,L)=>r.sortFn(L,b)),l=[],u=s(Object.keys(o)).map(p=>[p]),y=[o];for(;u.length!==0;){let p=u.pop(),b=y[p.length-1][p[p.length-1]],L=r.breakCircularWith!==null&&y.includes(b);l[p.length-1]=u.length!==0&&u[u.length-1].length===p.length;let de=r.renderFn(b);t.push([l.slice(0,p.length-1).map(D=>D?r.spacerNeighbour:r.spacerNoNeighbour).join(""),l[p.length-1]?r.keyNeighbour:r.keyNoNeighbour,p[p.length-1],de===void 0?"":`${r.separator}${b}`,L?r.breakCircularWith:""].join("")),b instanceof Object&&!Array.isArray(b)&&!L&&(u.push(...s(Object.keys(b)).map(D=>p.concat(D))),y[p.length]=b)}return r.joined===!0?t.join(`
`):t};var X=(o=0)=>e=>`\x1B[${e+o}m`,ee=(o=0)=>e=>`\x1B[${38+o};5;${e}m`,re=(o=0)=>(e,r,t)=>`\x1B[${38+o};2;${e};${r};${t}m`,c={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Ke=Object.keys(c.modifier),xe=Object.keys(c.color),Ce=Object.keys(c.bgColor),Je=[...xe,...Ce];function ve(){let o=new Map;for(let[e,r]of Object.entries(c)){for(let[t,i]of Object.entries(r))c[t]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[t]=c[t],o.set(i[0],i[1]);Object.defineProperty(c,e,{value:r,enumerable:!1})}return Object.defineProperty(c,"codes",{value:o,enumerable:!1}),c.color.close="\x1B[39m",c.bgColor.close="\x1B[49m",c.color.ansi=X(),c.color.ansi256=ee(),c.color.ansi16m=re(),c.bgColor.ansi=X(10),c.bgColor.ansi256=ee(10),c.bgColor.ansi16m=re(10),Object.defineProperties(c,{rgbToAnsi256:{value(e,r,t){return e===r&&r===t?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(t/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[t]=r;t.length===3&&(t=[...t].map(s=>s+s).join(""));let i=Number.parseInt(t,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>c.rgbToAnsi256(...c.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,t,i;if(e>=232)r=((e-232)*10+8)/255,t=r,i=r;else{e-=16;let u=e%36;r=Math.floor(e/36)/5,t=Math.floor(u/6)/5,i=u%6/5}let s=Math.max(r,t,i)*2;if(s===0)return 30;let l=30+(Math.round(i)<<2|Math.round(t)<<1|Math.round(r));return s===2&&(l+=60),l},enumerable:!1},rgbToAnsi:{value:(e,r,t)=>c.ansi256ToAnsi(c.rgbToAnsi256(e,r,t)),enumerable:!1},hexToAnsi:{value:e=>c.ansi256ToAnsi(c.hexToAnsi256(e)),enumerable:!1}}),c}var Re=ve(),h=Re;var j=E(require("node:process"),1),te=E(require("node:os"),1),U=E(require("node:tty"),1);function g(o,e=globalThis.Deno?globalThis.Deno.args:j.default.argv){let r=o.startsWith("-")?"":o.length===1?"-":"--",t=e.indexOf(r+o),i=e.indexOf("--");return t!==-1&&(i===-1||t<i)}var{env:m}=j.default,F;g("no-color")||g("no-colors")||g("color=false")||g("color=never")?F=0:(g("color")||g("colors")||g("color=true")||g("color=always"))&&(F=1);function Le(){if("FORCE_COLOR"in m)return m.FORCE_COLOR==="true"?1:m.FORCE_COLOR==="false"?0:m.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(m.FORCE_COLOR,10),3)}function Se(o){return o===0?!1:{level:o,hasBasic:!0,has256:o>=2,has16m:o>=3}}function Ee(o,{streamIsTTY:e,sniffFlags:r=!0}={}){let t=Le();t!==void 0&&(F=t);let i=r?F:t;if(i===0)return 0;if(r){if(g("color=16m")||g("color=full")||g("color=truecolor"))return 3;if(g("color=256"))return 2}if("TF_BUILD"in m&&"AGENT_NAME"in m)return 1;if(o&&!e&&i===void 0)return 0;let s=i||0;if(m.TERM==="dumb")return s;if(j.default.platform==="win32"){let l=te.default.release().split(".");return Number(l[0])>=10&&Number(l[2])>=10586?Number(l[2])>=14931?3:2:1}if("CI"in m)return"GITHUB_ACTIONS"in m||"GITEA_ACTIONS"in m?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(l=>l in m)||m.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in m)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(m.TEAMCITY_VERSION)?1:0;if(m.COLORTERM==="truecolor"||m.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in m){let l=Number.parseInt((m.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(m.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(m.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(m.TERM)||"COLORTERM"in m?1:s}function oe(o,e={}){let r=Ee(o,{streamIsTTY:o&&o.isTTY,...e});return Se(r)}var Be={stdout:oe({isTTY:U.default.isatty(1)}),stderr:oe({isTTY:U.default.isatty(2)})},ne=Be;function ie(o,e,r){let t=o.indexOf(e);if(t===-1)return o;let i=e.length,s=0,l="";do l+=o.slice(s,t)+e+r,s=t+i,t=o.indexOf(e,s);while(t!==-1);return l+=o.slice(s),l}function se(o,e,r,t){let i=0,s="";do{let l=o[t-1]==="\r";s+=o.slice(i,l?t-1:t)+e+(l?`\r
`:`
`)+r,i=t+1,t=o.indexOf(`
`,i)}while(t!==-1);return s+=o.slice(i),s}var{stdout:pe,stderr:fe}=ae,J=Symbol("GENERATOR"),O=Symbol("STYLER"),N=Symbol("IS_EMPTY"),ue=["ansi","ansi","ansi256","ansi16m"],$=Object.create(null),we=(o,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=pe?pe.level:0;o.level=e.level===void 0?r:e.level};var Me=o=>{let e=(...r)=>r.join(" ");return we(e,o),Object.setPrototypeOf(e,k.prototype),e};function k(o){return Me(o)}Object.setPrototypeOf(k.prototype,Function.prototype);for(let[o,e]of Object.entries(h))$[o]={get(){let r=w(this,H(e.open,e.close,this[O]),this[N]);return Object.defineProperty(this,o,{value:r}),r}};$.visible={get(){let o=w(this,this[O],!0);return Object.defineProperty(this,"visible",{value:o}),o}};var z=(o,e,r,...t)=>o==="rgb"?e==="ansi16m"?h[r].ansi16m(...t):e==="ansi256"?h[r].ansi256(h.rgbToAnsi256(...t)):h[r].ansi(h.rgbToAnsi(...t)):o==="hex"?z("rgb",e,r,...h.hexToRgb(...t)):h[r][o](...t),Ie=["rgb","hex","ansi256"];for(let o of Ie){$[o]={get(){let{level:r}=this;return function(...t){let i=H(z(o,ue[r],"color",...t),h.color.close,this[O]);return w(this,i,this[N])}}};let e="bg"+o[0].toUpperCase()+o.slice(1);$[e]={get(){let{level:r}=this;return function(...t){let i=H(z(o,ue[r],"bgColor",...t),h.bgColor.close,this[O]);return w(this,i,this[N])}}}}var _e=Object.defineProperties(()=>{},{...$,level:{enumerable:!0,get(){return this[J].level},set(o){this[J].level=o}}}),H=(o,e,r)=>{let t,i;return r===void 0?(t=o,i=e):(t=r.openAll+o,i=e+r.closeAll),{open:o,close:e,openAll:t,closeAll:i,parent:r}},w=(o,e,r)=>{let t=(...i)=>Pe(t,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(t,_e),t[J]=o,t[O]=e,t[N]=r,t},Pe=(o,e)=>{if(o.level<=0||!e)return o[N]?"":e;let r=o[O];if(r===void 0)return e;let{openAll:t,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=ce(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
`);return s!==-1&&(e=me(e,i,t,s)),t+e+i};Object.defineProperties(k.prototype,$);var Ge=k(),er=k({level:fe?fe.level:0});var n=Ge;function f(o){return o.split(" ").map(e=>e.replace(/^(\d*\.?\d*)$/g,`${n.blue("$1")}`).replace(/^(\d*\.?\d*)(YB|ZB|EB|PB|TB|GB|MB|KB|B|mb|kb|kB|bit|zs|as|fs|ps|ns|µs|ms|s|m|h|d|m|y)$/g,`${n.cyan("$1")}${n.magenta("$2")}`).replace(/^((?:[0-1]?[0-9]|[2][0-3]):[0-5][0-9]:[0-5][0-9] (?:AM|PM)?)$/g,`${n.dim("$1")}`).replace(/^\[(.*?)\]$/g,`${n.dim("[")}${n.magenta("$1")}${n.dim("]")}`).replace(/^`(.*?)`$/g,`${n.dim("`")}$1${n.dim("`")}`).replace(/^\((.*?)\)$/g,`${n.dim("(")}$1${n.dim(")")}`).replace(/^<(.*?)>$/g,`${n.dim("<")}${n.gray("$1")}${n.dim(">")}`).replace(/->/g,n.dim("\u2192")).replace(/<-/g,n.dim("\u2190")).replace(/^\$t$/g,`${n.dim(new Date().toLocaleTimeString())}`).replace(/^\*\*(.*?)\*\*$/g,`${n.bold.white("$1")}`).replace(/^~~(.*?)~~$/g,`${n.strikethrough("$1")}`).replace(/^__(.*?)__$/g,`${n.underline("$1")}`).replace(/^\.\.(.*?)\.\.$/g,`${n.dim("$1")}`).replace(/^!!(.*?)!!$/g,`${n.yellow("$1")}`).replace(/^\*(.*?)\*$/g,`${n.italic("$1")}`).replace(/^_(.*?)_$/g,`${n.italic("$1")}`).replace(/^\+(.*?)\+$/g,`${n.green("$1")}`).replace(/^-(.*?)-$/g,`${n.red("$1")}`)).join(" ")}function a(o,e){let r="";if(Array.isArray(o))for(let t=0;t<o.length;t++)r+=Z(o[t])+Z(e[t]);else r=[o,...e].map(t=>Z(t)).join(" ");return f(r)}var Z=o=>o?Array.isArray(o)?o.map(e=>{switch(typeof e){case"string":return`'${n.yellow(e)}'`;case"number":case"boolean":return n.blue(e);default:return e}}).join(n.gray(", ")):o:"";var x=(o,...e)=>{let r=n.green("+")+" "+a(o,e);return console.log(r),r};var v=(o,...e)=>{let r=n.bgRed.bold.white(" \u{1D5EB} ERROR ")+" "+a(o,e);return console.log(r),r};var M=(o,...e)=>{let r=n.bgYellow.bold.white(" \u26A0\uFE0F CONFLICT ")+" "+n.yellow(a(o,e));return console.log(r),r};var I=(o,...e)=>{let r=n.green("\u2713 ")+a(o,e);return console.log(r),r};var T=(o,...e)=>{let r=n.red("-")+" "+a(o,e);return console.log(r),r};var A=(o,...e)=>{let r=n.green("\u25CB ")+a(o,e);return console.log(r),r};var C=(o,...e)=>{let r=n.red("\u2717 ")+a(o,e);return console.log(r),r};var R=(o,...e)=>{let r=n.cyan("\u{1D4F2}")+" "+a(o,e);return console.log(r),r};var _=(o,...e)=>{let r=n.green("\u23FA Success ")+a(o,e);return console.log(r),r};var P=(o,...e)=>{let r=n.yellow("\u23FA Warn ")+a(o,e);return console.log(r),r};var G=(o,...e)=>{let r=n.bgGreen.bold.white(" \u2713 PASS ")+" "+a(o,e);return console.log(r),r};var Y=o=>{let e=B(de(ge(JSON.parse(JSON.stringify(o)))),{spacerNeighbour:f("..\u2502..")+" ",keyNoNeighbour:f("..\u2514..")+" ",keyNeighbour:f("..\u251C..")+" ",separator:f("..:..")+" "});return console.log(e),e};function ge(o){for(let e in o){let r=o[e];typeof r=="object"?r!==null&&!Object.keys(r).length?delete o[e]:o[e]=ge(r):r===void 0&&delete o[e]}return o}function de(o){for(let e in o){let r=o[e];Array.isArray(r)?o[e]=r.map(t=>f(`**${t}**`)).join(f("..,.. ")):typeof r=="object"?de(r):o[e]=f(`**${r}**`)}return o}var W=(o,...e)=>{let r=n.red("\u23FA Fail ")+a(o,e);return console.log(r),r};var q=(o,...e)=>{let r=f("$t ")+a(o,e);return console.log(r),r};var be=E(he());function ye(o){let{message:e,stack:r}=typeof o=="string"?new Error(o):o,t={};return(0,be.default)(r.replace(e,"").replace(/^Error: /,"")).split(`
`).forEach(i=>{t[i.split(" ").map(s=>s.replace(/^\((.+)\)$/,`${n.cyan("$1")}`).replace(/\./g,`${n.dim(".")}`).replace(/^at$/,l=>n.dim(l))).join(" ")]=null}),{message:e.trim().replace(/Error: /g,""),stackTree:t}}var X=(o,...e)=>{if(o instanceof Error){let{message:r,stackTree:t}=ye(o);return console.log(""),console.log(n.bgRed.bold.white(" \u{1D5EB} ERROR ")+" "+n.bold.red(r)),console.log(B(t,{spacerNeighbour:n.redBright.dim("\u2502\u2000\u2000"),keyNoNeighbour:n.redBright.dim("\u2514\u2000"),keyNeighbour:n.redBright.dim("\u251C "),separator:n.redBright.dim(":\u2000")})),console.log(""),r}else{let r=a(o,e);return console.log(r),r}};Object.assign(X,{a:x,add:x,d:T,del:T,delete:T,o:A,valid:A,x:C,invalid:C,i:R,info:R,e:v,error:v,t:q,timestamp:q,success:_,fail:W,warn:P,pass:G,conflict:M,ok:I,tree:Y,paint:f});var We=X;0&&(module.exports={a,add,chalk,conflict,d,del,e,error,fail,i,info,invalid,o,ok,paint,pass,success,tree,valid,warn,x});
`,i)}while(t!==-1);return s+=o.slice(i),s}var{stdout:le,stderr:ae}=ne,V=Symbol("GENERATOR"),O=Symbol("STYLER"),N=Symbol("IS_EMPTY"),ce=["ansi","ansi","ansi256","ansi16m"],T=Object.create(null),Fe=(o,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=le?le.level:0;o.level=e.level===void 0?r:e.level};var je=o=>{let e=(...r)=>r.join(" ");return Fe(e,o),Object.setPrototypeOf(e,k.prototype),e};function k(o){return je(o)}Object.setPrototypeOf(k.prototype,Function.prototype);for(let[o,e]of Object.entries(h))T[o]={get(){let r=w(this,J(e.open,e.close,this[O]),this[N]);return Object.defineProperty(this,o,{value:r}),r}};T.visible={get(){let o=w(this,this[O],!0);return Object.defineProperty(this,"visible",{value:o}),o}};var K=(o,e,r,...t)=>o==="rgb"?e==="ansi16m"?h[r].ansi16m(...t):e==="ansi256"?h[r].ansi256(h.rgbToAnsi256(...t)):h[r].ansi(h.rgbToAnsi(...t)):o==="hex"?K("rgb",e,r,...h.hexToRgb(...t)):h[r][o](...t),we=["rgb","hex","ansi256"];for(let o of we){T[o]={get(){let{level:r}=this;return function(...t){let i=J(K(o,ce[r],"color",...t),h.color.close,this[O]);return w(this,i,this[N])}}};let e="bg"+o[0].toUpperCase()+o.slice(1);T[e]={get(){let{level:r}=this;return function(...t){let i=J(K(o,ce[r],"bgColor",...t),h.bgColor.close,this[O]);return w(this,i,this[N])}}}}var Me=Object.defineProperties(()=>{},{...T,level:{enumerable:!0,get(){return this[V].level},set(o){this[V].level=o}}}),J=(o,e,r)=>{let t,i;return r===void 0?(t=o,i=e):(t=r.openAll+o,i=e+r.closeAll),{open:o,close:e,openAll:t,closeAll:i,parent:r}},w=(o,e,r)=>{let t=(...i)=>Ie(t,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(t,Me),t[V]=o,t[O]=e,t[N]=r,t},Ie=(o,e)=>{if(o.level<=0||!e)return o[N]?"":e;let r=o[O];if(r===void 0)return e;let{openAll:t,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=ie(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
`);return s!==-1&&(e=se(e,i,t,s)),t+e+i};Object.defineProperties(k.prototype,T);var _e=k(),er=k({level:ae?ae.level:0});var n=_e;function f(o){return o.split(" ").map(e=>e.replace(/^(\d*\.?\d*)$/g,`${n.blue("$1")}`).replace(/^(\d*\.?\d*)(YB|ZB|EB|PB|TB|GB|MB|KB|B|mb|kb|kB|bit|zs|as|fs|ps|ns|µs|ms|s|m|h|d|m|y)$/g,`${n.cyan("$1")}${n.magenta("$2")}`).replace(/^((?:[0-1]?[0-9]|[2][0-3]):[0-5][0-9]:[0-5][0-9] (?:AM|PM)?)$/g,`${n.dim("$1")}`).replace(/^\[(.*?)\]$/g,`${n.dim("[")}${n.magenta("$1")}${n.dim("]")}`).replace(/^`(.*?)`$/g,`${n.dim("`")}$1${n.dim("`")}`).replace(/^\((.*?)\)$/g,`${n.dim("(")}$1${n.dim(")")}`).replace(/^<(.*?)>$/g,`${n.dim("<")}${n.gray("$1")}${n.dim(">")}`).replace(/->/g,n.dim("\u2192")).replace(/<-/g,n.dim("\u2190")).replace(/^\$t$/g,`${n.dim(new Date().toLocaleTimeString())}`).replace(/^\*\*(.*?)\*\*$/g,`${n.bold.white("$1")}`).replace(/^~~(.*?)~~$/g,`${n.strikethrough("$1")}`).replace(/^__(.*?)__$/g,`${n.underline("$1")}`).replace(/^\.\.(.*?)\.\.$/g,`${n.dim("$1")}`).replace(/^!!(.*?)!!$/g,`${n.yellow("$1")}`).replace(/^\*(.*?)\*$/g,`${n.italic("$1")}`).replace(/^_(.*?)_$/g,`${n.italic("$1")}`).replace(/^\+(.*?)\+$/g,`${n.green("$1")}`).replace(/^-(.*?)-$/g,`${n.red("$1")}`)).join(" ")}function a(o,e){let r="";if(Array.isArray(o))for(let t=0;t<o.length;t++)r+=z(o[t])+z(e[t]);else r=[o,...e].map(t=>z(t)).join(" ");return f(r)}var z=o=>o?Array.isArray(o)?o.map(e=>{switch(typeof e){case"string":return`'${n.yellow(e)}'`;case"number":case"boolean":return n.blue(e);default:return e}}).join(n.gray(", ")):o:"";var A=(o,...e)=>{let r=n.green("+")+" "+a(o,e);return console.log(r),r};var x=(o,...e)=>{let r=n.bgRed.bold.white(" \u{1D5EB} ERROR ")+" "+a(o,e);return console.log(r),r};var M=(o,...e)=>{let r=n.bgYellow.bold.white(" \u26A0\uFE0F CONFLICT ")+" "+n.yellow(a(o,e));return console.log(r),r};var I=(o,...e)=>{let r=n.green("\u2713 ")+a(o,e);return console.log(r),r};var $=(o,...e)=>{let r=n.red("-")+" "+a(o,e);return console.log(r),r};var C=(o,...e)=>{let r=n.green("\u25CB ")+a(o,e);return console.log(r),r};var v=(o,...e)=>{let r=n.red("\u2717 ")+a(o,e);return console.log(r),r};var R=(o,...e)=>{let r=n.cyan("\u{1D4F2}")+" "+a(o,e);return console.log(r),r};var _=(o,...e)=>{let r=n.green("\u23FA Success ")+a(o,e);return console.log(r),r};var P=(o,...e)=>{let r=n.yellow("\u23FA Warn ")+a(o,e);return console.log(r),r};var G=(o,...e)=>{let r=n.bgGreen.bold.white(" \u2713 PASS ")+" "+a(o,e);return console.log(r),r};var Y=o=>{let e=B(pe(me(JSON.parse(JSON.stringify(o)))),{spacerNeighbour:f("..\u2502..")+" ",keyNoNeighbour:f("..\u2514..")+" ",keyNeighbour:f("..\u251C..")+" ",separator:f("..:..")+" "});return console.log(e),e};function me(o){for(let e in o){let r=o[e];typeof r=="object"?r!==null&&!Object.keys(r).length?delete o[e]:o[e]=me(r):r===void 0&&delete o[e]}return o}function pe(o){for(let e in o){let r=o[e];Array.isArray(r)?o[e]=r.map(t=>f(`**${t}**`)).join(f("..,.. ")):typeof r=="object"?pe(r):o[e]=f(`**${r}**`)}return o}var W=(o,...e)=>{let r=n.red("\u23FA Fail ")+a(o,e);return console.log(r),r};var H=(o,...e)=>{let r=f("$t ")+a(o,e);return console.log(r),r};var ue=E(fe());function ge(o){let{message:e,stack:r}=typeof o=="string"?new Error(o):o,t={};return(0,ue.default)(r.replace(e,"").replace(/^Error: /,"")).split(`
`).forEach(i=>{t[i.split(" ").map(s=>s.replace(/^\((.+)\)$/,`${n.cyan("$1")}`).replace(/\./g,`${n.dim(".")}`).replace(/^at$/,l=>n.dim(l))).join(" ")]=null}),{message:e.trim().replace(/Error: /g,""),stackTree:t}}var q=(o,...e)=>{if(o instanceof Error){let{message:r,stackTree:t}=ge(o);return console.log(""),console.log(n.bgRed.bold.white(" \u{1D5EB} ERROR ")+" "+n.bold.red(r)),console.log(B(t,{spacerNeighbour:n.redBright.dim("\u2502\u2000\u2000"),keyNoNeighbour:n.redBright.dim("\u2514\u2000"),keyNeighbour:n.redBright.dim("\u251C "),separator:n.redBright.dim(":\u2000")})),console.log(""),r}else{let r=a(o,e);return console.log(r),r}};Object.assign(q,{a:A,add:A,d:$,del:$,delete:$,o:C,valid:C,x:v,invalid:v,i:R,info:R,e:x,error:x,t:H,timestamp:H,success:_,fail:W,warn:P,pass:G,conflict:M,ok:I,tree:Y,paint:f});var Ge=q;0&&(module.exports={a,add,chalk,conflict,d,del,e,error,fail,i,info,invalid,o,ok,paint,pass,success,tree,valid,warn,x});
//# sourceMappingURL=index.js.map

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

{"name":"@techor/log","license":"MIT","scripts":{"build:cjs":"esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --platform=node","build:esm":"esbuild src/index.ts --bundle --outfile=dist/index.mjs --format=esm --minify --sourcemap --platform=node","build:type":"tsc --emitDeclarationOnly --preserveWatchOutput","build":"pnpm run \"/^build:.*/\"","dev":"pnpm run \"/^build:.*/\" --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"description":"A set of human-friendly and beautiful console log syntax","author":{"name":"Aron","email":"i@aron.tw","url":"https://aron.tw"},"homepage":"https://github.com/1aron/techor","bugs":{"url":"https://github.com/1aron/techor/issues"},"repository":{"type":"git","url":"https://github.com/1aron/techor.git","directory":"packages/log"},"keywords":["console","log","chalk","semantic"],"main":"./dist/index.js","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"files":["dist"],"sideEffects":false,"publishConfig":{"access":"public"},"devDependencies":{"chalk":"^5.2.0","dedent":"^0.7.0","object-treeify":"^3.3.1"},"version":"2.5.24"}
{"name":"@techor/log","license":"MIT","scripts":{"build:cjs":"esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --platform=node","build:esm":"esbuild src/index.ts --bundle --outfile=dist/index.mjs --format=esm --minify --sourcemap --platform=node","build:type":"tsc --emitDeclarationOnly --preserveWatchOutput","build":"pnpm run \"/^build:.*/\"","dev":"pnpm run \"/^build:.*/\" --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"description":"A set of human-friendly and beautiful console log syntax","author":{"name":"Aron","email":"i@aron.tw","url":"https://aron.tw"},"homepage":"https://github.com/1aron/techor","bugs":{"url":"https://github.com/1aron/techor/issues"},"repository":{"type":"git","url":"https://github.com/1aron/techor.git","directory":"packages/log"},"keywords":["console","log","chalk","semantic"],"main":"./dist/index.js","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"files":["dist"],"sideEffects":false,"publishConfig":{"access":"public"},"devDependencies":{"chalk":"^5.2.0","dedent":"^0.7.0","object-treeify":"^3.3.1"},"version":"2.6.0"}

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