mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-30 08:10:34 +01:00
Add ConsoleLogService dependency from jslib (#735)
* Pre-emptively add new jslib dependency * Add consoleLogService dependency definition * Update jslib * PR Review Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
This commit is contained in:
parent
ec2b048289
commit
1464e0fbe8
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit 2d62e10d988633b7cd1c58af7e450cfa2150070b
|
||||
Subproject commit 2c414ce27a5c14f6cd7f86cfd07096a192d058ca
|
@ -80,6 +80,7 @@
|
||||
"big-integer": "1.6.36",
|
||||
"bootstrap": "4.3.1",
|
||||
"braintree-web-drop-in": "1.13.0",
|
||||
"browser-process-hrtime": "1.0.0",
|
||||
"core-js": "2.6.2",
|
||||
"duo_web_sdk": "git+https://github.com/duosecurity/duo_web_sdk.git#410a9186cc34663c4913b17d6528067cd3331f1d",
|
||||
"font-awesome": "4.7.0",
|
||||
|
@ -30,6 +30,7 @@ import { AuditService } from 'jslib/services/audit.service';
|
||||
import { AuthService } from 'jslib/services/auth.service';
|
||||
import { CipherService } from 'jslib/services/cipher.service';
|
||||
import { CollectionService } from 'jslib/services/collection.service';
|
||||
import { ConsoleLogService } from 'jslib/services/consoleLog.service';
|
||||
import { ConstantsService } from 'jslib/services/constants.service';
|
||||
import { ContainerService } from 'jslib/services/container.service';
|
||||
import { CryptoService } from 'jslib/services/crypto.service';
|
||||
@ -94,8 +95,10 @@ const storageService: StorageServiceAbstraction = new HtmlStorageService(platfor
|
||||
const secureStorageService: StorageServiceAbstraction = new MemoryStorageService();
|
||||
const cryptoFunctionService: CryptoFunctionServiceAbstraction = new WebCryptoFunctionService(window,
|
||||
platformUtilsService);
|
||||
const consoleLogService = new ConsoleLogService(false);
|
||||
const cryptoService = new CryptoService(storageService,
|
||||
platformUtilsService.isDev() ? storageService : secureStorageService, cryptoFunctionService, platformUtilsService);
|
||||
platformUtilsService.isDev() ? storageService : secureStorageService, cryptoFunctionService, platformUtilsService,
|
||||
consoleLogService);
|
||||
const tokenService = new TokenService(storageService);
|
||||
const appIdService = new AppIdService(storageService);
|
||||
const apiService = new ApiService(tokenService, platformUtilsService,
|
||||
@ -108,7 +111,7 @@ const cipherService = new CipherService(cryptoService, userService, settingsServ
|
||||
const folderService = new FolderService(cryptoService, userService, apiService, storageService,
|
||||
i18nService, cipherService);
|
||||
const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService);
|
||||
searchService = new SearchService(cipherService);
|
||||
searchService = new SearchService(cipherService, consoleLogService);
|
||||
const policyService = new PolicyService(userService, storageService);
|
||||
const sendService = new SendService(cryptoService, userService, apiService, storageService,
|
||||
i18nService, cryptoFunctionService);
|
||||
@ -122,11 +125,12 @@ const passwordGenerationService = new PasswordGenerationService(cryptoService, s
|
||||
const totpService = new TotpService(storageService, cryptoFunctionService);
|
||||
const containerService = new ContainerService(cryptoService);
|
||||
const authService = new AuthService(cryptoService, apiService,
|
||||
userService, tokenService, appIdService, i18nService, platformUtilsService, messagingService, vaultTimeoutService);
|
||||
userService, tokenService, appIdService, i18nService, platformUtilsService, messagingService, vaultTimeoutService,
|
||||
consoleLogService);
|
||||
const exportService = new ExportService(folderService, cipherService, apiService);
|
||||
const importService = new ImportService(cipherService, folderService, apiService, i18nService, collectionService);
|
||||
const notificationsService = new NotificationsService(userService, syncService, appIdService,
|
||||
apiService, vaultTimeoutService, async () => messagingService.send('logout', { expired: true }));
|
||||
apiService, vaultTimeoutService, async () => messagingService.send('logout', { expired: true }), consoleLogService);
|
||||
const environmentService = new EnvironmentService(apiService, storageService, notificationsService);
|
||||
const auditService = new AuditService(cryptoFunctionService, apiService);
|
||||
const eventLoggingService = new EventLoggingService(storageService, apiService, userService, cipherService);
|
||||
|
@ -37,8 +37,8 @@ function getQsParam(name: string) {
|
||||
|
||||
function initiateBrowserSso(code: string, state: string) {
|
||||
window.postMessage({ command: 'authResult', code: code, state: state }, '*');
|
||||
let handOffMessage = ('; ' + document.cookie).split('; ssoHandOffMessage=').pop().split(';').shift();
|
||||
document.cookie = 'ssoHandOffMessage=;SameSite=strict;max-age=0'
|
||||
const handOffMessage = ('; ' + document.cookie).split('; ssoHandOffMessage=').pop().split(';').shift();
|
||||
document.cookie = 'ssoHandOffMessage=;SameSite=strict;max-age=0';
|
||||
document.getElementById('content').innerHTML =
|
||||
`<p>${handOffMessage}</p>`;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ export class HtmlStorageService implements StorageService {
|
||||
ConstantsService.ssoStateKey, 'ssoOrgIdentifier']);
|
||||
private localStorageStartsWithKeys = ['twoFactorToken_', ConstantsService.collapsedGroupingsKey + '_'];
|
||||
private memoryStorageStartsWithKeys = ['ciphers_', 'folders_', 'collections_', 'settings_', 'lastSync_'];
|
||||
private memoryStorage = new Map<string, string>()
|
||||
private memoryStorage = new Map<string, string>();
|
||||
|
||||
constructor(private platformUtilsService: PlatformUtilsService) { }
|
||||
|
||||
|
@ -49,6 +49,10 @@
|
||||
"check-separator",
|
||||
"check-type"
|
||||
],
|
||||
"max-classes-per-file": false
|
||||
"max-classes-per-file": false,
|
||||
"semicolon": [
|
||||
true,
|
||||
"always"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user