Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hubot-freight

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hubot-freight - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "hubot-freight",
"version": "0.0.2",
"version": "0.0.3",
"author": "David Cramer <dcramer@gmail.com>",

@@ -5,0 +5,0 @@ "description": "Freight integration for Hubot",

@@ -26,3 +26,3 @@ // Description:

console.log("Freight: Making request to " + url);
console.log("Freight: Making request to %s", url);

@@ -33,7 +33,8 @@ msg.http(url)

.header("Content-Type", "application/json")
.post(JSON.stringify(data), function(err, resp, body) {
.post(JSON.stringify(data))(function(err, resp, body) {
console.log(resp.statusCode);
if (err) {
msg.reply("Freight says: " + err);
console.error(err);
} else if (200 <= resp.statusCode < 400) { // Or, not an error code.
console.error('HTTP %d: %s', resp.statusCode, err);
} else if (200 <= resp.statusCode && resp.statusCode < 400) {
return;

@@ -43,3 +44,3 @@ } else {

msg.reply("Freight responded with HTTP " + resp.statusCode + ": " + data.error);
console.error("HTTP " + resp.statusCode + ": " + body);
console.error("HTTP %d: %s", resp.statusCode, body);
}

@@ -60,3 +61,3 @@ });

console.log("Freight: Making request to " + url);
console.log("Freight: Making request to %s", url);

@@ -67,7 +68,7 @@ msg.http(url)

.header("Content-Type", "application/json")
.put(JSON.stringify(data), function(err, resp, body) {
.put(JSON.stringify(data))(function(err, resp, body) {
if (err) {
msg.reply("Freight says: " + err);
console.error(err);
} else if (200 <= resp.statusCode < 400) { // Or, not an error code.
console.error('HTTP %d: %s', resp.statusCode, err);
} else if (200 <= resp.statusCode && resp.statusCode < 400) {
return;

@@ -77,3 +78,3 @@ } else {

msg.reply("Freight responded with HTTP " + resp.statusCode + ": " + data.error);
console.error("HTTP " + resp.statusCode + ": " + body);
console.error("HTTP %d: %s", resp.statusCode, body);
}

@@ -80,0 +81,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc