From 61c21d7d037b67b4bee2953aaec32aba4c8afd48 Mon Sep 17 00:00:00 2001 From: Demetrio Girardi Date: Mon, 1 May 2023 07:33:42 -0700 Subject: [PATCH 1/2] Multiple modules: do not use bidderTimeout as TTL --- modules/ablidaBidAdapter.js | 2 +- modules/axonixBidAdapter.js | 2 +- modules/dspxBidAdapter.js | 2 +- modules/iqmBidAdapter.js | 2 +- modules/orbitsoftBidAdapter.js | 2 +- modules/radsBidAdapter.js | 2 +- modules/stvBidAdapter.js | 2 +- modules/underdogmediaBidAdapter.js | 2 +- modules/vdoaiBidAdapter.js | 2 +- modules/wipesBidAdapter.js | 2 +- modules/yieldoneBidAdapter.js | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/ablidaBidAdapter.js b/modules/ablidaBidAdapter.js index ca489a10a90..6c02f65f65c 100644 --- a/modules/ablidaBidAdapter.js +++ b/modules/ablidaBidAdapter.js @@ -77,7 +77,7 @@ export const spec = { const response = serverResponse.body; response.forEach(function(bid) { - bid.ttl = config.getConfig('_bidderTimeout'); + bid.ttl = 60 bidResponses.push(bid); }); return bidResponses; diff --git a/modules/axonixBidAdapter.js b/modules/axonixBidAdapter.js index 5435bf09059..20b4e354a46 100644 --- a/modules/axonixBidAdapter.js +++ b/modules/axonixBidAdapter.js @@ -150,7 +150,7 @@ export const spec = { for (const resp of response) { if (resp.requestId) { responses.push(Object.assign(resp, { - ttl: config.getConfig('_bidderTimeout') + ttl: 60 })); } } diff --git a/modules/dspxBidAdapter.js b/modules/dspxBidAdapter.js index 3bfb660cd7e..c4dcd714cd0 100644 --- a/modules/dspxBidAdapter.js +++ b/modules/dspxBidAdapter.js @@ -183,7 +183,7 @@ export const spec = { currency: currency, netRevenue: netRevenue, type: response.type, - ttl: config.getConfig('_bidderTimeout'), + ttl: 60, meta: { advertiserDomains: response.adomain || [] } diff --git a/modules/iqmBidAdapter.js b/modules/iqmBidAdapter.js index 1c36bafd3ce..56a92cfc3ff 100644 --- a/modules/iqmBidAdapter.js +++ b/modules/iqmBidAdapter.js @@ -155,7 +155,7 @@ export const spec = { auctionId: bidRequest.data.auctionId, mediaType: bidRequest.data.imp.mediatype, - ttl: bid.ttl || config.getConfig('_bidderTimeout') + ttl: bid.ttl || 60 }; if (bidRequest.data.imp.mediatype === VIDEO) { diff --git a/modules/orbitsoftBidAdapter.js b/modules/orbitsoftBidAdapter.js index d72a8719bd8..eab24840c70 100644 --- a/modules/orbitsoftBidAdapter.js +++ b/modules/orbitsoftBidAdapter.js @@ -122,7 +122,7 @@ export const spec = { const HEIGHT = serverBody.height; const CREATIVE = serverBody.content_url; const CALLBACK_UID = serverBody.callback_uid; - const TIME_TO_LIVE = config.getConfig('_bidderTimeout'); + const TIME_TO_LIVE = 60; const REFERER = utils.getWindowTop(); let bidRequest = request.bidRequest; if (CPM > 0 && WIDTH > 0 && HEIGHT > 0) { diff --git a/modules/radsBidAdapter.js b/modules/radsBidAdapter.js index fcb8c3a8c2a..3a435acb678 100644 --- a/modules/radsBidAdapter.js +++ b/modules/radsBidAdapter.js @@ -86,7 +86,7 @@ export const spec = { dealId: dealId, currency: currency, netRevenue: netRevenue, - ttl: config.getConfig('_bidderTimeout'), + ttl: 60, meta: { advertiserDomains: response.adomain || [] } diff --git a/modules/stvBidAdapter.js b/modules/stvBidAdapter.js index 32a3d289c61..d35d92cd746 100644 --- a/modules/stvBidAdapter.js +++ b/modules/stvBidAdapter.js @@ -128,7 +128,7 @@ export const spec = { dealId: dealId, currency: currency, netRevenue: netRevenue, - ttl: config.getConfig('_bidderTimeout'), + ttl: 60, meta: { advertiserDomains: response.adomain || [] } diff --git a/modules/underdogmediaBidAdapter.js b/modules/underdogmediaBidAdapter.js index 233d5f080a9..92b553fa8ad 100644 --- a/modules/underdogmediaBidAdapter.js +++ b/modules/underdogmediaBidAdapter.js @@ -377,7 +377,7 @@ function makeNotification(bid, mid, bidParam) { url += `;version=${UDM_ADAPTER_VERSION}`; url += ';cb=' + Math.random(); url += ';qqq=' + (1 / bid.cpm); - url += ';hbt=' + config.getConfig('_bidderTimeout'); + url += ';hbt=' + config.getConfig('bidderTimeout'); url += ';style=adapter'; url += ';vis=' + encodeURIComponent(document.visibilityState); diff --git a/modules/vdoaiBidAdapter.js b/modules/vdoaiBidAdapter.js index a57eae5f328..6a939141256 100644 --- a/modules/vdoaiBidAdapter.js +++ b/modules/vdoaiBidAdapter.js @@ -87,7 +87,7 @@ export const spec = { // dealId: dealId, currency: currency, netRevenue: netRevenue, - ttl: config.getConfig('_bidderTimeout'), + ttl: 60, // referrer: referrer, // ad: response.adm // ad: adCreative, diff --git a/modules/wipesBidAdapter.js b/modules/wipesBidAdapter.js index 3d040fee8d3..c693bd12069 100644 --- a/modules/wipesBidAdapter.js +++ b/modules/wipesBidAdapter.js @@ -50,7 +50,7 @@ function interpretResponse(serverResponse, bidRequest) { dealId: response.deal_id, currency: 'JPY', netRevenue: netRevenue, - ttl: config.getConfig('_bidderTimeout'), + ttl: 60, referrer: bidRequest.data.r || '', mediaType: BANNER, ad: response.ad_tag, diff --git a/modules/yieldoneBidAdapter.js b/modules/yieldoneBidAdapter.js index fd804eed2e7..70dee747ca6 100644 --- a/modules/yieldoneBidAdapter.js +++ b/modules/yieldoneBidAdapter.js @@ -147,7 +147,7 @@ export const spec = { dealId: dealId, currency: currency, netRevenue: netRevenue, - ttl: config.getConfig('_bidderTimeout'), + ttl: 60, referrer: referrer, meta: { advertiserDomains: response.adomain ? response.adomain : [] From b51b584c351cbd5a18df092521984a8f1466371f Mon Sep 17 00:00:00 2001 From: Demetrio Girardi Date: Mon, 1 May 2023 07:49:58 -0700 Subject: [PATCH 2/2] Fix lint --- modules/ablidaBidAdapter.js | 7 +++---- modules/axonixBidAdapter.js | 10 +++++----- modules/dspxBidAdapter.js | 3 +-- modules/iqmBidAdapter.js | 1 - modules/orbitsoftBidAdapter.js | 1 - modules/radsBidAdapter.js | 5 ++--- modules/stvBidAdapter.js | 7 +++---- modules/underdogmediaBidAdapter.js | 19 ++++++++----------- modules/vdoaiBidAdapter.js | 3 +-- modules/wipesBidAdapter.js | 3 +-- modules/yieldoneBidAdapter.js | 5 ++--- 11 files changed, 26 insertions(+), 38 deletions(-) diff --git a/modules/ablidaBidAdapter.js b/modules/ablidaBidAdapter.js index 6c02f65f65c..805a2020fb4 100644 --- a/modules/ablidaBidAdapter.js +++ b/modules/ablidaBidAdapter.js @@ -1,8 +1,7 @@ -import { triggerPixel } from '../src/utils.js'; -import {config} from '../src/config.js'; +import {triggerPixel} from '../src/utils.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; -import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; -import { convertOrtbRequestToProprietaryNative } from '../src/native.js'; +import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js'; +import {convertOrtbRequestToProprietaryNative} from '../src/native.js'; const BIDDER_CODE = 'ablida'; const ENDPOINT_URL = 'https://bidder.ablida.net/prebid'; diff --git a/modules/axonixBidAdapter.js b/modules/axonixBidAdapter.js index 20b4e354a46..87c3aff444a 100644 --- a/modules/axonixBidAdapter.js +++ b/modules/axonixBidAdapter.js @@ -1,8 +1,8 @@ -import { isArray, logError, deepAccess, isEmpty, triggerPixel, replaceAuctionPrice } from '../src/utils.js'; -import { registerBidder } from '../src/adapters/bidderFactory.js'; -import { BANNER, VIDEO } from '../src/mediaTypes.js'; -import { config } from '../src/config.js'; -import { ajax } from '../src/ajax.js'; +import {deepAccess, isArray, isEmpty, logError, replaceAuctionPrice, triggerPixel} from '../src/utils.js'; +import {registerBidder} from '../src/adapters/bidderFactory.js'; +import {BANNER, VIDEO} from '../src/mediaTypes.js'; +import {config} from '../src/config.js'; +import {ajax} from '../src/ajax.js'; const BIDDER_CODE = 'axonix'; const BIDDER_VERSION = '1.0.2'; diff --git a/modules/dspxBidAdapter.js b/modules/dspxBidAdapter.js index c4dcd714cd0..74a93ce086e 100644 --- a/modules/dspxBidAdapter.js +++ b/modules/dspxBidAdapter.js @@ -1,5 +1,4 @@ -import {deepAccess, getBidIdParameter, logError, logMessage, logWarn, isFn} from '../src/utils.js'; -import {config} from '../src/config.js'; +import {deepAccess, getBidIdParameter, isFn, logError, logMessage, logWarn} from '../src/utils.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; import {BANNER, VIDEO} from '../src/mediaTypes.js'; import {Renderer} from '../src/Renderer.js'; diff --git a/modules/iqmBidAdapter.js b/modules/iqmBidAdapter.js index 56a92cfc3ff..51cd8b3bdca 100644 --- a/modules/iqmBidAdapter.js +++ b/modules/iqmBidAdapter.js @@ -1,6 +1,5 @@ import {_each, deepAccess, getBidIdParameter, isArray} from '../src/utils.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; -import {config} from '../src/config.js'; import {BANNER, VIDEO} from '../src/mediaTypes.js'; import {INSTREAM} from '../src/video.js'; diff --git a/modules/orbitsoftBidAdapter.js b/modules/orbitsoftBidAdapter.js index eab24840c70..4c3f2e38c58 100644 --- a/modules/orbitsoftBidAdapter.js +++ b/modules/orbitsoftBidAdapter.js @@ -1,6 +1,5 @@ import * as utils from '../src/utils.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; -import {config} from '../src/config.js'; const BIDDER_CODE = 'orbitsoft'; let styleParamsMap = { diff --git a/modules/radsBidAdapter.js b/modules/radsBidAdapter.js index 3a435acb678..ae16bcf9d83 100644 --- a/modules/radsBidAdapter.js +++ b/modules/radsBidAdapter.js @@ -1,7 +1,6 @@ -import { deepAccess } from '../src/utils.js'; -import {config} from '../src/config.js'; +import {deepAccess} from '../src/utils.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; -import { BANNER, VIDEO } from '../src/mediaTypes.js'; +import {BANNER, VIDEO} from '../src/mediaTypes.js'; const BIDDER_CODE = 'rads'; const ENDPOINT_URL = 'https://rads.recognified.net/md.request.php'; diff --git a/modules/stvBidAdapter.js b/modules/stvBidAdapter.js index d35d92cd746..ec88ee9c620 100644 --- a/modules/stvBidAdapter.js +++ b/modules/stvBidAdapter.js @@ -1,7 +1,6 @@ -import { deepAccess } from '../src/utils.js'; -import { config } from '../src/config.js'; -import { registerBidder } from '../src/adapters/bidderFactory.js'; -import { BANNER, VIDEO } from '../src/mediaTypes.js'; +import {deepAccess} from '../src/utils.js'; +import {registerBidder} from '../src/adapters/bidderFactory.js'; +import {BANNER, VIDEO} from '../src/mediaTypes.js'; import {includes} from '../src/polyfill.js'; const BIDDER_CODE = 'stv'; diff --git a/modules/underdogmediaBidAdapter.js b/modules/underdogmediaBidAdapter.js index 92b553fa8ad..bdc5c04279f 100644 --- a/modules/underdogmediaBidAdapter.js +++ b/modules/underdogmediaBidAdapter.js @@ -1,21 +1,18 @@ import { - logMessage, + deepAccess, flatten, - parseSizesInput, + getWindowSelf, + getWindowTop, isGptPubadsDefined, isSlotMatchingAdUnitCode, logInfo, + logMessage, logWarn, - getWindowSelf, - getWindowTop, - deepAccess + parseSizesInput } from '../src/utils.js'; -import { - config -} from '../src/config.js'; -import { - registerBidder -} from '../src/adapters/bidderFactory.js'; +import {config} from '../src/config.js'; +import {registerBidder} from '../src/adapters/bidderFactory.js'; + const BIDDER_CODE = 'underdogmedia'; const UDM_ADAPTER_VERSION = '7.30V'; const UDM_VENDOR_ID = '159'; diff --git a/modules/vdoaiBidAdapter.js b/modules/vdoaiBidAdapter.js index 6a939141256..167c378ac6d 100644 --- a/modules/vdoaiBidAdapter.js +++ b/modules/vdoaiBidAdapter.js @@ -1,5 +1,4 @@ -import { getAdUnitSizes } from '../src/utils.js'; -import {config} from '../src/config.js'; +import {getAdUnitSizes} from '../src/utils.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; import {BANNER, VIDEO} from '../src/mediaTypes.js'; diff --git a/modules/wipesBidAdapter.js b/modules/wipesBidAdapter.js index c693bd12069..56a4aeecd71 100644 --- a/modules/wipesBidAdapter.js +++ b/modules/wipesBidAdapter.js @@ -1,5 +1,4 @@ -import { logWarn } from '../src/utils.js'; -import {config} from '../src/config.js'; +import {logWarn} from '../src/utils.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; import {BANNER} from '../src/mediaTypes.js'; diff --git a/modules/yieldoneBidAdapter.js b/modules/yieldoneBidAdapter.js index 70dee747ca6..2ff747a238a 100644 --- a/modules/yieldoneBidAdapter.js +++ b/modules/yieldoneBidAdapter.js @@ -1,8 +1,7 @@ import {deepAccess, isEmpty, isStr, logWarn, parseSizesInput} from '../src/utils.js'; -import {config} from '../src/config.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; -import { Renderer } from '../src/Renderer.js'; -import { BANNER, VIDEO } from '../src/mediaTypes.js'; +import {Renderer} from '../src/Renderer.js'; +import {BANNER, VIDEO} from '../src/mediaTypes.js'; /** * @typedef {import('../src/adapters/bidderFactory').Bid} Bid