@mparticle/web-sdk
Advanced tools
Comparing version 2.14.2 to 2.15.0
{ | ||
"name": "@mparticle/web-sdk", | ||
"version": "2.14.2", | ||
"version": "2.15.0", | ||
"description": "mParticle core SDK for web applications", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -372,8 +372,7 @@ import Types from './types'; | ||
mpInstance.Logger.verbose( | ||
'Sending message to forwarder: ' + | ||
mpInstance._Store.activeForwarders[i].name | ||
); | ||
if (mpInstance._Store.activeForwarders[i].process) { | ||
mpInstance.Logger.verbose( | ||
'Sending message to forwarder: ' + | ||
mpInstance._Store.activeForwarders[i].name | ||
); | ||
var result = mpInstance._Store.activeForwarders[i].process( | ||
@@ -380,0 +379,0 @@ clonedEvent |
@@ -90,2 +90,3 @@ // | ||
this.getDeviceId = this._Persistence.getDeviceId; | ||
if (typeof window !== 'undefined') { | ||
@@ -215,2 +216,23 @@ if (window.mParticle && window.mParticle.config) { | ||
/** | ||
* Sets the device id | ||
* @method setDeviceId | ||
* @param {String} name device ID (UUIDv4-formatted string) | ||
*/ | ||
this.setDeviceId = function(guid) { | ||
var queued = queueIfNotInitialized(function() { | ||
self.setDeviceId(guid); | ||
}, self); | ||
if (queued) return; | ||
this._Persistence.setDeviceId(guid); | ||
}; | ||
/** | ||
* Returns a boolean for whether or not the SDKhas been fully initialized | ||
* @method isInitialized | ||
* @return {Boolean} a boolean for whether or not the SDK has been fully initialized | ||
*/ | ||
this.isInitialized = function() { | ||
return self._Store ? self._Store.isInitialized : false; | ||
}; | ||
/** | ||
* Gets the app name | ||
@@ -1191,5 +1213,2 @@ * @method getAppName | ||
}; | ||
this.isInitialized = function() { | ||
return self._Store ? self._Store.isInitialized : false; | ||
}; | ||
} | ||
@@ -1196,0 +1215,0 @@ |
@@ -100,2 +100,8 @@ import Polyfill from './polyfill'; | ||
}; | ||
this.setDeviceId = function(guid) { | ||
return self.getInstance().setDeviceId(guid); | ||
}; | ||
this.isInitialized = function() { | ||
return self.getInstance().isInitialized(); | ||
}; | ||
this.startNewSession = function() { | ||
@@ -102,0 +108,0 @@ self.getInstance().startNewSession(); |
@@ -1151,2 +1151,7 @@ import Constants from './constants'; | ||
this.setDeviceId = function(guid) { | ||
mpInstance._Store.deviceId = guid; | ||
self.update(); | ||
}; | ||
this.resetPersistence = function() { | ||
@@ -1153,0 +1158,0 @@ removeLocalStorage(StorageNames.localStorageName); |
@@ -77,2 +77,5 @@ import Constants from './constants'; | ||
if (config) { | ||
if (config.deviceId) { | ||
this.deviceId = config.deviceId; | ||
} | ||
if (config.hasOwnProperty('isDevelopmentMode')) { | ||
@@ -79,0 +82,0 @@ this.SDKConfig.isDevelopmentMode = mpInstance._Helpers.returnConvertedBoolean( |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1535194
27944