prebid.js 7.44.0 → 7.46.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.
Files changed (309) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/33acrossIdSystem.js +1 -1
  3. package/dist/acuityAdsBidAdapter.js +1 -1
  4. package/dist/adagioBidAdapter.js +1 -1
  5. package/dist/adbookpspBidAdapter.js +1 -1
  6. package/dist/adgenerationBidAdapter.js +1 -1
  7. package/dist/admaticBidAdapter.js +1 -1
  8. package/dist/adnuntiusBidAdapter.js +1 -1
  9. package/dist/adrelevantisBidAdapter.js +1 -1
  10. package/dist/adtrgtmeBidAdapter.js +1 -1
  11. package/dist/adxcgBidAdapter.js +1 -1
  12. package/dist/adyoulikeBidAdapter.js +1 -1
  13. package/dist/ajaBidAdapter.js +1 -1
  14. package/dist/amxBidAdapter.js +1 -1
  15. package/dist/amxIdSystem.js +1 -1
  16. package/dist/appierAnalyticsAdapter.js +1 -1
  17. package/dist/appnexusBidAdapter.js +1 -1
  18. package/dist/appushBidAdapter.js +1 -1
  19. package/dist/asoBidAdapter.js +1 -1
  20. package/dist/axonixBidAdapter.js +1 -1
  21. package/dist/beyondmediaBidAdapter.js +1 -1
  22. package/dist/bidglassBidAdapter.js +1 -1
  23. package/dist/bidwatchAnalyticsAdapter.js +1 -1
  24. package/dist/big-richmediaBidAdapter.js +1 -1
  25. package/dist/braveBidAdapter.js +1 -1
  26. package/dist/bridgewellBidAdapter.js +1 -1
  27. package/dist/brightMountainMediaBidAdapter.js +1 -1
  28. package/dist/brightcomBidAdapter.js +1 -1
  29. package/dist/brightcomSSPBidAdapter.js +1 -1
  30. package/dist/carodaBidAdapter.js +1 -1
  31. package/dist/chtnwBidAdapter.js +1 -1
  32. package/dist/coinzillaBidAdapter.js +1 -1
  33. package/dist/compassBidAdapter.js +1 -1
  34. package/dist/concertBidAdapter.js +1 -1
  35. package/dist/connectIdSystem.js +1 -1
  36. package/dist/connectadBidAdapter.js +1 -1
  37. package/dist/consumableBidAdapter.js +1 -1
  38. package/dist/contentexchangeBidAdapter.js +1 -1
  39. package/dist/conversantAnalyticsAdapter.js +1 -1
  40. package/dist/conversantBidAdapter.js +1 -1
  41. package/dist/craftBidAdapter.js +1 -1
  42. package/dist/criteoBidAdapter.js +1 -1
  43. package/dist/cwireBidAdapter.js +1 -1
  44. package/dist/debugging-standalone.js +1 -1
  45. package/dist/dependencies.json +15 -0
  46. package/dist/domainOverrideToRootDomain.js +1 -0
  47. package/dist/dspxBidAdapter.js +1 -1
  48. package/dist/eplanningBidAdapter.js +1 -1
  49. package/dist/eskimiBidAdapter.js +1 -0
  50. package/dist/feedadBidAdapter.js +1 -1
  51. package/dist/finativeBidAdapter.js +1 -1
  52. package/dist/freewheel-sspBidAdapter.js +1 -1
  53. package/dist/glimpseBidAdapter.js +1 -1
  54. package/dist/globalsunBidAdapter.js +1 -1
  55. package/dist/gmosspBidAdapter.js +1 -1
  56. package/dist/goldbachBidAdapter.js +1 -1
  57. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  58. package/dist/gridBidAdapter.js +1 -1
  59. package/dist/growthCodeIdSystem.js +1 -1
  60. package/dist/gumgumBidAdapter.js +1 -1
  61. package/dist/h12mediaBidAdapter.js +1 -1
  62. package/dist/id5IdSystem.js +1 -1
  63. package/dist/improvedigitalBidAdapter.js +1 -1
  64. package/dist/inmarBidAdapter.js +1 -1
  65. package/dist/insticatorBidAdapter.js +1 -1
  66. package/dist/iqzoneBidAdapter.js +1 -1
  67. package/dist/ivsBidAdapter.js +1 -0
  68. package/dist/ixBidAdapter.js +1 -1
  69. package/dist/justpremiumBidAdapter.js +1 -1
  70. package/dist/jwplayerVideoProvider.js +1 -1
  71. package/dist/kargoBidAdapter.js +1 -1
  72. package/dist/koblerBidAdapter.js +1 -1
  73. package/dist/konduitAnalyticsAdapter.js +1 -1
  74. package/dist/kueezBidAdapter.js +1 -1
  75. package/dist/kueezRtbBidAdapter.js +1 -1
  76. package/dist/kulturemediaBidAdapter.js +1 -1
  77. package/dist/lassoBidAdapter.js +1 -1
  78. package/dist/lifestreetBidAdapter.js +1 -1
  79. package/dist/liveIntentIdSystem.js +1 -1
  80. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  81. package/dist/logicadBidAdapter.js +1 -1
  82. package/dist/loglyliftBidAdapter.js +1 -1
  83. package/dist/luponmediaBidAdapter.js +1 -1
  84. package/dist/magniteAnalyticsAdapter.js +1 -1
  85. package/dist/malltvAnalyticsAdapter.js +1 -1
  86. package/dist/marsmediaBidAdapter.js +1 -1
  87. package/dist/mathildeadsBidAdapter.js +1 -1
  88. package/dist/mediafuseBidAdapter.js +1 -1
  89. package/dist/medianetBidAdapter.js +1 -1
  90. package/dist/mediasquareBidAdapter.js +1 -1
  91. package/dist/mgidBidAdapter.js +1 -1
  92. package/dist/minutemediaBidAdapter.js +1 -1
  93. package/dist/minutemediaplusBidAdapter.js +1 -1
  94. package/dist/nativoBidAdapter.js +1 -1
  95. package/dist/neuwoRtdProvider.js +1 -1
  96. package/dist/nexx360BidAdapter.js +1 -1
  97. package/dist/not-for-prod/prebid.js +165 -162
  98. package/dist/oguryBidAdapter.js +1 -1
  99. package/dist/onetagBidAdapter.js +1 -1
  100. package/dist/onomagicBidAdapter.js +1 -1
  101. package/dist/ooloAnalyticsAdapter.js +1 -1
  102. package/dist/openxBidAdapter.js +1 -1
  103. package/dist/openxOrtbBidAdapter.js +1 -1
  104. package/dist/operaadsBidAdapter.js +1 -1
  105. package/dist/optidigitalBidAdapter.js +1 -1
  106. package/dist/ortbConverter.js +1 -1
  107. package/dist/outbrainBidAdapter.js +1 -1
  108. package/dist/pairIdSystem.js +1 -0
  109. package/dist/parrableIdSystem.js +1 -1
  110. package/dist/pixfutureBidAdapter.js +1 -1
  111. package/dist/prebid-core.js +1 -1
  112. package/dist/publinkIdSystem.js +1 -1
  113. package/dist/pubmaticBidAdapter.js +1 -1
  114. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  115. package/dist/pubxBidAdapter.js +1 -1
  116. package/dist/pxyzBidAdapter.js +1 -1
  117. package/dist/quantcastBidAdapter.js +1 -1
  118. package/dist/readpeakBidAdapter.js +1 -1
  119. package/dist/relaidoBidAdapter.js +1 -1
  120. package/dist/rhythmoneBidAdapter.js +1 -1
  121. package/dist/riseBidAdapter.js +1 -1
  122. package/dist/rubiconAnalyticsAdapter.js +1 -1
  123. package/dist/rubiconBidAdapter.js +1 -1
  124. package/dist/seedingAllianceBidAdapter.js +1 -1
  125. package/dist/seedtagBidAdapter.js +1 -1
  126. package/dist/sharedIdSystem.js +1 -1
  127. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  128. package/dist/sharethroughBidAdapter.js +1 -1
  129. package/dist/shinezBidAdapter.js +1 -1
  130. package/dist/smaatoBidAdapter.js +1 -1
  131. package/dist/smartadserverBidAdapter.js +1 -1
  132. package/dist/smarthubBidAdapter.js +1 -1
  133. package/dist/smartxBidAdapter.js +1 -1
  134. package/dist/smilewantedBidAdapter.js +1 -1
  135. package/dist/sonobiBidAdapter.js +1 -1
  136. package/dist/sovrnAnalyticsAdapter.js +1 -1
  137. package/dist/sovrnBidAdapter.js +1 -1
  138. package/dist/sspBCBidAdapter.js +1 -1
  139. package/dist/stvBidAdapter.js +1 -1
  140. package/dist/sublimeBidAdapter.js +1 -1
  141. package/dist/synacormediaBidAdapter.js +1 -1
  142. package/dist/targetVideoBidAdapter.js +1 -1
  143. package/dist/teadsBidAdapter.js +1 -1
  144. package/dist/trionBidAdapter.js +1 -1
  145. package/dist/tripleliftBidAdapter.js +1 -1
  146. package/dist/truereachBidAdapter.js +1 -1
  147. package/dist/ttdBidAdapter.js +1 -1
  148. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  149. package/dist/uid2IdSystem.js +1 -1
  150. package/dist/underdogmediaBidAdapter.js +1 -1
  151. package/dist/undertoneBidAdapter.js +1 -1
  152. package/dist/userId.js +1 -1
  153. package/dist/vidazooBidAdapter.js +1 -1
  154. package/dist/videobyteBidAdapter.js +1 -1
  155. package/dist/videoheroesBidAdapter.js +1 -1
  156. package/dist/vidoomyBidAdapter.js +1 -1
  157. package/dist/visiblemeasuresBidAdapter.js +1 -1
  158. package/dist/visxBidAdapter.js +1 -1
  159. package/dist/vrtcalBidAdapter.js +1 -1
  160. package/dist/vuukleBidAdapter.js +1 -1
  161. package/dist/widespaceBidAdapter.js +1 -1
  162. package/dist/winrBidAdapter.js +1 -1
  163. package/dist/yahoosspBidAdapter.js +1 -1
  164. package/dist/yieldmoBidAdapter.js +1 -1
  165. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  166. package/dist/yieldoneBidAdapter.js +1 -1
  167. package/integrationExamples/gpt/fledge_example.html +103 -0
  168. package/integrationExamples/gpt/prebidServer_fledge_example.html +111 -0
  169. package/libraries/domainOverrideToRootDomain/index.js +39 -0
  170. package/libraries/ortbConverter/processors/video.js +1 -0
  171. package/modules/acuityAdsBidAdapter.js +1 -1
  172. package/modules/admaticBidAdapter.js +7 -2
  173. package/modules/adnuntiusBidAdapter.js +3 -1
  174. package/modules/amxBidAdapter.js +1 -1
  175. package/modules/amxIdSystem.js +23 -20
  176. package/modules/amxIdSystem.md +7 -7
  177. package/modules/appnexusBidAdapter.js +108 -102
  178. package/modules/appushBidAdapter.js +1 -1
  179. package/modules/beyondmediaBidAdapter.js +1 -1
  180. package/modules/bidwatchAnalyticsAdapter.js +2 -0
  181. package/modules/braveBidAdapter.js +1 -1
  182. package/modules/brightcomBidAdapter.js +1 -1
  183. package/modules/brightcomSSPBidAdapter.js +1 -1
  184. package/modules/coinzillaBidAdapter.js +1 -2
  185. package/modules/compassBidAdapter.js +1 -1
  186. package/modules/connectIdSystem.js +96 -21
  187. package/modules/connectIdSystem.md +6 -5
  188. package/modules/contentexchangeBidAdapter.js +1 -1
  189. package/modules/conversantBidAdapter.js +3 -0
  190. package/modules/criteoBidAdapter.js +5 -1
  191. package/modules/eskimiBidAdapter.js +72 -0
  192. package/modules/eskimiBidAdapter.md +34 -0
  193. package/modules/freewheel-sspBidAdapter.js +8 -0
  194. package/modules/glimpseBidAdapter.js +1 -2
  195. package/modules/globalsunBidAdapter.js +1 -1
  196. package/modules/gridBidAdapter.js +43 -20
  197. package/modules/growthCodeIdSystem.js +18 -15
  198. package/modules/gumgumBidAdapter.js +1 -1
  199. package/modules/iqzoneBidAdapter.js +1 -1
  200. package/modules/ivsBidAdapter.js +85 -0
  201. package/modules/ivsBidAdapter.md +34 -0
  202. package/modules/ixBidAdapter.js +72 -105
  203. package/modules/jwplayerVideoProvider.js +25 -32
  204. package/modules/kargoBidAdapter.js +473 -246
  205. package/modules/koblerBidAdapter.js +1 -2
  206. package/modules/kueezBidAdapter.js +1 -1
  207. package/modules/kueezRtbBidAdapter.js +16 -4
  208. package/modules/liveIntentIdSystem.js +8 -0
  209. package/modules/luponmediaBidAdapter.js +1 -1
  210. package/modules/magniteAnalyticsAdapter.js +76 -3
  211. package/modules/mathildeadsBidAdapter.js +1 -1
  212. package/modules/medianetBidAdapter.js +1 -1
  213. package/modules/mediasquareBidAdapter.js +2 -1
  214. package/modules/mgidBidAdapter.js +178 -26
  215. package/modules/minutemediaBidAdapter.js +1 -1
  216. package/modules/minutemediaplusBidAdapter.js +16 -4
  217. package/modules/nativoBidAdapter.js +110 -21
  218. package/modules/neuwoRtdProvider.js +0 -2
  219. package/modules/oguryBidAdapter.js +3 -2
  220. package/modules/onomagicBidAdapter.js +1 -2
  221. package/modules/openxBidAdapter.js +192 -563
  222. package/modules/openxBidAdapter.md +22 -20
  223. package/modules/openxOrtbBidAdapter.js +13 -11
  224. package/modules/openxOrtbBidAdapter.md +5 -3
  225. package/modules/operaadsBidAdapter.js +1 -1
  226. package/modules/pairIdSystem.js +79 -0
  227. package/modules/pubmaticBidAdapter.js +13 -10
  228. package/modules/pubxBidAdapter.js +5 -2
  229. package/modules/riseBidAdapter.js +1 -1
  230. package/modules/sharedIdSystem.js +4 -27
  231. package/modules/sharethroughBidAdapter.js +1 -1
  232. package/modules/shinezBidAdapter.js +1 -1
  233. package/modules/smarthubBidAdapter.js +1 -1
  234. package/modules/synacormediaBidAdapter.js +1 -3
  235. package/modules/truereachBidAdapter.js +1 -2
  236. package/modules/userId/eids.js +24 -0
  237. package/modules/userId/eids.md +16 -0
  238. package/modules/videoheroesBidAdapter.js +1 -1
  239. package/modules/vidoomyBidAdapter.js +33 -4
  240. package/modules/visiblemeasuresBidAdapter.js +1 -1
  241. package/modules/vrtcalBidAdapter.js +1 -1
  242. package/modules/yieldmoBidAdapter.js +15 -5
  243. package/modules/yieldoneBidAdapter.js +1 -1
  244. package/package.json +1 -1
  245. package/src/Renderer.js +2 -1
  246. package/src/config.js +78 -127
  247. package/src/native.js +5 -1
  248. package/test/spec/auctionmanager_spec.js +2 -2
  249. package/test/spec/libraries/domainOverrideToRootDomain/index_spec.js +77 -0
  250. package/test/spec/modules/1plusXRtdProvider_spec.js +8 -7
  251. package/test/spec/modules/acuityAdsBidAdapter_spec.js +2 -1
  252. package/test/spec/modules/adagioBidAdapter_spec.js +0 -25
  253. package/test/spec/modules/admaticBidAdapter_spec.js +1 -1
  254. package/test/spec/modules/adnuntiusBidAdapter_spec.js +2 -1
  255. package/test/spec/modules/amxIdSystem_spec.js +13 -26
  256. package/test/spec/modules/appnexusBidAdapter_spec.js +464 -448
  257. package/test/spec/modules/appushBidAdapter_spec.js +2 -1
  258. package/test/spec/modules/axonixBidAdapter_spec.js +0 -27
  259. package/test/spec/modules/beyondmediaBidAdapter_spec.js +2 -1
  260. package/test/spec/modules/big-richmediaBidAdapter_spec.js +68 -64
  261. package/test/spec/modules/compassBidAdapter_spec.js +2 -1
  262. package/test/spec/modules/connectIdSystem_spec.js +420 -242
  263. package/test/spec/modules/contentexchangeBidAdapter_spec.js +2 -1
  264. package/test/spec/modules/conversantBidAdapter_spec.js +1 -0
  265. package/test/spec/modules/criteoBidAdapter_spec.js +33 -1
  266. package/test/spec/modules/eids_spec.js +30 -0
  267. package/test/spec/modules/eskimiBidAdapter_spec.js +155 -0
  268. package/test/spec/modules/freewheel-sspBidAdapter_spec.js +37 -0
  269. package/test/spec/modules/globalsunBidAdapter_spec.js +2 -1
  270. package/test/spec/modules/gridBidAdapter_spec.js +8 -0
  271. package/test/spec/modules/iqzoneBidAdapter_spec.js +2 -1
  272. package/test/spec/modules/ivsBidAdapter_spec.js +197 -0
  273. package/test/spec/modules/ixBidAdapter_spec.js +141 -71
  274. package/test/spec/modules/kargoBidAdapter_spec.js +297 -140
  275. package/test/spec/modules/koblerBidAdapter_spec.js +0 -20
  276. package/test/spec/modules/kueezRtbBidAdapter_spec.js +22 -2
  277. package/test/spec/modules/liveIntentIdSystem_spec.js +10 -0
  278. package/test/spec/modules/luponmediaBidAdapter_spec.js +1 -1
  279. package/test/spec/modules/magniteAnalyticsAdapter_spec.js +129 -1
  280. package/test/spec/modules/mathildeadsBidAdapter_spec.js +2 -1
  281. package/test/spec/modules/mgidBidAdapter_spec.js +184 -36
  282. package/test/spec/modules/minutemediaplusBidAdapter_spec.js +22 -2
  283. package/test/spec/modules/nativoBidAdapter_spec.js +101 -0
  284. package/test/spec/modules/neuwoRtdProvider_spec.js +0 -1
  285. package/test/spec/modules/oguryBidAdapter_spec.js +19 -4
  286. package/test/spec/modules/ooloAnalyticsAdapter_spec.js +1 -1
  287. package/test/spec/modules/openxBidAdapter_spec.js +1157 -1936
  288. package/test/spec/modules/openxOrtbBidAdapter_spec.js +12 -39
  289. package/test/spec/modules/pairIdSystem_spec.js +68 -0
  290. package/test/spec/modules/pubCommonId_spec.js +0 -17
  291. package/test/spec/modules/pubmaticBidAdapter_spec.js +868 -867
  292. package/test/spec/modules/pubxBidAdapter_spec.js +10 -2
  293. package/test/spec/modules/realvuAnalyticsAdapter_spec.js +0 -5
  294. package/test/spec/modules/sharedIdSystem_spec.js +0 -46
  295. package/test/spec/modules/sharethroughBidAdapter_spec.js +2 -1
  296. package/test/spec/modules/smarthubBidAdapter_spec.js +2 -1
  297. package/test/spec/modules/synacormediaBidAdapter_spec.js +0 -26
  298. package/test/spec/modules/videoModule/submodules/jwplayerVideoProvider_spec.js +17 -4
  299. package/test/spec/modules/vidoomyBidAdapter_spec.js +58 -0
  300. package/test/spec/modules/visiblemeasuresBidAdapter_spec.js +2 -1
  301. package/test/spec/modules/vrtcalBidAdapter_spec.js +3 -2
  302. package/test/spec/modules/yieldmoBidAdapter_spec.js +19 -1
  303. package/test/spec/renderer_spec.js +1 -2
  304. package/test/spec/unit/pbjs_api_spec.js +19 -3
  305. package/test/test_index.js +13 -3
  306. package/dist/gridNMBidAdapter.js +0 -1
  307. package/modules/gridNMBidAdapter.js +0 -422
  308. package/modules/gridNMBidAdapter.md +0 -39
  309. package/test/spec/modules/gridNMBidAdapter_spec.js +0 -636
