@vercel/client
    TypeScript icon, indicating that this package has built-in type declarations

    10.2.2 • Public • Published

    @vercel/client

    Join the community on GitHub Discussions

    The official Node.js client for deploying to Vercel.

    Usage

    Firstly, install the package:

    npm install @vercel/client
    # or
    yarn add @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';

    Keywords

    none

    Install

    npm i @vercel/client

    Homepage

    vercel.com

    DownloadsWeekly Downloads

    1,917

    Version

    10.2.2

    License

    MIT

    Unpacked Size

    58.1 kB

    Total Files

    29

    Last publish

    Collaborators

    • schlez
    • epallerols
    • domysee
    • nwienert
    • arbw
    • gudmundur
    • marcgreenstock
    • stephdietz
    • vvo
    • falcoagustin
    • nabsul
    • bmealey
    • brethudson
    • maedahbatool
    • matt.straka
    • jasongullickson
    • f3d0r
    • gaspar09
    • jtaylor0196
    • pieparker
    • kelly
    • dferber90
    • healeycodes
    • broph123
    • codybrouwers
    • ebb-tide
    • gdborton
    • msimulcik
    • jeffreyarneson
    • jaredpalmer
    • kikobeats
    • domeccleston
    • nutlope
    • hungrybearstudio
    • codetaromiura
    • mattcleg
    • gkaragkiaouris
    • geovanisouza92
    • dglsparsons
    • lostinpatterns
    • pralhad-vercel
    • vercel-release-bot
    • williamli
    • southpolesteve
    • goncy
    • chibicode
    • ijjk
    • andybitz
    • iamevilrabbit
    • joecohens
    • tootallnate
    • styfle
    • zeit-bot
    • quietshu
    • hankvercel
    • mglagola
    • javivelasco
    • igorklopov
    • paco
    • dav-is
    • timer
    • lucleray
    • leerobinson
    • matheuss
    • nkzawa
    • anatrajkovska
    • timneutkens
    • elsigh
    • cl3arglass
    • samsisle
    • chriswdmr
    • rizbizkits
    • ernestd
    • ismaelrumzan
    • jhoch
    • mrmckeb
    • kuvos
    • creationix
    • rauchg
    • huozhi
    • aadityajshah
    • cmvnk
    • lfades
    • paulogdm
    • ktcarter
    • okbel
    • padmaia
    • msweeneydev
    • delba
    • catsaremlg
    • steventey
    • sokra
    • gsandhu
    • dbredvick
    • kdy1