remix-plugin version updated and terminal API used

pull/1172/head
aniket-engg 4 years ago committed by Aniket
parent 8b193fe801
commit e1bdf8bc8a
  1. 3
      apps/remix-ide/src/app/panels/terminal.js
  2. 30
      apps/remix-ide/src/app/tabs/compileTab/compileTab.js
  3. 145
      package-lock.json
  4. 15
      package.json

@ -93,9 +93,6 @@ class Terminal extends Plugin {
} }
onActivation () { onActivation () {
this.on('solidity-logic', 'hardhatCompilationFinished', (msg) => {
this.commands.log(msg)
})
this.on('scriptRunner', 'log', (msg) => { this.on('scriptRunner', 'log', (msg) => {
this.commands.log.apply(this.commands, msg.data) this.commands.log.apply(this.commands, msg.data)
}) })

@ -97,23 +97,25 @@ class CompileTab extends Plugin {
try { try {
if (this.fileManager.mode === 'localhost' && hhCompilation) { if (this.fileManager.mode === 'localhost' && hhCompilation) {
const { currentVersion, optimize, runs } = this.compiler.state const { currentVersion, optimize, runs } = this.compiler.state
const fileContent = `module.exports = { if (currentVersion) {
solidity: '${currentVersion.substring(0, currentVersion.indexOf('+commit'))}', const fileContent = `module.exports = {
settings: { solidity: '${currentVersion.substring(0, currentVersion.indexOf('+commit'))}',
optimizer: { settings: {
enabled: ${optimize}, optimizer: {
runs: ${runs} enabled: ${optimize},
runs: ${runs}
}
} }
} }
`
const configFilePath = 'remix-compiler.config.js'
this.fileManager.setFileContent(configFilePath, fileContent)
this.call('hardhat', 'compile', configFilePath).then((result) => {
this.call('terminal', 'log', { type: 'info', value: result})
}).catch((error) => {
this.call('terminal', 'log', { type: 'error', value: result})
})
} }
`
const configFilePath = 'remix-compiler.config.js'
this.fileManager.setFileContent(configFilePath, fileContent)
this.call('hardhat', 'compile', configFilePath).then((result) => {
this.emit('hardhatCompilationFinished', result)
}).catch((error) => {
this.emit('hardhatCompilationFinished', error)
})
} }
this.fileManager.saveCurrentFile() this.fileManager.saveCurrentFile()
this.call('editor', 'clearAnnotations') this.call('editor', 'clearAnnotations')

145
package-lock.json generated

@ -7638,53 +7638,112 @@
"integrity": "sha512-tVkIU9JQw5fYPxLQgok/a7I6J1eEZ79svwQGpe2mb3jlVsPADOleefOnQBiS/takK7jQuNeswCUicMH1VWVziA==" "integrity": "sha512-tVkIU9JQw5fYPxLQgok/a7I6J1eEZ79svwQGpe2mb3jlVsPADOleefOnQBiS/takK7jQuNeswCUicMH1VWVziA=="
}, },
"@remixproject/engine": { "@remixproject/engine": {
"version": "0.3.11", "version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.11.tgz", "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.16.tgz",
"integrity": "sha512-gRTOM4WolVuECOxeMcTD30iCZ4TJTZE+osYyNFnypgHQECcMtibATnulFc0zx+RtGm17KPEk5dW865fG01q+IA==", "integrity": "sha512-UI8Hg4l8oxaaBYNMcUI59C2terQL2Of4Bf9/AVETy67EFxwi3U8dHqSjkVJHz+rRYBSMSVnjcw3jaO1+0C3K4g==",
"requires": { "requires": {
"@remixproject/plugin-api": "0.3.11", "@remixproject/plugin-api": "0.3.16",
"@remixproject/plugin-utils": "0.3.11" "@remixproject/plugin-utils": "0.3.16"
},
"dependencies": {
"@remixproject/plugin-api": {
"version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.16.tgz",
"integrity": "sha512-PuSo6GGjKXwCZr3KjCrqGxLF2sZJFpueb9cjwLeAi1y9C4VoPRjWFIC6bESn1EVL9DyqcET7a8IwuqhHVGOGSQ==",
"requires": {
"@remixproject/plugin-utils": "0.3.16"
}
},
"@remixproject/plugin-utils": {
"version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.16.tgz",
"integrity": "sha512-3zV1zdpkdgT4/fa4s4a3KdcZFpHR0a2ye5BMDRZZr0fZeGBaL9B7Lh52wvQuRJ384E60xwqjMytZLmi3qvL5SA==",
"requires": {
"tslib": "2.0.1"
}
},
"tslib": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz",
"integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ=="
}
} }
}, },
"@remixproject/engine-web": { "@remixproject/engine-web": {
"version": "0.3.11", "version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/engine-web/-/engine-web-0.3.11.tgz", "resolved": "https://registry.npmjs.org/@remixproject/engine-web/-/engine-web-0.3.16.tgz",
"integrity": "sha512-oM4kRKQ6R5ZWT6Ih542XtvFBLx9E5kUHU7H1t0DlI2A/w6arP4cC7WQwNK8TsnysVSjoJ5kveHb6tVntxhBGSg==", "integrity": "sha512-eZPs/cofoyZQWMcr4ukhn36IWi52m24LIj+GqUEfdcVpdXO4wkM0ATt4Wrk1WeOcNhlld3G27VfSS2jn2k0BnA==",
"requires": { "requires": {
"@remixproject/engine": "0.3.11", "@remixproject/engine": "0.3.16",
"@remixproject/plugin-api": "0.3.11", "@remixproject/plugin-api": "0.3.16",
"@remixproject/plugin-utils": "0.3.11" "@remixproject/plugin-utils": "0.3.16"
} }
}, },
"@remixproject/plugin": { "@remixproject/plugin": {
"version": "0.3.11", "version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.11.tgz", "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.16.tgz",
"integrity": "sha512-GbZV9KjZoALYUCEXDIhDWQFR3hi3m3R03WDm/i/XSIaJRkyya2WU6IzmqkvCT7TuTR+VfdJoWnflZTQWesLB1A==", "integrity": "sha512-UAtv3Te/jCZ4V30QSSNbudLhMS45zA97XIzcg894milJZm7E+rg+YUP2RQn88sqSBPbETPFF5LT93KgP1+IIzw==",
"requires": { "requires": {
"@remixproject/plugin-api": "0.3.11", "@remixproject/plugin-api": "0.3.16",
"@remixproject/plugin-utils": "0.3.11", "@remixproject/plugin-utils": "0.3.16",
"events": "3.2.0" "events": "3.2.0"
}, },
"dependencies": { "dependencies": {
"@remixproject/plugin-api": {
"version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.16.tgz",
"integrity": "sha512-PuSo6GGjKXwCZr3KjCrqGxLF2sZJFpueb9cjwLeAi1y9C4VoPRjWFIC6bESn1EVL9DyqcET7a8IwuqhHVGOGSQ==",
"requires": {
"@remixproject/plugin-utils": "0.3.16"
}
},
"@remixproject/plugin-utils": {
"version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.16.tgz",
"integrity": "sha512-3zV1zdpkdgT4/fa4s4a3KdcZFpHR0a2ye5BMDRZZr0fZeGBaL9B7Lh52wvQuRJ384E60xwqjMytZLmi3qvL5SA==",
"requires": {
"tslib": "2.0.1"
}
},
"events": { "events": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz",
"integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==" "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg=="
},
"tslib": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz",
"integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ=="
} }
} }
}, },
"@remixproject/plugin-api": { "@remixproject/plugin-api": {
"version": "0.3.11", "version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.11.tgz", "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.16.tgz",
"integrity": "sha512-hH9XJVkpqWAST4iVbm5erWOW6pxt70fbhY/kkcC6DuGO4wmcN16bwhIUDenMEOyTQiuHIM98kEZMiacKtPKmzg==", "integrity": "sha512-PuSo6GGjKXwCZr3KjCrqGxLF2sZJFpueb9cjwLeAi1y9C4VoPRjWFIC6bESn1EVL9DyqcET7a8IwuqhHVGOGSQ==",
"requires": { "requires": {
"@remixproject/plugin-utils": "0.3.11" "@remixproject/plugin-utils": "0.3.16"
},
"dependencies": {
"@remixproject/plugin-utils": {
"version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.16.tgz",
"integrity": "sha512-3zV1zdpkdgT4/fa4s4a3KdcZFpHR0a2ye5BMDRZZr0fZeGBaL9B7Lh52wvQuRJ384E60xwqjMytZLmi3qvL5SA==",
"requires": {
"tslib": "2.0.1"
}
},
"tslib": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz",
"integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ=="
}
} }
}, },
"@remixproject/plugin-utils": { "@remixproject/plugin-utils": {
"version": "0.3.11", "version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.11.tgz", "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.16.tgz",
"integrity": "sha512-dSO/WV1zJOXsbGiY99Hx8ewh5Whhul+Z2KyI2xFPCJTKkYLXntgFv7CuHvY2c7X2SBLDenqp6dh3yDGQcTlbxQ==", "integrity": "sha512-3zV1zdpkdgT4/fa4s4a3KdcZFpHR0a2ye5BMDRZZr0fZeGBaL9B7Lh52wvQuRJ384E60xwqjMytZLmi3qvL5SA==",
"requires": { "requires": {
"tslib": "2.0.1" "tslib": "2.0.1"
}, },
@ -7697,23 +7756,39 @@
} }
}, },
"@remixproject/plugin-webview": { "@remixproject/plugin-webview": {
"version": "0.3.11", "version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/plugin-webview/-/plugin-webview-0.3.11.tgz", "resolved": "https://registry.npmjs.org/@remixproject/plugin-webview/-/plugin-webview-0.3.16.tgz",
"integrity": "sha512-lrZNtH1MCshF3wMU997Xn6UNWkIgmmZaXhxgxlB7S2S01IWlWd+5z6fZBmXcWGJwld424gRzbNm3IkPwAml9yw==", "integrity": "sha512-k//rLFsmDTiDCWzXsxGFBXE+KFDMdZtITQMCsf6sARfSc1SWLZ8+iwFCg9zve10lUEyc0CASdzpaWfITxw2ajQ==",
"requires": { "requires": {
"@remixproject/plugin": "0.3.11", "@remixproject/plugin": "0.3.16",
"@remixproject/plugin-api": "0.3.11", "@remixproject/plugin-api": "0.3.16",
"@remixproject/plugin-utils": "0.3.11" "@remixproject/plugin-utils": "0.3.16",
"axios": "^0.21.1"
},
"dependencies": {
"@remixproject/plugin-utils": {
"version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.16.tgz",
"integrity": "sha512-3zV1zdpkdgT4/fa4s4a3KdcZFpHR0a2ye5BMDRZZr0fZeGBaL9B7Lh52wvQuRJ384E60xwqjMytZLmi3qvL5SA==",
"requires": {
"tslib": "2.0.1"
}
},
"tslib": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz",
"integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ=="
}
} }
}, },
"@remixproject/plugin-ws": { "@remixproject/plugin-ws": {
"version": "0.3.11", "version": "0.3.16",
"resolved": "https://registry.npmjs.org/@remixproject/plugin-ws/-/plugin-ws-0.3.11.tgz", "resolved": "https://registry.npmjs.org/@remixproject/plugin-ws/-/plugin-ws-0.3.16.tgz",
"integrity": "sha512-0b4tDisv8zBRS1vdTsr2Jm04xIXeofmCB63iknLa7nf9oG9SizQbxP6V3AhVnVTU91r+YvoBI7B6a3KP7G1UuQ==", "integrity": "sha512-J8B21v5rRIGCY/KjuJzYQEtMUSCQhWDVlUrqWlqIAIJp+4+E8lNuPycMXhOXSCEJfgVaGvjxb/AmJMH4Jmqw/w==",
"requires": { "requires": {
"@remixproject/plugin": "0.3.11", "@remixproject/plugin": "0.3.16",
"@remixproject/plugin-api": "0.3.11", "@remixproject/plugin-api": "0.3.16",
"@remixproject/plugin-utils": "0.3.11" "@remixproject/plugin-utils": "0.3.16"
} }
}, },
"@restart/context": { "@restart/context": {

@ -134,13 +134,13 @@
"@ethereumjs/common": "^2.2.0", "@ethereumjs/common": "^2.2.0",
"@ethereumjs/tx": "^3.1.3", "@ethereumjs/tx": "^3.1.3",
"@ethereumjs/vm": "^5.3.2", "@ethereumjs/vm": "^5.3.2",
"@remixproject/engine": "^0.3.11", "@remixproject/engine": "^0.3.16",
"@remixproject/engine-web": "^0.3.11", "@remixproject/engine-web": "^0.3.16",
"@remixproject/plugin": "^0.3.11", "@remixproject/plugin": "^0.3.16",
"@remixproject/plugin-api": "^0.3.11", "@remixproject/plugin-api": "^0.3.16",
"@remixproject/plugin-utils": "^0.3.11", "@remixproject/plugin-utils": "^0.3.16",
"@remixproject/plugin-webview": "^0.3.11", "@remixproject/plugin-webview": "^0.3.16",
"@remixproject/plugin-ws": "^0.3.11", "@remixproject/plugin-ws": "^0.3.16",
"ansi-gray": "^0.1.1", "ansi-gray": "^0.1.1",
"async": "^2.6.2", "async": "^2.6.2",
"axios": ">=0.21.1", "axios": ">=0.21.1",
@ -159,7 +159,6 @@
"isbinaryfile": "^3.0.2", "isbinaryfile": "^3.0.2",
"jquery": "^3.3.1", "jquery": "^3.3.1",
"jszip": "^3.6.0", "jszip": "^3.6.0",
"lodash": "^4.17.21",
"latest-version": "^5.1.0", "latest-version": "^5.1.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"merge": "^1.2.0", "merge": "^1.2.0",

Loading…
Cancel
Save