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

@remixproject/engine-electron

Package Overview
Dependencies
Maintainers
6
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remixproject/engine-electron - npm Package Compare versions

Comparing version 0.3.40 to 0.3.41

8

package.json
{
"name": "@remixproject/engine-electron",
"version": "0.3.40",
"version": "0.3.41",
"homepage": "https://github.com/ethereum/remix-plugin/tree/master/packages/engine/node#readme",

@@ -22,7 +22,7 @@ "repository": {

"dependencies": {
"@remixproject/plugin-utils": "0.3.40",
"@remixproject/engine": "0.3.40",
"@remixproject/plugin-api": "0.3.40"
"@remixproject/plugin-utils": "0.3.41",
"@remixproject/engine": "0.3.41",
"@remixproject/plugin-api": "0.3.41"
},
"peerDependencies": {}
}

@@ -0,5 +1,8 @@

/// <reference types="node" />
import type { Profile, Message } from '@remixproject/plugin-utils';
import { Plugin } from '@remixproject/engine';
import { EventEmitter } from 'events';
export declare abstract class ElectronPlugin extends Plugin {
protected loaded: boolean;
events: EventEmitter;
protected id: number;

@@ -31,2 +34,3 @@ protected pendingRequest: Record<number, (result: any, error: Error | string) => void>;

protected handshake(): Promise<any>;
onload(cb?: () => void): Promise<void>;
/**

@@ -33,0 +37,0 @@ * React when a message comes from client

@@ -6,5 +6,7 @@ "use strict";

const engine_1 = require("@remixproject/engine");
const events_1 = require("events");
class ElectronPlugin extends engine_1.Plugin {
constructor(profile) {
super(profile);
this.events = new events_1.EventEmitter();
this.id = 0;

@@ -101,5 +103,7 @@ this.pendingRequest = {};

}
this.events.emit('loaded');
this.emit('loaded', this.name);
}
else {
this.events.emit('loaded');
// If there is a broken connection we want send back the handshake to the plugin client

@@ -110,2 +114,13 @@ return this.callPluginMethod('handshake', [this.profile.name]);

}
// Wait until this connection is settled
onload(cb) {
return new Promise((res, rej) => {
const loadFn = () => {
res();
if (cb)
cb();
};
this.loaded ? loadFn() : this.events.once('loaded', () => loadFn());
});
}
/**

@@ -112,0 +127,0 @@ * React when a message comes from client

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