New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bruit/component

Package Overview
Dependencies
Maintainers
2
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bruit/component - npm Package Compare versions

Comparing version 1.1.0-8 to 1.1.0-9

31

dist/collection/bruit-tools/navigator.js

@@ -11,2 +11,3 @@ import { BrtPermissionName } from "@bruit/types/dist/enums/brt-permission-name";

try {
console.log('getInfo await');
const [permissions, storage, privateMode] = await Promise.all([

@@ -18,3 +19,5 @@ NavigatorTool.getPermissions(),

const { cookieEnabled, userAgent, platform, language } = window.navigator;
console.log('getInfo call getNetworkInformation');
const network = this.getNetworkInformation();
console.log('getInfo call getPluginsInformation');
const plugins = this.getPluginsInformation();

@@ -36,2 +39,3 @@ const serviceWorkersSupported = "serviceWorker" in window.navigator;

catch (error) {
console.log('getInfo catch error ', error);
throw error;

@@ -94,12 +98,16 @@ }

static async getPermissions() {
console.log('getInfo getPermissions');
if (navigator &&
navigator.permissions &&
navigator.permissions.query) {
const permissionsQueries = Object.keys(BrtPermissionName).map(permissionKey => navigator.permissions
.query({ name: BrtPermissionName[permissionKey] })
.then(pStatus => {
pStatus.name = BrtPermissionName[permissionKey];
return pStatus;
})
.catch(() => Promise.resolve({ unsupported: true })));
const permissionsQueries = Object.keys(BrtPermissionName).map(permissionKey => {
console.log('getInfo getPermissions query ', BrtPermissionName[permissionKey]);
return navigator.permissions
.query({ name: BrtPermissionName[permissionKey] })
.then(pStatus => {
pStatus.name = BrtPermissionName[permissionKey];
return pStatus;
})
.catch(() => Promise.resolve({ unsupported: true }));
});
return Promise.all(permissionsQueries).then(permisionsStatus => permisionsStatus

@@ -111,3 +119,6 @@ .filter(pStatus => !pStatus.unsupported &&

return acc;
}, {}));
}, {})).catch(error => {
console.log('getInfo getPermissions query error', error);
return Promise.reject(error);
});
}

@@ -119,4 +130,6 @@ else {

static async getServiceWorkersList() {
console.log('getInfo getServiceWorkersList');
if ("serviceWorker" in window.navigator) {
try {
console.log('getInfo getServiceWorkersList await navigator.serviceWorker.getRegistrations');
const registrations = await navigator.serviceWorker.getRegistrations();

@@ -129,2 +142,3 @@ return registrations.map(registration => ({

catch (error) {
console.log('getInfo getServiceWorkersList error', error);
throw error;

@@ -138,2 +152,3 @@ }

static isIncognito() {
console.log('getInfo isIncognito');
return new Promise(resolve => {

@@ -140,0 +155,0 @@ const on = () => resolve(true);

@@ -17,3 +17,5 @@ import html2canvas from '@bruit/html2canvas';

static async getScreenshot(screenshotConfig) {
console.log('getScreenshot go');
return new Promise(async (resolve, reject) => {
console.log('getScreenshot div');
const div = screenshotConfig && screenshotConfig.elementToRenderSelector ? document.querySelector(screenshotConfig.elementToRenderSelector) : document.body;

@@ -40,4 +42,7 @@ const options = {

try {
console.log('getScreenshot html2canvas');
const canvas = await html2canvas(div, options);
console.log('getScreenshot toBlob');
canvas.toBlob((result) => {
console.log('getScreenshot end');
resolve(result);

@@ -47,2 +52,3 @@ }, imageType, compression);

catch (error) {
console.log('getScreenshot error');
console.error(error);

@@ -49,0 +55,0 @@ reject(error);

{
"name": "@bruit/component",
"version": "1.1.0-8",
"version": "1.1.0-9",
"description": "send your feedbacks with bruit.io",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc