
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
plus.garden.fixtures-mongo
Advanced tools
mongo fixtures loader for plus.garden
this module uses https://github.com/powmedia/pow-mongodb-fixtures
Install npm package
npm i plus.garden.fixtures-mongo --save
Add service to garden container
container.register('MongoFixtureLoaderModule', require('plus.garden.fixtures-mongo'));
Add config section to garden config
"fixtures-mongo": {
"uri": "mongodb://user:password@localhost:27017/dbname",
"fixtures": "fixtures/mongo"
}
Create directory for storing fixtures
mkdir -p fixtures/mongo
Creating fixtures files:
FOR EXAMPLE: With the file below, 3 documents will be inserted into the 'users' collection and 2 into the 'businesses' collection:
//fixtures.js
exports.users = [
{ name: 'Gob' },
{ name: 'Buster' },
{ name: 'Steve Holt' }
];
exports.businesses = [
{ name: 'The Banana Stand' },
{ name: 'Bluth Homes' }
];
You can also load fixtures as an object where each document is keyed, in case you want to reference another document. This example uses the included createObjectId
helper:
Note: install pow-mongodb-fixtures in project npm install pow-mongodb-fixtures --save
to use createObjectId
helper
//users.js
var id = require('pow-mongodb-fixtures').createObjectId;
var users = exports.users = {
user1: {
_id: id(),
name: 'Michael'
},
user2: {
_id: id(),
name: 'George Michael',
father: users.user1._id
},
user3: {
_id: id('4ed2b809d7446b9a0e000014'),
name: 'Tobias'
}
}
commands:
./garden.js fixtures.load
./garden.js fixtures.drop
fixture.load
runs fixtures.drop
automatically
FAQs
mongo fixtures loader for plus.garden
The npm package plus.garden.fixtures-mongo receives a total of 0 weekly downloads. As such, plus.garden.fixtures-mongo popularity was classified as not popular.
We found that plus.garden.fixtures-mongo 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.