
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
implements the Mongo wire protocol and adapts queries to use Postgres jsonb.
Replace MongoDB with PosgreSQL
This implements the MongoDB wire protocol and adapts queries to work with a PostgreSQL database using jsonb fields. I've tested it with Keystone.js and it seemed to work reasonably well.
pgmongo requires node 8 or newer and Postgres 9.4+. Then run the following.
npm install -g pgmongo
pgmongo
This will start a mongo-like server on port 27017. If you already have mongo running on your machine you can start it on a different port with the following.
pgmongo localhost 27018
It's not production ready yet, but definitely working enough to play around with or use in basic apps.
Currently passes 190 of the 916 core mongo jstests.
db.createCollection('users') -> CREATE TABLE IF NOT EXISTS "users" (data jsonb)
db.users.find({ lastLogin: { $lte: '2016' } }) -> SELECT data FROM "users" WHERE data->>'lastLogin'<='2016'
db.users.update({}, { $set: { active: true } }) -> UPDATE "users" SET data = jsonb_set(data,'{active}','true'::jsonb)
db.users.find({}, { firstName: 1 } ) -> SELECT jsonb_build_object('firstName', data->'firstName', '_id', data->'_id') as data FROM "users"
db.blogs.insert({ title: 'first post', comments: [] }) -> INSERT INTO "blogs" VALUES ('{"_id":"5b45b641eb4bd93896d57888","title":"first post","comments":[]}'::jsonb)
db.blogs.remove({ 'state.trash': true }) -> DELETE FROM "blogs" WHERE data->'state'->'trash'='true'::jsonb
Note: contributions/PRs are very much welcome.
Anyone can help make this project better. Feel free to open an issue to discuss what you want to work on.
FAQs
implements the Mongo wire protocol and adapts queries to use Postgres jsonb.
The npm package pgmongo receives a total of 0 weekly downloads. As such, pgmongo popularity was classified as not popular.
We found that pgmongo 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.