dynamodb-localhost
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"setup": { | ||
"download_url": "http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz", | ||
"download_url": "http://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz", | ||
"install_path": "/bin", | ||
@@ -5,0 +5,0 @@ "jar": "DynamoDBLocal.jar" |
@@ -14,35 +14,29 @@ 'use strict'; | ||
http.get(downloadUrl, function (response) { | ||
if (302 != response.statusCode) { | ||
callback(new Error('Error getting DynamoDb local latest tar.gz location: ' + response.statusCode)); | ||
var len = parseInt(response.headers['content-length'], 10), | ||
bar = new ProgressBar('Downloading dynamodb-local [:bar] :percent :etas', { | ||
complete: '=', | ||
incomplete: ' ', | ||
width: 40, | ||
total: len | ||
}); | ||
if (200 != response.statusCode) { | ||
throw new Error('Error getting DynamoDb local latest tar.gz location ' + response.headers.location + ': ' + response.statusCode); | ||
} | ||
http.get(response.headers.location, function (redirectResponse) { | ||
var len = parseInt(redirectResponse.headers['content-length'], 10), | ||
bar = new ProgressBar('Downloading dynamodb-local [:bar] :percent :etas', { | ||
complete: '=', | ||
incomplete: ' ', | ||
width: 40, | ||
total: len | ||
}); | ||
if (200 != redirectResponse.statusCode) { | ||
throw new Error('Error getting DynamoDb local latest tar.gz location ' + response.headers.location + ': ' + redirectResponse.statusCode); | ||
} | ||
redirectResponse | ||
.pipe(zlib.Unzip()) | ||
.pipe(tar.Extract({ | ||
path: installPath | ||
})) | ||
.on('data', function (chunk) { | ||
bar.tick(chunk.length); | ||
}) | ||
.on('end', function () { | ||
callback("\n Installation complete!"); | ||
}) | ||
.on('error', function (err) { | ||
throw new Error("Error in downloading Dynamodb local " + err); | ||
}); | ||
response | ||
.pipe(zlib.Unzip()) | ||
.pipe(tar.Extract({ | ||
path: installPath | ||
})) | ||
.on('data', function (chunk) { | ||
bar.tick(chunk.length); | ||
}) | ||
.on('end', function () { | ||
callback("\n Installation complete!"); | ||
}) | ||
.on('error', function (err) { | ||
throw Error("Error in downloading Dynamodb local " + err); | ||
throw new Error("Error in downloading Dynamodb local " + err); | ||
}); | ||
}) | ||
}) | ||
.on('error', function (err) { | ||
@@ -49,0 +43,0 @@ throw new Error("Error in downloading Dynamodb local " + err); |
@@ -0,0 +0,0 @@ 'use strict'; |
{ | ||
"name": "dynamodb-localhost", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=4.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14156
184