|
|
|
@ -63,6 +63,7 @@ function errorHandler (error: any, service: string) { |
|
|
|
|
.description('Establish a two-way websocket connection between the local computer and Remix IDE for a folder') |
|
|
|
|
.option('-u, --remix-ide <url>', 'URL of remix instance allowed to connect') |
|
|
|
|
.option('-s, --shared-folder <path>', 'Folder to share with Remix IDE (Default: CWD)') |
|
|
|
|
.option('-i, --install <name>', 'Module name to install locally (Supported: ["slither"])') |
|
|
|
|
.option('-r, --read-only', 'Treat shared folder as read-only (experimental)') |
|
|
|
|
.on('--help', function () { |
|
|
|
|
console.log('\nExample:\n\n remixd -s ./shared_project -u http://localhost:8080') |
|
|
|
@ -71,6 +72,11 @@ function errorHandler (error: any, service: string) { |
|
|
|
|
|
|
|
|
|
await warnLatestVersion() |
|
|
|
|
|
|
|
|
|
if(program.install && !program.readOnly) { |
|
|
|
|
if (program.install.toLowerCase() === 'slither') require('./../scripts/installSlither') |
|
|
|
|
process.exit(0) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!program.remixIde) { |
|
|
|
|
console.log('\x1b[33m%s\x1b[0m', '[WARN] You can only connect to remixd from one of the supported origins.') |
|
|
|
|
} else { |
|
|
|
|