
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@chcaa/json-db
Advanced tools
The core module of **json-db** that can be used independently of the **[json-db Editor](https://json-db.chc.au.dk)**.
The core module of json-db that can be used independently of the json-db Editor.
The module supports the following:
The json-db core module includes a set of CLI tools for exporting data and altering the database schema. All CLI tools can be executed using npx
.
Each CLI tool includes a -h
/ --help
command that prints all required and optional arguments and options.
Example
npx @chcaa/json-db@latest json-db export -h
To get a list of all available commands and global options run:
npx @chcaa/json-db@latest json-db -h
Export entries from the database in ndjson
format with the possibility of searching and populating relational entries.
Example - general usage
npx @chcaa/json-db@latest json-db export "/path/to/db/root-dir" "collectionName" "/dest/path/entries.ndjson" -q "query" -p "populateField1,populateField12"
Example - export "books" with "authors"
npx @chcaa/json-db@latest json-db export "/path/to/books-db books" "/desktop/books.ndjson" -p "authors"
Example - export "books" including files
npx @chcaa/json-db@latest json-db export "/path/to/books-db books" "/desktop/books" -f
Rename a collection and all references to the collection in the database schema.
Example - general usage
npx @chcaa/json-db@latest json-db rename-collection "/path/to/db/root-dir" "currentPluralName" "newPluralName" "newSingularName"
Example - rename the collection "books" to "works"
npx @chcaa/json-db@latest json-db rename-collection "/path/to/books-db" "books" "works" "work"
Rename a collection field and all references to the field both in the schema and in entries of the collection.
Example - general usage
npx @chcaa/json-db@latest json-db rename-collection-field "/path/to/db/root-dir" "collectionPluralName" "fieldPath" "newPropName" "newPropTitle"
Example - rename the "author" field in the "books" collection to "writers"
npx @chcaa/json-db@latest json-db rename-collection-field "/path/to/books-db" "books" "authors" "writers" "Writers"
Currently, the CLI tools do not support bulk updates on entries such as updating the property of all entries where a specific condition is met.
But jq
should is most cases be able to carry out the required task.
Install jq from https://jqlang.org/download/
E.g., to rename the genre of all books where the current genre is "classics" to "must-read" the following jq
expression can be used.
jq '.entries |= map(if .genre == "classics" then .genre = "must-read" else . end)' books.json > books-new.json
Verify that the content of the books-new.json
is correct and overwrite the current file (mv books-new.json books.json
).
Experiment with jq
at https://play.jqlang.org/.
FAQs
The core module of **json-db** that can be used independently of the **[json-db Editor](https://json-db.chc.au.dk)**.
We found that @chcaa/json-db demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.