From 198125036e3d16473596277295008631aa67a8d9 Mon Sep 17 00:00:00 2001 From: 3link <34981284+3link@users.noreply.github.com> Date: Fri, 1 Sep 2023 08:37:09 +0200 Subject: [PATCH 1/4] Update LiveConnect --- modules/liveIntentIdSystem.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/liveIntentIdSystem.js b/modules/liveIntentIdSystem.js index 2d9e6b63a35..9a007a6bfb0 100644 --- a/modules/liveIntentIdSystem.js +++ b/modules/liveIntentIdSystem.js @@ -12,6 +12,7 @@ import { gdprDataHandler, uspDataHandler } from '../src/adapterManager.js'; import {getStorageManager} from '../src/storageManager.js'; import {MODULE_TYPE_UID} from '../src/activities/modules.js'; +const DEFAULT_AJAX_TIMEOUT = 5000 const EVENTS_TOPIC = 'pre_lips' const MODULE_NAME = 'liveIntentId'; const LI_PROVIDER_DOMAIN = 'liveintent.com'; @@ -99,12 +100,11 @@ function initializeLiveConnect(configParams) { if (configParams.url) { identityResolutionConfig.url = configParams.url } - if (configParams.ajaxTimeout) { - identityResolutionConfig.ajaxTimeout = configParams.ajaxTimeout; - } const liveConnectConfig = parseLiveIntentCollectorConfig(configParams.liCollectConfig); + liveConnectConfig.ajaxTimeout = configParams.ajaxTimeout || DEFAULT_AJAX_TIMEOUT; + if (!liveConnectConfig.appId && configParams.distributorId) { liveConnectConfig.distributorId = configParams.distributorId; identityResolutionConfig.source = configParams.distributorId; diff --git a/package.json b/package.json index 8b9b206b57c..43c0c1cc6f8 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "express": "^4.15.4", "fun-hooks": "^0.9.9", "just-clone": "^1.0.2", - "live-connect-js": "^6.0.0" + "live-connect-js": "^6.0.1" }, "optionalDependencies": { "fsevents": "^2.3.2" From 9f6e02b819d233945f00d5884e0e04bbfaafed7c Mon Sep 17 00:00:00 2001 From: 3link <34981284+3link@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:35:22 +0200 Subject: [PATCH 2/4] Separate timeout for the collctor --- modules/liveIntentIdSystem.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/liveIntentIdSystem.js b/modules/liveIntentIdSystem.js index 9a007a6bfb0..8fab266ecce 100644 --- a/modules/liveIntentIdSystem.js +++ b/modules/liveIntentIdSystem.js @@ -66,6 +66,7 @@ function parseLiveIntentCollectorConfig(collectConfig) { collectConfig.fpiStorageStrategy && (config.storageStrategy = collectConfig.fpiStorageStrategy); collectConfig.fpiExpirationDays && (config.expirationDays = collectConfig.fpiExpirationDays); collectConfig.collectorUrl && (config.collectorUrl = collectConfig.collectorUrl); + config.ajaxTimeout = collectConfig.ajaxTimeout || DEFAULT_AJAX_TIMEOUT; return config; } @@ -101,9 +102,9 @@ function initializeLiveConnect(configParams) { identityResolutionConfig.url = configParams.url } - const liveConnectConfig = parseLiveIntentCollectorConfig(configParams.liCollectConfig); + identityResolutionConfig.ajaxTimeout = configParams.ajaxTimeout || DEFAULT_AJAX_TIMEOUT; - liveConnectConfig.ajaxTimeout = configParams.ajaxTimeout || DEFAULT_AJAX_TIMEOUT; + const liveConnectConfig = parseLiveIntentCollectorConfig(configParams.liCollectConfig); if (!liveConnectConfig.appId && configParams.distributorId) { liveConnectConfig.distributorId = configParams.distributorId; From 7a8b0624c25788c5a787880bfafe92603fa4f0fb Mon Sep 17 00:00:00 2001 From: 3link <34981284+3link@users.noreply.github.com> Date: Fri, 1 Sep 2023 13:49:40 +0200 Subject: [PATCH 3/4] Update package-lock.json --- package-lock.json | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 82d5a79adce..c77ed85fdcf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,7 @@ "fun-hooks": "^0.9.9", "just-clone": "^1.0.2", "live-connect-js": "^6.0.0" + "live-connect-js": "^6.0.1" }, "devDependencies": { "@babel/eslint-parser": "^7.16.5", @@ -16260,12 +16261,12 @@ } }, "node_modules/live-connect-js": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/live-connect-js/-/live-connect-js-6.0.0.tgz", - "integrity": "sha512-4iMSeDPpueYoGEK4U152yKg+hj7jTxkzyfJUAGxtVHxdgjsjh8QmP3kLlTLBBrR/g/L/WCX47PBQxtGW9z8Rlw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/live-connect-js/-/live-connect-js-6.0.1.tgz", + "integrity": "sha512-+TwM7cjgyutqaMNlTQKNY9nJFDPpSWfoazSHmlWxOPlimp10PSZGABIbtulNGGpYbR/Zxgc+C/uW5OxqcNEPXg==", "dependencies": { "live-connect-common": "^3.0.0", - "live-connect-handlers": "^2.0.0", + "live-connect-handlers": "^2.1.0", "tiny-hashes": "1.0.1" }, "engines": { @@ -37923,12 +37924,12 @@ } }, "live-connect-js": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/live-connect-js/-/live-connect-js-6.0.0.tgz", - "integrity": "sha512-4iMSeDPpueYoGEK4U152yKg+hj7jTxkzyfJUAGxtVHxdgjsjh8QmP3kLlTLBBrR/g/L/WCX47PBQxtGW9z8Rlw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/live-connect-js/-/live-connect-js-6.0.1.tgz", + "integrity": "sha512-+TwM7cjgyutqaMNlTQKNY9nJFDPpSWfoazSHmlWxOPlimp10PSZGABIbtulNGGpYbR/Zxgc+C/uW5OxqcNEPXg==", "requires": { "live-connect-common": "^3.0.0", - "live-connect-handlers": "^2.0.0", + "live-connect-handlers": "^2.1.0", "tiny-hashes": "1.0.1" } }, From 0af849eea4609c2d6784c86ad322f9a4bf710dd8 Mon Sep 17 00:00:00 2001 From: 3link <34981284+3link@users.noreply.github.com> Date: Tue, 12 Sep 2023 08:35:42 +0200 Subject: [PATCH 4/4] Fix package-lock --- package-lock.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 0013ab90fc8..b0de52e2d6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,6 @@ "express": "^4.15.4", "fun-hooks": "^0.9.9", "just-clone": "^1.0.2", - "live-connect-js": "^6.0.0" "live-connect-js": "^6.0.1" }, "devDependencies": {