diff --git a/.circleci/config.yml b/.circleci/config.yml index 0c76b8ce75..dd164a4383 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,6 @@ jobs: - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" - COMMIT_AUTHOR: "Circle CI" working_directory: ~/remix-project - steps: - checkout diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 75aca1f145..0000000000 --- a/.eslintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - "project": "./tsconfig.base.json" - }, - "plugins": ["@typescript-eslint", "@nrwl/nx"], - "extends": "standard", - "rules": { - }, - "overrides": [ - { - "files": ["*.tsx"], - "rules": { - "@typescript-eslint/no-unused-vars": "off" - } - } - ] -} \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 6557fb70d1..226848ea37 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,6 @@ { "root": true, - "ignorePatterns": ["**/*"], + "ignorePatterns": [], "plugins": ["@nrwl/nx"], "overrides": [ { diff --git a/apps/remix-ide-e2e/src/helpers/init.ts b/apps/remix-ide-e2e/src/helpers/init.ts index e934ae2f7b..8b56b54b5a 100644 --- a/apps/remix-ide-e2e/src/helpers/init.ts +++ b/apps/remix-ide-e2e/src/helpers/init.ts @@ -13,7 +13,7 @@ export default function (browser: NightwatchBrowser, callback: VoidFunction, url .fullscreenWindow(() => { if (preloadPlugins) { initModules(browser, () => { - browser.clickLaunchIcon('solidity') + browser.pause(2000).clickLaunchIcon('solidity') .waitForElementVisible('[for="autoCompile"]') .click('[for="autoCompile"]') .verify.elementPresent('[data-id="compilerContainerAutoCompile"]:checked') diff --git a/apps/remix-ide-e2e/src/tests/gist.test.ts b/apps/remix-ide-e2e/src/tests/gist.test.ts index 0fd6efa234..ce348cbdae 100644 --- a/apps/remix-ide-e2e/src/tests/gist.test.ts +++ b/apps/remix-ide-e2e/src/tests/gist.test.ts @@ -36,9 +36,9 @@ module.exports = { .addFile('File.sol', { content: '' }) .executeScript(`remix.loadgist('${gistid}')`) // .perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('gists') } done() }) - .waitForElementVisible(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) - .click(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) - .openFile(`gist-${gistid}/README.txt`) + .waitForElementVisible(`[data-id="treeViewLitreeViewItem${gistid}"]`) + .click(`[data-id="treeViewLitreeViewItem${gistid}"]`) + .openFile(`${gistid}/README.txt`) // Remix publish to gist /* .click('*[data-id="fileExplorerNewFilepublishToGist"]') .pause(2000) @@ -140,9 +140,9 @@ module.exports = { }) .setValue('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]', testData.validGistId) .modalFooterOKClick('gisthandler') - .openFile(`gist-${testData.validGistId}/README.txt`) - .waitForElementVisible(`div[title='default_workspace/gist-${testData.validGistId}/README.txt']`) - .assert.containsText(`div[title='default_workspace/gist-${testData.validGistId}/README.txt'] > span`, 'README.txt') + .openFile(`${testData.validGistId}/README.txt`) + .waitForElementVisible(`div[title='default_workspace/${testData.validGistId}/README.txt']`) + .assert.containsText(`div[title='default_workspace/${testData.validGistId}/README.txt'] > span`, 'README.txt') .end() } } diff --git a/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts b/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts new file mode 100644 index 0000000000..f10e6c713b --- /dev/null +++ b/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts @@ -0,0 +1,39 @@ +'use strict' +import { NightwatchBrowser } from 'nightwatch' +import init from '../helpers/init' + +module.exports = { + before: function (browser: NightwatchBrowser, done: VoidFunction) { + init(browser, done, 'http://127.0.0.1:8080?e2e_testmigration=true', false) + }, + 'Should have README file with TEST README as content': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000) + .waitForElementVisible('div[data-id="filePanelFileExplorerTree"]') + .openFile('TEST_README.txt') + .getEditorValue((content) => { + browser.assert.equal(content, 'TEST README') + }) + }, + 'Should have a workspace_test': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000) + .click('*[data-id="workspacesSelect"] option[value="workspace_test"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemtest_contracts"]') + }, + 'Should have a sol file with test data': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000) + .click('*[data-id="treeViewLitreeViewItemtest_contracts"]') + .openFile('test_contracts/1_Storage.sol') + .getEditorValue((content) => { + browser.assert.equal(content, 'testing') + }) + }, + 'Should have a artifacts file with JSON test data': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000) + .click('*[data-id="treeViewLitreeViewItemtest_contracts/artifacts"]') + .openFile('test_contracts/artifacts/Storage_metadata.json') + .getEditorValue((content) => { + const metadata = JSON.parse(content) + browser.assert.equal(metadata.test, 'data') + }) + } +} diff --git a/apps/remix-ide-e2e/src/tests/plugin_api.ts b/apps/remix-ide-e2e/src/tests/plugin_api.ts index 48405241a2..063487794a 100644 --- a/apps/remix-ide-e2e/src/tests/plugin_api.ts +++ b/apps/remix-ide-e2e/src/tests/plugin_api.ts @@ -64,7 +64,7 @@ const clearPayLoad = async (browser: NightwatchBrowser) => { }) } -const clickButton = async (browser: NightwatchBrowser, buttonText: string, waitResult: boolean = true) => { +const clickButton = async (browser: NightwatchBrowser, buttonText: string, waitResult: boolean = true) => { // eslint-disable-line return new Promise((resolve) => { browser.useXpath().waitForElementVisible(`//*[@data-id='${buttonText}']`).pause(100) .click(`//*[@data-id='${buttonText}']`, async () => { @@ -107,7 +107,7 @@ const checkForAcceptAndRemember = async function (browser: NightwatchBrowser) { * @return {Promise} */ -const clickAndCheckLog = async (browser: NightwatchBrowser, buttonText: string, methodResult: any, eventResult: any, payload: any, waitResult: boolean = true) => { +const clickAndCheckLog = async (browser: NightwatchBrowser, buttonText: string, methodResult: any, eventResult: any, payload: any, waitResult: boolean = true) => { // eslint-disable-line if (payload) { await setPayload(browser, payload) } else { @@ -235,7 +235,9 @@ module.exports = { }, 'Should write to file #group2': async function (browser: NightwatchBrowser) { await clickAndCheckLog(browser, 'fileManager:writeFile', null, { event: 'fileSaved', args: ['README.txt'] }, ['README.txt', 'test']) - await clickAndCheckLog(browser, 'fileManager:readFile', 'test', null, 'README.txt') + browser.pause(4000, async () => { + await clickAndCheckLog(browser, 'fileManager:getFile', 'test', null, 'README.txt') + }) }, 'Should set file #group2': async function (browser: NightwatchBrowser) { await clickAndCheckLog(browser, 'fileManager:setFile', null, { event: 'fileAdded', args: ['new.sol'] }, ['new.sol', 'test']) diff --git a/apps/remix-ide-e2e/src/tests/recorder.test.ts b/apps/remix-ide-e2e/src/tests/recorder.test.ts index 838ac567da..fc77f0ef0f 100644 --- a/apps/remix-ide-e2e/src/tests/recorder.test.ts +++ b/apps/remix-ide-e2e/src/tests/recorder.test.ts @@ -11,7 +11,7 @@ module.exports = { return sources }, - 'Test Recorder': function (browser: NightwatchBrowser) { + 'Run Scenario': function (browser: NightwatchBrowser) { let addressRef browser.addFile('scenario.json', { content: records }) .pause(5000) @@ -34,7 +34,10 @@ module.exports = { .perform(() => done()) }) .click('*[data-id="deployAndRunClearInstances"]') - .testContracts('testRecorder.sol', sources[0]['testRecorder.sol'], ['testRecorder']) + + }, + 'Save scenario': function (browser: NightwatchBrowser) { + browser.testContracts('testRecorder.sol', sources[0]['testRecorder.sol'], ['testRecorder']) .clickLaunchIcon('udapp') .createContract('12') .clickInstance(0) @@ -45,7 +48,7 @@ module.exports = { const modalOk = document.querySelector('[data-id="udappNotify-modal-footer-ok-react"]') as any modalOk.click() - }) + }).pause(1000) .getEditorValue(function (result) { const parsed = JSON.parse(result) browser.assert.equal(JSON.stringify(parsed.transactions[0].record.parameters), JSON.stringify(scenario.transactions[0].record.parameters)) diff --git a/apps/remix-ide-e2e/src/tests/signingMessage.test.ts b/apps/remix-ide-e2e/src/tests/signingMessage.test.ts index 517a19191e..913851fa38 100644 --- a/apps/remix-ide-e2e/src/tests/signingMessage.test.ts +++ b/apps/remix-ide-e2e/src/tests/signingMessage.test.ts @@ -23,6 +23,8 @@ module.exports = { console.log('signature', signature) browser.assert.ok(typeof hash.value === 'string', 'type of hash.value must be String') browser.assert.ok(typeof signature.value === 'string', 'type of signature.value must be String') + // we check here that the input is strictly "test message" + browser.assert.equal(signature.value, '0xaa8873317ebf3f34fbcc0eab3e9808d851352674c28a3d6b88dc84db6e10fc183a45bcec983a105964a13b54f18e43eceae29d982bf379826fb7ecfe0d42c6ba1b', 'signature should be tied to the input "test message"') }) .addFile('signMassage.sol', sources[0]['signMassage.sol']) .openFile('signMassage.sol') diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index c67265f9c1..2c0e8d4b99 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -18,7 +18,7 @@ module.exports = { 'Test Success Import #group1': function (browser: NightwatchBrowser) { browser.addFile('Untitled1.sol', sources[1]['Untitled1.sol']) - .addFile('Untitled2.sol', sources[1]['Untitled2.sol']) + .addFile('Untitled2.sol', sources[1]['Untitled2.sol']).pause(4000) .openFile('Untitled1.sol') .verifyContracts(['test6', 'test4', 'test5']) .pause(1000) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index 1ca31687c9..30d1a2c83c 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -263,7 +263,7 @@ module.exports = { .removeFile('tests/ballotFailedLog_test.sol', 'workspace_new') }, - 'Debug tests using debugger #group5': function (browser: NightwatchBrowser) { + 'Debug tests using debugger #group7': function (browser: NightwatchBrowser) { browser .waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]') .addFile('tests/ballotFailedDebug_test.sol', sources[0]['tests/ballotFailedDebug_test.sol']) @@ -288,9 +288,10 @@ module.exports = { .setValue('*[data-id="slider"]', new Array(1).fill(browser.Keys.RIGHT_ARROW)) .waitForElementContainsText('*[data-id="functionPanel"]', 'checkWinningProposalFailed()', 60000) .waitForElementContainsText('*[data-id="functionPanel"]', 'vote(proposal)', 60000) - .pause(1000) + .pause(5000) .checkVariableDebug('soliditylocals', locals) - .clickLaunchIcon('solidityUnitTesting') + .pause(5000) + .clickLaunchIcon('solidityUnitTesting').pause(2000) .scrollAndClick('#Check_winning_proposal_passed') .waitForElementContainsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER', 60000) .waitForElementContainsText('*[data-id="functionPanel"]', 'checkWinningProposalPassed()', 60000) @@ -301,8 +302,8 @@ module.exports = { .waitForElementContainsText('*[data-id="functionPanel"]', 'checkWinningProposalPassed()', 60000) // remix_test.sol should be opened in editor .getEditorValue((content) => browser.assert.ok(content.indexOf('library Assert {') !== -1)) - .pause(1000) - .clickLaunchIcon('solidityUnitTesting') + .pause(5000) + .clickLaunchIcon('solidityUnitTesting').pause(2000) .scrollAndClick('#Check_winning_proposal_again') .waitForElementContainsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER', 60000) .waitForElementContainsText('*[data-id="functionPanel"]', 'checkWinningProposalAgain()', 60000) @@ -311,9 +312,9 @@ module.exports = { .setValue('*[data-id="slider"]', new Array(1).fill(browser.Keys.RIGHT_ARROW)) .waitForElementContainsText('*[data-id="functionPanel"]', 'equal(a, b, message)', 60000) .waitForElementContainsText('*[data-id="functionPanel"]', 'checkWinningProposalAgain()', 60000) - .pause(1000) - .clickLaunchIcon('solidityUnitTesting') - .scrollAndClick('#Check_winnin_proposal_with_return_value') + .pause(5000) + .clickLaunchIcon('solidityUnitTesting').pause(5000) + .scrollAndClick('#Check_winnin_proposal_with_return_value').pause(5000) .waitForElementContainsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER', 60000) .waitForElementContainsText('*[data-id="functionPanel"]', 'checkWinninProposalWithReturnValue()', 60000) // eslint-disable-next-line dot-notation diff --git a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts index feb70d7d62..da26b27793 100644 --- a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts +++ b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts @@ -202,10 +202,10 @@ module.exports = { .addFile('Storage.sol', sources[6]['Storage.sol']) .addFile('Owner.sol', sources[6]['Owner.sol']) .clickLaunchIcon('udapp') - .createContract('42') + .createContract('42, 24') .openFile('Storage.sol') .clickLaunchIcon('udapp') - .createContract('') // this creation will fail if the component hasn't been properly reset. + .createContract('102') // this creation will fail if the component hasn't been properly reset. .clickInstance(1) .clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '24' }) .testFunction('last', // we check if the contract is actually reachable. @@ -375,7 +375,7 @@ contract C { /** * @dev Set contract deployer as owner */ - constructor(uint p) { + constructor(uint p, uint o) { owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor emit OwnerSet(address(0), owner); } @@ -412,6 +412,10 @@ contract C { uint256 number; + constructor(uint p) { + + } + /** * @dev Store value in variable * @param num value to store diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 8824167b4c..15c9e34294 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -19,9 +19,9 @@ module.exports = { browser .pause(5000) .refresh() - .pause(10000) + .waitForElementVisible('#editorView', 30000) .getEditorValue((content) => { - browser.assert.ok(content.indexOf('contract Ballot {') !== -1, 'content doesn\'t include Ballot contract') + browser.assert.ok(content.indexOf('contract Ballot {') !== -1, 'content includes Ballot contract') }) }, diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 7859ecb23c..033c1b1bb0 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -11,6 +11,7 @@ import { VerticalIcons } from './app/components/vertical-icons' import { LandingPage } from './app/ui/landing-page/landing-page' import { MainPanel } from './app/components/main-panel' import { PermissionHandlerPlugin } from './app/plugins/permission-handler-plugin' +import { AstWalker } from '@remix-project/remix-astwalker' import { WalkthroughService } from './walkthroughService' @@ -18,6 +19,7 @@ import { OffsetToLineColumnConverter, CompilerMetadata, CompilerArtefacts, Fetch import Registry from './app/state/registry' import { ConfigPlugin } from './app/plugins/config' +import { StoragePlugin } from './app/plugins/storage' import { Layout } from './app/panels/layout' import { NotificationPlugin } from './app/plugins/notification' import { Blockchain } from './blockchain/blockchain.js' @@ -27,7 +29,7 @@ const isElectron = require('is-electron') const remixLib = require('@remix-project/remix-lib') -const QueryParams = require('./lib/query-params') +import { QueryParams } from '@remix-project/remix-lib' const Storage = remixLib.Storage const RemixDProvider = require('./app/files/remixDProvider') const Config = require('./config') @@ -51,10 +53,9 @@ const { TabProxy } = require('./app/panels/tab-proxy.js') class AppComponent { constructor () { - const self = this - self.appManager = new RemixAppManager({}) - self.queryParams = new QueryParams() - self._components = {} + this.appManager = new RemixAppManager({}) + this.queryParams = new QueryParams() + this._components = {} // setup storage const configStorage = new Storage('config-v0.8:') @@ -63,54 +64,55 @@ class AppComponent { Registry.getInstance().put({ api: config, name: 'config' }) // load file system - self._components.filesProviders = {} - self._components.filesProviders.browser = new FileProvider('browser') + this._components.filesProviders = {} + this._components.filesProviders.browser = new FileProvider('browser') Registry.getInstance().put({ - api: self._components.filesProviders.browser, + api: this._components.filesProviders.browser, name: 'fileproviders/browser' }) - self._components.filesProviders.localhost = new RemixDProvider( - self.appManager + this._components.filesProviders.localhost = new RemixDProvider( + this.appManager ) Registry.getInstance().put({ - api: self._components.filesProviders.localhost, + api: this._components.filesProviders.localhost, name: 'fileproviders/localhost' }) - self._components.filesProviders.workspace = new WorkspaceFileProvider() + this._components.filesProviders.workspace = new WorkspaceFileProvider() Registry.getInstance().put({ - api: self._components.filesProviders.workspace, + api: this._components.filesProviders.workspace, name: 'fileproviders/workspace' }) Registry.getInstance().put({ - api: self._components.filesProviders, + api: this._components.filesProviders, name: 'fileproviders' }) } async run () { - const self = this // APP_MANAGER - const appManager = self.appManager - const pluginLoader = self.appManager.pluginLoader - self.panels = {} - self.workspace = pluginLoader.get() - self.engine = new RemixEngine() - self.engine.register(appManager) + const appManager = this.appManager + const pluginLoader = this.appManager.pluginLoader + this.panels = {} + this.workspace = pluginLoader.get() + this.engine = new RemixEngine() + this.engine.register(appManager); + + const matomoDomains = { 'remix-alpha.ethereum.org': 27, 'remix-beta.ethereum.org': 25, 'remix.ethereum.org': 23 } - self.showMatamo = + this.showMatamo = matomoDomains[window.location.hostname] && !Registry.getInstance() .get('config') .api.exists('settings/matomo-analytics') - self.walkthroughService = new WalkthroughService( + this.walkthroughService = new WalkthroughService( appManager, - self.showMatamo + this.showMatamo ) const hosts = ['127.0.0.1:8080', '192.168.0.101:8080', 'localhost:8080'] @@ -124,10 +126,10 @@ class AppComponent { // SERVICES // ----------------- gist service --------------------------------- - self.gistHandler = new GistHandler() + this.gistHandler = new GistHandler() // ----------------- theme service --------------------------------- - self.themeModule = new ThemeModule() - Registry.getInstance().put({ api: self.themeModule, name: 'themeModule' }) + this.themeModule = new ThemeModule() + Registry.getInstance().put({ api: this.themeModule, name: 'themeModule' }) // ----------------- editor service ---------------------------- const editor = new Editor() // wrapper around ace editor @@ -142,6 +144,9 @@ class AppComponent { // ----------------- dGit provider --------------------------------- const dGitProvider = new DGitProvider() + // ----------------- Storage plugin --------------------------------- + const storagePlugin = new StoragePlugin() + // ----------------- import content service ------------------------ const contentImport = new CompilerImports() @@ -185,24 +190,24 @@ class AppComponent { } } ) - const contextualListener = new EditorContextListener() + const contextualListener = new EditorContextListener(new AstWalker()) - self.notification = new NotificationPlugin() + this.notification = new NotificationPlugin() const configPlugin = new ConfigPlugin() - self.layout = new Layout() + this.layout = new Layout() const permissionHandler = new PermissionHandlerPlugin() - self.engine.register([ + this.engine.register([ permissionHandler, - self.layout, - self.notification, - self.gistHandler, + this.layout, + this.notification, + this.gistHandler, configPlugin, blockchain, contentImport, - self.themeModule, + this.themeModule, editor, fileManager, compilerMetadataGenerator, @@ -214,47 +219,48 @@ class AppComponent { web3Provider, fetchAndCompile, dGitProvider, + storagePlugin, hardhatProvider, - self.walkthroughService + this.walkthroughService ]) // LAYOUT & SYSTEM VIEWS const appPanel = new MainPanel() - Registry.getInstance().put({ api: self.mainview, name: 'mainview' }) + Registry.getInstance().put({ api: this.mainview, name: 'mainview' }) const tabProxy = new TabProxy(fileManager, editor) - self.engine.register([appPanel, tabProxy]) + this.engine.register([appPanel, tabProxy]) // those views depend on app_manager - self.menuicons = new VerticalIcons() - self.sidePanel = new SidePanel() - self.hiddenPanel = new HiddenPanel() + this.menuicons = new VerticalIcons() + this.sidePanel = new SidePanel() + this.hiddenPanel = new HiddenPanel() const pluginManagerComponent = new PluginManagerComponent( appManager, - self.engine + this.engine ) const filePanel = new FilePanel(appManager) const landingPage = new LandingPage( appManager, - self.menuicons, + this.menuicons, fileManager, filePanel, contentImport ) - self.settings = new SettingsTab( + this.settings = new SettingsTab( Registry.getInstance().get('config').api, editor, appManager ) - self.engine.register([ - self.menuicons, + this.engine.register([ + this.menuicons, landingPage, - self.hiddenPanel, - self.sidePanel, + this.hiddenPanel, + this.sidePanel, filePanel, pluginManagerComponent, - self.settings + this.settings ]) // CONTENT VIEWS & DEFAULT PLUGINS @@ -283,7 +289,7 @@ class AppComponent { contentImport ) - self.engine.register([ + this.engine.register([ compileTab, run, debug, @@ -295,7 +301,7 @@ class AppComponent { filePanel.slitherHandle ]) - self.layout.panels = { + this.layout.panels = { tabs: { plugin: tabProxy, active: true }, editor: { plugin: editor, active: true }, main: { plugin: appPanel, active: false }, @@ -306,47 +312,46 @@ class AppComponent { async activate () { const queryParams = new QueryParams() const params = queryParams.get() - const self = this - + if (isElectron()) { - self.appManager.activatePlugin('remixd') + this.appManager.activatePlugin('remixd') } try { - self.engine.register(await self.appManager.registeredPlugins()) + this.engine.register(await this.appManager.registeredPlugins()) } catch (e) { console.log("couldn't register iframe plugins", e.message) } - await self.appManager.activatePlugin(['layout']) - await self.appManager.activatePlugin(['notification']) - await self.appManager.activatePlugin(['editor']) - await self.appManager.activatePlugin(['permissionhandler', 'theme', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'network', 'web3Provider', 'offsetToLineColumnConverter']) - await self.appManager.activatePlugin(['mainPanel', 'menuicons', 'tabs']) - await self.appManager.activatePlugin(['sidePanel']) // activating host plugin separately - await self.appManager.activatePlugin(['home']) - await self.appManager.activatePlugin(['settings', 'config']) - await self.appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'contextualListener', 'terminal', 'blockchain', 'fetchAndCompile', 'contentImport', 'gistHandler']) - await self.appManager.activatePlugin(['settings']) - await self.appManager.activatePlugin(['walkthrough']) - - self.appManager.on( + await this.appManager.activatePlugin(['layout']) + await this.appManager.activatePlugin(['notification']) + await this.appManager.activatePlugin(['editor']) + await this.appManager.activatePlugin(['permissionhandler', 'theme', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'network', 'web3Provider', 'offsetToLineColumnConverter']) + await this.appManager.activatePlugin(['mainPanel', 'menuicons', 'tabs']) + await this.appManager.activatePlugin(['sidePanel']) // activating host plugin separately + await this.appManager.activatePlugin(['home']) + await this.appManager.activatePlugin(['settings', 'config']) + await this.appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'contextualListener', 'terminal', 'blockchain', 'fetchAndCompile', 'contentImport', 'gistHandler']) + await this.appManager.activatePlugin(['settings']) + await this.appManager.activatePlugin(['walkthrough','storage']) + + this.appManager.on( 'filePanel', 'workspaceInitializationCompleted', async () => { - await self.appManager.registerContextMenuItems() + await this.appManager.registerContextMenuItems() } ) - await self.appManager.activatePlugin(['filePanel']) + await this.appManager.activatePlugin(['filePanel']) // Set workspace after initial activation - self.appManager.on('editor', 'editorMounted', () => { - if (Array.isArray(self.workspace)) { - self.appManager - .activatePlugin(self.workspace) + this.appManager.on('editor', 'editorMounted', () => { + if (Array.isArray(this.workspace)) { + this.appManager + .activatePlugin(this.workspace) .then(async () => { try { if (params.deactivate) { - await self.appManager.deactivatePlugin( + await this.appManager.deactivatePlugin( params.deactivate.split(',') ) } @@ -355,21 +360,21 @@ class AppComponent { } if (params.code) { // if code is given in url we focus on solidity plugin - self.menuicons.select('solidity') + this.menuicons.select('solidity') } else { // If plugins are loaded from the URL params, we focus on the last one. if ( - self.appManager.pluginLoader.current === 'queryParams' && - self.workspace.length > 0 - ) { self.menuicons.select(self.workspace[self.workspace.length - 1]) } + this.appManager.pluginLoader.current === 'queryParams' && + this.workspace.length > 0 + ) { this.menuicons.select(this.workspace[this.workspace.length - 1]) } } if (params.call) { const callDetails = params.call.split('//') if (callDetails.length > 1) { - self.appManager.call('notification', 'toast', `initiating ${callDetails[0]} ...`) + this.appManager.call('notification', 'toast', `initiating ${callDetails[0]} ...`) // @todo(remove the timeout when activatePlugin is on 0.3.0) - self.appManager.call(...callDetails).catch(console.error) + this.appManager.call(...callDetails).catch(console.error) } } }) @@ -377,7 +382,7 @@ class AppComponent { } }) // activate solidity plugin - self.appManager.activatePlugin(['solidity', 'udapp']) + this.appManager.activatePlugin(['solidity', 'udapp']) // Load and start the service who manager layout and frame } } diff --git a/apps/remix-ide/src/app/components/vertical-icons.tsx b/apps/remix-ide/src/app/components/vertical-icons.tsx index 2e8deaa182..eea114b637 100644 --- a/apps/remix-ide/src/app/components/vertical-icons.tsx +++ b/apps/remix-ide/src/app/components/vertical-icons.tsx @@ -1,13 +1,11 @@ // eslint-disable-next-line no-use-before-define import React from 'react' import ReactDOM from 'react-dom' -import Registry from '../state/registry' import packageJson from '../../../../../package.json' import { Plugin } from '@remixproject/engine' import { EventEmitter } from 'events' import { IconRecord, RemixUiVerticalIconsPanel } from '@remix-ui/vertical-icons-panel' import { Profile } from '@remixproject/plugin-utils' -import { timeStamp } from 'console' const profile = { name: 'menuicons', @@ -95,7 +93,6 @@ export class VerticalIcons extends Plugin { */ select (name: string) { // TODO: Only keep `this.emit` (issue#2210) - console.log(name, this) this.emit('showContent', name) this.events.emit('showContent', name) } diff --git a/apps/remix-ide/src/app/editor/editor.js b/apps/remix-ide/src/app/editor/editor.js index 1bc0a00b82..d15fe531a1 100644 --- a/apps/remix-ide/src/app/editor/editor.js +++ b/apps/remix-ide/src/app/editor/editor.js @@ -149,11 +149,11 @@ class Editor extends Plugin { if (this.saveTimeout) { window.clearTimeout(this.saveTimeout) } - this.triggerEvent('contentChanged', []) this.saveTimeout = window.setTimeout(() => { + this.triggerEvent('contentChanged', []) this.triggerEvent('requiringToSaveCurrentfile', []) - }, 5000) + }, 500) } _switchSession (path) { diff --git a/apps/remix-ide/src/app/files/dgitProvider.js b/apps/remix-ide/src/app/files/dgitProvider.js index 047b7d3a27..9a2fcc8e80 100644 --- a/apps/remix-ide/src/app/files/dgitProvider.js +++ b/apps/remix-ide/src/app/files/dgitProvider.js @@ -51,8 +51,8 @@ class DGitProvider extends Plugin { async getGitConfig () { const workspace = await this.call('filePanel', 'getCurrentWorkspace') return { - fs: window.remixFileSystem, - dir: workspace.absolutePath + fs: window.remixFileSystemCallback, + dir: addSlash(workspace.absolutePath) } } @@ -61,6 +61,7 @@ class DGitProvider extends Plugin { corsProxy: 'https://corsproxy.remixproject.org/', http, onAuth: url => { + url const auth = { username: input.token, password: '' @@ -90,7 +91,9 @@ class DGitProvider extends Plugin { ...await this.getGitConfig(), ...cmd }) - await this.call('fileManager', 'refresh') + setTimeout(async () => { + await this.call('fileManager', 'refresh') + }, 1000) } async rm (cmd) { @@ -98,7 +101,9 @@ class DGitProvider extends Plugin { ...await this.getGitConfig(), ...cmd }) - await this.call('fileManager', 'refresh') + setTimeout(async () => { + await this.call('fileManager', 'refresh') + }, 1000) } async checkout (cmd) { @@ -106,7 +111,9 @@ class DGitProvider extends Plugin { ...await this.getGitConfig(), ...cmd }) - await this.call('fileManager', 'refresh') + setTimeout(async () => { + await this.call('fileManager', 'refresh') + }, 1000) } async log (cmd) { @@ -122,6 +129,7 @@ class DGitProvider extends Plugin { try { remotes = await git.listRemotes({ ...await this.getGitConfig() }) } catch (e) { + console.log(e) } return remotes } @@ -131,7 +139,9 @@ class DGitProvider extends Plugin { ...await this.getGitConfig(), ...cmd }) - await this.call('fileManager', 'refresh') + setTimeout(async () => { + await this.call('fileManager', 'refresh') + }, 1000) return status } @@ -196,7 +206,7 @@ class DGitProvider extends Plugin { async setIpfsConfig (config) { this.ipfsconfig = config - return new Promise((resolve, reject) => { + return new Promise((resolve) => { resolve(this.checkIpfsConfig()) }) } @@ -239,7 +249,9 @@ class DGitProvider extends Plugin { } const result = await git.clone(cmd) - await this.call('fileManager', 'refresh') + setTimeout(async () => { + await this.call('fileManager', 'refresh') + }, 1000) return result } @@ -272,7 +284,9 @@ class DGitProvider extends Plugin { ...await this.getGitConfig() } const result = await git.pull(cmd) - await this.call('fileManager', 'refresh') + setTimeout(async () => { + await this.call('fileManager', 'refresh') + }, 1000) return result } @@ -289,7 +303,9 @@ class DGitProvider extends Plugin { ...await this.getGitConfig() } const result = await git.fetch(cmd) - await this.call('fileManager', 'refresh') + setTimeout(async () => { + await this.call('fileManager', 'refresh') + }, 1000) return result } @@ -299,7 +315,7 @@ class DGitProvider extends Plugin { const files = await this.getDirectory('/') this.filesToSend = [] for (const file of files) { - const c = window.remixFileSystem.readFileSync(`${workspace.absolutePath}/${file}`) + const c = await window.remixFileSystem.readFile(`${workspace.absolutePath}/${file}`) const ob = { path: file, content: c @@ -319,10 +335,10 @@ class DGitProvider extends Plugin { this.filesToSend = [] const data = new FormData() - files.forEach(async (file) => { - const c = window.remixFileSystem.readFileSync(`${workspace.absolutePath}/${file}`) + for (const file of files) { + const c = await window.remixFileSystem.readFile(`${workspace.absolutePath}/${file}`) data.append('file', new Blob([c]), `base/${file}`) - }) + } // get last commit data let ob try { @@ -409,7 +425,7 @@ class DGitProvider extends Plugin { } catch (error) { throw new Error(error) } - }; + } async importIPFSFiles (config, cid, workspace) { const ipfs = IpfsHttpClient(config) @@ -428,10 +444,10 @@ class DGitProvider extends Plugin { } const dir = path.dirname(file.path) try { - this.createDirectories(`${workspace.absolutePath}/${dir}`) + await this.createDirectories(`${workspace.absolutePath}/${dir}`) } catch (e) { throw new Error(e) } try { - window.remixFileSystem.writeFileSync(`${workspace.absolutePath}/${file.path}`, Buffer.concat(content) || new Uint8Array()) + await window.remixFileSystem.writeFile(`${workspace.absolutePath}/${file.path}`, Buffer.concat(content) || new Uint8Array()) } catch (e) { throw new Error(e) } } } catch (e) { @@ -450,7 +466,7 @@ class DGitProvider extends Plugin { } _xLen = ((localStorage[_x].length + _x.length) * 2) _lsTotal += _xLen - }; + } return (_lsTotal / 1024).toFixed(2) } @@ -467,7 +483,9 @@ class DGitProvider extends Plugin { } else { result = await this.importIPFSFiles(this.remixIPFS, cid, workspace) || await this.importIPFSFiles(this.ipfsconfig, cid, workspace) || await this.importIPFSFiles(this.globalIPFSConfig, cid, workspace) } - await this.call('fileManager', 'refresh') + setTimeout(async () => { + await this.call('fileManager', 'refresh') + }, 1000) if (!result) throw new Error(`Cannot pull files from IPFS at ${cid}`) } @@ -495,7 +513,7 @@ class DGitProvider extends Plugin { const files = await this.getDirectory('/') this.filesToSend = [] for (const file of files) { - const c = window.remixFileSystem.readFileSync(`${workspace.absolutePath}/${file}`) + const c = await window.remixFileSystem.readFile(`${workspace.absolutePath}/${file}`) zip.file(file, c) } await zip.generateAsync({ @@ -515,8 +533,8 @@ class DGitProvider extends Plugin { if (i > 0) previouspath = '/' + directories.slice(0, i).join('/') const finalPath = previouspath + '/' + directories[i] try { - if (!window.remixFileSystem.existsSync(finalPath)) { - window.remixFileSystem.mkdirSync(finalPath) + if (!await window.remixFileSystem.exists(finalPath)) { + await window.remixFileSystem.mkdir(finalPath) } } catch (e) { console.log(e) @@ -547,6 +565,11 @@ class DGitProvider extends Plugin { } } +const addSlash = (file) => { + if (!file.startsWith('/'))file = '/' + file + return file +} + const normalize = (filesList) => { const folders = [] const files = [] diff --git a/apps/remix-ide/src/app/files/fileManager.ts b/apps/remix-ide/src/app/files/fileManager.ts index a3828d68b3..d9789f4512 100644 --- a/apps/remix-ide/src/app/files/fileManager.ts +++ b/apps/remix-ide/src/app/files/fileManager.ts @@ -1,12 +1,11 @@ 'use strict' -import async from 'async' import { Plugin } from '@remixproject/engine' import * as packageJson from '../../../../../package.json' import Registry from '../state/registry' import { EventEmitter } from 'events' import { RemixAppManager } from '../../../../../libs/remix-ui/plugin-manager/src/types' import { fileChangedToastMsg } from '@remix-ui/helper' -const helper = require('../../lib/helper.js') +import helper from '../../lib/helper.js' /* attach to files event (removed renamed) @@ -47,7 +46,7 @@ class FileManager extends Plugin { getFolder: (path: any) => Promise setFile: (path: any, data: any) => Promise switchFile: (path: any) => Promise - constructor (editor, appManager) { + constructor(editor, appManager) { super(profile) this.mode = 'browser' this.openedFiles = {} // list all opened files @@ -59,19 +58,19 @@ class FileManager extends Plugin { this.init() } - getOpenedFiles () { + getOpenedFiles() { return this.openedFiles } - setMode (mode) { + setMode(mode) { this.mode = mode } - limitPluginScope (path) { + limitPluginScope(path) { return path.replace(/^\/browser\//, '').replace(/^browser\//, '') // forbids plugin to access the root filesystem } - normalize (path) { + normalize(path) { return path.replace(/^\/+/, '') } @@ -80,7 +79,7 @@ class FileManager extends Plugin { * @param {string} path path of the file/directory * @param {string} message message to display if path doesn't exist. */ - async _handleExists (path: string, message?:string) { + async _handleExists(path: string, message?: string) { const exists = await this.exists(path) if (!exists) { @@ -93,7 +92,7 @@ class FileManager extends Plugin { * @param {string} path path of the file/directory * @param {string} message message to display if path is not a file. */ - async _handleIsFile (path, message) { + async _handleIsFile(path, message) { const isFile = await this.isFile(path) if (!isFile) { @@ -106,7 +105,7 @@ class FileManager extends Plugin { * @param {string} path path of the file/directory * @param {string} message message to display if path is not a directory. */ - async _handleIsDir (path: string, message?: string) { + async _handleIsDir(path: string, message?: string) { const isDir = await this.isDirectory(path) if (!isDir) { @@ -115,7 +114,7 @@ class FileManager extends Plugin { } /** The current opened file */ - file () { + file() { try { const file = this.currentFile() @@ -131,12 +130,12 @@ class FileManager extends Plugin { * @param {string} path path of the directory or file * @returns {boolean} true if the path exists */ - exists (path) { + async exists(path) { try { path = this.normalize(path) path = this.limitPluginScope(path) const provider = this.fileProviderOf(path) - const result = provider.exists(path) + const result = await provider.exists(path) return result } catch (e) { @@ -147,7 +146,7 @@ class FileManager extends Plugin { /* * refresh the file explorer */ - refresh () { + refresh() { const provider = this.fileProviderOf('/') // emit rootFolderChanged so that File Explorer reloads the file tree provider.event.emit('rootFolderChanged', provider.workspace || '/') @@ -159,10 +158,9 @@ class FileManager extends Plugin { * @param {string} path path of the directory or file * @returns {boolean} true if path is a file. */ - isFile (path) { + async isFile(path) { const provider = this.fileProviderOf(path) - const result = provider.isFile(path) - + const result = await provider.isFile(path) return result } @@ -171,7 +169,7 @@ class FileManager extends Plugin { * @param {string} path path of the directory * @returns {boolean} true if path is a directory. */ - async isDirectory (path) { + async isDirectory(path) { const provider = this.fileProviderOf(path) const result = await provider.isDirectory(path) @@ -183,7 +181,7 @@ class FileManager extends Plugin { * @param {string} path path of the file * @returns {void} */ - async open (path) { + async open(path) { path = this.normalize(path) path = this.limitPluginScope(path) path = this.getPathFromUrl(path).file @@ -198,7 +196,7 @@ class FileManager extends Plugin { * @param {string} data content to write on the file * @returns {void} */ - async writeFile (path, data) { + async writeFile(path, data) { try { path = this.normalize(path) path = this.limitPluginScope(path) @@ -220,7 +218,7 @@ class FileManager extends Plugin { * @param {string} path path of the file * @returns {string} content of the file */ - async readFile (path) { + async readFile(path) { try { path = this.normalize(path) path = this.limitPluginScope(path) @@ -238,7 +236,7 @@ class FileManager extends Plugin { * @param {string} dest path of the destrination file * @returns {void} */ - async copyFile (src, dest, customName) { + async copyFile(src, dest, customName) { try { src = this.normalize(src) dest = this.normalize(dest) @@ -264,7 +262,7 @@ class FileManager extends Plugin { * @param {string} dest path of the destination dir * @returns {void} */ - async copyDir (src, dest) { + async copyDir(src, dest) { try { src = this.normalize(src) dest = this.normalize(dest) @@ -280,7 +278,7 @@ class FileManager extends Plugin { } } - async inDepthCopy (src, dest, count = 0) { + async inDepthCopy(src, dest, count = 0) { const content = await this.readdir(src) let copiedFolderPath = count === 0 ? dest + '/' + `Copy_${helper.extractNameFromKey(src)}` : dest + '/' + helper.extractNameFromKey(src) copiedFolderPath = await helper.createNonClashingDirNameAsync(copiedFolderPath, this) @@ -302,7 +300,7 @@ class FileManager extends Plugin { * @param {string} newPath new path of the file/directory * @returns {void} */ - async rename (oldPath, newPath) { + async rename(oldPath, newPath) { try { oldPath = this.normalize(oldPath) newPath = this.normalize(newPath) @@ -342,7 +340,7 @@ class FileManager extends Plugin { * @param {string} path path of the new directory * @returns {void} */ - async mkdir (path) { + async mkdir(path) { try { path = this.normalize(path) path = this.limitPluginScope(path) @@ -350,8 +348,7 @@ class FileManager extends Plugin { throw createError({ code: 'EEXIST', message: `Cannot create directory ${path}` }) } const provider = this.fileProviderOf(path) - - return provider.createDir(path) + return await provider.createDir(path) } catch (e) { throw new Error(e) } @@ -362,7 +359,7 @@ class FileManager extends Plugin { * @param {string} path path of the directory * @returns {string[]} list of the file/directory name in this directory */ - async readdir (path) { + async readdir(path) { try { path = this.normalize(path) path = this.limitPluginScope(path) @@ -387,7 +384,7 @@ class FileManager extends Plugin { * @param {string} path path of the directory/file to remove * @returns {void} */ - async remove (path) { + async remove(path) { try { path = this.normalize(path) path = this.limitPluginScope(path) @@ -399,7 +396,7 @@ class FileManager extends Plugin { } } - init () { + init() { this._deps = { config: this._components.registry.get('config').api, browserExplorer: this._components.registry.get('fileproviders/browser').api, @@ -427,15 +424,15 @@ class FileManager extends Plugin { this.switchFile = this.open } - fileAddedEvent (path) { + fileAddedEvent(path) { this.emit('fileAdded', path) } - fileChangedEvent (path) { + fileChangedEvent(path) { this.emit('fileChanged', path) } - fileRenamedEvent (oldName, newName, isFolder) { + fileRenamedEvent(oldName, newName, isFolder) { if (!isFolder) { this._deps.config.set('currentFile', '') this.editor.discard(oldName) @@ -445,9 +442,9 @@ class FileManager extends Plugin { } this.openFile(newName) } else { - for (var k in this.openedFiles) { + for (const k in this.openedFiles) { if (k.indexOf(oldName + '/') === 0) { - var newAbsolutePath = k.replace(oldName, newName) + const newAbsolutePath = k.replace(oldName, newName) this.openedFiles[newAbsolutePath] = newAbsolutePath delete this.openedFiles[k] if (this._deps.config.get('currentFile') === k) { @@ -461,19 +458,19 @@ class FileManager extends Plugin { this.events.emit('fileRenamed', oldName, newName, isFolder) } - currentFileProvider () { - var path = this.currentPath() + currentFileProvider() { + const path = this.currentPath() if (path) { return this.fileProviderOf(path) } return null } - currentFile () { + currentFile() { return this.editor.current() } - async closeAllFiles () { + async closeAllFiles() { // TODO: Only keep `this.emit` (issue#2210) this.emit('filesAllClosed') this.events.emit('filesAllClosed') @@ -482,7 +479,7 @@ class FileManager extends Plugin { } } - async closeFile (name) { + async closeFile(name) { delete this.openedFiles[name] if (!Object.keys(this.openedFiles).length) { this._deps.config.set('currentFile', '') @@ -495,18 +492,18 @@ class FileManager extends Plugin { this.events.emit('fileClosed', name) } - currentPath () { - var currentFile = this._deps.config.get('currentFile') + currentPath() { + const currentFile = this._deps.config.get('currentFile') return this.extractPathOf(currentFile) } - extractPathOf (file) { - var reg = /(.*)(\/).*/ - var path = reg.exec(file) + extractPathOf(file) { + const reg = /(.*)(\/).*/ + const path = reg.exec(file) return path ? path[1] : '/' } - getFileContent (path) { + getFileContent(path) { const provider = this.fileProviderOf(path) if (!provider) throw createError({ code: 'ENOENT', message: `${path} not available` }) @@ -520,19 +517,19 @@ class FileManager extends Plugin { }) } - async setFileContent (path, content) { + async setFileContent(path, content) { if (this.currentRequest) { const canCall = await this.askUserPermission('writeFile', '') const required = this.appManager.isRequired(this.currentRequest.from) if (canCall && !required) { // inform the user about modification after permission is granted and even if permission was saved before - this.call('notification','toast', fileChangedToastMsg(this.currentRequest.from, path)) + this.call('notification', 'toast', fileChangedToastMsg(this.currentRequest.from, path)) } } return await this._setFileInternal(path, content) } - _setFileInternal (path, content) { + _setFileInternal(path, content) { const provider = this.fileProviderOf(path) if (!provider) throw createError({ code: 'ENOENT', message: `${path} not available` }) // TODO : Add permission @@ -547,19 +544,6 @@ class FileManager extends Plugin { }) } - _saveAsCopy (path, content) { - const fileProvider = this.fileProviderOf(path) - if (fileProvider) { - helper.createNonClashingNameWithPrefix(path, fileProvider, '', (error, copyName) => { - if (error) { - copyName = path + '.' + this.currentRequest.from - } - this._setFileInternal(copyName, content) - this.openFile(copyName) - }) - } - } - /** * Try to resolve the given file path (the actual path in the file system) * e.g if it's specified a github link, npm library, or any external content, @@ -567,7 +551,7 @@ class FileManager extends Plugin { * @param {string} file url we are trying to resolve * @returns {{ string, provider }} file path resolved and its provider. */ - getPathFromUrl (file) { + getPathFromUrl(file) { const provider = this.fileProviderOf(file) if (!provider) throw new Error(`no provider for ${file}`) return { @@ -581,7 +565,7 @@ class FileManager extends Plugin { * @param {string} file path we are trying to resolve * @returns {{ string, provider }} file url resolved and its provider. */ - getUrlFromPath (file) { + getUrlFromPath(file) { const provider = this.fileProviderOf(file) if (!provider) throw new Error(`no provider for ${file}`) return { @@ -590,15 +574,15 @@ class FileManager extends Plugin { } } - removeTabsOf (provider) { - for (var tab in this.openedFiles) { + removeTabsOf(provider) { + for (const tab in this.openedFiles) { if (this.fileProviderOf(tab).type === provider.type) { this.fileRemovedEvent(tab) } } } - fileRemovedEvent (path) { + fileRemovedEvent(path) { if (path === this._deps.config.get('currentFile')) { this._deps.config.set('currentFile', '') } @@ -610,32 +594,35 @@ class FileManager extends Plugin { this.openFile() } - unselectCurrentFile () { - this.saveCurrentFile() + async unselectCurrentFile() { + await this.saveCurrentFile() this._deps.config.set('currentFile', '') // TODO: Only keep `this.emit` (issue#2210) this.emit('noFileSelected') this.events.emit('noFileSelected') } - async openFile (file?: string) { + async openFile(file?: string) { if (!file) { this.emit('noFileSelected') this.events.emit('noFileSelected') } else { file = this.normalize(file) - this.saveCurrentFile() + await this.saveCurrentFile() const resolved = this.getPathFromUrl(file) file = resolved.file const provider = resolved.provider this._deps.config.set('currentFile', file) this.openedFiles[file] = file - await (() => { - return new Promise((resolve, reject) => { - provider.get(file, (error, content) => { - if (error) { - console.log(error) - reject(error) + + return new Promise((resolve, reject) => { + provider.get(file, (error, content) => { + if (error) { + console.log(error) + reject(error) + } else { + if (provider.isReadOnly(file)) { + this.editor.openReadOnly(file, content) } else { if (provider.isReadOnly(file)) { this.editor.openReadOnly(file, content) @@ -647,9 +634,13 @@ class FileManager extends Plugin { this.events.emit('currentFileChanged', file) resolve(true) } - }) + // TODO: Only keep `this.emit` (issue#2210) + this.emit('currentFileChanged', file) + this.events.emit('currentFileChanged', file) + resolve(true) + } }) - })() + }) } } @@ -659,7 +650,7 @@ class FileManager extends Plugin { * */ - async getProviderOf (file) { + async getProviderOf(file) { const cancall = await this.askUserPermission('getProviderByName') if (cancall) { return file ? this.fileProviderOf(file) : this.currentFileProvider() @@ -672,18 +663,18 @@ class FileManager extends Plugin { * */ - async getProviderByName (name) { + async getProviderByName(name) { const cancall = await this.askUserPermission('getProviderByName') if (cancall) { return this.getProvider(name) } } - getProvider (name) { + getProvider(name) { return this._deps.filesProviders[name] } - fileProviderOf (file) { + fileProviderOf(file) { if (file.startsWith('localhost') || this.mode === 'localhost') { return this._deps.filesProviders.localhost } @@ -694,7 +685,7 @@ class FileManager extends Plugin { } // returns the list of directories inside path - dirList (path) { + dirList(path) { const dirPaths = [] const collectList = (path) => { return new Promise((resolve, reject) => { @@ -713,18 +704,18 @@ class FileManager extends Plugin { return collectList(path) } - isRemixDActive () { + isRemixDActive() { return this.appManager.isActive('remixd') } - saveCurrentFile () { - var currentFile = this._deps.config.get('currentFile') + async saveCurrentFile() { + const currentFile = this._deps.config.get('currentFile') if (currentFile && this.editor.current()) { - var input = this.editor.get(currentFile) + const input = this.editor.get(currentFile) if ((input !== null) && (input !== undefined)) { - var provider = this.fileProviderOf(currentFile) + const provider = this.fileProviderOf(currentFile) if (provider) { - provider.set(currentFile, input) + await provider.set(currentFile, input) this.emit('fileSaved', currentFile) } else { console.log('cannot save ' + currentFile + '. Does not belong to any explorer') @@ -733,64 +724,64 @@ class FileManager extends Plugin { } } - syncEditor (path) { - var currentFile = this._deps.config.get('currentFile') + async syncEditor(path) { + const currentFile = this._deps.config.get('currentFile') if (path !== currentFile) return - var provider = this.fileProviderOf(currentFile) + const provider = this.fileProviderOf(currentFile) if (provider) { - provider.get(currentFile, (error, content) => { - if (error) console.log(error) + try{ + const content = await provider.get(currentFile) this.editor.setText(content) - }) + }catch(error){ + console.log(error) + } } else { console.log('cannot save ' + currentFile + '. Does not belong to any explorer') } } - setBatchFiles (filesSet, fileProvider, override, callback) { + async setBatchFiles(filesSet, fileProvider, override, callback) { const self = this - if (!fileProvider) fileProvider = 'browser' + if (!fileProvider) fileProvider = 'workspace' if (override === undefined) override = false - - async.each(Object.keys(filesSet), (file, callback) => { + for (const file of Object.keys(filesSet)) { if (override) { try { - self._deps.filesProviders[fileProvider].set(file, filesSet[file].content) + await self._deps.filesProviders[fileProvider].set(file, filesSet[file].content) } catch (e) { - return callback(e.message || e) + callback(e.message || e) } - self.syncEditor(fileProvider + file) - return callback() - } - - helper.createNonClashingName(file, self._deps.filesProviders[fileProvider], - (error, name) => { - if (error) { - this.call('notification', 'alert', { - id: 'fileManagerAlert', - message: 'Unexpected error loading file ' + file + ': ' + error - }) - } else if (helper.checkSpecialChars(name)) { + await self.syncEditor(fileProvider + file) + } else { + try{ + const name = await helper.createNonClashingNameAsync(file, self._deps.filesProviders[fileProvider]) + if (helper.checkSpecialChars(name)) { this.call('notification', 'alert', { id: 'fileManagerAlert', message: 'Special characters are not allowed in file names.' }) } else { try { - self._deps.filesProviders[fileProvider].set(name, filesSet[file].content) + await self._deps.filesProviders[fileProvider].set(name, filesSet[file].content) } catch (e) { return callback(e.message || e) } self.syncEditor(fileProvider + name) } - callback() - }) - }, (error) => { - if (callback) callback(error) - }) + }catch(error){ + if (error) { + this.call('notification', 'alert', { + id: 'fileManagerAlert', + message: 'Unexpected error loading file ' + file + ': ' + error + }) + } + } + } + } + callback() } - currentWorkspace () { + currentWorkspace() { if (this.mode !== 'localhost') { const file = this.currentFile() || '' const provider = this.fileProviderOf(file) diff --git a/apps/remix-ide/src/app/files/fileProvider.js b/apps/remix-ide/src/app/files/fileProvider.js index 9ab67a84b3..2176bc53b8 100644 --- a/apps/remix-ide/src/app/files/fileProvider.js +++ b/apps/remix-ide/src/app/files/fileProvider.js @@ -47,7 +47,7 @@ class FileProvider { return this.externalFolders.includes(path) } - discardChanges (path, toastCb, modalCb) { + async discardChanges (path, toastCb, modalCb) { this.remove(path) const compilerImport = new CompilerImports() this.providerExternalsStorage.keys().map(value => { @@ -56,11 +56,11 @@ class FileProvider { this.getNormalizedName(value), true, (loadingMsg) => { toastCb(loadingMsg) }, - (error, content, cleanUrl, type, url) => { + async (error, content, cleanUrl, type, url) => { if (error) { modalCb(error) } else { - this.addExternal(type + '/' + cleanUrl, content, url) + await this.addExternal(type + '/' + cleanUrl, content, url) } } ) @@ -71,48 +71,48 @@ class FileProvider { async exists (path) { // todo check the type (directory/file) as well #2386 // currently it is not possible to have a file and folder with same path - const ret = this._exists(path) + const ret = await this._exists(path) return ret } - _exists (path) { + async _exists (path) { path = this.getPathFromUrl(path) || path // ensure we actually use the normalized path from here var unprefixedpath = this.removePrefix(path) - return path === this.type ? true : window.remixFileSystem.existsSync(unprefixedpath) + return path === this.type ? true : await window.remixFileSystem.exists(unprefixedpath) } init (cb) { cb() } - get (path, cb) { - cb = cb || function () {} + async get (path, cb) { + cb = cb || function () { /* do nothing. */ } path = this.getPathFromUrl(path) || path // ensure we actually use the normalized path from here var unprefixedpath = this.removePrefix(path) - var exists = window.remixFileSystem.existsSync(unprefixedpath) - if (!exists) return cb(null, null) - window.remixFileSystem.readFile(unprefixedpath, 'utf8', (err, content) => { - cb(err, content) - }) + try { + const content = await window.remixFileSystem.readFile(unprefixedpath, 'utf8') + if (cb) cb(null, content) + return content + } catch (err) { + if (cb) cb(err, null) + throw new Error(err) + } } - set (path, content, cb) { - cb = cb || function () {} + async set (path, content, cb) { + cb = cb || function () { /* do nothing. */ } var unprefixedpath = this.removePrefix(path) - var exists = window.remixFileSystem.existsSync(unprefixedpath) - if (exists && window.remixFileSystem.readFileSync(unprefixedpath, 'utf8') === content) { - cb() - return true - } - if (!exists && unprefixedpath.indexOf('/') !== -1) { - // the last element is the filename and we should remove it - this.createDir(path.substr(0, path.lastIndexOf('/'))) + const exists = await window.remixFileSystem.exists(unprefixedpath) + if (exists && await window.remixFileSystem.readFile(unprefixedpath, 'utf8') === content) { + if (cb) cb() + return null } + await this.createDir(path.substr(0, path.lastIndexOf('/'))) try { - window.remixFileSystem.writeFileSync(unprefixedpath, content) + await window.remixFileSystem.writeFile(unprefixedpath, content, 'utf8') } catch (e) { - cb(e) + if (cb) cb(e) return false } if (!exists) { @@ -120,84 +120,88 @@ class FileProvider { } else { this.event.emit('fileChanged', this._normalizePath(unprefixedpath)) } - cb() + if (cb) cb() return true } - createDir (path, cb) { + async createDir (path, cb) { const unprefixedpath = this.removePrefix(path) const paths = unprefixedpath.split('/') if (paths.length && paths[0] === '') paths.shift() let currentCheck = '' - paths.forEach((value) => { + for (const value of paths) { currentCheck = currentCheck + '/' + value - if (!window.remixFileSystem.existsSync(currentCheck)) { - window.remixFileSystem.mkdirSync(currentCheck) - this.event.emit('folderAdded', this._normalizePath(currentCheck)) + if (!await window.remixFileSystem.exists(currentCheck)) { + try { + await window.remixFileSystem.mkdir(currentCheck) + } catch (error) { + console.log(error) + } } - }) + } + currentCheck = '' + for (const value of paths) { + currentCheck = currentCheck + '/' + value + this.event.emit('folderAdded', this._normalizePath(currentCheck)) + } if (cb) cb() } // this will not add a folder as readonly but keep the original url to be able to restore it later - addExternal (path, content, url) { + async addExternal (path, content, url) { if (url) this.addNormalizedName(path, url) - return this.set(path, content) + return await this.set(path, content) } isReadOnly (path) { return false } - isDirectory (path) { + async isDirectory (path) { const unprefixedpath = this.removePrefix(path) - - return path === this.type ? true : window.remixFileSystem.statSync(unprefixedpath).isDirectory() + return path === this.type ? true : (await window.remixFileSystem.stat(unprefixedpath)).isDirectory() } - isFile (path) { + async isFile (path) { path = this.getPathFromUrl(path) || path // ensure we actually use the normalized path from here path = this.removePrefix(path) - return window.remixFileSystem.statSync(path).isFile() + return (await window.remixFileSystem.stat(path)).isFile() } /** * Removes the folder recursively * @param {*} path is the folder to be removed */ - remove (path) { - return new Promise((resolve, reject) => { - path = this.removePrefix(path) - if (window.remixFileSystem.existsSync(path)) { - const stat = window.remixFileSystem.statSync(path) - try { - if (!stat.isDirectory()) { - resolve(this.removeFile(path)) - } else { - const items = window.remixFileSystem.readdirSync(path) - if (items.length !== 0) { - items.forEach((item, index) => { - const curPath = `${path}${path.endsWith('/') ? '' : '/'}${item}` - if (window.remixFileSystem.statSync(curPath).isDirectory()) { // delete folder - this.remove(curPath) - } else { // delete file - this.removeFile(curPath) - } - }) - if (window.remixFileSystem.readdirSync(path).length === 0) window.remixFileSystem.rmdirSync(path, console.log) - } else { - // folder is empty - window.remixFileSystem.rmdirSync(path, console.log) + async remove (path) { + path = this.removePrefix(path) + if (await window.remixFileSystem.exists(path)) { + const stat = await window.remixFileSystem.stat(path) + try { + if (!stat.isDirectory()) { + return (this.removeFile(path)) + } else { + const items = await window.remixFileSystem.readdir(path) + if (items.length !== 0) { + for (const item of items) { + const curPath = `${path}${path.endsWith('/') ? '' : '/'}${item}` + if ((await window.remixFileSystem.stat(curPath)).isDirectory()) { // delete folder + await this.remove(curPath) + } else { // delete file + await this.removeFile(curPath) + } } - this.event.emit('fileRemoved', this._normalizePath(path)) + await window.remixFileSystem.rmdir(path) + } else { + // folder is empty + await window.remixFileSystem.rmdir(path) } - } catch (e) { - console.log(e) - return resolve(false) + this.event.emit('fileRemoved', this._normalizePath(path)) } + } catch (e) { + console.log(e) + return false } - return resolve(true) - }) + } } /** @@ -206,36 +210,35 @@ class FileProvider { * @param {Function} visitFile is a function called for each visited files * @param {Function} visitFolder is a function called for each visited folders */ - _copyFolderToJsonInternal (path, visitFile, visitFolder) { - visitFile = visitFile || (() => {}) - visitFolder = visitFolder || (() => {}) - return new Promise((resolve, reject) => { - const json = {} - path = this.removePrefix(path) - if (window.remixFileSystem.existsSync(path)) { - try { - const items = window.remixFileSystem.readdirSync(path) - visitFolder({ path }) - if (items.length !== 0) { - items.forEach(async (item, index) => { - const file = {} - const curPath = `${path}${path.endsWith('/') ? '' : '/'}${item}` - if (window.remixFileSystem.statSync(curPath).isDirectory()) { - file.children = await this._copyFolderToJsonInternal(curPath, visitFile, visitFolder) - } else { - file.content = window.remixFileSystem.readFileSync(curPath, 'utf8') - visitFile({ path: curPath, content: file.content }) - } - json[curPath] = file - }) + async _copyFolderToJsonInternal (path, visitFile, visitFolder) { + visitFile = visitFile || function () { /* do nothing. */ } + visitFolder = visitFolder || function () { /* do nothing. */ } + + const json = {} + path = this.removePrefix(path) + if (await window.remixFileSystem.exists(path)) { + try { + const items = await window.remixFileSystem.readdir(path) + visitFolder({ path }) + if (items.length !== 0) { + for (const item of items) { + const file = {} + const curPath = `${path}${path.endsWith('/') ? '' : '/'}${item}` + if ((await window.remixFileSystem.stat(curPath)).isDirectory()) { + file.children = await this._copyFolderToJsonInternal(curPath, visitFile, visitFolder) + } else { + file.content = await window.remixFileSystem.readFile(curPath, 'utf8') + visitFile({ path: curPath, content: file.content }) + } + json[curPath] = file } - } catch (e) { - console.log(e) - return reject(e) } + } catch (e) { + console.log(e) + throw new Error(e) } - return resolve(json) - }) + } + return json } /** @@ -244,26 +247,26 @@ class FileProvider { * @param {Function} visitFile is a function called for each visited files * @param {Function} visitFolder is a function called for each visited folders */ - copyFolderToJson (path, visitFile, visitFolder) { - visitFile = visitFile || (() => {}) - visitFolder = visitFolder || (() => {}) - return this._copyFolderToJsonInternal(path, visitFile, visitFolder) + async copyFolderToJson (path, visitFile, visitFolder) { + visitFile = visitFile || function () { /* do nothing. */ } + visitFolder = visitFolder || function () { /* do nothing. */ } + return await this._copyFolderToJsonInternal(path, visitFile, visitFolder) } - removeFile (path) { + async removeFile (path) { path = this.removePrefix(path) - if (window.remixFileSystem.existsSync(path) && !window.remixFileSystem.statSync(path).isDirectory()) { - window.remixFileSystem.unlinkSync(path, console.log) + if (await window.remixFileSystem.exists(path) && !(await window.remixFileSystem.stat(path)).isDirectory()) { + await window.remixFileSystem.unlink(path) this.event.emit('fileRemoved', this._normalizePath(path)) return true } else return false } - rename (oldPath, newPath, isFolder) { + async rename (oldPath, newPath, isFolder) { var unprefixedoldPath = this.removePrefix(oldPath) var unprefixednewPath = this.removePrefix(newPath) - if (this._exists(unprefixedoldPath)) { - window.remixFileSystem.renameSync(unprefixedoldPath, unprefixednewPath) + if (await this._exists(unprefixedoldPath)) { + await window.remixFileSystem.rename(unprefixedoldPath, unprefixednewPath) this.event.emit('fileRenamed', this._normalizePath(unprefixedoldPath), this._normalizePath(unprefixednewPath), @@ -274,24 +277,26 @@ class FileProvider { return false } - resolveDirectory (path, callback) { + async resolveDirectory (path, cb) { path = this.removePrefix(path) if (path.indexOf('/') !== 0) path = '/' + path - - window.remixFileSystem.readdir(path, (error, files) => { - var ret = {} - + try { + const files = await window.remixFileSystem.readdir(path) + const ret = {} if (files) { - files.forEach(element => { + for (let element of files) { path = path.replace(/^\/|\/$/g, '') // remove first and last slash element = element.replace(/^\/|\/$/g, '') // remove first and last slash const absPath = (path === '/' ? '' : path) + '/' + element - ret[absPath.indexOf('/') === 0 ? absPath.substr(1, absPath.length) : absPath] = { isDirectory: window.remixFileSystem.statSync(absPath).isDirectory() } + ret[absPath.indexOf('/') === 0 ? absPath.substr(1, absPath.length) : absPath] = { isDirectory: (await window.remixFileSystem.stat(absPath)).isDirectory() } // ^ ret does not accept path starting with '/' - }) + } } - callback(error, ret) - }) + if (cb) cb(null, ret) + return ret + } catch (error) { + if (cb) cb(error, null) + } } removePrefix (path) { diff --git a/apps/remix-ide/src/app/files/workspaceFileProvider.js b/apps/remix-ide/src/app/files/workspaceFileProvider.js index 3f8f9bf0ce..c616d3bd74 100644 --- a/apps/remix-ide/src/app/files/workspaceFileProvider.js +++ b/apps/remix-ide/src/app/files/workspaceFileProvider.js @@ -68,8 +68,8 @@ class WorkspaceFileProvider extends FileProvider { } async copyFolderToJson (directory, visitFile, visitFolder) { - visitFile = visitFile || (() => {}) - visitFolder = visitFolder || (() => {}) + visitFile = visitFile || function () { /* do nothing. */ } + visitFolder = visitFolder || function () { /* do nothing. */ } const regex = new RegExp(`.workspaces/${this.workspace}/`, 'g') let json = await super._copyFolderToJsonInternal(directory, ({ path, content }) => { visitFile({ path: path.replace(regex, ''), content }) diff --git a/apps/remix-ide/src/app/panels/layout.ts b/apps/remix-ide/src/app/panels/layout.ts index 663692db26..085dbc120f 100644 --- a/apps/remix-ide/src/app/panels/layout.ts +++ b/apps/remix-ide/src/app/panels/layout.ts @@ -1,7 +1,7 @@ import { Plugin } from '@remixproject/engine' import { Profile } from '@remixproject/plugin-utils' import { EventEmitter } from 'events' -import QueryParams from '../../lib/query-params' +import { QueryParams } from '@remix-project/remix-lib' const profile: Profile = { name: 'layout', @@ -21,6 +21,12 @@ interface panels { terminal: panelState } +export type PanelConfiguration = { + minimizeterminal: boolean, + minimizesidepanel: boolean, + embed: boolean +} + export class Layout extends Plugin { event: any panels: panels @@ -77,7 +83,7 @@ export class Layout extends Plugin { } }) const queryParams = new QueryParams() - const params = queryParams.get() + const params = queryParams.get() as PanelConfiguration if (params.minimizeterminal || params.embed) { this.panels.terminal.minimized = true this.event.emit('change', this.panels) diff --git a/apps/remix-ide/src/app/panels/tab-proxy.js b/apps/remix-ide/src/app/panels/tab-proxy.js index 267b54d853..a713b4bd02 100644 --- a/apps/remix-ide/src/app/panels/tab-proxy.js +++ b/apps/remix-ide/src/app/panels/tab-proxy.js @@ -2,8 +2,8 @@ import React from 'react' // eslint-disable-line import ReactDOM from 'react-dom' import { Plugin } from '@remixproject/engine' import { TabsUI } from '@remix-ui/tabs' +import { getPathIcon } from '@remix-ui/helper' const EventEmitter = require('events') -const helper = require('../../lib/helper') const profile = { name: 'tabs', @@ -70,13 +70,13 @@ export class TabProxy extends Plugin { this.tabsApi.activateTab(workspacePath) return } - this.addTab(workspacePath, '', () => { - this.fileManager.open(file) + this.addTab(workspacePath, '', async () => { + await this.fileManager.open(file) this.event.emit('openFile', file) this.emit('openFile', file) }, - () => { - this.fileManager.closeFile(file) + async () => { + await this.fileManager.closeFile(file) this.event.emit('closeFile', file) this.emit('closeFile', file) }) @@ -88,13 +88,13 @@ export class TabProxy extends Plugin { this.tabsApi.activateTab(path) return } - this.addTab(path, '', () => { - this.fileManager.open(file) + this.addTab(path, '', async () => { + await this.fileManager.open(file) this.event.emit('openFile', file) this.emit('openFile', file) }, - () => { - this.fileManager.closeFile(file) + async () => { + await this.fileManager.closeFile(file) this.event.emit('closeFile', file) this.emit('closeFile', file) }) @@ -197,12 +197,12 @@ export class TabProxy extends Plugin { } renameTab (oldName, newName) { - this.addTab(newName, '', () => { - this.fileManager.open(newName) + this.addTab(newName, '', async () => { + await this.fileManager.open(newName) this.event.emit('openFile', newName) }, - () => { - this.fileManager.closeFile(newName) + async () => { + await this.fileManager.closeFile(newName) this.event.emit('closeFile', newName) this.emit('closeFile', newName) }) @@ -231,7 +231,7 @@ export class TabProxy extends Plugin { title, icon, tooltip: name, - iconClass: helper.getPathIcon(name) + iconClass: getPathIcon(name) }) formatPath.shift() if (formatPath.length > 0) { @@ -247,7 +247,7 @@ export class TabProxy extends Plugin { title: duplicateTabTitle, icon, tooltip: duplicateTabName, - iconClass: helper.getPathIcon(duplicateTabName) + iconClass: getPathIcon(duplicateTabName) } } } @@ -261,7 +261,7 @@ export class TabProxy extends Plugin { title, icon, tooltip: name, - iconClass: helper.getPathIcon(name) + iconClass: getPathIcon(name) }) } diff --git a/apps/remix-ide/src/app/panels/terminal.js b/apps/remix-ide/src/app/panels/terminal.js index fd17d8b450..0854f7586e 100644 --- a/apps/remix-ide/src/app/panels/terminal.js +++ b/apps/remix-ide/src/app/panels/terminal.js @@ -117,6 +117,7 @@ class Terminal extends Plugin { scroll2bottom () { setTimeout(function () { + // do nothing. }, 0) } } diff --git a/apps/remix-ide/src/app/plugins/config.ts b/apps/remix-ide/src/app/plugins/config.ts index 61f7cdd41f..e44d403a12 100644 --- a/apps/remix-ide/src/app/plugins/config.ts +++ b/apps/remix-ide/src/app/plugins/config.ts @@ -1,5 +1,5 @@ import { Plugin } from '@remixproject/engine' -import QueryParams from '../../lib/query-params' +import { QueryParams } from '@remix-project/remix-lib' import Registry from '../state/registry' const profile = { diff --git a/apps/remix-ide/src/app/plugins/storage.ts b/apps/remix-ide/src/app/plugins/storage.ts new file mode 100644 index 0000000000..2bf50fdb58 --- /dev/null +++ b/apps/remix-ide/src/app/plugins/storage.ts @@ -0,0 +1,22 @@ +import { Plugin } from '@remixproject/engine'; + +const profile = { + name: 'storage', + displayName: 'Storage', + description: 'Storage', + methods: ['getStorage'] +}; + +export class StoragePlugin extends Plugin { + constructor() { + super(profile); + } + + async getStorage() { + if ('storage' in navigator && 'estimate' in navigator.storage) { + return navigator.storage.estimate() + } else { + throw new Error("Can't get storage quota"); + } + } +} diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index bcc11fa2dd..4718b4dee6 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -3,9 +3,9 @@ import React from 'react' // eslint-disable-line import ReactDOM from 'react-dom' import { SolidityCompiler } from '@remix-ui/solidity-compiler' // eslint-disable-line import { CompileTabLogic } from '@remix-ui/solidity-compiler' // eslint-disable-line -import { CompilerApiMixin } from '@remixproject/solidity-compiler-plugin' +import { CompilerApiMixin } from '@remixproject/solidity-compiler-plugin' // eslint-disable-line import { ViewPlugin } from '@remixproject/engine-web' -import QueryParams from '../../lib/query-params' +import { QueryParams } from '@remix-project/remix-lib' // import { ICompilerApi } from '@remix-project/remix-lib-ts' import * as packageJson from '../../../../../package.json' import { compilerConfigChangedToastMsg, compileToastMsg } from '@remix-ui/helper' diff --git a/apps/remix-ide/src/app/tabs/debugger-tab.js b/apps/remix-ide/src/app/tabs/debugger-tab.js index 741a433795..6ac7235c09 100644 --- a/apps/remix-ide/src/app/tabs/debugger-tab.js +++ b/apps/remix-ide/src/app/tabs/debugger-tab.js @@ -1,5 +1,5 @@ import { DebuggerUI } from '@remix-ui/debugger-ui' // eslint-disable-line -import { DebuggerApiMixin } from '@remixproject/debugger-plugin' +import { DebuggerApiMixin } from '@remixproject/debugger-plugin' // eslint-disable-line import { ViewPlugin } from '@remixproject/engine-web' import * as packageJson from '../../../../../package.json' import React from 'react' // eslint-disable-line diff --git a/apps/remix-ide/src/app/tabs/runTab/model/recorder.js b/apps/remix-ide/src/app/tabs/runTab/model/recorder.js index a8b71b815e..6178063843 100644 --- a/apps/remix-ide/src/app/tabs/runTab/model/recorder.js +++ b/apps/remix-ide/src/app/tabs/runTab/model/recorder.js @@ -11,10 +11,9 @@ const helper = require('../../../../lib/helper') */ class Recorder { constructor (blockchain) { - var self = this - self.event = new EventManager() - self.blockchain = blockchain - self.data = { _listen: true, _replay: false, journal: [], _createdContracts: {}, _createdContractsReverse: {}, _usedAccounts: {}, _abis: {}, _contractABIReferences: {}, _linkReferences: {} } + this.event = new EventManager() + this.blockchain = blockchain + this.data = { _listen: true, _replay: false, journal: [], _createdContracts: {}, _createdContractsReverse: {}, _usedAccounts: {}, _abis: {}, _contractABIReferences: {}, _linkReferences: {} } this.blockchain.event.register('initiatingTransaction', (timestamp, tx, payLoad) => { if (tx.useCall) return @@ -33,11 +32,11 @@ class Recorder { if (record.linkReferences && Object.keys(record.linkReferences).length) { for (var file in record.linkReferences) { for (var lib in record.linkReferences[file]) { - self.data._linkReferences[lib] = '
' + this.data._linkReferences[lib] = '
' } } } - self.data._abis[keccak] = abi + this.data._abis[keccak] = abi this.data._contractABIReferences[timestamp] = keccak } else { @@ -57,8 +56,8 @@ class Recorder { this.blockchain.getAccounts((error, accounts) => { if (error) return console.log(error) record.from = `account{${accounts.indexOf(from)}}` - self.data._usedAccounts[record.from] = from - self.append(timestamp, record) + this.data._usedAccounts[record.from] = from + this.append(timestamp, record) }) } }) @@ -128,9 +127,8 @@ class Recorder { * */ append (timestamp, record) { - var self = this - self.data.journal.push({ timestamp, record }) - self.event.trigger('newTxRecorded', [self.data.journal.length]) + this.data.journal.push({ timestamp, record }) + this.event.trigger('newTxRecorded', [this.data.journal.length]) } /** @@ -138,17 +136,16 @@ class Recorder { * */ getAll () { - var self = this - var records = [].concat(self.data.journal) + var records = [].concat(this.data.journal) return { - accounts: self.data._usedAccounts, - linkReferences: self.data._linkReferences, + accounts: this.data._usedAccounts, + linkReferences: this.data._linkReferences, transactions: records.sort((A, B) => { var stampA = A.timestamp var stampB = B.timestamp return stampA - stampB }), - abis: self.data._abis + abis: this.data._abis } } @@ -157,17 +154,16 @@ class Recorder { * */ clearAll () { - var self = this - self.data._listen = true - self.data._replay = false - self.data.journal = [] - self.data._createdContracts = {} - self.data._createdContractsReverse = {} - self.data._usedAccounts = {} - self.data._abis = {} - self.data._contractABIReferences = {} - self.data._linkReferences = {} - self.event.trigger('cleared', []) + this.data._listen = true + this.data._replay = false + this.data.journal = [] + this.data._createdContracts = {} + this.data._createdContractsReverse = {} + this.data._usedAccounts = {} + this.data._abis = {} + this.data._contractABIReferences = {} + this.data._linkReferences = {} + this.event.trigger('cleared', []) } /** @@ -180,11 +176,10 @@ class Recorder { * */ run (records, accounts, options, abis, linkReferences, confirmationCb, continueCb, promptCb, alertCb, logCallBack, newContractFn) { - var self = this - self.setListen(false) + this.setListen(false) logCallBack(`Running ${records.length} transaction(s) ...`) - async.eachOfSeries(records, function (tx, index, cb) { - var record = self.resolveAddress(tx.record, accounts, options) + async.eachOfSeries(records, (tx, index, cb) => { + var record = this.resolveAddress(tx.record, accounts, options) var abi = abis[tx.record.abi] if (!abi) { return alertCb('cannot find ABI for ' + tx.record.abi + '. Execution stopped at ' + index) @@ -193,9 +188,9 @@ class Recorder { if (record.linkReferences && Object.keys(record.linkReferences).length) { for (var k in linkReferences) { var link = linkReferences[k] - var timestamp = self.extractTimestamp(link) - if (timestamp && self.data._createdContractsReverse[timestamp]) { - link = self.data._createdContractsReverse[timestamp] + var timestamp = this.extractTimestamp(link) + if (timestamp && this.data._createdContractsReverse[timestamp]) { + link = this.data._createdContractsReverse[timestamp] } tx.record.bytecode = format.linkLibraryStandardFromlinkReferences(k, link.replace('0x', ''), tx.record.bytecode, tx.record.linkReferences) } @@ -224,8 +219,8 @@ class Recorder { isString = false value = JSON.stringify(value) } - for (var timestamp in self.data._createdContractsReverse) { - value = value.replace(new RegExp('created\\{' + timestamp + '\\}', 'g'), self.data._createdContractsReverse[timestamp]) + for (var timestamp in this.data._createdContractsReverse) { + value = value.replace(new RegExp('created\\{' + timestamp + '\\}', 'g'), this.data._createdContractsReverse[timestamp]) } if (!isString) value = JSON.parse(value) tx.record.parameters[index] = value @@ -243,8 +238,8 @@ class Recorder { logCallBack(`(${index}) data: ${data.data}`) record.data = { dataHex: data.data, funArgs: tx.record.parameters, funAbi: fnABI, contractBytecode: tx.record.bytecode, contractName: tx.record.contractName, timestamp: tx.timestamp } - self.blockchain.runTx(record, confirmationCb, continueCb, promptCb, - function (err, txResult, rawAddress) { + this.blockchain.runTx(record, confirmationCb, continueCb, promptCb, + (err, txResult, rawAddress) => { if (err) { console.error(err) return logCallBack(err + '. Execution failed at ' + index) @@ -252,14 +247,14 @@ class Recorder { if (rawAddress) { const address = helper.addressToString(rawAddress) // save back created addresses for the convertion from tokens to real adresses - self.data._createdContracts[address] = tx.timestamp - self.data._createdContractsReverse[tx.timestamp] = address + this.data._createdContracts[address] = tx.timestamp + this.data._createdContractsReverse[tx.timestamp] = address newContractFn(abi, address, record.contractName) } cb(err) } ) - }, () => { self.setListen(true) }) + }, () => { this.setListen(true) }) } runScenario (json, continueCb, promptCb, alertCb, confirmationCb, logCallBack, cb) { diff --git a/apps/remix-ide/src/app/tabs/test-tab.js b/apps/remix-ide/src/app/tabs/test-tab.js index 40dd78b326..a03d74a846 100644 --- a/apps/remix-ide/src/app/tabs/test-tab.js +++ b/apps/remix-ide/src/app/tabs/test-tab.js @@ -119,7 +119,7 @@ module.exports = class TestTab extends ViewPlugin { usingWorker: canUseWorker(currentVersion), runs } - this.testRunner.runTestSources(runningTest, compilerConfig, () => {}, () => {}, null, (error, result) => { + this.testRunner.runTestSources(runningTest, compilerConfig, () => { /* Do nothing. */ }, () => { /* Do nothing. */ }, null, (error, result) => { if (error) return reject(error) resolve(result) }, (url, cb) => { diff --git a/apps/remix-ide/src/app/tabs/theme-module.js b/apps/remix-ide/src/app/tabs/theme-module.js index e973bdd2f9..78c8f1788d 100644 --- a/apps/remix-ide/src/app/tabs/theme-module.js +++ b/apps/remix-ide/src/app/tabs/theme-module.js @@ -1,6 +1,6 @@ import { Plugin } from '@remixproject/engine' import { EventEmitter } from 'events' -import QueryParams from '../../lib/query-params' +import { QueryParams } from '@remix-project/remix-lib' import * as packageJson from '../../../../../package.json' import Registry from '../state/registry' const _paq = window._paq = window._paq || [] diff --git a/apps/remix-ide/src/assets/js/init.js b/apps/remix-ide/src/assets/js/init.js new file mode 100644 index 0000000000..f3cd64d79f --- /dev/null +++ b/apps/remix-ide/src/assets/js/init.js @@ -0,0 +1,107 @@ +/* eslint-disable prefer-promise-reject-errors */ +function urlParams () { + var qs = window.location.hash.substr(1) + + if (window.location.search.length > 0) { + // use legacy query params instead of hash + window.location.hash = window.location.search.substr(1) + window.location.search = '' + } + + var params = {} + var parts = qs.split('&') + for (var x in parts) { + var keyValue = parts[x].split('=') + if (keyValue[0] !== '') { + params[keyValue[0]] = keyValue[1] + } + } + return params +} +const defaultVersion = '0.8.0' +const versionToLoad = urlParams().appVersion ? urlParams().appVersion : defaultVersion + +const assets = { + '0.8.0': ['https://use.fontawesome.com/releases/v5.8.1/css/all.css', 'assets/css/pygment_trac.css'], + '0.7.7': ['assets/css/font-awesome.min.css', 'assets/css/pygment_trac.css'] +} +const versions = { + '0.7.7': 'assets/js/0.7.7/app.js', // commit 7b5c7ae3de935e0ccc32eadfd83bf7349478491e + '0.8.0': 'main.js' +} +for (const k in assets[versionToLoad]) { + const app = document.createElement('link') + app.setAttribute('rel', 'stylesheet') + app.setAttribute('href', assets[versionToLoad][k]) + if (assets[versionToLoad][k] === 'https://use.fontawesome.com/releases/v5.8.1/css/all.css') { + app.setAttribute('integrity', 'sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf') + app.setAttribute('crossorigin', 'anonymous') + } + document.head.appendChild(app) +} + +window.onload = () => { + // eslint-disable-next-line no-undef + class RemixFileSystem extends LightningFS { + constructor (...t) { + super(...t) + this.addSlash = (file) => { + if (!file.startsWith('/')) file = '/' + file + return file + } + this.base = this.promises + this.promises = { + ...this.promises, + + exists: async (path) => { + return new Promise((resolve, reject) => { + this.base.stat(this.addSlash(path)).then(() => resolve(true)).catch(() => resolve(false)) + }) + }, + rmdir: async (path) => { + return this.base.rmdir(this.addSlash(path)) + }, + readdir: async (path) => { + return this.base.readdir(this.addSlash(path)) + }, + unlink: async (path) => { + return this.base.unlink(this.addSlash(path)) + }, + mkdir: async (path) => { + return this.base.mkdir(this.addSlash(path)) + }, + readFile: async (path, options) => { + return this.base.readFile(this.addSlash(path), options) + }, + rename: async (from, to) => { + return this.base.rename(this.addSlash(from), this.addSlash(to)) + }, + writeFile: async (path, content, options) => { + return this.base.writeFile(this.addSlash(path), content, options) + }, + stat: async (path) => { + return this.base.stat(this.addSlash(path)) + } + } + } + } + + function loadApp () { + const app = document.createElement('script') + app.setAttribute('src', versions[versionToLoad]) + document.body.appendChild(app) + } + + window.remixFileSystemCallback = new RemixFileSystem() + window.remixFileSystemCallback.init('RemixFileSystem').then(() => { + window.remixFileSystem = window.remixFileSystemCallback.promises + // check if .workspaces is present in indexeddb + window.remixFileSystem.stat('.workspaces').then((dir) => { + if (dir.isDirectory()) loadApp() + }).catch(() => { + // no indexeddb .workspaces -> run migration + // eslint-disable-next-line no-undef + migrateFilesFromLocalStorage(loadApp) + }) + }) +} diff --git a/apps/remix-ide/src/assets/js/lightning-fs.min.js b/apps/remix-ide/src/assets/js/lightning-fs.min.js new file mode 100644 index 0000000000..a306197743 --- /dev/null +++ b/apps/remix-ide/src/assets/js/lightning-fs.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.LightningFS=e():t.LightningFS=e()}(self,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=3)}([function(t,e){function i(t){if(0===t.length)return".";let e=s(t);return e=e.reduce(r,[]),n(...e)}function n(...t){if(0===t.length)return"";let e=t.join("/");return e=e.replace(/\/{2,}/g,"/")}function s(t){if(0===t.length)return[];if("/"===t)return["/"];let e=t.split("/");return""===e[e.length-1]&&e.pop(),"/"===t[0]?e[0]="/":"."!==e[0]&&e.unshift("."),e}function r(t,e){if(0===t.length)return t.push(e),t;if("."===e)return t;if(".."===e){if(1===t.length){if("/"===t[0])throw new Error("Unable to normalize path - traverses above root directory");if("."===t[0])return t.push(e),t}return".."===t[t.length-1]?(t.push(".."),t):(t.pop(),t)}return t.push(e),t}t.exports={join:n,normalize:i,split:s,basename:function(t){if("/"===t)throw new Error(`Cannot get basename of "${t}"`);const e=t.lastIndexOf("/");return-1===e?t:t.slice(e+1)},dirname:function(t){const e=t.lastIndexOf("/");if(-1===e)throw new Error(`Cannot get dirname of "${t}"`);return 0===e?"/":t.slice(0,e)},resolve:function(...t){let e="";for(let s of t)e=s.startsWith("/")?s:i(n(e,s));return e}}},function(t,e){function i(t){return class extends Error{constructor(...e){super(...e),this.code=t,this.message?this.message=t+": "+this.message:this.message=t}}}const n=i("EEXIST"),s=i("ENOENT"),r=i("ENOTDIR"),o=i("ENOTEMPTY"),a=i("ETIMEDOUT");t.exports={EEXIST:n,ENOENT:s,ENOTDIR:r,ENOTEMPTY:o,ETIMEDOUT:a}},function(t,e,i){"use strict";i.r(e),i.d(e,"Store",function(){return n}),i.d(e,"get",function(){return o}),i.d(e,"set",function(){return a}),i.d(e,"update",function(){return h}),i.d(e,"del",function(){return c}),i.d(e,"clear",function(){return l}),i.d(e,"keys",function(){return u}),i.d(e,"close",function(){return d});class n{constructor(t="keyval-store",e="keyval"){this.storeName=e,this._dbName=t,this._storeName=e,this._init()}_init(){this._dbp||(this._dbp=new Promise((t,e)=>{const i=indexedDB.open(this._dbName);i.onerror=(()=>e(i.error)),i.onsuccess=(()=>t(i.result)),i.onupgradeneeded=(()=>{i.result.createObjectStore(this._storeName)})}))}_withIDBStore(t,e){return this._init(),this._dbp.then(i=>new Promise((n,s)=>{const r=i.transaction(this.storeName,t);r.oncomplete=(()=>n()),r.onabort=r.onerror=(()=>s(r.error)),e(r.objectStore(this.storeName))}))}_close(){return this._init(),this._dbp.then(t=>{t.close(),this._dbp=void 0})}}let s;function r(){return s||(s=new n),s}function o(t,e=r()){let i;return e._withIDBStore("readwrite",e=>{i=e.get(t)}).then(()=>i.result)}function a(t,e,i=r()){return i._withIDBStore("readwrite",i=>{i.put(e,t)})}function h(t,e,i=r()){return i._withIDBStore("readwrite",i=>{const n=i.get(t);n.onsuccess=(()=>{i.put(e(n.result),t)})})}function c(t,e=r()){return e._withIDBStore("readwrite",e=>{e.delete(t)})}function l(t=r()){return t._withIDBStore("readwrite",t=>{t.clear()})}function u(t=r()){const e=[];return t._withIDBStore("readwrite",t=>{(t.openKeyCursor||t.openCursor).call(t).onsuccess=function(){this.result&&(e.push(this.result.key),this.result.continue())}}).then(()=>e)}function d(t=r()){return t._close()}},function(t,e,i){const n=i(4),s=i(5);function r(t,e){"function"==typeof t&&(e=t);return[(...t)=>e(null,...t),e=n(e)]}t.exports=class{constructor(...t){this.promises=new s(...t),this.init=this.init.bind(this),this.readFile=this.readFile.bind(this),this.writeFile=this.writeFile.bind(this),this.unlink=this.unlink.bind(this),this.readdir=this.readdir.bind(this),this.mkdir=this.mkdir.bind(this),this.rmdir=this.rmdir.bind(this),this.rename=this.rename.bind(this),this.stat=this.stat.bind(this),this.lstat=this.lstat.bind(this),this.readlink=this.readlink.bind(this),this.symlink=this.symlink.bind(this),this.backFile=this.backFile.bind(this),this.du=this.du.bind(this)}init(t,e){return this.promises.init(t,e)}readFile(t,e,i){const[n,s]=r(e,i);this.promises.readFile(t,e).then(n).catch(s)}writeFile(t,e,i,n){const[s,o]=r(i,n);this.promises.writeFile(t,e,i).then(s).catch(o)}unlink(t,e,i){const[n,s]=r(e,i);this.promises.unlink(t,e).then(n).catch(s)}readdir(t,e,i){const[n,s]=r(e,i);this.promises.readdir(t,e).then(n).catch(s)}mkdir(t,e,i){const[n,s]=r(e,i);this.promises.mkdir(t,e).then(n).catch(s)}rmdir(t,e,i){const[n,s]=r(e,i);this.promises.rmdir(t,e).then(n).catch(s)}rename(t,e,i){const[n,s]=r(i);this.promises.rename(t,e).then(n).catch(s)}stat(t,e,i){const[n,s]=r(e,i);this.promises.stat(t).then(n).catch(s)}lstat(t,e,i){const[n,s]=r(e,i);this.promises.lstat(t).then(n).catch(s)}readlink(t,e,i){const[n,s]=r(e,i);this.promises.readlink(t).then(n).catch(s)}symlink(t,e,i){const[n,s]=r(i);this.promises.symlink(t,e).then(n).catch(s)}backFile(t,e,i){const[n,s]=r(e,i);this.promises.backFile(t,e).then(n).catch(s)}du(t,e){const[i,n]=r(e);this.promises.du(t).then(i).catch(n)}}},function(t,e){t.exports=function(t){var e,i;if("function"!=typeof t)throw new Error("expected a function but got "+t);return function(){return e?i:(e=!0,i=t.apply(this,arguments))}}},function(t,e,i){const n=i(6),s=i(16),r=i(0);function o(t,e,...i){return void 0!==e&&"function"!=typeof e||(e={}),"string"==typeof e&&(e={encoding:e}),[t=r.normalize(t),e,...i]}function a(t,e,i,...n){return void 0!==i&&"function"!=typeof i||(i={}),"string"==typeof i&&(i={encoding:i}),[t=r.normalize(t),e,i,...n]}function h(t,e,...i){return[r.normalize(t),r.normalize(e),...i]}t.exports=class{constructor(t,e={}){this.init=this.init.bind(this),this.readFile=this._wrap(this.readFile,o,!1),this.writeFile=this._wrap(this.writeFile,a,!0),this.unlink=this._wrap(this.unlink,o,!0),this.readdir=this._wrap(this.readdir,o,!1),this.mkdir=this._wrap(this.mkdir,o,!0),this.rmdir=this._wrap(this.rmdir,o,!0),this.rename=this._wrap(this.rename,h,!0),this.stat=this._wrap(this.stat,o,!1),this.lstat=this._wrap(this.lstat,o,!1),this.readlink=this._wrap(this.readlink,o,!1),this.symlink=this._wrap(this.symlink,h,!0),this.backFile=this._wrap(this.backFile,o,!0),this.du=this._wrap(this.du,o,!1),this._deactivationPromise=null,this._deactivationTimeout=null,this._activationPromise=null,this._operations=new Set,t&&this.init(t,e)}async init(...t){return this._initPromiseResolve&&await this._initPromise,this._initPromise=this._init(...t),this._initPromise}async _init(t,e={}){await this._gracefulShutdown(),this._activationPromise&&await this._deactivate(),this._backend&&this._backend.destroy&&await this._backend.destroy(),this._backend=e.backend||new n,this._backend.init&&await this._backend.init(t,e),this._initPromiseResolve&&(this._initPromiseResolve(),this._initPromiseResolve=null),e.defer||this.stat("/")}async _gracefulShutdown(){this._operations.size>0&&(this._isShuttingDown=!0,await new Promise(t=>this._gracefulShutdownResolve=t),this._isShuttingDown=!1,this._gracefulShutdownResolve=null)}_wrap(t,e,i){return async(...n)=>{n=e(...n);let s={name:t.name,args:n};this._operations.add(s);try{return await this._activate(),await t.apply(this,n)}finally{this._operations.delete(s),i&&this._backend.saveSuperblock(),0===this._operations.size&&(this._deactivationTimeout||clearTimeout(this._deactivationTimeout),this._deactivationTimeout=setTimeout(this._deactivate.bind(this),500))}}}async _activate(){this._initPromise||console.warn(new Error(`Attempted to use LightningFS ${this._name} before it was initialized.`)),await this._initPromise,this._deactivationTimeout&&(clearTimeout(this._deactivationTimeout),this._deactivationTimeout=null),this._deactivationPromise&&await this._deactivationPromise,this._deactivationPromise=null,this._activationPromise||(this._activationPromise=this._backend.activate?this._backend.activate():Promise.resolve()),await this._activationPromise}async _deactivate(){return this._activationPromise&&await this._activationPromise,this._deactivationPromise||(this._deactivationPromise=this._backend.deactivate?this._backend.deactivate():Promise.resolve()),this._activationPromise=null,this._gracefulShutdownResolve&&this._gracefulShutdownResolve(),this._deactivationPromise}async readFile(t,e){return this._backend.readFile(t,e)}async writeFile(t,e,i){return await this._backend.writeFile(t,e,i),null}async unlink(t,e){return await this._backend.unlink(t,e),null}async readdir(t,e){return this._backend.readdir(t,e)}async mkdir(t,e){return await this._backend.mkdir(t,e),null}async rmdir(t,e){return await this._backend.rmdir(t,e),null}async rename(t,e){return await this._backend.rename(t,e),null}async stat(t,e){const i=await this._backend.stat(t,e);return new s(i)}async lstat(t,e){const i=await this._backend.lstat(t,e);return new s(i)}async readlink(t,e){return this._backend.readlink(t,e)}async symlink(t,e){return await this._backend.symlink(t,e),null}async backFile(t,e){return await this._backend.backFile(t,e),null}async du(t){return this._backend.du(t)}}},function(t,e,i){const{encode:n,decode:s}=i(7),r=i(10),o=i(11),{ENOENT:a,ENOTEMPTY:h,ETIMEDOUT:c}=i(1),l=i(12),u=i(13),d=i(14),_=i(15),p=i(0);t.exports=class{constructor(){this.saveSuperblock=r(()=>{this._saveSuperblock()},500)}async init(t,{wipe:e,url:i,urlauto:n,fileDbName:s=t,fileStoreName:r=t+"_files",lockDbName:a=t+"_lock",lockStoreName:h=t+"_lock"}={}){this._name=t,this._idb=new l(s,r),this._mutex=navigator.locks?new _(t):new d(a,h),this._cache=new o(t),this._opts={wipe:e,url:i},this._needsWipe=!!e,i&&(this._http=new u(i),this._urlauto=!!n)}async activate(){if(this._cache.activated)return;this._needsWipe&&(this._needsWipe=!1,await this._idb.wipe(),await this._mutex.release({force:!0})),await this._mutex.has()||await this._mutex.wait();const t=await this._idb.loadSuperblock();if(t)this._cache.activate(t);else if(this._http){const t=await this._http.loadSuperblock();this._cache.activate(t),await this._saveSuperblock()}else this._cache.activate();if(!await this._mutex.has())throw new c}async deactivate(){await this._mutex.has()&&await this._saveSuperblock(),this._cache.deactivate();try{await this._mutex.release()}catch(t){console.log(t)}await this._idb.close()}async _saveSuperblock(){this._cache.activated&&(this._lastSavedAt=Date.now(),await this._idb.saveSuperblock(this._cache._root))}_writeStat(t,e,i){let n=p.split(p.dirname(t)),s=n.shift();for(let t of n){s=p.join(s,t);try{this._cache.mkdir(s,{mode:511})}catch(t){}}return this._cache.writeStat(t,e,i)}async readFile(t,e){const{encoding:i}=e;if(i&&"utf8"!==i)throw new Error('Only "utf8" encoding is supported in readFile');let n=null,r=null;try{r=this._cache.stat(t),n=await this._idb.readFile(r.ino)}catch(t){if(!this._urlauto)throw t}if(!n&&this._http){let e=this._cache.lstat(t);for(;"symlink"===e.type;)t=p.resolve(p.dirname(t),e.target),e=this._cache.lstat(t);n=await this._http.readFile(t)}if(n&&(r&&r.size==n.byteLength||(r=await this._writeStat(t,n.byteLength,{mode:r?r.mode:438}),this.saveSuperblock()),"utf8"===i&&(n=s(n))),!r)throw new a(t);return n}async writeFile(t,e,i){const{mode:s,encoding:r="utf8"}=i;if("string"==typeof e){if("utf8"!==r)throw new Error('Only "utf8" encoding is supported in writeFile');e=n(e)}const o=await this._cache.writeStat(t,e.byteLength,{mode:s});await this._idb.writeFile(o.ino,e)}async unlink(t,e){const i=this._cache.lstat(t);this._cache.unlink(t),"symlink"!==i.type&&await this._idb.unlink(i.ino)}readdir(t,e){return this._cache.readdir(t)}mkdir(t,e){const{mode:i=511}=e;this._cache.mkdir(t,{mode:i})}rmdir(t,e){if("/"===t)throw new h;this._cache.rmdir(t)}rename(t,e){this._cache.rename(t,e)}stat(t,e){return this._cache.stat(t)}lstat(t,e){return this._cache.lstat(t)}readlink(t,e){return this._cache.readlink(t)}symlink(t,e){this._cache.symlink(t,e)}async backFile(t,e){let i=await this._http.sizeFile(t);await this._writeStat(t,i,e)}du(t){return this._cache.du(t)}}},function(t,e,i){i(8),t.exports={encode:t=>(new TextEncoder).encode(t),decode:t=>(new TextDecoder).decode(t)}},function(t,e,i){(function(t){!function(t){function e(t){if("utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+t+"') is invalid.")}function i(t,e){if(e=void 0===e?{fatal:!1}:e,"utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+t+"') is invalid.");if(e.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(t.TextEncoder&&t.TextDecoder)return!1;Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");e=0;for(var i=t.length,n=0,s=Math.max(32,i+(i>>1)+7),r=new Uint8Array(s>>3<<3);e=o){if(e=o)continue}if(n+4>r.length&&(s+=8,s=(s*=1+e/t.length*2)>>3<<3,(a=new Uint8Array(s)).set(r),r=a),0==(4294967168&o))r[n++]=o;else{if(0==(4294965248&o))r[n++]=o>>6&31|192;else if(0==(4294901760&o))r[n++]=o>>12&15|224,r[n++]=o>>6&63|128;else{if(0!=(4292870144&o))continue;r[n++]=o>>18&7|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128}r[n++]=63&o|128}}return r.slice(0,n)},Object.defineProperty(i.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(i.prototype,"fatal",{value:!1}),Object.defineProperty(i.prototype,"ignoreBOM",{value:!1}),i.prototype.decode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");e=0;for(var i=(t=new Uint8Array(t)).length,n=[];e>>10&1023|55296),s=56320|1023&s),n.push(s)}}return String.fromCharCode.apply(null,n)},t.TextEncoder=e,t.TextDecoder=i}("undefined"!=typeof window?window:void 0!==t?t:this)}).call(this,i(9))},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t,e,i){var n;return function(){if(!e)return t.apply(this,arguments);var s=this,r=arguments,o=i&&!n;return clearTimeout(n),n=setTimeout(function(){if(n=null,!o)return t.apply(s,r)},e),o?t.apply(this,arguments):void 0}}},function(t,e,i){const n=i(0),{EEXIST:s,ENOENT:r,ENOTDIR:o,ENOTEMPTY:a}=i(1),h=0;t.exports=class{constructor(){}_makeRoot(t=new Map){return t.set(h,{mode:511,type:"dir",size:0,ino:0,mtimeMs:Date.now()}),t}activate(t=null){this._root=null===t?new Map([["/",this._makeRoot()]]):"string"==typeof t?new Map([["/",this._makeRoot(this.parse(t))]]):t}get activated(){return!!this._root}deactivate(){this._root=void 0}size(){return this._countInodes(this._root.get("/"))-1}_countInodes(t){let e=1;for(let[i,n]of t)i!==h&&(e+=this._countInodes(n));return e}autoinc(){return this._maxInode(this._root.get("/"))+1}_maxInode(t){let e=t.get(h).ino;for(let[i,n]of t)i!==h&&(e=Math.max(e,this._maxInode(n)));return e}print(t=this._root.get("/")){let e="";const i=(t,n)=>{for(let[s,r]of t){if(0===s)continue;let t=r.get(h),o=t.mode.toString(8);e+=`${"\t".repeat(n)}${s}\t${o}`,"file"===t.type?e+=`\t${t.size}\t${t.mtimeMs}\n`:(e+="\n",i(r,n+1))}};return i(t,0),e}parse(t){let e=0;function i(t){const i=++e,n=1===t.length?"dir":"file";let[s,r,o]=t;return s=parseInt(s,8),r=r?parseInt(r):0,o=o?parseInt(o):Date.now(),new Map([[h,{mode:s,type:n,size:r,mtimeMs:o,ino:i}]])}let n=t.trim().split("\n"),s=this._makeRoot(),r=[{indent:-1,node:s},{indent:0,node:null}];for(let t of n){let e=t.match(/^\t*/)[0].length;t=t.slice(e);let[n,...s]=t.split("\t"),o=i(s);if(e<=r[r.length-1].indent)for(;e<=r[r.length-1].indent;)r.pop();r.push({indent:e,node:o}),r[r.length-2].node.set(n,o)}return s}_lookup(t,e=!0){let i=this._root,s="/",o=n.split(t);for(let a=0;a1)throw new a;let i=this._lookup(n.dirname(t)),s=n.basename(t);i.delete(s)}readdir(t){let e=this._lookup(t);if("dir"!==e.get(h).type)throw new o;return[...e.keys()].filter(t=>"string"==typeof t)}writeStat(t,e,{mode:i}){let s;try{let e=this.stat(t);null==i&&(i=e.mode),s=e.ino}catch(t){}null==i&&(i=438),null==s&&(s=this.autoinc());let r=this._lookup(n.dirname(t)),o=n.basename(t),a={mode:i,type:"file",size:e,mtimeMs:Date.now(),ino:s},c=new Map;return c.set(h,a),r.set(o,c),a}unlink(t){let e=this._lookup(n.dirname(t)),i=n.basename(t);e.delete(i)}rename(t,e){let i=n.basename(e),s=this._lookup(t);this._lookup(n.dirname(e)).set(i,s),this.unlink(t)}stat(t){return this._lookup(t).get(h)}lstat(t){return this._lookup(t,!1).get(h)}readlink(t){return this._lookup(t,!1).get(h).target}symlink(t,e){let i,s;try{let t=this.stat(e);null===s&&(s=t.mode),i=t.ino}catch(t){}null==s&&(s=40960),null==i&&(i=this.autoinc());let r=this._lookup(n.dirname(e)),o=n.basename(e),a={mode:s,type:"symlink",target:t,size:0,mtimeMs:Date.now(),ino:i},c=new Map;return c.set(h,a),r.set(o,c),a}_du(t){let e=0;for(const[i,n]of t.entries())e+=i===h?n.size:this._du(n);return e}du(t){let e=this._lookup(t);return this._du(e)}}},function(t,e,i){const n=i(2);t.exports=class{constructor(t,e){this._database=t,this._storename=e,this._store=new n.Store(this._database,this._storename)}saveSuperblock(t){return n.set("!root",t,this._store)}loadSuperblock(){return n.get("!root",this._store)}readFile(t){return n.get(t,this._store)}writeFile(t,e){return n.set(t,e,this._store)}unlink(t){return n.del(t,this._store)}wipe(){return n.clear(this._store)}close(){return n.close(this._store)}}},function(t,e){t.exports=class{constructor(t){this._url=t}loadSuperblock(){return fetch(this._url+"/.superblock.txt").then(t=>t.ok?t.text():null)}async readFile(t){const e=await fetch(this._url+t);if(200===e.status)return e.arrayBuffer();throw new Error("ENOENT")}async sizeFile(t){const e=await fetch(this._url+t,{method:"HEAD"});if(200===e.status)return e.headers.get("content-length");throw new Error("ENOENT")}}},function(t,e,i){const n=i(2),s=t=>new Promise(e=>setTimeout(e,t));t.exports=class{constructor(t,e){this._id=Math.random(),this._database=t,this._storename=e,this._store=new n.Store(this._database,this._storename),this._lock=null}async has({margin:t=2e3}={}){if(this._lock&&this._lock.holder===this._id){const e=Date.now();return this._lock.expires>e+t||await this.renew()}return!1}async renew({ttl:t=5e3}={}){let e;return await n.update("lock",i=>{const n=Date.now()+t;return e=i&&i.holder===this._id,this._lock=e?{holder:this._id,expires:n}:i,this._lock},this._store),e}async acquire({ttl:t=5e3}={}){let e,i,s;if(await n.update("lock",n=>{const r=Date.now(),o=r+t;return i=n&&n.expires(e=t||n&&n.holder===this._id,i=void 0===n,s=n&&n.holder!==this._id,this._lock=e?void 0:n,this._lock),this._store),await n.close(this._store),!e&&!t){if(i)throw new Error("Mutex double-freed");if(s)throw new Error("Mutex lost ownership")}return e}}},function(t,e){t.exports=class{constructor(t){this._id=Math.random(),this._database=t,this._has=!1,this._release=null}async has(){return this._has}async acquire(){return new Promise(t=>{navigator.locks.request(this._database+"_lock",{ifAvailable:!0},e=>(this._has=!!e,t(!!e),new Promise(t=>{this._release=t})))})}async wait({timeout:t=6e5}={}){return new Promise((e,i)=>{const n=new AbortController;setTimeout(()=>{n.abort(),i(new Error("Mutex timeout"))},t),navigator.locks.request(this._database+"_lock",{signal:n.signal},t=>(this._has=!!t,e(!!t),new Promise(t=>{this._release=t})))})}async release({force:t=!1}={}){this._has=!1,this._release?this._release():t&&navigator.locks.request(this._database+"_lock",{steal:!0},t=>!0)}}},function(t,e){t.exports=class{constructor(t){this.type=t.type,this.mode=t.mode,this.size=t.size,this.ino=t.ino,this.mtimeMs=t.mtimeMs,this.ctimeMs=t.ctimeMs||t.mtimeMs,this.uid=1,this.gid=1,this.dev=1}isFile(){return"file"===this.type}isDirectory(){return"dir"===this.type}isSymbolicLink(){return"symlink"===this.type}}}])}); \ No newline at end of file diff --git a/apps/remix-ide/src/assets/js/migrate.js b/apps/remix-ide/src/assets/js/migrate.js new file mode 100644 index 0000000000..1de4cd0cb1 --- /dev/null +++ b/apps/remix-ide/src/assets/js/migrate.js @@ -0,0 +1,139 @@ +// eslint-disable-next-line no-unused-vars +async function migrateFilesFromLocalStorage (cb) { + let testmigration = false // migration loads test data into localstorage with browserfs + // indexeddb will be empty by this point, so there is no danger but do a check for the origin to load test data so it runs only locally + testmigration = window.location.hash.includes('e2e_testmigration=true') && window.location.host === '127.0.0.1:8080' && window.location.protocol === 'http:' + // eslint-disable-next-line no-undef + BrowserFS.install(window) + // eslint-disable-next-line no-undef + BrowserFS.configure({ + fs: 'LocalStorage' + }, async function (e) { + if (e) console.log(e) + + const browserFS = window.require('fs') + + /** + * copy the folder recursively (internal use) + * @param {string} path is the folder to be copied over + * @param {Function} visitFile is a function called for each visited files + * @param {Function} visitFolder is a function called for each visited folders + */ + async function _copyFolderToJsonInternal (path, visitFile, visitFolder, fs) { + visitFile = visitFile || (() => { }) + visitFolder = visitFolder || (() => { }) + return new Promise((resolve, reject) => { + const json = {} + if (fs.existsSync(path)) { + try { + const items = fs.readdirSync(path) + visitFolder({ path }) + if (items.length !== 0) { + items.forEach(async (item, index) => { + const file = {} + const curPath = `${path}${path.endsWith('/') ? '' : '/'}${item}` + if (fs.statSync(curPath).isDirectory()) { + file.children = await _copyFolderToJsonInternal(curPath, visitFile, visitFolder, fs) + } else { + file.content = fs.readFileSync(curPath, 'utf8') + visitFile({ path: curPath, content: file.content }) + } + json[curPath] = file + }) + } + } catch (e) { + console.log(e) + return reject(e) + } + } + return resolve(json) + }) + } + + /** + * copy the folder recursively + * @param {string} path is the folder to be copied over + * @param {Function} visitFile is a function called for each visited files + * @param {Function} visitFolder is a function called for each visited folders + */ + async function copyFolderToJson (path, visitFile, visitFolder, fs) { + visitFile = visitFile || (() => { }) + visitFolder = visitFolder || (() => { }) + return _copyFolderToJsonInternal(path, visitFile, visitFolder, fs) + } + + const populateWorkspace = async (json, fs) => { + for (const item in json) { + const isFolder = json[item].content === undefined + if (isFolder) { + await createDir(item, fs) + await populateWorkspace(json[item].children, fs) + } else { + try { + await fs.writeFile(item, json[item].content, 'utf8') + } catch (error) { + console.log(error) + } + } + } + } + + const createDir = async (path, fs) => { + const paths = path.split('/') + if (paths.length && paths[0] === '') paths.shift() + let currentCheck = '' + for (const value of paths) { + currentCheck = currentCheck + (currentCheck ? '/' : '') + value + if (!await fs.exists(currentCheck)) { + try { + await fs.mkdir(currentCheck) + } catch (error) { + console.log(error) + } + } + } + } + // + if (testmigration) await populateWorkspace(testData, browserFS) + const files = await copyFolderToJson('/', null, null, browserFS) + await populateWorkspace(files, window.remixFileSystem) + // eslint-disable-next-line no-undef + if (cb) cb() + }) +} + +/* eslint-disable no-template-curly-in-string */ +const testData = { + '.workspaces': { + children: { + '.workspaces/default_workspace': { + children: { + '.workspaces/default_workspace/README.txt': { + content: 'TEST README' + } + } + }, + '.workspaces/workspace_test': { + children: { + '.workspaces/workspace_test/TEST_README.txt': { + content: 'TEST README' + }, + '.workspaces/workspace_test/test_contracts': { + children: { + '.workspaces/workspace_test/test_contracts/1_Storage.sol': { + content: 'testing' + }, + '.workspaces/workspace_test/test_contracts/artifacts': { + children: { + '.workspaces/workspace_test/test_contracts/artifacts/Storage_metadata.json': { + content: '{ "test": "data" }' + } + } + } + } + } + } + } + } + } +} diff --git a/apps/remix-ide/src/blockchain/blockchain.js b/apps/remix-ide/src/blockchain/blockchain.js index d3bc4e60ce..8b0ebfba87 100644 --- a/apps/remix-ide/src/blockchain/blockchain.js +++ b/apps/remix-ide/src/blockchain/blockchain.js @@ -303,7 +303,7 @@ export class Blockchain extends Plugin { }, (data, runTxCallback) => { // called for libraries deployment - this.runTx(data, confirmationCb, runTxCallback, promptCb, () => {}) + this.runTx(data, confirmationCb, runTxCallback, promptCb, () => { /* Do nothing. */ }) }) } @@ -422,72 +422,70 @@ export class Blockchain extends Plugin { } runTx (args, confirmationCb, continueCb, promptCb, cb) { - const self = this waterfall([ - function getGasLimit (next) { - if (self.transactionContextAPI.getGasLimit) { - return self.transactionContextAPI.getGasLimit(next) + (next) => { // getGasLimit + if (this.transactionContextAPI.getGasLimit) { + return this.transactionContextAPI.getGasLimit(next) } next(null, 3000000) }, - function queryValue (gasLimit, next) { + (gasLimit, next) => { // queryValue if (args.value) { return next(null, args.value, gasLimit) } - if (args.useCall || !self.transactionContextAPI.getValue) { + if (args.useCall || !this.transactionContextAPI.getValue) { return next(null, 0, gasLimit) } - self.transactionContextAPI.getValue(function (err, value) { + this.transactionContextAPI.getValue(function (err, value) { next(err, value, gasLimit) }) }, - function getAccount (value, gasLimit, next) { + (value, gasLimit, next) => { // getAccount if (args.from) { return next(null, args.from, value, gasLimit) } - if (self.transactionContextAPI.getAddress) { - return self.transactionContextAPI.getAddress(function (err, address) { + if (this.transactionContextAPI.getAddress) { + return this.transactionContextAPI.getAddress(function (err, address) { next(err, address, value, gasLimit) }) } - self.getAccounts(function (err, accounts) { + this.getAccounts(function (err, accounts) { const address = accounts[0] if (err) return next(err) if (!address) return next('No accounts available') - // if (self.executionContext.isVM() && !self.providers.vm.accounts[address]) { - if (self.executionContext.isVM() && !self.providers.vm.RemixSimulatorProvider.Accounts.accounts[address]) { + if (this.executionContext.isVM() && !this.providers.vm.RemixSimulatorProvider.Accounts.accounts[address]) { return next('Invalid account selected') } next(null, address, value, gasLimit) }) }, - function runTransaction (fromAddress, value, gasLimit, next) { + (fromAddress, value, gasLimit, next) => { // runTransaction const tx = { to: args.to, data: args.data.dataHex, useCall: args.useCall, from: fromAddress, value: value, gasLimit: gasLimit, timestamp: args.data.timestamp } const payLoad = { funAbi: args.data.funAbi, funArgs: args.data.funArgs, contractBytecode: args.data.contractBytecode, contractName: args.data.contractName, contractABI: args.data.contractABI, linkReferences: args.data.linkReferences } if (!tx.timestamp) tx.timestamp = Date.now() const timestamp = tx.timestamp - self.event.trigger('initiatingTransaction', [timestamp, tx, payLoad]) - self.txRunner.rawRun(tx, confirmationCb, continueCb, promptCb, + this.event.trigger('initiatingTransaction', [timestamp, tx, payLoad]) + this.txRunner.rawRun(tx, confirmationCb, continueCb, promptCb, async (error, result) => { if (error) return next(error) - const isVM = self.executionContext.isVM() + const isVM = this.executionContext.isVM() if (isVM && tx.useCall) { try { - result.transactionHash = await self.web3().eth.getHashFromTagBySimulator(timestamp) + result.transactionHash = await this.web3().eth.getHashFromTagBySimulator(timestamp) } catch (e) { console.log('unable to retrieve back the "call" hash', e) } } const eventName = (tx.useCall ? 'callExecuted' : 'transactionExecuted') - self.event.trigger(eventName, [error, tx.from, tx.to, tx.data, tx.useCall, result, timestamp, payLoad]) + this.event.trigger(eventName, [error, tx.from, tx.to, tx.data, tx.useCall, result, timestamp, payLoad]) if (error && (typeof (error) !== 'string')) { if (error.message) error = error.message else { - try { error = 'error: ' + JSON.stringify(error) } catch (e) {} + try { error = 'error: ' + JSON.stringify(error) } catch (e) { console.log(e) } } } next(error, result, tx) diff --git a/apps/remix-ide/src/blockchain/execution-context.js b/apps/remix-ide/src/blockchain/execution-context.js index 54e738b245..6f4a615b18 100644 --- a/apps/remix-ide/src/blockchain/execution-context.js +++ b/apps/remix-ide/src/blockchain/execution-context.js @@ -129,9 +129,9 @@ export class ExecutionContext { async executionContextChange (value, endPointUrl, confirmCb, infoCb, cb) { const context = value.context - if (!cb) cb = () => {} - if (!confirmCb) confirmCb = () => {} - if (!infoCb) infoCb = () => {} + if (!cb) cb = () => { /* Do nothing. */ } + if (!confirmCb) confirmCb = () => { /* Do nothing. */ } + if (!infoCb) infoCb = () => { /* Do nothing. */ } if (context === 'vm') { this.executionContext = context this.currentFork = value.fork diff --git a/apps/remix-ide/src/blockchain/providers/injected.js b/apps/remix-ide/src/blockchain/providers/injected.js index f1272dc058..ae52390a44 100644 --- a/apps/remix-ide/src/blockchain/providers/injected.js +++ b/apps/remix-ide/src/blockchain/providers/injected.js @@ -17,6 +17,7 @@ class InjectedProvider { } resetEnvironment () { + /* Do nothing. */ } getBalanceInEther (address, cb) { diff --git a/apps/remix-ide/src/blockchain/providers/node.js b/apps/remix-ide/src/blockchain/providers/node.js index b62158ec69..2896486064 100644 --- a/apps/remix-ide/src/blockchain/providers/node.js +++ b/apps/remix-ide/src/blockchain/providers/node.js @@ -25,6 +25,7 @@ class NodeProvider { } resetEnvironment () { + /* Do nothing. */ } getBalanceInEther (address, cb) { diff --git a/apps/remix-ide/src/config.js b/apps/remix-ide/src/config.js index adfc1fda9b..7e0a900f37 100644 --- a/apps/remix-ide/src/config.js +++ b/apps/remix-ide/src/config.js @@ -15,6 +15,7 @@ function Config (storage) { this.items = JSON.parse(config) } } catch (exception) { + /* Do nothing. */ } this.exists = function (key) { @@ -31,6 +32,7 @@ function Config (storage) { storage.set(CONFIG_FILE, JSON.stringify(this.items)) this.events.emit(key + '_changed', content) } catch (exception) { + /* Do nothing. */ } } diff --git a/apps/remix-ide/src/index.html b/apps/remix-ide/src/index.html index 94bb974028..3587ad1233 100644 --- a/apps/remix-ide/src/index.html +++ b/apps/remix-ide/src/index.html @@ -28,6 +28,8 @@ + + + diff --git a/apps/remix-ide/src/lib/helper.js b/apps/remix-ide/src/lib/helper.js index 8f0640544c..84007aef11 100644 --- a/apps/remix-ide/src/lib/helper.js +++ b/apps/remix-ide/src/lib/helper.js @@ -64,7 +64,6 @@ module.exports = { do { const isDuplicate = await fileManager.exists(name + counter + prefix + '.' + ext) - if (isDuplicate) counter = (counter | 0) + 1 else exist = false } while (exist) diff --git a/apps/remix-ide/src/lib/query-params.js b/apps/remix-ide/src/lib/query-params.js deleted file mode 100644 index 739971fac2..0000000000 --- a/apps/remix-ide/src/lib/query-params.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict' - -// Allowing window to be overriden for testing -function QueryParams (_window) { - if (_window === undefined) _window = window - - this.get = function () { - var qs = _window.location.hash.substr(1) - - if (_window.location.search.length > 0) { - // use legacy query params instead of hash - _window.location.hash = _window.location.search.substr(1) - _window.location.search = '' - } - - var params = {} - var parts = qs.split('&') - for (var x in parts) { - var keyValue = parts[x].split('=') - if (keyValue[0] !== '') { - params[keyValue[0]] = keyValue[1] - } - } - return params - } - - this.update = function (params) { - var currentParams = this.get() - var keys = Object.keys(params) - for (var x in keys) { - currentParams[keys[x]] = params[keys[x]] - } - var queryString = '#' - var updatedKeys = Object.keys(currentParams) - for (var y in updatedKeys) { - queryString += updatedKeys[y] + '=' + currentParams[updatedKeys[y]] + '&' - } - _window.location.hash = queryString.slice(0, -1) - } -} - -module.exports = QueryParams diff --git a/apps/remix-ide/src/production.index.html b/apps/remix-ide/src/production.index.html index e5f1f7f146..49be2d6018 100644 --- a/apps/remix-ide/src/production.index.html +++ b/apps/remix-ide/src/production.index.html @@ -28,6 +28,8 @@ + + + diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index 7967336579..ce7ea97b27 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -1,14 +1,13 @@ -/* global localStorage, fetch */ import { PluginManager } from '@remixproject/engine' import { EventEmitter } from 'events' -import QueryParams from './lib/query-params' +import { QueryParams } from '@remix-project/remix-lib' import { IframePlugin } from '@remixproject/engine-web' const _paq = window._paq = window._paq || [] const requiredModules = [ // services + layout views + system views 'manager', 'config', 'compilerArtefacts', 'compilerMetadata', 'contextualListener', 'editor', 'offsetToLineColumnConverter', 'network', 'theme', 'fileManager', 'contentImport', 'blockchain', 'web3Provider', 'scriptRunner', 'fetchAndCompile', 'mainPanel', 'hiddenPanel', 'sidePanel', 'menuicons', - 'filePanel', 'terminal', 'settings', 'pluginManager', 'tabs', 'udapp', 'dGitProvider', 'solidity-logic', 'gistHandler', 'layout', 'notification', 'permissionhandler', 'walkthrough'] + 'filePanel', 'terminal', 'settings', 'pluginManager', 'tabs', 'udapp', 'dGitProvider', 'solidity-logic', 'gistHandler', 'layout', 'notification', 'permissionhandler', 'walkthrough', 'storage'] const dependentModules = ['git', 'hardhat', 'slither'] // module which shouldn't be manually activated (e.g git is activated by remixd) @@ -174,7 +173,7 @@ class PluginLoader { } this.loaders.queryParams = { - set: () => {}, + set: () => { /* Do nothing. */ }, get: () => { const { activate } = queryParams.get() if (!activate) return [] diff --git a/libs/remix-astwalker/src/sourceMappings.ts b/libs/remix-astwalker/src/sourceMappings.ts index 1246eb387b..869f495946 100644 --- a/libs/remix-astwalker/src/sourceMappings.ts +++ b/libs/remix-astwalker/src/sourceMappings.ts @@ -73,7 +73,7 @@ export class SourceMappings { lineBreaks.push(pos) } this.lineBreaks = lineBreaks - }; + } /** * Get a list of nodes that are at the given "position". diff --git a/libs/remix-astwalker/tsconfig.json b/libs/remix-astwalker/tsconfig.json index b516fcbd30..7f163468b2 100644 --- a/libs/remix-astwalker/tsconfig.json +++ b/libs/remix-astwalker/tsconfig.json @@ -2,8 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "types": ["node"], - "module": "commonjs", - "esModuleInterop": true + "esModuleInterop": true }, "include": ["**/*.ts"] } \ No newline at end of file diff --git a/libs/remix-astwalker/tsconfig.lib.json b/libs/remix-astwalker/tsconfig.lib.json index ea82c38ae0..4c89a574be 100644 --- a/libs/remix-astwalker/tsconfig.lib.json +++ b/libs/remix-astwalker/tsconfig.lib.json @@ -1,16 +1,17 @@ { - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "commonjs", - "outDir": "../../dist/out-tsc", - "declaration": true, - "rootDir": "./src", - "types": ["node"] - }, - "exclude": [ - "**/*.spec.ts", - "tests/" - ], - "include": ["**/*.ts"] - } - \ No newline at end of file + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../../dist/out-tsc", + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "declaration": true, + "rootDir": "./src", + "types": ["node"] + }, + "exclude": [ + "**/*.spec.ts", + "tests/" + ], + "include": ["**/*.ts"] +} diff --git a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts index 624c756357..2b88d26064 100644 --- a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts +++ b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts @@ -9,8 +9,14 @@ const profile = { methods: ['resolve', 'resolveAndSave', 'isExternalUrl'] } +export type ResolvedImport = { + content: string, + cleanUrl: string + type: string +} + export class CompilerImports extends Plugin { - previouslyHandled: {} + previouslyHandled: Record urlResolver: any constructor () { super(profile) @@ -64,9 +70,9 @@ export class CompilerImports extends Plugin { if (!loadingCb) loadingCb = () => {} if (!cb) cb = () => {} - var self = this + const self = this if (force) delete this.previouslyHandled[url] - var imported = this.previouslyHandled[url] + const imported = this.previouslyHandled[url] if (imported) { return cb(null, imported.content, imported.cleanUrl, imported.type, url) } @@ -97,7 +103,7 @@ export class CompilerImports extends Plugin { try { const provider = await this.call('fileManager', 'getProviderOf', null) const path = targetPath || type + '/' + cleanUrl - if (provider) provider.addExternal('.deps/' + path, content, url) + if (provider) await provider.addExternal('.deps/' + path, content, url) } catch (err) { console.error(err) } diff --git a/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts b/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts index 706937da7a..63a7880382 100644 --- a/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts +++ b/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts @@ -2,8 +2,7 @@ import { Plugin } from '@remixproject/engine' import { compile } from '@remix-project/remix-solidity' import { util } from '@remix-project/remix-lib' - -const ethutil = require('ethereumjs-util') +import { toChecksumAddress } from 'ethereumjs-util' const profile = { name: 'fetchAndCompile', @@ -32,7 +31,7 @@ export class FetchAndCompile extends Plugin { * @return {CompilerAbstract} - compilation data targeting the given @arg contractAddress */ async resolve (contractAddress, codeAtAddress, targetPath) { - contractAddress = ethutil.toChecksumAddress(contractAddress) + contractAddress = toChecksumAddress(contractAddress) const localCompilation = async () => await this.call('compilerArtefacts', 'get', contractAddress) ? await this.call('compilerArtefacts', 'get', contractAddress) : await this.call('compilerArtefacts', 'get', '__last') ? await this.call('compilerArtefacts', 'get', '__last') : null diff --git a/libs/remix-core-plugin/src/lib/compiler-metadata.ts b/libs/remix-core-plugin/src/lib/compiler-metadata.ts index d194c0281d..dfd4ade1dd 100644 --- a/libs/remix-core-plugin/src/lib/compiler-metadata.ts +++ b/libs/remix-core-plugin/src/lib/compiler-metadata.ts @@ -27,11 +27,11 @@ export class CompilerMetadata extends Plugin { } onActivation () { - var self = this + const self = this this.on('solidity', 'compilationFinished', async (file, source, languageVersion, data) => { if (!await this.call('settings', 'get', 'settings/generate-contract-metadata')) return const compiler = new CompilerAbstract(languageVersion, data, source) - var path = self._extractPathOf(source.target) + const path = self._extractPathOf(source.target) compiler.visitContracts((contract) => { if (contract.file !== source.target) return (async () => { @@ -44,23 +44,23 @@ export class CompilerMetadata extends Plugin { } _extractPathOf (file) { - var reg = /(.*)(\/).*/ - var path = reg.exec(file) + const reg = /(.*)(\/).*/ + const path = reg.exec(file) return path ? path[1] : '/' } async _setArtefacts (content, contract, path) { content = content || '{}' - var metadata + let metadata try { metadata = JSON.parse(content) } catch (e) { console.log(e) } - var fileName = this._JSONFileName(path, contract.name) - var metadataFileName = this._MetadataFileName(path, contract.name) + const fileName = this._JSONFileName(path, contract.name) + const metadataFileName = this._MetadataFileName(path, contract.name) - var deploy = metadata.deploy || {} + const deploy = metadata.deploy || {} this.networks.forEach((network) => { deploy[network] = this._syncContext(contract, deploy[network] || {}) }) @@ -73,7 +73,7 @@ export class CompilerMetadata extends Plugin { } if (parsedMetadata) await this.call('fileManager', 'writeFile', metadataFileName, JSON.stringify(parsedMetadata, null, '\t')) - var data = { + const data = { deploy, data: { bytecode: contract.object.evm.bytecode, @@ -87,14 +87,14 @@ export class CompilerMetadata extends Plugin { } _syncContext (contract, metadata) { - var linkReferences = metadata.linkReferences - var autoDeployLib = metadata.autoDeployLib + let linkReferences = metadata.linkReferences + let autoDeployLib = metadata.autoDeployLib if (!linkReferences) linkReferences = {} if (autoDeployLib === undefined) autoDeployLib = true - for (var libFile in contract.object.evm.bytecode.linkReferences) { + for (const libFile in contract.object.evm.bytecode.linkReferences) { if (!linkReferences[libFile]) linkReferences[libFile] = {} - for (var lib in contract.object.evm.bytecode.linkReferences[libFile]) { + for (const lib in contract.object.evm.bytecode.linkReferences[libFile]) { if (!linkReferences[libFile][lib]) { linkReferences[libFile][lib] = '
' } diff --git a/libs/remix-core-plugin/src/lib/editor-context-listener.ts b/libs/remix-core-plugin/src/lib/editor-context-listener.ts index 9e73f6bc01..b20eb6e855 100644 --- a/libs/remix-core-plugin/src/lib/editor-context-listener.ts +++ b/libs/remix-core-plugin/src/lib/editor-context-listener.ts @@ -2,7 +2,6 @@ import { Plugin } from '@remixproject/engine' import { sourceMappingDecoder } from '@remix-project/remix-debug' -const { AstWalker } = require('@remix-project/remix-astwalker') const profile = { name: 'contextualListener', @@ -19,7 +18,7 @@ export class EditorContextListener extends Plugin { _activeHighlights: Array astWalker: any currentPosition: any - currentFile: String + currentFile: string nodes: Array results: any estimationObj: any @@ -28,7 +27,7 @@ export class EditorContextListener extends Plugin { contract: any activated: boolean - constructor () { + constructor (astWalker) { super(profile) this.activated = false this._index = { @@ -37,7 +36,7 @@ export class EditorContextListener extends Plugin { } this._activeHighlights = [] - this.astWalker = new AstWalker() + this.astWalker = astWalker } onActivation () { diff --git a/libs/remix-core-plugin/src/lib/gist-handler.ts b/libs/remix-core-plugin/src/lib/gist-handler.ts index 23ea64b937..0ef36a62ec 100644 --- a/libs/remix-core-plugin/src/lib/gist-handler.ts +++ b/libs/remix-core-plugin/src/lib/gist-handler.ts @@ -13,15 +13,17 @@ const profile = { version: '0.0.1' } +type GistCallBackFn = (gistId: string) => void + export class GistHandler extends Plugin { constructor () { super(profile) } - async handleLoad (gistId: String | null, cb: Function) { + async handleLoad (gistId: string | null, cb: GistCallBackFn) { if (!cb) cb = () => {} - var loadingFromGist = false + let loadingFromGist = false if (!gistId) { loadingFromGist = true let value @@ -83,9 +85,9 @@ export class GistHandler extends Plugin { return loadingFromGist } - load (gistId: String | null) { + load (gistId: string | null) { const self = this - return self.handleLoad(gistId, async (gistId: String | null) => { + return self.handleLoad(gistId, async (gistId: string | null) => { let data: any try { data = await (await fetch(`https://api.github.com/gists/${gistId}`)).json() as any @@ -114,7 +116,7 @@ export class GistHandler extends Plugin { const obj: StringByString = {} Object.keys(data.files).forEach((element) => { const path = element.replace(/\.\.\./g, '/') - obj['/' + 'gist-' + gistId + '/' + path] = data.files[element] + obj['/' + gistId + '/' + path] = data.files[element] }) this.call('fileManager', 'setBatchFiles', obj, 'workspace', true, async (errorSavingFiles: any) => { if (errorSavingFiles) { @@ -132,7 +134,7 @@ export class GistHandler extends Plugin { } const getGistId = (str) => { - var idr = /[0-9A-Fa-f]{8,}/ - var match = idr.exec(str) + const idr = /[0-9A-Fa-f]{8,}/ + const match = idr.exec(str) return match ? match[0] : null } diff --git a/libs/remix-core-plugin/src/lib/offset-line-to-column-converter.ts b/libs/remix-core-plugin/src/lib/offset-line-to-column-converter.ts index 57c3f3ed2e..ccb201aa47 100644 --- a/libs/remix-core-plugin/src/lib/offset-line-to-column-converter.ts +++ b/libs/remix-core-plugin/src/lib/offset-line-to-column-converter.ts @@ -11,7 +11,7 @@ const profile = { } export class OffsetToLineColumnConverter extends Plugin { - lineBreakPositionsByContent: {} + lineBreakPositionsByContent: Record> sourceMappingDecoder: any constructor () { super(profile) @@ -36,7 +36,7 @@ export class OffsetToLineColumnConverter extends Plugin { // if we don't have ast, we process the only one available content (applicable also for compiler older than 0.4.12) this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[sourcesArray[0]].content) } else { - for (var filename in asts) { + for (const filename in asts) { const source = asts[filename] if (source.id === file) { this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[filename].content) diff --git a/libs/remix-debug/src/cmdline/index.ts b/libs/remix-debug/src/cmdline/index.ts index c037df1524..16fdd65b6d 100644 --- a/libs/remix-debug/src/cmdline/index.ts +++ b/libs/remix-debug/src/cmdline/index.ts @@ -64,7 +64,7 @@ export class CmdLine { source.push('=> ' + (currentLineNumber + 1) + ': ' + currentLine) const startLine = lineColumnPos.start.line - for (var i = 1; i < 4; i++) { + for (let i = 1; i < 4; i++) { const line = content[startLine + i] source.push(' ' + (startLine + i + 1) + ': ' + line) } diff --git a/libs/remix-debug/src/code/breakpointManager.ts b/libs/remix-debug/src/code/breakpointManager.ts index c2f72ff4ba..f6f20e6f45 100644 --- a/libs/remix-debug/src/code/breakpointManager.ts +++ b/libs/remix-debug/src/code/breakpointManager.ts @@ -185,7 +185,7 @@ export class BreakpointManager { * @param {Object} sourceLocation - position of the breakpoint { file: '', row: ' in?: number out?: number diff --git a/libs/remix-debug/src/debugger/VmDebugger.ts b/libs/remix-debug/src/debugger/VmDebugger.ts index 4304d2e933..d064fc51a9 100644 --- a/libs/remix-debug/src/debugger/VmDebugger.ts +++ b/libs/remix-debug/src/debugger/VmDebugger.ts @@ -113,11 +113,11 @@ export class VmDebuggerLogic { const address = this._traceManager.getCurrentCalledAddressAt(index) if (!this.storageResolver) return - var storageViewer = new StorageViewer({ stepIndex: this.stepManager.currentStepIndex, tx: this.tx, address: address }, this.storageResolver, this._traceManager) + const storageViewer = new StorageViewer({ stepIndex: this.stepManager.currentStepIndex, tx: this.tx, address: address }, this.storageResolver, this._traceManager) storageViewer.storageRange().then((storage) => { if (this.stepManager.currentStepIndex === index) { - var header = storageViewer.isComplete(address) ? '[Completely Loaded]' : '[Partially Loaded]' + const header = storageViewer.isComplete(address) ? '[Completely Loaded]' : '[Partially Loaded]' this.event.trigger('traceManagerStorageUpdate', [storage, header]) } }).catch((_error) => { @@ -197,10 +197,10 @@ export class VmDebuggerLogic { if (index === this.traceLength - 1) { return this.event.trigger('traceStorageUpdate', [{}]) } - var storageJSON = {} - for (var k in this.addresses) { - var address = this.addresses[k] - var storageViewer = new StorageViewer({ stepIndex: this.stepManager.currentStepIndex, tx: this.tx, address: address }, this.storageResolver, this._traceManager) + const storageJSON = {} + for (const k in this.addresses) { + const address = this.addresses[k] + const storageViewer = new StorageViewer({ stepIndex: this.stepManager.currentStepIndex, tx: this.tx, address: address }, this.storageResolver, this._traceManager) try { storageJSON[address] = await storageViewer.storageRange() } catch (e) { diff --git a/libs/remix-debug/src/debugger/debugger.ts b/libs/remix-debug/src/debugger/debugger.ts index 7a82d358fb..231c2d57f2 100644 --- a/libs/remix-debug/src/debugger/debugger.ts +++ b/libs/remix-debug/src/debugger/debugger.ts @@ -81,7 +81,7 @@ export class Debugger { sources[genSource.name] = { content: genSource.contents } } } - var lineColumnPos = await this.offsetToLineColumnConverter.offsetToLineColumn(rawLocation, rawLocation.file, sources, astSources) + const lineColumnPos = await this.offsetToLineColumnConverter.offsetToLineColumn(rawLocation, rawLocation.file, sources, astSources) this.event.trigger('newSourceLocation', [lineColumnPos, rawLocation, generatedSources, address]) } else { this.event.trigger('newSourceLocation', [null]) diff --git a/libs/remix-debug/src/debugger/solidityLocals.ts b/libs/remix-debug/src/debugger/solidityLocals.ts index c7f25d01b8..ca173e4abd 100644 --- a/libs/remix-debug/src/debugger/solidityLocals.ts +++ b/libs/remix-debug/src/debugger/solidityLocals.ts @@ -22,7 +22,7 @@ export class DebuggerSolidityLocals { init (sourceLocation) { this._sourceLocation = sourceLocation - var decodeTimeout = null + let decodeTimeout = null if (!this.storageResolver) { return this.event.trigger('solidityLocalsMessage', ['storage not ready']) } @@ -76,11 +76,11 @@ export class DebuggerSolidityLocals { if (error) { return error } - var stack = result[0].value - var memory = result[1].value - var calldata = result[3].value + const stack = result[0].value + const memory = result[1].value + const calldata = result[3].value try { - var storageViewer = new StorageViewer({ stepIndex: this.stepManager.currentStepIndex, tx: this.tx, address: result[2].value }, this.storageResolver, this.traceManager) + const storageViewer = new StorageViewer({ stepIndex: this.stepManager.currentStepIndex, tx: this.tx, address: result[2].value }, this.storageResolver, this.traceManager) solidityLocals(this.stepManager.currentStepIndex, this.internalTreeCall, stack, memory, storageViewer, calldata, sourceLocation, cursor).then((locals) => { if (!cursor) { if (!locals['error']) { diff --git a/libs/remix-debug/src/debugger/stepManager.ts b/libs/remix-debug/src/debugger/stepManager.ts index e8cd462564..1a64977e97 100644 --- a/libs/remix-debug/src/debugger/stepManager.ts +++ b/libs/remix-debug/src/debugger/stepManager.ts @@ -55,8 +55,8 @@ export class DebuggerStepManager { this.revertionPoint = this.currentCall.return return this.event.trigger('revertWarning', [revertedReason]) } - for (var k = callsPath.length - 2; k >= 0; k--) { - var parent = callsPath[k] + for (let k = callsPath.length - 2; k >= 0; k--) { + const parent = callsPath[k] if (!parent.reverted) continue this.revertionPoint = parent.return this.event.trigger('revertWarning', ['parenthasthrown']) @@ -82,7 +82,6 @@ export class DebuggerStepManager { } const jumpOutDisabled = (step === this.traceManager.findStepOut(step)) - this.event.trigger('stepChanged', [step, stepState, jumpOutDisabled]) }) } @@ -140,7 +139,7 @@ export class DebuggerStepManager { jumpOut (solidityMode) { if (!this.traceManager.isLoaded()) return - var step = this.traceManager.findStepOut(this.currentStepIndex) + let step = this.traceManager.findStepOut(this.currentStepIndex) if (solidityMode) { step = this.resolveToReducedTrace(step, 0) } @@ -201,7 +200,7 @@ export class DebuggerStepManager { if (!this.debugger.callTree.reducedTrace.length) { return value } - var nextSource = util.findClosestIndex(value, this.debugger.callTree.reducedTrace) + let nextSource = util.findClosestIndex(value, this.debugger.callTree.reducedTrace) nextSource = nextSource + incr if (nextSource <= 0) { nextSource = 0 diff --git a/libs/remix-debug/src/solidity-decoder/decodeInfo.ts b/libs/remix-debug/src/solidity-decoder/decodeInfo.ts index d506e5ca3e..44c620615a 100644 --- a/libs/remix-debug/src/solidity-decoder/decodeInfo.ts +++ b/libs/remix-debug/src/solidity-decoder/decodeInfo.ts @@ -27,7 +27,7 @@ function mapping (type, stateDefinitions, contractName) { const keyType = parseType(keyTypeName, stateDefinitions, contractName, 'storage') const valueType = parseType(valueTypeName, stateDefinitions, contractName, 'storage') - var underlyingTypes = { + const underlyingTypes = { keyType: keyType, valueType: valueType } @@ -329,9 +329,9 @@ function computeOffsets (types, stateDefinitions, contractName, location) { offset: 0, slot: 0 } - for (var i in types) { - var variable = types[i] - var type = parseType(variable.typeDescriptions.typeString, stateDefinitions, contractName, location) + for (const i in types) { + const variable = types[i] + const type = parseType(variable.typeDescriptions.typeString, stateDefinitions, contractName, location) if (!type) { console.log('unable to retrieve decode info of ' + variable.typeDescriptions.typeString) return null diff --git a/libs/remix-debug/src/solidity-decoder/internalCallTree.ts b/libs/remix-debug/src/solidity-decoder/internalCallTree.ts index d84e023047..b5440d2d7d 100644 --- a/libs/remix-debug/src/solidity-decoder/internalCallTree.ts +++ b/libs/remix-debug/src/solidity-decoder/internalCallTree.ts @@ -262,7 +262,7 @@ async function includeVariableDeclaration (tree, step, sourceLocation, scopeId, // so, either this is the direct value, or the offset in memory. That depends on the type. if (variableDeclaration.name !== '') { states = tree.solidityProxy.extractStatesDefinitions() - var location = extractLocationFromAstVariable(variableDeclaration) + let location = extractLocationFromAstVariable(variableDeclaration) location = location === 'default' ? 'storage' : location // we push the new local variable in our tree tree.scopes[scopeId].locals[variableDeclaration.name] = { diff --git a/libs/remix-debug/src/solidity-decoder/localDecoder.ts b/libs/remix-debug/src/solidity-decoder/localDecoder.ts index 70df3e9715..4d697e9cc4 100644 --- a/libs/remix-debug/src/solidity-decoder/localDecoder.ts +++ b/libs/remix-debug/src/solidity-decoder/localDecoder.ts @@ -10,7 +10,7 @@ export async function solidityLocals (vmtraceIndex, internalTreeCall, stack, mem memory = formatMemory(memory) let anonymousIncr = 1 for (const local in scope.locals) { - var variable = scope.locals[local] + const variable = scope.locals[local] if (variable.stackDepth < stack.length && variable.sourceLocation.start <= currentSourceLocation.start) { let name = variable.name if (name.indexOf('$') !== -1) { diff --git a/libs/remix-debug/src/solidity-decoder/stateDecoder.ts b/libs/remix-debug/src/solidity-decoder/stateDecoder.ts index 709faff99c..531c7abee7 100644 --- a/libs/remix-debug/src/solidity-decoder/stateDecoder.ts +++ b/libs/remix-debug/src/solidity-decoder/stateDecoder.ts @@ -10,8 +10,8 @@ import { computeOffsets } from './decodeInfo' */ export async function decodeState (stateVars, storageResolver) { const ret = {} - for (var k in stateVars) { - var stateVar = stateVars[k] + for (const k in stateVars) { + const stateVar = stateVars[k] try { const decoded = await stateVar.type.decodeFromStorage(stateVar.storagelocation, storageResolver) decoded.constant = stateVar.constant diff --git a/libs/remix-debug/src/solidity-decoder/types/ArrayType.ts b/libs/remix-debug/src/solidity-decoder/types/ArrayType.ts index eb5eff4d30..21c7e41208 100644 --- a/libs/remix-debug/src/solidity-decoder/types/ArrayType.ts +++ b/libs/remix-debug/src/solidity-decoder/types/ArrayType.ts @@ -50,7 +50,7 @@ export class ArrayType extends RefType { } else { size = new BN(this.arraySize) } - var k = toBN(0) + const k = toBN(0) for (; k.lt(size) && k.ltn(300); k.iaddn(1)) { try { ret.push(await this.underlyingType.decodeFromStorage(currentLocation, storageResolver)) @@ -92,8 +92,8 @@ export class ArrayType extends RefType { if (skip) offset = offset + (32 * skip) let limit = length - skip if (limit > 10) limit = 10 - for (var k = 0; k < limit; k++) { - var contentOffset = offset + for (let k = 0; k < limit; k++) { + const contentOffset = offset ret.push(this.underlyingType.decodeFromMemory(contentOffset, memory)) offset += 32 } diff --git a/libs/remix-debug/src/solidity-decoder/types/DynamicByteArray.ts b/libs/remix-debug/src/solidity-decoder/types/DynamicByteArray.ts index 85cf69ef88..bb11dd0778 100644 --- a/libs/remix-debug/src/solidity-decoder/types/DynamicByteArray.ts +++ b/libs/remix-debug/src/solidity-decoder/types/DynamicByteArray.ts @@ -42,7 +42,7 @@ export class DynamicByteArray extends RefType { } return { value: '0x' + ret.replace(/(00)+$/, ''), length: '0x' + length.toString(16), type: this.typeName } } else { - var size = parseInt(value.substr(value.length - 2, 2), 16) / 2 + const size = parseInt(value.substr(value.length - 2, 2), 16) / 2 return { value: '0x' + value.substr(0, size * 2), length: '0x' + size.toString(16), type: this.typeName } } } diff --git a/libs/remix-debug/src/solidity-decoder/types/Struct.ts b/libs/remix-debug/src/solidity-decoder/types/Struct.ts index 1995471ffb..b11f12f533 100644 --- a/libs/remix-debug/src/solidity-decoder/types/Struct.ts +++ b/libs/remix-debug/src/solidity-decoder/types/Struct.ts @@ -13,7 +13,7 @@ export class Struct extends RefType { async decodeFromStorage (location, storageResolver) { const ret = {} - for (var item of this.members) { + for (const item of this.members) { const globalLocation = { offset: location.offset + item.storagelocation.offset, slot: add(location.slot, item.storagelocation.slot) @@ -31,8 +31,8 @@ export class Struct extends RefType { decodeFromMemoryInternal (offset, memory) { const ret = {} this.members.map((item, i) => { - var contentOffset = offset - var member = item.type.decodeFromMemory(contentOffset, memory) + const contentOffset = offset + const member = item.type.decodeFromMemory(contentOffset, memory) ret[item.name] = member if (!(item.type instanceof Mapping)) offset += 32 }) diff --git a/libs/remix-debug/src/solidity-decoder/types/ValueType.ts b/libs/remix-debug/src/solidity-decoder/types/ValueType.ts index 60d3a8ebed..2aeae677fe 100644 --- a/libs/remix-debug/src/solidity-decoder/types/ValueType.ts +++ b/libs/remix-debug/src/solidity-decoder/types/ValueType.ts @@ -27,7 +27,7 @@ export class ValueType { */ async decodeFromStorage (location, storageResolver) { try { - var value = await extractHexValue(location, storageResolver, this.storageBytes) + const value = await extractHexValue(location, storageResolver, this.storageBytes) return { value: this.decodeValue(value), type: this.typeName } } catch (e) { console.log(e) diff --git a/libs/remix-debug/src/source/sourceMappingDecoder.ts b/libs/remix-debug/src/source/sourceMappingDecoder.ts index 5024c3b43b..04b3bcb9ba 100644 --- a/libs/remix-debug/src/source/sourceMappingDecoder.ts +++ b/libs/remix-debug/src/source/sourceMappingDecoder.ts @@ -142,7 +142,7 @@ export function nodesAtPosition (astNodeType, position, ast) { const astWalker = new AstWalker() const found = [] const callback = function (node) { - var nodeLocation = sourceLocationFromAstNode(node) + const nodeLocation = sourceLocationFromAstNode(node) if (!nodeLocation) { return } diff --git a/libs/remix-debug/src/storage/mappingPreimages.ts b/libs/remix-debug/src/storage/mappingPreimages.ts index a7fb99740b..fceb13b89e 100644 --- a/libs/remix-debug/src/storage/mappingPreimages.ts +++ b/libs/remix-debug/src/storage/mappingPreimages.ts @@ -13,7 +13,7 @@ export async function decodeMappingsKeys (web3, storage, corrections) { const ret = {} if (!corrections.length) corrections.push({ offset: 0, slot: 0 }) for (const hashedLoc in storage) { - var preimage + let preimage try { const key = storage[hashedLoc].key for (const k in corrections) { diff --git a/libs/remix-debug/src/storage/storageResolver.ts b/libs/remix-debug/src/storage/storageResolver.ts index c0090c8b52..62a9f7df32 100644 --- a/libs/remix-debug/src/storage/storageResolver.ts +++ b/libs/remix-debug/src/storage/storageResolver.ts @@ -85,7 +85,7 @@ export class StorageResolver { * - If @arg slot is not cached, the corresponding value will be resolved and the next 1000 slots. */ async storageRangeInternal (self, slotKey, tx, stepIndex, address) { - var cached = this.fromCache(self, address) + const cached = this.fromCache(self, address) if (cached && cached.storage[slotKey]) { // we have the current slot in the cache and maybe the next 1000... return cached.storage } diff --git a/libs/remix-debug/src/trace/traceCache.ts b/libs/remix-debug/src/trace/traceCache.ts index 411e8e617c..cf23de75cb 100644 --- a/libs/remix-debug/src/trace/traceCache.ts +++ b/libs/remix-debug/src/trace/traceCache.ts @@ -62,7 +62,7 @@ export class TraceCache { if (!validReturnStep) { this.currentCall.call.reverted = reverted } - var parent = this.currentCall.parent + const parent = this.currentCall.parent if (parent) this.currentCall = { call: parent.call, parent: parent.parent } return } @@ -123,12 +123,12 @@ export class TraceCache { accumulateStorageChanges (index, address, storage) { const ret = Object.assign({}, storage) - for (var k in this.storageChanges) { + for (const k in this.storageChanges) { const changesIndex = this.storageChanges[k] if (changesIndex > index) { return ret } - var sstore = this.sstore[changesIndex] + const sstore = this.sstore[changesIndex] if (sstore.address === address && sstore.key) { ret[sstore.hashedKey] = { key: sstore.key, diff --git a/libs/remix-debug/src/trace/traceManager.ts b/libs/remix-debug/src/trace/traceManager.ts index e96e28f8d3..408bfd8ceb 100644 --- a/libs/remix-debug/src/trace/traceManager.ts +++ b/libs/remix-debug/src/trace/traceManager.ts @@ -48,7 +48,7 @@ export class TraceManager { this.isLoading = false return true } - var mes = tx.hash + ' is not a contract invocation or contract creation.' + const mes = tx.hash + ' is not a contract invocation or contract creation.' console.log(mes) this.isLoading = false throw new Error(mes) @@ -290,7 +290,7 @@ export class TraceManager { waterfall (calls, stepindex, cb) { const ret = [] let retError = null - for (var call in calls) { + for (const call in calls) { calls[call].apply(this, [stepindex, function (error, result) { retError = error ret.push({ error: error, value: result }) diff --git a/libs/remix-debug/src/trace/traceStepManager.ts b/libs/remix-debug/src/trace/traceStepManager.ts index 9890bf57ef..bcbccfe2e1 100644 --- a/libs/remix-debug/src/trace/traceStepManager.ts +++ b/libs/remix-debug/src/trace/traceStepManager.ts @@ -40,7 +40,7 @@ export class TraceStepManager { const call = util.findCall(currentStep, this.traceAnalyser.traceCache.callsTree.call) const subCalls = Object.keys(call.calls) if (subCalls.length) { - var callStart = util.findLowerBound(currentStep, subCalls) + 1 + const callStart = util.findLowerBound(currentStep, subCalls) + 1 if (subCalls.length > callStart) { return parseInt(subCalls[callStart]) - 1 } diff --git a/libs/remix-lib/src/execution/txFormat.ts b/libs/remix-lib/src/execution/txFormat.ts index 70bf991aee..86081dad6f 100644 --- a/libs/remix-lib/src/execution/txFormat.ts +++ b/libs/remix-lib/src/execution/txFormat.ts @@ -37,7 +37,7 @@ export function encodeData (funABI, values, contractbyteCode) { */ export function encodeParams (params, funAbi, callback) { let data: Buffer | string = '' - let dataHex: string = '' + let dataHex = '' let funArgs if (params.indexOf('raw:0x') === 0) { // in that case we consider that the input is already encoded and *does not* contain the method signature @@ -167,7 +167,7 @@ export function encodeConstructorCallAndDeployLibraries (contractName, contract, export function buildData (contractName, contract, contracts, isConstructor, funAbi, params, callback, callbackStep, callbackDeployLibrary) { let funArgs = [] let data: Buffer | string = '' - let dataHex: string = '' + let dataHex = '' if (params.indexOf('raw:0x') === 0) { // in that case we consider that the input is already encoded and *does not* contain the method signature diff --git a/libs/remix-lib/src/execution/txListener.ts b/libs/remix-lib/src/execution/txListener.ts index 06c5f2c216..533a501d3b 100644 --- a/libs/remix-lib/src/execution/txListener.ts +++ b/libs/remix-lib/src/execution/txListener.ts @@ -369,7 +369,7 @@ export class TxListener { const abiCoder = new ethers.utils.AbiCoder() const decoded = abiCoder.decode(inputTypes, data) const ret = {} - for (var k in abi.inputs) { + for (const k in abi.inputs) { ret[abi.inputs[k].type + ' ' + abi.inputs[k].name] = decoded[k] } return ret diff --git a/libs/remix-lib/src/execution/txRunnerVM.ts b/libs/remix-lib/src/execution/txRunnerVM.ts index 428f377b39..e2b2322a89 100644 --- a/libs/remix-lib/src/execution/txRunnerVM.ts +++ b/libs/remix-lib/src/execution/txRunnerVM.ts @@ -106,7 +106,7 @@ export class TxRunnerVM { const coinbases = ['0x0e9281e9c6a0808672eaba6bd1220e144c9bb07a', '0x8945a1288dc78a6d8952a92c77aee6730b414778', '0x94d76e24f818426ae84aa404140e8d5f60e10e7e'] const difficulties = [new BN('69762765929000', 10), new BN('70762765929000', 10), new BN('71762765929000', 10)] - var block = Block.fromBlockData({ + const block = Block.fromBlockData({ header: { timestamp: timestamp || (new Date().getTime() / 1000 | 0), number: self.blockNumber, diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index c62b655fb8..1da52c8049 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -52,7 +52,7 @@ export class TxRunnerWeb3 { return callback(err, resp) } this.event.trigger('transactionBroadcasted', [resp]) - var listenOnResponse = () => { + const listenOnResponse = () => { // eslint-disable-next-line no-async-promise-executor return new Promise(async (resolve, reject) => { const receipt = await tryTillReceiptAvailable(resp, this.getWeb3()) diff --git a/libs/remix-lib/src/execution/typeConversion.ts b/libs/remix-lib/src/execution/typeConversion.ts index 54659c1721..22332629f2 100644 --- a/libs/remix-lib/src/execution/typeConversion.ts +++ b/libs/remix-lib/src/execution/typeConversion.ts @@ -10,13 +10,13 @@ export function toInt (h) { return h } -export var stringify = convertToString +export const stringify = convertToString function convertToString (v) { try { if (v instanceof Array) { const ret = [] - for (var k in v) { + for (const k in v) { ret.push(convertToString(v[k])) } return ret diff --git a/libs/remix-lib/src/helpers/uiHelper.ts b/libs/remix-lib/src/helpers/uiHelper.ts index 56caca5e81..cab35f54a5 100644 --- a/libs/remix-lib/src/helpers/uiHelper.ts +++ b/libs/remix-lib/src/helpers/uiHelper.ts @@ -45,13 +45,13 @@ export function tryConvertAsciiFormat (memorySlot) { */ export function formatCss (css1, css2) { let ret = '' - for (const arg in arguments) { - for (const k in arguments[arg]) { - if (arguments[arg][k] && ret.indexOf(k) === -1) { + for (const arg in arguments) { // eslint-disable-line + for (const k in arguments[arg]) { // eslint-disable-line + if (arguments[arg][k] && ret.indexOf(k) === -1) { // eslint-disable-line if (k.indexOf('*') === 0) { - ret += arguments[arg][k] + ret += arguments[arg][k] // eslint-disable-line } else { - ret += k + ':' + arguments[arg][k] + ';' + ret += k + ':' + arguments[arg][k] + ';' // eslint-disable-line } } } diff --git a/libs/remix-lib/src/index.ts b/libs/remix-lib/src/index.ts index 1ba94fdd21..54646e326e 100644 --- a/libs/remix-lib/src/index.ts +++ b/libs/remix-lib/src/index.ts @@ -19,6 +19,7 @@ import { TxRunnerVM } from './execution/txRunnerVM' import { TxRunnerWeb3 } from './execution/txRunnerWeb3' import * as txResultHelper from './helpers/txResultHelper' export { ICompilerApi, ConfigurationSettings } from './types/ICompilerApi' +export { QueryParams } from './query-params' const helpers = { ui: uiHelper, diff --git a/libs/remix-lib/src/query-params.ts b/libs/remix-lib/src/query-params.ts new file mode 100644 index 0000000000..7e89b226ff --- /dev/null +++ b/libs/remix-lib/src/query-params.ts @@ -0,0 +1,38 @@ +'use strict' + +export class QueryParams { + + update (params) { + const currentParams = this.get() + const keys = Object.keys(params) + for (const x in keys) { + currentParams[keys[x]] = params[keys[x]] + } + let queryString = '#' + const updatedKeys = Object.keys(currentParams) + for (const y in updatedKeys) { + queryString += updatedKeys[y] + '=' + currentParams[updatedKeys[y]] + '&' + } + window.location.hash = queryString.slice(0, -1) + } + + get () { + const qs = window.location.hash.substr(1) + + if (window.location.search.length > 0) { + // use legacy query params instead of hash + window.location.hash = window.location.search.substr(1) + window.location.search = '' + } + + const params = {} + const parts = qs.split('&') + for (const x in parts) { + const keyValue = parts[x].split('=') + if (keyValue[0] !== '') { + params[keyValue[0]] = keyValue[1] + } + } + return params + } +} diff --git a/libs/remix-lib/src/storage.ts b/libs/remix-lib/src/storage.ts index e00a33e32c..02278cc47f 100644 --- a/libs/remix-lib/src/storage.ts +++ b/libs/remix-lib/src/storage.ts @@ -10,7 +10,7 @@ export class Storage { if (typeof window !== 'undefined') { this.safeKeys().forEach(function (name) { if (name.indexOf('sol-cache-file-', 0) === 0) { - var content = window.localStorage.getItem(name) + const content = window.localStorage.getItem(name) window.localStorage.setItem(name.replace(/^sol-cache-file-/, 'sol:'), content) window.localStorage.removeItem(name) } diff --git a/libs/remix-lib/src/types/ICompilerApi.ts b/libs/remix-lib/src/types/ICompilerApi.ts index 1a6166b2aa..62f86b5652 100644 --- a/libs/remix-lib/src/types/ICompilerApi.ts +++ b/libs/remix-lib/src/types/ICompilerApi.ts @@ -34,7 +34,7 @@ export interface ICompilerApi { open: (file: string) => void saveCurrentFile: () => void - logToTerminal: (log: terminalLog) => {} + logToTerminal: (log: terminalLog) => void compileWithHardhat: (configPath: string) => Promise } diff --git a/libs/remix-lib/src/web3Provider/web3VmProvider.ts b/libs/remix-lib/src/web3Provider/web3VmProvider.ts index 49fa4d80a9..ecc006da9e 100644 --- a/libs/remix-lib/src/web3Provider/web3VmProvider.ts +++ b/libs/remix-lib/src/web3Provider/web3VmProvider.ts @@ -152,7 +152,7 @@ export class Web3VmProvider { const log = data.execResult.logs[l] const topics = [] if (log[1].length > 0) { - for (var k in log[1]) { + for (const k in log[1]) { topics.push('0x' + log[1][k].toString('hex')) } } else { diff --git a/libs/remix-simulator/src/methods/txProcess.ts b/libs/remix-simulator/src/methods/txProcess.ts index 75173af309..f269ca1baf 100644 --- a/libs/remix-simulator/src/methods/txProcess.ts +++ b/libs/remix-simulator/src/methods/txProcess.ts @@ -35,7 +35,7 @@ function createContract (payload, from, data, value, gasLimit, txRunner, callbac } export function processTx (txRunnerInstance, payload, isCall, callback) { - let { from, to, data, value, gas } = payload.params[0] + let { from, to, data, value, gas } = payload.params[0] // eslint-disable-line gas = gas || 3000000 const callbacks = { diff --git a/libs/remix-simulator/src/provider.ts b/libs/remix-simulator/src/provider.ts index 3bbdadaa82..1e274e96f5 100644 --- a/libs/remix-simulator/src/provider.ts +++ b/libs/remix-simulator/src/provider.ts @@ -77,11 +77,11 @@ export class Provider { disconnect () { return false - }; + } supportsSubscriptions () { return true - }; + } on (type, cb) { this.vmContext.logsManager.addListener(type, cb) diff --git a/libs/remix-solidity/src/compiler/compiler-utils.ts b/libs/remix-solidity/src/compiler/compiler-utils.ts index 0a90e69adf..310cc50f1c 100644 --- a/libs/remix-solidity/src/compiler/compiler-utils.ts +++ b/libs/remix-solidity/src/compiler/compiler-utils.ts @@ -1,5 +1,5 @@ -const semver = require('semver') -const minixhr = require('minixhr') +import * as semver from 'semver' +import * as minixhr from 'minixhr' /* global Worker */ export const baseURLBin = 'https://binaries.soliditylang.org/bin' diff --git a/libs/remix-solidity/src/compiler/compiler.ts b/libs/remix-solidity/src/compiler/compiler.ts index 8f1a08b4e9..4a7903f5f5 100644 --- a/libs/remix-solidity/src/compiler/compiler.ts +++ b/libs/remix-solidity/src/compiler/compiler.ts @@ -103,7 +103,7 @@ export class Compiler { onInternalCompilerLoaded (): void { if (this.state.worker === null) { - const compiler: any = typeof (window) !== 'undefined' && window['Module'] ? require('solc/wrapper')(window['Module']) : require('solc') + const compiler: any = typeof (window) !== 'undefined' && window['Module'] ? require('solc/wrapper')(window['Module']) : require('solc') // eslint-disable-line this.state.compileJSON = (source: SourceWithTarget) => { const missingInputs: string[] = [] const missingInputsCallback = (path: string) => { @@ -170,7 +170,7 @@ export class Compiler { loadRemoteVersion (version: string): void { console.log(`Loading remote solc version ${version} ...`) - const compiler: any = require('solc') + const compiler: any = require('solc') // eslint-disable-line compiler.loadRemoteVersion(version, (err, remoteCompiler) => { if (err) { console.error('Error in loading remote solc compiler: ', err) diff --git a/libs/remix-tests/src/compiler.ts b/libs/remix-tests/src/compiler.ts index b8fd320f00..70487c97f3 100644 --- a/libs/remix-tests/src/compiler.ts +++ b/libs/remix-tests/src/compiler.ts @@ -14,7 +14,7 @@ function regexIndexOf (inputString: string, regex: RegExp, startpos = 0) { } export function writeTestAccountsContract (accounts: string[]) { - const testAccountContract = require('../sol/tests_accounts.sol') + const testAccountContract = require('../sol/tests_accounts.sol') // eslint-disable-line let body = `address[${accounts.length}] memory accounts;` if (!accounts.length) body += ';' else { @@ -152,7 +152,7 @@ export function compileFileOrFiles (filename: string, isDirectory: boolean, opts if (result.error) error.push(result.error) const errors = (result.errors || error).filter((e) => e.type === 'Error' || e.severity === 'error') if (errors.length > 0) { - if (!isBrowser) require('signale').fatal(errors) + if (!isBrowser) require('signale').fatal(errors) // eslint-disable-line return cb(new CompilationErrors(errors)) } cb(err, result.contracts, result.sources) // return callback with contract details & ASTs @@ -217,7 +217,7 @@ export function compileContractSources (sources: SrcIfc, newCompConfig: any, imp if (result.error) error.push(result.error) const errors = (result.errors || error).filter((e) => e.type === 'Error' || e.severity === 'error') if (errors.length > 0) { - if (!isBrowser) require('signale').fatal(errors) + if (!isBrowser) require('signale').fatal(errors) // eslint-disable-line return cb(new CompilationErrors(errors)) } cb(err, result.contracts, result.sources) // return callback with contract details & ASTs diff --git a/libs/remix-tests/src/fileSystem.ts b/libs/remix-tests/src/fileSystem.ts index 7b3729ebda..c758b6ae61 100644 --- a/libs/remix-tests/src/fileSystem.ts +++ b/libs/remix-tests/src/fileSystem.ts @@ -1,6 +1,6 @@ // Extend fs import path from 'path' -const fs: any = require('fs') +const fs: any = require('fs') // eslint-disable-line // https://github.com/mikeal/node-utils/blob/master/file/lib/main.js fs.walkSync = function (start: string, callback) { diff --git a/libs/remix-tests/src/index.ts b/libs/remix-tests/src/index.ts index 37862a47c6..5adef21ecf 100644 --- a/libs/remix-tests/src/index.ts +++ b/libs/remix-tests/src/index.ts @@ -2,5 +2,5 @@ export { runTestFiles } from './runTestFiles' export { UnitTestRunner } from './runTestSources' export { runTest } from './testRunner' export * from './types' -export const assertLibCode = require('../sol/tests.sol') +export const assertLibCode = require('../sol/tests.sol') // eslint-disable-line export { writeTestAccountsContract } from './compiler' diff --git a/libs/remix-tests/src/run.ts b/libs/remix-tests/src/run.ts index 8228ced38b..45b89df5e7 100644 --- a/libs/remix-tests/src/run.ts +++ b/libs/remix-tests/src/run.ts @@ -32,7 +32,7 @@ function mapOptimize (v: string) { return optimize[v] } -const version = require('../package.json').version +const version = require('../package.json').version // eslint-disable-line commander.version(version) diff --git a/libs/remix-tests/src/runTestFiles.ts b/libs/remix-tests/src/runTestFiles.ts index dbf2b16e46..ebaaf27f98 100644 --- a/libs/remix-tests/src/runTestFiles.ts +++ b/libs/remix-tests/src/runTestFiles.ts @@ -22,7 +22,7 @@ export function runTestFiles (filepath: string, isDirectory: boolean, web3: Web3 opts = opts || {} compilerConfig = compilerConfig || {} as CompilerConfiguration const sourceASTs: any = {} - const { Signale } = require('signale') + const { Signale } = require('signale') // eslint-disable-line // signale configuration const options = { types: { diff --git a/libs/remix-ui/app/src/index.ts b/libs/remix-ui/app/src/index.ts index e706f1ad94..47c95554fd 100644 --- a/libs/remix-ui/app/src/index.ts +++ b/libs/remix-ui/app/src/index.ts @@ -1,5 +1,5 @@ export { default as RemixApp } from './lib/remix-app/remix-app' -export { dispatchModalContext } from './lib/remix-app/context/context' +export { dispatchModalContext, AppContext } from './lib/remix-app/context/context' export { ModalProvider } from './lib/remix-app/context/provider' export { AppModal } from './lib/remix-app/interface/index' export { AlertModal } from './lib/remix-app/interface/index' diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx index 8d36d75cda..cf5456dc38 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx @@ -1,6 +1,5 @@ import React, { useEffect, useRef, useState } from 'react' -import { ModalDialog } from '@remix-ui/modal-dialog' -import { ModalDialogProps } from 'libs/remix-ui/modal-dialog/src/lib/types' +import { ModalDialog, ModalDialogProps } from '@remix-ui/modal-dialog' import { ModalTypes } from '../../types' interface ModalWrapperProps extends ModalDialogProps { diff --git a/libs/remix-ui/app/src/lib/remix-app/context/context.tsx b/libs/remix-ui/app/src/lib/remix-app/context/context.tsx index a60b3e5409..ca69771f80 100644 --- a/libs/remix-ui/app/src/lib/remix-app/context/context.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/context/context.tsx @@ -1,7 +1,6 @@ import React from 'react' import { AlertModal, AppModal } from '../interface' import { ModalInitialState } from '../state/modals' -import { ModalTypes } from '../types' export const AppContext = React.createContext(null) diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index 947475d84b..6845ce88b1 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -7,6 +7,7 @@ import DragBar from './components/dragbar/dragbar' import { AppProvider } from './context/provider' import AppDialogs from './components/modals/dialogs' import DialogViewPlugin from './components/modals/dialogViewPlugin' +import { AppContext } from './context/context' interface IRemixAppUi { app: any @@ -96,7 +97,7 @@ const RemixApp = (props: IRemixAppUi) => { {components.sidePanel}
- +
{components.hiddenPanel} diff --git a/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx b/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx index 92ef7cf768..2220bc1d1b 100644 --- a/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx +++ b/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx @@ -13,10 +13,11 @@ interface ICopyToClipboard { className?: string, title?: string, children?: JSX.Element, - getContent?: () => {} + getContent?: () => any } export const CopyToClipboard = (props: ICopyToClipboard) => { - let { content, tip = 'Copy', icon = 'fa-copy', direction = 'right', children, getContent, ...otherProps } = props + const { tip = 'Copy', icon = 'fa-copy', direction = 'right', getContent, children, ...otherProps } = props + let { content } = props const [message, setMessage] = useState(tip) const copyData = () => { diff --git a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx index a41066e56b..a9a8200e9b 100644 --- a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx @@ -6,9 +6,9 @@ import VmDebuggerHead from './vm-debugger/vm-debugger-head' // eslint-disable-li import { TransactionDebugger as Debugger } from '@remix-project/remix-debug' // eslint-disable-line import { DebuggerUIProps } from './idebugger-api' // eslint-disable-line import { Toaster } from '@remix-ui/toaster' // eslint-disable-line +import { isValidHash } from '@remix-ui/helper' /* eslint-disable-next-line */ import './debugger-ui.css' -const helper = require('../../../../../apps/remix-ide/src/lib/helper') const _paq = (window as any)._paq = (window as any)._paq || [] export const DebuggerUI = (props: DebuggerUIProps) => { @@ -171,7 +171,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { txNumber: txNumber } }) - if (!helper.isValidHash(txNumber)) { + if (!isValidHash(txNumber)) { setState(prevState => { return { ...prevState, @@ -230,6 +230,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { debugWithGeneratedSources: state.opt.debugWithGeneratedSources }) + setTimeout(async() => { try { await debuggerInstance.debug(blockNumber, txNumber, tx, () => { listenToEvents(debuggerInstance, currentReceipt) @@ -257,6 +258,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { } }) } + }, 300) } const debug = (txHash, web3?) => { diff --git a/libs/remix-ui/debugger-ui/src/types/index.ts b/libs/remix-ui/debugger-ui/src/types/index.ts index ee5e02a85f..5168102bb5 100644 --- a/libs/remix-ui/debugger-ui/src/types/index.ts +++ b/libs/remix-ui/debugger-ui/src/types/index.ts @@ -16,6 +16,8 @@ export interface ExtractData { export type ExtractFunc = (json: any, parent?: any) => ExtractData export type FormatSelfFunc = (key: string | number, data: ExtractData) => JSX.Element +export type RegisterEventType = (type: string, listener: any) => void // listener is a function +export type TriggerEventType = (type: string, payload: Array) => void export interface DropdownPanelProps { dropdownName: string, dropdownMessage?: string, @@ -26,8 +28,8 @@ export interface DropdownPanelProps { loading?: boolean, extractFunc?: ExtractFunc, formatSelfFunc?: FormatSelfFunc, - registerEvent?: Function, - triggerEvent?: Function, + registerEvent?: RegisterEventType, + triggerEvent?: TriggerEventType, loadMoreEvent?: string, loadMoreCompletedEvent?: string, bodyStyle?: React.CSSProperties, diff --git a/libs/remix-ui/editor-context-view/src/lib/remix-ui-editor-context-view.tsx b/libs/remix-ui/editor-context-view/src/lib/remix-ui-editor-context-view.tsx index 7e25e32592..50e7fd477c 100644 --- a/libs/remix-ui/editor-context-view/src/lib/remix-ui-editor-context-view.tsx +++ b/libs/remix-ui/editor-context-view/src/lib/remix-ui-editor-context-view.tsx @@ -10,7 +10,7 @@ export type astNode = { id: number, children?: Array, typeDescriptions: any, - nodeType: String, + nodeType: string, src: string // e.g "142:1361:0" } @@ -21,7 +21,7 @@ export type nodePositionLight = { } export type astNodeLight = { - fileTarget: String, + fileTarget: string, nodeId: number, position: nodePositionLight } @@ -39,7 +39,7 @@ export interface RemixUiEditorContextViewProps { openFile: (fileName: string) => void, getLastCompilationResult: () => any, offsetToLineColumn: (position: any, file: any, sources: any, asts: any) => any, - getCurrentFileName: () => String + getCurrentFileName: () => string onContextListenerChanged: (listener: onContextListenerChangedListener) => void onCurrentFileChanged: (listener: ononCurrentFileChangedListener) => void referencesOf: (nodes: astNode) => Array diff --git a/libs/remix-ui/helper/src/lib/remix-ui-helper.ts b/libs/remix-ui/helper/src/lib/remix-ui-helper.ts index 4b9eb28d1c..f20fd124a5 100644 --- a/libs/remix-ui/helper/src/lib/remix-ui-helper.ts +++ b/libs/remix-ui/helper/src/lib/remix-ui-helper.ts @@ -94,3 +94,15 @@ export const is0XPrefixed = (value) => { export const isHexadecimal = (value) => { return /^[0-9a-fA-F]+$/.test(value) && (value.length % 2 === 0) } + +export const isValidHash = (hash) => { // 0x prefixed, hexadecimal, 64digit + const hexValue = hash.slice(2, hash.length) + return is0XPrefixed(hash) && /^[0-9a-fA-F]{64}$/.test(hexValue) +} + +export const shortenHexData = (data) => { + if (!data) return '' + if (data.length < 5) return data + const len = data.length + return data.slice(0, 5) + '...' + data.slice(len - 5, len) +} diff --git a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx index b358c8f503..1fa810ef79 100644 --- a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx +++ b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx @@ -5,7 +5,7 @@ import JSZip from 'jszip' import { ModalDialog } from '@remix-ui/modal-dialog' // eslint-disable-line import { Toaster } from '@remix-ui/toaster' // eslint-disable-line import PluginButton from './components/pluginButton' // eslint-disable-line -import QueryParams from '../../../../../apps/remix-ide/src/lib/query-params' +import { QueryParams } from '@remix-project/remix-lib' import { ThemeContext, themes } from './themeContext' declare global { interface Window { @@ -186,7 +186,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => { try { node.dispatchEvent(new MouseEvent('click')) } catch (e) { - var evt = document.createEvent('MouseEvents') + const evt = document.createEvent('MouseEvents') evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null) node.dispatchEvent(evt) @@ -202,9 +202,9 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => { zip.file(path, content) }) zip.generateAsync({ type: 'blob' }).then(function (blob) { - var today = new Date() - var date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate() - var time = today.getHours() + 'h' + today.getMinutes() + 'min' + const today = new Date() + const date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate() + const time = today.getHours() + 'h' + today.getMinutes() + 'min' saveAs(blob, `remix-backup-at-${time}-${date}.zip`) }).catch((e) => { plugin.call('notification', 'toast', e.message) diff --git a/libs/remix-ui/modal-dialog/src/index.ts b/libs/remix-ui/modal-dialog/src/index.ts index 5226389ef8..42e4552307 100644 --- a/libs/remix-ui/modal-dialog/src/index.ts +++ b/libs/remix-ui/modal-dialog/src/index.ts @@ -1,2 +1,3 @@ export * from './lib/modal-dialog-custom' export * from './lib/remix-ui-modal-dialog' +export * from './lib/types/index' diff --git a/libs/remix-ui/panel/src/lib/main/main-panel.tsx b/libs/remix-ui/panel/src/lib/main/main-panel.tsx index 4ea7dc20f2..0b59d665e3 100644 --- a/libs/remix-ui/panel/src/lib/main/main-panel.tsx +++ b/libs/remix-ui/panel/src/lib/main/main-panel.tsx @@ -1,13 +1,16 @@ /* eslint-disable no-unused-expressions */ -import { AppContext } from 'libs/remix-ui/app/src/lib/remix-app/context/context' -import React, { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react' // eslint-disable-line +import React, { useContext, useEffect, useRef, useState } from 'react' // eslint-disable-line import DragBar from '../dragbar/dragbar' import RemixUIPanelPlugin from '../plugins/panel-plugin' import { PluginRecord } from '../types' import './main-panel.css' -const RemixUIMainPanel = () => { - const appContext = useContext(AppContext) +export type RemixUIMainPanelProps = { + Context: React.Context +} + +const RemixUIMainPanel = (props: RemixUIMainPanelProps) => { + const appContext = useContext(props.Context) const [plugins, setPlugins] = useState([]) const editorRef = useRef(null) const mainPanelRef = useRef(null) diff --git a/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCardContainer.tsx b/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCardContainer.tsx index 26ffee6476..6977ee2ed9 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCardContainer.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCardContainer.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { Profile } from '@remixproject/plugin-utils' import React from 'react' // eslint-disable-line no-use-before-define -import { PluginManagerComponent, PluginManagerProfile } from '../../types' +import { PluginManagerComponent } from '../../types' import InactivePluginCard from './InactivePluginCard' import ModuleHeading from './moduleHeading' @@ -11,16 +11,6 @@ interface InactivePluginCardContainerProps { inactiveProfiles: Profile[] } -interface LocalPluginInterface { - profile: Partial - activateService: {} - requestQueue: [] - options: { queueTimeout: number } - id: number - pendingRequest: {} - listener: [] - iframe: {} -} function InactivePluginCardContainer ({ pluginComponent }: InactivePluginCardContainerProps) { const activatePlugin = (pluginName: string) => { pluginComponent.activateP(pluginName) diff --git a/libs/remix-ui/plugin-manager/src/types.d.ts b/libs/remix-ui/plugin-manager/src/types.d.ts index 66ee57bc77..36a4ebdba2 100644 --- a/libs/remix-ui/plugin-manager/src/types.d.ts +++ b/libs/remix-ui/plugin-manager/src/types.d.ts @@ -74,7 +74,7 @@ export class PluginManagerComponent extends ViewPlugin extends Plugin implements app: PluginApi // eslint-disable-line no-undef engine: Engine htmlElement: HTMLDivElement - views: { root: null, items: {} } + views: { root: null, items: Record } localPlugin: LocalPlugin // eslint-disable-line no-use-before-define pluginNames: string[] inactivePlugins: Profile[] @@ -149,7 +149,7 @@ export interface RemixUiPluginManagerProps { declare class PluginLoader { get currentLoader(): any donotAutoReload: string[] - loaders: {} + loaders: Record current: string set(plugin: any, actives: any): void get(): any diff --git a/libs/remix-ui/run-tab/src/lib/actions/index.ts b/libs/remix-ui/run-tab/src/lib/actions/index.ts index 95ef6f8a76..18635bb1d7 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/index.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/index.ts @@ -636,13 +636,13 @@ export const runTransactions = ( ) } -const saveScenario = (newPath: string, provider, promptCb, cb) => { +const saveScenario = async (newPath: string, provider, promptCb, cb) => { const txJSON = JSON.stringify(plugin.recorder.getAll(), null, 2) - promptCb(() => { + promptCb(async () => { try { - if (!provider.set(newPath, txJSON)) return cb('Failed to create file ' + newPath) - plugin.fileManager.open(newPath) + await provider.set(newPath, txJSON) + await plugin.fileManager.open(newPath) } catch (error) { if (error) return cb('Failed to create file. ' + newPath + ' ' + error) } @@ -651,7 +651,7 @@ const saveScenario = (newPath: string, provider, promptCb, cb) => { export const storeScenario = async (prompt: (msg: string, defaultValue: string) => JSX.Element) => { const path = plugin.fileManager.currentPath() - const fileProvider = plugin.fileManager.fileProviderOf(path) + const fileProvider = await plugin.fileManager.fileProviderOf(path) if (!fileProvider) return displayNotification('Alert', 'Invalid File Provider', 'OK', null) const newPath = await createNonClashingNameAsync(path + '/' + plugin.REACT_API.recorder.pathToScenario, plugin.fileManager) diff --git a/libs/remix-ui/run-tab/src/lib/components/account.tsx b/libs/remix-ui/run-tab/src/lib/components/account.tsx index 9d34294026..f8a74a1a34 100644 --- a/libs/remix-ui/run-tab/src/lib/components/account.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/account.tsx @@ -1,5 +1,5 @@ // eslint-disable-next-line no-use-before-define -import React, { useEffect, useState } from 'react' +import React, { useEffect, useState, useRef } from 'react' import { CopyToClipboard } from '@remix-ui/clipboard' import { AccountProps } from '../types' import { PassphrasePrompt } from './passphrase' @@ -11,7 +11,7 @@ export function AccountUI (props: AccountProps) { classList: '', title: '' }) - const [message, setMessage] = useState('') + const messageRef = useRef('') useEffect(() => { if (!selectedAccount && accounts.length > 0) props.setAccount(accounts[0]) @@ -79,7 +79,7 @@ export function AccountUI (props: AccountProps) { setPassphrase={props.setPassphrase} />, 'OK', () => { props.modal('Sign a message', signMessagePrompt(), 'OK', () => { - props.signMessageWithAddress(selectedAccount, message, signedMessagePrompt, props.passphrase) + props.signMessageWithAddress(selectedAccount, messageRef.current, signedMessagePrompt, props.passphrase) props.setPassphrase('') }, 'Cancel', null) }, 'Cancel', () => { @@ -88,7 +88,7 @@ export function AccountUI (props: AccountProps) { } props.modal('Sign a message', signMessagePrompt(), 'OK', () => { - props.signMessageWithAddress(selectedAccount, message, signedMessagePrompt) + props.signMessageWithAddress(selectedAccount, messageRef.current, signedMessagePrompt) }, 'Cancel', null) } @@ -101,7 +101,7 @@ export function AccountUI (props: AccountProps) { } const handleMessageInput = (e) => { - setMessage(e.target.value) + messageRef.current = e.target.value } const passphraseCreationPrompt = () => { @@ -128,7 +128,7 @@ export function AccountUI (props: AccountProps) { rows={4} cols={50} onInput={handleMessageInput} - defaultValue={message} + defaultValue={messageRef.current} > diff --git a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx index 7fab3aa9d4..74dade661e 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx @@ -16,6 +16,7 @@ export function ContractGUI (props: ContractGUIProps) { dataId: string }>({ title: '', content: '', classList: '', dataId: '' }) const multiFields = useRef>([]) + const basicInputRef = useRef() useEffect(() => { if (props.title) { @@ -26,6 +27,10 @@ export function ContractGUI (props: ContractGUIProps) { setTitle(props.funcABI.type === 'receive' ? '(receive)' : '(fallback)') } setBasicInput('') + // we have the reset the fields before reseting the previous references. + basicInputRef.current.value = '' + multiFields.current.filter((el) => el !== null && el !== undefined).forEach((el) => el.value = '') + multiFields.current = [] }, [props.title, props.funcABI]) useEffect(() => { @@ -166,6 +171,7 @@ export function ContractGUI (props: ContractGUIProps) { placeholder={props.inputs} title={props.funcABI.type === 'fallback' || props.funcABI.type === 'receive' ? `'(${props.funcABI.type}')` : props.inputs} onChange={handleBasicInput} + ref={basicInputRef} style={{ visibility: !((props.funcABI.inputs && props.funcABI.inputs.length > 0) || (props.funcABI.type === 'fallback') || (props.funcABI.type === 'receive')) ? 'hidden' : 'visible' }} /> { const params = api.getCompilerParameters() const optimize = params.optimize const runs = params.runs as string - const evmVersion = params.evmVersion + const evmVersion = compileTabLogic.evmVersions.includes(params.evmVersion) ? params.evmVersion : 'default' const language = getValidLanguage(params.language) return { @@ -243,7 +243,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { }) } - const isSolFileSelected = (currentFile: string = '') => { + const isSolFileSelected = (currentFile = '') => { if (!currentFile) currentFile = api.currentFile if (!currentFile) return false const extention = currentFile.substr(currentFile.length - 3, currentFile.length) @@ -350,7 +350,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { url = customUrl api.setCompilerParameters({ version: selectedVersion }) } else { - if (helper.checkSpecialChars(selectedVersion)) { + if (checkSpecialChars(selectedVersion)) { return console.log('loading ' + selectedVersion + ' not allowed, special chars not allowed.') } if (selectedVersion === 'builtin' || selectedVersion.indexOf('soljson') === 0) { @@ -547,16 +547,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
@@ -606,7 +597,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts index bb301dc402..631d4c7949 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts @@ -1,8 +1,6 @@ import { ICompilerApi } from '@remix-project/remix-lib-ts' -import { getValidLanguage } from '@remix-project/remix-solidity' - -const Compiler = require('@remix-project/remix-solidity').Compiler -const EventEmitter = require('events') +import { getValidLanguage, Compiler} from '@remix-project/remix-solidity' +import { EventEmitter } from 'events' declare global { interface Window { @@ -19,10 +17,12 @@ export class CompileTabLogic { public language: string public compilerImport public event + public evmVersions: Array constructor (public api: ICompilerApi, public contentImport) { this.event = new EventEmitter() this.compiler = new Compiler((url, cb) => api.resolveContentAndSave(url).then((result) => cb(null, result)).catch((error) => cb(error.message))) + this.evmVersions = ['default', 'london', 'istanbul', 'petersburg', 'constantinople', 'byzantium', 'spuriousDragon', 'tangerineWhistle', 'homestead'] } init () { @@ -36,8 +36,12 @@ export class CompileTabLogic { this.compiler.set('runs', this.runs) this.evmVersion = this.api.getCompilerParameters().evmVersion - if (this.evmVersion === 'undefined' || this.evmVersion === 'null' || !this.evmVersion) { - this.evmVersion = null + if ( + this.evmVersion === 'undefined' || + this.evmVersion === 'null' || + !this.evmVersion || + !this.evmVersions.includes(this.evmVersion)) { + this.evmVersion = null } this.api.setCompilerParameters({ evmVersion: this.evmVersion }) this.compiler.set('evmVersion', this.evmVersion) @@ -132,7 +136,7 @@ export class CompileTabLogic { } // TODO readd saving current file this.api.saveCurrentFile() - var currentFile = this.api.currentFile + const currentFile = this.api.currentFile return this.compileFile(currentFile) } catch (err) { console.error(err) diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/contract-parser.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/contract-parser.ts index 2b6a23fa5a..7b72df59f2 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/contract-parser.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/contract-parser.ts @@ -47,7 +47,7 @@ export function parseContracts (contractName, contract, source) { } const retrieveMetadataHash = function (bytecode) { - var match = /a165627a7a72305820([0-9a-f]{64})0029$/.exec(bytecode) + let match = /a165627a7a72305820([0-9a-f]{64})0029$/.exec(bytecode) if (!match) { match = /a265627a7a72305820([0-9a-f]{64})6c6578706572696d656e74616cf50037$/.exec(bytecode) } diff --git a/libs/remix-ui/solidity-unit-testing/src/lib/logic/testTabLogic.ts b/libs/remix-ui/solidity-unit-testing/src/lib/logic/testTabLogic.ts index 87a6f33d80..6179adb62c 100644 --- a/libs/remix-ui/solidity-unit-testing/src/lib/logic/testTabLogic.ts +++ b/libs/remix-ui/solidity-unit-testing/src/lib/logic/testTabLogic.ts @@ -38,20 +38,23 @@ export class TestTabLogic { } // eslint-disable-next-line @typescript-eslint/no-explicit-any - generateTestFile (errorCb:any) { + async generateTestFile (errorCb:any) { let fileName = this.fileManager.currentFile() const hasCurrent = !!fileName && this.fileManager.currentFile().split('.').pop().toLowerCase() === 'sol' if (!hasCurrent) fileName = this.currentPath + '/newFile.sol' - const fileProvider = this.fileManager.fileProviderOf(this.currentPath) + const fileProvider = await this.fileManager.fileProviderOf(this.currentPath) if (!fileProvider) return const splittedFileName = fileName.split('/') const fileNameToImport = (!hasCurrent) ? fileName : this.currentPath + '/' + splittedFileName[splittedFileName.length - 1] - this.helper.createNonClashingNameWithPrefix(fileNameToImport, fileProvider, '_test', (error: Error, newFile: string) => { + this.helper.createNonClashingNameWithPrefix(fileNameToImport, fileProvider, '_test', async (error: Error, newFile: string) => { if (error) return errorCb('Failed to create file. ' + newFile + ' ' + error) - const isFileCreated = fileProvider.set(newFile, this.generateTestContractSample(hasCurrent, fileName)) - if (!isFileCreated) return errorCb('Failed to create test file ' + newFile) - this.fileManager.open(newFile) - this.fileManager.syncEditor(newFile) + try{ + await fileProvider.set(newFile, this.generateTestContractSample(hasCurrent, fileName)) + await this.fileManager.open(newFile) + await this.fileManager.syncEditor(newFile) + }catch(e){ + return errorCb('Failed to create test file ' + newFile) + } }) } diff --git a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx index 15e19bd358..30f1b2e0df 100644 --- a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx +++ b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx @@ -72,6 +72,7 @@ export const SolidityUnitTesting = (props: Record) => { // eslint-d const isDebugging = useRef(false) const allTests = useRef([]) const selectedTests = useRef([]) + const currentTestFiles:any = useRef([]) // stores files for which tests have been run const currentErrors:any = useRef([]) // eslint-disable-line @typescript-eslint/no-explicit-any const defaultPath = 'tests' @@ -104,7 +105,7 @@ export const SolidityUnitTesting = (props: Record) => { // eslint-d } // if current file is changed while debugging and one of the files imported in test file are opened // do not clear the test results in SUT plugin - if (isDebugging.current && testTab.allFilesInvolved.includes(file)) return + if ((isDebugging.current && testTab.allFilesInvolved.includes(file)) || currentTestFiles.current.includes(file)) return allTests.current = [] updateTestFileList() clearResults() @@ -394,6 +395,7 @@ export const SolidityUnitTesting = (props: Record) => { // eslint-d const showTestsResult = () => { const filenames = Object.keys(testsResultByFilename) + currentTestFiles.current = filenames for (const filename of filenames) { const fileTestsResult = testsResultByFilename[filename] const contracts = Object.keys(fileTestsResult) @@ -678,7 +680,7 @@ export const SolidityUnitTesting = (props: Record) => { // eslint-d title="Generate sample test file." disabled={disableGenerateButton} onClick={async () => { - testTabLogic.generateTestFile((err:any) => { if (err) setToasterMsg(err)}) // eslint-disable-line @typescript-eslint/no-explicit-any + await testTabLogic.generateTestFile((err:any) => { if (err) setToasterMsg(err)}) // eslint-disable-line @typescript-eslint/no-explicit-any await updateForNewCurrent() }} > diff --git a/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts b/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts index 5ee522018b..5871a4d2cd 100644 --- a/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts +++ b/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts @@ -22,7 +22,7 @@ export const registerCommandAction = (name: string, command, activate, dispatch: } commands[name] = function () { - const args = [...arguments] + const args = [...arguments] // eslint-disable-line const steps = [] const root = { steps, cmd: name, gidx: 0, idx: 0 } const ITEM = { root, cmd: name } @@ -62,7 +62,7 @@ export const registerCommandAction = (name: string, command, activate, dispatch: Object.keys(commands).forEach(function makeScopedCommand (cmd) { const command = _commands[cmd] scopedCommands[cmd] = function _command () { - const args = [...arguments] + const args = [...arguments] // eslint-disable-line command(args, scopedCommands, el => append(cmd, args, el)) } }) @@ -80,28 +80,28 @@ export const filterFnAction = (name: string, filterFn, dispatch: React.Dispatch< export const registerLogScriptRunnerAction = (on, commandName, commandFn, dispatch: React.Dispatch) => { on('scriptRunner', commandName, (msg) => { - commandFn.log.apply(commandFn, msg.data) + commandFn.log.apply(commandFn, msg.data) // eslint-disable-line dispatch({ type: commandName, payload: { commandFn, message: msg.data } }) }) } export const registerInfoScriptRunnerAction = (on, commandName, commandFn, dispatch: React.Dispatch) => { on('scriptRunner', commandName, (msg) => { - commandFn.info.apply(commandFn, msg.data) + commandFn.info.apply(commandFn, msg.data) // eslint-disable-line dispatch({ type: commandName, payload: { commandFn, message: msg.data } }) }) } export const registerWarnScriptRunnerAction = (on, commandName, commandFn, dispatch: React.Dispatch) => { on('scriptRunner', commandName, (msg) => { - commandFn.warn.apply(commandFn, msg.data) + commandFn.warn.apply(commandFn, msg.data) // eslint-disable-line dispatch({ type: commandName, payload: { commandFn, message: msg.data } }) }) } export const registerErrorScriptRunnerAction = (on, commandName, commandFn, dispatch: React.Dispatch) => { on('scriptRunner', commandName, (msg) => { - commandFn.error.apply(commandFn, msg.data) + commandFn.error.apply(commandFn, msg.data) // eslint-disable-line dispatch({ type: commandName, payload: { commandFn, message: msg.data } }) }) } diff --git a/libs/remix-ui/terminal/src/lib/components/Context.tsx b/libs/remix-ui/terminal/src/lib/components/Context.tsx index d5234f9526..9648b3b094 100644 --- a/libs/remix-ui/terminal/src/lib/components/Context.tsx +++ b/libs/remix-ui/terminal/src/lib/components/Context.tsx @@ -1,17 +1,16 @@ import React from 'react' // eslint-disable-line -import helper from 'apps/remix-ide/src/lib/helper' - -const remixLib = require('@remix-project/remix-lib') -const typeConversion = remixLib.execution.typeConversion +import { shortenHexData } from '@remix-ui/helper' +import { execution } from '@remix-project/remix-lib' +const typeConversion = execution.typeConversion const Context = ({ opts, provider }: { opts, provider: string }) => { const data = opts.tx || '' - const from = opts.from ? helper.shortenHexData(opts.from) : '' + const from = opts.from ? shortenHexData(opts.from) : '' let to = opts.to - if (data.to) to = to + ' ' + helper.shortenHexData(data.to) + if (data.to) to = to + ' ' + shortenHexData(data.to) const val = data.value - let hash = data.hash ? helper.shortenHexData(data.hash) : '' - const input = data.input ? helper.shortenHexData(data.input) : '' + let hash = data.hash ? shortenHexData(data.hash) : '' + const input = data.input ? shortenHexData(data.input) : '' const logs = opts.logs && opts.logs.decoded && opts.logs.decoded.length ? opts.logs.decoded.length : 0 const block = data.receipt ? data.receipt.blockNumber : data.blockNumber || '' const i = data.receipt ? data.transactionIndex : data.transactionIndex @@ -44,7 +43,7 @@ const Context = ({ opts, provider }: { opts, provider: string }) => {
) } else { - hash = helper.shortenHexData(data.blockHash) + hash = shortenHexData(data.blockHash) return (
diff --git a/libs/remix-ui/terminal/src/lib/components/RenderCall.tsx b/libs/remix-ui/terminal/src/lib/components/RenderCall.tsx index 92feb90b65..acfbc0399e 100644 --- a/libs/remix-ui/terminal/src/lib/components/RenderCall.tsx +++ b/libs/remix-ui/terminal/src/lib/components/RenderCall.tsx @@ -1,16 +1,15 @@ -import React, { useState } from 'react' // eslint-disable-line -import { ModalDialog } from '@remix-ui/modal-dialog' // eslint-disable-line -import helper from 'apps/remix-ide/src/lib/helper' +import React from 'react' // eslint-disable-line +import { shortenHexData } from '@remix-ui/helper' import CheckTxStatus from './ChechTxStatus' // eslint-disable-line import showTable from './Table' +import { execution } from '@remix-project/remix-lib' -const remixLib = require('@remix-project/remix-lib') -const typeConversion = remixLib.execution.typeConversion +const typeConversion = execution.typeConversion const RenderCall = ({ tx, resolvedData, logs, index, plugin, showTableHash, txDetails, modal }) => { const to = resolvedData.contractName + '.' + resolvedData.fn const from = tx.from ? tx.from : ' - ' - const input = tx.input ? helper.shortenHexData(tx.input) : '' + const input = tx.input ? shortenHexData(tx.input) : '' const txType = 'call' const debug = (event, tx) => { @@ -27,7 +26,7 @@ const RenderCall = ({ tx, resolvedData, logs, index, plugin, showTableHash, txDe
txDetails(event, tx)}> - [call] + [call]
from: {from}
to: {to}
data: {input}
@@ -35,7 +34,7 @@ const RenderCall = ({ tx, resolvedData, logs, index, plugin, showTableHash, txDe
debug(event, tx)}>Debug
- +
{showTableHash.includes(tx.hash) ? showTable({ hash: tx.hash, diff --git a/libs/remix-ui/terminal/src/lib/components/RenderKnownTransactions.tsx b/libs/remix-ui/terminal/src/lib/components/RenderKnownTransactions.tsx index 64d58248bf..84603d6a1c 100644 --- a/libs/remix-ui/terminal/src/lib/components/RenderKnownTransactions.tsx +++ b/libs/remix-ui/terminal/src/lib/components/RenderKnownTransactions.tsx @@ -1,12 +1,10 @@ -import React, { useState } from 'react' // eslint-disable-line -import { ModalDialog } from '@remix-ui/modal-dialog' // eslint-disable-line +import React from 'react' // eslint-disable-line import CheckTxStatus from './ChechTxStatus' // eslint-disable-line import Context from './Context' // eslint-disable-line import showTable from './Table' - -const remixLib = require('@remix-project/remix-lib') -const typeConversion = remixLib.execution.typeConversion +import { execution } from '@remix-project/remix-lib' +const typeConversion = execution.typeConversion const RenderKnownTransactions = ({ tx, receipt, resolvedData, logs, index, plugin, showTableHash, txDetails, modal, provider }) => { const debug = (event, tx) => { diff --git a/libs/remix-ui/terminal/src/lib/components/Table.tsx b/libs/remix-ui/terminal/src/lib/components/Table.tsx index 360b80aa49..6260cb824e 100644 --- a/libs/remix-ui/terminal/src/lib/components/Table.tsx +++ b/libs/remix-ui/terminal/src/lib/components/Table.tsx @@ -1,9 +1,8 @@ -import React, { useState } from 'react' // eslint-disable-line +import React from 'react' // eslint-disable-line import { CopyToClipboard } from '@remix-ui/clipboard' // eslint-disable-line -import helper from 'apps/remix-ide/src/lib/helper' - -const remixLib = require('@remix-project/remix-lib') -const typeConversion = remixLib.execution.typeConversion +import { shortenHexData } from '@remix-ui/helper' +import { execution } from '@remix-project/remix-lib' +const typeConversion = execution.typeConversion const showTable = (opts, showTableHash) => { let msg = '' @@ -184,7 +183,7 @@ const showTable = (opts, showTableHash) => { data-id={`txLoggerTableHash${opts.hash}`} data-shared={`pair_${opts.hash}`} > - {helper.shortenHexData(opts.input)} + {shortenHexData(opts.input)} diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index 95f3bf6d71..f5a2a8868a 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -105,7 +105,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { registerCommandAction('error', _blocksRenderer('error'), { activate: true }, dispatch) registerCommandAction('script', function execute (args, scopedCommands) { - var script = String(args[0]) + const script = String(args[0]) _shell(script, scopedCommands, function (error, output) { if (error) scriptRunnerDispatch({ type: 'error', payload: { message: error } }) if (output) scriptRunnerDispatch({ type: 'script', payload: { message: '5' } }) @@ -142,7 +142,6 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { if (cb) cb() return } - provider.get(file, (error, content) => { console.log({ content }) if (error) { @@ -282,7 +281,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { const filterUndefined = (el) => el !== undefined && el !== null return function logger (args) { const types = args.filter(filterUndefined).map(type => type) - const values = javascriptserialize.apply(null, args.filter(filterUndefined)).map(function (val, idx) { + const values = javascriptserialize.apply(null, args.filter(filterUndefined)).map(function (val, idx) { // eslint-disable-line if (typeof args[idx] === 'string') { const el = document.createElement('div') el.innerHTML = args[idx].replace(/(\r\n|\n|\r)/gm, '
') diff --git a/libs/remix-ui/terminal/src/lib/utils/utils.ts b/libs/remix-ui/terminal/src/lib/utils/utils.ts index 62091ee9c8..3ea77b6ed5 100644 --- a/libs/remix-ui/terminal/src/lib/utils/utils.ts +++ b/libs/remix-ui/terminal/src/lib/utils/utils.ts @@ -14,9 +14,9 @@ export const matched = (arr, value) => arr.map(x => Object.keys(x).some(x => x.s const findDeep = (object, fn, found = { break: false, value: undefined }) => { if (typeof object !== 'object' || object === null) return - for (var i in object) { + for (const i in object) { if (found.break) break - var el = object[i] + let el = object[i] if (el && el.innerText !== undefined && el.innerText !== null) el = el.innerText if (fn(el, i, object)) { found.value = el diff --git a/libs/remix-ui/theme-module/src/index.ts b/libs/remix-ui/theme-module/src/index.ts index 63469ca72e..f83499af53 100644 --- a/libs/remix-ui/theme-module/src/index.ts +++ b/libs/remix-ui/theme-module/src/index.ts @@ -1 +1,2 @@ export * from './lib/remix-ui-theme-module'; +export * from '../types/theme-module' diff --git a/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx b/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx index 9a8e22143c..077da4edba 100644 --- a/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx +++ b/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import React, { useEffect, useRef, useState } from 'react'; -import { Theme, ThemeModule } from '../../types/theme-module'; +import React, { useEffect, useState } from 'react'; +import { ThemeModule } from '../../types/theme-module'; import './remix-ui-theme-module.module.css'; /* eslint-disable-next-line */ diff --git a/libs/remix-ui/theme-module/types/theme-module.d.ts b/libs/remix-ui/theme-module/types/theme-module.ts similarity index 94% rename from libs/remix-ui/theme-module/types/theme-module.d.ts rename to libs/remix-ui/theme-module/types/theme-module.ts index 42dc836dfb..6d6935fde1 100644 --- a/libs/remix-ui/theme-module/types/theme-module.d.ts +++ b/libs/remix-ui/theme-module/types/theme-module.ts @@ -1,10 +1,10 @@ import { Plugin } from "@remixproject/engine/lib/abstract"; import { EventEmitter } from "events"; // eslint-disable-next-line @typescript-eslint/no-explicit-any -export class ThemeModule extends Plugin { +export interface ThemeModule extends Plugin { currentThemeState: Record; + constructor(registry: any): any; // eslint-disable-next-line @typescript-eslint/no-explicit-any - constructor(registry: any); events: EventEmitter; _deps: { // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/libs/remix-ui/workspace/src/lib/actions/events.ts b/libs/remix-ui/workspace/src/lib/actions/events.ts index 7ea0b03053..ffd7c9e05a 100644 --- a/libs/remix-ui/workspace/src/lib/actions/events.ts +++ b/libs/remix-ui/workspace/src/lib/actions/events.ts @@ -154,7 +154,6 @@ const folderAdded = async (folderPath: string) => { const promise = new Promise((resolve) => { provider.resolveDirectory(path, (error, fileTree) => { if (error) console.error(error) - resolve(fileTree) }) }) diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index e9bc5d1a62..ae248d6fa8 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -9,11 +9,18 @@ import { createWorkspaceTemplate, getWorkspaces, loadWorkspacePreset, setPlugin export * from './events' export * from './workspace' -const QueryParams = require('../../../../../../apps/remix-ide/src/lib/query-params') +import { QueryParams } from '@remix-project/remix-lib' + const queryParams = new QueryParams() let plugin, dispatch: React.Dispatch +export type UrlParametersType = { + gist: string, + code: string, + url: string +} + export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React.Dispatch) => { if (filePanelPlugin) { plugin = filePanelPlugin @@ -21,7 +28,7 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. setPlugin(plugin, dispatch) const workspaceProvider = filePanelPlugin.fileProviders.workspace const localhostProvider = filePanelPlugin.fileProviders.localhost - const params = queryParams.get() + const params = queryParams.get() as UrlParametersType const workspaces = await getWorkspaces() || [] dispatch(setWorkspaces(workspaces)) @@ -35,7 +42,7 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. plugin.setWorkspace({ name: 'code-sample', isLocalhost: false }) dispatch(setCurrentWorkspace('code-sample')) const filePath = await loadWorkspacePreset('code-template') - plugin.on('editor', 'editorMounted', () => plugin.fileManager.openFile(filePath)) + plugin.on('editor', 'editorMounted', async () => await plugin.fileManager.openFile(filePath)) } else { if (workspaces.length === 0) { await createWorkspaceTemplate('default_workspace', 'default-template') @@ -84,6 +91,12 @@ export const removeInputField = async (path: string) => { dispatch(removeInputFieldSuccess(path)) } +export type SolidityConfiguration = { + version: string, + optimize: string, + runs: string +} + export const publishToGist = async (path?: string, type?: string) => { // If 'id' is not defined, it is not a gist update but a creation so we have to take the files from the browser explorer. const folder = path || '/' @@ -97,8 +110,9 @@ export const publishToGist = async (path?: string, type?: string) => { if (!accessToken) { dispatch(displayNotification('Authorize Token', 'Remix requires an access token (which includes gists creation permission). Please go to the settings tab to create one.', 'Close', null, () => {})) } else { + const params = queryParams.get() as SolidityConfiguration const description = 'Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. \n Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=' + - queryParams.get().version + '&optimize=' + queryParams.get().optimize + '&runs=' + queryParams.get().runs + '&gist=' + params.version + '&optimize=' + params.optimize + '&runs=' + params.runs + '&gist=' const gists = new Gists({ token: accessToken }) if (id) { @@ -215,7 +229,7 @@ export const copyFile = async (src: string, dest: string) => { const fileManager = plugin.fileManager try { - fileManager.copyFile(src, dest) + await fileManager.copyFile(src, dest) } catch (error) { dispatch(displayPopUp('Oops! An error ocurred while performing copyFile operation.' + error)) } @@ -225,7 +239,7 @@ export const copyFolder = async (src: string, dest: string) => { const fileManager = plugin.fileManager try { - fileManager.copyDir(src, dest) + await fileManager.copyDir(src, dest) } catch (error) { dispatch(displayPopUp('Oops! An error ocurred while performing copyDir operation.' + error)) } @@ -243,11 +257,11 @@ export const runScript = async (path: string) => { } export const emitContextMenuEvent = async (cmd: customAction) => { - plugin.call(cmd.id, cmd.name, cmd) + await plugin.call(cmd.id, cmd.name, cmd) } export const handleClickFile = async (path: string, type: 'file' | 'folder' | 'gist') => { - plugin.fileManager.open(path) + await plugin.fileManager.open(path) dispatch(focusElement([{ key: path, type }])) } @@ -255,10 +269,10 @@ export const handleExpandPath = (paths: string[]) => { dispatch(setExpandPath(paths)) } -const packageGistFiles = (directory) => { +const packageGistFiles = async (directory) => { + const workspaceProvider = plugin.fileProviders.workspace + const isFile = await workspaceProvider.isFile(directory) return new Promise((resolve, reject) => { - const workspaceProvider = plugin.fileProviders.workspace - const isFile = workspaceProvider.isFile(directory) const ret = {} if (isFile) { diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts index 32ef1eda7c..64079f315b 100644 --- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts +++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts @@ -3,9 +3,11 @@ import { bufferToHex, keccakFromString } from 'ethereumjs-util' import axios, { AxiosResponse } from 'axios' import { addInputFieldSuccess, createWorkspaceError, createWorkspaceRequest, createWorkspaceSuccess, displayNotification, fetchWorkspaceDirectoryError, fetchWorkspaceDirectoryRequest, fetchWorkspaceDirectorySuccess, hideNotification, setCurrentWorkspace, setDeleteWorkspace, setMode, setReadOnlyMode, setRenameWorkspace } from './payload' import { checkSlash, checkSpecialChars } from '@remix-ui/helper' + import { JSONStandardInput } from '../types' -const examples = require('../../../../../../apps/remix-ide/src/app/editor/examples') -const QueryParams = require('../../../../../../apps/remix-ide/src/lib/query-params') +import { examples } from '../templates/examples' +import { QueryParams } from '@remix-project/remix-lib' + const LOCALHOST = ' - connect to localhost - ' const NO_WORKSPACE = ' - none - ' @@ -46,9 +48,9 @@ export const createWorkspace = async (workspaceName: string, isEmpty = false, cb dispatch(createWorkspaceRequest(promise)) promise.then(async () => { dispatch(createWorkspaceSuccess(workspaceName)) - plugin.setWorkspace({ name: workspaceName, isLocalhost: false }) - plugin.setWorkspaces(await getWorkspaces()) - plugin.workspaceCreated(workspaceName) + await plugin.setWorkspace({ name: workspaceName, isLocalhost: false }) + await plugin.setWorkspaces(await getWorkspaces()) + await plugin.workspaceCreated(workspaceName) if (!isEmpty) await loadWorkspacePreset('default-template') cb && cb(null, workspaceName) }).catch((error) => { @@ -69,16 +71,22 @@ export const createWorkspaceTemplate = async (workspaceName: string, template: ' } } +export type UrlParametersType = { + gist: string, + code: string, + url: string +} + export const loadWorkspacePreset = async (template: 'gist-template' | 'code-template' | 'default-template' = 'default-template') => { const workspaceProvider = plugin.fileProviders.workspace - const params = queryParams.get() + const params = queryParams.get() as UrlParametersType switch (template) { case 'code-template': // creates a new workspace code-sample and loads code from url params. try { let path = ''; let content = '' - + if (params.code) { const hash = bufferToHex(keccakFromString(params.code)) @@ -94,7 +102,7 @@ export const loadWorkspacePreset = async (template: 'gist-template' | 'code-temp if (content && typeof content === 'object') { const standardInput = content as JSONStandardInput if (standardInput.language && standardInput.language === "Solidity" && standardInput.sources) { - for (let [fname, source] of Object.entries(standardInput.sources)) { + for (const [fname, source] of Object.entries(standardInput.sources)) { await workspaceProvider.set(fname, source.content) } } @@ -156,7 +164,7 @@ export const workspaceExists = async (name: string) => { const browserProvider = plugin.fileProviders.browser const workspacePath = 'browser/' + workspaceProvider.workspacesPath + '/' + name - return browserProvider.exists(workspacePath) + return await browserProvider.exists(workspacePath) } export const fetchWorkspaceDirectory = async (path: string) => { @@ -182,8 +190,8 @@ export const fetchWorkspaceDirectory = async (path: string) => { export const renameWorkspace = async (oldName: string, workspaceName: string, cb?: (err: Error, result?: string | number | boolean | Record) => void) => { await renameWorkspaceFromProvider(oldName, workspaceName) await dispatch(setRenameWorkspace(oldName, workspaceName)) - plugin.setWorkspace({ name: workspaceName, isLocalhost: false }) - plugin.workspaceRenamed(oldName, workspaceName) + await plugin.setWorkspace({ name: workspaceName, isLocalhost: false }) + await plugin.workspaceRenamed(oldName, workspaceName) cb && cb(null, workspaceName) } @@ -194,9 +202,9 @@ export const renameWorkspaceFromProvider = async (oldName: string, workspaceName const browserProvider = plugin.fileProviders.browser const workspaceProvider = plugin.fileProviders.workspace const workspacesPath = workspaceProvider.workspacesPath - browserProvider.rename('browser/' + workspacesPath + '/' + oldName, 'browser/' + workspacesPath + '/' + workspaceName, true) - workspaceProvider.setWorkspace(workspaceName) - plugin.setWorkspaces(await getWorkspaces()) + await browserProvider.rename('browser/' + workspacesPath + '/' + oldName, 'browser/' + workspacesPath + '/' + workspaceName, true) + await workspaceProvider.setWorkspace(workspaceName) + await plugin.setWorkspaces(await getWorkspaces()) } export const deleteWorkspace = async (workspaceName: string, cb?: (err: Error, result?: string | number | boolean | Record) => void) => { @@ -210,8 +218,8 @@ const deleteWorkspaceFromProvider = async (workspaceName: string) => { const workspacesPath = plugin.fileProviders.workspace.workspacesPath await plugin.fileManager.closeAllFiles() - plugin.fileProviders.browser.remove(workspacesPath + '/' + workspaceName) - plugin.setWorkspaces(await getWorkspaces()) + await plugin.fileProviders.browser.remove(workspacesPath + '/' + workspaceName) + await plugin.setWorkspaces(await getWorkspaces()) } export const switchToWorkspace = async (name: string) => { @@ -223,15 +231,15 @@ export const switchToWorkspace = async (name: string) => { dispatch(setMode('localhost')) plugin.emit('setWorkspace', { name: null, isLocalhost: true }) } else if (name === NO_WORKSPACE) { - plugin.fileProviders.workspace.clearWorkspace() - plugin.setWorkspace({ name: null, isLocalhost: false }) + await plugin.fileProviders.workspace.clearWorkspace() + await plugin.setWorkspace({ name: null, isLocalhost: false }) dispatch(setCurrentWorkspace(null)) } else { const isActive = await plugin.call('manager', 'isActive', 'remixd') if (isActive) await plugin.call('manager', 'deactivatePlugin', 'remixd') await plugin.fileProviders.workspace.setWorkspace(name) - plugin.setWorkspace({ name, isLocalhost: false }) + await plugin.setWorkspace({ name, isLocalhost: false }) dispatch(setMode('browser')) dispatch(setCurrentWorkspace(name)) dispatch(setReadOnlyMode(false)) @@ -243,7 +251,7 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error, // the files module. Please ask the user here if they want to overwrite // a file and then just use `files.add`. The file explorer will // pick that up via the 'fileAdded' event from the files module. - [...target.files].forEach((file) => { + [...target.files].forEach(async (file) => { const workspaceProvider = plugin.fileProviders.workspace const loadFile = (name: string): void => { const fileReader = new FileReader() @@ -252,11 +260,12 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error, if (checkSpecialChars(file.name)) { return dispatch(displayNotification('File Upload Failed', 'Special characters are not allowed', 'Close', null, async () => {})) } - const success = await workspaceProvider.set(name, event.target.result) - - if (!success) { + try { + await workspaceProvider.set(name, event.target.result) + } catch (error) { return dispatch(displayNotification('File Upload Failed', 'Failed to create file ' + name, 'Close', null, async () => {})) } + const config = plugin.registry.get('config').api const editor = plugin.registry.get('editor').api @@ -269,18 +278,13 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error, } const name = targetFolder === '/' ? file.name : `${targetFolder}/${file.name}` - workspaceProvider.exists(name).then(exist => { - if (!exist) { + if (!await workspaceProvider.exists(name)) { + loadFile(name) + } else { + dispatch(displayNotification('Confirm overwrite', `The file ${name} already exists! Would you like to overwrite it?`, 'OK', null, () => { loadFile(name) - } else { - dispatch(displayNotification('Confirm overwrite', `The file ${name} already exists! Would you like to overwrite it?`, 'OK', null, () => { - loadFile(name) - }, () => {})) - } - }).catch(error => { - cb && cb(error) - if (error) console.log(error) - }) + }, () => {})) + } }) } @@ -299,7 +303,7 @@ export const getWorkspaces = async (): Promise | undefined => { }) }) - plugin.setWorkspaces(workspaces) + await plugin.setWorkspaces(workspaces) return workspaces } catch (e) {} } diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx index f89fb9338e..5ae7de8d05 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx @@ -287,7 +287,7 @@ export const FileExplorer = (props: FileExplorerProps) => { }) } - const editModeOn = (path: string, type: string, isNew: boolean = false) => { + const editModeOn = (path: string, type: string, isNew = false) => { if (props.readonly) return props.toast('Cannot write/modify file system in read only mode.') setState(prevState => { return { ...prevState, focusEdit: { ...prevState.focusEdit, element: path, isNew, type } } diff --git a/libs/remix-ui/workspace/src/lib/css/file-explorer.css b/libs/remix-ui/workspace/src/lib/css/file-explorer.css index 4da076bc44..0f836c4396 100644 --- a/libs/remix-ui/workspace/src/lib/css/file-explorer.css +++ b/libs/remix-ui/workspace/src/lib/css/file-explorer.css @@ -54,3 +54,8 @@ input[type="file"] { ul { padding : 0; } + +[contenteditable] { + -webkit-user-select: text; + user-select: text; +} \ No newline at end of file diff --git a/libs/remix-ui/workspace/src/lib/reducers/workspace.ts b/libs/remix-ui/workspace/src/lib/reducers/workspace.ts index cf3e3a1cbf..df80d46ee0 100644 --- a/libs/remix-ui/workspace/src/lib/reducers/workspace.ts +++ b/libs/remix-ui/workspace/src/lib/reducers/workspace.ts @@ -656,14 +656,22 @@ const fetchDirectoryContent = (state: BrowserState, payload: { fileTree, path: s if (state.mode === 'browser') { if (payload.path === state.browser.currentWorkspace) { let files = normalize(payload.fileTree, payload.path, payload.type) - files = _.merge(files, state.browser.files[state.browser.currentWorkspace]) if (deletePath) delete files[deletePath] return { [state.browser.currentWorkspace]: files } } else { let files = state.browser.files const _path = splitPath(state, payload.path) - const prevFiles = _.get(files, _path) + let prevFiles = _.get(files, _path) + + if (!prevFiles) { + const object = {}; let o = object + for (const pa of _path) { + o = o[pa] = {} + } + files = _.defaultsDeep(files, object) + prevFiles = _.get(files, _path) + } if (prevFiles) { prevFiles.child = _.merge(normalize(payload.fileTree, payload.path, payload.type), prevFiles.child) diff --git a/apps/remix-ide/src/app/editor/examples.js b/libs/remix-ui/workspace/src/lib/templates/examples.ts similarity index 99% rename from apps/remix-ide/src/app/editor/examples.js rename to libs/remix-ui/workspace/src/lib/templates/examples.ts index 4f60ffa646..0d3c0c4941 100644 --- a/apps/remix-ide/src/app/editor/examples.js +++ b/libs/remix-ui/workspace/src/lib/templates/examples.ts @@ -331,7 +331,7 @@ To run a script, right click on file name in the file explorer and click 'Run'. Output from script will appear in remix terminal. ` -module.exports = { +export const examples = { storage: { name: 'contracts/1_Storage.sol', content: storage }, owner: { name: 'contracts/2_Owner.sol', content: owner }, ballot: { name: 'contracts/3_Ballot.sol', content: ballot }, diff --git a/libs/remix-url-resolver/src/resolve.ts b/libs/remix-url-resolver/src/resolve.ts index c139bbc803..2f30fc4339 100644 --- a/libs/remix-url-resolver/src/resolve.ts +++ b/libs/remix-url-resolver/src/resolve.ts @@ -54,7 +54,7 @@ export class RemixURLResolver { } // eslint-disable-next-line no-useless-catch try { - const req: string = `https://raw.githubusercontent.com/${root}/${reference}/${filePath}` + const req = `https://raw.githubusercontent.com/${root}/${reference}/${filePath}` const response: AxiosResponse = await axios.get(req) return { content: response.data, cleanUrl: root + '/' + filePath } } catch (e) { diff --git a/libs/remixd/src/bin/remixd.ts b/libs/remixd/src/bin/remixd.ts index 8440ae0ce7..c6bff13a89 100644 --- a/libs/remixd/src/bin/remixd.ts +++ b/libs/remixd/src/bin/remixd.ts @@ -12,7 +12,7 @@ import * as program from 'commander' async function warnLatestVersion () { const latest = await latestVersion('@remix-project/remixd') - const pjson = require('../../package.json') + const pjson = require('../../package.json') // eslint-disable-line if (semver.eq(latest, pjson.version)) { console.log('\x1b[32m%s\x1b[0m', `[INFO] you are using the latest version ${latest}`) } else if (semver.gt(latest, pjson.version)) { @@ -37,7 +37,7 @@ const ports = { folder: 65520 } -const killCallBack: Array = [] +const killCallBack: Array = [] // any is function function startService (service: S, callback: (ws: WS, sharedFolderClient: servicesList.Sharedfolder, error?:Error) => void) { const socket = new WebSocket(ports[service], { remixIdeUrl: program.remixIde }, () => services[service](program.readOnly || false)) socket.start(callback) @@ -54,7 +54,7 @@ function errorHandler (error: any, service: string) { } (async () => { - const { version } = require('../../package.json') + const { version } = require('../../package.json') // eslint-disable-line program.version(version, '-v, --version') program diff --git a/libs/remixd/src/services/gitClient.ts b/libs/remixd/src/services/gitClient.ts index d4658df554..71f691a8a6 100644 --- a/libs/remixd/src/services/gitClient.ts +++ b/libs/remixd/src/services/gitClient.ts @@ -1,6 +1,6 @@ import * as WS from 'ws' // eslint-disable-line import { PluginClient } from '@remixproject/plugin' -const { spawn } = require('child_process') +const { spawn } = require('child_process') // eslint-disable-line export class GitClient extends PluginClient { methods: Array diff --git a/libs/remixd/src/services/hardhatClient.ts b/libs/remixd/src/services/hardhatClient.ts index 62400debda..48e268f4b2 100644 --- a/libs/remixd/src/services/hardhatClient.ts +++ b/libs/remixd/src/services/hardhatClient.ts @@ -1,6 +1,6 @@ import * as WS from 'ws' // eslint-disable-line import { PluginClient } from '@remixproject/plugin' -const { spawn } = require('child_process') +const { spawn } = require('child_process') // eslint-disable-line export class HardhatClient extends PluginClient { methods: Array diff --git a/libs/remixd/src/services/slitherClient.ts b/libs/remixd/src/services/slitherClient.ts index 24e485045d..1187bd694e 100644 --- a/libs/remixd/src/services/slitherClient.ts +++ b/libs/remixd/src/services/slitherClient.ts @@ -5,7 +5,7 @@ import { PluginClient } from '@remixproject/plugin' import { existsSync, readFileSync, readdirSync, unlink } from 'fs' import { OutputStandard } from '../types' // eslint-disable-line import * as utils from '../utils' -const { spawn, execSync } = require('child_process') +const { spawn, execSync } = require('child_process') // eslint-disable-line export class SlitherClient extends PluginClient { methods: Array @@ -73,7 +73,7 @@ export class SlitherClient extends PluginClient { analyse (filePath: string, compilerConfig: Record) { return new Promise((resolve, reject) => { if (this.readOnly) { - const errMsg: string = '[Slither Analysis]: Cannot analyse in read-only mode' + const errMsg = '[Slither Analysis]: Cannot analyse in read-only mode' return reject(new Error(errMsg)) } const options = { cwd: this.currentSharedFolder, shell: true } @@ -136,7 +136,7 @@ export class SlitherClient extends PluginClient { const solcRemaps = remaps ? `--solc-remaps "${remaps}"` : '' const outputFile: string = 'remix-slitherReport_' + Math.floor(Date.now() / 1000) + '.json' - const cmd: string = `slither ${filePath} ${solcArgs} ${solcRemaps} --json ${outputFile}` + const cmd = `slither ${filePath} ${solcArgs} ${solcRemaps} --json ${outputFile}` console.log('\x1b[32m%s\x1b[0m', '[Slither Analysis]: Running Slither...') // Added `stdio: 'ignore'` as for contract with NPM imports analysis which is exported in 'stderr' // get too big and hangs the process. We process analysis from the report file only diff --git a/package-lock.json b/package-lock.json index 12dfe6125f..18feb9d161 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "remix-project", - "version": "0.21.2-dev", + "version": "0.22.0-dev", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3320,7 +3320,7 @@ "@evocateur/libnpmaccess": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz", - "integrity": "sha512-KSCAHwNWro0CF2ukxufCitT9K5LjL/KuMmNzSu8wuwN2rjyKHD8+cmOsiybK+W5hdnwc5M1SmRlVCaMHQo+3rg==", + "integrity": "sha1-7Pf2zmsATp+UKwmNkiAL5KSxyEU=", "dev": true, "requires": { "@evocateur/npm-registry-fetch": "^4.0.0", @@ -3333,13 +3333,13 @@ "aproba": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "integrity": "sha1-UlILiuW1aSFbNU78DKo/4eRaitw=", "dev": true }, "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -3351,7 +3351,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -3359,7 +3359,7 @@ "@evocateur/libnpmpublish": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@evocateur/libnpmpublish/-/libnpmpublish-1.2.2.tgz", - "integrity": "sha512-MJrrk9ct1FeY9zRlyeoyMieBjGDG9ihyyD9/Ft6MMrTxql9NyoEx2hw9casTIP4CdqEVu+3nQ2nXxoJ8RCXyFg==", + "integrity": "sha1-Vd8J0tyhNq+6nIjHWconIZjbnxo=", "dev": true, "requires": { "@evocateur/npm-registry-fetch": "^4.0.0", @@ -3376,13 +3376,13 @@ "aproba": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "integrity": "sha1-UlILiuW1aSFbNU78DKo/4eRaitw=", "dev": true }, "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -3394,7 +3394,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true }, "ssri": { @@ -3411,7 +3411,7 @@ "@evocateur/npm-registry-fetch": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@evocateur/npm-registry-fetch/-/npm-registry-fetch-4.0.0.tgz", - "integrity": "sha512-k1WGfKRQyhJpIr+P17O5vLIo2ko1PFLKwoetatdduUSt/aQ4J2sJrJwwatdI5Z3SiYk/mRH9S3JpdmMFd/IK4g==", + "integrity": "sha1-jEw4dm2NMtMgD8sKg/BktXNl7WY=", "dev": true, "requires": { "JSONStream": "^1.3.4", @@ -3435,7 +3435,7 @@ "agentkeepalive": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", - "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", + "integrity": "sha1-oROSTdP6JKC8O3gQjEUMKr7gD2c=", "dev": true, "requires": { "humanize-ms": "^1.2.1" @@ -3482,7 +3482,7 @@ "http-cache-semantics": { "version": "3.8.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "integrity": "sha1-ObDhat2bYFvwqe89nar0hDtMrNI=", "dev": true }, "http-proxy-agent": { @@ -3498,7 +3498,7 @@ "https-proxy-agent": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "integrity": "sha1-TuenN6vZJniik9mzShr00NCMeHs=", "dev": true, "requires": { "agent-base": "^4.3.0", @@ -3508,7 +3508,7 @@ "make-fetch-happen": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz", - "integrity": "sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==", + "integrity": "sha1-qoOHEE8mh+3KAchofuRQE9AtGb0=", "dev": true, "requires": { "agentkeepalive": "^3.4.1", @@ -3533,7 +3533,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -3561,7 +3561,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true }, "socks": { @@ -3609,7 +3609,7 @@ "@evocateur/pacote": { "version": "9.6.5", "resolved": "https://registry.npmjs.org/@evocateur/pacote/-/pacote-9.6.5.tgz", - "integrity": "sha512-EI552lf0aG2nOV8NnZpTxNo2PcXKPmDbF9K8eCBFQdIZwHNGN/mi815fxtmUMa2wTa1yndotICIDt/V0vpEx2w==", + "integrity": "sha1-M94yuiELbxfCDrq01JfvxnVfSuU=", "dev": true, "requires": { "@evocateur/npm-registry-fetch": "^4.0.0", @@ -3655,7 +3655,7 @@ "agentkeepalive": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", - "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", + "integrity": "sha1-oROSTdP6JKC8O3gQjEUMKr7gD2c=", "dev": true, "requires": { "humanize-ms": "^1.2.1" @@ -3702,7 +3702,7 @@ "http-cache-semantics": { "version": "3.8.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "integrity": "sha1-ObDhat2bYFvwqe89nar0hDtMrNI=", "dev": true }, "http-proxy-agent": { @@ -3718,7 +3718,7 @@ "https-proxy-agent": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "integrity": "sha1-TuenN6vZJniik9mzShr00NCMeHs=", "dev": true, "requires": { "agent-base": "^4.3.0", @@ -3728,7 +3728,7 @@ "make-fetch-happen": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz", - "integrity": "sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==", + "integrity": "sha1-qoOHEE8mh+3KAchofuRQE9AtGb0=", "dev": true, "requires": { "agentkeepalive": "^3.4.1", @@ -3753,7 +3753,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -3765,7 +3765,7 @@ "npm-packlist": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", - "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", + "integrity": "sha1-Vu5swTW5+YrT1Rwcldoiu7my7z4=", "dev": true, "requires": { "ignore-walk": "^3.0.1", @@ -3776,7 +3776,7 @@ "npm-pick-manifest": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz", - "integrity": "sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw==", + "integrity": "sha1-9Nnl/UviFT5fTl+be+jcQZqZq7c=", "dev": true, "requires": { "figgy-pudding": "^3.5.1", @@ -3803,7 +3803,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true }, "socks": { @@ -5620,7 +5620,7 @@ "@lerna/add": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/add/-/add-3.21.0.tgz", - "integrity": "sha512-vhUXXF6SpufBE1EkNEXwz1VLW03f177G9uMOFMQkp6OJ30/PWg4Ekifuz9/3YfgB2/GH8Tu4Lk3O51P2Hskg/A==", + "integrity": "sha1-JwB73nHMewopaas8LwrkFXi0V3s=", "dev": true, "requires": { "@evocateur/pacote": "^9.6.3", @@ -5638,7 +5638,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -5650,7 +5650,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -5666,7 +5666,7 @@ "@lerna/bootstrap": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/bootstrap/-/bootstrap-3.21.0.tgz", - "integrity": "sha512-mtNHlXpmvJn6JTu0KcuTTPl2jLsDNud0QacV/h++qsaKbhAaJr/FElNZ5s7MwZFUM3XaDmvWzHKaszeBMHIbBw==", + "integrity": "sha1-vNG2Ub5bCXCyDY+uBMhkVIEjrtY=", "dev": true, "requires": { "@lerna/command": "3.21.0", @@ -5697,7 +5697,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -5709,7 +5709,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -5725,7 +5725,7 @@ "@lerna/changed": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/changed/-/changed-3.21.0.tgz", - "integrity": "sha512-hzqoyf8MSHVjZp0gfJ7G8jaz+++mgXYiNs9iViQGA8JlN/dnWLI5sWDptEH3/B30Izo+fdVz0S0s7ydVE3pWIw==", + "integrity": "sha1-EI4V9nm/4HevUA9YJIxjTxBE6gs=", "dev": true, "requires": { "@lerna/collect-updates": "3.20.0", @@ -5737,7 +5737,7 @@ "@lerna/check-working-tree": { "version": "3.16.5", "resolved": "https://registry.npmjs.org/@lerna/check-working-tree/-/check-working-tree-3.16.5.tgz", - "integrity": "sha512-xWjVBcuhvB8+UmCSb5tKVLB5OuzSpw96WEhS2uz6hkWVa/Euh1A0/HJwn2cemyK47wUrCQXtczBUiqnq9yX5VQ==", + "integrity": "sha1-tPiuYbtFI1Yd+5+PjYdN1Gu0S6o=", "dev": true, "requires": { "@lerna/collect-uncommitted": "3.16.5", @@ -5748,7 +5748,7 @@ "@lerna/child-process": { "version": "3.16.5", "resolved": "https://registry.npmjs.org/@lerna/child-process/-/child-process-3.16.5.tgz", - "integrity": "sha512-vdcI7mzei9ERRV4oO8Y1LHBZ3A5+ampRKg1wq5nutLsUA4mEBN6H7JqjWOMY9xZemv6+kATm2ofjJ3lW5TszQg==", + "integrity": "sha1-OPo8GAZKpKwHVK2AEUd2p7NqabI=", "dev": true, "requires": { "chalk": "^2.3.1", @@ -5759,7 +5759,7 @@ "@lerna/clean": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/clean/-/clean-3.21.0.tgz", - "integrity": "sha512-b/L9l+MDgE/7oGbrav6rG8RTQvRiZLO1zTcG17zgJAAuhlsPxJExMlh2DFwJEVi2les70vMhHfST3Ue1IMMjpg==", + "integrity": "sha1-wLRrUwDMPa4s2jvsFLgDCC2jhW0=", "dev": true, "requires": { "@lerna/command": "3.21.0", @@ -5783,7 +5783,7 @@ "@lerna/cli": { "version": "3.18.5", "resolved": "https://registry.npmjs.org/@lerna/cli/-/cli-3.18.5.tgz", - "integrity": "sha512-erkbxkj9jfc89vVs/jBLY/fM0I80oLmJkFUV3Q3wk9J3miYhP14zgVEBsPZY68IZlEjT6T3Xlq2xO1AVaatHsA==", + "integrity": "sha1-yQxGFUL801ttWwFaKQ+w2/tB0kI=", "dev": true, "requires": { "@lerna/global-options": "3.13.0", @@ -5795,13 +5795,13 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", "dev": true }, "cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "integrity": "sha1-3u/P2y6AB4SqNPRvoI4GhRx7u8U=", "dev": true, "requires": { "string-width": "^3.1.0", @@ -5818,7 +5818,7 @@ "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", "dev": true, "requires": { "locate-path": "^3.0.0" @@ -5833,7 +5833,7 @@ "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", "dev": true, "requires": { "p-locate": "^3.0.0", @@ -5843,7 +5843,7 @@ "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=", "dev": true, "requires": { "p-try": "^2.0.0" @@ -5852,7 +5852,7 @@ "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -5861,13 +5861,13 @@ "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=", "dev": true, "requires": { "emoji-regex": "^7.0.1", @@ -5878,7 +5878,7 @@ "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", "dev": true, "requires": { "ansi-regex": "^4.1.0" @@ -5887,7 +5887,7 @@ "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "integrity": "sha1-H9H2cjXVttD+54EFYAG/tpTAOwk=", "dev": true, "requires": { "ansi-styles": "^3.2.0", @@ -5898,7 +5898,7 @@ "yargs": { "version": "14.2.3", "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", - "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", + "integrity": "sha1-Ghw+3O0a+yov6jNgS8bR2NaIpBQ=", "dev": true, "requires": { "cliui": "^5.0.0", @@ -5929,7 +5929,7 @@ "@lerna/collect-uncommitted": { "version": "3.16.5", "resolved": "https://registry.npmjs.org/@lerna/collect-uncommitted/-/collect-uncommitted-3.16.5.tgz", - "integrity": "sha512-ZgqnGwpDZiWyzIQVZtQaj9tRizsL4dUOhuOStWgTAw1EMe47cvAY2kL709DzxFhjr6JpJSjXV5rZEAeU3VE0Hg==", + "integrity": "sha1-pJTWGqwxzceuxLvlLJZVAnQTLmM=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -5941,7 +5941,7 @@ "@lerna/collect-updates": { "version": "3.20.0", "resolved": "https://registry.npmjs.org/@lerna/collect-updates/-/collect-updates-3.20.0.tgz", - "integrity": "sha512-qBTVT5g4fupVhBFuY4nI/3FSJtQVcDh7/gEPOpRxoXB/yCSnT38MFHXWl+y4einLciCjt/+0x6/4AG80fjay2Q==", + "integrity": "sha1-YvnXa6IaJbfZ+/McAt6IdEpWS9E=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -5954,7 +5954,7 @@ "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "integrity": "sha1-3lUoUaF1nfOo8gZTVEL17E3eq0Q=", "dev": true } } @@ -5962,7 +5962,7 @@ "@lerna/command": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/command/-/command-3.21.0.tgz", - "integrity": "sha512-T2bu6R8R3KkH5YoCKdutKv123iUgUbW8efVjdGCDnCMthAQzoentOJfDeodBwn0P2OqCl3ohsiNVtSn9h78fyQ==", + "integrity": "sha1-miODdZ3HtwDaz6iiKy86bhkBIfc=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -5980,7 +5980,7 @@ "@lerna/conventional-commits": { "version": "3.22.0", "resolved": "https://registry.npmjs.org/@lerna/conventional-commits/-/conventional-commits-3.22.0.tgz", - "integrity": "sha512-z4ZZk1e8Mhz7+IS8NxHr64wyklHctCJyWpJKEZZPJiLFJ8yKto/x38O80R10pIzC0rr8Sy/OsjSH4bl0TbbgqA==", + "integrity": "sha1-J5j0iB7i70V72uAnq30L8K9vHgk=", "dev": true, "requires": { "@lerna/validation-error": "3.13.0", @@ -6019,7 +6019,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -6031,7 +6031,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -6041,7 +6041,7 @@ "@lerna/create": { "version": "3.22.0", "resolved": "https://registry.npmjs.org/@lerna/create/-/create-3.22.0.tgz", - "integrity": "sha512-MdiQQzCcB4E9fBF1TyMOaAEz9lUjIHp1Ju9H7f3lXze5JK6Fl5NYkouAvsLgY6YSIhXMY8AHW2zzXeBDY4yWkw==", + "integrity": "sha1-1rvQN8PcW0Jf5fbRuBcFfCePdhk=", "dev": true, "requires": { "@evocateur/pacote": "^9.6.3", @@ -6067,7 +6067,7 @@ "@nodelib/fs.stat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "integrity": "sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=", "dev": true }, "array-union": { @@ -6091,7 +6091,7 @@ "fast-glob": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", - "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "integrity": "sha1-aVOFfDr6R1//ku5gFdUtpwpM050=", "dev": true, "requires": { "@mrmlnc/readdir-enhanced": "^2.2.1", @@ -6116,7 +6116,7 @@ "globby": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", - "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "integrity": "sha1-/QKacGxwPSm90XD0tts6P3p8tj0=", "dev": true, "requires": { "@types/glob": "^7.1.1", @@ -6132,7 +6132,7 @@ "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", "dev": true }, "jsonfile": { @@ -6147,7 +6147,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -6159,7 +6159,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -6167,7 +6167,7 @@ "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "integrity": "sha1-3lUoUaF1nfOo8gZTVEL17E3eq0Q=", "dev": true }, "tr46": { @@ -6201,7 +6201,7 @@ "@lerna/create-symlink": { "version": "3.16.2", "resolved": "https://registry.npmjs.org/@lerna/create-symlink/-/create-symlink-3.16.2.tgz", - "integrity": "sha512-pzXIJp6av15P325sgiIRpsPXLFmkisLhMBCy4764d+7yjf2bzrJ4gkWVMhsv4AdF0NN3OyZ5jjzzTtLNqfR+Jw==", + "integrity": "sha1-QSy45Zpy9afZRj5ORyGtIHAUmWc=", "dev": true, "requires": { "@zkochan/cmd-shim": "^3.1.0", @@ -6234,7 +6234,7 @@ "@lerna/describe-ref": { "version": "3.16.5", "resolved": "https://registry.npmjs.org/@lerna/describe-ref/-/describe-ref-3.16.5.tgz", - "integrity": "sha512-c01+4gUF0saOOtDBzbLMFOTJDHTKbDFNErEY6q6i9QaXuzy9LNN62z+Hw4acAAZuJQhrVWncVathcmkkjvSVGw==", + "integrity": "sha1-ozjCWq7YN9PccLinLER8XGY0asA=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -6244,7 +6244,7 @@ "@lerna/diff": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/diff/-/diff-3.21.0.tgz", - "integrity": "sha512-5viTR33QV3S7O+bjruo1SaR40m7F2aUHJaDAC7fL9Ca6xji+aw1KFkpCtVlISS0G8vikUREGMJh+c/VMSc8Usw==", + "integrity": "sha1-5t8Ni5kWFn/1pJ/LAqwGQkKApo0=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -6256,7 +6256,7 @@ "@lerna/exec": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/exec/-/exec-3.21.0.tgz", - "integrity": "sha512-iLvDBrIE6rpdd4GIKTY9mkXyhwsJ2RvQdB9ZU+/NhR3okXfqKc6py/24tV111jqpXTtZUW6HNydT4dMao2hi1Q==", + "integrity": "sha1-F/B1M4k8uRihe0G8xWbcQ3AW2yY=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -6279,7 +6279,7 @@ "@lerna/filter-options": { "version": "3.20.0", "resolved": "https://registry.npmjs.org/@lerna/filter-options/-/filter-options-3.20.0.tgz", - "integrity": "sha512-bmcHtvxn7SIl/R9gpiNMVG7yjx7WyT0HSGw34YVZ9B+3xF/83N3r5Rgtjh4hheLZ+Q91Or0Jyu5O3Nr+AwZe2g==", + "integrity": "sha1-Dw9dWkeDhW7s5CBHCMyQLLyK9Zs=", "dev": true, "requires": { "@lerna/collect-updates": "3.20.0", @@ -6292,7 +6292,7 @@ "@lerna/filter-packages": { "version": "3.18.0", "resolved": "https://registry.npmjs.org/@lerna/filter-packages/-/filter-packages-3.18.0.tgz", - "integrity": "sha512-6/0pMM04bCHNATIOkouuYmPg6KH3VkPCIgTfQmdkPJTullERyEQfNUKikrefjxo1vHOoCACDpy65JYyKiAbdwQ==", + "integrity": "sha1-ano3bShSCNsDqClYz7gXLhebTnA=", "dev": true, "requires": { "@lerna/validation-error": "3.13.0", @@ -6303,7 +6303,7 @@ "@lerna/get-npm-exec-opts": { "version": "3.13.0", "resolved": "https://registry.npmjs.org/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.13.0.tgz", - "integrity": "sha512-Y0xWL0rg3boVyJk6An/vurKzubyJKtrxYv2sj4bB8Mc5zZ3tqtv0ccbOkmkXKqbzvNNF7VeUt1OJ3DRgtC/QZw==", + "integrity": "sha1-0bVSywCIGZ/D5+Em+RTjmgjfnqU=", "dev": true, "requires": { "npmlog": "^4.1.2" @@ -6312,7 +6312,7 @@ "@lerna/get-packed": { "version": "3.16.0", "resolved": "https://registry.npmjs.org/@lerna/get-packed/-/get-packed-3.16.0.tgz", - "integrity": "sha512-AjsFiaJzo1GCPnJUJZiTW6J1EihrPkc2y3nMu6m3uWFxoleklsSCyImumzVZJssxMi3CPpztj8LmADLedl9kXw==", + "integrity": "sha1-GzFrcG3O6Gx7qlXlCwh5WUR4Uv8=", "dev": true, "requires": { "fs-extra": "^8.1.0", @@ -6354,7 +6354,7 @@ "@lerna/github-client": { "version": "3.22.0", "resolved": "https://registry.npmjs.org/@lerna/github-client/-/github-client-3.22.0.tgz", - "integrity": "sha512-O/GwPW+Gzr3Eb5bk+nTzTJ3uv+jh5jGho9BOqKlajXaOkMYGBELEAqV5+uARNGWZFvYAiF4PgqHb6aCUu7XdXg==", + "integrity": "sha1-XYFqpPdnR+1zauZP+WK48Vw1TZU=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -6367,7 +6367,7 @@ "@lerna/gitlab-client": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/@lerna/gitlab-client/-/gitlab-client-3.15.0.tgz", - "integrity": "sha512-OsBvRSejHXUBMgwWQqNoioB8sgzL/Pf1pOUhHKtkiMl6aAWjklaaq5HPMvTIsZPfS6DJ9L5OK2GGZuooP/5c8Q==", + "integrity": "sha1-kfTsjGl7WsV/fyW9UP5lnSSqlqY=", "dev": true, "requires": { "node-fetch": "^2.5.0", @@ -6406,13 +6406,13 @@ "@lerna/global-options": { "version": "3.13.0", "resolved": "https://registry.npmjs.org/@lerna/global-options/-/global-options-3.13.0.tgz", - "integrity": "sha512-SlZvh1gVRRzYLVluz9fryY1nJpZ0FHDGB66U9tFfvnnxmueckRQxLopn3tXj3NU1kc3QANT2I5BsQkOqZ4TEFQ==", + "integrity": "sha1-IXZiKQ2watnPLEnY4xAO4o6uuuE=", "dev": true }, "@lerna/has-npm-version": { "version": "3.16.5", "resolved": "https://registry.npmjs.org/@lerna/has-npm-version/-/has-npm-version-3.16.5.tgz", - "integrity": "sha512-WL7LycR9bkftyqbYop5rEGJ9sRFIV55tSGmbN1HLrF9idwOCD7CLrT64t235t3t4O5gehDnwKI5h2U3oxTrF8Q==", + "integrity": "sha1-q4OVbyEdiSPqav6bl5s4zHOxUyY=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -6422,7 +6422,7 @@ "@lerna/import": { "version": "3.22.0", "resolved": "https://registry.npmjs.org/@lerna/import/-/import-3.22.0.tgz", - "integrity": "sha512-uWOlexasM5XR6tXi4YehODtH9Y3OZrFht3mGUFFT3OIl2s+V85xIGFfqFGMTipMPAGb2oF1UBLL48kR43hRsOg==", + "integrity": "sha1-Gl8DlPOOI8T2QqEj5eFRfnDQaNI=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -6460,7 +6460,7 @@ "@lerna/info": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/info/-/info-3.21.0.tgz", - "integrity": "sha512-0XDqGYVBgWxUquFaIptW2bYSIu6jOs1BtkvRTWDDhw4zyEdp6q4eaMvqdSap1CG+7wM5jeLCi6z94wS0AuiuwA==", + "integrity": "sha1-dmlrZ2/bDzXUjIPGPB4yu143gU8=", "dev": true, "requires": { "@lerna/command": "3.21.0", @@ -6471,7 +6471,7 @@ "@lerna/init": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/init/-/init-3.21.0.tgz", - "integrity": "sha512-6CM0z+EFUkFfurwdJCR+LQQF6MqHbYDCBPyhu/d086LRf58GtYZYj49J8mKG9ktayp/TOIxL/pKKjgLD8QBPOg==", + "integrity": "sha1-HoEJNNyL9OU4bAMQQYgdO0CWqlw=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -6512,7 +6512,7 @@ "@lerna/link": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/link/-/link-3.21.0.tgz", - "integrity": "sha512-tGu9GxrX7Ivs+Wl3w1+jrLi1nQ36kNI32dcOssij6bg0oZ2M2MDEFI9UF2gmoypTaN9uO5TSsjCFS7aR79HbdQ==", + "integrity": "sha1-i+aP8MzuEEsXS1u9YGMCwvBunZs=", "dev": true, "requires": { "@lerna/command": "3.21.0", @@ -6531,7 +6531,7 @@ "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "integrity": "sha1-3lUoUaF1nfOo8gZTVEL17E3eq0Q=", "dev": true } } @@ -6539,7 +6539,7 @@ "@lerna/list": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/list/-/list-3.21.0.tgz", - "integrity": "sha512-KehRjE83B1VaAbRRkRy6jLX1Cin8ltsrQ7FHf2bhwhRHK0S54YuA6LOoBnY/NtA8bHDX/Z+G5sMY78X30NS9tg==", + "integrity": "sha1-Qvdvr6Vt6hO2keyMqxODJpHWHaI=", "dev": true, "requires": { "@lerna/command": "3.21.0", @@ -6551,7 +6551,7 @@ "@lerna/listable": { "version": "3.18.5", "resolved": "https://registry.npmjs.org/@lerna/listable/-/listable-3.18.5.tgz", - "integrity": "sha512-Sdr3pVyaEv5A7ZkGGYR7zN+tTl2iDcinryBPvtuv20VJrXBE8wYcOks1edBTcOWsPjCE/rMP4bo1pseyk3UTsg==", + "integrity": "sha1-6CeYQFte2PxRhDyO8eeg5Jc4iho=", "dev": true, "requires": { "@lerna/query-graph": "3.18.5", @@ -6562,7 +6562,7 @@ "@lerna/log-packed": { "version": "3.16.0", "resolved": "https://registry.npmjs.org/@lerna/log-packed/-/log-packed-3.16.0.tgz", - "integrity": "sha512-Fp+McSNBV/P2mnLUYTaSlG8GSmpXM7krKWcllqElGxvAqv6chk2K3c2k80MeVB4WvJ9tRjUUf+i7HUTiQ9/ckQ==", + "integrity": "sha1-+DmRBB7neySVY04URwtCJZ/SvBY=", "dev": true, "requires": { "byte-size": "^5.0.1", @@ -6574,7 +6574,7 @@ "@lerna/npm-conf": { "version": "3.16.0", "resolved": "https://registry.npmjs.org/@lerna/npm-conf/-/npm-conf-3.16.0.tgz", - "integrity": "sha512-HbO3DUrTkCAn2iQ9+FF/eisDpWY5POQAOF1m7q//CZjdC2HSW3UYbKEGsSisFxSfaF9Z4jtrV+F/wX6qWs3CuA==", + "integrity": "sha1-HBComuL2wu6WliVXc4aFMA03aCc=", "dev": true, "requires": { "config-chain": "^1.1.11", @@ -6584,7 +6584,7 @@ "@lerna/npm-dist-tag": { "version": "3.18.5", "resolved": "https://registry.npmjs.org/@lerna/npm-dist-tag/-/npm-dist-tag-3.18.5.tgz", - "integrity": "sha512-xw0HDoIG6HreVsJND9/dGls1c+lf6vhu7yJoo56Sz5bvncTloYGLUppIfDHQr4ZvmPCK8rsh0euCVh2giPxzKQ==", + "integrity": "sha1-nvmrt8EEB3sx9vqyLMc7MU1UrFU=", "dev": true, "requires": { "@evocateur/npm-registry-fetch": "^4.0.0", @@ -6597,7 +6597,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -6609,7 +6609,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -6617,7 +6617,7 @@ "@lerna/npm-install": { "version": "3.16.5", "resolved": "https://registry.npmjs.org/@lerna/npm-install/-/npm-install-3.16.5.tgz", - "integrity": "sha512-hfiKk8Eku6rB9uApqsalHHTHY+mOrrHeWEs+gtg7+meQZMTS3kzv4oVp5cBZigndQr3knTLjwthT/FX4KvseFg==", + "integrity": "sha1-1r/cFvgShdpmUVrkeSTW4njWN9M=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -6652,7 +6652,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -6664,7 +6664,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -6672,7 +6672,7 @@ "@lerna/npm-publish": { "version": "3.18.5", "resolved": "https://registry.npmjs.org/@lerna/npm-publish/-/npm-publish-3.18.5.tgz", - "integrity": "sha512-3etLT9+2L8JAx5F8uf7qp6iAtOLSMj+ZYWY6oUgozPi/uLqU0/gsMsEXh3F0+YVW33q0M61RpduBoAlOOZnaTg==", + "integrity": "sha1-JA5AOZWf2YFrScWwdCHhG1ywAK8=", "dev": true, "requires": { "@evocateur/libnpmpublish": "^1.2.2", @@ -6709,7 +6709,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -6721,7 +6721,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -6729,7 +6729,7 @@ "@lerna/npm-run-script": { "version": "3.16.5", "resolved": "https://registry.npmjs.org/@lerna/npm-run-script/-/npm-run-script-3.16.5.tgz", - "integrity": "sha512-1asRi+LjmVn3pMjEdpqKJZFT/3ZNpb+VVeJMwrJaV/3DivdNg7XlPK9LTrORuKU4PSvhdEZvJmSlxCKyDpiXsQ==", + "integrity": "sha1-nC7IJFOibAtG7cC7fBWBbIIfXBU=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -6740,7 +6740,7 @@ "@lerna/otplease": { "version": "3.18.5", "resolved": "https://registry.npmjs.org/@lerna/otplease/-/otplease-3.18.5.tgz", - "integrity": "sha512-S+SldXAbcXTEDhzdxYLU0ZBKuYyURP/ND2/dK6IpKgLxQYh/z4ScljPDMyKymmEvgiEJmBsPZAAPfmNPEzxjog==", + "integrity": "sha1-t3uOdgtAq62fdljZiPPqd9T9AjE=", "dev": true, "requires": { "@lerna/prompt": "3.18.5", @@ -6750,7 +6750,7 @@ "@lerna/output": { "version": "3.13.0", "resolved": "https://registry.npmjs.org/@lerna/output/-/output-3.13.0.tgz", - "integrity": "sha512-7ZnQ9nvUDu/WD+bNsypmPG5MwZBwu86iRoiW6C1WBuXXDxM5cnIAC1m2WxHeFnjyMrYlRXM9PzOQ9VDD+C15Rg==", + "integrity": "sha1-Pe18yQiyephyIopjDZUK7a56SYk=", "dev": true, "requires": { "npmlog": "^4.1.2" @@ -6759,7 +6759,7 @@ "@lerna/pack-directory": { "version": "3.16.4", "resolved": "https://registry.npmjs.org/@lerna/pack-directory/-/pack-directory-3.16.4.tgz", - "integrity": "sha512-uxSF0HZeGyKaaVHz5FroDY9A5NDDiCibrbYR6+khmrhZtY0Bgn6hWq8Gswl9iIlymA+VzCbshWIMX4o2O8C8ng==", + "integrity": "sha1-Pq5fkb31rP4DhFEO1T+t3EwHRpM=", "dev": true, "requires": { "@lerna/get-packed": "3.16.0", @@ -6775,7 +6775,7 @@ "npm-packlist": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", - "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", + "integrity": "sha1-Vu5swTW5+YrT1Rwcldoiu7my7z4=", "dev": true, "requires": { "ignore-walk": "^3.0.1", @@ -6788,7 +6788,7 @@ "@lerna/package": { "version": "3.16.0", "resolved": "https://registry.npmjs.org/@lerna/package/-/package-3.16.0.tgz", - "integrity": "sha512-2lHBWpaxcBoiNVbtyLtPUuTYEaB/Z+eEqRS9duxpZs6D+mTTZMNy6/5vpEVSCBmzvdYpyqhqaYjjSLvjjr5Riw==", + "integrity": "sha1-fgpG5Gl+2LipwU1Zx/iQ4NOLoTw=", "dev": true, "requires": { "load-json-file": "^5.3.0", @@ -6799,7 +6799,7 @@ "load-json-file": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "integrity": "sha1-TTweAfocA+p4pgrHr5MsnOU0A/M=", "dev": true, "requires": { "graceful-fs": "^4.1.15", @@ -6812,7 +6812,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -6824,13 +6824,13 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true }, "type-fest": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "integrity": "sha1-Y9ANIE4FlHT+Xht8ARESu9HcKeE=", "dev": true } } @@ -6838,7 +6838,7 @@ "@lerna/package-graph": { "version": "3.18.5", "resolved": "https://registry.npmjs.org/@lerna/package-graph/-/package-graph-3.18.5.tgz", - "integrity": "sha512-8QDrR9T+dBegjeLr+n9WZTVxUYUhIUjUgZ0gvNxUBN8S1WB9r6H5Yk56/MVaB64tA3oGAN9IIxX6w0WvTfFudA==", + "integrity": "sha1-x0Di6jV40FnlUWM+lQaQgxuUH2s=", "dev": true, "requires": { "@lerna/prerelease-id-from-version": "3.16.0", @@ -6851,7 +6851,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -6863,7 +6863,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -6873,7 +6873,7 @@ "@lerna/prerelease-id-from-version": { "version": "3.16.0", "resolved": "https://registry.npmjs.org/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-3.16.0.tgz", - "integrity": "sha512-qZyeUyrE59uOK8rKdGn7jQz+9uOpAaF/3hbslJVFL1NqF9ELDTqjCPXivuejMX/lN4OgD6BugTO4cR7UTq/sZA==", + "integrity": "sha1-skv6eJ9eG6q5FNewi6rpt719g6E=", "dev": true, "requires": { "semver": "^6.2.0" @@ -6882,7 +6882,7 @@ "@lerna/profiler": { "version": "3.20.0", "resolved": "https://registry.npmjs.org/@lerna/profiler/-/profiler-3.20.0.tgz", - "integrity": "sha512-bh8hKxAlm6yu8WEOvbLENm42i2v9SsR4WbrCWSbsmOElx3foRnMlYk7NkGECa+U5c3K4C6GeBbwgqs54PP7Ljg==", + "integrity": "sha1-D23CNvTqj56l81jGcDMFpPMq0FE=", "dev": true, "requires": { "figgy-pudding": "^3.5.1", @@ -6916,7 +6916,7 @@ "@lerna/project": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/project/-/project-3.21.0.tgz", - "integrity": "sha512-xT1mrpET2BF11CY32uypV2GPtPVm6Hgtha7D81GQP9iAitk9EccrdNjYGt5UBYASl4CIDXBRxwmTTVGfrCx82A==", + "integrity": "sha1-XXhNLRDFYaAPIDILzbBAmXwQUC0=", "dev": true, "requires": { "@lerna/package": "3.16.0", @@ -6936,7 +6936,7 @@ "@nodelib/fs.stat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "integrity": "sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=", "dev": true }, "array-union": { @@ -6951,7 +6951,7 @@ "cosmiconfig": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "integrity": "sha1-BA9yaAnFked6F8CjYmykW08Wixo=", "dev": true, "requires": { "import-fresh": "^2.0.0", @@ -6972,7 +6972,7 @@ "fast-glob": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", - "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "integrity": "sha1-aVOFfDr6R1//ku5gFdUtpwpM050=", "dev": true, "requires": { "@mrmlnc/readdir-enhanced": "^2.2.1", @@ -7018,7 +7018,7 @@ "globby": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", - "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "integrity": "sha1-/QKacGxwPSm90XD0tts6P3p8tj0=", "dev": true, "requires": { "@types/glob": "^7.1.1", @@ -7034,7 +7034,7 @@ "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", "dev": true }, "import-fresh": { @@ -7058,7 +7058,7 @@ "load-json-file": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "integrity": "sha1-TTweAfocA+p4pgrHr5MsnOU0A/M=", "dev": true, "requires": { "graceful-fs": "^4.1.15", @@ -7077,13 +7077,13 @@ "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "integrity": "sha1-3lUoUaF1nfOo8gZTVEL17E3eq0Q=", "dev": true }, "type-fest": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "integrity": "sha1-Y9ANIE4FlHT+Xht8ARESu9HcKeE=", "dev": true } } @@ -7091,7 +7091,7 @@ "@lerna/prompt": { "version": "3.18.5", "resolved": "https://registry.npmjs.org/@lerna/prompt/-/prompt-3.18.5.tgz", - "integrity": "sha512-rkKj4nm1twSbBEb69+Em/2jAERK8htUuV8/xSjN0NPC+6UjzAwY52/x9n5cfmpa9lyKf/uItp7chCI7eDmNTKQ==", + "integrity": "sha1-YozVRfIliH0GBJGrld+JnPxSGKE=", "dev": true, "requires": { "inquirer": "^6.2.0", @@ -7214,7 +7214,7 @@ "@lerna/publish": { "version": "3.22.1", "resolved": "https://registry.npmjs.org/@lerna/publish/-/publish-3.22.1.tgz", - "integrity": "sha512-PG9CM9HUYDreb1FbJwFg90TCBQooGjj+n/pb3gw/eH5mEDq0p8wKdLFe0qkiqUkm/Ub5C8DbVFertIo0Vd0zcw==", + "integrity": "sha1-tPfOP7oemvsovkofPYgiImm6lRk=", "dev": true, "requires": { "@evocateur/libnpmaccess": "^3.1.2", @@ -7272,7 +7272,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -7284,7 +7284,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -7300,7 +7300,7 @@ "@lerna/pulse-till-done": { "version": "3.13.0", "resolved": "https://registry.npmjs.org/@lerna/pulse-till-done/-/pulse-till-done-3.13.0.tgz", - "integrity": "sha512-1SOHpy7ZNTPulzIbargrgaJX387csN7cF1cLOGZiJQA6VqnS5eWs2CIrG8i8wmaUavj2QlQ5oEbRMVVXSsGrzA==", + "integrity": "sha1-yOnOW6+vENkwpn1+0My12Vj+ARA=", "dev": true, "requires": { "npmlog": "^4.1.2" @@ -7309,7 +7309,7 @@ "@lerna/query-graph": { "version": "3.18.5", "resolved": "https://registry.npmjs.org/@lerna/query-graph/-/query-graph-3.18.5.tgz", - "integrity": "sha512-50Lf4uuMpMWvJ306be3oQDHrWV42nai9gbIVByPBYJuVW8dT8O8pA3EzitNYBUdLL9/qEVbrR0ry1HD7EXwtRA==", + "integrity": "sha1-30gwu1FVJzADvzXo3aHDLQknvYY=", "dev": true, "requires": { "@lerna/package-graph": "3.18.5", @@ -7319,7 +7319,7 @@ "@lerna/resolve-symlink": { "version": "3.16.0", "resolved": "https://registry.npmjs.org/@lerna/resolve-symlink/-/resolve-symlink-3.16.0.tgz", - "integrity": "sha512-Ibj5e7njVHNJ/NOqT4HlEgPFPtPLWsO7iu59AM5bJDcAJcR96mLZ7KGVIsS2tvaO7akMEJvt2P+ErwCdloG3jQ==", + "integrity": "sha1-N/xwlfq9vPMXwm63Tg0L3o79I4Y=", "dev": true, "requires": { "fs-extra": "^8.1.0", @@ -7352,7 +7352,7 @@ "@lerna/rimraf-dir": { "version": "3.16.5", "resolved": "https://registry.npmjs.org/@lerna/rimraf-dir/-/rimraf-dir-3.16.5.tgz", - "integrity": "sha512-bQlKmO0pXUsXoF8lOLknhyQjOZsCc0bosQDoX4lujBXSWxHVTg1VxURtWf2lUjz/ACsJVDfvHZbDm8kyBk5okA==", + "integrity": "sha1-BDFqtf/SkJZXqvOI6lAsuMLyCgk=", "dev": true, "requires": { "@lerna/child-process": "3.16.5", @@ -7364,7 +7364,7 @@ "@lerna/run": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/@lerna/run/-/run-3.21.0.tgz", - "integrity": "sha512-fJF68rT3veh+hkToFsBmUJ9MHc9yGXA7LSDvhziAojzOb0AI/jBDp6cEcDQyJ7dbnplba2Lj02IH61QUf9oW0Q==", + "integrity": "sha1-KjXshJeeTW5CR0/hSNMuXeHKyJE=", "dev": true, "requires": { "@lerna/command": "3.21.0", @@ -7389,7 +7389,7 @@ "@lerna/run-lifecycle": { "version": "3.16.2", "resolved": "https://registry.npmjs.org/@lerna/run-lifecycle/-/run-lifecycle-3.16.2.tgz", - "integrity": "sha512-RqFoznE8rDpyyF0rOJy3+KjZCeTkO8y/OB9orPauR7G2xQ7PTdCpgo7EO6ZNdz3Al+k1BydClZz/j78gNCmL2A==", + "integrity": "sha1-Z7KI+OqWTbnqT7H7x3FdW7sLzgA=", "dev": true, "requires": { "@lerna/npm-conf": "3.16.0", @@ -7401,7 +7401,7 @@ "@lerna/run-topologically": { "version": "3.18.5", "resolved": "https://registry.npmjs.org/@lerna/run-topologically/-/run-topologically-3.18.5.tgz", - "integrity": "sha512-6N1I+6wf4hLOnPW+XDZqwufyIQ6gqoPfHZFkfWlvTQ+Ue7CuF8qIVQ1Eddw5HKQMkxqN10thKOFfq/9NQZ4NUg==", + "integrity": "sha1-PNY52iDpZ9dnLLiNsPdWuS8v38M=", "dev": true, "requires": { "@lerna/query-graph": "3.18.5", @@ -7412,13 +7412,13 @@ "eventemitter3": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "integrity": "sha1-LT1I+cNGaY/Og6hdfWZOmFNd9uc=", "dev": true }, "p-queue": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-4.0.0.tgz", - "integrity": "sha512-3cRXXn3/O0o3+eVmUroJPSj/esxoEFIm0ZOno/T+NzG/VZgPOqQ8WKmlNqubSEpZmCIngEy34unkHGg83ZIBmg==", + "integrity": "sha1-7Q7uh5iSftbywvX1t3/bIGGl00Y=", "dev": true, "requires": { "eventemitter3": "^3.1.0" @@ -7429,7 +7429,7 @@ "@lerna/symlink-binary": { "version": "3.17.0", "resolved": "https://registry.npmjs.org/@lerna/symlink-binary/-/symlink-binary-3.17.0.tgz", - "integrity": "sha512-RLpy9UY6+3nT5J+5jkM5MZyMmjNHxZIZvXLV+Q3MXrf7Eaa1hNqyynyj4RO95fxbS+EZc4XVSk25DGFQbcRNSQ==", + "integrity": "sha1-j4AxswmGOBSIPT8AmHf4Ljiu9Fo=", "dev": true, "requires": { "@lerna/create-symlink": "3.16.2", @@ -7469,7 +7469,7 @@ "@lerna/symlink-dependencies": { "version": "3.17.0", "resolved": "https://registry.npmjs.org/@lerna/symlink-dependencies/-/symlink-dependencies-3.17.0.tgz", - "integrity": "sha512-KmjU5YT1bpt6coOmdFueTJ7DFJL4H1w5eF8yAQ2zsGNTtZ+i5SGFBWpb9AQaw168dydc3s4eu0W0Sirda+F59Q==", + "integrity": "sha1-SNY2DphYZaDlbNi1GzCKUmMIeEo=", "dev": true, "requires": { "@lerna/create-symlink": "3.16.2", @@ -7512,13 +7512,13 @@ "@lerna/timer": { "version": "3.13.0", "resolved": "https://registry.npmjs.org/@lerna/timer/-/timer-3.13.0.tgz", - "integrity": "sha512-RHWrDl8U4XNPqY5MQHkToWS9jHPnkLZEt5VD+uunCKTfzlxGnRCr3/zVr8VGy/uENMYpVP3wJa4RKGY6M0vkRw==", + "integrity": "sha1-vNCQRVHbFuCDZNbBjl4hYPyHB4E=", "dev": true }, "@lerna/validation-error": { "version": "3.13.0", "resolved": "https://registry.npmjs.org/@lerna/validation-error/-/validation-error-3.13.0.tgz", - "integrity": "sha512-SiJP75nwB8GhgwLKQfdkSnDufAaCbkZWJqEDlKOUPUvVOplRGnfL+BPQZH5nvq2BYSRXsksXWZ4UHVnQZI/HYA==", + "integrity": "sha1-yGuPB8WrlTn3db2KVJdukm83WcM=", "dev": true, "requires": { "npmlog": "^4.1.2" @@ -7527,7 +7527,7 @@ "@lerna/version": { "version": "3.22.1", "resolved": "https://registry.npmjs.org/@lerna/version/-/version-3.22.1.tgz", - "integrity": "sha512-PSGt/K1hVqreAFoi3zjD0VEDupQ2WZVlVIwesrE5GbrL2BjXowjCsTDPqblahDUPy0hp6h7E2kG855yLTp62+g==", + "integrity": "sha1-mAWpJHpH7mLWuBvZ+l+3KLJLWeI=", "dev": true, "requires": { "@lerna/check-working-tree": "3.16.5", @@ -7561,7 +7561,7 @@ "load-json-file": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "integrity": "sha1-TTweAfocA+p4pgrHr5MsnOU0A/M=", "dev": true, "requires": { "graceful-fs": "^4.1.15", @@ -7580,13 +7580,13 @@ "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "integrity": "sha1-3lUoUaF1nfOo8gZTVEL17E3eq0Q=", "dev": true }, "type-fest": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "integrity": "sha1-Y9ANIE4FlHT+Xht8ARESu9HcKeE=", "dev": true } } @@ -7594,7 +7594,7 @@ "@lerna/write-log-file": { "version": "3.13.0", "resolved": "https://registry.npmjs.org/@lerna/write-log-file/-/write-log-file-3.13.0.tgz", - "integrity": "sha512-RibeMnDPvlL8bFYW5C8cs4mbI3AHfQef73tnJCQ/SgrXZHehmHnsyWUiE7qDQCAo+B1RfTapvSyFF69iPj326A==", + "integrity": "sha1-t42eTPwTSai+ZNkTJMTIGZ6CKiY=", "dev": true, "requires": { "npmlog": "^4.1.2", @@ -7604,7 +7604,7 @@ "write-file-atomic": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "integrity": "sha1-H9Lprh3z51uNjDZ0Q8aS1MqB9IE=", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -7634,7 +7634,7 @@ "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "integrity": "sha1-UkryQNGjYFJ7cwR17PoTRKpUDd4=", "dev": true, "requires": { "call-me-maybe": "^1.0.1", @@ -9610,13 +9610,13 @@ "@octokit/plugin-enterprise-rest": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz", - "integrity": "sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw==", + "integrity": "sha1-4HiWc5YY2rjafUB3xlgAN3X5VDc=", "dev": true }, "@octokit/plugin-paginate-rest": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz", - "integrity": "sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==", + "integrity": "sha1-AEFwrPjCvlNauiZyeGfWkve0iPw=", "dev": true, "requires": { "@octokit/types": "^2.0.1" @@ -9625,7 +9625,7 @@ "@octokit/types": { "version": "2.16.2", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", - "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", + "integrity": "sha1-TF+No8b+zz2hgRrvZ4/aA+2sNdI=", "dev": true, "requires": { "@types/node": ">= 8" @@ -9642,7 +9642,7 @@ "@octokit/plugin-rest-endpoint-methods": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz", - "integrity": "sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==", + "integrity": "sha1-Mojs9UgfaMSU3QYC/BVAeln69h4=", "dev": true, "requires": { "@octokit/types": "^2.0.1", @@ -9652,7 +9652,7 @@ "@octokit/types": { "version": "2.16.2", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", - "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", + "integrity": "sha1-TF+No8b+zz2hgRrvZ4/aA+2sNdI=", "dev": true, "requires": { "@types/node": ">= 8" @@ -9702,7 +9702,7 @@ "@octokit/request-error": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.1.tgz", - "integrity": "sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA==", + "integrity": "sha1-7eBxTHc/MjR1dsJWSdwBOuazGAE=", "dev": true, "requires": { "@octokit/types": "^2.0.0", @@ -9713,7 +9713,7 @@ "@octokit/types": { "version": "2.16.2", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", - "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", + "integrity": "sha1-TF+No8b+zz2hgRrvZ4/aA+2sNdI=", "dev": true, "requires": { "@types/node": ">= 8" @@ -9724,7 +9724,7 @@ "@octokit/rest": { "version": "16.43.2", "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.2.tgz", - "integrity": "sha512-ngDBevLbBTFfrHZeiS7SAMAZ6ssuVmXuya+F/7RaVvlysgGa1JKJkKWY+jV6TCJYcW0OALfJ7nTIGXcBXzycfQ==", + "integrity": "sha1-xTQm8eHRBE3ulnAj4yecUJk92Rs=", "dev": true, "requires": { "@octokit/auth-token": "^2.4.0", @@ -9867,7 +9867,7 @@ "@restart/context": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@restart/context/-/context-2.1.4.tgz", - "integrity": "sha512-INJYZQJP7g+IoDUh/475NlGiTeMfwTXUEr3tmRneckHIxNolGOW9CTq83S8cxq0CgJwwcMzMJFchxvlwe7Rk8Q==" + "integrity": "sha1-qZ2HwpmjTCi9hbtInLB7/SMUnAI=" }, "@restart/hooks": { "version": "0.3.27", @@ -11321,7 +11321,7 @@ "@zkochan/cmd-shim": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz", - "integrity": "sha512-o8l0+x7C7sMZU3v9GuJIAU10qQLtwR1dtRQIOmlNMtyaqhmpXOzx1HWiYoWfmmf9HHZoAkXpc9TM9PQYF9d4Jg==", + "integrity": "sha1-KrjtgfW7VFKoXyV1jrm4aBmC/S4=", "dev": true, "requires": { "is-windows": "^1.0.0", @@ -11775,7 +11775,7 @@ "array-differ": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-2.1.0.tgz", - "integrity": "sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w==", + "integrity": "sha1-S5wcPxS5BnVwgpJXaeirkE9IAbE=", "dev": true }, "array-each": { @@ -12376,7 +12376,7 @@ "babel-jest": { "version": "25.1.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-25.1.0.tgz", - "integrity": "sha512-tz0VxUhhOE2y+g8R2oFrO/2VtVjA1lkJeavlhExuRBg3LdNJY9gwQ+Vcvqt9+cqy71MCTJhewvTB7Qtnnr9SWg==", + "integrity": "sha1-IGCTrDgKS3jEQEoFsydzkSePgPs=", "dev": true, "requires": { "@jest/transform": "^25.1.0", @@ -12422,7 +12422,7 @@ "chalk": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "integrity": "sha1-P3PCv1JlkfV0zEksUeJFY0n4ROQ=", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12432,7 +12432,7 @@ "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12441,19 +12441,19 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", "dev": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -14448,7 +14448,7 @@ "byte-size": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-5.0.1.tgz", - "integrity": "sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw==", + "integrity": "sha1-S2UQOaXs2Wdn5xo9ftOA5IvtQZE=", "dev": true }, "bytes": { @@ -14683,7 +14683,7 @@ "camelcase-keys": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "integrity": "sha1-XnVda6UaoiPsfT1S8ld4IQ+dw8A=", "dev": true, "requires": { "camelcase": "^5.3.1", @@ -14963,6 +14963,15 @@ "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, "cli-spinners": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", @@ -15283,7 +15292,7 @@ "command-exists": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "integrity": "sha1-xQclrzgIyKsCYP1gsB+/oluVT2k=", "dev": true }, "commander": { @@ -15593,7 +15602,7 @@ "conventional-changelog-core": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz", - "integrity": "sha512-LMMX1JlxPIq/Ez5aYAYS5CpuwbOk6QFp8O4HLAcZxe3vxoCtABkhfjetk8IYdRB9CDQGwJFLR3Dr55Za6XKgUQ==", + "integrity": "sha1-sxQQhW9DHIRwhqfctNLKGEp9iPs=", "dev": true, "requires": { "conventional-changelog-writer": "^4.0.6", @@ -15635,7 +15644,7 @@ "through2": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", - "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "integrity": "sha1-mfiJMc/HYex2eLQdXXM2tbage/Q=", "dev": true, "requires": { "inherits": "^2.0.4", @@ -15647,7 +15656,7 @@ "conventional-changelog-preset-loader": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz", - "integrity": "sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==", + "integrity": "sha1-FKhVq7/9WQJ/1gJYHx802YYupEw=", "dev": true }, "conventional-changelog-writer": { @@ -15717,7 +15726,7 @@ "conventional-recommended-bump": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-5.0.1.tgz", - "integrity": "sha512-RVdt0elRcCxL90IrNP0fYCpq1uGt2MALko0eyeQ+zQuDVWtMGAy9ng6yYn3kax42lCj9+XBxQ8ZN6S9bdKxDhQ==", + "integrity": "sha1-WvY5A5R7bgied3Z2ActZLKuxBro=", "dev": true, "requires": { "concat-stream": "^2.0.0", @@ -15750,7 +15759,7 @@ "concat-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", - "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "integrity": "sha1-QUz1r3kKSMYKub5FJ9VtXkETPLE=", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -15774,7 +15783,7 @@ "meow": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "integrity": "sha1-1IWY9vSxRy81v2MXqVlFrONH+XU=", "dev": true, "requires": { "camelcase-keys": "^4.0.0", @@ -15791,7 +15800,7 @@ "minimist-options": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "integrity": "sha1-+6TIGRM54T7PTWG+sD8HAQPz2VQ=", "dev": true, "requires": { "arrify": "^1.0.1", @@ -16566,7 +16575,7 @@ "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "integrity": "sha1-puN0maTZqc+F71hyBE1ikByYia4=", "dev": true }, "deasync": { @@ -16936,7 +16945,7 @@ "deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "integrity": "sha1-Y2jL20Cr8zc7UlrIfkomDDpwCRk=", "dev": true }, "deps-sort": { @@ -18842,7 +18851,7 @@ "express-ws": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/express-ws/-/express-ws-4.0.0.tgz", - "integrity": "sha512-KEyUw8AwRET2iFjFsI1EJQrJ/fHeGiJtgpYgEWG3yDv4l/To/m3a2GaYfeGyB3lsWdvbesjF5XCMx+SVBgAAYw==", + "integrity": "sha1-2r2NyXRRZBiQKkH+bjDtlJtNNsQ=", "requires": { "ws": "^5.2.0" }, @@ -20818,7 +20827,7 @@ "genfun": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", - "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==", + "integrity": "sha1-ndlxCgaQClxKW/V6yl2k5S/nZTc=", "dev": true }, "gensync": { @@ -21045,7 +21054,7 @@ "get-port": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz", - "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==", + "integrity": "sha1-43Nosehjt2KcQ8WjI2Jflc8ksRk=", "dev": true }, "get-stdin": { @@ -21138,7 +21147,7 @@ "git-raw-commits": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.0.tgz", - "integrity": "sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg==", + "integrity": "sha1-2Srd90RAwUvMXIPszj+3+KeRGLU=", "dev": true, "requires": { "dargs": "^4.0.1", @@ -21180,7 +21189,7 @@ "meow": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "integrity": "sha1-1IWY9vSxRy81v2MXqVlFrONH+XU=", "dev": true, "requires": { "camelcase-keys": "^4.0.0", @@ -21197,7 +21206,7 @@ "minimist-options": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "integrity": "sha1-+6TIGRM54T7PTWG+sD8HAQPz2VQ=", "dev": true, "requires": { "arrify": "^1.0.1", @@ -21285,7 +21294,7 @@ "git-semver-tags": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-2.0.3.tgz", - "integrity": "sha512-tj4FD4ww2RX2ae//jSrXZzrocla9db5h0V7ikPl1P/WwoZar9epdUhwR7XHXSgc+ZkNq72BEEerqQuicoEQfzA==", + "integrity": "sha1-SJiKcYrPWTgA+ZYiqVKnfEBb+jQ=", "dev": true, "requires": { "meow": "^4.0.0", @@ -21324,7 +21333,7 @@ "meow": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "integrity": "sha1-1IWY9vSxRy81v2MXqVlFrONH+XU=", "dev": true, "requires": { "camelcase-keys": "^4.0.0", @@ -21341,7 +21350,7 @@ "minimist-options": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "integrity": "sha1-+6TIGRM54T7PTWG+sD8HAQPz2VQ=", "dev": true, "requires": { "arrify": "^1.0.1", @@ -22077,7 +22086,7 @@ "hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "integrity": "sha1-HG7aXBaFxjlCdm15u0Cudzzs2IM=", "dev": true }, "harmony-reflect": { @@ -22730,7 +22739,7 @@ "init-package-json": { "version": "1.10.3", "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.3.tgz", - "integrity": "sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw==", + "integrity": "sha1-Rf/i9hCoyhNPK9HbVjeyNQcPbL4=", "dev": true, "requires": { "glob": "^7.1.1", @@ -22746,7 +22755,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -22758,7 +22767,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -29199,7 +29208,7 @@ "lerna": { "version": "3.22.1", "resolved": "https://registry.npmjs.org/lerna/-/lerna-3.22.1.tgz", - "integrity": "sha512-vk1lfVRFm+UuEFA7wkLKeSF7Iz13W+N/vFd48aW2yuS7Kv0RbNm2/qcDPV863056LMfkRlsEe+QYOw3palj5Lg==", + "integrity": "sha1-ggJ6w9qcYn/YvwLM/v+AapjmW2I=", "dev": true, "requires": { "@lerna/add": "3.21.0", @@ -29662,7 +29671,7 @@ "lodash.template": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", - "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "integrity": "sha1-+XYZXPPzR9DV9SSDVp/oAxzM6Ks=", "dev": true, "requires": { "lodash._reinterpolate": "^3.0.0", @@ -29672,7 +29681,7 @@ "lodash.templatesettings": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", - "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "integrity": "sha1-5IExDwSdPPbUfpEq0JMTsVTw+zM=", "dev": true, "requires": { "lodash._reinterpolate": "^3.0.0" @@ -29685,12 +29694,12 @@ "dev": true }, "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", "dev": true, "requires": { - "chalk": "^2.4.2" + "chalk": "^2.0.1" } }, "logform": { @@ -30357,7 +30366,7 @@ "min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "integrity": "sha1-pj9oFnOzBXH76LwlaGrnRu76mGk=", "dev": true }, "mini-css-extract-plugin": { @@ -30465,7 +30474,7 @@ "minimist-options": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "integrity": "sha1-wGVXE8U6ii69d/+iR9NCxA8BBhk=", "dev": true, "requires": { "arrify": "^1.0.1", @@ -31272,7 +31281,7 @@ "modify-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", - "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", + "integrity": "sha1-s5OfpgVUZHTj4+PGPWS9Q7TuYCI=", "dev": true }, "module-deps": { @@ -31619,7 +31628,7 @@ "multimatch": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-3.0.0.tgz", - "integrity": "sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA==", + "integrity": "sha1-DiU0zGvCONmrZ+G5zV/Nhabb9ws=", "dev": true, "requires": { "array-differ": "^2.0.3", @@ -31666,7 +31675,7 @@ "mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "integrity": "sha1-lQCAV6Vsr63CvGPd5/n/aVWUjjI=", "dev": true, "requires": { "any-promise": "^1.0.0", @@ -32052,15 +32061,6 @@ "path-exists": "^3.0.0" } }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, "mkdirp": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", @@ -32348,7 +32348,7 @@ "node-fetch-npm": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz", - "integrity": "sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg==", + "integrity": "sha1-ZQfQ4XqewL477FFpWKSXzsVL9aQ=", "dev": true, "requires": { "encoding": "^0.1.11", @@ -35386,7 +35386,7 @@ "npm-lifecycle": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz", - "integrity": "sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g==", + "integrity": "sha1-mILTZCuMgsgVeCoS5qG/7tACYwk=", "dev": true, "requires": { "byline": "^5.0.0", @@ -35402,7 +35402,7 @@ "node-gyp": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-5.1.1.tgz", - "integrity": "sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw==", + "integrity": "sha1-65Ffe2Mck30oLjOu1Ey3oCX2Kj4=", "dev": true, "requires": { "env-paths": "^2.2.0", @@ -35421,7 +35421,7 @@ "nopt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "integrity": "sha1-o3XK2dAv2SEnjZVMIlTVqlfhXkg=", "dev": true, "requires": { "abbrev": "1", @@ -35431,7 +35431,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true } } @@ -37523,7 +37523,7 @@ "octokit-pagination-methods": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz", - "integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==", + "integrity": "sha1-z0cu3J1VEFX573P25CtNu0yAvqQ=", "dev": true }, "on-finished": { @@ -37742,6 +37742,23 @@ "fn.name": "1.x.x" } }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + }, + "dependencies": { + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + } + } + }, "open": { "version": "7.4.2", "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", @@ -37845,15 +37862,6 @@ "supports-color": "^7.1.0" } }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -37875,29 +37883,65 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", "dev": true, "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "chalk": "^2.4.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "supports-color": { @@ -37985,7 +38029,7 @@ "os-name": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz", - "integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==", + "integrity": "sha1-3sGdlmKW4c1i1wGlpm7h3ernCAE=", "dev": true, "requires": { "macos-release": "^2.2.0", @@ -39626,7 +39670,7 @@ "prop-types-extra": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/prop-types-extra/-/prop-types-extra-1.1.1.tgz", - "integrity": "sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew==", + "integrity": "sha1-WMO3TL+7ldMEYll1qi8ISDKaAQs=", "requires": { "react-is": "^16.3.2", "warning": "^4.0.0" @@ -39653,7 +39697,7 @@ "protoduck": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz", - "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", + "integrity": "sha1-A8NlnKGAB7aaUP2Cp+vMUWJhFR8=", "dev": true, "requires": { "genfun": "^5.0.0" @@ -39865,7 +39909,7 @@ "quick-lru": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "integrity": "sha1-W4h48ROlgheEjGSCAmxz4bpXcn8=", "dev": true }, "raf-schd": { @@ -40048,7 +40092,7 @@ "react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + "integrity": "sha1-TxonOv38jzSIqMUWv9p4+HI1I2I=" }, "react-overlays": { "version": "5.1.1", @@ -40156,7 +40200,7 @@ "read-cmd-shim": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz", - "integrity": "sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA==", + "integrity": "sha1-h+Q+ulAJi6WjLQzrWDq45DuWHBY=", "dev": true, "requires": { "graceful-fs": "^4.1.2" @@ -40228,7 +40272,7 @@ "read-package-tree": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz", - "integrity": "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==", + "integrity": "sha1-oyy2TH8x64pvMe8G+c7fdAaP5jY=", "dev": true, "requires": { "read-package-json": "^2.0.0", @@ -40417,7 +40461,7 @@ "redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "integrity": "sha1-5Ve3mYMWu1PJ8fVvpiY1LGljBZ8=", "dev": true, "requires": { "indent-string": "^4.0.0", @@ -40788,6 +40832,16 @@ "lowercase-keys": "^1.0.0" } }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, "resumer": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", @@ -41617,6 +41671,28 @@ "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + } } }, "decompress-response": { @@ -41634,6 +41710,16 @@ "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", "dev": true }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "fs-extra": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", @@ -41734,6 +41820,43 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, "responselike": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", @@ -41758,6 +41881,28 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -42357,7 +42502,7 @@ "solc": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.4.tgz", - "integrity": "sha512-IVLqAfUkJqgTS0JIgFPeC50ehUeBXu2eE+iU+rqb6UeOyf6w/BB/EsNcTSTpjtUti8BTG/sCd2qVhrWVYy7p0g==", + "integrity": "sha1-nF7YGuBpLj5hTkfNW1ALD5SFuY0=", "dev": true, "requires": { "command-exists": "^1.2.8", @@ -42374,7 +42519,7 @@ "commander": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", + "integrity": "sha1-aDfD+2d62ZM9HPukLdFNURfWs54=", "dev": true }, "fs-extra": { @@ -42402,7 +42547,7 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", "dev": true }, "tmp": { @@ -42583,7 +42728,7 @@ "split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "integrity": "sha1-YFvZvjA6pZ+zX5Ip++oN3snqB9k=", "dev": true, "requires": { "through": "2" @@ -43068,7 +43213,7 @@ "strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "integrity": "sha1-wy4c7pQLazQyx3G8LFS8znPNMAE=", "dev": true, "requires": { "min-indent": "^1.0.0" @@ -43082,7 +43227,7 @@ "strong-log-transformer": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz", - "integrity": "sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA==", + "integrity": "sha1-D17XjTJeBCGsb5D38Q5pHWrjrhA=", "dev": true, "requires": { "duplexer": "^0.1.1", @@ -43927,7 +44072,7 @@ "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", "dev": true, "requires": { "pify": "^3.0.0" @@ -44179,7 +44324,7 @@ "text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", - "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "integrity": "sha1-GFPkX+45yUXOb2w2stZZtaq8KiY=", "dev": true }, "text-hex": { @@ -44196,7 +44341,7 @@ "thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "integrity": "sha1-iTLmhqQGYDigFt2eLKRq3Zg4qV8=", "dev": true, "requires": { "any-promise": "^1.0.0" @@ -45276,7 +45421,7 @@ "universal-user-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz", - "integrity": "sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==", + "integrity": "sha1-/Y1st3OmeacJ6WfvgoijH8wD5Vc=", "dev": true, "requires": { "os-name": "^3.1.0" @@ -45915,7 +46060,7 @@ "warning": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", - "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "integrity": "sha1-Fungd+uKhtavfWSqHgX9hbRnjKM=", "requires": { "loose-envify": "^1.0.0" } @@ -47413,7 +47558,7 @@ "write-json-file": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-3.2.0.tgz", - "integrity": "sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ==", + "integrity": "sha1-Zbvcns2KFFjhWVJ3DMut/P9f5io=", "dev": true, "requires": { "detect-indent": "^5.0.0", @@ -47436,7 +47581,7 @@ "write-file-atomic": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "integrity": "sha1-H9Lprh3z51uNjDZ0Q8aS1MqB9IE=", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -47449,7 +47594,7 @@ "write-pkg": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", - "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", + "integrity": "sha1-DheP6Xgg04mokovHlTXb5ows/yE=", "dev": true, "requires": { "sort-keys": "^2.0.0", @@ -47459,7 +47604,7 @@ "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", "dev": true, "requires": { "pify": "^3.0.0" @@ -47483,7 +47628,7 @@ "write-file-atomic": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "integrity": "sha1-H9Lprh3z51uNjDZ0Q8aS1MqB9IE=", "dev": true, "requires": { "graceful-fs": "^4.1.11", diff --git a/package.json b/package.json index 16f81f670b..dc47278bd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "remix-project", - "version": "0.21.2-dev", + "version": "0.22.0-dev", "license": "MIT", "description": "Ethereum Remix Monorepo", "keywords": [ @@ -45,7 +45,7 @@ "workspace-schematic": "nx workspace-schematic", "dep-graph": "nx dep-graph", "help": "nx help", - "lint:libs": "nx run-many --target=lint --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd,remix-ui-tree-view,remix-ui-modal-dialog,remix-ui-toaster,remix-ui-helper,remix-ui-debugger-ui,remix-ui-workspace,remix-ui-static-analyser,remix-ui-checkbox,remix-ui-settings,remix-core-plugin,remix-ui-renderer,remix-ui-publish-to-storage,remix-ui-solidity-compiler,solidity-unit-testing,remix-ui-plugin-manager,remix-ui-terminal,remix-ui-editor,remix-ui-app,remix-ui-tabs,remix-ui-panel,remix-ui-run-tab,remix-ui-permission-handle", + "lint:libs": "nx run-many --target=lint --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd,remix-ui-tree-view,remix-ui-modal-dialog,remix-ui-toaster,remix-ui-helper,remix-ui-debugger-ui,remix-ui-workspace,remix-ui-static-analyser,remix-ui-checkbox,remix-ui-settings,remix-core-plugin,remix-ui-renderer,remix-ui-publish-to-storage,remix-ui-solidity-compiler,solidity-unit-testing,remix-ui-plugin-manager,remix-ui-terminal,remix-ui-editor,remix-ui-app,remix-ui-tabs,remix-ui-panel,remix-ui-run-tab,remix-ui-permission-handler", "build:libs": "nx run-many --target=build --parallel=false --with-deps=true --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd", "test:libs": "nx run-many --target=test --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd", "publish:libs": "npm run build:libs && lerna publish --skip-git && npm run bumpVersion:libs", @@ -95,6 +95,7 @@ "nightwatch_local_url": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/url.test.js --env=chrome", "nightwatch_local_verticalIconscontextmenu": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.js --env=chrome", "nightwatch_local_pluginApi": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/plugin_api_*.js --env=chrome", + "nightwatch_local_migrate_filesystem": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.js --env=chrome", "onchange": "onchange apps/remix-ide/build/app.js -- npm-run-all lint", "remixd": "nx build remixd && chmod +x dist/libs/remixd/src/bin/remixd.js && dist/libs/remixd/src/bin/remixd.js -s ./apps/remix-ide/contracts --remix-ide http://127.0.0.1:8080", "selenium": "selenium-standalone start", diff --git a/workspace.json b/workspace.json index 8e78b40751..dc00725dc8 100644 --- a/workspace.json +++ b/workspace.json @@ -1196,11 +1196,6 @@ "linter": "eslint" } }, - "@nrwl/cypress": { - "cypress-project": { - "linter": "eslint" - } - }, "@nrwl/react": { "application": { "style": "css",