# @khulnasoft/client

> [![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/black?icon=github)](https://github.com/khulnasoft/devship/discussions)

Latest version **13.1.9** (published 2024-04-11) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @khulnasoft/client
pnpm add @khulnasoft/client
yarn add @khulnasoft/client
bun add @khulnasoft/client
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 13.1.9 |
| Published | 2024-04-11 |
| First published | 2023-12-24 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 16 |
| Dependencies | 14 |
| Unpacked size | 68.1 KB |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | nextlinux |

## Links

- npm: https://www.npmjs.com/package/@khulnasoft/client
- Repository: https://github.com/khulnasoft/devship
- Homepage: https://vercel.com
- Issues: https://github.com/khulnasoft/devship/issues
- npm.io page: https://npm.io/package/@khulnasoft/client

## Dependencies (14)

- [ms](https://npm.io/package/ms.md) 2.1.2
- [ignore](https://npm.io/package/ignore.md) 4.0.6
- [tar-fs](https://npm.io/package/tar-fs.md) 1.16.3
- [fs-extra](https://npm.io/package/fs-extra.md) 8.0.1
- [minimatch](https://npm.io/package/minimatch.md) 5.0.1
- [async-sema](https://npm.io/package/async-sema.md) 3.0.0
- [node-fetch](https://npm.io/package/node-fetch.md) 2.6.7
- [@zeit/fetch](https://npm.io/package/@zeit/fetch.md) 5.2.0
- [async-retry](https://npm.io/package/async-retry.md) 1.2.3
- [querystring](https://npm.io/package/querystring.md) ^0.2.1
- [sleep-promise](https://npm.io/package/sleep-promise.md) 8.0.1
- [@khulnasoft/build-utils](https://npm.io/package/@khulnasoft/build-utils.md) workspace:*
- [@khulnasoft/error-utils](https://npm.io/package/@khulnasoft/error-utils.md) workspace:*
- [@khulnasoft/routing-utils](https://npm.io/package/@khulnasoft/routing-utils.md) workspace:*

## Recent versions

- 13.1.9 (latest) — 2024-04-11
- 13.0.12 — 2023-12-24

## README

# @khulnasoft/client

[![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/black?icon=github)](https://github.com/khulnasoft/devship/discussions)

The official Node.js client for deploying to [Vercel](https://vercel.com).

## Usage

Firstly, install the package:

```bash
npm install @khulnasoft/client
```

Next, load it:

```js
const { createDeployment } = require('@khulnasoft/client');
```

Then call inside a `for...of` loop to follow the progress with the following arguments:

- `<path>` - a directory path / file path / array of file paths (must be on the same level)
- `<options>` - An object containing `token`, an optional `teamId` and any `vercel.json`-valid [fields](https://khulnasoft.com/docs/api#endpoints/deployments/create-a-new-deployment)

```js
async function deploy() {
  let deployment;

  for await (const event of createDeployment({
    token: process.env.TOKEN,
    path: '/Users/me/Code/myproject',
  })) {
    if (event.type === 'ready') {
      deployment = event.payload;
      break;
    }
  }

  return deployment;
}
```

Full list of events:

```js
[
  // File events
  'hashes-calculated',
  'file-count',
  'file-uploaded',
  'all-files-uploaded',
  // Deployment events
  'created',
  'building',
  'ready',
  'alias-assigned',
  'warning',
  'error',
];
```

You can also get the events set programmatically:

```js
import { EVENTS } from '@khulnasoft/client';
```

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