
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
livetex-node-pg
Advanced tools
Multithreaded Postgres driver for Node-JS built with `libpq` and `libjemalloc`.
Multithreaded Postgres driver for Node-JS built with libpq and libjemalloc.
####Install via npm: npm install livetex-node-pg
var pg = require('livetex-node-pg');
pg.init(20, {
'user': 'postgres',
'dbname': 'postgres',
'hostaddr': '127.0.0.1',
'password': 'postgres'
});
pg.exec("SELECT 1 AS value", function(table) {
console.log('Result table:', table);
}, console.error);
pg.exec("SELECT 2 AS another_value", function(table) {
console.log('Result table:', table);
}, console.error);
You don't have to wait any connection ready events before calling exec or
any other method.
var pg = require('livetex-node-pg');
pg.init(20, {
'user': 'postgres',
'dbname': 'postgres',
'hostaddr': '127.0.0.1',
'password': 'postgres'
});
pg.exec("SELECT 1 AS value", function(table) {
console.log('Result table:', table);
}, console.error);
pg.destroy();
Nothing happen after destroy call.
var pg = require('livetex-node-pg');
var preparedQuery = "SELECT $word1 AS word1, $word2 AS word2";
pg.init(20, {
'user': 'postgres',
'dbname': 'postgres',
'hostaddr': '127.0.0.1',
'password': 'postgres'
});
pg.execPrepared(preparedQuery, {
'word1': 'hello',
'word2': 'world'
}, function(table) {
console.log('Result table:', table);
}, console.error);
pg.execPrepared(preparedQuery, {
'word1': 'bye',
'word2': 'bye'
}, function(table) {
console.log('Result table:', table);
}, console.error);
You can pass different params to one prepared query.
Object.<string, (number|string|boolean|null)> - Table result row definition.Array.<!pg.Row> - Definition of query result table.?function(pg.Table) - Definition of function type to handle query execution result. Function argument - query result table.?function(string, number=) - Definition of function type to handle errors. Function arguments are error message string and optional error code.?(number|string|boolean) - Definition of value types for insertion to prepared query.Object.<string, (!pg.PreparedValue|!Array.<!pg.PreparedValue>)> - Definition of data object for query preparation.stringEscapes strings in sql queries. For string escape we use dollar-quoting.
Arguments:
string Original string.Returns escaped string.
stringEscapes array of values. Array is casted to string of escaped elements divided by comma.
Arguments:
!Array.<!pg.PreparedValue> Array of values.Returns escaped strings divided by comma.
voidInitializes connections pool.
Arguments:
number Pool size - Count of pool connections.!Object Connection options. Options must be an object with keys specified in documentation.!pg.ErrorHandler= Connection error handler. console.error will be used by default.voidExecutes SQL-query.
Arguments:
string SQL-query string.!pg.ResultHandler Success result handler.!pg.ErrorHandler Execution error handler.voidExecutes prepared SQL-query.
Arguments:
string Prepared SQL-query string.!pg.PreparedParams Data object for query preparation.!pg.ResultHandler Success result handler.!pg.ErrorHandler Execution error handler.stringPrepares ready-to-use SQL-query.
Arguments:
string Prepared SQL-query string.!pg.PreparedParams Data object for query preparation.Returns ready-to-use SQL-query.
voidDestroys connection pool.
Modified BSD License
FAQs
Multithreaded Postgres driver for Node-JS built with `libpq` and `libjemalloc`.
We found that livetex-node-pg 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.