Commit fe956e6d authored by ioedeveloper's avatar ioedeveloper

Websocket client requests

parent 3279cba9
...@@ -147,13 +147,13 @@ class App { ...@@ -147,13 +147,13 @@ class App {
self._components.filesProviders['browser'] = new FileProvider('browser') self._components.filesProviders['browser'] = new FileProvider('browser')
registry.put({api: self._components.filesProviders['browser'], name: 'fileproviders/browser'}) registry.put({api: self._components.filesProviders['browser'], name: 'fileproviders/browser'})
var remixd = new Remixd(65520) // var remixd = new Remixd(65520)
registry.put({api: remixd, name: 'remixd'}) // registry.put({api: remixd, name: 'remixd'})
remixd.event.register('system', (message) => { // remixd.event.register('system', (message) => {
if (message.error) toolTip(message.error) // if (message.error) toolTip(message.error)
}) // })
self._components.filesProviders['localhost'] = new RemixDProvider(remixd, self.appManager) self._components.filesProviders['localhost'] = new RemixDProvider(self.appManager)
registry.put({api: self._components.filesProviders['localhost'], name: 'fileproviders/localhost'}) registry.put({api: self._components.filesProviders['localhost'], name: 'fileproviders/localhost'})
registry.put({api: self._components.filesProviders, name: 'fileproviders'}) registry.put({api: self._components.filesProviders, name: 'fileproviders'})
......
...@@ -192,7 +192,7 @@ module.exports = class RemixDProvider { ...@@ -192,7 +192,7 @@ module.exports = class RemixDProvider {
} }
} }
function remixapi (remixd, self) { function remixapi (appManager, self) {
const read = (path, callback) => { const read = (path, callback) => {
path = '' + (path || '') path = '' + (path || '')
path = pathtool.join('./', path) path = pathtool.join('./', path)
......
...@@ -21,7 +21,7 @@ var css = csjs` ...@@ -21,7 +21,7 @@ var css = csjs`
const profile = { const profile = {
name: 'remixd', name: 'remixd',
url: 'ws://127.0.0.1:65520', url: 'ws://127.0.0.1:65520',
methods: ['folderIsReadOnly'], methods: ['folderIsReadOnly', 'resolveDirectory'],
events: [], events: [],
description: 'Using Remixd daemon, allow to access file system', description: 'Using Remixd daemon, allow to access file system',
kind: 'other', kind: 'other',
...@@ -43,8 +43,7 @@ export class RemixdHandle extends WebsocketPlugin { ...@@ -43,8 +43,7 @@ export class RemixdHandle extends WebsocketPlugin {
}) })
} }
async activate () { activate () {
await super.activate()
this.connectToLocalhost() this.connectToLocalhost()
} }
...@@ -58,7 +57,7 @@ export class RemixdHandle extends WebsocketPlugin { ...@@ -58,7 +57,7 @@ export class RemixdHandle extends WebsocketPlugin {
* *
* @param {String} txHash - hash of the transaction * @param {String} txHash - hash of the transaction
*/ */
connectToLocalhost () { async connectToLocalhost () {
let connection = (error) => { let connection = (error) => {
if (error) { if (error) {
console.log(error) console.log(error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment