You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@vercel/client

Package Overview
Dependencies
Maintainers
0
Versions
372
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/client

[Join the Vercel Community](https://vercel.community/)

15.1.6
canary
latest
Source
npm
Version published
Weekly downloads
15K
-6.14%
Maintainers
0
Weekly downloads
 
Created
Source

@vercel/client

Join the Vercel Community

The official Node.js client for deploying to Vercel.

Usage

Firstly, install the package:

npm install @vercel/client

Next, load it:

const { createDeployment } = require('@vercel/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
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:

[
  // 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:

import { EVENTS } from '@vercel/client';

FAQs

Package last updated on 13 Mar 2025

Did you know?

Socket

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.

Install

Related posts