Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ombori/ga-settings

Package Overview
Dependencies
Maintainers
14
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ombori/ga-settings - npm Package Compare versions

Comparing version 3.92.7 to 3.92.8

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## 3.92.8 (2024-05-24)
**Note:** Version bump only for package @ombori/ga-settings
## 3.92.7 (2024-05-24)

@@ -8,0 +16,0 @@

22

dist/index.js

@@ -94,3 +94,3 @@ "use strict";

case types_1.InstallationTypeEnum.SCREEN:
var device = getDeviceInfo();
var device = getDeviceInfo(gridappSettings);
if (device) {

@@ -159,3 +159,17 @@ var devicesSettings = (gridappSettings === null || gridappSettings === void 0 ? void 0 : gridappSettings._devicesSettings) || {};

};
var getDeviceInfo = function () {
var getDeviceInfo = function (bootSettings) {
if (bootSettings &&
bootSettings._deviceEnvs &&
!utils_1.isObjectEmpty(bootSettings._deviceEnvs)) {
var deviceEnvsFromBoot = bootSettings._deviceEnvs;
var deviceInfo = {
id: deviceEnvsFromBoot.browserId,
name: deviceEnvsFromBoot.deviceName,
accessId: deviceEnvsFromBoot.browserId,
accessToken: deviceEnvsFromBoot.accessKey,
env: deviceEnvsFromBoot.env,
spaceId: deviceEnvsFromBoot.spaceId || '',
};
return deviceInfo;
}
// Note: Do not immediately return null if NODE_ENV is dev

@@ -210,3 +224,3 @@ // Sometimes we render the app within same network on GridOS device for development

case types_1.InstallationTypeEnum.SCREEN:
var device = getDeviceInfo();
var device = getDeviceInfo(settings);
if (device) {

@@ -256,3 +270,3 @@ delete device.accessId;

else if (isScreenApp) {
device = getDeviceInfo();
device = getDeviceInfo(settings);
environment = device === null || device === void 0 ? void 0 : device.env;

@@ -259,0 +273,0 @@ spaceId = device === null || device === void 0 ? void 0 : device.spaceId;

@@ -84,2 +84,9 @@ declare global {

}
export interface DeviceEnvs {
browserId: string;
accessKey: string;
env: string;
spaceId?: string;
deviceName: string;
}
export interface StaticSettingsProps {

@@ -116,2 +123,3 @@ _general: GeneralInfo;

};
_deviceEnvs?: DeviceEnvs;
}

@@ -118,0 +126,0 @@ export interface AppInfo extends GeneralInfo {

4

package.json
{
"name": "@ombori/ga-settings",
"version": "3.92.7",
"version": "3.92.8",
"main": "dist/index.js",

@@ -19,3 +19,3 @@ "license": "UNLICENSED",

"test:coverage": "npm run test -- --coverage --watchAll=false",
"gitHead": "00638a0c3b8c9451a8a0b1139ef80abe42d99443"
"gitHead": "415bcf14a8e0a6e9fd18ee53c89dda655d183014"
}

@@ -12,2 +12,3 @@ import { useEffect, useState, useRef } from 'react';

AppInfo,
StaticSettingsProps,
} from './types';

@@ -98,3 +99,3 @@

case InstallationTypeEnum.SCREEN:
const device = getDeviceInfo();
const device = getDeviceInfo(gridappSettings);
if (device) {

@@ -173,3 +174,21 @@ const devicesSettings = gridappSettings?._devicesSettings || {};

const getDeviceInfo = (): DeviceInfo | null => {
const getDeviceInfo = (bootSettings?: StaticSettingsProps): DeviceInfo | null => {
if (
bootSettings &&
bootSettings._deviceEnvs &&
!isObjectEmpty(bootSettings._deviceEnvs)
) {
const deviceEnvsFromBoot = bootSettings._deviceEnvs;
const deviceInfo = {
id: deviceEnvsFromBoot.browserId,
name: deviceEnvsFromBoot.deviceName,
accessId: deviceEnvsFromBoot.browserId,
accessToken: deviceEnvsFromBoot.accessKey,
env: deviceEnvsFromBoot.env,
spaceId: deviceEnvsFromBoot.spaceId || '',
};
return deviceInfo;
}
// Note: Do not immediately return null if NODE_ENV is dev

@@ -239,3 +258,3 @@ // Sometimes we render the app within same network on GridOS device for development

case InstallationTypeEnum.SCREEN:
const device = getDeviceInfo();
const device = getDeviceInfo(settings);

@@ -294,3 +313,3 @@ if (device) {

} else if (isScreenApp) {
device = getDeviceInfo();
device = getDeviceInfo(settings);
environment = device?.env;

@@ -297,0 +316,0 @@ spaceId = device?.spaceId;

@@ -95,2 +95,10 @@ declare global {

export interface DeviceEnvs {
browserId: string;
accessKey: string;
env: string;
spaceId?: string;
deviceName: string;
}
export interface StaticSettingsProps {

@@ -127,2 +135,3 @@ _general: GeneralInfo;

};
_deviceEnvs?: DeviceEnvs;
}

@@ -129,0 +138,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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