@vercel/fun
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -35,3 +35,3 @@ "use strict"; | ||
if (!res.ok) { | ||
throw new Error(`HTTP request failed: ${res.status}`); | ||
throw new Error(`HTTP request ${tarballUrl} failed: ${res.status}`); | ||
} | ||
@@ -38,0 +38,0 @@ return new Promise((resolve, reject) => { |
@@ -15,3 +15,3 @@ "use strict"; | ||
function handler(data) { | ||
const isPython3 = data && data.toString() && data.toString().startsWith('Python 3'); | ||
const isPython3 = data && data.startsWith('Python 3'); | ||
if (!isPython3) { | ||
@@ -25,4 +25,18 @@ fallback(); | ||
child.on('error', fallback); | ||
child.stderr.on('data', handler); | ||
child.stdout.on('data', handler); | ||
Promise.all([child.stdout, child.stderr].map(stream2Promise)).then(([stdout, stderr]) => { | ||
// if there are stderr messages, then we know the python version is not 3 | ||
if (stderr.length) { | ||
handler(); | ||
} | ||
else { | ||
handler(stdout.toString()); | ||
} | ||
}); | ||
function stream2Promise(stream) { | ||
const buffers = []; | ||
return new Promise(resolve => { | ||
stream.on('data', data => buffers.push(data)); | ||
stream.on('end', () => resolve(Buffer.concat(buffers))); | ||
}); | ||
} | ||
//# sourceMappingURL=bootstrap.js.map |
{ | ||
"name": "@vercel/fun", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Local Lambda development environment", | ||
@@ -25,3 +25,3 @@ "main": "dist/src/index", | ||
"@tootallnate/once": "2.0.0", | ||
"async-listen": "1.0.0", | ||
"async-listen": "1.2.0", | ||
"debug": "4.1.1", | ||
@@ -33,3 +33,3 @@ "execa": "3.2.0", | ||
"ms": "2.1.1", | ||
"node-fetch": "2.6.1", | ||
"node-fetch": "2.6.7", | ||
"path-match": "1.2.4", | ||
@@ -36,0 +36,0 @@ "promisepipe": "3.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
158776
1846
+ Addedasync-listen@1.2.0(transitive)
+ Addednode-fetch@2.6.7(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removedasync-listen@1.0.0(transitive)
- Removednode-fetch@2.6.1(transitive)
Updatedasync-listen@1.2.0
Updatednode-fetch@2.6.7