@@ -68,6 +68,7 @@ export const spec = {
68
68
  const videoBidRequests = bidRequests.filter(request => hasVideoMediaType(request));
69
69
  let serverRequests = [];
70
70
  const eids = getEids(bidRequests[0]) || [];
71
+
71
72
  if (bannerBidRequests.length > 0) {
72
73
  let serverRequest = {
73
74
  pbav: '$prebid.version$',
@@ -80,7 +81,9 @@ export const spec = {
80
81
  userConsent: JSON.stringify({
81
82
  // case of undefined, stringify will remove param
82
83
  gdprApplies: deepAccess(bidderRequest, 'gdprConsent.gdprApplies') || '',
83
- cmp: deepAccess(bidderRequest, 'gdprConsent.consentString') || ''
84
+ cmp: deepAccess(bidderRequest, 'gdprConsent.consentString') || '',
85
+ gpp: deepAccess(bidderRequest, 'gppConsent.gppString') || '',
86
+ gpp_sid: deepAccess(bidderRequest, 'gppConsent.applicableSections') || ''
84
87
  }),
85
88
  us_privacy: deepAccess(bidderRequest, 'uspConsent') || ''
86
89
  };
@@ -514,12 +517,19 @@ function openRtbSite(bidRequest, bidderRequest) {
514
517
  */
515
518
  function populateOpenRtbGdpr(openRtbRequest, bidderRequest) {
516
519
  const gdpr = bidderRequest.gdprConsent;
517
- if (gdpr && 'gdprApplies' in gdpr) {
518
- deepSetValue(openRtbRequest, 'regs.ext.gdpr', gdpr.gdprApplies ? 1 : 0);
519
- deepSetValue(openRtbRequest, 'user.ext.consent', gdpr.consentString);
520
+ const gpp = deepAccess(bidderRequest, 'gppConsent.gppString');
521
+ const gppsid = deepAccess(bidderRequest, 'gppConsent.applicableSections');
522
+ if (gpp) {
523
+ deepSetValue(openRtbRequest, 'regs.ext.gpp', gpp);
524
+ } else {
525
+ deepSetValue(openRtbRequest, 'regs.ext.gdpr', gdpr && gdpr.gdprApplies ? 1 : 0);
526
+ deepSetValue(openRtbRequest, 'user.ext.consent', gdpr && gdpr.consentString ? gdpr.consentString : '');
527
+ }
528
+ if (gppsid) {
529
+ deepSetValue(openRtbRequest, 'regs.ext.gpp_sid', gppsid);
520
530
  }
521
531
  const uspConsent = deepAccess(bidderRequest, 'uspConsent');
522
- if (uspConsent) {
532
+ if (!gpp && uspConsent) {
523
533
  deepSetValue(openRtbRequest, 'regs.ext.us_privacy', uspConsent);
524
534
  }
525
535
  }
@@ -53,7 +53,7 @@ export const spec = {
53
53
  const bidId = bidRequest.bidId;
54
54
  const transactionId = bidRequest.transactionId;
55
55
  const unitCode = bidRequest.adUnitCode;
56
- const timeout = config.getConfig('bidderTimeout');
56
+ const timeout = bidderRequest.timeout;
57
57
  const language = window.navigator.language;
58
58
  const screenSize = window.screen.width + 'x' + window.screen.height;
59
59
  const payload = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prebid.js",
3
- "version": "7.44.0",
3
+ "version": "7.46.0",
4
4
  "description": "Header Bidding Management Library",
5
5
  "main": "src/prebid.js",
6
6
  "scripts": {
package/src/Renderer.js CHANGED
@@ -22,6 +22,7 @@ export function Renderer(options) {
22
22
  this.config = config;
23
23
  this.handlers = {};
24
24
  this.id = id;
25
+ this.renderNow = renderNow;
25
26
 
26
27
  // a renderer may push to the command queue to delay rendering until the
27
28
  // render function is loaded by loadExternalScript, at which point the the command
@@ -110,7 +111,7 @@ Renderer.prototype.process = function() {
110
111
  * @returns {Boolean}
111
112
  */
112
113
  export function isRendererRequired(renderer) {
113
- return !!(renderer && renderer.url);
114
+ return !!(renderer && (renderer.url || renderer.renderNow));
114
115
  }
115
116
 
116
117
  /**
package/src/config.js CHANGED
@@ -66,158 +66,109 @@ export function newConfig() {
66
66
 
67
67
  function resetConfig() {
68
68
  defaults = {};
69
- let newConfig = {
70
- // `debug` is equivalent to legacy `pbjs.logging` property
71
- _debug: DEFAULT_DEBUG,
72
- get debug() {
73
- return this._debug;
74
- },
75
- set debug(val) {
76
- this._debug = val;
77
- },
78
69
 
79
- // default timeout for all bids
80
- _bidderTimeout: DEFAULT_BIDDER_TIMEOUT,
81
- get bidderTimeout() {
82
- return this._bidderTimeout;
83
- },
84
- set bidderTimeout(val) {
85
- this._bidderTimeout = val;
86
- },
70
+ function getProp(name) {
71
+ return props[name].val;
72
+ }
87
73
 
88
- _publisherDomain: null,
89
- get publisherDomain() {
90
- return this._publisherDomain;
91
- },
92
- set publisherDomain(val) {
93
- logWarn('publisherDomain is deprecated and has no effect since v7 - use pageUrl instead')
94
- this._publisherDomain = val;
95
- },
74
+ function setProp(name, val) {
75
+ props[name].val = val;
76
+ }
96
77
 
97
- // calls existing function which may be moved after deprecation
98
- _priceGranularity: GRANULARITY_OPTIONS.MEDIUM,
99
- set priceGranularity(val) {
100
- if (validatePriceGranularity(val)) {
101
- if (typeof val === 'string') {
102
- this._priceGranularity = (hasGranularity(val)) ? val : GRANULARITY_OPTIONS.MEDIUM;
103
- } else if (isPlainObject(val)) {
104
- this._customPriceBucket = val;
105
- this._priceGranularity = GRANULARITY_OPTIONS.CUSTOM;
106
- logMessage('Using custom price granularity');
78
+ const props = {
79
+ publisherDomain: {
80
+ set(val) {
81
+ if (val != null) {
82
+ logWarn('publisherDomain is deprecated and has no effect since v7 - use pageUrl instead')
107
83
  }
84
+ setProp('publisherDomain', val);
108
85
  }
109
86
  },
110
- get priceGranularity() {
111
- return this._priceGranularity;
112
- },
113
-
114
- _customPriceBucket: {},
115
- get customPriceBucket() {
116
- return this._customPriceBucket;
117
- },
118
-
119
- /**
120
- * mediaTypePriceGranularity
121
- * @type {MediaTypePriceGranularity}
122
- */
123
- _mediaTypePriceGranularity: {},
124
-
125
- get mediaTypePriceGranularity() {
126
- return this._mediaTypePriceGranularity;
127
- },
128
- set mediaTypePriceGranularity(val) {
129
- this._mediaTypePriceGranularity = Object.keys(val).reduce((aggregate, item) => {
130
- if (validatePriceGranularity(val[item])) {
87
+ priceGranularity: {
88
+ val: GRANULARITY_OPTIONS.MEDIUM,
89
+ set(val) {
90
+ if (validatePriceGranularity(val)) {
131
91
  if (typeof val === 'string') {
132
- aggregate[item] = (hasGranularity(val[item])) ? val[item] : this._priceGranularity;
92
+ setProp('priceGranularity', (hasGranularity(val)) ? val : GRANULARITY_OPTIONS.MEDIUM);
133
93
  } else if (isPlainObject(val)) {
134
- aggregate[item] = val[item];
135
- logMessage(`Using custom price granularity for ${item}`);
94
+ setProp('customPriceBucket', val);
95
+ setProp('priceGranularity', GRANULARITY_OPTIONS.CUSTOM)
96
+ logMessage('Using custom price granularity');
136
97
  }
137
- } else {
138
- logWarn(`Invalid price granularity for media type: ${item}`);
139
98
  }
140
- return aggregate;
141
- }, {});
142
- },
143
-
144
- _sendAllBids: DEFAULT_ENABLE_SEND_ALL_BIDS,
145
- get enableSendAllBids() {
146
- return this._sendAllBids;
99
+ }
147
100
  },
148
- set enableSendAllBids(val) {
149
- this._sendAllBids = val;
101
+ customPriceBucket: {
102
+ val: {},
103
+ set() {}
150
104
  },
151
-
152
- _useBidCache: DEFAULT_BID_CACHE,
153
- get useBidCache() {
154
- return this._useBidCache;
105
+ mediaTypePriceGranularity: {
106
+ val: {},
107
+ set(val) {
108
+ val != null && setProp('mediaTypePriceGranularity', Object.keys(val).reduce((aggregate, item) => {
109
+ if (validatePriceGranularity(val[item])) {
110
+ if (typeof val === 'string') {
111
+ aggregate[item] = (hasGranularity(val[item])) ? val[item] : getProp('priceGranularity');
112
+ } else if (isPlainObject(val)) {
113
+ aggregate[item] = val[item];
114
+ logMessage(`Using custom price granularity for ${item}`);
115
+ }
116
+ } else {
117
+ logWarn(`Invalid price granularity for media type: ${item}`);
118
+ }
119
+ return aggregate;
120
+ }, {}));
121
+ }
155
122
  },
156
- set useBidCache(val) {
157
- this._useBidCache = val;
123
+ bidderSequence: {
124
+ val: DEFAULT_BIDDER_SEQUENCE,
125
+ set(val) {
126
+ if (VALID_ORDERS[val]) {
127
+ setProp('bidderSequence', val);
128
+ } else {
129
+ logWarn(`Invalid order: ${val}. Bidder Sequence was not set.`);
130
+ }
131
+ }
158
132
  },
133
+ auctionOptions: {
134
+ val: {},
135
+ set(val) {
136
+ if (validateauctionOptions(val)) {
137
+ setProp('auctionOptions', val);
138
+ }
139
+ }
140
+ }
141
+ }
142
+ let newConfig = {
143
+ // `debug` is equivalent to legacy `pbjs.logging` property
144
+ debug: DEFAULT_DEBUG,
145
+ bidderTimeout: DEFAULT_BIDDER_TIMEOUT,
146
+ enableSendAllBids: DEFAULT_ENABLE_SEND_ALL_BIDS,
147
+ useBidCache: DEFAULT_BID_CACHE,
159
148
 
160
149
  /**
161
150
  * deviceAccess set to false will disable setCookie, getCookie, hasLocalStorage
162
151
  * @type {boolean}
163
152
  */
164
- _deviceAccess: DEFAULT_DEVICE_ACCESS,
165
- get deviceAccess() {
166
- return this._deviceAccess;
167
- },
168
- set deviceAccess(val) {
169
- this._deviceAccess = val;
170
- },
171
-
172
- _bidderSequence: DEFAULT_BIDDER_SEQUENCE,
173
- get bidderSequence() {
174
- return this._bidderSequence;
175
- },
176
- set bidderSequence(val) {
177
- if (VALID_ORDERS[val]) {
178
- this._bidderSequence = val;
179
- } else {
180
- logWarn(`Invalid order: ${val}. Bidder Sequence was not set.`);
181
- }
182
- },
153
+ deviceAccess: DEFAULT_DEVICE_ACCESS,
183
154
 
184
155
  // timeout buffer to adjust for bidder CDN latency
185
- _timeoutBuffer: DEFAULT_TIMEOUTBUFFER,
186
- get timeoutBuffer() {
187
- return this._timeoutBuffer;
188
- },
189
- set timeoutBuffer(val) {
190
- this._timeoutBuffer = val;
191
- },
192
-
193
- _disableAjaxTimeout: DEFAULT_DISABLE_AJAX_TIMEOUT,
194
- get disableAjaxTimeout() {
195
- return this._disableAjaxTimeout;
196
- },
197
- set disableAjaxTimeout(val) {
198
- this._disableAjaxTimeout = val;
199
- },
156
+ timeoutBuffer: DEFAULT_TIMEOUTBUFFER,
157
+ disableAjaxTimeout: DEFAULT_DISABLE_AJAX_TIMEOUT,
200
158
 
201
159
  // default max nested iframes for referer detection
202
- _maxNestedIframes: DEFAULT_MAX_NESTED_IFRAMES,
203
- get maxNestedIframes() {
204
- return this._maxNestedIframes;
205
- },
206
- set maxNestedIframes(val) {
207
- this._maxNestedIframes = val;
208
- },
209
-
210
- _auctionOptions: {},
211
- get auctionOptions() {
212
- return this._auctionOptions;
213
- },
214
- set auctionOptions(val) {
215
- if (validateauctionOptions(val)) {
216
- this._auctionOptions = val;
217
- }
218
- },
160
+ maxNestedIframes: DEFAULT_MAX_NESTED_IFRAMES,
219
161
  };
220
162
 
163
+ Object.defineProperties(newConfig,
164
+ Object.fromEntries(Object.entries(props)
165
+ .map(([k, def]) => [k, Object.assign({
166
+ get: getProp.bind(null, k),
167
+ set: setProp.bind(null, k),
168
+ enumerable: true,
169
+ }, def)]))
170
+ );
171
+
221
172
  if (config) {
222
173
  callSubscribers(
223
174
  Object.keys(config).reduce((memo, topic) => {
package/src/native.js CHANGED
@@ -750,7 +750,11 @@ export function toLegacyResponse(ortbResponse, ortbRequest) {
750
750
  if (asset.title) {
751
751
  legacyResponse.title = asset.title.text;
752
752
  } else if (asset.img) {
753
- legacyResponse[requestAsset.img.type === NATIVE_IMAGE_TYPES.MAIN ? 'image' : 'icon'] = asset.img.url;
753
+ legacyResponse[requestAsset.img.type === NATIVE_IMAGE_TYPES.MAIN ? 'image' : 'icon'] = {
754
+ url: asset.img.url,
755
+ width: asset.img.w,
756
+ height: asset.img.h
757
+ };
754
758
  } else if (asset.data) {
755
759
  legacyResponse[PREBID_NATIVE_DATA_KEYS_TO_ORTB_INVERSE[NATIVE_ASSET_TYPES_INVERSE[requestAsset.data.type]]] = asset.data.value;
756
760
  }
@@ -1403,8 +1403,8 @@ describe('auctionmanager.js', function () {
1403
1403
  assert.equal(addedBid.native.title, 'Sample title')
1404
1404
  assert.equal(addedBid.native.sponsoredBy, 'Sample sponsoredBy')
1405
1405
  assert.equal(addedBid.native.clickUrl, 'http://www.click.com')
1406
- assert.equal(addedBid.native.image, 'https://www.example.com/image.png')
1407
- assert.equal(addedBid.native.icon, 'https://www.example.com/icon.png')
1406
+ assert.equal(addedBid.native.image.url, 'https://www.example.com/image.png')
1407
+ assert.equal(addedBid.native.icon.url, 'https://www.example.com/icon.png')
1408
1408
  assert.equal(addedBid.native.impressionTrackers[0], 'http://www.imptracker.com')
1409
1409
  assert.equal(addedBid.native.javascriptTrackers, '<script async src="http://www.jstracker.com/file.js"></script>')
1410
1410
  });
@@ -0,0 +1,77 @@
1
+ import {domainOverrideToRootDomain} from 'libraries/domainOverrideToRootDomain/index.js';
2
+ import {getStorageManager} from 'src/storageManager.js';
3
+ import {MODULE_TYPE_UID} from '../../../../src/activities/modules';
4
+
5
+ const storage = getStorageManager({ moduleName: 'test', moduleType: MODULE_TYPE_UID });
6
+ const domainOverride = domainOverrideToRootDomain(storage, 'test');
7
+
8
+ describe('domainOverride', () => {
9
+ let sandbox, domain, cookies, rejectCookiesFor;
10
+ let setCookieStub;
11
+
12
+ beforeEach(() => {
13
+ sandbox = sinon.createSandbox();
14
+ sandbox.stub(document, 'domain').get(() => domain);
15
+ cookies = {};
16
+ sandbox.stub(storage, 'getCookie').callsFake((key) => cookies[key]);
17
+ rejectCookiesFor = null;
18
+ setCookieStub = sandbox.stub(storage, 'setCookie').callsFake((key, value, expires, sameSite, domain) => {
19
+ if (domain !== rejectCookiesFor) {
20
+ if (expires != null) {
21
+ expires = new Date(expires);
22
+ }
23
+ if (expires == null || expires > Date.now()) {
24
+ cookies[key] = value;
25
+ } else {
26
+ delete cookies[key];
27
+ }
28
+ }
29
+ });
30
+ });
31
+
32
+ afterEach(() => sandbox.restore())
33
+
34
+ it('test cookies include the module name', () => {
35
+ domain = 'greatpublisher.com'
36
+ rejectCookiesFor = 'greatpublisher.com'
37
+
38
+ // stub Date.now() to return a constant value
39
+ sandbox.stub(Date, 'now').returns(1234567890)
40
+
41
+ const randomName = `adapterV${(Math.random() * 1e8).toString(16)}`
42
+ const localDomainOverride = domainOverrideToRootDomain(storage, randomName)
43
+
44
+ const time = Date.now();
45
+ localDomainOverride();
46
+
47
+ sandbox.assert.callCount(setCookieStub, 2)
48
+ sandbox.assert.calledWith(setCookieStub, `_gd${time}_${randomName}`, '1', undefined, undefined, 'greatpublisher.com')
49
+ });
50
+
51
+ it('will return the root domain when given a subdomain', () => {
52
+ const test_domains = [
53
+ 'deeply.nested.subdomain.for.greatpublisher.com',
54
+ 'greatpublisher.com',
55
+ 'subdomain.greatpublisher.com',
56
+ 'a-subdomain.greatpublisher.com',
57
+ ];
58
+
59
+ test_domains.forEach((testDomain) => {
60
+ domain = testDomain
61
+ rejectCookiesFor = 'com'
62
+ expect(domainOverride()).to.equal('greatpublisher.com');
63
+ });
64
+ });
65
+
66
+ it(`If we can't set cookies on the root domain, we'll return the subdomain`, () => {
67
+ domain = 'subdomain.greatpublisher.com'
68
+ rejectCookiesFor = 'greatpublisher.com'
69
+ expect(domainOverride()).to.equal('subdomain.greatpublisher.com');
70
+ });
71
+
72
+ it('Will return undefined if we can\'t set cookies on the root domain or the subdomain', () => {
73
+ domain = 'subdomain.greatpublisher.com'
74
+ rejectCookiesFor = 'subdomain.greatpublisher.com'
75
+ expect(domainOverride()).to.equal(undefined);
76
+ });
77
+ });
@@ -332,15 +332,16 @@ describe('1plusXRtdProvider', () => {
332
332
  }
333
333
 
334
334
  it('correctly builds URLs if gdpr parameters are present', () => {
335
- const url1 = getPapiUrl(customer)
336
- const url2 = getPapiUrl(customer, extractConsent(consent))
337
- expect(['&consent_string=myConsent&gdpr_applies=1', '&gdpr_applies=1&consent_string=myConsent']).to.contain(url2.replace(url1, ''))
335
+ const url1 = getPapiUrl(customer);
336
+ const url2 = getPapiUrl(customer, extractConsent(consent));
337
+ expect(['&consent_string=myConsent&gdpr_applies=1', '&gdpr_applies=1&consent_string=myConsent']).to.contain(url2.replace(url1, ''));
338
338
  })
339
339
 
340
- it('correctly builds URLs if fpid parameters are present')
341
- const url1 = getPapiUrl(customer)
342
- const url2 = getPapiUrl(customer, {}, 'my_first_party_id')
343
- expect(url2.replace(url1, '')).to.equal('&fpid=my_first_party_id')
340
+ it('correctly builds URLs if fpid parameters are present', () => {
341
+ const url1 = getPapiUrl(customer);
342
+ const url2 = getPapiUrl(customer, {}, 'my_first_party_id');
343
+ expect(url2.replace(url1, '')).to.equal('&fpid=my_first_party_id');
344
+ })
344
345
  })
345
346
 
346
347
  describe('updateBidderConfig', () => {
@@ -76,7 +76,8 @@ describe('AcuityAdsBidAdapter', function () {
76
76
  gdprConsent: 'COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw',
77
77
  refererInfo: {
78
78
  referer: 'https://test.com'
79
- }
79
+ },
80
+ timeout: 500
80
81
  };
81
82
 
82
83
  describe('isBidRequestValid', function () {
@@ -1481,31 +1481,6 @@ describe('Adagio bid adapter', () => {
1481
1481
  });
1482
1482
  });
1483
1483
 
1484
- describe.skip('optional params auto detection', function() {
1485
- it('should auto detect adUnitElementId when GPT is used', function() {
1486
- sandbox.stub(utils, 'getGptSlotInfoForAdUnitCode').withArgs('banner').returns({divId: 'gpt-banner'});
1487
- expect(adagio.autoDetectAdUnitElementId('banner')).to.eq('gpt-banner');
1488
- });
1489
- });
1490
-
1491
- describe.skip('print number handling', function() {
1492
- it('should return 1 if no adunit-code found. This means it is the first auction', function() {
1493
- sandbox.stub(adagio, 'getPageviewId').returns('abc-def');
1494
- expect(adagio.computePrintNumber('adunit-code')).to.eql(1);
1495
- });
1496
-
1497
- it('should increment the adunit print number when the adunit-code has already been used for an other auction', function() {
1498
- sandbox.stub(adagio, 'getPageviewId').returns('abc-def');
1499
-
1500
- window.top.ADAGIO.adUnits['adunit-code'] = {
1501
- pageviewId: 'abc-def',
1502
- printNumber: 1,
1503
- };
1504
-
1505
- expect(adagio.computePrintNumber('adunit-code')).to.eql(2);
1506
- });
1507
- });
1508
-
1509
1484
  describe('site information using refererDetection or window.top', function() {
1510
1485
  it('should returns domain, page and window.referrer in a window.top context', function() {
1511
1486
  const bidderRequest = new BidderRequestBuilder({
@@ -3,7 +3,7 @@ import {spec, storage} from 'modules/admaticBidAdapter.js';
3
3
  import {newBidder} from 'src/adapters/bidderFactory.js';
4
4
  import {getStorageManager} from 'src/storageManager';
5
5
 
6
- const ENDPOINT = 'https://layer.serve.admatic.com.tr/pb?bidder=admatic';
6
+ const ENDPOINT = 'https://layer.serve.admatic.com.tr/pb';
7
7
 
8
8
  describe('admaticBidAdapter', () => {
9
9
  const adapter = newBidder(spec);
@@ -8,6 +8,7 @@ import { getStorageManager } from 'src/storageManager.js';
8
8
 
9
9
  describe('adnuntiusBidAdapter', function () {
10
10
  const URL = 'https://ads.adnuntius.delivery/i?tzo=';
11
+ const EURO_URL = 'https://europe.delivery.adnuntius.com/i?tzo=';
11
12
  const GVLID = 855;
12
13
  const usi = utils.generateUUID()
13
14
  const meta = [{ key: 'usi', value: usi }]
@@ -35,7 +36,7 @@ describe('adnuntiusBidAdapter', function () {
35
36
  const ENDPOINT_URL_VIDEO = `${URL}${tzo}&format=json&userId=${usi}&tt=vast4`;
36
37
  const ENDPOINT_URL_NOCOOKIE = `${URL}${tzo}&format=json&userId=${usi}&noCookies=true`;
37
38
  const ENDPOINT_URL_SEGMENTS = `${URL}${tzo}&format=json&segments=segment1,segment2,segment3&userId=${usi}`;
38
- const ENDPOINT_URL_CONSENT = `${URL}${tzo}&format=json&consentString=consentString&userId=${usi}`;
39
+ const ENDPOINT_URL_CONSENT = `${EURO_URL}${tzo}&format=json&consentString=consentString&userId=${usi}`;
39
40
  const adapter = newBidder(spec);
40
41
 
41
42
  const bidderRequests = [
@@ -1,4 +1,4 @@
1
- import { amxIdSubmodule } from 'modules/amxIdSystem.js';
1
+ import { amxIdSubmodule, storage } from 'modules/amxIdSystem.js';
2
2
  import { server } from 'test/mocks/xhr.js';
3
3
  import * as utils from 'src/utils.js';
4
4
 
@@ -48,38 +48,17 @@ describe('validateConfig', () => {
48
48
  logErrorSpy.restore();
49
49
  });
50
50
 
51
- it('should return undefined if config.storage is not present', () => {
51
+ it('should allow configuration with no storage', () => {
52
52
  expect(
53
53
  amxIdSubmodule.getId(
54
54
  {
55
55
  ...config,
56
- storage: null,
56
+ storage: undefined
57
57
  },
58
58
  null,
59
59
  null
60
60
  )
61
- ).to.equal(undefined);
62
-
63
- expect(logErrorSpy.calledOnce).to.be.true;
64
- expect(logErrorSpy.lastCall.lastArg).to.contain('storage is required');
65
- });
66
-
67
- it('should return undefined if config.storage.type !== "html5"', () => {
68
- expect(
69
- amxIdSubmodule.getId(
70
- {
71
- ...config,
72
- storage: {
73
- type: 'cookie',
74
- },
75
- },
76
- null,
77
- null
78
- )
79
- ).to.equal(undefined);
80
-
81
- expect(logErrorSpy.calledOnce).to.be.true;
82
- expect(logErrorSpy.lastCall.lastArg).to.contain('cookie');
61
+ ).to.not.equal(undefined);
83
62
  });
84
63
 
85
64
  it('should return undefined if expires > 30', () => {
@@ -111,10 +90,18 @@ describe('getId', () => {
111
90
  });
112
91
 
113
92
  it('should call the sync endpoint and accept a valid response', () => {
93
+ storage.setDataInLocalStorage('__amuidpb', TEST_ID);
94
+
114
95
  const { callback } = amxIdSubmodule.getId(config, null, null);
115
96
  callback(spy);
116
97
 
117
98
  const [request] = server.requests;
99
+ expect(request.withCredentials).to.be.true
100
+ expect(request.requestHeaders['Content-Type']).to.match(/text\/plain/)
101
+
102
+ const { search } = utils.parseUrl(request.url);
103
+ expect(search.av).to.equal(amxIdSubmodule.version);
104
+ expect(search.am).to.equal(TEST_ID);
118
105
  expect(request.method).to.equal('GET');
119
106
 
120
107
  request.respond(
@@ -187,7 +174,7 @@ describe('getId', () => {
187
174
  );
188
175
 
189
176
  const [, secondRequest] = server.requests;
190
- expect(secondRequest.url).to.be.equal(intermediateValue);
177
+ expect(secondRequest.url).to.match(new RegExp(`^${intermediateValue}\?`));
191
178
  secondRequest.respond(
192
179
  200,
193
180
  {},