Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-download

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-download - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

12

index.js

@@ -6,3 +6,3 @@ 'use strict';

// Get archive from bitbucket
// Get archive from bitbucket -- doesn't work with https
// git archive --format=tar --prefix=alembic/ --remote=ssh://git@bitbucket.org/zzzeek/alembic.git master | tar -xf -

@@ -13,2 +13,5 @@

// Maybe should do git clone, git checkout, git archive (local). This should support both ssh and https
// and work on bitbucket, stash, github, and any git repo.
var tar = require('tar');

@@ -19,2 +22,3 @@ var fs = require('fs');

var git = new Git({});
var path = require('path');

@@ -26,7 +30,5 @@ module.exports = function(options, callback) {

remote: options.source,
output: options.tarfile || '/tmp/'+uuid.v4()+'.tar'
output: options.tarfile || path.join(options.tmpDir || '/tmp', uuid.v4()+'.tar'),
prefix: options.prefix || ''
};
if (options.prefix) {
gitOptions.prefix = options.prefix;
}

@@ -33,0 +35,0 @@ // Remove tarfile if savetar option is false, otherwise

{
"name": "git-download",
"version": "0.0.1",
"version": "0.0.2",
"description": "Download a remote git repository as a tar file or exploded directory",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -10,3 +10,4 @@ var options = {

// Location to save tarfile, defaults to /tmp if not specified
tarfile: '/tmp/node-buffer.tar',
// tarfile: '/tmp/node-buffer.tar',
tmpDir: '/tmp',
// Optional prefix to add to all root filenames in tarfile

@@ -13,0 +14,0 @@ // prefix: 'node-buffer/',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc