# cds-client

> Custom Domain Service Client

Latest version **1.1.2** (published 2021-11-03) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install cds-client
pnpm add cds-client
yarn add cds-client
bun add cds-client
```

Provides the command `cds`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2021-11-03 |
| First published | 2019-06-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | Olivier Pichon |
| Maintainers | everydayhero |

## Links

- npm: https://www.npmjs.com/package/cds-client
- npm.io page: https://npm.io/package/cds-client

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.19.0

## Recent versions

- 1.1.2 (latest) — 2021-11-03
- 1.1.1 — 2020-08-03
- 1.1.0 — 2020-08-03
- 1.0.1 — 2019-06-11
- 1.0.0 — 2019-06-05

## README

## Custom Domain Service Client

Small Client Library for Custom Domain Service. Allows to refresh a custom domain website (ie invalidate the CDN) or get a website details.

You can achieve this via JS:

```javascript
  const client = new CDSClient(YOUR_TOKEN_HERE)
  client.refreshSite(domain_name).then(data => console.log(data))
  client.getSite(domain_name).then(data => console.log(data))
```

Or via the CLI: 

```
  cds refresh-site domain.com
  cds get-site domain.com
```

Please note that you would need to set the `CDS_API_TOKEN` environment variable for the CLI to work.

---
_Source: https://npm.io/package/cds-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
