|
|
@ -5,6 +5,7 @@ import * as utils from '../utils' |
|
|
|
import * as chokidar from 'chokidar' |
|
|
|
import * as chokidar from 'chokidar' |
|
|
|
import * as fs from 'fs-extra' |
|
|
|
import * as fs from 'fs-extra' |
|
|
|
import * as isbinaryfile from 'isbinaryfile' |
|
|
|
import * as isbinaryfile from 'isbinaryfile' |
|
|
|
|
|
|
|
const hre = require("hardhat"); |
|
|
|
|
|
|
|
|
|
|
|
export class RemixdClient extends PluginClient { |
|
|
|
export class RemixdClient extends PluginClient { |
|
|
|
methods: Array<string> |
|
|
|
methods: Array<string> |
|
|
@ -14,7 +15,7 @@ export class RemixdClient extends PluginClient { |
|
|
|
|
|
|
|
|
|
|
|
constructor (private readOnly = false) { |
|
|
|
constructor (private readOnly = false) { |
|
|
|
super() |
|
|
|
super() |
|
|
|
this.methods = ['folderIsReadOnly', 'resolveDirectory', 'get', 'exists', 'isFile', 'set', 'rename', 'remove', 'isDirectory', 'list', 'createDir', 'canDeactivate'] |
|
|
|
this.methods = ['folderIsReadOnly', 'hardhatCompile', 'resolveDirectory', 'get', 'exists', 'isFile', 'set', 'rename', 'remove', 'isDirectory', 'list', 'createDir', 'canDeactivate'] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setWebSocket (websocket: WS): void { |
|
|
|
setWebSocket (websocket: WS): void { |
|
|
@ -26,6 +27,12 @@ export class RemixdClient extends PluginClient { |
|
|
|
if (this.isLoaded) this.emit('rootFolderChanged') |
|
|
|
if (this.isLoaded) this.emit('rootFolderChanged') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async hardhatCompile() { |
|
|
|
|
|
|
|
console.log('inside hardhatCompile') |
|
|
|
|
|
|
|
console.log('here is hre-->', hre.tasks) |
|
|
|
|
|
|
|
// await hre.tasks.accounts.action();
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
list (): Filelist { |
|
|
|
list (): Filelist { |
|
|
|
try { |
|
|
|
try { |
|
|
|
return utils.walkSync(this.currentSharedFolder, {}, this.currentSharedFolder) |
|
|
|
return utils.walkSync(this.currentSharedFolder, {}, this.currentSharedFolder) |
|
|
|