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

emarsys-integration-client

Package Overview
Dependencies
Maintainers
8
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emarsys-integration-client - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

15

dist/client/misc_api.js

@@ -23,2 +23,3 @@ 'use strict';

_this.deferreds = {};
_this.timeoutIds = {};
receiver.addMessageHandler('navigate:response', _this.handleResponse.bind(_this));

@@ -34,2 +35,3 @@ receiver.addMessageHandler('get_url:response', _this.handleResponse.bind(_this));

if (this.deferreds[message.data.id]) {
clearTimeout(this.timeoutIds[message.data.id]);
if (message.data.success) {

@@ -85,7 +87,20 @@ this.deferreds[message.data.id].resolve(message);

value: function sendMessage(eventName, eventPayload) {
var _this2 = this;
var eventId = this.getRandomId();
this.deferreds[eventId] = defer();
this.timeoutIds[eventId] = setTimeout(function () {
console.error('No response received for integrationClient request within ' + _this2.getResponseTimeout() + 'ms. Make sure emarsys-integration-js is included in the top iframe.');
_this2.deferreds[eventId].reject(new Error('No response recieved within timeout'));
}, this.getResponseTimeout());
this.transmitter.messageToEmarsys(eventName, Object.assign({}, eventPayload, { eventId: eventId }));
return this.deferreds[eventId].promise;
}
}, {
key: 'getResponseTimeout',
value: function getResponseTimeout() {
return 2000;
}
}], [{

@@ -92,0 +107,0 @@ key: 'create',

3

package.json

@@ -12,2 +12,3 @@ {

"test": "NODE_ENV=test mocha $(find . -name \"*.spec.js\" -not -path \"./node_modules/*\" -not -path \"./dist/*\") --require babel-register",
"test:watch": "npm run test -- --watch",
"validate-commit-msg": "validate-commit-msg",

@@ -52,3 +53,3 @@ "watch": "npm run build -- --watch"

"homepage": "https://github.com/emartech/emarsys-integration-client-js#readme",
"version": "2.4.0"
"version": "2.5.0"
}

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