Socket
Socket
Sign inDemoInstall

@mparticle/web-sdk

Package Overview
Dependencies
Maintainers
10
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mparticle/web-sdk - npm Package Compare versions

Comparing version 2.25.2 to 2.25.3

2

package.json
{
"name": "@mparticle/web-sdk",
"version": "2.25.2",
"version": "2.25.3",
"description": "mParticle core SDK for web applications",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -89,2 +89,5 @@ //

this.generateHash = this._Helpers.generateHash;
// https://go.mparticle.com/work/SQDSDKS-6289
// TODO: Replace this with Store once Store is moved earlier in the init process
this.getDeviceId = this._Persistence.getDeviceId;

@@ -235,3 +238,3 @@

if (queued) return;
this._Persistence.setDeviceId(guid);
this._Store.setDeviceId(guid);
};

@@ -238,0 +241,0 @@ /**

@@ -132,3 +132,3 @@ import { MPID } from '@mparticle/web-sdk';

nullifySession();
mpInstance._Store.nullifySession();
return;

@@ -179,3 +179,3 @@ }

mpInstance._Store.sessionStartDate = null;
nullifySession();
mpInstance._Store.nullifySession();
}

@@ -209,3 +209,3 @@ }

this.startNewSessionIfNeeded = function(): void {
this.startNewSessionIfNeeded = function (): void {
if (!mpInstance._Store.webviewBridgeEnabled) {

@@ -223,9 +223,2 @@ const persistence = mpInstance._Persistence.getPersistence();

};
function nullifySession(): void {
mpInstance._Store.sessionId = null;
mpInstance._Store.dateLastEventSent = null;
mpInstance._Store.sessionAttributes = {};
mpInstance._Persistence.update();
}
}

@@ -26,2 +26,3 @@ import { Batch } from '@mparticle/event-models';

import { Kit, MPForwarder } from './forwarders.interfaces';
import { IPersistenceMinified } from './persistence.interfaces';

@@ -166,2 +167,9 @@ // This represents the runtime configuration of the SDK AFTER

wrapperSDKInfo: WrapperSDKInfo;
persistenceData?: IPersistenceMinified;
getDeviceId?(): string;
setDeviceId?(deviceId: string): void;
nullifySession?: () => void;
}

@@ -219,2 +227,23 @@

},
// Placeholder for in-memory persistence model
persistenceData: {
cu: null,
gs: {
sid: null,
ie: null,
sa: null,
ss: null,
dt: null,
av: null,
cgid: null,
das: null,
ia: null,
c: null,
csm: null,
les: null,
ssd: null,
},
l: null,
},
};

@@ -237,4 +266,6 @@

this.SDKConfig.flags = processFlags(config, this
.SDKConfig as SDKConfig);
this.SDKConfig.flags = processFlags(
config,
this.SDKConfig as SDKConfig
);

@@ -245,5 +276,6 @@ if (config.deviceId) {

if (config.hasOwnProperty('isDevelopmentMode')) {
this.SDKConfig.isDevelopmentMode = mpInstance._Helpers.returnConvertedBoolean(
config.isDevelopmentMode
);
this.SDKConfig.isDevelopmentMode =
mpInstance._Helpers.returnConvertedBoolean(
config.isDevelopmentMode
);
} else {

@@ -426,2 +458,16 @@ this.SDKConfig.isDevelopmentMode = false;

}
this.getDeviceId = () => this.deviceId;
this.setDeviceId = (deviceId: string) => {
this.deviceId = deviceId;
this.persistenceData.gs.das = deviceId;
mpInstance._Persistence.update();
};
this.nullifySession = (): void => {
this.sessionId = null;
this.dateLastEventSent = null;
this.sessionAttributes = {};
mpInstance._Persistence.update();
};
}

@@ -536,2 +582,2 @@

return directBaseUrls;
}
}

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