Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@dash4/log
Advanced tools
The following documentation is just relevant for dash4 plugin development. For informations on how to use Dash4 please read this: Dash4 documentation
npm i -D @dash4/log
import { log, info, success, error, warn, spinner } from '@dash4/log';
log('terminal', 'place text here');
info('readme', 'place text here');
success('npm-scripts', 'place text here');
error('dependencies', 'place text here');
warn('ui', 'place text here');
const spin = spinner('terminal', 'load config');
spin.start();
await wait(1000);
spin.type('warn');
spin.text('needs longer than usual');
await wait(1000);
spin.succeed('config loaded');
types
type TPackageName = 'server' | 'terminal-emulator' | 'cli' | string;
type TMessage = string | number | object | any[];
type TType = 'log' | 'info' | 'success' | 'error' | 'warn';
export const log = (packageName: TPackageName, message: TMessage) => void;
export const info = (packageName: TPackageName, message: TMessage) => void;
export const success = (packageName: TPackageName, message: TMessage) => void;
export const error = (packageName: TPackageName, message: TMessage) => void;
export const warn = (packageName: TPackageName, message: TMessage) => void;
export function spinner(packageName: TPackageName, message: TMessage, type?: TType): {
start(): void;
succeed(_message: string): void;
fail(_message: string): void;
warn(_message: string): void;
info(_message: string): void;
text(_message: string): void;
type(_message: string): void;
stop(): void;
stopAndPersist(): void;
clear: (): void;
isSpinning: boolean;
indent: number;
}
import { log, info, success, error, warn } from '@dash4/log/build/browser';
log('terminal', 'place some text here');
info('readme', 'place some text here');
success('npm-scripts', 'place some text here');
error('dependencies', 'place some text here');
warn('ui', 'place some text here');
types
export type TPackageName = 'client' | 'react-xterm' | 'ui' | string;
export type TMessage = string | number | object | any[];
export const log = (packageName: TPackageName, message: TMessage, ...args: TMessage[]) => void;
export const info = (packageName: TPackageName, message: TMessage, ...args: TMessage[]) => void;
export const success = (packageName: TPackageName, message: TMessage, ...args: TMessage[]) => void;
export const error = (packageName: TPackageName, message: TMessage, ...args: TMessage[]) => void;
export const warn = (packageName: TPackageName, message: TMessage, ...args: TMessage[]) => void;
The @dash4/log is MIT licensed
FAQs
dash4 log helper
The npm package @dash4/log receives a total of 28 weekly downloads. As such, @dash4/log popularity was classified as not popular.
We found that @dash4/log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.