
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.
query-manager
Advanced tools
npm install query-manager
Run tests typing in terminal:
npm run test
or run code coverage typing:
npm run coverage
Put query identifier between @ signs.
--@users.getAll@
SELECT * FROM users;
-- @ users.getAllActive @
SELECT *
FROM users
WHERE active = 1
;
-- @users.getBanned @
-- Some other comment here
-- another comment
SELECT *
FROM users
WHERE banned = 1
;
/* This is very important comment here! */
/* @ users.getLastLogin @ */
SELECT last_login
FROM users
WHERE user_id = 234
;
/*
This query returns user profile.
@users.getUserProfile@
*/
SELECT *
FROM profiles
WHERE id = {user_id}
;
/*
-- @ users.getFields @
*/
SELECT {field1}, {field2}
FROM users
WHERE email='{email_value}'
;
npm install
node example.js
var { QueryManager } = require('./../index.js');
var readFile = require('read-file');
var sqlTemplates = [
'./file1.sql',
'./file2.sql'
].map(function (filePath) {
return readFile.sync(filePath, { encoding: 'utf8' });
});
var qm = new QueryManager(sqlTemplates);
console.log(qm.get('users.getAll')); // SELECT * FROM users;
console.log(qm.get('users.getLastLogin')); // SELECT last_login FROM users WHERE user_id = 234;
var userProfileOptions = {
user_id: 345
};
console.log(qm.get('users.getUserProfile', userProfileOptions)); // SELECT * FROM profiles WHERE id = 345;
var userFieldsOptions = {
field1: 'username',
field2: 'email',
email_value: 'john.doe@mail.com'
};
console.log(qm.get('users.getFields', userFieldsOptions)); // SELECT username, email FROM users WHERE email='john.doe@mail.com';
MIT
FAQs
Server side sql scripts management.
We found that query-manager 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.

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.