
Security News
AI Has Taken Over Open Source
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain
@existdb/node-exist
Advanced tools
Mostly a shallow wrapper for eXist's XML-RPC API. Attempts to translate terminologies into node world. Uses promises.
This software is safe for development but should not be used to alter a production database instance! Think twice before your data is lost.
This package will switch to use eXist-db's REST-API.
Use at your own risk.
npm install @existdb/node-exist
Creating, reading and removing a collection:
const exist = require('@existdb/node-exist')
const db = exist.connect()
db.collections.create('/db/apps/test')
.then(result => db.collections.describe('/db/apps/test'))
.then(result => console.log('collection description:', result))
.catch(e => console.error('fail', e))
Uploading an XML file into the database
const exist = require('@existdb/node-exist')
const db = exist.connect()
db.documents.upload(Buffer.from('<root/>'))
.then(fileHandle => db.documents.parseLocal(fileHandle, '/db/apps/test/file.xml', {}))
.then(result => db.documents.read('/db/apps/test/file.xml'))
.then(result => console.log('test file contents', result))
.catch(e => console.error('fail', e))
The methods are grouped into components by what they operate on. Every method returns a promise.
Status: working
db.queries.execute(query, options)
db.queries.read(query, options)
This convenience function calls queries.count then retrieves all result pages and returns them in an array.
db.queries.readAll(query, options)
Example:
db.queries.readAll('xquery version "3.1"; xmldb:get-child-collections("/db/apps") => string-join(",\n")', {})
.then(result => console.log(
Buffer.concat(result.pages).toString()))
.catch(e => console.error(e))
db.queries.count(resultHandle)
db.queries.retrieveResult(resultHandle, page)
db.queries.retrieveAll(resultHandle)
free result on server
db.queries.releaseResult(resultHandle)
A document can be seen as a file. It might be indexed if it's type is not binary.
Resolves into a file handle which can then be used by db.documents.parseLocal.
db.documents.upload(Buffer.from('test'))
db.documents.parseLocal(fileHandle, 'foo/test.txt', {})
db.documents.read('foo.xml')
db.documents.remove('foo.xml')
Status: working
A resource is identified by its path in the database. Documents and collections are resources.
db.resources.describe(resourcePath)
db.resources.setPermissions(resourcePath, 400)
db.resources.getPermissions(resourcePath)
Status: working
db.collections.create(collectionPath)
db.collections.remove(collectionPath)
db.collections.describe(collectionPath)
db.collections.read(collectionPath)
Status: Experimental
db.app.upload(xarBuffer, xarName)
db.app.install(xarName)
db.app.remove(xarName)
Status: TODO
Status: failing
db.users.byName(username)
db.users.list()
Status: working
db.server.syncToDisk()
db.server.shutdown()
Note: There is no way to bring it up again.
All tests are in spec/tests and written for tape
npm test
FAQs
promise based interaction with eXist DB's XML-RPC API
The npm package @existdb/node-exist receives a total of 663 weekly downloads. As such, @existdb/node-exist popularity was classified as not popular.
We found that @existdb/node-exist 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.

Security News
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain

Security News
npm invalidated all granular access tokens that bypass 2FA after a fresh Mini Shai-Hulud wave compromised 323 npm packages. Staged publishing also entered public preview.

Research
/Security News
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.