diff --git a/libs/remix-debug/bin/rdb b/libs/remix-debug/bin/rdb index edb866e5ce..53da786448 100755 --- a/libs/remix-debug/bin/rdb +++ b/libs/remix-debug/bin/rdb @@ -25,7 +25,7 @@ program .option('--node [url]', 'node to connect to') .parse(process.argv) -const CmdLine = require('../src/cmdline/index.js') +const CmdLine = require('../src/cmdline/index') const solc = require('solc') const fs = require('fs') diff --git a/libs/remix-debug/src/cmdline/index.ts b/libs/remix-debug/src/cmdline/index.ts index 1a0d5f4e6a..add117240d 100644 --- a/libs/remix-debug/src/cmdline/index.ts +++ b/libs/remix-debug/src/cmdline/index.ts @@ -1,11 +1,22 @@ -const Web3 = require('web3') +import Web3 from 'web3' const Debugger = require('../debugger/debugger.js') -import EventManager from 'events' +import { EventEmitter } from 'events' -class CmdLine { +export class CmdLine { + + events + lineColumnPos + rawLocation + web3 + compilation + debugger + filename + txHash + solidityState + solidityLocals constructor () { - this.events = new EventManager() + this.events = new EventEmitter() this.lineColumnPos = null this.rawLocation = null } @@ -17,8 +28,8 @@ class CmdLine { loadCompilationData (inputJson, outputJson) { const data = {} - data.data = outputJson - data.source = { sources: inputJson.sources } + data['data'] = outputJson + data['source'] = { sources: inputJson.sources } this.loadCompilationResult(data) } @@ -195,5 +206,3 @@ class CmdLine { console.dir(this.solidityState) } } - -module.exports = CmdLine diff --git a/libs/remix-debug/tsconfig.lib.json b/libs/remix-debug/tsconfig.lib.json index cec3d2b80c..f9a4f32495 100644 --- a/libs/remix-debug/tsconfig.lib.json +++ b/libs/remix-debug/tsconfig.lib.json @@ -8,10 +8,10 @@ "rootDir": "./", "types": ["node"] }, - "exclude": ["**/*.spec.js"], - "include": [ - "src/**/*.js", - "./index.js" - ] + "exclude": [ + "**/*.spec.js", + "test/" + ], + "include": ["**/*.ts"] } \ No newline at end of file