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

arewegood

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arewegood - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

index.js

@@ -24,3 +24,3 @@ var ExceptionLogger = require('./lib/exception-logger'),

// so that all our calls to conman.send() use the correctly configured instance
conman.init({setDefault: true, apiKey: apiKey});
conman.init({setDefault: true, apiKey: apiKey, useProxy: false});

@@ -27,0 +27,0 @@ conman.on('open', function(){ console.log("open");});

@@ -1,1 +0,48 @@

module.exports = function(){};
var util = require('util'),
https = require('https'),
BaseProvider = require('./base-provider').BaseProvider;
function RestfulProvider(endpoint, apiKey) {
this._endpoint = endpoint;
this._apiKey = apiKey;
var self = this;
setTimeout(function() {
self.emit("open");
self.emit("authorized");
}, 1000);
}
util.inherits(RestfulProvider, BaseProvider);
// write json data to underlying websocket
RestfulProvider.prototype.write = function(jsonData) {
var self = this;
// todo use this._endpoint
var options = {
hostname: 'api.arewegood.io',
port: 443,
path: '/logs?access_token=' + self._apiKey,
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': jsonData.length
}
};
var req = https.request(options, function(res) {
self.emit('error', res.statusCode);
});
req.on('error', function(e) {
self.emit('error', e.message);
});
// write data to request body
req.write(jsonData);
req.end();
};
module.exports = RestfulProvider;
{
"name": "arewegood",
"version": "0.1.1",
"version": "0.1.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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