prebid.js 9.46.0 → 9.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/codeql/queries/jsonRequestContentType.ql +18 -0
- package/AGENTS.md +42 -0
- package/CLAUDE.md +1 -0
- package/babelConfig.js +1 -1
- package/dist/33acrossAnalyticsAdapter.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/BTBidAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adagioUtils.js +1 -1
- package/dist/addefendBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adstirBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/advangUtils.js +1 -1
- package/dist/adverxoBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/agmaAnalyticsAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/aniviewBidAdapter.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/beopBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bitmediaBidAdapter.js +1 -1
- package/dist/blueBidAdapter.js +1 -1
- package/dist/blueUtils.js +1 -0
- package/dist/bmsBidAdapter.js +1 -1
- package/dist/bridBidAdapter.js +1 -1
- package/dist/bridgeuppBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/browsiUtils.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/chunk-core.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/contxtfulBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/czechAdIdSystem.js +1 -1
- package/dist/dailymotionBidAdapter.js +1 -1
- package/dist/debugging-standalone.js +1 -1
- package/dist/dependencies.json +16 -2
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/dxkultureBidAdapter.js +1 -1
- package/dist/dynamicAdBoostRtdProvider.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/eskimiBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/exadsBidAdapter.js +1 -1
- package/dist/excoBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/gptUtils.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsBidAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmobiBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqAnalyticsAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/kimberliteBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentId.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/luceadBidAdapter.js +1 -1
- package/dist/luponmediaBidAdapter.js +1 -1
- package/dist/mabidderBidAdapter.js +1 -1
- package/dist/madsenseBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/medianetBidAdapter.js +1 -1
- package/dist/medianetUtils.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/missenaBidAdapter.js +1 -1
- package/dist/mobilefuseBidAdapter.js +1 -1
- package/dist/nativeryBidAdapter.js +1 -0
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/nexx360Utils.js +1 -1
- package/dist/nobidAnalyticsAdapter.js +1 -1
- package/dist/nobidBidAdapter.js +1 -1
- package/dist/nodalsAiRtdProvider.js +1 -1
- package/dist/not-for-prod/prebid.js +187 -184
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/orbidderBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/pinkLionBidAdapter.js +1 -0
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubmaticRtdProvider.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pubxaiRtdProvider.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseUtils.js +1 -1
- package/dist/rtbhouseBidAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/showheroes-bsBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/snigelBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sparteoBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stroeerCoreBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/tappxBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/terceptAnalyticsAdapter.js +1 -1
- package/dist/themoneytizerBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/uid2IdSystem.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/unifiedIdSystem.js +1 -1
- package/dist/unrulyBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooUtils.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/weboramaRtdProvider.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/xeUtils.js +1 -1
- package/dist/yahooAdsBidAdapter.js +1 -1
- package/dist/yandexBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/eslint.config.js +1 -3
- package/gulpHelpers.js +3 -6
- package/gulpfile.js +25 -24
- package/karma.conf.maker.js +1 -3
- package/libraries/advangUtils/index.js +3 -4
- package/libraries/blueUtils/bidderUtils.js +113 -0
- package/libraries/browsiUtils/browsiUtils.js +1 -2
- package/libraries/gptUtils/gptUtils.js +1 -2
- package/libraries/liveIntentId/shared.js +4 -0
- package/libraries/xeUtils/bidderUtils.js +3 -4
- package/modules/adagioBidAdapter.js +1 -2
- package/modules/addefendBidAdapter.md +1 -1
- package/modules/adtrgtmeBidAdapter.js +6 -8
- package/modules/aduptechBidAdapter.md +1 -1
- package/modules/adverxoBidAdapter.js +3 -3
- package/modules/blueBidAdapter.js +24 -104
- package/modules/bmsBidAdapter.js +25 -105
- package/modules/concertBidAdapter.md +1 -1
- package/modules/contxtfulBidAdapter.js +56 -10
- package/modules/conversantBidAdapter.js +0 -58
- package/modules/cwireBidAdapter.js +8 -0
- package/modules/czechAdIdSystem.js +13 -3
- package/modules/dynamicAdBoostRtdProvider.js +16 -33
- package/modules/dynamicAdBoostRtdProvider.md +1 -6
- package/modules/ixBidAdapter.js +2 -3
- package/modules/luponmediaBidAdapter.js +117 -522
- package/modules/luponmediaBidAdapter.md +2 -3
- package/modules/mediasquareBidAdapter.js +14 -20
- package/modules/microadBidAdapter.js +0 -1
- package/modules/nativeryBidAdapter.js +135 -0
- package/modules/nativeryBidAdapter.md +95 -0
- package/modules/nativoBidAdapter.js +3 -3
- package/modules/onetagBidAdapter.js +0 -1
- package/modules/pinkLionBidAdapter.js +17 -0
- package/modules/pinkLionBidAdapter.md +79 -0
- package/modules/prebidServerBidAdapter/ortbConverter.js +1 -1
- package/modules/priceFloors.js +2 -2
- package/modules/pubmaticBidAdapter.js +4 -1
- package/modules/qortexRtdProvider.md +1 -1
- package/modules/reconciliationRtdProvider.md +4 -4
- package/modules/rtbhouseBidAdapter.js +4 -83
- package/modules/rubiconBidAdapter.js +1 -1
- package/modules/sspBCBidAdapter.js +1 -1
- package/modules/stroeerCoreBidAdapter.js +3 -3
- package/modules/stvBidAdapter.js +19 -14
- package/modules/topicsFpdModule.md +1 -1
- package/modules/unifiedIdSystem.js +8 -1
- package/modules/userId/eids.js +15 -0
- package/modules/videoModule/index.js +0 -1
- package/modules/videoModule/videoImpressionVerifier.js +0 -1
- package/modules/yieldlabBidAdapter.js +1 -2
- package/modules/yieldmoBidAdapter.js +1 -2
- package/package.json +13 -20
- package/src/Renderer.js +1 -2
- package/src/adapterManager.js +14 -4
- package/src/auction.js +2 -3
- package/src/config.js +1 -2
- package/src/cpmBucketManager.js +1 -2
- package/src/secureCreatives.js +2 -3
- package/src/targeting.js +1 -2
- package/test/fake-server/README.md +3 -3
- package/test/helpers/index_adapter_utils.js +2 -2
- package/test/helpers/testing-utils.js +1 -1
- package/test/spec/auctionmanager_spec.js +2 -3
- package/test/spec/fpd/enrichment_spec.js +1 -1
- package/test/spec/libraries/greedy/greedyPromise_spec.js +2 -2
- package/test/spec/modules/adfBidAdapter_spec.js +1 -1
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +25 -9
- package/test/spec/modules/adtrgtmeBidAdapter_spec.js +2 -4
- package/test/spec/modules/adverxoBidAdapter_spec.js +25 -1
- package/test/spec/modules/afpBidAdapter_spec.js +0 -1
- package/test/spec/modules/bliinkBidAdapter_spec.js +15 -7
- package/test/spec/modules/contxtfulBidAdapter_spec.js +606 -82
- package/test/spec/modules/conversantBidAdapter_spec.js +1 -139
- package/test/spec/modules/cwireBidAdapter_spec.js +2 -2
- package/test/spec/modules/czechAdIdSystem_spec.js +4 -4
- package/test/spec/modules/displayioBidAdapter_spec.js +1 -1
- package/test/spec/modules/dynamicAdBoostRtdProvider_spec.js +0 -42
- package/test/spec/modules/enrichmentLiftMeasurement_spec.js +8 -8
- package/test/spec/modules/hypelabBidAdapter_spec.js +17 -11
- package/test/spec/modules/iasRtdProvider_spec.js +2 -2
- package/test/spec/modules/id5IdSystem_spec.js +1 -1
- package/test/spec/modules/idxIdSystem_spec.js +1 -2
- package/test/spec/modules/intentIqAnalyticsAdapter_spec.js +25 -25
- package/test/spec/modules/intentIqIdSystem_spec.js +32 -32
- package/test/spec/modules/kargoBidAdapter_spec.js +11 -5
- package/test/spec/modules/liveIntentIdSystem_spec.js +14 -0
- package/test/spec/modules/lmpIdSystem_spec.js +1 -2
- package/test/spec/modules/lockrAIMIdSystem_spec.js +2 -2
- package/test/spec/modules/luceadBidAdapter_spec.js +1 -1
- package/test/spec/modules/luponmediaBidAdapter_spec.js +186 -324
- package/test/spec/modules/mediaeyesBidAdapter_spec.js +1 -1
- package/test/spec/modules/mediakeysBidAdapter_spec.js +1 -2
- package/test/spec/modules/mediasquareBidAdapter_spec.js +13 -2
- package/test/spec/modules/missenaBidAdapter_spec.js +1 -1
- package/test/spec/modules/nativeryBidAdapter_spec.js +195 -0
- package/test/spec/modules/nexx360BidAdapter_spec.js +6 -6
- package/test/spec/modules/oguryBidAdapter_spec.js +2 -2
- package/test/spec/modules/omsBidAdapter_spec.js +1 -1
- package/test/spec/modules/onetagBidAdapter_spec.js +1 -2
- package/test/spec/modules/onomagicBidAdapter_spec.js +2 -2
- package/test/spec/modules/overtoneRtdProvider_spec.mjs +1 -1
- package/test/spec/modules/permutiveIdentityManagerIdSystem_spec.js +17 -14
- package/test/spec/modules/pinkLionBidAdapter_spec.js +480 -0
- package/test/spec/modules/prebidServerBidAdapter_spec.js +2 -2
- package/test/spec/modules/previousAuctionInfo_spec.js +2 -2
- package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +1 -1
- package/test/spec/modules/pubmaticBidAdapter_spec.js +19 -1
- package/test/spec/modules/pubmaticRtdProvider_spec.js +16 -17
- package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +2 -2
- package/test/spec/modules/rtbhouseBidAdapter_spec.js +0 -182
- package/test/spec/modules/rubiconBidAdapter_spec.js +3 -4
- package/test/spec/modules/sizeMappingV2_spec.js +1 -1
- package/test/spec/modules/sizeMapping_spec.js +2 -3
- package/test/spec/modules/stroeerCoreBidAdapter_spec.js +36 -26
- package/test/spec/modules/stvBidAdapter_spec.js +108 -40
- package/test/spec/modules/topLevelPaapi_spec.js +1 -1
- package/test/spec/modules/tpmnBidAdapter_spec.js +1 -1
- package/test/spec/modules/ttdBidAdapter_spec.js +1 -1
- package/test/spec/modules/unifiedIdSystem_spec.js +20 -0
- package/test/spec/modules/userId_spec.js +1 -1
- package/test/spec/modules/vibrantmediaBidAdapter_spec.js +1 -1
- package/test/spec/modules/videoModule/submodules/videojsVideoProvider_spec.js +1 -1
- package/test/spec/modules/yieldmoBidAdapter_spec.js +2 -2
- package/test/spec/modules/zeotapIdPlusIdSystem_spec.js +1 -2
- package/test/spec/unit/core/adapterManager_spec.js +29 -17
- package/test/spec/unit/core/targeting_spec.js +1 -1
- package/test/spec/unit/pbjs_api_spec.js +4 -5
- package/test/spec/utils_spec.js +20 -12
- package/test/test_deps.js +1 -1
- package/nightwatch.browserstack.json +0 -46
- package/nightwatch.conf.js +0 -36
- package/nightwatch.json +0 -40
|
@@ -58,11 +58,11 @@ export const spec = {
|
|
|
58
58
|
schain: anyBid.schain
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
const
|
|
61
|
+
const eids = anyBid.userIdAsEids;
|
|
62
62
|
|
|
63
|
-
if (!isEmpty(
|
|
63
|
+
if (!isEmpty(eids)) {
|
|
64
64
|
basePayload.user = {
|
|
65
|
-
|
|
65
|
+
eids: eids
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
package/modules/stvBidAdapter.js
CHANGED
|
@@ -191,43 +191,48 @@ function serializeSChain(schain) {
|
|
|
191
191
|
function serializeUids(bidRequest) {
|
|
192
192
|
let uids = [];
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
if (bidRequest.userIdAsEids === undefined || !Array.isArray(bidRequest.userIdAsEids)) {
|
|
195
|
+
return '';
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
let buids = {};
|
|
199
|
+
bidRequest.userIdAsEids.forEach((src) => (buids[deepAccess(src, 'source')] = deepAccess(src, 'uids.0')));
|
|
200
|
+
|
|
201
|
+
let id5 = deepAccess(buids['id5-sync.com'], 'id');
|
|
195
202
|
if (id5) {
|
|
196
203
|
uids.push(encodeURIComponent('id5:' + id5));
|
|
197
|
-
let id5Linktype = deepAccess(
|
|
204
|
+
let id5Linktype = deepAccess(buids['id5-sync.com'], 'ext.linkType');
|
|
198
205
|
if (id5Linktype) {
|
|
199
206
|
uids.push(encodeURIComponent('id5_linktype:' + id5Linktype));
|
|
200
207
|
}
|
|
201
208
|
}
|
|
202
|
-
let netId = deepAccess(
|
|
209
|
+
let netId = deepAccess(buids['netid.de'], 'id');
|
|
203
210
|
if (netId) {
|
|
204
211
|
uids.push(encodeURIComponent('netid:' + netId));
|
|
205
212
|
}
|
|
206
|
-
let uId2 = deepAccess(
|
|
213
|
+
let uId2 = deepAccess(buids['uidapi.com'], 'id');
|
|
207
214
|
if (uId2) {
|
|
208
215
|
uids.push(encodeURIComponent('uid2:' + uId2));
|
|
209
216
|
}
|
|
210
|
-
let sharedId = deepAccess(
|
|
217
|
+
let sharedId = deepAccess(buids['pubcid.org'], 'id');
|
|
211
218
|
if (sharedId) {
|
|
212
219
|
uids.push(encodeURIComponent('sharedid:' + sharedId));
|
|
213
220
|
}
|
|
214
|
-
let liverampId = deepAccess(
|
|
221
|
+
let liverampId = deepAccess(buids['liveramp.com'], 'id');
|
|
215
222
|
if (liverampId) {
|
|
216
223
|
uids.push(encodeURIComponent('liverampid:' + liverampId));
|
|
217
224
|
}
|
|
218
|
-
let criteoId = deepAccess(
|
|
225
|
+
let criteoId = deepAccess(buids['criteo.com'], 'id');
|
|
219
226
|
if (criteoId) {
|
|
220
227
|
uids.push(encodeURIComponent('criteoid:' + criteoId));
|
|
221
228
|
}
|
|
222
|
-
|
|
223
|
-
let utiqId = deepAccess(bidRequest, 'userId.utiq.id');
|
|
229
|
+
let utiqId = deepAccess(buids['utiq.com'], 'id');
|
|
224
230
|
if (utiqId) {
|
|
225
231
|
uids.push(encodeURIComponent('utiq:' + utiqId));
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
232
|
+
}
|
|
233
|
+
let euidId = deepAccess(buids['euid.eu'], 'id');
|
|
234
|
+
if (euidId) {
|
|
235
|
+
uids.push(encodeURIComponent('euid:' + euidId));
|
|
231
236
|
}
|
|
232
237
|
|
|
233
238
|
return uids.join(',');
|
|
@@ -84,7 +84,7 @@ pbjs.setConfig({
|
|
|
84
84
|
| Field | Required? | Type | Description |
|
|
85
85
|
|---|---|---|---|
|
|
86
86
|
| topics.maxTopicCaller | no | integer | Defines the maximum numbers of Bidders Iframe which needs to be loaded on the publisher page. Default is 1 which is hardcoded in Module. Eg: topics.maxTopicCaller is set to 3. If there are 10 bidders configured along with their iframe URLS, random 3 bidders iframe URL is loaded which will call TOPICS API. If topics.maxTopicCaller is set to 0, it will load random 1(default) bidder iframe atleast. |
|
|
87
|
-
| topics.bidders | no | Array of objects | Array of topics callers with the iframe locations and other necessary
|
|
87
|
+
| topics.bidders | no | Array of objects | Array of topics callers with the iframe locations and other necessary information like bidder(Bidder code) and expiry. Default Array of topics in the module itself.|
|
|
88
88
|
| topics.bidders[].bidder | yes | string | Bidder Code of the bidder(SSP). |
|
|
89
89
|
| topics.bidders[].iframeURL | yes | string | URL which is hosted on bidder/SSP/third-party domains which will call Topics API. |
|
|
90
90
|
| topics.bidders[].expiry | no | integer | Max number of days where Topics data will be persist. If Data is stored for more than mentioned expiry day, it will be deleted from storage. Default is 21 days which is hardcoded in Module. |
|
|
@@ -75,7 +75,14 @@ export const unifiedIdSubmodule = {
|
|
|
75
75
|
};
|
|
76
76
|
return {callback: resp};
|
|
77
77
|
},
|
|
78
|
-
eids: {
|
|
78
|
+
eids: {
|
|
79
|
+
tdid: {
|
|
80
|
+
...UID1_EIDS.tdid,
|
|
81
|
+
mm: 4,
|
|
82
|
+
inserter: 'adserver.org',
|
|
83
|
+
matcher: 'adserver.org'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
79
86
|
};
|
|
80
87
|
|
|
81
88
|
submodule('userId', unifiedIdSubmodule);
|
package/modules/userId/eids.js
CHANGED
|
@@ -22,6 +22,21 @@ function createEidObject(userIdData, subModuleKey, eidConf) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
eid.uids = [uid];
|
|
25
|
+
if (eidConf['inserter'] || isFn(eidConf['getInserter'])) {
|
|
26
|
+
const inserter = isFn(eidConf['getInserter']) ? eidConf['getInserter'](userIdData) : eidConf['inserter'];
|
|
27
|
+
if (inserter != null) {
|
|
28
|
+
eid.inserter = inserter;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (eidConf['matcher'] || isFn(eidConf['getMatcher'])) {
|
|
32
|
+
const matcher = isFn(eidConf['getMatcher']) ? eidConf['getMatcher'](userIdData) : eidConf['matcher'];
|
|
33
|
+
if (matcher != null) {
|
|
34
|
+
eid.matcher = matcher;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (eidConf['mm'] != null) {
|
|
38
|
+
eid.mm = eidConf['mm'];
|
|
39
|
+
}
|
|
25
40
|
// getEidExt
|
|
26
41
|
if (isFn(eidConf['getEidExt'])) {
|
|
27
42
|
const eidExt = eidConf['getEidExt'](userIdData);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { _each, deepAccess, isArray, isEmptyStr, isFn, isPlainObject, timestamp } from '../src/utils.js';
|
|
2
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
|
-
import { } from '../src/polyfill.js';
|
|
4
3
|
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
|
|
5
4
|
import { Renderer } from '../src/Renderer.js';
|
|
6
5
|
import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
|
|
@@ -450,7 +449,7 @@ function getContentObject(bid) {
|
|
|
450
449
|
* Creates a string for iab_content object by
|
|
451
450
|
* 1. flatten the iab content object
|
|
452
451
|
* 2. encoding the values
|
|
453
|
-
* 3. joining array of defined keys ('keyword', 'cat') into one value
|
|
452
|
+
* 3. joining array of defined keys ('keyword', 'cat') into one value separated with '|'
|
|
454
453
|
* 4. encoding the whole string
|
|
455
454
|
* @param {Object} iabContent
|
|
456
455
|
* @returns {String}
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
import {BANNER, VIDEO} from '../src/mediaTypes.js';
|
|
18
18
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
19
19
|
import {Renderer} from '../src/Renderer.js';
|
|
20
|
-
import {find} from '../src/polyfill.js';
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
22
|
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
|
|
@@ -326,7 +325,7 @@ function createNewBannerBid(response) {
|
|
|
326
325
|
* @param bidRequest server request
|
|
327
326
|
*/
|
|
328
327
|
function createNewVideoBid(response, bidRequest) {
|
|
329
|
-
const imp =
|
|
328
|
+
const imp = (deepAccess(bidRequest, 'data.imp') || []).find(imp => imp.id === response.impid);
|
|
330
329
|
|
|
331
330
|
let result = {
|
|
332
331
|
dealId: response.dealid,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prebid.js",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.48.0",
|
|
4
4
|
"description": "Header Bidding Management Library",
|
|
5
5
|
"main": "src/prebid.public.js",
|
|
6
6
|
"exports": {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@babel/eslint-parser": "^7.16.5",
|
|
49
|
+
"@babel/plugin-transform-runtime": "^7.27.4",
|
|
49
50
|
"@babel/register": "^7.24.6",
|
|
50
51
|
"@eslint/compat": "^1.2.7",
|
|
51
52
|
"@wdio/browserstack-service": "^9.0.5",
|
|
@@ -54,7 +55,6 @@
|
|
|
54
55
|
"@wdio/local-runner": "^9.0.5",
|
|
55
56
|
"@wdio/mocha-framework": "^9.12.6",
|
|
56
57
|
"@wdio/spec-reporter": "^8.29.0",
|
|
57
|
-
"ajv": "6.12.3",
|
|
58
58
|
"assert": "^2.0.0",
|
|
59
59
|
"babel-loader": "^8.0.5",
|
|
60
60
|
"babel-plugin-istanbul": "^6.1.1",
|
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
"coveralls": "^3.1.0",
|
|
64
64
|
"deep-equal": "^2.0.3",
|
|
65
65
|
"documentation": "^14.0.0",
|
|
66
|
-
"es5-shim": "^4.5.14",
|
|
67
66
|
"eslint": "^9.22.0",
|
|
68
67
|
"eslint-plugin-import": "^2.31.0",
|
|
69
68
|
"eslint-plugin-jsdoc": "^50.6.6",
|
|
70
69
|
"execa": "^1.0.0",
|
|
71
70
|
"faker": "^5.5.3",
|
|
72
|
-
"
|
|
71
|
+
"fancy-log": "^2.0.0",
|
|
72
|
+
"fs-extra": "^11.3.0",
|
|
73
73
|
"globals": "^16.0.0",
|
|
74
|
-
"gulp": "^
|
|
74
|
+
"gulp": "^5.0.1",
|
|
75
75
|
"gulp-clean": "^0.4.0",
|
|
76
76
|
"gulp-concat": "^2.6.0",
|
|
77
77
|
"gulp-connect": "^5.7.0",
|
|
@@ -79,10 +79,6 @@
|
|
|
79
79
|
"gulp-js-escape": "^1.0.1",
|
|
80
80
|
"gulp-rename": "^2.0.0",
|
|
81
81
|
"gulp-replace": "^1.0.0",
|
|
82
|
-
"gulp-shell": "^0.8.0",
|
|
83
|
-
"gulp-sourcemaps": "^3.0.0",
|
|
84
|
-
"gulp-terser": "^2.0.1",
|
|
85
|
-
"gulp-util": "^3.0.0",
|
|
86
82
|
"is-docker": "^2.2.1",
|
|
87
83
|
"istanbul": "^0.4.5",
|
|
88
84
|
"karma": "^6.3.2",
|
|
@@ -92,9 +88,7 @@
|
|
|
92
88
|
"karma-chrome-launcher": "^3.1.0",
|
|
93
89
|
"karma-coverage": "^2.0.1",
|
|
94
90
|
"karma-coverage-istanbul-reporter": "^3.0.3",
|
|
95
|
-
"karma-es5-shim": "^0.0.4",
|
|
96
91
|
"karma-firefox-launcher": "^2.1.0",
|
|
97
|
-
"karma-ie-launcher": "^1.0.0",
|
|
98
92
|
"karma-mocha": "^2.0.1",
|
|
99
93
|
"karma-mocha-reporter": "^2.2.5",
|
|
100
94
|
"karma-opera-launcher": "^1.0.0",
|
|
@@ -110,6 +104,7 @@
|
|
|
110
104
|
"neostandard": "^0.12.1",
|
|
111
105
|
"node-html-parser": "^6.1.5",
|
|
112
106
|
"opn": "^5.4.0",
|
|
107
|
+
"plugin-error": "^2.0.1",
|
|
113
108
|
"resolve-from": "^5.0.0",
|
|
114
109
|
"sinon": "^4.5.0",
|
|
115
110
|
"through2": "^4.0.2",
|
|
@@ -127,17 +122,15 @@
|
|
|
127
122
|
"yargs": "^1.3.1"
|
|
128
123
|
},
|
|
129
124
|
"dependencies": {
|
|
130
|
-
"@babel/core": "^7.
|
|
131
|
-
"@babel/
|
|
132
|
-
"@babel/
|
|
133
|
-
"
|
|
134
|
-
"core-js": "^3.13.0",
|
|
135
|
-
"core-js-pure": "^3.13.0",
|
|
125
|
+
"@babel/core": "^7.27.4",
|
|
126
|
+
"@babel/preset-env": "^7.27.2",
|
|
127
|
+
"@babel/runtime": "^7.27.6",
|
|
128
|
+
"core-js": "^3.42.0",
|
|
136
129
|
"crypto-js": "^4.2.0",
|
|
137
|
-
"dlv": "1.1.3",
|
|
138
|
-
"dset": "3.1.4",
|
|
130
|
+
"dlv": "^1.1.3",
|
|
131
|
+
"dset": "^3.1.4",
|
|
139
132
|
"express": "^4.15.4",
|
|
140
|
-
"fun-hooks": "^0.9.
|
|
133
|
+
"fun-hooks": "^0.9.10",
|
|
141
134
|
"gulp-wrap": "^0.15.0",
|
|
142
135
|
"klona": "^2.0.6",
|
|
143
136
|
"live-connect-js": "^7.2.0"
|
package/src/Renderer.js
CHANGED
|
@@ -2,7 +2,6 @@ import { loadExternalScript } from './adloader.js';
|
|
|
2
2
|
import {
|
|
3
3
|
logError, logWarn, logMessage
|
|
4
4
|
} from './utils.js';
|
|
5
|
-
import {find} from './polyfill.js';
|
|
6
5
|
import {getGlobal} from './prebidGlobal.js';
|
|
7
6
|
import { MODULE_TYPE_PREBID } from './activities/modules.js';
|
|
8
7
|
|
|
@@ -136,7 +135,7 @@ export function executeRenderer(renderer, bid, doc) {
|
|
|
136
135
|
|
|
137
136
|
function isRendererPreferredFromAdUnit(adUnitCode) {
|
|
138
137
|
const adUnits = pbjsInstance.adUnits;
|
|
139
|
-
const adUnit = find(
|
|
138
|
+
const adUnit = adUnits.find(adUnit => {
|
|
140
139
|
return adUnit.code === adUnitCode;
|
|
141
140
|
});
|
|
142
141
|
|
package/src/adapterManager.js
CHANGED
|
@@ -27,7 +27,6 @@ import {newBidder} from './adapters/bidderFactory.js';
|
|
|
27
27
|
import {ajaxBuilder} from './ajax.js';
|
|
28
28
|
import {config, RANDOM} from './config.js';
|
|
29
29
|
import {hook} from './hook.js';
|
|
30
|
-
import {find} from './polyfill.js';
|
|
31
30
|
import {
|
|
32
31
|
getAuctionsCounter,
|
|
33
32
|
getBidderRequestsCounter,
|
|
@@ -309,13 +308,24 @@ adapterManager.makeBidRequests = hook('sync', function (adUnits, auctionStart, a
|
|
|
309
308
|
const ortb2 = ortb2Fragments.global || {};
|
|
310
309
|
const bidderOrtb2 = ortb2Fragments.bidder || {};
|
|
311
310
|
|
|
311
|
+
function moveUserEidsToExt(o) {
|
|
312
|
+
const eids = o.user?.eids;
|
|
313
|
+
if (Array.isArray(eids) && eids.length) {
|
|
314
|
+
o.user.ext = o.user.ext || {};
|
|
315
|
+
o.user.ext.eids = [...(o.user.ext.eids || []), ...eids];
|
|
316
|
+
delete o.user.eids;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
312
320
|
function addOrtb2(bidderRequest, s2sActivityParams) {
|
|
313
321
|
const redact = dep.redact(
|
|
314
322
|
s2sActivityParams != null
|
|
315
323
|
? s2sActivityParams
|
|
316
324
|
: activityParams(MODULE_TYPE_BIDDER, bidderRequest.bidderCode)
|
|
317
325
|
);
|
|
318
|
-
const
|
|
326
|
+
const merged = mergeDeep({source: {tid: auctionId}}, ortb2, bidderOrtb2[bidderRequest.bidderCode]);
|
|
327
|
+
moveUserEidsToExt(merged);
|
|
328
|
+
const fpd = Object.freeze(redact.ortb2(merged));
|
|
319
329
|
bidderRequest.ortb2 = fpd;
|
|
320
330
|
bidderRequest.bids = bidderRequest.bids.map((bid) => {
|
|
321
331
|
bid.ortb2 = fpd;
|
|
@@ -356,8 +366,8 @@ adapterManager.makeBidRequests = hook('sync', function (adUnits, auctionStart, a
|
|
|
356
366
|
// this is to keep consistency and only allow bids/adunits that passed the checks to go to pbs
|
|
357
367
|
adUnitsS2SCopy.forEach((adUnitCopy) => {
|
|
358
368
|
let validBids = adUnitCopy.bids.filter((adUnitBid) =>
|
|
359
|
-
find(
|
|
360
|
-
|
|
369
|
+
bidRequests.find(request =>
|
|
370
|
+
request.bids.find((reqBid) => reqBid.bidId === adUnitBid.bid_id)));
|
|
361
371
|
adUnitCopy.bids = validBids;
|
|
362
372
|
});
|
|
363
373
|
|
package/src/auction.js
CHANGED
|
@@ -84,7 +84,6 @@ import {Renderer} from './Renderer.js';
|
|
|
84
84
|
import {config} from './config.js';
|
|
85
85
|
import {userSync} from './userSync.js';
|
|
86
86
|
import {hook, ignoreCallbackArg} from './hook.js';
|
|
87
|
-
import {find} from './polyfill.js';
|
|
88
87
|
import {OUTSTREAM} from './video.js';
|
|
89
88
|
import {VIDEO} from './mediaTypes.js';
|
|
90
89
|
import {auctionManager} from './auctionManager.js';
|
|
@@ -839,7 +838,7 @@ export function getStandardBidderSettings(mediaType, bidderCode) {
|
|
|
839
838
|
|
|
840
839
|
// Adding hb_uuid + hb_cache_id
|
|
841
840
|
[TARGETING_KEYS.UUID, TARGETING_KEYS.CACHE_ID].forEach(targetingKeyVal => {
|
|
842
|
-
if (typeof find(
|
|
841
|
+
if (typeof adserverTargeting.find(kvPair => kvPair.key === targetingKeyVal) === 'undefined') {
|
|
843
842
|
adserverTargeting.push(createKeyVal(targetingKeyVal, 'videoCacheKey'));
|
|
844
843
|
}
|
|
845
844
|
});
|
|
@@ -848,7 +847,7 @@ export function getStandardBidderSettings(mediaType, bidderCode) {
|
|
|
848
847
|
if (config.getConfig('cache.url') && (!bidderCode || bidderSettings.get(bidderCode, 'sendStandardTargeting') !== false)) {
|
|
849
848
|
const urlInfo = parseUrl(config.getConfig('cache.url'));
|
|
850
849
|
|
|
851
|
-
if (typeof find(
|
|
850
|
+
if (typeof adserverTargeting.find(targetingKeyVal => targetingKeyVal.key === TARGETING_KEYS.CACHE_HOST) === 'undefined') {
|
|
852
851
|
adserverTargeting.push(createKeyVal(TARGETING_KEYS.CACHE_HOST, function(bidResponse) {
|
|
853
852
|
return bidResponse?.adserverTargeting?.[TARGETING_KEYS.CACHE_HOST] || urlInfo.hostname;
|
|
854
853
|
}));
|
package/src/config.js
CHANGED
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import {isValidPriceConfig} from './cpmBucketManager.js';
|
|
16
|
-
import {find} from './polyfill.js';
|
|
17
16
|
import {
|
|
18
17
|
deepAccess,
|
|
19
18
|
deepClone,
|
|
@@ -151,7 +150,7 @@ function attachProperties(config, useDefaultValues = true) {
|
|
|
151
150
|
return config;
|
|
152
151
|
|
|
153
152
|
function hasGranularity(val) {
|
|
154
|
-
return
|
|
153
|
+
return Object.keys(GRANULARITY_OPTIONS).find(option => val === GRANULARITY_OPTIONS[option]);
|
|
155
154
|
}
|
|
156
155
|
|
|
157
156
|
function validatePriceGranularity(val) {
|
package/src/cpmBucketManager.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {find} from './polyfill.js';
|
|
2
1
|
import { isEmpty, logWarn } from './utils.js';
|
|
3
2
|
import { config } from './config.js';
|
|
4
3
|
|
|
@@ -81,7 +80,7 @@ function getCpmStringValue(cpm, config, granularityMultiplier) {
|
|
|
81
80
|
});
|
|
82
81
|
|
|
83
82
|
let bucketFloor = 0;
|
|
84
|
-
let bucket =
|
|
83
|
+
let bucket = config.buckets.find(bucket => {
|
|
85
84
|
if (cpm > cap.max * granularityMultiplier) {
|
|
86
85
|
// cpm exceeds cap, just return the cap.
|
|
87
86
|
let precision = bucket.precision;
|
package/src/secureCreatives.js
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import {getAllAssetsMessage, getAssetMessage} from './native.js';
|
|
7
7
|
import {BID_STATUS, MESSAGES} from './constants.js';
|
|
8
8
|
import {isApnGetTagDefined, isGptPubadsDefined, logError, logWarn} from './utils.js';
|
|
9
|
-
import {find} from './polyfill.js';
|
|
10
9
|
import {
|
|
11
10
|
deferRendering,
|
|
12
11
|
getBidToRender,
|
|
@@ -172,8 +171,8 @@ export function resizeRemoteCreative({instl, adId, adUnitCode, width, height}) {
|
|
|
172
171
|
}
|
|
173
172
|
|
|
174
173
|
function getDfpElementId(adId) {
|
|
175
|
-
const slot =
|
|
176
|
-
return
|
|
174
|
+
const slot = window.googletag.pubads().getSlots().find(slot => {
|
|
175
|
+
return slot.getTargetingKeys().find(key => {
|
|
177
176
|
return slot.getTargeting(key).includes(adId);
|
|
178
177
|
});
|
|
179
178
|
});
|
package/src/targeting.js
CHANGED
|
@@ -15,7 +15,6 @@ import * as events from './events.js';
|
|
|
15
15
|
import { hook } from './hook.js';
|
|
16
16
|
import { ADPOD } from './mediaTypes.js';
|
|
17
17
|
import { NATIVE_TARGETING_KEYS } from './native.js';
|
|
18
|
-
import {find} from './polyfill.js';
|
|
19
18
|
import {
|
|
20
19
|
deepAccess,
|
|
21
20
|
deepClone,
|
|
@@ -254,7 +253,7 @@ export function newTargeting(auctionManager) {
|
|
|
254
253
|
// check if key is in default keys, if not, it's custom, we won't remove it.
|
|
255
254
|
const isCustom = defaultKeys.filter(defaultKey => key.indexOf(defaultKeyring[defaultKey]) === 0).length === 0;
|
|
256
255
|
// check if key explicitly allowed, if not, we'll remove it.
|
|
257
|
-
const found = isCustom || find(
|
|
256
|
+
const found = isCustom || allowedKeys.find(allowedKey => {
|
|
258
257
|
const allowedKeyName = defaultKeyring[allowedKey];
|
|
259
258
|
// we're looking to see if the key exactly starts with one of our default keys.
|
|
260
259
|
// (which hopefully means it's not custom)
|
|
@@ -9,9 +9,9 @@ All the `request-response` pairs are stored in the `fixtures/` directory. They a
|
|
|
9
9
|
|
|
10
10
|
Follow the steps below to add another `request-response` pair.
|
|
11
11
|
|
|
12
|
-
1. Inside the `/fixtures` directory, create a directory and give it a suitable name.
|
|
13
|
-
- If you are creating a one-off type of test, you can name this directory with a name that describes the test; for example `basic-banner`.
|
|
14
|
-
- If you plan to create a series of tests focusing on one feature/topic, then you can create a generic container directory to hold all your tests together; for example `longform`.
|
|
12
|
+
1. Inside the `/fixtures` directory, create a directory and give it a suitable name.
|
|
13
|
+
- If you are creating a one-off type of test, you can name this directory with a name that describes the test; for example `basic-banner`.
|
|
14
|
+
- If you plan to create a series of tests focusing on one feature/topic, then you can create a generic container directory to hold all your tests together; for example `longform`.
|
|
15
15
|
- If you did the latter case, please proceed to create the necessary test directories describing them with a meaningful and **unique** test name.
|
|
16
16
|
2. If you are planning to handle multiple bidder requests as part of your tests, you will need to create a specific directory for each request. For example, you could create a pair named like so `longform_biddersettings_1` and `longform_biddersettings_2`.
|
|
17
17
|
3. Once all your directories are created, inside the bottom test folder(s), create **three files**:
|
|
@@ -79,11 +79,11 @@ exports.createBidSlots = function(numSlot, numSize) {
|
|
|
79
79
|
if (typeof numSlot === 'undefined') numSlot = 1;
|
|
80
80
|
if (typeof numSize === 'undefined') numSize = 1;
|
|
81
81
|
|
|
82
|
-
var bids =
|
|
82
|
+
var bids = Array(numSlot);
|
|
83
83
|
|
|
84
84
|
var mkPlacementCode = function(i, j) { return DefaultPlacementCodePrefix + i + '_' + j; };
|
|
85
85
|
for (var i = 0; i < bids.length; i++) {
|
|
86
|
-
var requestSizes =
|
|
86
|
+
var requestSizes = Array(numSize);
|
|
87
87
|
for (var j = 0; j < requestSizes.length; j++) requestSizes[j] = AllowedAdUnits[(i + j) % AllowedAdUnits.length];
|
|
88
88
|
|
|
89
89
|
bids[i] = _createBidSlot(mkPlacementCode(i, j), 'slot-' + i, requestSizes, {
|
|
@@ -14,7 +14,6 @@ import { createBid } from 'src/bidfactory.js';
|
|
|
14
14
|
import { config } from 'src/config.js';
|
|
15
15
|
import {_internal as store} from 'src/videoCache.js';
|
|
16
16
|
import * as ajaxLib from 'src/ajax.js';
|
|
17
|
-
import {find} from 'src/polyfill.js';
|
|
18
17
|
import { server } from 'test/mocks/xhr.js';
|
|
19
18
|
import {hook} from '../../src/hook.js';
|
|
20
19
|
import {auctionManager} from '../../src/auctionManager.js';
|
|
@@ -1249,7 +1248,7 @@ describe('auctionmanager.js', function () {
|
|
|
1249
1248
|
it('should use renderers on bid response', () => {
|
|
1250
1249
|
auction.callBids();
|
|
1251
1250
|
|
|
1252
|
-
const addedBid =
|
|
1251
|
+
const addedBid = auction.getBidsReceived().find(bid => bid.adUnitCode === ADUNIT_CODE);
|
|
1253
1252
|
assert.equal(addedBid.renderer.url, 'renderer.js');
|
|
1254
1253
|
});
|
|
1255
1254
|
|
|
@@ -1693,7 +1692,7 @@ describe('auctionmanager.js', function () {
|
|
|
1693
1692
|
assert.equal(auctionBidRequests.length > 0, true);
|
|
1694
1693
|
assert.equal(Array.isArray(auctionBidRequests[0].bids), true);
|
|
1695
1694
|
|
|
1696
|
-
const bid =
|
|
1695
|
+
const bid = auctionBidRequests[0].bids.find(bid => bid.adUnitCode === ADUNIT_CODE);
|
|
1697
1696
|
assert.equal(typeof bid !== 'undefined', true);
|
|
1698
1697
|
});
|
|
1699
1698
|
});
|
|
@@ -172,7 +172,7 @@ describe('FPD enrichment', () => {
|
|
|
172
172
|
testWindows(() => win, () => {
|
|
173
173
|
it('sets w/h', () => {
|
|
174
174
|
const getWinDimensionsStub = sandbox.stub(utils, 'getWinDimensions');
|
|
175
|
-
|
|
175
|
+
|
|
176
176
|
getWinDimensionsStub.returns({screen: {width: 321, height: 123}});
|
|
177
177
|
return fpd().then(ortb2 => {
|
|
178
178
|
sinon.assert.match(ortb2.device, {
|
|
@@ -24,7 +24,7 @@ describe('GreedyPromise', () => {
|
|
|
24
24
|
let makePromise, pendingFailure, pendingSuccess;
|
|
25
25
|
|
|
26
26
|
Object.entries({
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
'resolver that throws': (P) => new P(() => { throw 'error' }),
|
|
29
29
|
'resolver that resolves multiple times': (P) => new P((resolve) => { resolve('first'); resolve('second'); }),
|
|
30
30
|
'resolver that rejects multiple times': (P) => new P((resolve, reject) => { reject('first'); reject('second') }),
|
|
@@ -74,7 +74,7 @@ describe('GreedyPromise', () => {
|
|
|
74
74
|
.finally(() => pendingSuccess.then(() => { fval = 'finally' }))
|
|
75
75
|
.catch((err) => `${err} ${fval}`)
|
|
76
76
|
},
|
|
77
|
-
|
|
77
|
+
|
|
78
78
|
'.finally that throws': (P) => makePromise(P, 'value').finally(() => { throw 'error' }),
|
|
79
79
|
'chained .finally that rejects': (P) => makePromise(P, 'value').finally(() => P.reject('error')),
|
|
80
80
|
'scalar Promise.resolve': (P) => P.resolve('scalar'),
|
|
@@ -24,10 +24,12 @@ describe('adnuntiusBidAdapter', function () {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
storage = getStorageManager({ bidderCode: 'adnuntius' });
|
|
27
|
+
resetExpectedUrls();
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
beforeEach(() => {
|
|
30
31
|
storage.setDataInLocalStorage('adn.metaData', JSON.stringify(meta));
|
|
32
|
+
resetExpectedUrls();
|
|
31
33
|
});
|
|
32
34
|
|
|
33
35
|
afterEach(function () {
|
|
@@ -35,23 +37,37 @@ describe('adnuntiusBidAdapter', function () {
|
|
|
35
37
|
config.setBidderConfig({ bidders: [] });
|
|
36
38
|
localStorage.removeItem('adn.metaData');
|
|
37
39
|
sandbox.restore();
|
|
40
|
+
resetExpectedUrls();
|
|
38
41
|
});
|
|
39
42
|
|
|
40
43
|
after(() => {
|
|
41
44
|
getGlobal().bidderSettings = {};
|
|
45
|
+
resetExpectedUrls();
|
|
42
46
|
});
|
|
43
47
|
|
|
44
48
|
const tzo = new Date().getTimezoneOffset();
|
|
45
|
-
const winDimensions = getWinDimensions();
|
|
46
|
-
const screen = winDimensions.screen.availWidth + 'x' + winDimensions.screen.availHeight;
|
|
47
|
-
const viewport = winDimensions.innerWidth + 'x' + winDimensions.innerHeight;
|
|
48
49
|
const prebidVersion = getGlobal().version;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
|
|
51
|
+
let screen;
|
|
52
|
+
let viewport;
|
|
53
|
+
let ENDPOINT_URL_BASE;
|
|
54
|
+
let ENDPOINT_URL;
|
|
55
|
+
let LOCALHOST_URL;
|
|
56
|
+
let ENDPOINT_URL_NOCOOKIE;
|
|
57
|
+
let ENDPOINT_URL_SEGMENTS;
|
|
58
|
+
let ENDPOINT_URL_CONSENT;
|
|
59
|
+
|
|
60
|
+
function resetExpectedUrls() {
|
|
61
|
+
const winDimensions = getWinDimensions();
|
|
62
|
+
screen = winDimensions.screen.availWidth + 'x' + winDimensions.screen.availHeight;
|
|
63
|
+
viewport = winDimensions.innerWidth + 'x' + winDimensions.innerHeight;
|
|
64
|
+
ENDPOINT_URL_BASE = `${URL}${tzo}&format=prebid&pbv=${prebidVersion}&screen=${screen}&viewport=${viewport}`;
|
|
65
|
+
ENDPOINT_URL = `${ENDPOINT_URL_BASE}&userId=${usi}`;
|
|
66
|
+
LOCALHOST_URL = `http://localhost:8078/i?tzo=${tzo}&format=prebid&pbv=${prebidVersion}&screen=${screen}&viewport=${viewport}&userId=${usi}`;
|
|
67
|
+
ENDPOINT_URL_NOCOOKIE = `${ENDPOINT_URL_BASE}&userId=${usi}&noCookies=true`;
|
|
68
|
+
ENDPOINT_URL_SEGMENTS = `${ENDPOINT_URL_BASE}&segments=segment1,segment2,segment3&userId=${usi}`;
|
|
69
|
+
ENDPOINT_URL_CONSENT = `${EURO_URL}${tzo}&format=prebid&pbv=${prebidVersion}&consentString=consentString&gdpr=1&screen=${screen}&viewport=${viewport}&userId=${usi}`;
|
|
70
|
+
}
|
|
55
71
|
|
|
56
72
|
function expectUrlsEqual(actual, expected) {
|
|
57
73
|
const a = utils.parseUrl(actual);
|
|
@@ -6,7 +6,7 @@ const DEFAULT_SID = '1220291391';
|
|
|
6
6
|
const DEFAULT_ZID = '1836455615';
|
|
7
7
|
const DEFAULT_PIXEL_URL = 'https://cdn.adtarget.me/libs/1x1.gif';
|
|
8
8
|
const DEFAULT_BANNER_URL = 'https://cdn.adtarget.me/libs/banner/300x250.jpg';
|
|
9
|
-
const BIDDER_VERSION = '1.0.
|
|
9
|
+
const BIDDER_VERSION = '1.0.7';
|
|
10
10
|
const PREBIDJS_VERSION = '$prebid.version$';
|
|
11
11
|
|
|
12
12
|
const createBidRequest = ({bidId, adUnitCode, bidOverride, zid, ortb2}) => {
|
|
@@ -268,7 +268,7 @@ describe('Adtrgtme Bid Adapter:', () => {
|
|
|
268
268
|
};
|
|
269
269
|
bidRequest.schain = globalSchain;
|
|
270
270
|
const data = spec.buildRequests(validBR, bidderRequest)[0].data;
|
|
271
|
-
const schain = data.source.
|
|
271
|
+
const schain = data.source.schain;
|
|
272
272
|
expect(schain.nodes.length).to.equal(1);
|
|
273
273
|
expect(schain).to.equal(globalSchain);
|
|
274
274
|
});
|
|
@@ -566,10 +566,8 @@ describe('Adtrgtme Bid Adapter:', () => {
|
|
|
566
566
|
});
|
|
567
567
|
|
|
568
568
|
expect(data.regs).to.deep.equal({
|
|
569
|
-
ext: {
|
|
570
569
|
'us_privacy': '',
|
|
571
570
|
gdpr: 1
|
|
572
|
-
}
|
|
573
571
|
});
|
|
574
572
|
|
|
575
573
|
expect(data.cur).to.deep.equal(['USD']);
|