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

node-red-bluemix-nodes

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-bluemix-nodes - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "node-red-bluemix-nodes",
"version": "1.0.4",
"version": "1.0.5",
"description": "A collection of extra Node-RED nodes for IBM Bluemix.",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -43,6 +43,6 @@ /**

this.on('input', function(msg) {
username = username || this.credentials.username;
password = password || this.credentials.password;
var service_username = username || this.credentials.username;
var service_password = password || this.credentials.password;
if (!username || !password) {
if (!service_username || !service_password) {
var message = 'Missing Weather Insights service credentials';

@@ -71,5 +71,14 @@ node.error(message, msg);

node.status({fill:"blue", shape:"dot", text:"requesting"});
request({url: host + base_uri + geocode + config.service, auth: {username: username, password: password}, qs: {units: config.units, language: config.language}}, function(error, response, body) {
request({url: host + base_uri + geocode + config.service, auth: {username: service_username, password: service_password}, qs: {units: config.units, language: config.language}}, function(error, response, body) {
node.status({});
if (!error && response.statusCode == 200) {
if (error) {
node.error('Weather Insights service call failed with error HTTP response.', msg);
} else if (response.statusCode === 401) {
node.error('Weather Insights service call failure due to authentication failure.', msg);
} else if (response.statusCode === 404) {
node.error('Weather Insights service call failed due to HTTP 404 response to API call.', msg);
} else if (response.statusCode !== 200) {
node.error('Weather Insights service call failed due to non-200 HTTP response to API call.', msg);
} else {
var results = JSON.parse(body);

@@ -80,5 +89,2 @@ msg.forecasts = results.forecasts;

node.send(msg);
} else {
var message3 = 'Weather Insights service call failed with error HTTP response.';
node.error(message3, msg);
}

@@ -85,0 +91,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