truffle-box
Advanced tools
Comparing version 1.0.2 to 1.0.3
var fs = require("fs-extra"); | ||
var path = require("path"); | ||
var ghdownload = require('github-download'); | ||
var https = require("https"); | ||
var request = require('request'); | ||
var vcsurl = require('vcsurl'); | ||
@@ -38,7 +38,8 @@ var parseURL = require('url').parse; | ||
method: 'HEAD', | ||
host: configURL.host, | ||
path: configURL.path | ||
uri: 'https://' + configURL.host + configURL.path | ||
}; | ||
var req = https.request(options, function(r) { | ||
if (r.statusCode == 404) { | ||
request(options, function(error, r) { | ||
if (error) { | ||
return reject(new Error("Error making request. Please check the format of the requested resource: " + options.uri)); | ||
} else if (r.statusCode == 404) { | ||
return reject(new Error("Truffle Box at URL " + url + " doesn't exist. If you believe this is an error, please contact Truffle support.")); | ||
@@ -50,4 +51,2 @@ } else if (r.statusCode != 200) { | ||
}); | ||
req.end(); | ||
}); | ||
@@ -54,0 +53,0 @@ } |
{ | ||
"name": "truffle-box", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Truffle project boilerplate utility", | ||
@@ -26,2 +26,3 @@ "main": "box.js", | ||
"github-download": "^0.5.0", | ||
"request": "^2.83.0", | ||
"tmp": "^0.0.31", | ||
@@ -28,0 +29,0 @@ "vcsurl": "^0.1.1" |
Sorry, the diff of this file is not supported yet
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
20694
10
1
5
+ Addedrequest@^2.83.0