Skip to content

Commit

Permalink
PB-18657 Service worker should explicitly used our version of the bro…
Browse files Browse the repository at this point in the history
…wser webextension polyfill/api

Signed-off-by: Cedric Alfonsi <cedric@passbolt.com>
  • Loading branch information
cedricalfonsi authored and Benj1er committed Sep 30, 2022
1 parent 52ce05f commit 7d556e5
Show file tree
Hide file tree
Showing 26 changed files with 25 additions and 25 deletions.
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 3.6.0
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import AuthModel from "../../model/auth/authModel";


Expand Down
Expand Up @@ -13,7 +13,7 @@
*
* On extension installed controller
*/
import browser from 'webextension-polyfill';
import browser from '../../sdk/polyfill/browserPolyfill';

class OnExtensionInstalledController {
/**
Expand Down
Expand Up @@ -16,7 +16,7 @@ import Keyring from "../../model/keyring";
import DecryptMessageService from "../../service/crypto/decryptMessageService";
import User from "../../model/user";
import GroupsUpdateController from "./groupUpdateController";
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import {PassphraseController} from "../passphrase/passphraseController";
import MockExtension from "../../../../../test/mocks/mockExtension";

Expand Down
Expand Up @@ -12,7 +12,7 @@
* @since 3.3.0
*/
import GpgAuth from "../../model/gpgauth";
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import User from "../../model/user";
import ResourceModel from "../../model/resource/resourceModel";
import {QuickAccessService} from "../../service/ui/quickAccess.service";
Expand Down
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 3.6.0
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import AuthModel from "../../model/auth/authModel";

class SignInSetupController {
Expand Down
2 changes: 1 addition & 1 deletion src/all/background_page/controller/toolbarController.js
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 2.0.0
*/
import browser from "webextension-polyfill";
import browser from "../sdk/polyfill/browserPolyfill";
import User from "../model/user";
import {BrowserExtensionIconService} from "../service/ui/browserExtensionIcon.service";
import ResourceModel from "../model/resource/resourceModel";
Expand Down
2 changes: 1 addition & 1 deletion src/all/background_page/event/browser/browserEvents.js
Expand Up @@ -13,7 +13,7 @@
*
* Background script for browser listener
*/
import browser from 'webextension-polyfill';
import browser from '../../sdk/polyfill/browserPolyfill';
import OnExtensionInstalledController from "../../controller/extension/OnExtensionInstalledController";

/**
Expand Down
2 changes: 1 addition & 1 deletion src/all/background_page/event/quickAccessEvents.js
Expand Up @@ -4,7 +4,7 @@
* @copyright (c) 2019 Passbolt SA
* @licence GNU Affero General Public License http://www.gnu.org/licenses/agpl-3.0.en.html
*/
import browser from "webextension-polyfill";
import browser from "../sdk/polyfill/browserPolyfill";
import User from "../model/user";
import {Worker} from "../model/worker";
import {BrowserTabService} from "../service/ui/browserTab.service";
Expand Down
2 changes: 1 addition & 1 deletion src/all/background_page/model/user.js
Expand Up @@ -4,7 +4,7 @@
* @copyright (c) 2017 Passbolt SARL
* @licence GNU Affero General Public License http://www.gnu.org/licenses/agpl-3.0.en.html
*/
import browser from "webextension-polyfill";
import browser from "../sdk/polyfill/browserPolyfill";
import UserService from "../service/api/user/userService";
import {Config} from "./config";
import UserSettings from "./userSettings/userSettings";
Expand Down
2 changes: 1 addition & 1 deletion src/all/background_page/sdk/page-mod.js
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 2.0.0
*/
import browser from "webextension-polyfill";
import browser from "../sdk/polyfill/browserPolyfill";
import {Worker as Workers} from "../model/worker";
import ScriptExecution from "../sdk/scriptExecution";
import Worker from "../sdk/worker";
Expand Down
Expand Up @@ -16,6 +16,6 @@
* This code provides polyfills for the need of Passbolt.
*/
import browser from "webextension-polyfill";
import "./scripting-polyfill"; //mv3 scripting API for mv2
import "./scriptingPolyfill"; //mv3 scripting API for mv2

export default browser;
2 changes: 1 addition & 1 deletion src/all/background_page/sdk/scriptExecution.js
Expand Up @@ -5,7 +5,7 @@
* @copyright (c) 2017 Passbolt SARL
* @licence GNU Affero General Public License http://www.gnu.org/licenses/agpl-3.0.en.html
*/
import browser from "./polyfill/polyfill";
import browser from "./polyfill/browserPolyfill";

/**
* Used to set the portname.
Expand Down
Expand Up @@ -15,7 +15,7 @@ import {v4 as uuidv4} from 'uuid';
import AccountLocalStorage from "./accountLocalStorage";
import {defaultAccountDto} from "../../model/entity/account/accountEntity.test.data";
import AccountEntity from "../../model/entity/account/accountEntity";
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";

describe("AccountLocalStorage", () => {
describe("AccountLocalStorage::get", () => {
Expand Down
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 3.6.0
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import AbstractAccountEntity from "../../model/entity/account/abstractAccountEntity";
import AwaitLock from "await-lock";

Expand Down
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 2.13.4
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import Log from "../../model/log";
import Lock from "../../utils/lock";
const lock = new Lock();
Expand Down
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 2.13.0
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import Log from "../../model/log";
import FolderEntity from "../../model/entity/folder/folderEntity";
import FoldersCollection from "../../model/entity/folder/foldersCollection";
Expand Down
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 2.13.0
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import Log from "../../model/log";
import GroupsCollection from "../../model/entity/group/groupsCollection";
import GroupEntity from "../../model/entity/group/groupEntity";
Expand Down
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 3.3.0
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import Log from "../../model/log";
import Lock from "../../utils/lock";
const lock = new Lock();
Expand Down
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 2.11.0
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import Log from "../../model/log";
import ResourcesCollection from "../../model/entity/resource/resourcesCollection";
import ResourceEntity from "../../model/entity/resource/resourceEntity";
Expand Down
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 3.0.0
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import Log from "../../model/log";
import ResourceTypeEntity from "../../model/entity/resourceType/resourceTypeEntity";
import ResourceTypesCollection from "../../model/entity/resourceType/resourceTypesCollection";
Expand Down
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 3.0.0
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import Log from "../../model/log";
import RoleEntity from "../../model/entity/role/roleEntity";
import RolesCollection from "../../model/entity/role/rolesCollection";
Expand Down
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 2.13.0
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";
import Log from "../../model/log";
import UserEntity from "../../model/entity/user/userEntity";
import UsersCollection from "../../model/entity/user/usersCollection";
Expand Down
Expand Up @@ -12,7 +12,7 @@
* @since 3.3
*/

import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";

/** Default Passbolt browser extension icon file path */
const DEFAULT_BROWSER_EXTENSION_ICON_FILEPATH = '/webAccessibleResources/img/icons/icon-32.png';
Expand Down
2 changes: 1 addition & 1 deletion src/all/background_page/service/ui/browserTab.service.js
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 3.4.0
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";

/**
* Get the current tab
Expand Down
2 changes: 1 addition & 1 deletion src/all/background_page/service/ui/quickAccess.service.js
Expand Up @@ -11,7 +11,7 @@
* @link https://www.passbolt.com Passbolt(tm)
* @since 3.4
*/
import browser from "webextension-polyfill";
import browser from "../../sdk/polyfill/browserPolyfill";

/** The default quickaccesss window height */
const QUICKACCESS_WINDOW_HEIGHT = 400;
Expand Down

0 comments on commit 7d556e5

Please sign in to comment.