@existdb/node-exist
Advanced tools
@@ -19,2 +19,6 @@ const { getMimeType } = require('./util') | ||
| function readBinary (client, documentName) { | ||
| return client.promisedMethodCall('getBinaryResource', [documentName]) | ||
| } | ||
| function remove (client, documentName) { | ||
@@ -28,3 +32,4 @@ return client.promisedMethodCall('remove', [documentName]) | ||
| read, | ||
| readBinary, | ||
| remove | ||
| } |
+1
-1
@@ -55,3 +55,3 @@ { | ||
| }, | ||
| "version": "5.2.1" | ||
| "version": "5.3.0" | ||
| } |
+29
-1
@@ -299,6 +299,34 @@ # node-exist | ||
| Reads resources stored as XML (`XMLResource`). You can control how they are | ||
| serialized by setting | ||
| [serialization options](https://exist-db.org/exist/apps/doc/xquery.xml?field=all&id=D3.49.19#serialization) | ||
| in the options parameter. | ||
| Use default serialization options. | ||
| ```js | ||
| db.documents.read('foo.xml') | ||
| db.documents.read('foo.xml', {}) | ||
| ``` | ||
| Force XML declaration to be returned. | ||
| ```js | ||
| db.documents.read('foo.xml', { "omit-xml-declaration": "no" }) | ||
| ``` | ||
| Force the file to end in a blank line (available since eXist-db v6.0.1). | ||
| ```js | ||
| db.documents.read('foo.xml', { "insert-final-newline": "yes" }) | ||
| ``` | ||
| #### readBinary | ||
| Reads resources stored as binary (`BinaryResource`) inside existdb such as XQuery, | ||
| textfiles, PDFs, CSS, images and the like. | ||
| ```js | ||
| db.documents.readBinary('foo.xml') | ||
| ``` | ||
| #### remove | ||
@@ -305,0 +333,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
47141
1.86%789
0.51%638
4.59%