Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
node-directus-client
Advanced tools
A JavaScript client for the Directus API
This library is under active development. Breaking changes can occur at every patch.
This libraries abstracts the interaction with the Directus CMS API. It enables your Node.js app to request specific resources from a Directus instance.
To use the library, install it with npm:
npm install --save node-directus-client
Then require it in your application script:
const DirectusSDKClient = require('node-directus-client')
The module is a class, so you'll have to create a new instance of the client bound to the endpoint and access token of your Directus instance. This can either be a self-hosted Directus installation or a hosted Directus instance.
Self-hosted
const client = new DirectusSDKClient('apiKey-12345', {
baseURL: 'http://yoursite.com/api/'
});
Hosted
const client = new DirectusSDKClient('apiKey-12345', {
instanceKey: 'instance_key'
});
Every method (see below) is asynchronous and can be used with callbacks as well as promises.
client.getTables()
.then((res) => {
console.log(res);
});
client.getTables(function(err, res) {
console.log(res);
});
The options object will be converted to query params in the api request. Check the official Directus API endpoints docs for all available options.
client.getTables([_obj_ options, _fn_ callback])
Get all available tables.
client.getColumns(_string_ table, [_obj_ options, _fn_ callback])
Get all columns from a single table.
client.getEntry(_string_ table, _int_ id, [_obj_ options, _fn_ callback])
Get a single item from a table
client.getEntries(_string_ table, [_obj_ options, _fn_ callback])
Get multiple items from a table
client.getUser(_int_ id, [_obj_ options, _fn_ callback])
Get a single user
client.getUsers([_obj_ options, _fn_ callback])
Get all users
More methods will be added over time, including methods to update and post entries
FAQs
This package is no longer supported and has been deprecated. To avoid malicious use, npm is hanging on to the package name.
We found that node-directus-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.