
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ts-firebird
Advanced tools
A TypeScript wrapper for node-firebird with Promise support and connection pool monitoring.
rollbackAllTransactions()npm install ts-firebird
import { FirebirdDatabase } from 'ts-firebird';
const db = new FirebirdDatabase();
await db.attach({
host: 'localhost',
port: 3050,
database: '/path/to/database.fdb',
user: 'SYSDBA',
password: 'masterkey'
});
// Execute query
const result = await db.query('SELECT * FROM USERS WHERE ID = ?', [1]);
// With transaction
const tx = await db.transaction();
await tx.execute('UPDATE USERS SET NAME = ? WHERE ID = ?', ['John', 1]);
await tx.commit();
db.detach();
import { FirebirdPool } from 'ts-firebird';
const pool = new FirebirdPool(5, {
host: 'localhost',
port: 3050,
database: '/path/to/database.fdb',
user: 'SYSDBA',
password: 'masterkey'
});
// Get database from pool
const db = await pool.getDatabase();
const tx = await db.transaction();
await tx.query('SELECT * FROM USERS', []);
await tx.commit(true); // auto detach
// Get statistics
console.log('Active transactions:', pool.getActiveTransactionsCount());
console.log('Active connections:', pool.getActiveConnectionsCount());
console.log('Available connections:', pool.getAvailableConnectionsCount());
console.log('Max connections:', pool.getMaxConnections());
// Cleanup hanging transactions
await pool.rollbackAllTransactions();
pool.destroy();
new FirebirdPool(max: number, options: Options)
getDatabase(): Promise<FirebirdDatabase> - Get database connection from poolgetTransaction(isolation?: Isolation): Promise<FirebirdTransaction> - Get transaction directlygetActiveTransactionsCount(): number - Number of uncommitted transactionsgetActiveConnectionsCount(): number - Number of active connectionsgetAvailableConnectionsCount(): number - Number of available connection slotsgetMaxConnections(): number - Maximum pool sizegetActiveTransactions(): FirebirdTransaction[] - List of active transactionsrollbackAllTransactions(): Promise<void> - Rollback all hanging transactionsdestroy(): void - Destroy pool and close all connectionsattach(options: Options): Promise<FirebirdDatabase>create(options: Options): Promise<FirebirdDatabase>attachOrCreate(options: Options): Promise<FirebirdDatabase>query(query: string, params: any[], detach?: boolean): Promise<any[]>execute(query: string, params: any[], detach?: boolean): Promise<any[]>transaction(isolation?: Isolation): Promise<FirebirdTransaction>detach(): voidquery(query: string, params: any[], autoCommit?: boolean): Promise<any[]>execute(query: string, params: any[], autoCommit?: boolean): Promise<any[]>commit(detach?: boolean): Promise<void>rollback(detach?: boolean): Promise<void>detach(): voidOne of the key features is the ability to monitor and cleanup hanging transactions:
const pool = new FirebirdPool(5, options);
// Check for hanging transactions
setInterval(() => {
const activeCount = pool.getActiveTransactionsCount();
const activeConns = pool.getActiveConnectionsCount();
if (activeCount > 0) {
console.warn(`Warning: ${activeCount} uncommitted transactions!`);
console.warn(`Active connections: ${activeConns}/${pool.getMaxConnections()}`);
// Optionally rollback all
// await pool.rollbackAllTransactions();
}
}, 60000); // Check every minute
import {
ISOLATION_READ_UNCOMMITTED,
ISOLATION_READ_COMMITTED,
ISOLATION_REPEATABLE_READ,
ISOLATION_SERIALIZABLE
} from 'ts-firebird';
const tx = await db.transaction(ISOLATION_READ_COMMITTED);
npm test
MIT
Built on top of node-firebird
FAQs
Promisify node-firebird
We found that ts-firebird demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.