@remixproject/engine-electron
Advanced tools
Comparing version 0.3.41 to 0.3.42
{ | ||
"name": "@remixproject/engine-electron", | ||
"version": "0.3.41", | ||
"version": "0.3.42", | ||
"homepage": "https://github.com/ethereum/remix-plugin/tree/master/packages/engine/node#readme", | ||
@@ -22,7 +22,7 @@ "repository": { | ||
"dependencies": { | ||
"@remixproject/plugin-utils": "0.3.41", | ||
"@remixproject/engine": "0.3.41", | ||
"@remixproject/plugin-api": "0.3.41" | ||
"@remixproject/plugin-utils": "0.3.42", | ||
"@remixproject/engine": "0.3.42", | ||
"@remixproject/plugin-api": "0.3.42" | ||
}, | ||
"peerDependencies": {} | ||
} |
@@ -7,2 +7,3 @@ /// <reference types="node" /> | ||
protected loaded: boolean; | ||
protected connected: boolean; | ||
events: EventEmitter; | ||
@@ -35,3 +36,3 @@ protected id: number; | ||
protected handshake(): Promise<any>; | ||
onload(cb?: () => void): Promise<void>; | ||
onConnect(cb?: () => void): Promise<void>; | ||
/** | ||
@@ -38,0 +39,0 @@ * React when a message comes from client |
@@ -14,2 +14,3 @@ "use strict"; | ||
this.loaded = false; | ||
this.connected = false; | ||
if (!window.electronAPI) | ||
@@ -103,7 +104,7 @@ throw new Error('ElectronPluginConnector requires window.api'); | ||
} | ||
this.events.emit('loaded'); | ||
this.connected = true; | ||
this.events.emit('connected'); | ||
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 | ||
@@ -115,3 +116,3 @@ return this.callPluginMethod('handshake', [this.profile.name]); | ||
// Wait until this connection is settled | ||
onload(cb) { | ||
onConnect(cb) { | ||
return new Promise((res, rej) => { | ||
@@ -123,3 +124,3 @@ const loadFn = () => { | ||
}; | ||
this.loaded ? loadFn() : this.events.once('loaded', () => loadFn()); | ||
this.connected ? loadFn() : this.events.once('connected', () => loadFn()); | ||
}); | ||
@@ -126,0 +127,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15736
242
+ Added@remixproject/engine@0.3.42(transitive)
+ Added@remixproject/plugin-api@0.3.42(transitive)
+ Added@remixproject/plugin-utils@0.3.42(transitive)
- Removed@remixproject/engine@0.3.41(transitive)
- Removed@remixproject/plugin-api@0.3.41(transitive)
- Removed@remixproject/plugin-utils@0.3.41(transitive)
Updated@remixproject/engine@0.3.42