
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.
@kickstartds/cambria
Advanced tools
Cambria is a Javascript/Typescript library for converting JSON data between related schemas.
Cambria is a Javascript/Typescript library for converting JSON data between related schemas.
You specify (in YAML or JSON) a lens, which specifies a data transformation. Cambria lets you use this lens to convert:
Lenses are bidirectional. Once you've converted a document from schema A to schema B, you can edit the document in schema B and propagate those edits backwards through the same lens to schema A.
For more background on why Cambria exists and what it can do, see the research essay.
⚠ Cambria is still immature software, and isn't yet ready for production use
Cambria is mostly intended to be used as a Typescript / Javascript library. Here's a simple example of converting an entire document.
// read doc from stdin if no input specified
const input = readFileSync(program.input || 0, 'utf-8')
const doc = JSON.parse(input)
// we can (optionally) apply the contents of the changed document to a target document
const targetDoc = program.base ? JSON.parse(readFileSync(program.base, 'utf-8')) : {}
// now load a (yaml) lens definition
const lensData = readFileSync(program.lens, 'utf-8')
let lens = loadYamlLens(lensData)
// should we reverse this lens?
if (program.reverse) {
lens = reverseLens(lens)
}
// finally, apply the lens to the document, with the schema, onto the target document!
const newDoc = applyLensToDoc(lens, doc, program.schema, targetDoc)
console.log(JSON.stringify(newDoc, null, 4))
If you're using npm, run npm install cambria
. If you're using yarn, run yarn add cambria
. Then you can import it with require('cambria')
as in the examples (or import * as Cambria from 'cambria'
if using ES2015 or TypeScript).
npm run test
FAQs
Cambria is a Javascript/Typescript library for converting JSON data between related schemas.
We found that @kickstartds/cambria demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.