Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
datocms-client
Advanced tools
CLI tool for DatoCMS.
Please head over our documentation to learn everything you need:
This package also exposes an API client, useful ie. to import existing content in your DatoCMS administrative area. Read our documentation for detailed info.
After checking out the repo, run npm install
and bundle install
to install dependencies. Then, run npm test
to run the tests.
The DatoCMS API provides an always up-to-date JSON Hyperschema: the code of this package is generated automatically starting from the schema running rake regenerate
.
Bug reports and pull requests are welcome on GitHub at https://github.com/datocms/js-datocms-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The package is available as open source under the terms of the MIT License.
0.5.4
The big change is that the methods the client makes available are generated at runtime based on the JSON Schema of our CMA. This means any new API endpoint — or changes to existing ones — will instantly be reflected to the client, without the need to upgrade to the latest client version.
We also added a new deserializeResponse
option to every call, that you can use if you want to retrieve the exact payload the DatoCMS returns:
import { SiteClient } from 'datocms-client';
const client = new SiteClient('YOUR-API-KEY');
// `deserializeResponse` is true by default:
const accessToken = client.accessTokens.create({
name: 'New token',
role: '34',
});
// {
// id: "312",
// hardcodedType: null,
// name: "New token",
// token: "XXXX",
// role: "34"
// }
// if `deserializeResponse` is false, this will be the result
const accessToken = client.accessTokens.create(
{ name: 'New token', role: '34' },
{ deserializeResponse: false },
);
// {
// data: {
// type: "access_token",
// id: "312",
// attributes: {
// name: "New token",
// token: "XXXX",
// hardcoded_type: nil
// },
// relationships: {
// role: {
// data: {
// type: "role",
// id: "34"
// }
// }
// }
// }
// }
In our doc pages we also added some examples for the super-handy allPages
option which was already present since v0.3.29:
// if you want to fetch all the pages with just one call:
client.items.all({ "filter[type]" => "44" }, { allPages: true })
FAQs
For new DatoCMS users, we recommend @datocms/cma-client-node
The npm package datocms-client receives a total of 9,172 weekly downloads. As such, datocms-client popularity was classified as popular.
We found that datocms-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.