prebid.js 7.40.0 → 7.41.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/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/aduptechBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.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/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/browsiBidAdapter.js +1 -0
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/cleanmedianetBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.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/dfpAdServerVideo.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.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/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/missenaBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/nobidBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +130 -129
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/permutiveRtdProvider.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubwiseBidAdapter.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/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.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/shinezBidAdapter.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/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -0
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.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/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yandexBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/gpt/x-domain/creative.html +1 -1
- package/modules/aduptechBidAdapter.js +43 -37
- package/modules/browsiBidAdapter.js +171 -0
- package/modules/browsiBidAdapter.md +38 -0
- package/modules/cleanmedianetBidAdapter.js +191 -126
- package/modules/cleanmedianetBidAdapter.md +64 -18
- package/modules/conversantBidAdapter.js +4 -0
- package/modules/dfpAdServerVideo.js +8 -8
- package/modules/freewheel-sspBidAdapter.js +9 -0
- package/modules/gridBidAdapter.js +12 -1
- package/modules/ixBidAdapter.js +1 -1
- package/modules/missenaBidAdapter.js +2 -1
- package/modules/neuwoRtdProvider.js +1 -1
- package/modules/nobidBidAdapter.js +13 -2
- package/modules/nobidBidAdapter.md +2 -2
- package/modules/permutiveRtdProvider.js +8 -2
- package/modules/pubwiseBidAdapter.js +265 -33
- package/modules/stvBidAdapter.js +330 -0
- package/modules/stvBidAdapter.md +62 -0
- package/modules/yandexBidAdapter.js +259 -71
- package/modules/yandexBidAdapter.md +52 -15
- package/package.json +1 -1
- package/src/videoCache.js +4 -4
- package/test/spec/modules/browsiBidAdapter_spec.js +209 -0
- package/test/spec/modules/cleanmedianetBidAdapter_spec.js +462 -407
- package/test/spec/modules/conversantBidAdapter_spec.js +8 -0
- package/test/spec/modules/dfpAdServerVideo_spec.js +36 -4
- package/test/spec/modules/freewheel-sspBidAdapter_spec.js +19 -0
- package/test/spec/modules/gridBidAdapter_spec.js +24 -0
- package/test/spec/modules/ixBidAdapter_spec.js +4 -4
- package/test/spec/modules/nobidBidAdapter_spec.js +32 -0
- package/test/spec/modules/permutiveRtdProvider_spec.js +61 -4
- package/test/spec/modules/pubwiseBidAdapter_spec.js +313 -3
- package/test/spec/modules/stvBidAdapter_spec.js +402 -0
- package/test/spec/modules/yandexBidAdapter_spec.js +315 -45
- package/test/spec/videoCache_spec.js +23 -0
- package/dist/flocIdSystem.js +0 -1
- package/modules/flocIdSystem.js +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import {ENDPOINT, spec} from 'modules/browsiBidAdapter.js';
|
|
2
|
+
import {config} from 'src/config.js';
|
|
3
|
+
import {VIDEO, BANNER} from 'src/mediaTypes.js';
|
|
4
|
+
|
|
5
|
+
const {expect} = require('chai');
|
|
6
|
+
const DATA = 'brwvidtag';
|
|
7
|
+
const ADAPTER = '__bad';
|
|
8
|
+
|
|
9
|
+
describe('browsi Bid Adapter Test', function () {
|
|
10
|
+
describe('isBidRequestValid', function () {
|
|
11
|
+
let mediaTypes;
|
|
12
|
+
let bid;
|
|
13
|
+
beforeEach(function () {
|
|
14
|
+
mediaTypes = {};
|
|
15
|
+
mediaTypes[VIDEO] = {};
|
|
16
|
+
bid = {
|
|
17
|
+
'params': {
|
|
18
|
+
'pubId': '1234567',
|
|
19
|
+
'tagId': '1'
|
|
20
|
+
},
|
|
21
|
+
'mediaTypes': mediaTypes
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
it('should return true when required params found', function () {
|
|
25
|
+
expect(spec.isBidRequestValid(bid)).to.equal(true);
|
|
26
|
+
});
|
|
27
|
+
it('should return false when missing pubId', function () {
|
|
28
|
+
delete bid.params.pubId;
|
|
29
|
+
expect(spec.isBidRequestValid(bid)).to.equal(false);
|
|
30
|
+
});
|
|
31
|
+
it('should return false when missing tagId', function () {
|
|
32
|
+
delete bid.params.tagId;
|
|
33
|
+
expect(spec.isBidRequestValid(bid)).to.equal(false);
|
|
34
|
+
});
|
|
35
|
+
it('should return false when missing params', function () {
|
|
36
|
+
delete bid.params;
|
|
37
|
+
expect(spec.isBidRequestValid(bid)).to.equal(false);
|
|
38
|
+
});
|
|
39
|
+
it('should return false when params have invalid type', function () {
|
|
40
|
+
bid.params.tagId = 1;
|
|
41
|
+
expect(spec.isBidRequestValid(bid)).to.equal(false);
|
|
42
|
+
});
|
|
43
|
+
it('should return false when video mediaType is missing', function () {
|
|
44
|
+
delete bid.mediaTypes[VIDEO];
|
|
45
|
+
bid.mediaTypes[BANNER] = {}
|
|
46
|
+
expect(spec.isBidRequestValid(bid)).to.equal(false);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
describe('buildRequests', function () {
|
|
51
|
+
let bidRequest;
|
|
52
|
+
let bidderRequest;
|
|
53
|
+
beforeEach(function () {
|
|
54
|
+
window[DATA] = {}
|
|
55
|
+
window[DATA][ADAPTER] = {index: 0};
|
|
56
|
+
bidRequest = [
|
|
57
|
+
{
|
|
58
|
+
'params': {
|
|
59
|
+
'pubId': 'browiPubId1',
|
|
60
|
+
'tagId': '2'
|
|
61
|
+
},
|
|
62
|
+
'adUnitCode': 'adUnitCode1',
|
|
63
|
+
'auctionId': 'auctionId1',
|
|
64
|
+
'sizes': [640, 480],
|
|
65
|
+
'bidId': '12345678',
|
|
66
|
+
'requestId': '1234567-3456-4562-7689-98765434A',
|
|
67
|
+
'transactionId': '1234567-3456-4562-7689-98765434B',
|
|
68
|
+
'schain': {},
|
|
69
|
+
'mediaTypes': {video: {playerSize: [640, 480]}}
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
bidderRequest = {
|
|
73
|
+
'bidderRequestId': 'bidderRequestId1',
|
|
74
|
+
'refererInfo': {
|
|
75
|
+
'canonicalUrl': null,
|
|
76
|
+
'page': 'https://browsi.com',
|
|
77
|
+
'domain': 'browsi.com',
|
|
78
|
+
'ref': null,
|
|
79
|
+
'numIframes': 0,
|
|
80
|
+
'reachedTop': true,
|
|
81
|
+
'isAmp': false,
|
|
82
|
+
'stack': ['https://browsi.com']
|
|
83
|
+
},
|
|
84
|
+
'gdprConsent': {
|
|
85
|
+
consentString: 'BOtmiBKOtmiBKABABAENAFAAAAACeAAA',
|
|
86
|
+
gdprApplies: true
|
|
87
|
+
},
|
|
88
|
+
'uspConsent': '1YYY'
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
afterEach(function() {
|
|
92
|
+
window[DATA] = undefined;
|
|
93
|
+
config.resetConfig();
|
|
94
|
+
});
|
|
95
|
+
it('should return an array of requests with single request', function () {
|
|
96
|
+
const requests = spec.buildRequests(bidRequest, bidderRequest);
|
|
97
|
+
expect(requests.length).to.equal(1);
|
|
98
|
+
const request = requests[0];
|
|
99
|
+
const inputRequest = bidRequest[0];
|
|
100
|
+
const requestToExpect = {
|
|
101
|
+
method: 'POST',
|
|
102
|
+
url: ENDPOINT,
|
|
103
|
+
data: {
|
|
104
|
+
requestId: bidderRequest.bidderRequestId,
|
|
105
|
+
bidId: inputRequest.bidId,
|
|
106
|
+
timeout: 3000,
|
|
107
|
+
baData: window[DATA][ADAPTER],
|
|
108
|
+
referer: bidderRequest.refererInfo.page,
|
|
109
|
+
gdpr: bidderRequest.gdprConsent,
|
|
110
|
+
ccpa: bidderRequest.uspConsent,
|
|
111
|
+
sizes: inputRequest.sizes,
|
|
112
|
+
video: {playerSize: [640, 480]},
|
|
113
|
+
aUCode: inputRequest.adUnitCode,
|
|
114
|
+
aID: inputRequest.auctionId,
|
|
115
|
+
tID: inputRequest.transactionId,
|
|
116
|
+
schain: inputRequest.schain,
|
|
117
|
+
params: inputRequest.params
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
assert.deepEqual(request, requestToExpect);
|
|
121
|
+
});
|
|
122
|
+
it('should pass on timeout in bidderRequest', function() {
|
|
123
|
+
bidderRequest.timeout = 8000;
|
|
124
|
+
const requests = spec.buildRequests(bidRequest, bidderRequest);
|
|
125
|
+
expect(requests[0].data.timeout).to.equal(8000);
|
|
126
|
+
});
|
|
127
|
+
it('should pass timeout in config', function() {
|
|
128
|
+
config.setConfig({'bidderTimeout': 6000});
|
|
129
|
+
const requests = spec.buildRequests(bidRequest, bidderRequest);
|
|
130
|
+
expect(requests[0].data.timeout).to.equal(6000);
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
describe('interpretResponse', function () {
|
|
135
|
+
let bidRequest = {
|
|
136
|
+
'url': ENDPOINT,
|
|
137
|
+
'data': {
|
|
138
|
+
'bidId': 'bidId1',
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
let serverResponse = {};
|
|
142
|
+
serverResponse.body = {
|
|
143
|
+
bidId: 'bidId1',
|
|
144
|
+
w: 300,
|
|
145
|
+
h: 250,
|
|
146
|
+
vXml: 'vastXml',
|
|
147
|
+
vUrl: 'vastUrl',
|
|
148
|
+
cpm: 1,
|
|
149
|
+
cur: 'USD',
|
|
150
|
+
ttl: 10000,
|
|
151
|
+
someExtraParams: 8,
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
it('should return a valid response', function () {
|
|
155
|
+
const bidResponses = spec.interpretResponse(serverResponse, bidRequest);
|
|
156
|
+
expect(bidResponses.length).to.equal(1);
|
|
157
|
+
const actualBidResponse = bidResponses[0];
|
|
158
|
+
const expectedBidResponse = {
|
|
159
|
+
requestId: bidRequest.data.bidId,
|
|
160
|
+
bidderCode: 'browsi',
|
|
161
|
+
bidId: 'bidId1',
|
|
162
|
+
width: 300,
|
|
163
|
+
height: 250,
|
|
164
|
+
vastXml: 'vastXml',
|
|
165
|
+
vastUrl: 'vastUrl',
|
|
166
|
+
cpm: 1,
|
|
167
|
+
currency: 'USD',
|
|
168
|
+
ttl: 10000,
|
|
169
|
+
someExtraParams: 8,
|
|
170
|
+
mediaType: VIDEO
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
assert.deepEqual(actualBidResponse, expectedBidResponse);
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
describe('getUserSyncs', function () {
|
|
178
|
+
const bidResponse = {
|
|
179
|
+
userSyncs: [
|
|
180
|
+
{url: 'syncUrl1', type: 'image'},
|
|
181
|
+
{url: 'http://syncUrl2', type: 'iframe'}
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
let serverResponse = [
|
|
185
|
+
{body: bidResponse}
|
|
186
|
+
];
|
|
187
|
+
it('should return iframe type userSync', function () {
|
|
188
|
+
let userSyncs = spec.getUserSyncs({iframeEnabled: true, pixelEnabled: false}, serverResponse[0]);
|
|
189
|
+
expect(userSyncs.length).to.equal(1);
|
|
190
|
+
let userSync = userSyncs[0];
|
|
191
|
+
expect(userSync.url).to.equal('http://syncUrl2');
|
|
192
|
+
expect(userSync.type).to.equal('iframe');
|
|
193
|
+
});
|
|
194
|
+
it('should return image type userSyncs', function () {
|
|
195
|
+
let userSyncs = spec.getUserSyncs({iframeEnabled: false, pixelEnabled: true}, serverResponse[0]);
|
|
196
|
+
let userSync = userSyncs[0];
|
|
197
|
+
expect(userSync.url).to.equal('http://syncUrl1');
|
|
198
|
+
expect(userSync.type).to.equal('image');
|
|
199
|
+
});
|
|
200
|
+
it('should handle multiple server responses', function () {
|
|
201
|
+
let userSyncs = spec.getUserSyncs({iframeEnabled: false, pixelEnabled: true}, serverResponse);
|
|
202
|
+
expect(userSyncs.length).to.equal(1);
|
|
203
|
+
});
|
|
204
|
+
it('should return empty userSyncs', function () {
|
|
205
|
+
let userSyncs = spec.getUserSyncs({iframeEnabled: false, pixelEnabled: false}, serverResponse);
|
|
206
|
+
expect(userSyncs.length).to.equal(0);
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
});
|