From fab044ed06746fdf77ad50c35ee5b577fb7ca341 Mon Sep 17 00:00:00 2001 From: mbnuqw Date: Wed, 24 Mar 2021 22:01:44 +0500 Subject: [PATCH] Revert unfinished changes --- .eslintrc.json | 35 +- addon/actions.js | 2 - addon/actions/logs.js | 67 --- addon/actions/misc.js | 4 - addon/actions/msg.js | 10 +- addon/actions/snapshots.js | 2 - addon/actions/windows.js | 2 - addon/background.js | 3 - package-lock.json | 534 +++++++++--------- package.json | 5 +- src/actions/containers.js | 1 - src/actions/logs.ts | 65 --- src/actions/panels.js | 1 - src/actions/settings.js | 2 - src/actions/styles.js | 3 - src/page.settings/actions.js | 2 - .../components/settings.help.vue | 6 - src/sidebar/actions.js | 2 - src/sidebar/actions/bookmarks.js | 1 - src/sidebar/actions/misc.js | 2 - src/sidebar/actions/panels.js | 7 - src/sidebar/actions/tabs.js | 11 - src/sidebar/handlers/tabs.js | 6 - src/sidebar/sidebar.js | 6 +- src/types/web-ext.d.ts | 22 - tsconfig.json | 11 - 26 files changed, 276 insertions(+), 536 deletions(-) delete mode 100644 addon/actions/logs.js delete mode 100644 src/actions/logs.ts delete mode 100644 src/types/web-ext.d.ts delete mode 100644 tsconfig.json diff --git a/.eslintrc.json b/.eslintrc.json index b248554e3..a336b8c33 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,11 +1,11 @@ { "env": { "browser": true, - "es2020": true + "es6": true }, "extends": ["eslint:recommended", "plugin:vue/recommended", "plugin:prettier/recommended"], "parserOptions": { - "ecmaVersion": 2020, + "ecmaVersion": 2018, "sourceType": "module" }, "rules": { @@ -42,34 +42,5 @@ "require": true, "xdescribe": true, "xit": true - }, - "plugins": ["@typescript-eslint"], - "overrides": [ - { - "files": ["src/**/*.ts"], - - "extends": [ - "eslint:recommended", - "plugin:vue/recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking", - "prettier/@typescript-eslint", - "plugin:prettier/recommended" - ], - - "parser": "vue-eslint-parser", - "parserOptions": { - "parser": "@typescript-eslint/parser", - "ecmaVersion": 2020, - "sourceType": "module", - "project": "tsconfig.json", - "tsconfigRootDir": "." - }, - "rules": { - "@typescript-eslint/no-namespace": "off" - }, - "plugins": [] - } - ] + } } diff --git a/addon/actions.js b/addon/actions.js index f015f7c0f..d11e8dd9d 100644 --- a/addon/actions.js +++ b/addon/actions.js @@ -6,7 +6,6 @@ import MsgActions from './actions/msg.js' import ProxyActions from './actions/proxy.js' import FaviconsActions from './actions/favicons.js' import StorageActions from './actions/storage.js' -import LogsActions from './actions/logs.js' import MiscActions from './actions/misc.js' const Actions = { @@ -18,7 +17,6 @@ const Actions = { ...ProxyActions, ...FaviconsActions, ...StorageActions, - ...LogsActions, ...MiscActions, } diff --git a/addon/actions/logs.js b/addon/actions/logs.js deleted file mode 100644 index caa6fafff..000000000 --- a/addon/actions/logs.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Log info - */ -function infoLog(msg) { - if (!this._logs) this._logs = [] - this._logs.push(`${Date.now()} [INFO::background] ${msg}`) -} - -/** - * Log warn - */ -function warnLog(msg) { - if (!this._logs) this._logs = [] - this._logs.push(`${Date.now()} [WARN::background] ${msg}`) -} - -/** - * Log err - */ -function errLog(msg) { - if (!this._logs) this._logs = [] - this._logs.push(`${Date.now()} [ERR::background] ${msg}`) -} - -/** - * Writes logs - */ -function log(logs) { - if (!this._logs) this._logs = [] - this._logs.push(...logs) - - if (this._logs.length > 123) { - browser.storage.local.set({ logs: this._logs }) - this._logs = [] - } -} - -/** - * Returns all logs - */ -async function getLogs() { - let storage = { logs: [] } - try { - storage = await browser.storage.local.get(storage) - } catch (err) { - // ... - } - - let logs = storage.logs - - if (this._logs) logs = logs.concat(this._logs) - - return logs -} - -function initLogs() { - window.getLogs = this.actions.getLogs -} - -export default { - infoLog, - warnLog, - errLog, - log, - getLogs, - initLogs, -} diff --git a/addon/actions/misc.js b/addon/actions/misc.js index e83336b7b..8e1468c16 100644 --- a/addon/actions/misc.js +++ b/addon/actions/misc.js @@ -8,8 +8,6 @@ function initToolbarButton() { if (info && info.button === 1) return browser.runtime.openOptionsPage() else browser.sidebarAction.open() }) - - this.actions.infoLog('Toolbar button initialized') } /** @@ -36,8 +34,6 @@ async function loadPermissions() { if (c.userAgentActive) c.userAgentActive = false } } - - this.actions.infoLog('Permissions loaded') } function onMenuHidden() { diff --git a/addon/actions/msg.js b/addon/actions/msg.js index 189c6081c..68e032e43 100644 --- a/addon/actions/msg.js +++ b/addon/actions/msg.js @@ -49,8 +49,6 @@ function initMessaging() { } firstSidebarInitHandlers = null } - - this.actions.infoLog(`Sidebar (win: ${info.windowId}) connected`) } // Handle disconnect @@ -59,16 +57,12 @@ function initMessaging() { let targetPort = connectedSidebars[info.windowId] if (info.instanceType === 'sidebar' && targetPort) { let window = this.windows[info.windowId] + delete window.sidebarPort - if (window) { - delete window.sidebarPort - if (this.settings.markWindow) browser.windows.update(info.windowId, { titlePreface: '' }) - } + if (this.settings.markWindow) browser.windows.update(info.windowId, { titlePreface: '' }) targetPort.onMessage.removeListener(onSidebarMsg) delete connectedSidebars[info.windowId] - - this.actions.infoLog(`Sidebar (win: ${info.windowId}) disconnected`) } }) }) diff --git a/addon/actions/snapshots.js b/addon/actions/snapshots.js index e1ba34a0e..bfa4e48ef 100644 --- a/addon/actions/snapshots.js +++ b/addon/actions/snapshots.js @@ -100,8 +100,6 @@ async function scheduleSnapshots() { else nextTimeout = interval - elapsed Actions.scheduleNextSnapshot(nextTimeout) - - Actions.infoLog('Auto snapshots scheduled') } /** diff --git a/addon/actions/windows.js b/addon/actions/windows.js index d14897b82..be281e0c1 100644 --- a/addon/actions/windows.js +++ b/addon/actions/windows.js @@ -17,7 +17,6 @@ async function getWindows() { async function onWindowCreated(window) { this.windows[window.id] = window window.tabs = await browser.tabs.query({ windowId: window.id }) - this.actions.infoLog('Window created: ' + window.id) } /** @@ -25,7 +24,6 @@ async function onWindowCreated(window) { */ function onWindowRemoved(windowId) { delete this.windows[windowId] - this.actions.infoLog('Window removed: ' + windowId) } function setupWindowsListeners() { diff --git a/addon/background.js b/addon/background.js index a6b9ccebd..4cab01df1 100644 --- a/addon/background.js +++ b/addon/background.js @@ -9,9 +9,6 @@ void (async function main() { state.images = {} state.windows = {} - Actions.initLogs() - Actions.infoLog('Initialization start') - // Init first-need stuff Actions.initToolbarButton() Actions.initGlobalMessaging() diff --git a/package-lock.json b/package-lock.json index b02280173..a6d77ff32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "sidebery", - "version": "4.9.0", + "version": "4.8.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1714,6 +1714,12 @@ "defer-to-connect": "^1.0.1" } }, + "@types/babel-types": { + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.7.tgz", + "integrity": "sha512-dBtBbrc+qTHy1WdfHYjBwRln4+LWqASWakLHsWHR2NWHIFkv4W3O070IGoGLEBrJBvct3r0L1BUPuvURi7kYUQ==", + "dev": true + }, "@types/babel__core": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.7.tgz", @@ -1755,18 +1761,21 @@ "@babel/types": "^7.3.0" } }, + "@types/babylon": { + "version": "6.16.5", + "resolved": "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.5.tgz", + "integrity": "sha512-xH2e58elpj1X4ynnKp9qSnWlsRTIs6n3tgLGNfwAGHwePw0mulHQllV34n0T25uYSu1k0hRKkWXF890B1yS47w==", + "dev": true, + "requires": { + "@types/babel-types": "*" + } + }, "@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", "dev": true }, - "@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true - }, "@types/istanbul-lib-coverage": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", @@ -1792,12 +1801,6 @@ "@types/istanbul-lib-report": "*" } }, - "@types/json-schema": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.5.tgz", - "integrity": "sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==", - "dev": true - }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -1849,91 +1852,6 @@ "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==", "dev": true }, - "@typescript-eslint/eslint-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.2.0.tgz", - "integrity": "sha512-t9RTk/GyYilIXt6BmZurhBzuMT9kLKw3fQoJtK9ayv0tXTlznXEAnx07sCLXdkN3/tZDep1s1CEV95CWuARYWA==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "3.2.0", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - }, - "dependencies": { - "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true - }, - "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true - } - } - }, - "@typescript-eslint/experimental-utils": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.2.0.tgz", - "integrity": "sha512-UbJBsk+xO9dIFKtj16+m42EvUvsjZbbgQ2O5xSTSfVT1Z3yGkL90DVu0Hd3029FZ5/uBgl+F3Vo8FAcEcqc6aQ==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "3.2.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - } - } - }, - "@typescript-eslint/parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.2.0.tgz", - "integrity": "sha512-Vhu+wwdevDLVDjK1lIcoD6ZbuOa93fzqszkaO3iCnmrScmKwyW/AGkzc2UvfE5TCoCXqq7Jyt6SOXjsIlpqF4A==", - "dev": true, - "requires": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.2.0", - "@typescript-eslint/typescript-estree": "3.2.0", - "eslint-visitor-keys": "^1.1.0" - } - }, - "@typescript-eslint/typescript-estree": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.2.0.tgz", - "integrity": "sha512-uh+Y2QO7dxNrdLw7mVnjUqkwO/InxEqwN0wF+Za6eo3coxls9aH9kQ/5rSvW2GcNanebRTmsT5w1/92lAOb1bA==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "eslint-visitor-keys": "^1.1.0", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - }, - "dependencies": { - "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true - } - } - }, "@vue/component-compiler-utils": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.1.2.tgz", @@ -2565,6 +2483,28 @@ "json-merge-patch": "^0.2.3" } }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "alphanum-sort": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", @@ -2842,12 +2782,6 @@ } } }, - "assert-never": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/assert-never/-/assert-never-1.2.1.tgz", - "integrity": "sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw==", - "dev": true - }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", @@ -3137,39 +3071,11 @@ } } }, - "babel-walk": { - "version": "3.0.0-canary-5", - "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz", - "integrity": "sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==", - "dev": true, - "requires": { - "@babel/types": "^7.9.6" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true - }, - "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", - "to-fast-properties": "^2.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - } - } + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true }, "babylon-walk": { "version": "1.0.2", @@ -3742,6 +3648,16 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -4618,6 +4534,23 @@ } } }, + "clean-css": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "dev": true, + "requires": { + "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "cli-boxes": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", @@ -4893,13 +4826,15 @@ } }, "constantinople": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz", - "integrity": "sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.2.tgz", + "integrity": "sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw==", "dev": true, "requires": { - "@babel/parser": "^7.6.0", - "@babel/types": "^7.6.1" + "@types/babel-types": "^7.0.0", + "@types/babylon": "^6.16.2", + "babel-types": "^6.26.0", + "babylon": "^6.18.0" } }, "constants-browserify": { @@ -8242,13 +8177,21 @@ "dev": true }, "is-expression": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-4.0.0.tgz", - "integrity": "sha512-zMIXX63sxzG3XrkHkrAPvm/OVZVSCPNkwMHU8oTX7/U3AL78I0QXCEICXUM13BIa8TYGZ68PiTKfQz3yaTNr4A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-3.0.0.tgz", + "integrity": "sha1-Oayqa+f9HzRx3ELHQW5hwkMXrJ8=", "dev": true, "requires": { - "acorn": "^7.1.1", - "object-assign": "^4.1.1" + "acorn": "~4.0.2", + "object-assign": "^4.0.1" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + } } }, "is-extendable": { @@ -10112,6 +10055,12 @@ "package-json": "^6.3.0" } }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, "lazystream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", @@ -10313,6 +10262,12 @@ "@sinonjs/commons": "^1.7.0" } }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -12435,127 +12390,129 @@ } }, "pug": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/pug/-/pug-3.0.1.tgz", - "integrity": "sha512-9v1o2yXMfSKJy2PykKyWUhpgx9Pf9D/UlPgIs2pTTxR6DQZ0oivy4I9f8PlWXRY4sjIhDU4TMJ7hQmYnNJc2bw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pug/-/pug-2.0.4.tgz", + "integrity": "sha512-XhoaDlvi6NIzL49nu094R2NA6P37ijtgMDuWE+ofekDChvfKnzFal60bhSdiy8y2PBO6fmz3oMEIcfpBVRUdvw==", "dev": true, "requires": { - "pug-code-gen": "^3.0.2", - "pug-filters": "^4.0.0", - "pug-lexer": "^5.0.0", - "pug-linker": "^4.0.0", - "pug-load": "^3.0.0", - "pug-parser": "^6.0.0", - "pug-runtime": "^3.0.0", - "pug-strip-comments": "^2.0.0" + "pug-code-gen": "^2.0.2", + "pug-filters": "^3.1.1", + "pug-lexer": "^4.1.0", + "pug-linker": "^3.0.6", + "pug-load": "^2.0.12", + "pug-parser": "^5.0.1", + "pug-runtime": "^2.0.5", + "pug-strip-comments": "^1.0.4" } }, "pug-attrs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-3.0.0.tgz", - "integrity": "sha512-azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-2.0.4.tgz", + "integrity": "sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ==", "dev": true, "requires": { - "constantinople": "^4.0.1", - "js-stringify": "^1.0.2", - "pug-runtime": "^3.0.0" + "constantinople": "^3.0.1", + "js-stringify": "^1.0.1", + "pug-runtime": "^2.0.5" } }, "pug-code-gen": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.2.tgz", - "integrity": "sha512-nJMhW16MbiGRiyR4miDTQMRWDgKplnHyeLvioEJYbk1RsPI3FuA3saEP8uwnTb2nTJEKBU90NFVWJBk4OU5qyg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-2.0.2.tgz", + "integrity": "sha512-kROFWv/AHx/9CRgoGJeRSm+4mLWchbgpRzTEn8XCiwwOy6Vh0gAClS8Vh5TEJ9DBjaP8wCjS3J6HKsEsYdvaCw==", "dev": true, "requires": { - "constantinople": "^4.0.1", + "constantinople": "^3.1.2", "doctypes": "^1.1.0", - "js-stringify": "^1.0.2", - "pug-attrs": "^3.0.0", - "pug-error": "^2.0.0", - "pug-runtime": "^3.0.0", - "void-elements": "^3.1.0", - "with": "^7.0.0" + "js-stringify": "^1.0.1", + "pug-attrs": "^2.0.4", + "pug-error": "^1.3.3", + "pug-runtime": "^2.0.5", + "void-elements": "^2.0.1", + "with": "^5.0.0" } }, "pug-error": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-2.0.0.tgz", - "integrity": "sha512-sjiUsi9M4RAGHktC1drQfCr5C5eriu24Lfbt4s+7SykztEOwVZtbFk1RRq0tzLxcMxMYTBR+zMQaG07J/btayQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-1.3.3.tgz", + "integrity": "sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ==", "dev": true }, "pug-filters": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-4.0.0.tgz", - "integrity": "sha512-yeNFtq5Yxmfz0f9z2rMXGw/8/4i1cCFecw/Q7+D0V2DdtII5UvqE12VaZ2AY7ri6o5RNXiweGH79OCq+2RQU4A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-3.1.1.tgz", + "integrity": "sha512-lFfjNyGEyVWC4BwX0WyvkoWLapI5xHSM3xZJFUhx4JM4XyyRdO8Aucc6pCygnqV2uSgJFaJWW3Ft1wCWSoQkQg==", "dev": true, "requires": { - "constantinople": "^4.0.1", + "clean-css": "^4.1.11", + "constantinople": "^3.0.1", "jstransformer": "1.0.0", - "pug-error": "^2.0.0", - "pug-walk": "^2.0.0", - "resolve": "^1.15.1" + "pug-error": "^1.3.3", + "pug-walk": "^1.1.8", + "resolve": "^1.1.6", + "uglify-js": "^2.6.1" } }, "pug-lexer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-5.0.1.tgz", - "integrity": "sha512-0I6C62+keXlZPZkOJeVam9aBLVP2EnbeDw3An+k0/QlqdwH6rv8284nko14Na7c0TtqtogfWXcRoFE4O4Ff20w==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-4.1.0.tgz", + "integrity": "sha512-i55yzEBtjm0mlplW4LoANq7k3S8gDdfC6+LThGEvsK4FuobcKfDAwt6V4jKPH9RtiE3a2Akfg5UpafZ1OksaPA==", "dev": true, "requires": { - "character-parser": "^2.2.0", - "is-expression": "^4.0.0", - "pug-error": "^2.0.0" + "character-parser": "^2.1.1", + "is-expression": "^3.0.0", + "pug-error": "^1.3.3" } }, "pug-linker": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-4.0.0.tgz", - "integrity": "sha512-gjD1yzp0yxbQqnzBAdlhbgoJL5qIFJw78juN1NpTLt/mfPJ5VgC4BvkoD3G23qKzJtIIXBbcCt6FioLSFLOHdw==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-3.0.6.tgz", + "integrity": "sha512-bagfuHttfQOpANGy1Y6NJ+0mNb7dD2MswFG2ZKj22s8g0wVsojpRlqveEQHmgXXcfROB2RT6oqbPYr9EN2ZWzg==", "dev": true, "requires": { - "pug-error": "^2.0.0", - "pug-walk": "^2.0.0" + "pug-error": "^1.3.3", + "pug-walk": "^1.1.8" } }, "pug-load": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-3.0.0.tgz", - "integrity": "sha512-OCjTEnhLWZBvS4zni/WUMjH2YSUosnsmjGBB1An7CsKQarYSWQ0GCVyd4eQPMFJqZ8w9xgs01QdiZXKVjk92EQ==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-2.0.12.tgz", + "integrity": "sha512-UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg==", "dev": true, "requires": { - "object-assign": "^4.1.1", - "pug-walk": "^2.0.0" + "object-assign": "^4.1.0", + "pug-walk": "^1.1.8" } }, "pug-parser": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-6.0.0.tgz", - "integrity": "sha512-ukiYM/9cH6Cml+AOl5kETtM9NR3WulyVP2y4HOU45DyMim1IeP/OOiyEWRr6qk5I5klpsBnbuHpwKmTx6WURnw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-5.0.1.tgz", + "integrity": "sha512-nGHqK+w07p5/PsPIyzkTQfzlYfuqoiGjaoqHv1LjOv2ZLXmGX1O+4Vcvps+P4LhxZ3drYSljjq4b+Naid126wA==", "dev": true, "requires": { - "pug-error": "^2.0.0", - "token-stream": "1.0.0" + "pug-error": "^1.3.3", + "token-stream": "0.0.1" } }, "pug-runtime": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-3.0.1.tgz", - "integrity": "sha512-L50zbvrQ35TkpHwv0G6aLSuueDRwc/97XdY8kL3tOT0FmhgG7UypU3VztfV/LATAvmUfYi4wNxSajhSAeNN+Kg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.5.tgz", + "integrity": "sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw==", "dev": true }, "pug-strip-comments": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-2.0.0.tgz", - "integrity": "sha512-zo8DsDpH7eTkPHCXFeAk1xZXJbyoTfdPlNR0bK7rpOMuhBYb0f5qUVCO1xlsitYd3w5FQTK7zpNVKb3rZoUrrQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-1.0.4.tgz", + "integrity": "sha512-i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw==", "dev": true, "requires": { - "pug-error": "^2.0.0" + "pug-error": "^1.3.3" } }, "pug-walk": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-2.0.0.tgz", - "integrity": "sha512-yYELe9Q5q9IQhuvqsZNwA5hfPkMJ8u92bQLIMcsMxf/VADjNtEYptU+inlufAFYcWdHlwNfZOEnOOQrZrcyJCQ==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.8.tgz", + "integrity": "sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==", "dev": true }, "pump": { @@ -13385,6 +13342,15 @@ "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", "dev": true }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "^0.1.1" + } + }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -14953,9 +14919,9 @@ "dev": true }, "token-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-1.0.0.tgz", - "integrity": "sha1-zCAOqyYT9BZtJ/+a/HylbUnfbrQ=", + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-0.0.1.tgz", + "integrity": "sha1-zu78cXp2xDFvEm0LnbqlXX598Bo=", "dev": true }, "tosource": { @@ -14996,15 +14962,6 @@ "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", "dev": true }, - "tsutils": { - "version": "3.17.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", - "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -15068,11 +15025,54 @@ "is-typedarray": "^1.0.0" } }, - "typescript": { - "version": "3.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", - "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", - "dev": true + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true }, "uncss": { "version": "0.17.3", @@ -15537,9 +15537,9 @@ "dev": true }, "void-elements": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", - "integrity": "sha1-YU9/v42AHwu18GYfWy9XhXUOTwk=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", "dev": true }, "vue": { @@ -15956,6 +15956,12 @@ "string-width": "^4.0.0" } }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, "winreg": { "version": "0.0.12", "resolved": "https://registry.npmjs.org/winreg/-/winreg-0.0.12.tgz", @@ -15963,45 +15969,37 @@ "dev": true }, "with": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz", - "integrity": "sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/with/-/with-5.1.1.tgz", + "integrity": "sha1-+k2qktrzLE6pTtRTyB8EaGtXXf4=", "dev": true, "requires": { - "@babel/parser": "^7.9.6", - "@babel/types": "^7.9.6", - "assert-never": "^1.2.1", - "babel-walk": "3.0.0-canary-5" + "acorn": "^3.1.0", + "acorn-globals": "^3.0.0" }, "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true - }, - "@babel/parser": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz", - "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==", + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", "dev": true }, - "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "acorn-globals": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz", + "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", - "to-fast-properties": "^2.0.0" + "acorn": "^4.0.4" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + } } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true } } }, @@ -16011,6 +16009,12 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", diff --git a/package.json b/package.json index 1a045b616..df7290e37 100644 --- a/package.json +++ b/package.json @@ -47,8 +47,6 @@ "@babel/plugin-proposal-object-rest-spread": "7.9.5", "@babel/plugin-transform-modules-commonjs": "7.9.0", "@babel/preset-env": "7.9.5", - "@typescript-eslint/eslint-plugin": "3.2.0", - "@typescript-eslint/parser": "3.2.0", "@vue/component-compiler-utils": "3.1.2", "eslint": "6.8.0", "eslint-config-prettier": "6.11.0", @@ -56,10 +54,9 @@ "eslint-plugin-vue": "6.2.2", "jest": "25.4.0", "parcel-bundler": "1.12.4", - "pug": "3.0.1", + "pug": "2.0.4", "regenerator-runtime": "0.13.5", "stylus": "0.54.7", - "typescript": "3.9.5", "vue-hot-reload-api": "2.3.4", "vue-server-renderer": "2.6.11", "vue-template-compiler": "2.6.11", diff --git a/src/actions/containers.js b/src/actions/containers.js index eabe53f09..d3cf01d3d 100644 --- a/src/actions/containers.js +++ b/src/actions/containers.js @@ -44,7 +44,6 @@ async function loadContainers() { } this.state.containers = containers - this.actions.infoLog('Containers loaded') if (saveNeeded) this.actions.saveContainers() } diff --git a/src/actions/logs.ts b/src/actions/logs.ts deleted file mode 100644 index cd6a56418..000000000 --- a/src/actions/logs.ts +++ /dev/null @@ -1,65 +0,0 @@ -interface ActionContextTEMP { - actions: { [key: string]: (...args: any[]) => any } - state: { - instanceType: string - bg: WEPort - windowId: string - } - - _logs: string[] | undefined - _logTimeout: number | undefined -} - -enum LogLvl { - Info = 'INFO', - Warn = 'WARN', - Err = 'ERR', -} - -/** - * Log info - */ -function infoLog(this: ActionContextTEMP, msg: string): void { - this.actions.log(LogLvl.Info, msg) -} - -/** - * Log warn - */ -function warnLog(this: ActionContextTEMP, msg: string): void { - this.actions.log(LogLvl.Warn, msg) -} - -/** - * Log err - */ -function errLog(this: ActionContextTEMP, msg: string): void { - this.actions.log(LogLvl.Err, msg) -} - -/** - * Log msg at given level in mem and send - */ -const LOG_DEBOUNCE = 1000 -function log(this: ActionContextTEMP, lvl: LogLvl, msg: string): void { - if (!this._logs) this._logs = [] - const log = `${Date.now()} [${lvl}::${this.state.instanceType}-${this.state.windowId}] ${msg}` - this._logs.push(log) - - if (this._logTimeout) window.clearTimeout(this._logTimeout) - this._logTimeout = setTimeout(() => { - if (this.state.bg && !this.state.bg.error) { - this.state.bg.postMessage({ action: 'log', args: [this._logs] }) - } else { - browser.runtime.sendMessage({ instanceType: 'bg', action: 'log', args: [this._logs] }) - } - this._logs = [] - }, LOG_DEBOUNCE) -} - -export default { - infoLog, - warnLog, - errLog, - log, -} diff --git a/src/actions/panels.js b/src/actions/panels.js index 6393d1383..89072dc6b 100644 --- a/src/actions/panels.js +++ b/src/actions/panels.js @@ -80,7 +80,6 @@ async function loadPanels() { this.state.panels = normPanels this.state.panelsMap = panelsMap - this.actions.infoLog('Panels loaded') if (saveNeeded) this.actions.savePanels() } diff --git a/src/actions/settings.js b/src/actions/settings.js index 9c5da9942..6b29433fd 100644 --- a/src/actions/settings.js +++ b/src/actions/settings.js @@ -11,8 +11,6 @@ async function loadSettings() { if (settings[key] === undefined) continue this.state[key] = settings[key] } - - this.actions.infoLog('Settings loaded') } /** diff --git a/src/actions/styles.js b/src/actions/styles.js index d6892fa6e..34fd87f19 100644 --- a/src/actions/styles.js +++ b/src/actions/styles.js @@ -24,8 +24,6 @@ function initTheme() { themeLinkEl.href = `../themes/${this.state.theme}/${this.state.instanceType}.css` setTimeout(() => EventBus.$emit('dynVarChange'), 120) - - this.actions.infoLog('Theme initialized: ' + this.state.theme) } /** @@ -37,7 +35,6 @@ async function loadCustomCSS() { if (!ans || !ans[fieldName]) return this.actions.applyCustomCSS(ans[fieldName]) - this.actions.infoLog('Custom CSS loaded') } /** diff --git a/src/page.settings/actions.js b/src/page.settings/actions.js index 2d3467a42..104d0a043 100644 --- a/src/page.settings/actions.js +++ b/src/page.settings/actions.js @@ -1,6 +1,5 @@ import FaviconsActions from '../actions/favicons' import MenuActions from '../actions/menu' -import LogsActions from '../actions/logs' import Store from './store' import State from './store/state' import KeybindingsActions from './actions/keybindings' @@ -18,7 +17,6 @@ const Actions = { ...StylesActions, ...ContainersActions, ...PanelsActions, - ...LogsActions, ...MiscActions, } diff --git a/src/page.settings/components/settings.help.vue b/src/page.settings/components/settings.help.vue index 0f64772e1..314a938ce 100644 --- a/src/page.settings/components/settings.help.vue +++ b/src/page.settings/components/settings.help.vue @@ -251,12 +251,6 @@ export default { dbg.bookmarks = err.toString() } - try { - dbg.logs = await browser.runtime.sendMessage({ instanceType: 'bg', action: 'getLogs' }) - } catch (err) { - dbg.logs = err.toString() - } - return dbg }, diff --git a/src/sidebar/actions.js b/src/sidebar/actions.js index 7884a46b7..45aae6b04 100644 --- a/src/sidebar/actions.js +++ b/src/sidebar/actions.js @@ -7,7 +7,6 @@ import TabsActions from './actions/tabs' import BookmarksActions from './actions/bookmarks' import StylesActions from './actions/styles' import CtxMenuActions from './actions/menu' -import LogsActions from '../actions/logs' import MiscActions from './actions/misc' const Actions = { @@ -20,7 +19,6 @@ const Actions = { ...BookmarksActions, ...StylesActions, ...CtxMenuActions, - ...LogsActions, ...MiscActions, } diff --git a/src/sidebar/actions/bookmarks.js b/src/sidebar/actions/bookmarks.js index 6d6bbb955..e727419f2 100644 --- a/src/sidebar/actions/bookmarks.js +++ b/src/sidebar/actions/bookmarks.js @@ -63,7 +63,6 @@ async function loadBookmarks() { this.state.bookmarks = bookmarks[0].children this.state.bookmarksCount = count - this.actions.infoLog('Bookmarks loaded') panel.loading = 'ok' setTimeout(() => { panel.loading = false diff --git a/src/sidebar/actions/misc.js b/src/sidebar/actions/misc.js index 90f75fde8..7f3409da3 100644 --- a/src/sidebar/actions/misc.js +++ b/src/sidebar/actions/misc.js @@ -13,8 +13,6 @@ async function loadWindowInfo() { w => w.id !== this.state.windowId && w.type === 'normal' ) }) - - this.actions.infoLog('Windows info loaded') } /** diff --git a/src/sidebar/actions/panels.js b/src/sidebar/actions/panels.js index 9c537d5a4..b89c51c13 100644 --- a/src/sidebar/actions/panels.js +++ b/src/sidebar/actions/panels.js @@ -107,7 +107,6 @@ async function updatePanels(newPanels) { function updatePanelsTabs() { let lastIndex = this.getters.pinnedTabs.length let tabsCount = this.state.tabs.length - let eatenTabs = [] let tab, i for (let panel of this.state.panels) { if (panel.type === 'bookmarks') continue @@ -120,7 +119,6 @@ function updatePanelsTabs() { } else if (tab.panelId === null) { tab.panelId = panel.id panel.tabs.push(tab) - eatenTabs.push(tab) } else { break } @@ -136,11 +134,6 @@ function updatePanelsTabs() { panel.endIndex = panel.startIndex } } - - if (eatenTabs.length) { - let info = eatenTabs.map(t => `${t.panelId} <- n${t.index} #${t.id}`).join('\n ') - this.actions.warnLog('Tabs were eaten by panel:\n ' + info) - } } function getPanelStartIndex(id) { diff --git a/src/sidebar/actions/tabs.js b/src/sidebar/actions/tabs.js index 74720df9d..3bbbaa805 100644 --- a/src/sidebar/actions/tabs.js +++ b/src/sidebar/actions/tabs.js @@ -108,7 +108,6 @@ async function loadTabsFromGlobalStorage() { } this.state.tabs = tabs - this.actions.infoLog('Tabs loaded (from global storage): ' + tabs.length) this.actions.updatePanelsTabs() this.actions.updateTabsTree() @@ -160,7 +159,6 @@ async function loadTabsFromSessionStorage() { let offset = 0 let activeTab let idsMap = {} - let logWrongPanels = [] // Set tabs initial props and update state this.state.tabsMap = [] @@ -204,7 +202,6 @@ async function loadTabsFromSessionStorage() { // Normalize panelId let panel = this.state.panelsMap[tab.panelId] if (!panel) { - logWrongPanels.push(tab.panelId) if (tab.pinned) tab.panelId = DEFAULT_CTX_ID else tab.panelId = lastPanel.id } else { @@ -225,12 +222,7 @@ async function loadTabsFromSessionStorage() { if (tab.active) activeTab = tab } - if (logWrongPanels.length) { - this.actions.warnLog('Tabs loading: Cannot find panels: ' + logWrongPanels.join(' ')) - } - this.state.tabs = tabs - this.actions.infoLog('Tabs loaded (from session storage): ' + tabs.length) this.actions.updatePanelsTabs() this.actions.updateTabsTree() @@ -294,8 +286,6 @@ async function recreateParentGroups(tabs, groups, idsMap, index) { this.state.tabsMap[groupTab.id] = groupTab this.actions.saveTabData(groupTab) } - - this.actions.infoLog(`Recreated ${groups.length} groups at ${index} index`) } /** @@ -419,7 +409,6 @@ async function loadTabsFromInlineData(tabs, dataTabIndex) { } this.state.tabs = tabs - this.actions.infoLog('Tabs loaded (from inline data): ' + tabs.length) this.actions.updatePanelsTabs() this.actions.updateTabsTree() diff --git a/src/sidebar/handlers/tabs.js b/src/sidebar/handlers/tabs.js index 39ebb57ec..9ef81f477 100644 --- a/src/sidebar/handlers/tabs.js +++ b/src/sidebar/handlers/tabs.js @@ -157,8 +157,6 @@ function onTabCreated(tab) { /** itsokay **/ }) } - - this.actions.infoLog(`Tab created: n${tab.index} #${tab.id} p${tab.panelId}`) } // Update succession @@ -539,8 +537,6 @@ function onTabRemoved(tabId, info, childfree) { /** itsokay **/ }) } - - this.actions.infoLog(`Tab removed: n${tab.index} #${tab.id} p${tab.panelId}`) } /** @@ -560,8 +556,6 @@ function onTabMoved(id, info) { this.actions.resetSelection() } - this.actions.infoLog(`Tab moving: #${id} ${info.fromIndex} > ${info.toIndex}`) - // Check if target tab already placed let toIndex = info.toIndex if (info.toIndex > info.fromIndex) toIndex = toIndex - mvLen diff --git a/src/sidebar/sidebar.js b/src/sidebar/sidebar.js index 29bfb8b65..480fe804e 100644 --- a/src/sidebar/sidebar.js +++ b/src/sidebar/sidebar.js @@ -51,8 +51,6 @@ export default new Vue({ async created() { State.instanceType = 'sidebar' - Actions.infoLog('Initialization start') - await Promise.all([Actions.loadWindowInfo(), Actions.loadSettings(), Actions.loadContainers()]) Handlers.setupWindowsListeners() @@ -80,9 +78,7 @@ export default new Vue({ Actions.loadKeybindings() Handlers.setupKeybindingListeners() - Actions.loadCtxMenu() - Actions.loadCSSVars() - Actions.scrollToActiveTab() + Actions.loadCtxMenu(), Actions.loadCSSVars(), Actions.scrollToActiveTab() Actions.loadFavicons() Actions.loadPermissions(true) Actions.updateTabsVisability() diff --git a/src/types/web-ext.d.ts b/src/types/web-ext.d.ts deleted file mode 100644 index eff93e0bf..000000000 --- a/src/types/web-ext.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -declare namespace browser.runtime { - function sendMessage(msg: T): void -} - -declare type WEPort = { - name: string - disconnect: () => void - error: { message: string } - onDisconnect: WEEventTarget - onMessage: WEEventTarget - postMessage: (msg: T) => void - sender?: { id?: string } -} - -interface WEEventTarget { - addListener: (listener: T) => void - removeListener: (listener: T) => void -} - -type WEPortDisconnectListener = (port: WEPort) => void - -type WEPortMessageListener = (msg: T) => void diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 7ea4a1ad1..000000000 --- a/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "types": [] - }, - "include": ["src/**/*.ts"], - "exclude": ["node_modules", "**/__test__/*"] -}