
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@pubsweet/db-manager
Advanced tools
Provides database management utilities to Pubsweet apps.
This package exports the following functions:
setupDb
addUser
dbExists
migrate
setupDb
This function
config/local-<NODE_ENV>.json
under pubsweet-server.secret
.It can be called without arguments, in which case it will take its configuration from the following config keys:
{
'pubsweet-server': {
db: {
// takes the same configuration options as https://node-postgres.com/features/connecting#programmatic
}
},
dbManager: {
username: 'xxxxxx',
password: 'pppppp',
email: 'email@example.com',
clobber: false // overwrite existing db (optional)
}
}
Alternatively it can be passed the dbManager
object as an argument, which will override the values on config.
The name of the database will be the full dbPath
.
addUser
This function adds a user to an already existing database. It requires a user object as argument:
addUser({
username: 'xxxxxx',
password: 'pppppp',
email: 'email@example.com',
admin: true, // (optional)
})
dbExists
This function checks if any database exists at the configured path. Returns true
or false
migrate
This function performs pending migrations.
FAQs
Provides database management utilities to Pubsweet apps.
The npm package @pubsweet/db-manager receives a total of 63 weekly downloads. As such, @pubsweet/db-manager popularity was classified as not popular.
We found that @pubsweet/db-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.