New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

devink

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devink - npm Package Compare versions

Comparing version
1.0.1
to
1.0.2
+26
-1
dist/index.d.mts

@@ -34,2 +34,3 @@ interface Theme {

private getTimestamp;
private highlightJson;
private formatMessage;

@@ -48,2 +49,3 @@ private stripAnsi;

declare const reset: (text: string) => string;
declare const black: (text: string) => string;
declare const red: (text: string) => string;

@@ -57,2 +59,10 @@ declare const green: (text: string) => string;

declare const gray: (text: string) => string;
declare const bgBlack: (text: string) => string;
declare const bgRed: (text: string) => string;
declare const bgGreen: (text: string) => string;
declare const bgYellow: (text: string) => string;
declare const bgBlue: (text: string) => string;
declare const bgMagenta: (text: string) => string;
declare const bgCyan: (text: string) => string;
declare const bgWhite: (text: string) => string;
declare const bold: (text: string) => string;

@@ -62,3 +72,16 @@ declare const dim: (text: string) => string;

declare const underline: (text: string) => string;
declare const inverse: (text: string) => string;
declare const hex: (hexCode: string, text: string) => string;
declare const bgHex: (hexCode: string, text: string) => string;
declare const ansi_bgBlack: typeof bgBlack;
declare const ansi_bgBlue: typeof bgBlue;
declare const ansi_bgCyan: typeof bgCyan;
declare const ansi_bgGreen: typeof bgGreen;
declare const ansi_bgHex: typeof bgHex;
declare const ansi_bgMagenta: typeof bgMagenta;
declare const ansi_bgRed: typeof bgRed;
declare const ansi_bgWhite: typeof bgWhite;
declare const ansi_bgYellow: typeof bgYellow;
declare const ansi_black: typeof black;
declare const ansi_blue: typeof blue;

@@ -71,2 +94,4 @@ declare const ansi_bold: typeof bold;

declare const ansi_green: typeof green;
declare const ansi_hex: typeof hex;
declare const ansi_inverse: typeof inverse;
declare const ansi_isColorSupported: typeof isColorSupported;

@@ -81,5 +106,5 @@ declare const ansi_italic: typeof italic;

declare namespace ansi {
export { ansi_blue as blue, ansi_bold as bold, ansi_cyan as cyan, ansi_dim as dim, ansi_format as format, ansi_gray as gray, ansi_green as green, ansi_isColorSupported as isColorSupported, ansi_italic as italic, ansi_magenta as magenta, ansi_red as red, ansi_reset as reset, ansi_underline as underline, ansi_white as white, ansi_yellow as yellow };
export { ansi_bgBlack as bgBlack, ansi_bgBlue as bgBlue, ansi_bgCyan as bgCyan, ansi_bgGreen as bgGreen, ansi_bgHex as bgHex, ansi_bgMagenta as bgMagenta, ansi_bgRed as bgRed, ansi_bgWhite as bgWhite, ansi_bgYellow as bgYellow, ansi_black as black, ansi_blue as blue, ansi_bold as bold, ansi_cyan as cyan, ansi_dim as dim, ansi_format as format, ansi_gray as gray, ansi_green as green, ansi_hex as hex, ansi_inverse as inverse, ansi_isColorSupported as isColorSupported, ansi_italic as italic, ansi_magenta as magenta, ansi_red as red, ansi_reset as reset, ansi_underline as underline, ansi_white as white, ansi_yellow as yellow };
}
export { Logger, type LoggerOptions, type Theme, ansi, createLogger, defaultTheme };

@@ -34,2 +34,3 @@ interface Theme {

private getTimestamp;
private highlightJson;
private formatMessage;

@@ -48,2 +49,3 @@ private stripAnsi;

declare const reset: (text: string) => string;
declare const black: (text: string) => string;
declare const red: (text: string) => string;

@@ -57,2 +59,10 @@ declare const green: (text: string) => string;

declare const gray: (text: string) => string;
declare const bgBlack: (text: string) => string;
declare const bgRed: (text: string) => string;
declare const bgGreen: (text: string) => string;
declare const bgYellow: (text: string) => string;
declare const bgBlue: (text: string) => string;
declare const bgMagenta: (text: string) => string;
declare const bgCyan: (text: string) => string;
declare const bgWhite: (text: string) => string;
declare const bold: (text: string) => string;

@@ -62,3 +72,16 @@ declare const dim: (text: string) => string;

declare const underline: (text: string) => string;
declare const inverse: (text: string) => string;
declare const hex: (hexCode: string, text: string) => string;
declare const bgHex: (hexCode: string, text: string) => string;
declare const ansi_bgBlack: typeof bgBlack;
declare const ansi_bgBlue: typeof bgBlue;
declare const ansi_bgCyan: typeof bgCyan;
declare const ansi_bgGreen: typeof bgGreen;
declare const ansi_bgHex: typeof bgHex;
declare const ansi_bgMagenta: typeof bgMagenta;
declare const ansi_bgRed: typeof bgRed;
declare const ansi_bgWhite: typeof bgWhite;
declare const ansi_bgYellow: typeof bgYellow;
declare const ansi_black: typeof black;
declare const ansi_blue: typeof blue;

@@ -71,2 +94,4 @@ declare const ansi_bold: typeof bold;

declare const ansi_green: typeof green;
declare const ansi_hex: typeof hex;
declare const ansi_inverse: typeof inverse;
declare const ansi_isColorSupported: typeof isColorSupported;

@@ -81,5 +106,5 @@ declare const ansi_italic: typeof italic;

declare namespace ansi {
export { ansi_blue as blue, ansi_bold as bold, ansi_cyan as cyan, ansi_dim as dim, ansi_format as format, ansi_gray as gray, ansi_green as green, ansi_isColorSupported as isColorSupported, ansi_italic as italic, ansi_magenta as magenta, ansi_red as red, ansi_reset as reset, ansi_underline as underline, ansi_white as white, ansi_yellow as yellow };
export { ansi_bgBlack as bgBlack, ansi_bgBlue as bgBlue, ansi_bgCyan as bgCyan, ansi_bgGreen as bgGreen, ansi_bgHex as bgHex, ansi_bgMagenta as bgMagenta, ansi_bgRed as bgRed, ansi_bgWhite as bgWhite, ansi_bgYellow as bgYellow, ansi_black as black, ansi_blue as blue, ansi_bold as bold, ansi_cyan as cyan, ansi_dim as dim, ansi_format as format, ansi_gray as gray, ansi_green as green, ansi_hex as hex, ansi_inverse as inverse, ansi_isColorSupported as isColorSupported, ansi_italic as italic, ansi_magenta as magenta, ansi_red as red, ansi_reset as reset, ansi_underline as underline, ansi_white as white, ansi_yellow as yellow };
}
export { Logger, type LoggerOptions, type Theme, ansi, createLogger, defaultTheme };
+2
-1

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

'use strict';var l=Object.defineProperty;var x=(t,r)=>{for(var s in r)l(t,s,{get:r[s],enumerable:true});};var h={};x(h,{blue:()=>g,bold:()=>m,cyan:()=>d,dim:()=>b,format:()=>e,gray:()=>c,green:()=>o,isColorSupported:()=>u,italic:()=>$,magenta:()=>T,red:()=>n,reset:()=>w,underline:()=>y,white:()=>v,yellow:()=>i});var u=!process.env.NO_COLOR&&(process.env.FORCE_COLOR||process.stdout?.isTTY||process.env.TERM==="xterm-256color"),e=(t,r)=>u?`\x1B[${t}m${r}\x1B[0m`:r,w=t=>e(0,t),n=t=>e(31,t),o=t=>e(32,t),i=t=>e(33,t),g=t=>e(34,t),T=t=>e(35,t),d=t=>e(36,t),v=t=>e(37,t),c=t=>e(90,t),m=t=>e(1,t),b=t=>e(2,t),$=t=>e(3,t),y=t=>e(4,t);var p={success:t=>o(t),error:t=>n(m(t)),warn:t=>i(t),info:t=>g(t),prefix:{success:o("\u2714"),error:n("\u2716"),warn:i("\u26A0"),info:g("\u2139")}};var O={success:console.log,error:console.error,warn:console.warn,info:console.info},a=class{theme;timestamps;colors;transport;constructor(r={}){this.theme={...p,...r.theme,prefix:{...p.prefix,...r.theme?.prefix}},this.timestamps=r.timestamps??false,this.colors=r.colors??true,this.transport={...O,...r.transport};}getTimestamp(){if(!this.timestamps)return "";let s=new Date().toISOString().split("T")[1]?.split(".")[0];return c(`[${s}] `)}formatMessage(r){return r.map(s=>{if(typeof s=="string")return s;try{return JSON.stringify(s,null,2)}catch{return "[Unserializable Object]"}}).join(" ")}stripAnsi(r){return r.replace(/\x1b\[[0-9;]*m/g,"")}output(r,s){let f=this.colors?s:this.stripAnsi(s);this.transport[r](f);}success(...r){let s=this.formatMessage(r);this.output("success",`${this.getTimestamp()}${this.theme.prefix.success} ${this.theme.success(s)}`);}error(...r){let s=this.formatMessage(r);this.output("error",`${this.getTimestamp()}${this.theme.prefix.error} ${this.theme.error(s)}`);}warn(...r){let s=this.formatMessage(r);this.output("warn",`${this.getTimestamp()}${this.theme.prefix.warn} ${this.theme.warn(s)}`);}info(...r){let s=this.formatMessage(r);this.output("info",`${this.getTimestamp()}${this.theme.prefix.info} ${this.theme.info(s)}`);}},k=t=>new a(t);exports.Logger=a;exports.ansi=h;exports.createLogger=k;exports.defaultTheme=p;
'use strict';var h=Object.defineProperty;var x=(t,s)=>{for(var r in s)h(t,r,{get:s[r],enumerable:true});};var l={};x(l,{bgBlack:()=>I,bgBlue:()=>M,bgCyan:()=>E,bgGreen:()=>R,bgHex:()=>g,bgMagenta:()=>S,bgRed:()=>L,bgWhite:()=>N,bgYellow:()=>C,black:()=>d,blue:()=>v,bold:()=>o,cyan:()=>k,dim:()=>j,format:()=>e,gray:()=>m,green:()=>T,hex:()=>n,inverse:()=>z,isColorSupported:()=>p,italic:()=>A,magenta:()=>O,red:()=>w,reset:()=>b,underline:()=>J,white:()=>y,yellow:()=>$});var p=!process.env.NO_COLOR&&(process.env.FORCE_COLOR||process.stdout?.isTTY||process.env.TERM==="xterm-256color"),e=(t,s)=>p?`\x1B[${t}m${s}\x1B[0m`:s,b=t=>e(0,t),d=t=>e(30,t),w=t=>e(31,t),T=t=>e(32,t),$=t=>e(33,t),v=t=>e(34,t),O=t=>e(35,t),k=t=>e(36,t),y=t=>e(37,t),m=t=>e(90,t),I=t=>e(40,t),L=t=>e(41,t),R=t=>e(42,t),C=t=>e(43,t),M=t=>e(44,t),S=t=>e(45,t),E=t=>e(46,t),N=t=>e(47,t),o=t=>e(1,t),j=t=>e(2,t),A=t=>e(3,t),J=t=>e(4,t),z=t=>e(7,t),n=(t,s)=>{if(!p)return s;let r=t.replace(/^#/,"");if(r.length!==6)return s;let i=parseInt(r.substring(0,2),16),u=parseInt(r.substring(2,4),16),f=parseInt(r.substring(4,6),16);return `\x1B[38;2;${i};${u};${f}m${s}\x1B[0m`},g=(t,s)=>{if(!p)return s;let r=t.replace(/^#/,"");if(r.length!==6)return s;let i=parseInt(r.substring(0,2),16),u=parseInt(r.substring(2,4),16),f=parseInt(r.substring(4,6),16);return `\x1B[48;2;${i};${u};${f}m${s}\x1B[0m`};var a={success:t=>t,error:t=>t,warn:t=>t,info:t=>t,prefix:{success:n("#10b981","\u2714")+" "+g("#064e3b",n("#34d399",o(" SUCCESS "))),error:n("#ef4444","\u2716")+" "+g("#7f1d1d",n("#f87171",o(" ERROR "))),warn:n("#f59e0b","\u26A0")+" "+g("#78350f",n("#fbbf24",o(" WARNING "))),info:n("#0ea5e9","\u2139")+" "+g("#0c4a6e",n("#38bdf8",o(" INFO ")))}};var B={success:console.log,error:console.error,warn:console.warn,info:console.info},c=class{theme;timestamps;colors;transport;constructor(s={}){this.theme={...a,...s.theme,prefix:{...a.prefix,...s.theme?.prefix}},this.timestamps=s.timestamps??false,this.colors=s.colors??true,this.transport={...B,...s.transport};}getTimestamp(){if(!this.timestamps)return "";let r=new Date().toISOString().split("T")[1]?.split(".")[0];return m(`[${r}] `)}highlightJson(s){return this.colors?s.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,r=>/^"/.test(r)?/:$/.test(r)?n("#9ca3af",r.slice(0,-1))+":":n("#34d399",r):/true|false/.test(r)?n("#c084fc",r):/null/.test(r)?n("#f87171",r):n("#fbbf24",r)):s}formatMessage(s){return s.map(r=>{if(typeof r=="string")return r;try{let i=JSON.stringify(r,null,2);return `
`+this.highlightJson(i)}catch{return "[Unserializable Object]"}}).join(" ")}stripAnsi(s){return s.replace(/\x1b\[[0-9;]*m/g,"")}output(s,r){let i=this.colors?r:this.stripAnsi(r);this.transport[s](i);}success(...s){let r=this.formatMessage(s);this.output("success",`${this.getTimestamp()}${this.theme.prefix.success} ${this.theme.success(r)}`);}error(...s){let r=this.formatMessage(s);this.output("error",`${this.getTimestamp()}${this.theme.prefix.error} ${this.theme.error(r)}`);}warn(...s){let r=this.formatMessage(s);this.output("warn",`${this.getTimestamp()}${this.theme.prefix.warn} ${this.theme.warn(r)}`);}info(...s){let r=this.formatMessage(s);this.output("info",`${this.getTimestamp()}${this.theme.prefix.info} ${this.theme.info(r)}`);}},F=t=>new c(t);exports.Logger=c;exports.ansi=l;exports.createLogger=F;exports.defaultTheme=a;

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

var l=Object.defineProperty;var x=(t,r)=>{for(var s in r)l(t,s,{get:r[s],enumerable:true});};var h={};x(h,{blue:()=>g,bold:()=>m,cyan:()=>d,dim:()=>b,format:()=>e,gray:()=>c,green:()=>o,isColorSupported:()=>u,italic:()=>$,magenta:()=>T,red:()=>n,reset:()=>w,underline:()=>y,white:()=>v,yellow:()=>i});var u=!process.env.NO_COLOR&&(process.env.FORCE_COLOR||process.stdout?.isTTY||process.env.TERM==="xterm-256color"),e=(t,r)=>u?`\x1B[${t}m${r}\x1B[0m`:r,w=t=>e(0,t),n=t=>e(31,t),o=t=>e(32,t),i=t=>e(33,t),g=t=>e(34,t),T=t=>e(35,t),d=t=>e(36,t),v=t=>e(37,t),c=t=>e(90,t),m=t=>e(1,t),b=t=>e(2,t),$=t=>e(3,t),y=t=>e(4,t);var p={success:t=>o(t),error:t=>n(m(t)),warn:t=>i(t),info:t=>g(t),prefix:{success:o("\u2714"),error:n("\u2716"),warn:i("\u26A0"),info:g("\u2139")}};var O={success:console.log,error:console.error,warn:console.warn,info:console.info},a=class{theme;timestamps;colors;transport;constructor(r={}){this.theme={...p,...r.theme,prefix:{...p.prefix,...r.theme?.prefix}},this.timestamps=r.timestamps??false,this.colors=r.colors??true,this.transport={...O,...r.transport};}getTimestamp(){if(!this.timestamps)return "";let s=new Date().toISOString().split("T")[1]?.split(".")[0];return c(`[${s}] `)}formatMessage(r){return r.map(s=>{if(typeof s=="string")return s;try{return JSON.stringify(s,null,2)}catch{return "[Unserializable Object]"}}).join(" ")}stripAnsi(r){return r.replace(/\x1b\[[0-9;]*m/g,"")}output(r,s){let f=this.colors?s:this.stripAnsi(s);this.transport[r](f);}success(...r){let s=this.formatMessage(r);this.output("success",`${this.getTimestamp()}${this.theme.prefix.success} ${this.theme.success(s)}`);}error(...r){let s=this.formatMessage(r);this.output("error",`${this.getTimestamp()}${this.theme.prefix.error} ${this.theme.error(s)}`);}warn(...r){let s=this.formatMessage(r);this.output("warn",`${this.getTimestamp()}${this.theme.prefix.warn} ${this.theme.warn(s)}`);}info(...r){let s=this.formatMessage(r);this.output("info",`${this.getTimestamp()}${this.theme.prefix.info} ${this.theme.info(s)}`);}},k=t=>new a(t);export{a as Logger,h as ansi,k as createLogger,p as defaultTheme};
var h=Object.defineProperty;var x=(t,s)=>{for(var r in s)h(t,r,{get:s[r],enumerable:true});};var l={};x(l,{bgBlack:()=>I,bgBlue:()=>M,bgCyan:()=>E,bgGreen:()=>R,bgHex:()=>g,bgMagenta:()=>S,bgRed:()=>L,bgWhite:()=>N,bgYellow:()=>C,black:()=>d,blue:()=>v,bold:()=>o,cyan:()=>k,dim:()=>j,format:()=>e,gray:()=>m,green:()=>T,hex:()=>n,inverse:()=>z,isColorSupported:()=>p,italic:()=>A,magenta:()=>O,red:()=>w,reset:()=>b,underline:()=>J,white:()=>y,yellow:()=>$});var p=!process.env.NO_COLOR&&(process.env.FORCE_COLOR||process.stdout?.isTTY||process.env.TERM==="xterm-256color"),e=(t,s)=>p?`\x1B[${t}m${s}\x1B[0m`:s,b=t=>e(0,t),d=t=>e(30,t),w=t=>e(31,t),T=t=>e(32,t),$=t=>e(33,t),v=t=>e(34,t),O=t=>e(35,t),k=t=>e(36,t),y=t=>e(37,t),m=t=>e(90,t),I=t=>e(40,t),L=t=>e(41,t),R=t=>e(42,t),C=t=>e(43,t),M=t=>e(44,t),S=t=>e(45,t),E=t=>e(46,t),N=t=>e(47,t),o=t=>e(1,t),j=t=>e(2,t),A=t=>e(3,t),J=t=>e(4,t),z=t=>e(7,t),n=(t,s)=>{if(!p)return s;let r=t.replace(/^#/,"");if(r.length!==6)return s;let i=parseInt(r.substring(0,2),16),u=parseInt(r.substring(2,4),16),f=parseInt(r.substring(4,6),16);return `\x1B[38;2;${i};${u};${f}m${s}\x1B[0m`},g=(t,s)=>{if(!p)return s;let r=t.replace(/^#/,"");if(r.length!==6)return s;let i=parseInt(r.substring(0,2),16),u=parseInt(r.substring(2,4),16),f=parseInt(r.substring(4,6),16);return `\x1B[48;2;${i};${u};${f}m${s}\x1B[0m`};var a={success:t=>t,error:t=>t,warn:t=>t,info:t=>t,prefix:{success:n("#10b981","\u2714")+" "+g("#064e3b",n("#34d399",o(" SUCCESS "))),error:n("#ef4444","\u2716")+" "+g("#7f1d1d",n("#f87171",o(" ERROR "))),warn:n("#f59e0b","\u26A0")+" "+g("#78350f",n("#fbbf24",o(" WARNING "))),info:n("#0ea5e9","\u2139")+" "+g("#0c4a6e",n("#38bdf8",o(" INFO ")))}};var B={success:console.log,error:console.error,warn:console.warn,info:console.info},c=class{theme;timestamps;colors;transport;constructor(s={}){this.theme={...a,...s.theme,prefix:{...a.prefix,...s.theme?.prefix}},this.timestamps=s.timestamps??false,this.colors=s.colors??true,this.transport={...B,...s.transport};}getTimestamp(){if(!this.timestamps)return "";let r=new Date().toISOString().split("T")[1]?.split(".")[0];return m(`[${r}] `)}highlightJson(s){return this.colors?s.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,r=>/^"/.test(r)?/:$/.test(r)?n("#9ca3af",r.slice(0,-1))+":":n("#34d399",r):/true|false/.test(r)?n("#c084fc",r):/null/.test(r)?n("#f87171",r):n("#fbbf24",r)):s}formatMessage(s){return s.map(r=>{if(typeof r=="string")return r;try{let i=JSON.stringify(r,null,2);return `
`+this.highlightJson(i)}catch{return "[Unserializable Object]"}}).join(" ")}stripAnsi(s){return s.replace(/\x1b\[[0-9;]*m/g,"")}output(s,r){let i=this.colors?r:this.stripAnsi(r);this.transport[s](i);}success(...s){let r=this.formatMessage(s);this.output("success",`${this.getTimestamp()}${this.theme.prefix.success} ${this.theme.success(r)}`);}error(...s){let r=this.formatMessage(s);this.output("error",`${this.getTimestamp()}${this.theme.prefix.error} ${this.theme.error(r)}`);}warn(...s){let r=this.formatMessage(s);this.output("warn",`${this.getTimestamp()}${this.theme.prefix.warn} ${this.theme.warn(r)}`);}info(...s){let r=this.formatMessage(s);this.output("info",`${this.getTimestamp()}${this.theme.prefix.info} ${this.theme.info(r)}`);}},F=t=>new c(t);export{c as Logger,l as ansi,F as createLogger,a as defaultTheme};
{
"name": "devink",
"version": "1.0.1",
"version": "1.0.2",
"description": "Fast, lightweight, professional logger built with TypeScript. No dependencies.",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

<h1 align="center">
<br>
<br>
<img width="320" src="media/Devink.png" alt="devink">
<img width="320" src="https://raw.githubusercontent.com/harrymate22/devink/main/media/logo.png" alt="devink">
<br>

@@ -17,2 +17,4 @@ <br>

![](https://raw.githubusercontent.com/harrymate22/devink/main/media/demo.png)
**Devink** is a production-grade, zero-dependency Node.js logging library featuring custom transports, graceful JSON serialization, a deep-merging theme system, and automatic ANSI color detection.

@@ -19,0 +21,0 @@