# @eclipse-che/devworkspace-client

> The DevWorkspace Client is a library for interacting with DevWorkspaces and related objects on your cluster. It's node side library that wraps [@kubernetes/client-node](https://www.npmjs.com/package/@kubernetes/client-node).

Latest version **0.0.1-1628264033** (published 2021-08-06) · EPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install @eclipse-che/devworkspace-client
pnpm add @eclipse-che/devworkspace-client
yarn add @eclipse-che/devworkspace-client
bun add @eclipse-che/devworkspace-client
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1-1628264033 |
| Published | 2021-08-06 |
| First published | 2021-02-23 |
| Weekly downloads | 0 |
| License | EPL-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 21.2 MB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | eclipse_che, ashumilova, florentbenoit, mkuznets, sleshche |

## Links

- npm: https://www.npmjs.com/package/@eclipse-che/devworkspace-client
- Repository: https://github.com/che-incubator/devworkspace-client
- Issues: https://github.com/che-incubator/devworkspace-client/issues
- npm.io page: https://npm.io/package/@eclipse-che/devworkspace-client

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.21.1
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.13
- [@kubernetes/client-node](https://npm.io/package/@kubernetes/client-node.md) ^0.14.0

## Recent versions

- 0.0.1-1628264033 (latest) — 2021-08-06
- 0.0.1-1628085710 — 2021-08-04
- 0.0.1-1628085678 — 2021-08-04
- 0.0.1-1628067575 — 2021-08-04
- 0.0.1-1627052313 — 2021-07-23
- 0.0.1-1625495079 — 2021-07-05
- 0.0.1-1624633214 — 2021-06-25
- 0.0.1-1623419569 — 2021-06-11
- 0.0.1-1623318990 — 2021-06-10
- 0.0.1-1623233553 — 2021-06-09
- 0.0.1-1620800867 — 2021-05-12
- 0.0.1-1619438984 — 2021-04-26
- 0.0.1-1618334569 — 2021-04-13
- 0.0.1-1617871695 — 2021-04-08
- 0.0.1-1617803696 — 2021-04-07
- … 18 more at https://npm.io/package/@eclipse-che/devworkspace-client/versions

## README

# DevWorkspace Client

The DevWorkspace Client is a library for interacting with DevWorkspaces and related objects on your cluster. It's node side library that wraps [@kubernetes/client-node](https://www.npmjs.com/package/@kubernetes/client-node).

It's built and published on each commit from main branch into [@eclipse-che/devworkspace-client](https://www.npmjs.com/package/@eclipse-che/devworkspace-client)

## Examples

With custom kubeconfig

```typescript
import 'reflect-metadata';
import { container, INVERSIFY_TYPES } from '@eclipse-che/devworkspace-client';
import * as k8s from '@kubernes/client-node'

const kubeConfig = new k8s.KubeConfig();
// todo init kubeConfig with the needed values

const dwClient = new DevWorkspaceClient(kubeConfig);
const dwApi = dwClient.devworkspaceApi;
const dwList = await dwApi.listInNamespace('my_namespace');
for (const dw of dwList.items) {
   // process all the DevWorkpsaces in namespace
}
```

## Developer support

### Getting Started

1. Install prerequisite tooling:
    - yarn
    - node
2. Install dependencies
    - Run `yarn install`
3. Build the project
    - Run `yarn run build`
4. To test the project
    - Run `yarn test`

### Integration tests

Integration tests can be run locally by using `export INTEGRATION_TESTS=true`. Refer to the Environment variables section to learn more.

**The devworkspace-controller must be on the cluster before running the integration tests.**

### Environment variables

- `INTEGRATION_TESTS`: When the INTEGRATION_TESTS environment variable is defined and it's value is true, the integration tests will run against current context from `KUBECONFIG`;
- `KUBECONFIG`: The KUBECONFIG which should be used for getting the current cluster config, like `$HOME/.kube/config`;

## License

EPL-2

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