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

mist-api

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mist-api - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

47

index.js

@@ -1,2 +0,1 @@

if (!process.version.substr(0, 3) === 'v6.') {

@@ -7,11 +6,15 @@ console.log('MistApi is a native addon, which is not supported by Node.js version ('+process.version+'), requires v6.x.x., tested on v6.9.2.');

if(process.env.BUILD) {
var MistApi = require('./build/Release/MistApi.node');
} else if (process.arch === 'x64' && process.platform === 'linux' ) {
var MistApi = require('./bin/MistApi.node');
if (process.env.DEBUG) {
var MistApi = require('./build/Debug/MistApi.node');
} else {
console.log('MistApi is a native addon, which is not supported by your platform/arch ('+process.platform+'/'+process.arch+').');
process.exit(1);
if(process.env.BUILD) {
var MistApi = require('./build/Release/MistApi.node');
} else if (process.arch === 'x64' && process.platform === 'linux' ) {
var MistApi = require('./bin/MistApi.node');
} else {
console.log('MistApi is a native addon, which is not supported by your platform/arch ('+process.platform+'/'+process.arch+').');
process.exit(1);
}
}
/*

@@ -35,3 +38,9 @@ else if (process.arch === 'arm' && process.platform === 'linux' ) {

var themist;
function Mist(opts) {
//console.log("Nodejs new Mist()");
themist = this;
var self = this;

@@ -49,6 +58,15 @@ this.requests = {};

this.opts = opts;
//console.log('Starting with opts:', opts);
this.api = new MistApi.StreamingWorker(
function (event, value, data) {
//console.log("Event from streaming worker", event, data);
//console.log("Event from streaming worker", arguments);
//console.log("Event from streaming worker", event, Buffer.isBuffer(data) ? BSON.deserialize(data) : 'Not Buffer');
if (event === 'done') {
// Streaming worker is done and has shut down
return;
}
if (event === 'write' && typeof self.writeCb === 'function') {

@@ -74,2 +92,3 @@ var msg = BSON.deserialize(data);

if( Buffer.isBuffer(data) && data.length >= 5 ) {
var msg = BSON.deserialize(data);

@@ -117,11 +136,7 @@

}
} else {
console.log('Request not found for response:', id, self, themist.requests);
}
}
},
function () {
emitter.emit("close");
},
function (error) {
emitter.emit("error", error);
},
opts);

@@ -158,2 +173,4 @@

this.requests[id] = cb;
//console.log("Making request", request, this);

@@ -160,0 +177,0 @@ this.api.sendToAddon("mist", 1, BSON.serialize(request));

{
"name": "mist-api",
"version": "0.0.16",
"version": "0.0.17",
"description": "Mist API wrapper for node. Used for accessing all Mist APIs.",

@@ -24,4 +24,5 @@ "main": "index.js",

"devDependencies": {
"mkdirp": "0.5.1",
"mocha": "3.2.0"
}
}

Sorry, the diff of this file is not supported yet

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