
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
sails-hook-thinky-multi-db
Advanced tools
A hook to enable the Thinky ORM for RethinkDB in Sails, with multi database support. Can be configured alongside or as a replacement for Waterline.js.
A hook to enable the Thinky ORM for RethinkDB in Sails, with multi database support.
Using this in Production would be unwise. It has been lightly tested. Develop at your own risk.
The hook configures the thinky orm and expsoses the connection instance to the global connection
. All model files in the /api/thinky
directory will be loaded automatically and exposed in the sails.thinkymodels
propery and optionally to the global namespace.
Make model calls from any service, controller, policy, etc. just as you would normally. No need to require thinky or any model files.
Post.getJoin().then(function(posts) {
console.log(posts);
});
var type = connection_one.type;
module.exports = {
tableName: "Car", // optional, will use name of file if not present
connection: "connection_one", // can be any name
schema: {
id: type.string(),
type: type.string(),
year: type.string(),
idOwner: type.string()
},
options: {},
// set up any relationships, indexes or function definitions here
init: function(model) {
model.belongsTo(Person, "owner", "idOwner", "id");
model.ensureIndex("type");
model.define("isDomestic", function() {
return this.type === 'Ford' || this.type === 'GM';
});
}
};
*Also see examples
directory for sample model files.
Create a new directory /api/thinky
. This will be where your thinky models files will be auto-loaded by the hook.
Create a new configuration file thinky.js
in the config directory.
/**
* Thinky config
* (sails.config.thinky)
*
*/
module.exports.thinky = {
connection_one: {
host: "localhost",
port: 28015,
authKey: "",
db: "test"
},
connection_two: {
host: "localhost",
port: 28015,
authKey: "",
db: "other_db"
},
};
Optional: edit the .sailsrc file to disable Waterline to prevent any conflicts. (pubsub and blueprints will also need to be disabled due to dependencies on Waterline)
{
"generators": {
"modules": {}
},
"hooks": {
"orm": false,
"pubsub": false,
"blueprints": false
}
}
FAQs
A hook to enable the Thinky ORM for RethinkDB in Sails, with multi database support. Can be configured alongside or as a replacement for Waterline.js.
We found that sails-hook-thinky-multi-db 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.