install-artifact-from-github
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -56,6 +56,4 @@ #!/usr/bin/env node | ||
.on('error', e => reject(e)); | ||
if (data) { | ||
req.write(data); | ||
req.end(); | ||
} | ||
data && req.write(data); | ||
req.end(); | ||
}); | ||
@@ -65,3 +63,3 @@ const get = async (url, options) => io(url, {...options, method: 'GET'}); | ||
const url = parts => { | ||
function url(parts) { | ||
let result = parts[0] || ''; | ||
@@ -72,3 +70,3 @@ for (let i = 1; i < parts.length; ++i) { | ||
return result; | ||
}; | ||
} | ||
@@ -92,6 +90,7 @@ const artifactPath = getParam('artifact'), | ||
auth: OWNER + ':' + TOKEN, | ||
headers: {Accept: 'application/vnd.github.v3+json'} | ||
headers: {Accept: 'application/vnd.github.v3+json', 'User-Agent': 'uhop/install-artifact-from-github'} | ||
}).then(response => { | ||
const p = response.upload_url.indexOf('{'); | ||
return p > 0 ? response.upload_url.substr(0, p) : response.upload_url; | ||
const data = JSON.parse(response.toString()), | ||
p = data.upload_url.indexOf('{'); | ||
return p > 0 ? data.upload_url.substr(0, p) : data.upload_url; | ||
}) | ||
@@ -112,3 +111,8 @@ ]); | ||
auth: OWNER + ':' + TOKEN, | ||
headers: {Accept: 'application/vnd.github.v3+json', 'Content-Type': 'application/brotli', 'Content-Length': compressed.length} | ||
headers: { | ||
Accept: 'application/vnd.github.v3+json', | ||
'Content-Type': 'application/brotli', | ||
'Content-Length': compressed.length, | ||
'User-Agent': 'uhop/install-artifact-from-github' | ||
} | ||
}, | ||
@@ -129,3 +133,8 @@ compressed | ||
auth: OWNER + ':' + TOKEN, | ||
headers: {Accept: 'application/vnd.github.v3+json', 'Content-Type': 'application/gzip', 'Content-Length': compressed.length} | ||
headers: { | ||
Accept: 'application/vnd.github.v3+json', | ||
'Content-Type': 'application/gzip', | ||
'Content-Length': compressed.length, | ||
'User-Agent': 'uhop/install-artifact-from-github' | ||
} | ||
}, | ||
@@ -132,0 +141,0 @@ compressed |
{ | ||
"name": "install-artifact-from-github", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Create binary artifacts hosted by github and install from them without compiling.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/uhop/install-artifact-from-github", |
@@ -126,2 +126,3 @@ # install-artifact-from-github [![NPM version][npm-img]][npm-url] | ||
- 1.1.1 *numerous bugfixes to please Github REST API.* | ||
- 1.1.0 *moved `save-to-github` here from a separate project, reduced 3rd-party dependencies.* | ||
@@ -128,0 +129,0 @@ - 1.0.2 *fixed a `yarn`-specific bug.* |
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
20354
307
131