saucelabs
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -271,11 +271,16 @@ var crypto = require('crypto'); | ||
.on('end', function () { | ||
var res; | ||
try { | ||
if (response.statusCode === 200) { | ||
callback(null, JSON.parse(result)); | ||
} else { | ||
callback(JSON.parse(result)); | ||
} | ||
} catch (err) { | ||
res = JSON.parse(result); | ||
} catch (e) { | ||
callback('Could not parse response: ' + result); | ||
return; | ||
} | ||
if (response.statusCode === 200) { | ||
callback(null, res); | ||
} else { | ||
callback(res); | ||
} | ||
}); | ||
@@ -282,0 +287,0 @@ }); |
@@ -5,3 +5,3 @@ { | ||
"description": "A wrapper around Sauce Labs REST API", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"homepage": "https://github.com/holidayextras/node-saucelabs", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -39,3 +39,3 @@ # node-saucelabs [![Build Status](https://secure.travis-ci.org/holidayextras/node-saucelabs.png)](http://travis-ci.org/holidayextras/node-saucelabs) | ||
password: "your-sauce-api-key" | ||
}) | ||
}); | ||
@@ -50,16 +50,18 @@ myAccount.getAccountDetails(function (err, res) { | ||
console.log(res); | ||
myAccount.getJobs(function (err, res) { | ||
myAccount.getJobs(function (err, jobs) { | ||
// Get a list of all your jobs | ||
for (k in jobs) { | ||
myAccount.showJob(jobs[k].id, function (err, res) { | ||
var str = res.id + ": Status: " + res.status; | ||
if (res.error) { | ||
str += "\033[31m Error: " + res.error + " \033[0m"; | ||
} | ||
console.log(str); | ||
}); | ||
for (var k in jobs) { | ||
if ( jobs.hasOwnProperty( k )) { | ||
myAccount.showJob(jobs[k].id, function (err, res) { | ||
var str = res.id + ": Status: " + res.status; | ||
if (res.error) { | ||
str += "\033[31m Error: " + res.error + " \033[0m"; | ||
} | ||
console.log(str); | ||
}); | ||
} | ||
} | ||
}) | ||
}) | ||
}) | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -66,0 +68,0 @@ ``` |
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
291
0
29567
14
583