Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
abstract-winston-transport
Advanced tools
An abstract test suite for winston inspired by abstract-blob-store
A set of mocha
-based tests for ensuring that a given Transport (written for winston >= 3
) is compatible with the expected APIs.
Inspired by https://github.com/maxogden/abstract-blob-store
test/your-transport.test.js
require('abstract-winston-transport')({
name: 'YourTransport',
Transport: require('../path/to/your/transport')
});
Sample usage from winston/test/transports/console.test.js
require('abstract-winston-transport')({
name: 'Console',
Transport: winston.transports.Console
});
If your custom TransportStream
requires more options on construction than a default TransportStream
they can be provided via the construct
option:
test/your-transport.test.js
require('abstract-winston-transport')({
name: 'YourTransport',
Transport: require('../path/to/your/transport'),
construct: {
anyRequired: 'value-for-transport',
anythingReally: 'depends-on-what-you-need'
}
//
// "construct" can also be a function that returns
// options if that's something you need
//
construct: function () {
return {
willBe: 'called-before'
every: 'test'
};
}
});
query
and stream
test suitesThere are additional suites for query
and stream
interfaces expected to be exposed on a winston
Transport (i.e. a TransportStream
). You can enable these by setting the options to true
:
test/your-transport.test.js
require('abstract-winston-transport')({
name: 'YourTransport',
Transport: require('../path/to/your/transport'),
query: true,
stream: true
});
0.5.1
info
messages to be emitted from logged
events.FAQs
An abstract test suite for winston inspired by abstract-blob-store
The npm package abstract-winston-transport receives a total of 1,190 weekly downloads. As such, abstract-winston-transport popularity was classified as popular.
We found that abstract-winston-transport 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.