From 68850867289578e7a74aa276f510b4b0d16195b8 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 19 Oct 2020 17:23:46 +0200 Subject: [PATCH 01/19] use remix plugin 0.3 --- .../src/tests/pluginManager.test.ts | 6 +- apps/remix-ide/src/app.js | 18 ++- apps/remix-ide/src/app/files/remixd-handle.js | 2 +- apps/remix-ide/src/app/tabs/debugger-tab.js | 2 +- apps/remix-ide/src/remixAppManager.js | 14 +- libs/remixd/package.json | 8 +- package-lock.json | 131 ++++++++++++++---- package.json | 21 +-- 8 files changed, 139 insertions(+), 63 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/pluginManager.test.ts b/apps/remix-ide-e2e/src/tests/pluginManager.test.ts index 037b24e168..b1bf4be435 100644 --- a/apps/remix-ide-e2e/src/tests/pluginManager.test.ts +++ b/apps/remix-ide-e2e/src/tests/pluginManager.test.ts @@ -44,6 +44,7 @@ module.exports = { browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') .click('*[data-id="pluginManagerComponentPluginManager"]') .scrollAndClick('*[data-id="pluginManagerComponentActivateButtondebugger"]') + .pause(2000) .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtondebugger"]') .scrollAndClick('*[data-id="pluginManagerComponentActivateButtonvyper"]') .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonvyper"]') @@ -54,8 +55,11 @@ module.exports = { 'Should deactivate plugins': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') .click('*[data-id="pluginManagerComponentPluginManager"]') - .scrollAndClick('*[data-id="pluginManagerComponentDeactivateButtondebugger"]') + .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtondebugger"]') + .pause(2000) + .scrollAndClick('*[data-id="pluginManagerComponentDeactivateButtondebugger"]') .waitForElementVisible('*[data-id="pluginManagerComponentActivateButtondebugger"]') + .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonvyper"]') .scrollAndClick('*[data-id="pluginManagerComponentDeactivateButtonvyper"]') .waitForElementVisible('*[data-id="pluginManagerComponentActivateButtonvyper"]') }, diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index be828f3c1d..3db0f42dfb 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -231,14 +231,14 @@ Please make a backup of your contracts and start using http://remix.ethereum.org const appManager = self.appManager const pluginLoader = appManager.pluginLoader const workspace = pluginLoader.get() - const engine = new Engine(appManager) + const engine = new Engine() engine.setPluginOption = ({ name, kind }) => { if (kind === 'provider') return { queueTimeout: 60000 * 2 } if (name === 'LearnEth') return { queueTimeout: 60000 } return { queueTimeout: 10000 } } - await engine.onload() - + engine.register(appManager) + // SERVICES // ----------------- import content servive ------------------------ const contentImport = new CompilerImport() @@ -401,17 +401,17 @@ Please make a backup of your contracts and start using http://remix.ethereum.org await appManager.activatePlugin(['contentImport', 'theme', 'editor', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'network', 'web3Provider', 'offsetToLineColumnConverter']) await appManager.activatePlugin(['mainPanel', 'menuicons']) await appManager.activatePlugin(['sidePanel']) // activating host plugin separately - await appManager.activatePlugin(['home', 'hiddenPanel', 'pluginManager', 'fileExplorers', 'settings', 'contextualListener', 'scriptRunner', 'terminal', 'fetchAndCompile']) + await appManager.activatePlugin(['home', 'hiddenPanel', 'pluginManager', 'fileExplorers', 'settings', 'contextualListener', 'terminal', 'fetchAndCompile']) const queryParams = new QueryParams() const params = queryParams.get() // Set workspace after initial activation - if (Array.isArray(workspace)) { - appManager.activatePlugin(workspace).then(() => { + if (Array.isArray(workspace)) { + appManager.activatePlugin(workspace).then(async () => { try { if (params.deactivate) { - appManager.deactivatePlugin(params.deactivate.split(',')) + await appManager.deactivatePlugin(params.deactivate.split(',')) } } catch (e) { console.log(e) @@ -425,9 +425,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org if (callDetails.length > 1) { toolTip(`initiating ${callDetails[0]} ...`) // @todo(remove the timeout when activatePlugin is on 0.3.0) - setTimeout(() => { - appManager.call(...callDetails).catch(console.error) - }, 5000) + appManager.call(...callDetails).catch(console.error) } } }).catch(console.error) diff --git a/apps/remix-ide/src/app/files/remixd-handle.js b/apps/remix-ide/src/app/files/remixd-handle.js index cd16ea3b9c..1bfcb2cd17 100644 --- a/apps/remix-ide/src/app/files/remixd-handle.js +++ b/apps/remix-ide/src/app/files/remixd-handle.js @@ -1,5 +1,5 @@ import isElectron from 'is-electron' -import { WebsocketPlugin } from '@remixproject/engine' +import { WebsocketPlugin } from '@remixproject/engine-web' import * as packageJson from '../../../../../package.json' var yo = require('yo-yo') var modalDialog = require('../ui/modaldialog') diff --git a/apps/remix-ide/src/app/tabs/debugger-tab.js b/apps/remix-ide/src/app/tabs/debugger-tab.js index 13bd7fea3b..77a71d81fc 100644 --- a/apps/remix-ide/src/app/tabs/debugger-tab.js +++ b/apps/remix-ide/src/app/tabs/debugger-tab.js @@ -63,7 +63,7 @@ class DebuggerTab extends ViewPlugin { this.renderComponent() - this.call('manager', 'activatePlugin', 'source-verification').catch(e => console.log(e.message)) + this.call('manager', 'activatePlugin', 'source-verification').catch(e => console.error(e)) // this.call('manager', 'activatePlugin', 'udapp') return this.el diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index cff0b20919..884b625614 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -1,5 +1,6 @@ /* global localStorage, fetch */ -import { PluginManager, IframePlugin } from '@remixproject/engine' +import { PluginManager } from '@remixproject/engine' +import { IframePlugin } from '@remixproject/engine-web' import { EventEmitter } from 'events' import QueryParams from './lib/query-params' import { PermissionHandler } from './app/ui/persmission-handler' @@ -27,11 +28,12 @@ export class RemixAppManager extends PluginManager { this.permissionHandler = new PermissionHandler() } - async canActivate (from, to) { - return canActivate(from.name) + async canActivatePlugin (from, to) { + return true // canActivate(from.name) } - async canDeactivate (from, to) { + async canDeactivatePlugin (from, to) { + console.log('canDeactivatePlugin', from, to) return from.name === 'manager' } @@ -68,8 +70,8 @@ export class RemixAppManager extends PluginManager { this.event.emit('deactivate', plugin) } - onRegistration (plugin) { - this.event.emit('added', plugin.name) + onRegistration () { + console.log('manager has been registered') } async ensureActivated (apiName) { diff --git a/libs/remixd/package.json b/libs/remixd/package.json index b80f142149..41e73def6a 100644 --- a/libs/remixd/package.json +++ b/libs/remixd/package.json @@ -35,10 +35,10 @@ }, "homepage": "https://github.com/ethereum/remix-project#readme", "dependencies": { - "@remixproject/plugin": "0.3.0-beta.5", - "@remixproject/plugin-api": "0.3.0-beta.5", - "@remixproject/plugin-utils": "0.3.0-beta.5", - "@remixproject/plugin-ws": "^0.3.0-beta.8", + "@remixproject/plugin": "^0.3.2", + "@remixproject/plugin-api": "^0.3.2", + "@remixproject/plugin-utils": "^0.3.2", + "@remixproject/plugin-ws": "^0.3.2", "axios": "^0.20.0", "chokidar": "^2.1.8", "commander": "^2.20.3", diff --git a/package-lock.json b/package-lock.json index 0241ba7429..3b04ba1708 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6880,57 +6880,128 @@ "integrity": "sha512-tVkIU9JQw5fYPxLQgok/a7I6J1eEZ79svwQGpe2mb3jlVsPADOleefOnQBiS/takK7jQuNeswCUicMH1VWVziA==" }, "@remixproject/engine": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.2.4.tgz", - "integrity": "sha512-rCekA2QZq5wbT7h9wqU+TDkRexUqhnMqcggmP+eG6ilowyZ4RhMsrrSl3fsZzd0rnp4w1LSmX0vCbuXfja3RqQ==" + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.2.tgz", + "integrity": "sha512-kou/v2/EdB3H81vsFA/i//AEx2byVs1l0sdynoj+e7q8pGIMVFs7YCuXj+2DU+UDKUG3JGnyi4jKRygqBq0Wqw==", + "requires": { + "@remixproject/plugin-api": "0.3.2", + "@remixproject/plugin-utils": "0.3.2" + } + }, + "@remixproject/engine-web": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/engine-web/-/engine-web-0.3.2.tgz", + "integrity": "sha512-52uehTVnJoNP3E0WarqItPTJrLEmvw4FHr8vp2Ww/zyyT9n4JPdmJamdPEI5Dszafp5TtMapQHGIPA0+GrMcYw==", + "requires": { + "@remixproject/engine": "0.3.2", + "@remixproject/plugin-api": "0.3.2", + "@remixproject/plugin-utils": "0.3.2" + }, + "dependencies": { + "@remixproject/engine": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.2.tgz", + "integrity": "sha512-kou/v2/EdB3H81vsFA/i//AEx2byVs1l0sdynoj+e7q8pGIMVFs7YCuXj+2DU+UDKUG3JGnyi4jKRygqBq0Wqw==", + "requires": { + "@remixproject/plugin-api": "0.3.2", + "@remixproject/plugin-utils": "0.3.2" + } + }, + "@remixproject/plugin-api": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.2.tgz", + "integrity": "sha512-SR9NPv7hstTorUkna1LjdF5bEclNk0ejzGKmkzO3khCvw/Mii1H8lXo1W9fX1tmqpVqWYCdV/0hY5rnFnQAlSw==", + "requires": { + "@remixproject/plugin-utils": "0.3.2" + } + }, + "@remixproject/plugin-utils": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.2.tgz", + "integrity": "sha512-i7VQNU6XaigUgOoOHM0M379dAKLtKt83nHBSR2SZyt/397aQsBDuYg1Nwv4Y46S74FrZRKFRX9YGNZj1usB2IQ==", + "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": { - "version": "0.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.0-beta.5.tgz", - "integrity": "sha512-mQgXUhGNc+tQGIIFw7OaBaH7sZTBvDk8Gf4fS1NXhO5ilvykw9TXv5LXWoWkJCWQlKGuUTWd+U1XNpm5dPD3ag==" + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.2.tgz", + "integrity": "sha512-WfTjlIL+MqWKnY2wl6t4/hmmq+H3TY+Mofl04AGYZwr1yKgG7csPJFgZZDq74biPXNhHb+9xS2S18ytzutjLYg==", + "requires": { + "@remixproject/plugin-api": "0.3.2", + "@remixproject/plugin-utils": "0.3.2", + "events": "3.2.0" + }, + "dependencies": { + "events": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", + "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==" + } + } }, "@remixproject/plugin-api": { - "version": "0.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.0-beta.5.tgz", - "integrity": "sha512-C1fuISsne3sfA61k1rx6qU9ZgubyP8SdNKinzeYvXg4XAm1DwoHQlzjq/WYmjOFx1NZhyMGK8ySBp0VcjAMc/Q==" + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.2.tgz", + "integrity": "sha512-SR9NPv7hstTorUkna1LjdF5bEclNk0ejzGKmkzO3khCvw/Mii1H8lXo1W9fX1tmqpVqWYCdV/0hY5rnFnQAlSw==", + "requires": { + "@remixproject/plugin-utils": "0.3.2" + } }, "@remixproject/plugin-utils": { - "version": "0.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.0-beta.5.tgz", - "integrity": "sha512-+gnfuSUimCxUTRxfTGu+mwI5U6EPUx2A2ANObaZzX8f17nhSW5NWw2vWKauZPSv2PWQoIukYzrmG/kogEe3Cyw==" + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.2.tgz", + "integrity": "sha512-i7VQNU6XaigUgOoOHM0M379dAKLtKt83nHBSR2SZyt/397aQsBDuYg1Nwv4Y46S74FrZRKFRX9YGNZj1usB2IQ==", + "requires": { + "tslib": "2.0.1" + }, + "dependencies": { + "tslib": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", + "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + } + } }, "@remixproject/plugin-ws": { - "version": "0.3.0-beta.11", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-ws/-/plugin-ws-0.3.0-beta.11.tgz", - "integrity": "sha512-wQueX0k99S96G4/jDbCmAn7V4RxDQpaCjaHBkpdr6Oc1ErfUnkplzJLfGs1EgnxCrONnHxDz6YEdKEs/zaHkqw==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-ws/-/plugin-ws-0.3.2.tgz", + "integrity": "sha512-maHL5mZDafELnnyPTO15Jy1y9lfZL0BBhzNqkSVwxtATakqPBLvoFoQpj5Co3xFaH3Kqb+Rb47VxaT415pPjeg==", "requires": { - "@remixproject/plugin": "0.3.0-beta.11", - "@remixproject/plugin-api": "0.3.0-beta.11", - "@remixproject/plugin-utils": "0.3.0-beta.11" + "@remixproject/plugin": "0.3.2", + "@remixproject/plugin-api": "0.3.2", + "@remixproject/plugin-utils": "0.3.2" }, "dependencies": { "@remixproject/plugin": { - "version": "0.3.0-beta.11", - "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.0-beta.11.tgz", - "integrity": "sha512-/K7EJUXjSf5AqoPJAQ7VKQi7UTmPysHyV9hDLGPoe8tjl4s5ghjopiYLu6uM1WrR4Bz1DvU4hsRObe/PUAmprA==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.2.tgz", + "integrity": "sha512-WfTjlIL+MqWKnY2wl6t4/hmmq+H3TY+Mofl04AGYZwr1yKgG7csPJFgZZDq74biPXNhHb+9xS2S18ytzutjLYg==", "requires": { - "@remixproject/plugin-api": "0.3.0-beta.11", - "@remixproject/plugin-utils": "0.3.0-beta.11", + "@remixproject/plugin-api": "0.3.2", + "@remixproject/plugin-utils": "0.3.2", "events": "3.2.0" } }, "@remixproject/plugin-api": { - "version": "0.3.0-beta.11", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.0-beta.11.tgz", - "integrity": "sha512-qmIxfoFivQ6Dtz4RUEGSpSVW6TgcT5pwGuSOFBNm0LcYapqsoY4uWIfNpnP4odH4nVCBaFmARlveOf5magFxAw==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.2.tgz", + "integrity": "sha512-SR9NPv7hstTorUkna1LjdF5bEclNk0ejzGKmkzO3khCvw/Mii1H8lXo1W9fX1tmqpVqWYCdV/0hY5rnFnQAlSw==", "requires": { - "@remixproject/plugin-utils": "0.3.0-beta.11" + "@remixproject/plugin-utils": "0.3.2" } }, "@remixproject/plugin-utils": { - "version": "0.3.0-beta.11", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.0-beta.11.tgz", - "integrity": "sha512-M/ghKF75lLQX6sp993E+3DGtezgY5oCL8659pH2cRpK8MMFX5cJggBfK5Fil29FIdwNOSzXM+W0/JnxnRyQAZA==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.2.tgz", + "integrity": "sha512-i7VQNU6XaigUgOoOHM0M379dAKLtKt83nHBSR2SZyt/397aQsBDuYg1Nwv4Y46S74FrZRKFRX9YGNZj1usB2IQ==", "requires": { "tslib": "2.0.1" } diff --git a/package.json b/package.json index 977a20160a..e4c7af1a22 100644 --- a/package.json +++ b/package.json @@ -127,16 +127,26 @@ ] }, "dependencies": { - "@remixproject/engine": "^0.2.3", + "@remixproject/engine": "^0.3.2", + "@remixproject/engine-web": "^0.3.2", + "@remixproject/plugin-ws": "^0.3.2", + "@remixproject/plugin": "^0.3.2", + "@remixproject/plugin-api": "^0.3.2", + "@remixproject/plugin-utils": "^0.3.2", "@types/jest": "^26.0.5", "@types/tape": "^4.2.33", "ansi-gray": "^0.1.1", + "axios": "^0.20.0", "change-case": "^4.1.1", + "chokidar": "^2.1.8", "color-support": "^1.1.3", + "commander": "^2.20.3", "ethereumjs-block": "^2.2.2", "ethereumjs-tx": "^2.1.2", "ethereumjs-vm": "4.1.3", + "fs-extra": "^3.0.1", "http-server": "^0.11.1", + "isbinaryfile": "^3.0.2", "merge": "^1.2.0", "npm-install-version": "^6.0.2", "react": "16.13.1", @@ -145,15 +155,6 @@ "signale": "^1.4.0", "time-stamp": "^2.2.0", "winston": "^3.3.3", - "@remixproject/plugin": "0.3.0-beta.5", - "@remixproject/plugin-api": "0.3.0-beta.5", - "@remixproject/plugin-utils": "0.3.0-beta.5", - "@remixproject/plugin-ws": "^0.3.0-beta.8", - "axios": "^0.20.0", - "chokidar": "^2.1.8", - "commander": "^2.20.3", - "fs-extra": "^3.0.1", - "isbinaryfile": "^3.0.2", "ws": "^7.3.0" }, "devDependencies": { From 42042e9f28197140a9ae8ef15493d0b608283685 Mon Sep 17 00:00:00 2001 From: GrandSchtroumpf Date: Mon, 16 Nov 2020 10:22:49 +0100 Subject: [PATCH 02/19] support for windows --- package-lock.json | 2 +- workspace.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3b04ba1708..9b497e5bd2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36035,7 +36035,7 @@ "events": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", - "integrity": "sha1-k7h8GPjvzUICpGGuxN/AVWtjk3k=", + "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", "dev": true } } diff --git a/workspace.json b/workspace.json index 67e2f3c26b..4c83110f9a 100644 --- a/workspace.json +++ b/workspace.json @@ -104,7 +104,7 @@ "builder": "@nrwl/workspace:run-commands", "options": { "commands": [ - "node_modules/.bin/tsc -p apps/remix-ide-e2e/tsconfig.e2e.json" + "tsc -p apps/remix-ide-e2e/tsconfig.e2e.json" ] } }, From 2a2090ca867773eef2c2ac8bd20ea366ae0d03a3 Mon Sep 17 00:00:00 2001 From: GrandSchtroumpf Date: Mon, 16 Nov 2020 10:28:41 +0100 Subject: [PATCH 03/19] bump remix plugin version --- package-lock.json | 84 +++++++++++++++++++++++++++++++++++++---------- package.json | 5 +-- 2 files changed, 69 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9b497e5bd2..d9d370012d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6889,36 +6889,36 @@ } }, "@remixproject/engine-web": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@remixproject/engine-web/-/engine-web-0.3.2.tgz", - "integrity": "sha512-52uehTVnJoNP3E0WarqItPTJrLEmvw4FHr8vp2Ww/zyyT9n4JPdmJamdPEI5Dszafp5TtMapQHGIPA0+GrMcYw==", + "version": "0.3.3-alpha", + "resolved": "https://registry.npmjs.org/@remixproject/engine-web/-/engine-web-0.3.3-alpha.tgz", + "integrity": "sha512-ySax3ldAtopVLkPYpCo8GDKD3Gzhw2Ujz8QfAD2m3a5Yspw5b9XgX4xIf89uMgigGISPf+C8+Tt0mtVSR59ygg==", "requires": { - "@remixproject/engine": "0.3.2", - "@remixproject/plugin-api": "0.3.2", - "@remixproject/plugin-utils": "0.3.2" + "@remixproject/engine": "0.3.3-alpha", + "@remixproject/plugin-api": "0.3.3-alpha", + "@remixproject/plugin-utils": "0.3.3-alpha" }, "dependencies": { "@remixproject/engine": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.2.tgz", - "integrity": "sha512-kou/v2/EdB3H81vsFA/i//AEx2byVs1l0sdynoj+e7q8pGIMVFs7YCuXj+2DU+UDKUG3JGnyi4jKRygqBq0Wqw==", + "version": "0.3.3-alpha", + "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.3-alpha.tgz", + "integrity": "sha512-+TMshwYL8+0EZFGiDvjV2i9obdemolvq/cjsULj7+zcOodMjDZH5vgOHmygHSemRtMKprpEqtxcHhVdWu5kDqw==", "requires": { - "@remixproject/plugin-api": "0.3.2", - "@remixproject/plugin-utils": "0.3.2" + "@remixproject/plugin-api": "0.3.3-alpha", + "@remixproject/plugin-utils": "0.3.3-alpha" } }, "@remixproject/plugin-api": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.2.tgz", - "integrity": "sha512-SR9NPv7hstTorUkna1LjdF5bEclNk0ejzGKmkzO3khCvw/Mii1H8lXo1W9fX1tmqpVqWYCdV/0hY5rnFnQAlSw==", + "version": "0.3.3-alpha", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.3-alpha.tgz", + "integrity": "sha512-dgUiNv63aNmyHRK0uCTnkCFswwvf3ggf8q349elJpEqDG8Fi9dHoCNgL3BCa3zKZWHW1rw0nyAw4Gdp77nXR0g==", "requires": { - "@remixproject/plugin-utils": "0.3.2" + "@remixproject/plugin-utils": "0.3.3-alpha" } }, "@remixproject/plugin-utils": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.2.tgz", - "integrity": "sha512-i7VQNU6XaigUgOoOHM0M379dAKLtKt83nHBSR2SZyt/397aQsBDuYg1Nwv4Y46S74FrZRKFRX9YGNZj1usB2IQ==", + "version": "0.3.3-alpha", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.3-alpha.tgz", + "integrity": "sha512-CZqkfP6tv8NPb0KZsbg2HwwkKl/lngcO2Zb3WrXqd1OTGQFgBhkwF6bXt2sdleLgCgj140ObeuFyRzzW6yB2Yg==", "requires": { "tslib": "2.0.1" } @@ -6970,6 +6970,54 @@ } } }, + "@remixproject/plugin-webview": { + "version": "0.3.3-alpha", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-webview/-/plugin-webview-0.3.3-alpha.tgz", + "integrity": "sha512-vz0u/vSmk46Y/LsRNYTZtVbY1baaigmjisC9cNt/7oPtzSRhFmT00IDesCJI+J9J3+vo3gCBdt42P0ta4skr2A==", + "requires": { + "@remixproject/plugin": "0.3.3-alpha", + "@remixproject/plugin-api": "0.3.3-alpha", + "@remixproject/plugin-utils": "0.3.3-alpha" + }, + "dependencies": { + "@remixproject/plugin": { + "version": "0.3.3-alpha", + "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.3-alpha.tgz", + "integrity": "sha512-KpmPWOdLyaxVZAxiaXaltX4IPkrruZ1StbGm5LHVOjDAAQAxL09/vkc5jQCBbwMfOJgnUKPuGFpQ/17ZyatIAA==", + "requires": { + "@remixproject/plugin-api": "0.3.3-alpha", + "@remixproject/plugin-utils": "0.3.3-alpha", + "events": "3.2.0" + } + }, + "@remixproject/plugin-api": { + "version": "0.3.3-alpha", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.3-alpha.tgz", + "integrity": "sha512-dgUiNv63aNmyHRK0uCTnkCFswwvf3ggf8q349elJpEqDG8Fi9dHoCNgL3BCa3zKZWHW1rw0nyAw4Gdp77nXR0g==", + "requires": { + "@remixproject/plugin-utils": "0.3.3-alpha" + } + }, + "@remixproject/plugin-utils": { + "version": "0.3.3-alpha", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.3-alpha.tgz", + "integrity": "sha512-CZqkfP6tv8NPb0KZsbg2HwwkKl/lngcO2Zb3WrXqd1OTGQFgBhkwF6bXt2sdleLgCgj140ObeuFyRzzW6yB2Yg==", + "requires": { + "tslib": "2.0.1" + } + }, + "events": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", + "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-ws": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@remixproject/plugin-ws/-/plugin-ws-0.3.2.tgz", diff --git a/package.json b/package.json index e4c7af1a22..ffb1d49452 100644 --- a/package.json +++ b/package.json @@ -128,11 +128,12 @@ }, "dependencies": { "@remixproject/engine": "^0.3.2", - "@remixproject/engine-web": "^0.3.2", - "@remixproject/plugin-ws": "^0.3.2", + "@remixproject/engine-web": "^0.3.3-alpha", "@remixproject/plugin": "^0.3.2", "@remixproject/plugin-api": "^0.3.2", "@remixproject/plugin-utils": "^0.3.2", + "@remixproject/plugin-webview": "^0.3.3-alpha", + "@remixproject/plugin-ws": "^0.3.2", "@types/jest": "^26.0.5", "@types/tape": "^4.2.33", "ansi-gray": "^0.1.1", From 08c93fdc6f7130ce44c63d4b70c2dcb11714a0ca Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Nov 2020 12:25:32 +0100 Subject: [PATCH 04/19] comment activation of source-verification --- apps/remix-ide/src/app/tabs/debugger-tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/debugger-tab.js b/apps/remix-ide/src/app/tabs/debugger-tab.js index 77a71d81fc..8789629a02 100644 --- a/apps/remix-ide/src/app/tabs/debugger-tab.js +++ b/apps/remix-ide/src/app/tabs/debugger-tab.js @@ -63,7 +63,7 @@ class DebuggerTab extends ViewPlugin { this.renderComponent() - this.call('manager', 'activatePlugin', 'source-verification').catch(e => console.error(e)) + // this.call('manager', 'activatePlugin', 'source-verification').catch(e => console.error(e)) // this.call('manager', 'activatePlugin', 'udapp') return this.el From 01d9d08f3547be7af065e06f7324250f60e51eef Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Nov 2020 14:33:47 +0100 Subject: [PATCH 05/19] make sure to wait before continuing --- apps/remix-ide/src/remixAppManager.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index 884b625614..c636743626 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -34,6 +34,7 @@ export class RemixAppManager extends PluginManager { async canDeactivatePlugin (from, to) { console.log('canDeactivatePlugin', from, to) + if (requiredModules.includes(name)) return false return from.name === 'manager' } @@ -84,11 +85,6 @@ export class RemixAppManager extends PluginManager { this.event.emit('ensureDeactivated', apiName) } - deactivatePlugin (name) { - if (requiredModules.includes(name)) return - super.deactivatePlugin(name) - } - isRequired (name) { return requiredModules.includes(name) } From e16becfa4639cd3cdc336a0ce109b363e8583c2e Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Nov 2020 16:13:49 +0100 Subject: [PATCH 06/19] fix imports --- .../src/app/components/plugin-manager-component.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/components/plugin-manager-component.js b/apps/remix-ide/src/app/components/plugin-manager-component.js index 556a8df5b3..c145095a08 100644 --- a/apps/remix-ide/src/app/components/plugin-manager-component.js +++ b/apps/remix-ide/src/app/components/plugin-manager-component.js @@ -1,10 +1,12 @@ -import { ViewPlugin, IframePlugin, WebsocketPlugin } from '@remixproject/engine' import { PluginManagerSettings } from './plugin-manager-settings' -import * as packageJson from '../../../../../package.json' const yo = require('yo-yo') const csjs = require('csjs-inject') const EventEmitter = require('events') const LocalPlugin = require('./local-plugin') +import { IframePlugin, WebsocketPlugin } from '@remixproject/engine-web' +import { ViewPlugin } from '@remixproject/engine' +import { PluginManagerSettings } from './plugin-manager-settings' +import * as packageJson from '../../../../../package.json' const addToolTip = require('../ui/tooltip') const css = csjs` From 747a2980b587e5db02c58d3dbc4ab68993b84f68 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Nov 2020 16:36:16 +0100 Subject: [PATCH 07/19] await for activatePlugin --- apps/remix-ide/src/app/components/plugin-manager-component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/components/plugin-manager-component.js b/apps/remix-ide/src/app/components/plugin-manager-component.js index c145095a08..228dcd7c49 100644 --- a/apps/remix-ide/src/app/components/plugin-manager-component.js +++ b/apps/remix-ide/src/app/components/plugin-manager-component.js @@ -153,7 +153,7 @@ class PluginManagerComponent extends ViewPlugin { } const plugin = profile.type === 'iframe' ? new IframePlugin(profile) : new WebsocketPlugin(profile) this.engine.register(plugin) - this.appManager.activatePlugin(plugin.name) + await this.appManager.activatePlugin(plugin.name) } catch (err) { // TODO : Use an alert to handle this error instead of a console.log console.log(`Cannot create Plugin : ${err.message}`) From 67f25ea541ea4527be9dd3df142df62afdf23a97 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Nov 2020 16:36:27 +0100 Subject: [PATCH 08/19] use a real plugin --- apps/remix-ide-e2e/src/tests/pluginManager.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/pluginManager.test.ts b/apps/remix-ide-e2e/src/tests/pluginManager.test.ts index b1bf4be435..eb8422e156 100644 --- a/apps/remix-ide-e2e/src/tests/pluginManager.test.ts +++ b/apps/remix-ide-e2e/src/tests/pluginManager.test.ts @@ -6,7 +6,7 @@ import sauce from './sauce' const testData = { pluginName: 'remixIde', pluginDisplayName: 'Remix IDE', - pluginUrl: 'https://remix-project.org/' + pluginUrl: 'https://zokrates-remix-plugin.netlify.app/' } module.exports = { From 6d0c8834d5de016d574df182d5d468ff6240a30d Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Nov 2020 17:19:07 +0100 Subject: [PATCH 09/19] remix-plugin 0.3.3 --- package-lock.json | 141 +++++++++++++++++++++++++++------------------- package.json | 8 +-- 2 files changed, 86 insertions(+), 63 deletions(-) diff --git a/package-lock.json b/package-lock.json index d9d370012d..489bcc0b46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6880,45 +6880,68 @@ "integrity": "sha512-tVkIU9JQw5fYPxLQgok/a7I6J1eEZ79svwQGpe2mb3jlVsPADOleefOnQBiS/takK7jQuNeswCUicMH1VWVziA==" }, "@remixproject/engine": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.2.tgz", - "integrity": "sha512-kou/v2/EdB3H81vsFA/i//AEx2byVs1l0sdynoj+e7q8pGIMVFs7YCuXj+2DU+UDKUG3JGnyi4jKRygqBq0Wqw==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.3.tgz", + "integrity": "sha512-0orGJhxHAFMUMokfDVq04yy0cvFknyrk9PcqvJw3KqChhusgkLw/J/KqJszywD9BmIjLgdc3n8vRtCmHICR3mA==", "requires": { - "@remixproject/plugin-api": "0.3.2", - "@remixproject/plugin-utils": "0.3.2" + "@remixproject/plugin-api": "0.3.3", + "@remixproject/plugin-utils": "0.3.3" + }, + "dependencies": { + "@remixproject/plugin-api": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.3.tgz", + "integrity": "sha512-Wsic9cnTj/9B7dGKQEq+VTAwit2o7rtdVwJ+lcI68SbavhNHGo0IUexOZkxwGFL2THchWz2hjfrs80W10yle0A==", + "requires": { + "@remixproject/plugin-utils": "0.3.3" + } + }, + "@remixproject/plugin-utils": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.3.tgz", + "integrity": "sha512-w1WCdS7bDmbaY83ybIjHzFW9TlQUV2Rt6Fw8hXGnT29ontD6mKoBWhoEPYzasMEHG47lmNzDjRToVPhQh54Q+w==", + "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": { - "version": "0.3.3-alpha", - "resolved": "https://registry.npmjs.org/@remixproject/engine-web/-/engine-web-0.3.3-alpha.tgz", - "integrity": "sha512-ySax3ldAtopVLkPYpCo8GDKD3Gzhw2Ujz8QfAD2m3a5Yspw5b9XgX4xIf89uMgigGISPf+C8+Tt0mtVSR59ygg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/engine-web/-/engine-web-0.3.3.tgz", + "integrity": "sha512-GF+WHrZyT8OS9ApmAv6ujUfX/lfxbpfTYbYC0To/EznusrBYfm0tmem1xvmI4PJ5C1NOxz9j862S4I4AxWGOng==", "requires": { - "@remixproject/engine": "0.3.3-alpha", - "@remixproject/plugin-api": "0.3.3-alpha", - "@remixproject/plugin-utils": "0.3.3-alpha" + "@remixproject/engine": "0.3.3", + "@remixproject/plugin-api": "0.3.3", + "@remixproject/plugin-utils": "0.3.3" }, "dependencies": { "@remixproject/engine": { - "version": "0.3.3-alpha", - "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.3-alpha.tgz", - "integrity": "sha512-+TMshwYL8+0EZFGiDvjV2i9obdemolvq/cjsULj7+zcOodMjDZH5vgOHmygHSemRtMKprpEqtxcHhVdWu5kDqw==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.3.tgz", + "integrity": "sha512-0orGJhxHAFMUMokfDVq04yy0cvFknyrk9PcqvJw3KqChhusgkLw/J/KqJszywD9BmIjLgdc3n8vRtCmHICR3mA==", "requires": { - "@remixproject/plugin-api": "0.3.3-alpha", - "@remixproject/plugin-utils": "0.3.3-alpha" + "@remixproject/plugin-api": "0.3.3", + "@remixproject/plugin-utils": "0.3.3" } }, "@remixproject/plugin-api": { - "version": "0.3.3-alpha", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.3-alpha.tgz", - "integrity": "sha512-dgUiNv63aNmyHRK0uCTnkCFswwvf3ggf8q349elJpEqDG8Fi9dHoCNgL3BCa3zKZWHW1rw0nyAw4Gdp77nXR0g==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.3.tgz", + "integrity": "sha512-Wsic9cnTj/9B7dGKQEq+VTAwit2o7rtdVwJ+lcI68SbavhNHGo0IUexOZkxwGFL2THchWz2hjfrs80W10yle0A==", "requires": { - "@remixproject/plugin-utils": "0.3.3-alpha" + "@remixproject/plugin-utils": "0.3.3" } }, "@remixproject/plugin-utils": { - "version": "0.3.3-alpha", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.3-alpha.tgz", - "integrity": "sha512-CZqkfP6tv8NPb0KZsbg2HwwkKl/lngcO2Zb3WrXqd1OTGQFgBhkwF6bXt2sdleLgCgj140ObeuFyRzzW6yB2Yg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.3.tgz", + "integrity": "sha512-w1WCdS7bDmbaY83ybIjHzFW9TlQUV2Rt6Fw8hXGnT29ontD6mKoBWhoEPYzasMEHG47lmNzDjRToVPhQh54Q+w==", "requires": { "tslib": "2.0.1" } @@ -6971,37 +6994,37 @@ } }, "@remixproject/plugin-webview": { - "version": "0.3.3-alpha", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-webview/-/plugin-webview-0.3.3-alpha.tgz", - "integrity": "sha512-vz0u/vSmk46Y/LsRNYTZtVbY1baaigmjisC9cNt/7oPtzSRhFmT00IDesCJI+J9J3+vo3gCBdt42P0ta4skr2A==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-webview/-/plugin-webview-0.3.3.tgz", + "integrity": "sha512-2/O2hUgcTFFmuKYnHl65FW7n591lF1PLAmFUSzoUOezs0iAg8+IP1ydejVXFLWhZByLkiQezHu/kezA5g4cwaQ==", "requires": { - "@remixproject/plugin": "0.3.3-alpha", - "@remixproject/plugin-api": "0.3.3-alpha", - "@remixproject/plugin-utils": "0.3.3-alpha" + "@remixproject/plugin": "0.3.3", + "@remixproject/plugin-api": "0.3.3", + "@remixproject/plugin-utils": "0.3.3" }, "dependencies": { "@remixproject/plugin": { - "version": "0.3.3-alpha", - "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.3-alpha.tgz", - "integrity": "sha512-KpmPWOdLyaxVZAxiaXaltX4IPkrruZ1StbGm5LHVOjDAAQAxL09/vkc5jQCBbwMfOJgnUKPuGFpQ/17ZyatIAA==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.3.tgz", + "integrity": "sha512-gSZdgBjb4y2N2+5kMfbJYjO2zH8b1pFd3xdY4ViL5vtt8l4lup+iOVidrGTv1lPPl7Snk+E8NQhRk8Snr6//mg==", "requires": { - "@remixproject/plugin-api": "0.3.3-alpha", - "@remixproject/plugin-utils": "0.3.3-alpha", + "@remixproject/plugin-api": "0.3.3", + "@remixproject/plugin-utils": "0.3.3", "events": "3.2.0" } }, "@remixproject/plugin-api": { - "version": "0.3.3-alpha", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.3-alpha.tgz", - "integrity": "sha512-dgUiNv63aNmyHRK0uCTnkCFswwvf3ggf8q349elJpEqDG8Fi9dHoCNgL3BCa3zKZWHW1rw0nyAw4Gdp77nXR0g==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.3.tgz", + "integrity": "sha512-Wsic9cnTj/9B7dGKQEq+VTAwit2o7rtdVwJ+lcI68SbavhNHGo0IUexOZkxwGFL2THchWz2hjfrs80W10yle0A==", "requires": { - "@remixproject/plugin-utils": "0.3.3-alpha" + "@remixproject/plugin-utils": "0.3.3" } }, "@remixproject/plugin-utils": { - "version": "0.3.3-alpha", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.3-alpha.tgz", - "integrity": "sha512-CZqkfP6tv8NPb0KZsbg2HwwkKl/lngcO2Zb3WrXqd1OTGQFgBhkwF6bXt2sdleLgCgj140ObeuFyRzzW6yB2Yg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.3.tgz", + "integrity": "sha512-w1WCdS7bDmbaY83ybIjHzFW9TlQUV2Rt6Fw8hXGnT29ontD6mKoBWhoEPYzasMEHG47lmNzDjRToVPhQh54Q+w==", "requires": { "tslib": "2.0.1" } @@ -7019,37 +7042,37 @@ } }, "@remixproject/plugin-ws": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-ws/-/plugin-ws-0.3.2.tgz", - "integrity": "sha512-maHL5mZDafELnnyPTO15Jy1y9lfZL0BBhzNqkSVwxtATakqPBLvoFoQpj5Co3xFaH3Kqb+Rb47VxaT415pPjeg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-ws/-/plugin-ws-0.3.3.tgz", + "integrity": "sha512-QHWv5sjzUIb+rsLyAcOV67tShx8fniJvxYglqURaBc9LXdz0j5QfwnDIGwJwvnkJqAsk3MnXizaIXMU7CvKuzw==", "requires": { - "@remixproject/plugin": "0.3.2", - "@remixproject/plugin-api": "0.3.2", - "@remixproject/plugin-utils": "0.3.2" + "@remixproject/plugin": "0.3.3", + "@remixproject/plugin-api": "0.3.3", + "@remixproject/plugin-utils": "0.3.3" }, "dependencies": { "@remixproject/plugin": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.2.tgz", - "integrity": "sha512-WfTjlIL+MqWKnY2wl6t4/hmmq+H3TY+Mofl04AGYZwr1yKgG7csPJFgZZDq74biPXNhHb+9xS2S18ytzutjLYg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.3.tgz", + "integrity": "sha512-gSZdgBjb4y2N2+5kMfbJYjO2zH8b1pFd3xdY4ViL5vtt8l4lup+iOVidrGTv1lPPl7Snk+E8NQhRk8Snr6//mg==", "requires": { - "@remixproject/plugin-api": "0.3.2", - "@remixproject/plugin-utils": "0.3.2", + "@remixproject/plugin-api": "0.3.3", + "@remixproject/plugin-utils": "0.3.3", "events": "3.2.0" } }, "@remixproject/plugin-api": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.2.tgz", - "integrity": "sha512-SR9NPv7hstTorUkna1LjdF5bEclNk0ejzGKmkzO3khCvw/Mii1H8lXo1W9fX1tmqpVqWYCdV/0hY5rnFnQAlSw==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.3.tgz", + "integrity": "sha512-Wsic9cnTj/9B7dGKQEq+VTAwit2o7rtdVwJ+lcI68SbavhNHGo0IUexOZkxwGFL2THchWz2hjfrs80W10yle0A==", "requires": { - "@remixproject/plugin-utils": "0.3.2" + "@remixproject/plugin-utils": "0.3.3" } }, "@remixproject/plugin-utils": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.2.tgz", - "integrity": "sha512-i7VQNU6XaigUgOoOHM0M379dAKLtKt83nHBSR2SZyt/397aQsBDuYg1Nwv4Y46S74FrZRKFRX9YGNZj1usB2IQ==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.3.tgz", + "integrity": "sha512-w1WCdS7bDmbaY83ybIjHzFW9TlQUV2Rt6Fw8hXGnT29ontD6mKoBWhoEPYzasMEHG47lmNzDjRToVPhQh54Q+w==", "requires": { "tslib": "2.0.1" } diff --git a/package.json b/package.json index ffb1d49452..253f4d9fcc 100644 --- a/package.json +++ b/package.json @@ -127,13 +127,13 @@ ] }, "dependencies": { - "@remixproject/engine": "^0.3.2", - "@remixproject/engine-web": "^0.3.3-alpha", + "@remixproject/engine": "^0.3.3", + "@remixproject/engine-web": "^0.3.3", "@remixproject/plugin": "^0.3.2", "@remixproject/plugin-api": "^0.3.2", "@remixproject/plugin-utils": "^0.3.2", - "@remixproject/plugin-webview": "^0.3.3-alpha", - "@remixproject/plugin-ws": "^0.3.2", + "@remixproject/plugin-webview": "^0.3.3", + "@remixproject/plugin-ws": "^0.3.3", "@types/jest": "^26.0.5", "@types/tape": "^4.2.33", "ansi-gray": "^0.1.1", From 402141d9a0c92a40d3c1c47eb342eb394cecb8ae Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Nov 2020 17:29:41 +0100 Subject: [PATCH 10/19] use remix-plugin 0.3 --- package-lock.json | 31 ++++++++++++++++++++++++++----- package.json | 2 +- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 489bcc0b46..0cc9e8bd18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6954,19 +6954,40 @@ } }, "@remixproject/plugin": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.2.tgz", - "integrity": "sha512-WfTjlIL+MqWKnY2wl6t4/hmmq+H3TY+Mofl04AGYZwr1yKgG7csPJFgZZDq74biPXNhHb+9xS2S18ytzutjLYg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.3.tgz", + "integrity": "sha512-gSZdgBjb4y2N2+5kMfbJYjO2zH8b1pFd3xdY4ViL5vtt8l4lup+iOVidrGTv1lPPl7Snk+E8NQhRk8Snr6//mg==", "requires": { - "@remixproject/plugin-api": "0.3.2", - "@remixproject/plugin-utils": "0.3.2", + "@remixproject/plugin-api": "0.3.3", + "@remixproject/plugin-utils": "0.3.3", "events": "3.2.0" }, "dependencies": { + "@remixproject/plugin-api": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.3.tgz", + "integrity": "sha512-Wsic9cnTj/9B7dGKQEq+VTAwit2o7rtdVwJ+lcI68SbavhNHGo0IUexOZkxwGFL2THchWz2hjfrs80W10yle0A==", + "requires": { + "@remixproject/plugin-utils": "0.3.3" + } + }, + "@remixproject/plugin-utils": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.3.tgz", + "integrity": "sha512-w1WCdS7bDmbaY83ybIjHzFW9TlQUV2Rt6Fw8hXGnT29ontD6mKoBWhoEPYzasMEHG47lmNzDjRToVPhQh54Q+w==", + "requires": { + "tslib": "2.0.1" + } + }, "events": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==" + }, + "tslib": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", + "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" } } }, diff --git a/package.json b/package.json index 253f4d9fcc..e83d609335 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "dependencies": { "@remixproject/engine": "^0.3.3", "@remixproject/engine-web": "^0.3.3", - "@remixproject/plugin": "^0.3.2", + "@remixproject/plugin": "^0.3.3", "@remixproject/plugin-api": "^0.3.2", "@remixproject/plugin-utils": "^0.3.2", "@remixproject/plugin-webview": "^0.3.3", From 4fc000489d86574b9e15e8291544fc8f81d48168 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Nov 2020 17:29:54 +0100 Subject: [PATCH 11/19] use remix-plugin 0.3.3 --- libs/remixd/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/remixd/package.json b/libs/remixd/package.json index 41e73def6a..c5a72cd00f 100644 --- a/libs/remixd/package.json +++ b/libs/remixd/package.json @@ -35,10 +35,10 @@ }, "homepage": "https://github.com/ethereum/remix-project#readme", "dependencies": { - "@remixproject/plugin": "^0.3.2", - "@remixproject/plugin-api": "^0.3.2", - "@remixproject/plugin-utils": "^0.3.2", - "@remixproject/plugin-ws": "^0.3.2", + "@remixproject/plugin": "^0.3.3", + "@remixproject/plugin-api": "^0.3.3", + "@remixproject/plugin-utils": "^0.3.3", + "@remixproject/plugin-ws": "^0.3.3", "axios": "^0.20.0", "chokidar": "^2.1.8", "commander": "^2.20.3", From 049c40b4575386bbd10d2696ca6bc90857b46ba0 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Nov 2020 17:33:15 +0100 Subject: [PATCH 12/19] remove console.log --- apps/remix-ide/src/remixAppManager.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index c636743626..03b1cef7e3 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -33,7 +33,6 @@ export class RemixAppManager extends PluginManager { } async canDeactivatePlugin (from, to) { - console.log('canDeactivatePlugin', from, to) if (requiredModules.includes(name)) return false return from.name === 'manager' } @@ -71,9 +70,7 @@ export class RemixAppManager extends PluginManager { this.event.emit('deactivate', plugin) } - onRegistration () { - console.log('manager has been registered') - } + onRegistration () {} async ensureActivated (apiName) { await this.activatePlugin(apiName) From 23ffb2a0e4ae1ac0d02e019ad5ad3cac2350ef8a Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Nov 2020 17:33:59 +0100 Subject: [PATCH 13/19] can Deactivate rollback --- apps/remix-ide/src/remixAppManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index 03b1cef7e3..d40b6a32e8 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -29,7 +29,7 @@ export class RemixAppManager extends PluginManager { } async canActivatePlugin (from, to) { - return true // canActivate(from.name) + return canActivate(from.name) } async canDeactivatePlugin (from, to) { From c1dc7a4b0e16b8ceeb45f5171e9cd54642072ce0 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Nov 2020 17:34:11 +0100 Subject: [PATCH 14/19] remove commented code --- apps/remix-ide/src/app/tabs/debugger-tab.js | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/debugger-tab.js b/apps/remix-ide/src/app/tabs/debugger-tab.js index 8789629a02..fcdd4dde36 100644 --- a/apps/remix-ide/src/app/tabs/debugger-tab.js +++ b/apps/remix-ide/src/app/tabs/debugger-tab.js @@ -63,7 +63,6 @@ class DebuggerTab extends ViewPlugin { this.renderComponent() - // this.call('manager', 'activatePlugin', 'source-verification').catch(e => console.error(e)) // this.call('manager', 'activatePlugin', 'udapp') return this.el From 2992a0f27e91851057991dd52f6c54b8178ff4dd Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 17 Nov 2020 10:22:50 +0100 Subject: [PATCH 15/19] inherit from Plugin Engine --- apps/remix-ide/src/app.js | 8 ++----- .../components/plugin-manager-component.js | 4 ++-- apps/remix-ide/src/remixEngine.js | 21 +++++++++++++++++++ 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 apps/remix-ide/src/remixEngine.js diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 3db0f42dfb..5958ba1e12 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -5,6 +5,7 @@ import { RunTab, makeUdapp } from './app/udapp' import PanelsResize from './lib/panels-resize' import { Engine } from '@remixproject/engine' +import { RemixEngine } from './remixEngine' import { RemixAppManager } from './remixAppManager' import { FramingService } from './framingService' import { MainView } from './app/panels/main-view' @@ -231,12 +232,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org const appManager = self.appManager const pluginLoader = appManager.pluginLoader const workspace = pluginLoader.get() - const engine = new Engine() - engine.setPluginOption = ({ name, kind }) => { - if (kind === 'provider') return { queueTimeout: 60000 * 2 } - if (name === 'LearnEth') return { queueTimeout: 60000 } - return { queueTimeout: 10000 } - } + const engine = new RemixEngine() engine.register(appManager) // SERVICES diff --git a/apps/remix-ide/src/app/components/plugin-manager-component.js b/apps/remix-ide/src/app/components/plugin-manager-component.js index 228dcd7c49..9bb93455d6 100644 --- a/apps/remix-ide/src/app/components/plugin-manager-component.js +++ b/apps/remix-ide/src/app/components/plugin-manager-component.js @@ -84,9 +84,9 @@ class PluginManagerComponent extends ViewPlugin { this.localPlugin = new LocalPlugin() this.filter = '' this.appManager.event.on('activate', () => { this.reRender() }) - this.appManager.event.on('deactivate', () => { this.reRender() }) - this.appManager.event.on('added', () => { this.reRender() }) + this.appManager.event.on('deactivate', () => { this.reRender() }) this.engine = engine + this.engine.event.on('onRegistration', () => { this.reRender() }) } isActive (name) { diff --git a/apps/remix-ide/src/remixEngine.js b/apps/remix-ide/src/remixEngine.js new file mode 100644 index 0000000000..2e2a8be7cf --- /dev/null +++ b/apps/remix-ide/src/remixEngine.js @@ -0,0 +1,21 @@ +/* global localStorage, fetch */ +import { Engine } from '@remixproject/engine' +import { EventEmitter } from 'events' + +export class RemixEngine extends Engine { + + constructor () { + super() + this.event = new EventEmitter() + } + + setPluginOption ({ name, kind }) { + if (kind === 'provider') return {queueTimeout: 60000 * 2} + if (name === 'LearnEth') return {queueTimeout: 60000} + return {queueTimeout: 10000} + } + + onRegistration (plugin) { + this.event.emit('onRegistration', plugin) + } +} From 1dda6a2e9dc4d2d42d9cd00db8bba8d1ef791fc2 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 17 Nov 2020 11:18:34 +0100 Subject: [PATCH 16/19] engine-web instead of engine for HostPlugin and ViewPlugin --- apps/remix-ide/src/app/components/panel.js | 2 +- apps/remix-ide/src/app/components/plugin-manager-component.js | 3 +-- apps/remix-ide/src/app/panels/file-panel.js | 2 +- apps/remix-ide/src/app/tabs/analysis-tab.js | 2 +- apps/remix-ide/src/app/tabs/compile-tab.js | 2 +- apps/remix-ide/src/app/tabs/debugger-tab.js | 2 +- apps/remix-ide/src/app/tabs/settings-tab.js | 2 +- apps/remix-ide/src/app/tabs/test-tab.js | 2 +- apps/remix-ide/src/app/ui/landing-page/landing-page.js | 2 +- 9 files changed, 9 insertions(+), 10 deletions(-) diff --git a/apps/remix-ide/src/app/components/panel.js b/apps/remix-ide/src/app/components/panel.js index 91b1c07e85..3567fa84ec 100644 --- a/apps/remix-ide/src/app/components/panel.js +++ b/apps/remix-ide/src/app/components/panel.js @@ -1,5 +1,5 @@ import { EventEmitter } from 'events' -import { HostPlugin } from '@remixproject/engine' +import { HostPlugin } from '@remixproject/engine-web' const csjs = require('csjs-inject') const yo = require('yo-yo') diff --git a/apps/remix-ide/src/app/components/plugin-manager-component.js b/apps/remix-ide/src/app/components/plugin-manager-component.js index 9bb93455d6..26793dc977 100644 --- a/apps/remix-ide/src/app/components/plugin-manager-component.js +++ b/apps/remix-ide/src/app/components/plugin-manager-component.js @@ -3,8 +3,7 @@ const yo = require('yo-yo') const csjs = require('csjs-inject') const EventEmitter = require('events') const LocalPlugin = require('./local-plugin') -import { IframePlugin, WebsocketPlugin } from '@remixproject/engine-web' -import { ViewPlugin } from '@remixproject/engine' +import { IframePlugin, ViewPlugin, WebsocketPlugin } from '@remixproject/engine-web' import { PluginManagerSettings } from './plugin-manager-settings' import * as packageJson from '../../../../../package.json' const addToolTip = require('../ui/tooltip') diff --git a/apps/remix-ide/src/app/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index 24bb09c3f4..65e1664b7e 100644 --- a/apps/remix-ide/src/app/panels/file-panel.js +++ b/apps/remix-ide/src/app/panels/file-panel.js @@ -1,4 +1,4 @@ -import { ViewPlugin } from '@remixproject/engine' +import { ViewPlugin } from '@remixproject/engine-web' import * as packageJson from '../../../../../package.json' var yo = require('yo-yo') diff --git a/apps/remix-ide/src/app/tabs/analysis-tab.js b/apps/remix-ide/src/app/tabs/analysis-tab.js index 987c098921..7128c3fe87 100644 --- a/apps/remix-ide/src/app/tabs/analysis-tab.js +++ b/apps/remix-ide/src/app/tabs/analysis-tab.js @@ -1,4 +1,4 @@ -import { ViewPlugin } from '@remixproject/engine' +import { ViewPlugin } from '@remixproject/engine-web' import { EventEmitter } from 'events' import * as packageJson from '../../../../../package.json' diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index 2d4a04b862..ee1e20a6f4 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -1,5 +1,5 @@ /* global */ -import { ViewPlugin } from '@remixproject/engine' +import { ViewPlugin } from '@remixproject/engine-web' import * as packageJson from '../../../../../package.json' import publishToStorage from '../../publishToStorage' import { compile } from '../compiler/compiler-helpers' diff --git a/apps/remix-ide/src/app/tabs/debugger-tab.js b/apps/remix-ide/src/app/tabs/debugger-tab.js index fcdd4dde36..9e3a88566c 100644 --- a/apps/remix-ide/src/app/tabs/debugger-tab.js +++ b/apps/remix-ide/src/app/tabs/debugger-tab.js @@ -1,6 +1,6 @@ import toaster from '../ui/tooltip' import { DebuggerUI } from '@remix-ui/debugger-ui' // eslint-disable-line -import { ViewPlugin } from '@remixproject/engine' +import { ViewPlugin } from '@remixproject/engine-web' import remixDebug, { TransactionDebugger as Debugger } from '@remix-project/remix-debug' import * as packageJson from '../../../../../package.json' import React from 'react' // eslint-disable-line diff --git a/apps/remix-ide/src/app/tabs/settings-tab.js b/apps/remix-ide/src/app/tabs/settings-tab.js index 7936122ef8..67bdbcddb3 100644 --- a/apps/remix-ide/src/app/tabs/settings-tab.js +++ b/apps/remix-ide/src/app/tabs/settings-tab.js @@ -1,4 +1,4 @@ -import { ViewPlugin } from '@remixproject/engine' +import { ViewPlugin } from '@remixproject/engine-web' import * as packageJson from '../../../../../package.json' const yo = require('yo-yo') const globalRegistry = require('../../global/registry') diff --git a/apps/remix-ide/src/app/tabs/test-tab.js b/apps/remix-ide/src/app/tabs/test-tab.js index fa80351b8a..d1eb0b8e5e 100644 --- a/apps/remix-ide/src/app/tabs/test-tab.js +++ b/apps/remix-ide/src/app/tabs/test-tab.js @@ -1,4 +1,4 @@ -import { ViewPlugin } from '@remixproject/engine' +import { ViewPlugin } from '@remixproject/engine-web' import { canUseWorker, urlFromVersion } from '../compiler/compiler-utils' var yo = require('yo-yo') var async = require('async') diff --git a/apps/remix-ide/src/app/ui/landing-page/landing-page.js b/apps/remix-ide/src/app/ui/landing-page/landing-page.js index 8f82ceb911..272f79a5b3 100644 --- a/apps/remix-ide/src/app/ui/landing-page/landing-page.js +++ b/apps/remix-ide/src/app/ui/landing-page/landing-page.js @@ -1,5 +1,5 @@ import * as packageJson from '../../../../../../package.json' -import { ViewPlugin } from '@remixproject/engine' +import { ViewPlugin } from '@remixproject/engine-web' const yo = require('yo-yo') const csjs = require('csjs-inject') From eb8f8fa332f1aaa304e17f2e593c1eafa51c6adb Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 17 Nov 2020 16:16:50 +0100 Subject: [PATCH 17/19] standatf --- apps/remix-ide/src/app.js | 5 ++--- .../src/app/components/plugin-manager-component.js | 7 +++---- apps/remix-ide/src/remixEngine.js | 8 +++----- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 5958ba1e12..bada05e33c 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -4,7 +4,6 @@ import { basicLogo } from './app/ui/svgLogo' import { RunTab, makeUdapp } from './app/udapp' import PanelsResize from './lib/panels-resize' -import { Engine } from '@remixproject/engine' import { RemixEngine } from './remixEngine' import { RemixAppManager } from './remixAppManager' import { FramingService } from './framingService' @@ -234,7 +233,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org const workspace = pluginLoader.get() const engine = new RemixEngine() engine.register(appManager) - + // SERVICES // ----------------- import content servive ------------------------ const contentImport = new CompilerImport() @@ -403,7 +402,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org const params = queryParams.get() // Set workspace after initial activation - if (Array.isArray(workspace)) { + if (Array.isArray(workspace)) { appManager.activatePlugin(workspace).then(async () => { try { if (params.deactivate) { diff --git a/apps/remix-ide/src/app/components/plugin-manager-component.js b/apps/remix-ide/src/app/components/plugin-manager-component.js index 26793dc977..5377e231fe 100644 --- a/apps/remix-ide/src/app/components/plugin-manager-component.js +++ b/apps/remix-ide/src/app/components/plugin-manager-component.js @@ -1,11 +1,10 @@ +import { IframePlugin, ViewPlugin, WebsocketPlugin } from '@remixproject/engine-web' import { PluginManagerSettings } from './plugin-manager-settings' +import * as packageJson from '../../../../../package.json' const yo = require('yo-yo') const csjs = require('csjs-inject') const EventEmitter = require('events') const LocalPlugin = require('./local-plugin') -import { IframePlugin, ViewPlugin, WebsocketPlugin } from '@remixproject/engine-web' -import { PluginManagerSettings } from './plugin-manager-settings' -import * as packageJson from '../../../../../package.json' const addToolTip = require('../ui/tooltip') const css = csjs` @@ -83,7 +82,7 @@ class PluginManagerComponent extends ViewPlugin { this.localPlugin = new LocalPlugin() this.filter = '' this.appManager.event.on('activate', () => { this.reRender() }) - this.appManager.event.on('deactivate', () => { this.reRender() }) + this.appManager.event.on('deactivate', () => { this.reRender() }) this.engine = engine this.engine.event.on('onRegistration', () => { this.reRender() }) } diff --git a/apps/remix-ide/src/remixEngine.js b/apps/remix-ide/src/remixEngine.js index 2e2a8be7cf..abf20340f6 100644 --- a/apps/remix-ide/src/remixEngine.js +++ b/apps/remix-ide/src/remixEngine.js @@ -1,18 +1,16 @@ -/* global localStorage, fetch */ import { Engine } from '@remixproject/engine' import { EventEmitter } from 'events' export class RemixEngine extends Engine { - constructor () { super() this.event = new EventEmitter() } setPluginOption ({ name, kind }) { - if (kind === 'provider') return {queueTimeout: 60000 * 2} - if (name === 'LearnEth') return {queueTimeout: 60000} - return {queueTimeout: 10000} + if (kind === 'provider') return { queueTimeout: 60000 * 2 } + if (name === 'LearnEth') return { queueTimeout: 60000 } + return { queueTimeout: 10000 } } onRegistration (plugin) { From 13bee7ab9134e5d6f0d5b28234bb7c4c0402ee83 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 17 Nov 2020 16:58:35 +0100 Subject: [PATCH 18/19] fix canDeactivatePlugin implementation --- apps/remix-ide/src/remixAppManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index d40b6a32e8..dccb3cbdc0 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -16,7 +16,7 @@ export function isNative (name) { } export function canActivate (name) { - return ['manager', 'debugger', 'ethdoc'].includes(name) + return ['ethdoc'].includes(name) || isNative(name) } export class RemixAppManager extends PluginManager { @@ -33,7 +33,7 @@ export class RemixAppManager extends PluginManager { } async canDeactivatePlugin (from, to) { - if (requiredModules.includes(name)) return false + if (requiredModules.includes(to.name)) return false return from.name === 'manager' } From 76818ec2ab4d48220f9eeb62db92dc65c0000cbe Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 18 Nov 2020 12:34:01 +0100 Subject: [PATCH 19/19] fix e2e tests --- apps/remix-ide-e2e/src/tests/fileManager_api.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts b/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts index ea48ae6f47..2f822f735b 100644 --- a/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts @@ -12,7 +12,7 @@ module.exports = { browser .addFile('file.js', { content: executeFile }) .executeScript(`remix.exeCurrent()`) - .pause(2000) + .pause(5000) .journalLastChildIncludes('browser/file.js') },