Commit 3102f2e8 authored by ioedeveloper's avatar ioedeveloper

Expose methods

parent 44855aff
......@@ -2,3 +2,4 @@ node_modules
npm-debug.log
python_modules
lib
shared
......@@ -8,7 +8,7 @@
},
"scripts": {
"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",
"lint": "eslint ./src",
"build": "tsc -p ./ && chmod +x ./lib/bin/remixd.js",
......
......@@ -7,7 +7,7 @@ const isbinaryfile = require('isbinaryfile')
const fs = require('fs-extra')
export default class RemixdClient extends PluginClient {
methods: []
methods: ['folderIsReadOnly', 'resolveDirectory']
trackDownStreamUpdate: TrackDownStreamUpdate
websocket: WebSocket | null
currentSharedFolder: string
......@@ -31,6 +31,7 @@ export default class RemixdClient extends PluginClient {
}
resolveDirectory (args: SharedFolderArgs, cb: Function) {
console.log('called resolveDirectory!')
try {
const path = utils.absolutePath(args.path, this.currentSharedFolder)
......@@ -40,8 +41,8 @@ export default class RemixdClient extends PluginClient {
}
}
folderIsReadOnly (args: SharedFolderArgs, cb: Function) {
return cb(null, this.readOnly)
folderIsReadOnly () {
return this.readOnly
}
get (args: SharedFolderArgs, cb: Function) {
......
......@@ -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
\ 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