Commit 3102f2e8 authored by ioedeveloper's avatar ioedeveloper

Expose methods

parent 44855aff
...@@ -2,3 +2,4 @@ node_modules ...@@ -2,3 +2,4 @@ node_modules
npm-debug.log npm-debug.log
python_modules python_modules
lib lib
shared
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
}, },
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\"", "test": "echo \"Error: no test specified\"",
"start": "./lib/bin/remixd.js", "start": "./lib/bin/remixd.js -s ./shared --remix-ide http://127.0.0.1:8080",
"npip": "npip", "npip": "npip",
"lint": "eslint ./src", "lint": "eslint ./src",
"build": "tsc -p ./ && chmod +x ./lib/bin/remixd.js", "build": "tsc -p ./ && chmod +x ./lib/bin/remixd.js",
......
...@@ -7,7 +7,7 @@ const isbinaryfile = require('isbinaryfile') ...@@ -7,7 +7,7 @@ const isbinaryfile = require('isbinaryfile')
const fs = require('fs-extra') const fs = require('fs-extra')
export default class RemixdClient extends PluginClient { export default class RemixdClient extends PluginClient {
methods: [] methods: ['folderIsReadOnly', 'resolveDirectory']
trackDownStreamUpdate: TrackDownStreamUpdate trackDownStreamUpdate: TrackDownStreamUpdate
websocket: WebSocket | null websocket: WebSocket | null
currentSharedFolder: string currentSharedFolder: string
...@@ -31,6 +31,7 @@ export default class RemixdClient extends PluginClient { ...@@ -31,6 +31,7 @@ export default class RemixdClient extends PluginClient {
} }
resolveDirectory (args: SharedFolderArgs, cb: Function) { resolveDirectory (args: SharedFolderArgs, cb: Function) {
console.log('called resolveDirectory!')
try { try {
const path = utils.absolutePath(args.path, this.currentSharedFolder) const path = utils.absolutePath(args.path, this.currentSharedFolder)
...@@ -40,8 +41,8 @@ export default class RemixdClient extends PluginClient { ...@@ -40,8 +41,8 @@ export default class RemixdClient extends PluginClient {
} }
} }
folderIsReadOnly (args: SharedFolderArgs, cb: Function) { folderIsReadOnly () {
return cb(null, this.readOnly) return this.readOnly
} }
get (args: SharedFolderArgs, cb: Function) { get (args: SharedFolderArgs, cb: Function) {
......
...@@ -17,4 +17,14 @@ export type ResolveDirectory = { ...@@ -17,4 +17,14 @@ export type ResolveDirectory = {
} }
} }
export type WebsocketProfile = {
name: string
methods?: string[]
permission?: boolean
hash?: string
redirect?: {
[key: string]: string
}
}
export type TrackDownStreamUpdate = KeyPairString export type TrackDownStreamUpdate = KeyPairString
\ No newline at end of file
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