Socket
Book a DemoInstallSign in
Socket

checkout

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkout

Pull down local or remote repositories to local directories.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
2
Created
Source

checkout

Simple unpacking of repositories to local directories.

Git Repositories

checkout({
  type: 'git',
  url: 'git@github.com:bmeck/ruffian',
  destination: 'my-apps/ruffian'
}, function (err) {
  console.error(err)
});

Streams from .tar files

checkout({
  type: 'tar-stream',
  stream: req,
  destination: 'my-apps/ruffian'
}, function (err) {
  console.error(err)
});

Local directories

checkout({
  type: 'directory',
  directory: 'my-repos/ruffian',
  destination: 'my-apps/ruffian'
}, function (err) {
  console.error(err)
});

npm packages

checkout({
  type: 'npm',
  package: 'ruffian',
  version: '0.0.0',
  destination: 'my-apps/ruffian',
  //
  // Optional
  //
  protocol: 'https',
  proxy: 'http://outbound-proxy.com',
  registry: 'registry.npmjs.org',
  'strict-ssl': false,
  headers: {
    // Custom HTTP headers
    'user-agent': 'node-checkout'
  }
}, function (err) {
  console.error(err)
})

Custom Handler

checkout({
  type: function (description, callback) {
    // PERFORM THE CHECKOUT HERE
    // @description matches the first argument to checkout
  },
}, function (err) {
  console.error(err)
})

Registering a generic handler

checkout.handlers.myHandler = function (description, callback) {
  // Same as Custom Handler
}

FAQs

Package last updated on 27 Sep 2013

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