
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
The MarkLogic Node.js Client API provides access to the MarkLogic database from Node.js applications.
You can install the marklogic package as a dependency for your Node.js project using npm:
npm install marklogic --save
For Windows OS please use the below for Node Client 2.9.1:
npm install marklogic --save --ignore-scripts
With the marklogic package installed, the following inserts two documents in a collection into the Documents database using MarkLogic's built-in REST server at port 8000:
const marklogic = require('marklogic');
const db = marklogic.createDatabaseClient({
host: 'localhost',
port: '8000',
database: 'Documents',
user: 'admin',
password: 'admin',
authType: 'DIGEST',
// enableGzippedResponses is optional and can be set to true in order to request MarkLogic to compress the response for better performance,
// the client will automatically decompress the response before it returns a value.
enableGzippedResponses: true
});
// For MarkLogic Cloud
const db = marklogic.createDatabaseClient({
apiKey: 'changeme',
host: 'example.beta.marklogic.com',
authType: 'cloud',
// basePath is optional.
basePath: '/marklogic/test',
// accessTokenDuration (in seconds) is optional and can be used to customize the expiration of the access token.
accessTokenDuration: 10,
// enableGzippedResponses is optional and can be set to true in order to request MarkLogic to compress the response for better performance,
// the client will automatically decompress the response before it returns a value.
enableGzippedResponses: true
});
// For OAUTH
const db = marklogic.createDatabaseClient({
host: 'localhost',
port: '8000',
authType: 'oauth',
oauthToken: '<OAUTH Token>'
});
db.createCollection(
'/books',
{author: 'Beryl Markham', ...},
{author: 'WG Sebald', ...}
)
.result(function(response) {
console.log(JSON.stringify(response, null, 2));
}, function (error) {
console.log(JSON.stringify(error, null, 2));
});
The Node.js Client API ships with code examples to supplement the examples in the online resources. To run the examples, follow the instructions here:
examples/1readme.txt
After installing the project dependencies (including the gulp build system), you can build the reference documentation locally from the root directory of the marklogic package:
npm run doc
The documentation is generated in a doc subdirectory. The documentation can also be accessed online here.
The MarkLogic Node.js Client API is maintained by MarkLogic Engineering. It is designed for use in production applications with MarkLogic Server. Everyone is encouraged to file bug reports, feature requests, and pull requests through GitHub. This input is critical and will be carefully considered, but we can’t promise a specific resolution or timeframe for any request. In addition, MarkLogic provides technical support for release tags of the Node.js Client API to licensed customers under the terms outlined in the Support Handbook. For more information or to sign up for support, visit help.marklogic.com.
3.7.0
base64Encode
and base64Decode
functions in the new lib/vector-util.js library.
Encoding vectors before writing them to documents in MarkLogic 12 helps reduce the amount of disk space and memory consumed by vectors.minVersion
and maxVersion
to change default TLS version from 1.3 to a different version.https://github.com/marklogic/node-client-api/issues/917
Fix for security vulnerabilities - https://github.com/advisories/GHSA-fjxv-7rqg-78g4 https://github.com/advisories/GHSA-8cj5-5rvv-wf4v https://github.com/advisories/GHSA-c2qf-rxjj-qqgw https://github.com/advisories/GHSA-3XGQ-45JJ-V275
FAQs
The official MarkLogic Node.js client API.
The npm package marklogic receives a total of 286 weekly downloads. As such, marklogic popularity was classified as not popular.
We found that marklogic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
/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.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.