prebid.js 5.14.0 → 5.18.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 (397) hide show
  1. package/.devcontainer/Dockerfile +11 -0
  2. package/.devcontainer/devcontainer.json +27 -0
  3. package/.devcontainer/postCreate.sh +6 -0
  4. package/allowedModules.js +2 -1
  5. package/integrationExamples/gpt/afpExample.html +242 -0
  6. package/integrationExamples/gpt/afpGamExample.html +152 -0
  7. package/integrationExamples/gpt/weboramaRtdProvider_example.html +126 -0
  8. package/modules/.submodules.json +29 -27
  9. package/modules/33acrossBidAdapter.js +23 -20
  10. package/modules/a4gBidAdapter.js +3 -3
  11. package/modules/ablidaBidAdapter.js +2 -2
  12. package/modules/adWMGBidAdapter.js +4 -4
  13. package/modules/adagioAnalyticsAdapter.js +4 -4
  14. package/modules/adagioBidAdapter.js +85 -82
  15. package/modules/adbookpspBidAdapter.js +56 -54
  16. package/modules/adfBidAdapter.js +24 -16
  17. package/modules/adgenerationBidAdapter.js +42 -18
  18. package/modules/adhashBidAdapter.js +105 -0
  19. package/modules/adhashBidAdapter.md +1 -1
  20. package/modules/adkernelAdnAnalyticsAdapter.js +6 -6
  21. package/modules/adkernelAdnBidAdapter.js +23 -23
  22. package/modules/adkernelBidAdapter.js +49 -44
  23. package/modules/adlooxAdServerVideo.js +26 -26
  24. package/modules/adlooxAnalyticsAdapter.js +38 -35
  25. package/modules/adlooxRtdProvider.js +49 -46
  26. package/modules/admanBidAdapter.js +4 -4
  27. package/modules/admixerBidAdapter.js +13 -2
  28. package/modules/admixerIdSystem.js +4 -4
  29. package/modules/adnowBidAdapter.js +4 -4
  30. package/modules/adnuntiusBidAdapter.js +6 -5
  31. package/modules/adoceanBidAdapter.js +10 -10
  32. package/modules/adpartnerBidAdapter.js +3 -3
  33. package/modules/adpod.js +45 -42
  34. package/modules/adprimeBidAdapter.js +4 -4
  35. package/modules/adqueryBidAdapter.js +204 -0
  36. package/modules/adqueryBidAdapter.md +32 -0
  37. package/modules/adrelevantisBidAdapter.js +30 -27
  38. package/modules/adriverBidAdapter.js +13 -13
  39. package/modules/adtargetBidAdapter.js +24 -24
  40. package/modules/adtelligentBidAdapter.js +29 -29
  41. package/modules/adtrueBidAdapter.js +35 -35
  42. package/modules/aduptechBidAdapter.js +10 -10
  43. package/modules/advangelistsBidAdapter.js +14 -14
  44. package/modules/adxcgAnalyticsAdapter.js +5 -5
  45. package/modules/adxcgBidAdapter.js +56 -56
  46. package/modules/adxpremiumAnalyticsAdapter.js +17 -17
  47. package/modules/adyoulikeBidAdapter.js +11 -11
  48. package/modules/afpBidAdapter.js +166 -0
  49. package/modules/afpBidAdapter.md +348 -0
  50. package/modules/ajaBidAdapter.js +12 -12
  51. package/modules/akamaiDAPIdSystem.js +9 -9
  52. package/modules/aniviewBidAdapter.js +2 -2
  53. package/modules/aolBidAdapter.js +15 -14
  54. package/modules/apacdexBidAdapter.js +16 -16
  55. package/modules/appnexusBidAdapter.js +59 -59
  56. package/modules/apstreamBidAdapter.js +5 -5
  57. package/modules/asoBidAdapter.js +30 -30
  58. package/modules/astraoneBidAdapter.js +2 -2
  59. package/modules/atsAnalyticsAdapter.js +35 -30
  60. package/modules/audiencerunBidAdapter.js +15 -15
  61. package/modules/automatadBidAdapter.js +2 -2
  62. package/modules/axonixBidAdapter.js +7 -7
  63. package/modules/beachfrontBidAdapter.js +23 -23
  64. package/modules/beopBidAdapter.js +22 -22
  65. package/modules/bidViewabilityIO.js +7 -7
  66. package/modules/bidglassBidAdapter.js +8 -8
  67. package/modules/bidscubeBidAdapter.js +3 -3
  68. package/modules/bizzclickBidAdapter.js +10 -10
  69. package/modules/bliinkBidAdapter.js +58 -32
  70. package/modules/bliinkBidAdapter.md +29 -6
  71. package/modules/bluebillywigBidAdapter.js +30 -30
  72. package/modules/boldwinBidAdapter.js +4 -4
  73. package/modules/braveBidAdapter.js +5 -5
  74. package/modules/bridgewellBidAdapter.js +5 -5
  75. package/modules/brightMountainMediaBidAdapter.js +10 -10
  76. package/modules/brightcomBidAdapter.js +18 -18
  77. package/modules/britepoolIdSystem.js +7 -7
  78. package/modules/browsiRtdProvider.js +8 -8
  79. package/modules/bucksenseBidAdapter.js +9 -9
  80. package/modules/buzzoolaBidAdapter.js +4 -4
  81. package/modules/byDataAnalyticsAdapter.js +12 -12
  82. package/modules/ccxBidAdapter.js +38 -38
  83. package/modules/cleanmedianetBidAdapter.js +9 -9
  84. package/modules/clickforceBidAdapter.js +4 -4
  85. package/modules/cointrafficBidAdapter.js +4 -4
  86. package/modules/coinzillaBidAdapter.js +2 -2
  87. package/modules/colossussspBidAdapter.js +7 -3
  88. package/modules/concertAnalyticsAdapter.js +3 -3
  89. package/modules/concertBidAdapter.js +16 -17
  90. package/modules/connectadBidAdapter.js +13 -13
  91. package/modules/consentManagement.js +29 -28
  92. package/modules/consentManagementUsp.js +14 -14
  93. package/modules/consumableBidAdapter.js +3 -3
  94. package/modules/contentexchangeBidAdapter.js +5 -5
  95. package/modules/conversantBidAdapter.js +32 -31
  96. package/modules/cpmstarBidAdapter.js +8 -9
  97. package/modules/craftBidAdapter.js +10 -10
  98. package/modules/criteoBidAdapter.js +16 -16
  99. package/modules/criteoIdSystem.js +5 -5
  100. package/modules/currency.js +18 -18
  101. package/modules/cwireBidAdapter.js +272 -0
  102. package/modules/cwireBidAdapter.md +43 -0
  103. package/modules/datablocksBidAdapter.js +12 -12
  104. package/modules/deepintentBidAdapter.js +13 -13
  105. package/modules/dgkeywordRtdProvider.js +10 -11
  106. package/modules/districtmDMXBidAdapter.js +15 -15
  107. package/modules/dmdIdSystem.js +5 -5
  108. package/modules/docereeBidAdapter.js +9 -9
  109. package/modules/dspxBidAdapter.js +5 -5
  110. package/modules/ebdrBidAdapter.js +9 -9
  111. package/modules/emx_digitalBidAdapter.js +23 -23
  112. package/modules/enrichmentFpdModule.js +10 -9
  113. package/modules/eplanningAnalyticsAdapter.js +2 -2
  114. package/modules/eplanningBidAdapter.js +10 -10
  115. package/modules/etargetBidAdapter.js +4 -4
  116. package/modules/express.js +9 -10
  117. package/modules/fabrickIdSystem.js +6 -6
  118. package/modules/feedadBidAdapter.js +5 -5
  119. package/modules/fintezaAnalyticsAdapter.js +4 -4
  120. package/modules/flocIdSystem.js +5 -5
  121. package/modules/fluctBidAdapter.js +6 -5
  122. package/modules/freewheel-sspBidAdapter.js +6 -6
  123. package/modules/gamoshiBidAdapter.js +22 -22
  124. package/modules/gdprEnforcement.js +13 -14
  125. package/modules/getintentBidAdapter.js +3 -4
  126. package/modules/glimpseBidAdapter.js +160 -48
  127. package/modules/glimpseBidAdapter.md +11 -74
  128. package/modules/gmosspBidAdapter.js +17 -17
  129. package/modules/gnetBidAdapter.js +5 -5
  130. package/modules/googleAnalyticsAdapter.js +6 -6
  131. package/modules/gothamadsBidAdapter.js +9 -9
  132. package/modules/gptPreAuction.js +7 -7
  133. package/modules/gridBidAdapter.js +15 -16
  134. package/modules/gridNMBidAdapter.js +214 -63
  135. package/modules/growadvertisingBidAdapter.js +7 -8
  136. package/modules/gumgumBidAdapter.js +19 -13
  137. package/modules/h12mediaBidAdapter.js +12 -12
  138. package/modules/haloIdSystem.js +8 -8
  139. package/modules/hybridBidAdapter.js +7 -7
  140. package/modules/iasRtdProvider.js +79 -63
  141. package/modules/id5IdSystem.js +24 -24
  142. package/modules/idImportLibrary.js +35 -35
  143. package/modules/idxIdSystem.js +3 -3
  144. package/modules/impactifyBidAdapter.js +10 -10
  145. package/modules/improvedigitalBidAdapter.js +36 -36
  146. package/modules/imuIdSystem.js +6 -6
  147. package/modules/inmarBidAdapter.js +2 -2
  148. package/modules/innityBidAdapter.js +3 -3
  149. package/modules/inskinBidAdapter.js +14 -2
  150. package/modules/inskinBidAdapter.md +5 -4
  151. package/modules/instreamTracking.js +5 -5
  152. package/modules/integr8BidAdapter.js +4 -4
  153. package/modules/intentIqIdSystem.js +7 -7
  154. package/modules/interactiveOffersBidAdapter.js +5 -5
  155. package/modules/invibesBidAdapter.js +53 -19
  156. package/modules/invisiblyAnalyticsAdapter.js +5 -5
  157. package/modules/iqmBidAdapter.js +19 -19
  158. package/modules/iqzoneBidAdapter.js +5 -5
  159. package/modules/ixBidAdapter.js +73 -73
  160. package/modules/jixieBidAdapter.js +6 -6
  161. package/modules/justpremiumBidAdapter.js +5 -1
  162. package/modules/kargoBidAdapter.js +16 -9
  163. package/modules/kargoBidAdapter.md +20 -0
  164. package/modules/kinessoIdSystem.js +8 -8
  165. package/modules/koblerBidAdapter.js +12 -12
  166. package/modules/konduitAnalyticsAdapter.js +4 -4
  167. package/modules/konduitWrapper.js +14 -14
  168. package/modules/krushmediaBidAdapter.js +4 -4
  169. package/modules/kubientBidAdapter.js +5 -5
  170. package/modules/limelightDigitalBidAdapter.js +4 -4
  171. package/modules/liveIntentIdSystem.js +4 -5
  172. package/modules/livewrappedAnalyticsAdapter.js +27 -15
  173. package/modules/livewrappedBidAdapter.js +7 -7
  174. package/modules/liveyieldAnalyticsAdapter.js +13 -13
  175. package/modules/lockerdomeBidAdapter.js +2 -2
  176. package/modules/loganBidAdapter.js +4 -4
  177. package/modules/lotamePanoramaIdSystem.js +13 -13
  178. package/modules/lunamediahbBidAdapter.js +2 -2
  179. package/modules/madvertiseBidAdapter.js +3 -3
  180. package/modules/marsmediaBidAdapter.js +26 -26
  181. package/modules/mathildeadsBidAdapter.js +5 -5
  182. package/modules/mediaforceBidAdapter.js +11 -11
  183. package/modules/mediakeysBidAdapter.js +444 -53
  184. package/modules/mediakeysBidAdapter.md +108 -0
  185. package/modules/medianetAnalyticsAdapter.js +48 -125
  186. package/modules/medianetBidAdapter.js +38 -33
  187. package/modules/medianetRtdProvider.js +7 -7
  188. package/modules/merkleIdSystem.js +19 -19
  189. package/modules/mgidBidAdapter.js +50 -50
  190. package/modules/microadBidAdapter.js +3 -3
  191. package/modules/multibid/index.js +15 -13
  192. package/modules/mwOpenLinkIdSystem.js +7 -7
  193. package/modules/mytargetBidAdapter.js +112 -0
  194. package/modules/nativoBidAdapter.js +46 -31
  195. package/modules/nativoBidAdapter.md +0 -1
  196. package/modules/naveggIdSystem.js +3 -3
  197. package/modules/nextMillenniumBidAdapter.js +6 -6
  198. package/modules/nextrollBidAdapter.js +375 -0
  199. package/modules/nobidBidAdapter.js +12 -11
  200. package/modules/novatiqIdSystem.js +8 -8
  201. package/modules/oguryBidAdapter.js +22 -6
  202. package/modules/oneVideoBidAdapter.js +20 -20
  203. package/modules/onomagicBidAdapter.js +16 -16
  204. package/modules/ooloAnalyticsAdapter.js +13 -13
  205. package/modules/openwebBidAdapter.js +26 -26
  206. package/modules/openxAnalyticsAdapter.js +33 -33
  207. package/modules/openxBidAdapter.js +29 -29
  208. package/modules/operaadsBidAdapter.js +53 -53
  209. package/modules/optimeraRtdProvider.js +9 -9
  210. package/modules/optoutBidAdapter.js +3 -3
  211. package/modules/orbidderBidAdapter.js +3 -3
  212. package/modules/outbrainBidAdapter.js +13 -13
  213. package/modules/ozoneBidAdapter.js +131 -131
  214. package/modules/padsquadBidAdapter.js +4 -4
  215. package/modules/parrableIdSystem.js +17 -17
  216. package/modules/pixfutureBidAdapter.js +45 -25
  217. package/modules/pixfutureBidAdapter.md +127 -0
  218. package/modules/prebidServerBidAdapter/index.js +109 -105
  219. package/modules/prebidmanagerAnalyticsAdapter.js +7 -7
  220. package/modules/priceFloors.js +47 -47
  221. package/modules/proxistoreBidAdapter.js +6 -8
  222. package/modules/pubCommonId.js +11 -11
  223. package/modules/pubProvidedIdSystem.js +3 -3
  224. package/modules/publinkIdSystem.js +23 -7
  225. package/modules/publinkIdSystem.md +7 -2
  226. package/modules/pubmaticAnalyticsAdapter.js +16 -16
  227. package/modules/pubmaticBidAdapter.js +109 -93
  228. package/modules/pubmaticBidAdapter.md +1 -1
  229. package/modules/pubperfAnalyticsAdapter.js +3 -3
  230. package/modules/pubwiseAnalyticsAdapter.js +6 -6
  231. package/modules/pubwiseBidAdapter.js +23 -23
  232. package/modules/pubxBidAdapter.js +2 -2
  233. package/modules/pubxaiAnalyticsAdapter.js +7 -7
  234. package/modules/pulsepointBidAdapter.js +13 -13
  235. package/modules/pxyzBidAdapter.js +7 -7
  236. package/modules/quantcastBidAdapter.js +16 -16
  237. package/modules/radsBidAdapter.js +5 -5
  238. package/modules/realvuAnalyticsAdapter.js +5 -7
  239. package/modules/reconciliationRtdProvider.js +6 -6
  240. package/modules/relaidoBidAdapter.js +44 -38
  241. package/modules/resetdigitalBidAdapter.js +3 -4
  242. package/modules/revcontentBidAdapter.js +9 -9
  243. package/modules/rhythmoneBidAdapter.js +17 -16
  244. package/modules/richaudienceBidAdapter.js +9 -9
  245. package/modules/riseBidAdapter.js +26 -26
  246. package/modules/riseBidAdapter.md +1 -3
  247. package/modules/roxotAnalyticsAdapter.js +14 -14
  248. package/modules/rtbhouseBidAdapter.js +7 -7
  249. package/modules/rtbsapeBidAdapter.js +3 -4
  250. package/modules/rtdModule/index.js +3 -3
  251. package/modules/rubiconAnalyticsAdapter.js +82 -82
  252. package/modules/rubiconBidAdapter.js +72 -68
  253. package/modules/scaleableAnalyticsAdapter.js +2 -2
  254. package/modules/seedingAllianceBidAdapter.js +231 -0
  255. package/modules/seedtagBidAdapter.js +10 -10
  256. package/modules/sharedIdSystem.js +11 -11
  257. package/modules/sharethroughAnalyticsAdapter.js +8 -8
  258. package/modules/sharethroughBidAdapter.js +20 -27
  259. package/modules/showheroes-bsBidAdapter.js +23 -23
  260. package/modules/sigmoidAnalyticsAdapter.js +4 -5
  261. package/modules/sirdataRtdProvider.js +34 -34
  262. package/modules/sizeMappingV2.js +39 -39
  263. package/modules/slimcutBidAdapter.js +121 -0
  264. package/modules/smaatoBidAdapter.js +44 -44
  265. package/modules/smartadserverBidAdapter.js +7 -7
  266. package/modules/smartxBidAdapter.js +72 -72
  267. package/modules/smartyadsBidAdapter.js +2 -2
  268. package/modules/smilewantedBidAdapter.js +6 -6
  269. package/modules/sonobiAnalyticsAdapter.js +23 -23
  270. package/modules/sortableAnalyticsAdapter.js +5 -5
  271. package/modules/sortableBidAdapter.js +28 -28
  272. package/modules/sovrnAnalyticsAdapter.js +5 -5
  273. package/modules/sovrnBidAdapter.js +22 -22
  274. package/modules/spotxBidAdapter.js +97 -83
  275. package/modules/sspBCBidAdapter.js +216 -21
  276. package/modules/sspBCBidAdapter.md +1 -1
  277. package/modules/staqAnalyticsAdapter.js +9 -9
  278. package/modules/stroeerCoreBidAdapter.js +16 -16
  279. package/modules/sublimeBidAdapter.js +6 -6
  280. package/modules/talkadsBidAdapter.js +129 -0
  281. package/modules/talkadsBidAdapter.md +60 -0
  282. package/modules/tapadIdSystem.js +3 -3
  283. package/modules/tappxBidAdapter.js +63 -64
  284. package/modules/teadsBidAdapter.js +20 -20
  285. package/modules/telariaBidAdapter.js +17 -17
  286. package/modules/temedyaBidAdapter.js +4 -4
  287. package/modules/terceptAnalyticsAdapter.js +4 -4
  288. package/modules/theAdxBidAdapter.js +16 -16
  289. package/modules/timeoutRtdProvider.js +15 -15
  290. package/modules/tpmnBidAdapter.js +3 -3
  291. package/modules/trionBidAdapter.js +15 -15
  292. package/modules/tripleliftBidAdapter.js +27 -24
  293. package/modules/truereachBidAdapter.js +4 -4
  294. package/modules/trustxBidAdapter.js +22 -18
  295. package/modules/ucfunnelBidAdapter.js +3 -3
  296. package/modules/uid2IdSystem.js +6 -6
  297. package/modules/underdogmediaBidAdapter.js +4 -4
  298. package/modules/unicornBidAdapter.js +15 -15
  299. package/modules/unifiedIdSystem.js +4 -4
  300. package/modules/unrulyBidAdapter.js +16 -16
  301. package/modules/userId/eids.js +9 -9
  302. package/modules/userId/index.js +37 -35
  303. package/modules/validationFpdModule/index.js +15 -15
  304. package/modules/vdoaiBidAdapter.js +2 -2
  305. package/modules/verizonMediaIdSystem.js +5 -5
  306. package/modules/vidazooBidAdapter.js +5 -5
  307. package/modules/videobyteBidAdapter.js +24 -24
  308. package/modules/videoreachBidAdapter.js +7 -7
  309. package/modules/vidoomyBidAdapter.js +105 -22
  310. package/modules/viewdeosDXBidAdapter.js +17 -17
  311. package/modules/visxBidAdapter.js +21 -29
  312. package/modules/voxBidAdapter.js +7 -7
  313. package/modules/vuukleBidAdapter.js +2 -2
  314. package/modules/waardexBidAdapter.js +26 -26
  315. package/modules/weboramaRtdProvider.js +174 -0
  316. package/modules/weboramaRtdProvider.md +70 -0
  317. package/modules/winrBidAdapter.js +27 -27
  318. package/modules/wipesBidAdapter.js +2 -2
  319. package/modules/yahoosspBidAdapter.js +637 -0
  320. package/modules/yahoosspBidAdapter.md +795 -0
  321. package/modules/yieldlabBidAdapter.js +57 -12
  322. package/modules/yieldlabBidAdapter.md +16 -1
  323. package/modules/yieldliftBidAdapter.js +9 -9
  324. package/modules/yieldmoBidAdapter.js +64 -50
  325. package/modules/yieldoneAnalyticsAdapter.js +6 -6
  326. package/modules/yieldoneBidAdapter.js +11 -11
  327. package/modules/yuktamediaAnalyticsAdapter.js +15 -15
  328. package/modules/zeotapIdPlusIdSystem.js +2 -2
  329. package/modules/zetaBidAdapter.js +6 -6
  330. package/modules/zeta_global_sspBidAdapter.js +14 -14
  331. package/package.json +1 -1
  332. package/src/AnalyticsAdapter.js +6 -6
  333. package/src/Renderer.js +10 -8
  334. package/src/adapterManager.js +45 -42
  335. package/src/adloader.js +6 -6
  336. package/src/ajax.js +8 -9
  337. package/src/auction.js +26 -23
  338. package/src/bidfactory.js +2 -2
  339. package/src/config.js +52 -50
  340. package/src/cpmBucketManager.js +2 -2
  341. package/src/prebid.js +85 -81
  342. package/src/storageManager.js +5 -5
  343. package/src/targeting.js +25 -26
  344. package/src/userSync.js +35 -22
  345. package/src/videoCache.js +2 -2
  346. package/test/.eslintrc.js +2 -1
  347. package/test/spec/modules/adfBidAdapter_spec.js +55 -0
  348. package/test/spec/modules/adgenerationBidAdapter_spec.js +121 -50
  349. package/test/spec/modules/adhashBidAdapter_spec.js +155 -0
  350. package/test/spec/modules/adnuntiusBidAdapter_spec.js +68 -0
  351. package/test/spec/modules/adqueryBidAdapter_spec.js +185 -0
  352. package/test/spec/modules/afpBidAdapter_spec.js +306 -0
  353. package/test/spec/modules/atsAnalyticsAdapter_spec.js +37 -2
  354. package/test/spec/modules/bliinkBidAdapter_spec.js +87 -36
  355. package/test/spec/modules/colossussspBidAdapter_spec.js +14 -6
  356. package/test/spec/modules/cwireBidAdapter_spec.js +246 -0
  357. package/test/spec/modules/eplanningBidAdapter_spec.js +3 -3
  358. package/test/spec/modules/glimpseBidAdapter_spec.js +302 -204
  359. package/test/spec/modules/gridBidAdapter_spec.js +38 -2
  360. package/test/spec/modules/gridNMBidAdapter_spec.js +121 -47
  361. package/test/spec/modules/gumgumBidAdapter_spec.js +27 -6
  362. package/test/spec/modules/iasRtdProvider_spec.js +71 -6
  363. package/test/spec/modules/inskinBidAdapter_spec.js +10 -1
  364. package/test/spec/modules/invibesBidAdapter_spec.js +114 -2
  365. package/test/spec/modules/justpremiumBidAdapter_spec.js +16 -2
  366. package/test/spec/modules/livewrappedAnalyticsAdapter_spec.js +33 -7
  367. package/test/spec/modules/mediakeysBidAdapter_spec.js +406 -51
  368. package/test/spec/modules/medianetAnalyticsAdapter_spec.js +39 -7
  369. package/test/spec/modules/medianetBidAdapter_spec.js +62 -1
  370. package/test/spec/modules/mytargetBidAdapter_spec.js +199 -0
  371. package/test/spec/modules/nativoBidAdapter_spec.js +50 -3
  372. package/test/spec/modules/nextrollBidAdapter_spec.js +290 -0
  373. package/test/spec/modules/nobidBidAdapter_spec.js +65 -1
  374. package/test/spec/modules/oguryBidAdapter_spec.js +120 -7
  375. package/test/spec/modules/publinkIdSystem_spec.js +42 -12
  376. package/test/spec/modules/pubmaticBidAdapter_spec.js +217 -1
  377. package/test/spec/modules/relaidoBidAdapter_spec.js +21 -20
  378. package/test/spec/modules/rubiconAnalyticsAdapter_spec.js +100 -81
  379. package/test/spec/modules/rubiconAnalyticsSchema.json +5 -2
  380. package/test/spec/modules/seedingAllianceAdapter_spec.js +186 -0
  381. package/test/spec/modules/sharethroughBidAdapter_spec.js +156 -136
  382. package/test/spec/modules/slimcutBidAdapter_spec.js +200 -0
  383. package/test/spec/modules/spotxBidAdapter_spec.js +36 -0
  384. package/test/spec/modules/sspBCBidAdapter_spec.js +210 -62
  385. package/test/spec/modules/talkadsBidAdapter_spec.js +231 -0
  386. package/test/spec/modules/tappxBidAdapter_spec.js +39 -3
  387. package/test/spec/modules/tripleliftBidAdapter_spec.js +2 -0
  388. package/test/spec/modules/trustxBidAdapter_spec.js +35 -2
  389. package/test/spec/modules/unicornBidAdapter_spec.js +4 -4
  390. package/test/spec/modules/visxBidAdapter_spec.js +48 -4
  391. package/test/spec/modules/weboramaRtdProvider_spec.js +288 -0
  392. package/test/spec/modules/yahoosspBidAdapter_spec.js +1332 -0
  393. package/test/spec/modules/yieldlabBidAdapter_spec.js +65 -1
  394. package/test/spec/modules/yieldmoBidAdapter_spec.js +30 -9
  395. package/test/spec/unit/pbjs_api_spec.js +4 -0
  396. package/test/spec/userSync_spec.js +30 -2
  397. package/modules/turktelekomBidAdapter.md +0 -49
@@ -1,10 +1,11 @@
1
+
1
2
  /**
2
3
  * This module adds GDPR consentManagement support to prebid.js. It interacts with
3
4
  * supported CMPs (Consent Management Platforms) to grab the user's consent information
4
5
  * and make it available for any GDPR supported adapters to read/pass this information to
5
6
  * their system.
6
7
  */
7
- import * as utils from '../src/utils.js';
8
+ import { logInfo, isFn, getAdUnitSizes, logWarn, isStr, isPlainObject, logError, isNumber } from '../src/utils.js';
8
9
  import { config } from '../src/config.js';
9
10
  import { gdprDataHandler } from '../src/adapterManager.js';
10
11
  import includes from 'core-js-pure/features/array/includes.js';
@@ -98,7 +99,7 @@ function lookupIabConsent(cmpSuccess, cmpError, hookConfig) {
98
99
  }
99
100
 
100
101
  function v2CmpResponseCallback(tcfData, success) {
101
- utils.logInfo('Received a response from CMP', tcfData);
102
+ logInfo('Received a response from CMP', tcfData);
102
103
  if (success) {
103
104
  if (tcfData.gdprApplies === false || tcfData.eventStatus === 'tcloaded' || tcfData.eventStatus === 'useractioncomplete') {
104
105
  cmpSuccess(tcfData, hookConfig);
@@ -113,7 +114,7 @@ function lookupIabConsent(cmpSuccess, cmpError, hookConfig) {
113
114
 
114
115
  function afterEach() {
115
116
  if (cmpResponse.getConsentData && cmpResponse.getVendorConsents) {
116
- utils.logInfo('Received all requested responses from CMP', cmpResponse);
117
+ logInfo('Received all requested responses from CMP', cmpResponse);
117
118
  cmpSuccess(cmpResponse, hookConfig);
118
119
  }
119
120
  }
@@ -147,8 +148,8 @@ function lookupIabConsent(cmpSuccess, cmpError, hookConfig) {
147
148
  // else assume prebid may be inside an iframe and use the IAB CMP locator code to see if CMP's located in a higher parent window. this works in cross domain iframes
148
149
  // if the CMP is not found, the iframe function will call the cmpError exit callback to abort the rest of the CMP workflow
149
150
 
150
- if (utils.isFn(cmpFunction)) {
151
- utils.logInfo('Detected CMP API is directly accessible, calling it now...');
151
+ if (isFn(cmpFunction)) {
152
+ logInfo('Detected CMP API is directly accessible, calling it now...');
152
153
  if (cmpVersion === 1) {
153
154
  cmpFunction('getConsentData', null, v1CallbackHandler.consentDataCallback);
154
155
  cmpFunction('getVendorConsents', null, v1CallbackHandler.vendorConsentsCallback);
@@ -157,11 +158,11 @@ function lookupIabConsent(cmpSuccess, cmpError, hookConfig) {
157
158
  }
158
159
  } else if (cmpVersion === 1 && inASafeFrame() && typeof window.$sf.ext.cmp === 'function') {
159
160
  // this safeframe workflow is only supported with TCF v1 spec; the v2 recommends to use the iframe postMessage route instead (even if you are in a safeframe).
160
- utils.logInfo('Detected Prebid.js is encased in a SafeFrame and CMP is registered, calling it now...');
161
+ logInfo('Detected Prebid.js is encased in a SafeFrame and CMP is registered, calling it now...');
161
162
  callCmpWhileInSafeFrame('getConsentData', v1CallbackHandler.consentDataCallback);
162
163
  callCmpWhileInSafeFrame('getVendorConsents', v1CallbackHandler.vendorConsentsCallback);
163
164
  } else {
164
- utils.logInfo('Detected CMP is outside the current iframe where Prebid.js is located, calling it now...');
165
+ logInfo('Detected CMP is outside the current iframe where Prebid.js is located, calling it now...');
165
166
  if (cmpVersion === 1) {
166
167
  callCmpWhileInIframe('getConsentData', cmpFrame, v1CallbackHandler.consentDataCallback);
167
168
  callCmpWhileInIframe('getVendorConsents', cmpFrame, v1CallbackHandler.vendorConsentsCallback);
@@ -187,7 +188,7 @@ function lookupIabConsent(cmpSuccess, cmpError, hookConfig) {
187
188
  let width = 1;
188
189
  let height = 1;
189
190
  if (Array.isArray(adUnits) && adUnits.length > 0) {
190
- let sizes = utils.getAdUnitSizes(adUnits[0]);
191
+ let sizes = getAdUnitSizes(adUnits[0]);
191
192
  width = sizes[0][0];
192
193
  height = sizes[0][1];
193
194
  }
@@ -282,12 +283,12 @@ export function requestBidsHook(fn, reqBidsConfigObj) {
282
283
 
283
284
  // in case we already have consent (eg during bid refresh)
284
285
  if (consentData) {
285
- utils.logInfo('User consent information already known. Pulling internally stored information...');
286
+ logInfo('User consent information already known. Pulling internally stored information...');
286
287
  return exitModule(null, hookConfig);
287
288
  }
288
289
 
289
290
  if (!includes(Object.keys(cmpCallMap), userCMP)) {
290
- utils.logWarn(`CMP framework (${userCMP}) is not a supported framework. Aborting consentManagement module and resuming auction.`);
291
+ logWarn(`CMP framework (${userCMP}) is not a supported framework. Aborting consentManagement module and resuming auction.`);
291
292
  return hookConfig.nextFn.apply(hookConfig.context, hookConfig.args);
292
293
  }
293
294
 
@@ -316,8 +317,8 @@ function processCmpData(consentObject, hookConfig) {
316
317
  return !!(
317
318
  (typeof gdprApplies !== 'boolean') ||
318
319
  (gdprApplies === true &&
319
- !(utils.isStr(consentObject.getConsentData.consentData) &&
320
- utils.isPlainObject(consentObject.getVendorConsents) &&
320
+ !(isStr(consentObject.getConsentData.consentData) &&
321
+ isPlainObject(consentObject.getVendorConsents) &&
321
322
  Object.keys(consentObject.getVendorConsents).length > 1
322
323
  )
323
324
  )
@@ -330,7 +331,7 @@ function processCmpData(consentObject, hookConfig) {
330
331
  let tcString = consentObject && consentObject.tcString;
331
332
  return !!(
332
333
  (typeof gdprApplies !== 'boolean') ||
333
- (gdprApplies === true && !utils.isStr(tcString))
334
+ (gdprApplies === true && !isStr(tcString))
334
335
  );
335
336
  }
336
337
 
@@ -348,12 +349,12 @@ function processCmpData(consentObject, hookConfig) {
348
349
 
349
350
  // Raise deprecation warning if 'allowAuctionWithoutConsent' is used with TCF 2.
350
351
  if (allowAuction.definedInConfig && cmpVersion === 2) {
351
- utils.logWarn(`'allowAuctionWithoutConsent' ignored for TCF 2`);
352
+ logWarn(`'allowAuctionWithoutConsent' ignored for TCF 2`);
352
353
  } else if (!allowAuction.definedInConfig && cmpVersion === 1) {
353
- utils.logInfo(`'allowAuctionWithoutConsent' using system default: (${DEFAULT_ALLOW_AUCTION_WO_CONSENT}).`);
354
+ logInfo(`'allowAuctionWithoutConsent' using system default: (${DEFAULT_ALLOW_AUCTION_WO_CONSENT}).`);
354
355
  }
355
356
 
356
- if (utils.isFn(checkFn)) {
357
+ if (isFn(checkFn)) {
357
358
  if (checkFn(consentObject)) {
358
359
  cmpFailed(`CMP returned unexpected value during lookup process.`, hookConfig, consentObject);
359
360
  } else {
@@ -406,7 +407,7 @@ function storeConsentData(cmpConsentObject) {
406
407
  vendorData: (cmpConsentObject) || undefined,
407
408
  gdprApplies: cmpConsentObject && typeof cmpConsentObject.gdprApplies === 'boolean' ? cmpConsentObject.gdprApplies : gdprScope
408
409
  };
409
- if (cmpConsentObject && cmpConsentObject.addtlConsent && utils.isStr(cmpConsentObject.addtlConsent)) {
410
+ if (cmpConsentObject && cmpConsentObject.addtlConsent && isStr(cmpConsentObject.addtlConsent)) {
410
411
  consentData.addtlConsent = cmpConsentObject.addtlConsent;
411
412
  };
412
413
  }
@@ -441,14 +442,14 @@ function exitModule(errMsg, hookConfig, extraArgs) {
441
442
 
442
443
  if (errMsg) {
443
444
  if (allowAuction.value && cmpVersion === 1) {
444
- utils.logWarn(errMsg + ` 'allowAuctionWithoutConsent' activated.`, extraArgs);
445
+ logWarn(errMsg + ` 'allowAuctionWithoutConsent' activated.`, extraArgs);
445
446
  nextFn.apply(context, args);
446
447
  } else {
447
- utils.logError(errMsg + ' Canceling auction as per consentManagement config.', extraArgs);
448
+ logError(errMsg + ' Canceling auction as per consentManagement config.', extraArgs);
448
449
  if (typeof hookConfig.bidsBackHandler === 'function') {
449
450
  hookConfig.bidsBackHandler();
450
451
  } else {
451
- utils.logError('Error executing bidsBackHandler');
452
+ logError('Error executing bidsBackHandler');
452
453
  }
453
454
  }
454
455
  } else {
@@ -476,21 +477,21 @@ export function setConsentConfig(config) {
476
477
  // else for backward compatability, just use `config`
477
478
  config = config && (config.gdpr || config.usp ? config.gdpr : config);
478
479
  if (!config || typeof config !== 'object') {
479
- utils.logWarn('consentManagement config not defined, exiting consent manager');
480
+ logWarn('consentManagement config not defined, exiting consent manager');
480
481
  return;
481
482
  }
482
- if (utils.isStr(config.cmpApi)) {
483
+ if (isStr(config.cmpApi)) {
483
484
  userCMP = config.cmpApi;
484
485
  } else {
485
486
  userCMP = DEFAULT_CMP;
486
- utils.logInfo(`consentManagement config did not specify cmp. Using system default setting (${DEFAULT_CMP}).`);
487
+ logInfo(`consentManagement config did not specify cmp. Using system default setting (${DEFAULT_CMP}).`);
487
488
  }
488
489
 
489
- if (utils.isNumber(config.timeout)) {
490
+ if (isNumber(config.timeout)) {
490
491
  consentTimeout = config.timeout;
491
492
  } else {
492
493
  consentTimeout = DEFAULT_CONSENT_TIMEOUT;
493
- utils.logInfo(`consentManagement config did not specify timeout. Using system default setting (${DEFAULT_CONSENT_TIMEOUT}).`);
494
+ logInfo(`consentManagement config did not specify timeout. Using system default setting (${DEFAULT_CONSENT_TIMEOUT}).`);
494
495
  }
495
496
 
496
497
  if (typeof config.allowAuctionWithoutConsent === 'boolean') {
@@ -501,14 +502,14 @@ export function setConsentConfig(config) {
501
502
  // if true, then gdprApplies should be set to true
502
503
  gdprScope = config.defaultGdprScope === true;
503
504
 
504
- utils.logInfo('consentManagement module has been activated...');
505
+ logInfo('consentManagement module has been activated...');
505
506
 
506
507
  if (userCMP === 'static') {
507
- if (utils.isPlainObject(config.consentData)) {
508
+ if (isPlainObject(config.consentData)) {
508
509
  staticConsentData = config.consentData;
509
510
  consentTimeout = 0;
510
511
  } else {
511
- utils.logError(`consentManagement config with cmpApi: 'static' did not specify consentData. No consents will be available to adapters.`);
512
+ logError(`consentManagement config with cmpApi: 'static' did not specify consentData. No consents will be available to adapters.`);
512
513
  }
513
514
  }
514
515
  if (!addedConsentHook) {
@@ -4,7 +4,7 @@
4
4
  * information and make it available for any USP (CCPA) supported adapters to
5
5
  * read/pass this information to their system.
6
6
  */
7
- import * as utils from '../src/utils.js';
7
+ import { isFn, logInfo, logWarn, isStr, isNumber, isPlainObject, logError } from '../src/utils.js';
8
8
  import { config } from '../src/config.js';
9
9
  import { uspDataHandler } from '../src/adapterManager.js';
10
10
 
@@ -111,15 +111,15 @@ function lookupUspConsent(uspSuccess, uspError, hookConfig) {
111
111
  // - else assume prebid is in an iframe, and use the locator to see if the CMP is located in a higher parent window. This works in cross domain iframes.
112
112
  // - if USPAPI is not found, the iframe function will call the uspError exit callback to abort the rest of the USPAPI workflow
113
113
 
114
- if (utils.isFn(uspapiFunction)) {
115
- utils.logInfo('Detected USP CMP is directly accessible, calling it now...');
114
+ if (isFn(uspapiFunction)) {
115
+ logInfo('Detected USP CMP is directly accessible, calling it now...');
116
116
  uspapiFunction(
117
117
  'getUSPData',
118
118
  USPAPI_VERSION,
119
119
  callbackHandler.consentDataCallback
120
120
  );
121
121
  } else {
122
- utils.logInfo(
122
+ logInfo(
123
123
  'Detected USP CMP is outside the current iframe where Prebid.js is located, calling it now...'
124
124
  );
125
125
  callUspApiWhileInIframe(
@@ -185,7 +185,7 @@ export function requestBidsHook(fn, reqBidsConfigObj) {
185
185
  };
186
186
 
187
187
  if (!uspCallMap[consentAPI]) {
188
- utils.logWarn(`USP framework (${consentAPI}) is not a supported framework. Aborting consentManagement module and resuming auction.`);
188
+ logWarn(`USP framework (${consentAPI}) is not a supported framework. Aborting consentManagement module and resuming auction.`);
189
189
  return hookConfig.nextFn.apply(hookConfig.context, hookConfig.args);
190
190
  }
191
191
 
@@ -275,7 +275,7 @@ function exitModule(errMsg, hookConfig, extraArgs) {
275
275
  let nextFn = hookConfig.nextFn;
276
276
 
277
277
  if (errMsg) {
278
- utils.logWarn(errMsg + ' Resuming auction without consent data as per consentManagement config.', extraArgs);
278
+ logWarn(errMsg + ' Resuming auction without consent data as per consentManagement config.', extraArgs);
279
279
  }
280
280
  nextFn.apply(context, args);
281
281
  }
@@ -297,31 +297,31 @@ export function resetConsentData() {
297
297
  export function setConsentConfig(config) {
298
298
  config = config && config.usp;
299
299
  if (!config || typeof config !== 'object') {
300
- utils.logWarn('consentManagement.usp config not defined, exiting usp consent manager');
300
+ logWarn('consentManagement.usp config not defined, exiting usp consent manager');
301
301
  return;
302
302
  }
303
- if (utils.isStr(config.cmpApi)) {
303
+ if (isStr(config.cmpApi)) {
304
304
  consentAPI = config.cmpApi;
305
305
  } else {
306
306
  consentAPI = DEFAULT_CONSENT_API;
307
- utils.logInfo(`consentManagement.usp config did not specify cmpApi. Using system default setting (${DEFAULT_CONSENT_API}).`);
307
+ logInfo(`consentManagement.usp config did not specify cmpApi. Using system default setting (${DEFAULT_CONSENT_API}).`);
308
308
  }
309
309
 
310
- if (utils.isNumber(config.timeout)) {
310
+ if (isNumber(config.timeout)) {
311
311
  consentTimeout = config.timeout;
312
312
  } else {
313
313
  consentTimeout = DEFAULT_CONSENT_TIMEOUT;
314
- utils.logInfo(`consentManagement.usp config did not specify timeout. Using system default setting (${DEFAULT_CONSENT_TIMEOUT}).`);
314
+ logInfo(`consentManagement.usp config did not specify timeout. Using system default setting (${DEFAULT_CONSENT_TIMEOUT}).`);
315
315
  }
316
316
 
317
- utils.logInfo('USPAPI consentManagement module has been activated...');
317
+ logInfo('USPAPI consentManagement module has been activated...');
318
318
 
319
319
  if (consentAPI === 'static') {
320
- if (utils.isPlainObject(config.consentData) && utils.isPlainObject(config.consentData.getUSPData)) {
320
+ if (isPlainObject(config.consentData) && isPlainObject(config.consentData.getUSPData)) {
321
321
  if (config.consentData.getUSPData.uspString) staticConsentData = { usPrivacy: config.consentData.getUSPData.uspString };
322
322
  consentTimeout = 0;
323
323
  } else {
324
- utils.logError(`consentManagement config with cmpApi: 'static' did not specify consentData. No consents will be available to adapters.`);
324
+ logError(`consentManagement config with cmpApi: 'static' did not specify consentData. No consents will be available to adapters.`);
325
325
  }
326
326
  }
327
327
  if (!addedConsentHook) {
@@ -1,4 +1,4 @@
1
- import * as utils from '../src/utils.js';
1
+ import { logWarn, createTrackPixelHtml } from '../src/utils.js';
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
3
3
 
4
4
  const BIDDER_CODE = 'consumable';
@@ -145,7 +145,7 @@ export const spec = {
145
145
  if (syncOptions.pixelEnabled && serverResponses.length > 0) {
146
146
  return serverResponses[0].body.pixels;
147
147
  } else {
148
- utils.logWarn(bidder + ': Please enable iframe based user syncing.');
148
+ logWarn(bidder + ': Please enable iframe based user syncing.');
149
149
  }
150
150
  }
151
151
  };
@@ -207,7 +207,7 @@ function getSize(sizes) {
207
207
  }
208
208
 
209
209
  function retrieveAd(decision, unitId, unitName) {
210
- let ad = decision.contents && decision.contents[0] && decision.contents[0].body + utils.createTrackPixelHtml(decision.impressionUrl);
210
+ let ad = decision.contents && decision.contents[0] && decision.contents[0].body + createTrackPixelHtml(decision.impressionUrl);
211
211
 
212
212
  return ad;
213
213
  }
@@ -1,6 +1,6 @@
1
+ import { isFn, deepAccess, logMessage } from '../src/utils.js';
1
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
2
3
  import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
3
- import * as utils from '../src/utils.js';
4
4
  import {config} from '../src/config.js';
5
5
 
6
6
  const BIDDER_CODE = 'contentexchange';
@@ -69,8 +69,8 @@ function getPlacementReqData (bid) {
69
69
  }
70
70
 
71
71
  function getBidFloor(bid) {
72
- if (!utils.isFn(bid.getFloor)) {
73
- return utils.deepAccess(bid, 'params.bidfloor', 0);
72
+ if (!isFn(bid.getFloor)) {
73
+ return deepAccess(bid, 'params.bidfloor', 0);
74
74
  }
75
75
 
76
76
  try {
@@ -123,7 +123,7 @@ export const spec = {
123
123
  deviceHeight = winTop.screen.height;
124
124
  winLocation = winTop.location;
125
125
  } catch (e) {
126
- utils.logMessage(e);
126
+ logMessage(e);
127
127
  winLocation = window.location;
128
128
  }
129
129
 
@@ -132,7 +132,7 @@ export const spec = {
132
132
  try {
133
133
  refferLocation = refferUrl && new URL(refferUrl);
134
134
  } catch (e) {
135
- utils.logMessage(e);
135
+ logMessage(e);
136
136
  }
137
137
 
138
138
  let location = refferLocation || winLocation;
@@ -1,4 +1,4 @@
1
- import * as utils from '../src/utils.js';
1
+ import { logWarn, isStr, deepAccess, isArray, getBidIdParameter, deepSetValue, isEmpty, _each, convertTypes, parseUrl, mergeDeep, buildUrl, _map, logError, isFn, isPlainObject } from '../src/utils.js';
2
2
  import {registerBidder} from '../src/adapters/bidderFactory.js';
3
3
  import {BANNER, VIDEO} from '../src/mediaTypes.js';
4
4
  import {getStorageManager} from '../src/storageManager.js';
@@ -23,22 +23,22 @@ export const spec = {
23
23
  */
24
24
  isBidRequestValid: function(bid) {
25
25
  if (!bid || !bid.params) {
26
- utils.logWarn(BIDDER_CODE + ': Missing bid parameters');
26
+ logWarn(BIDDER_CODE + ': Missing bid parameters');
27
27
  return false;
28
28
  }
29
29
 
30
- if (!utils.isStr(bid.params.site_id)) {
31
- utils.logWarn(BIDDER_CODE + ': site_id must be specified as a string');
30
+ if (!isStr(bid.params.site_id)) {
31
+ logWarn(BIDDER_CODE + ': site_id must be specified as a string');
32
32
  return false;
33
33
  }
34
34
 
35
35
  if (isVideoRequest(bid)) {
36
- const mimes = bid.params.mimes || utils.deepAccess(bid, 'mediaTypes.video.mimes');
36
+ const mimes = bid.params.mimes || deepAccess(bid, 'mediaTypes.video.mimes');
37
37
  if (!mimes) {
38
38
  // Give a warning but let it pass
39
- utils.logWarn(BIDDER_CODE + ': mimes should be specified for videos');
40
- } else if (!utils.isArray(mimes) || !mimes.every(s => utils.isStr(s))) {
41
- utils.logWarn(BIDDER_CODE + ': mimes must be an array of strings');
39
+ logWarn(BIDDER_CODE + ': mimes should be specified for videos');
40
+ } else if (!isArray(mimes) || !mimes.every(s => isStr(s))) {
41
+ logWarn(BIDDER_CODE + ': mimes must be an array of strings');
42
42
  return false;
43
43
  }
44
44
  }
@@ -64,8 +64,8 @@ export const spec = {
64
64
  const conversantImps = validBidRequests.map(function(bid) {
65
65
  const bidfloor = getBidFloor(bid);
66
66
 
67
- siteId = utils.getBidIdParameter('site_id', bid.params) || siteId;
68
- pubcidName = utils.getBidIdParameter('pubcid_name', bid.params) || pubcidName;
67
+ siteId = getBidIdParameter('site_id', bid.params) || siteId;
68
+ pubcidName = getBidIdParameter('pubcid_name', bid.params) || pubcidName;
69
69
 
70
70
  requestId = bid.auctionId;
71
71
 
@@ -80,7 +80,7 @@ export const spec = {
80
80
  copyOptProperty(bid.params.tag_id, imp, 'tagid');
81
81
 
82
82
  if (isVideoRequest(bid)) {
83
- const videoData = utils.deepAccess(bid, 'mediaTypes.video') || {};
83
+ const videoData = deepAccess(bid, 'mediaTypes.video') || {};
84
84
  const format = convertSizes(videoData.playerSize || bid.sizes);
85
85
  const video = {};
86
86
 
@@ -97,7 +97,7 @@ export const spec = {
97
97
 
98
98
  imp.video = video;
99
99
  } else {
100
- const bannerData = utils.deepAccess(bid, 'mediaTypes.banner') || {};
100
+ const bannerData = deepAccess(bid, 'mediaTypes.banner') || {};
101
101
  const format = convertSizes(bannerData.sizes || bid.sizes);
102
102
  const banner = {format: format};
103
103
 
@@ -138,12 +138,12 @@ export const spec = {
138
138
  userExt.consent = bidderRequest.gdprConsent.consentString;
139
139
 
140
140
  if (typeof bidderRequest.gdprConsent.gdprApplies === 'boolean') {
141
- utils.deepSetValue(payload, 'regs.ext.gdpr', bidderRequest.gdprConsent.gdprApplies ? 1 : 0);
141
+ deepSetValue(payload, 'regs.ext.gdpr', bidderRequest.gdprConsent.gdprApplies ? 1 : 0);
142
142
  }
143
143
  }
144
144
 
145
145
  if (bidderRequest.uspConsent) {
146
- utils.deepSetValue(payload, 'regs.ext.us_privacy', bidderRequest.uspConsent);
146
+ deepSetValue(payload, 'regs.ext.us_privacy', bidderRequest.uspConsent);
147
147
  }
148
148
  }
149
149
 
@@ -163,7 +163,7 @@ export const spec = {
163
163
  }
164
164
 
165
165
  // Only add the user object if it's not empty
166
- if (!utils.isEmpty(userExt)) {
166
+ if (!isEmpty(userExt)) {
167
167
  payload.user = {ext: userExt};
168
168
  }
169
169
 
@@ -186,12 +186,12 @@ export const spec = {
186
186
  serverResponse = serverResponse.body;
187
187
 
188
188
  if (bidRequest && bidRequest.data && bidRequest.data.imp) {
189
- utils._each(bidRequest.data.imp, imp => requestMap[imp.id] = imp);
189
+ _each(bidRequest.data.imp, imp => requestMap[imp.id] = imp);
190
190
  }
191
191
 
192
- if (serverResponse && utils.isArray(serverResponse.seatbid)) {
193
- utils._each(serverResponse.seatbid, function(bidList) {
194
- utils._each(bidList.bid, function(conversantBid) {
192
+ if (serverResponse && isArray(serverResponse.seatbid)) {
193
+ _each(serverResponse.seatbid, function(bidList) {
194
+ _each(bidList.bid, function(conversantBid) {
195
195
  const responseCPM = parseFloat(conversantBid.price);
196
196
  if (responseCPM > 0.0 && conversantBid.impid) {
197
197
  const responseAd = conversantBid.adm || '';
@@ -243,7 +243,7 @@ export const spec = {
243
243
  * @return {Object} params bid params
244
244
  */
245
245
  transformBidParams: function(params, isOpenRtb) {
246
- return utils.convertTypes({
246
+ return convertTypes({
247
247
  'site_id': 'string',
248
248
  'secure': 'number',
249
249
  'mobile': 'number'
@@ -277,12 +277,12 @@ export const spec = {
277
277
  })
278
278
  .map((entry) => {
279
279
  return entry.urls.map((endpoint) => {
280
- let urlInfo = utils.parseUrl(endpoint);
281
- utils.mergeDeep(urlInfo.search, params);
280
+ let urlInfo = parseUrl(endpoint);
281
+ mergeDeep(urlInfo.search, params);
282
282
  if (Object.keys(urlInfo.search).length === 0) {
283
283
  delete urlInfo.search; // empty search object causes buildUrl to add a trailing ? to the url
284
284
  }
285
- return {type: entry.type, url: utils.buildUrl(urlInfo)};
285
+ return {type: entry.type, url: buildUrl(urlInfo)};
286
286
  })
287
287
  .reduce((x, y) => x.concat(y), []);
288
288
  })
@@ -333,7 +333,7 @@ function convertSizes(bidSizes) {
333
333
  if (bidSizes.length === 2 && typeof bidSizes[0] === 'number' && typeof bidSizes[1] === 'number') {
334
334
  format = [{w: bidSizes[0], h: bidSizes[1]}];
335
335
  } else {
336
- format = utils._map(bidSizes, d => { return {w: d[0], h: d[1]}; });
336
+ format = _map(bidSizes, d => { return {w: d[0], h: d[1]}; });
337
337
  }
338
338
  }
339
339
 
@@ -347,7 +347,7 @@ function convertSizes(bidSizes) {
347
347
  * @returns {boolean} True if it's a video bid
348
348
  */
349
349
  function isVideoRequest(bid) {
350
- return bid.mediaType === 'video' || !!utils.deepAccess(bid, 'mediaTypes.video');
350
+ return bid.mediaType === 'video' || !!deepAccess(bid, 'mediaTypes.video');
351
351
  }
352
352
 
353
353
  /**
@@ -370,9 +370,10 @@ function copyOptProperty(src, dst, dstName) {
370
370
  function collectEids(bidRequests) {
371
371
  const request = bidRequests[0]; // bidRequests have the same userId object
372
372
  const eids = [];
373
- if (utils.isArray(request.userIdAsEids) && request.userIdAsEids.length > 0) {
373
+ if (isArray(request.userIdAsEids) && request.userIdAsEids.length > 0) {
374
374
  // later following white-list can be converted to block-list if needed
375
375
  const requiredSourceValues = {
376
+ 'epsilon.com': 1,
376
377
  'adserver.org': 1,
377
378
  'liveramp.com': 1,
378
379
  'criteo.com': 1,
@@ -410,11 +411,11 @@ function readStoredValue(key) {
410
411
  }
411
412
 
412
413
  // deserialize JSON if needed
413
- if (utils.isStr(storedValue) && storedValue.charAt(0) === '{') {
414
+ if (isStr(storedValue) && storedValue.charAt(0) === '{') {
414
415
  storedValue = JSON.parse(storedValue);
415
416
  }
416
417
  } catch (e) {
417
- utils.logError(e);
418
+ logError(e);
418
419
  }
419
420
 
420
421
  return storedValue;
@@ -427,16 +428,16 @@ function readStoredValue(key) {
427
428
  * @returns {*|number} floor price
428
429
  */
429
430
  function getBidFloor(bid) {
430
- let floor = utils.getBidIdParameter('bidfloor', bid.params);
431
+ let floor = getBidIdParameter('bidfloor', bid.params);
431
432
 
432
- if (!floor && utils.isFn(bid.getFloor)) {
433
+ if (!floor && isFn(bid.getFloor)) {
433
434
  const floorObj = bid.getFloor({
434
435
  currency: 'USD',
435
436
  mediaType: '*',
436
437
  size: '*'
437
438
  });
438
439
 
439
- if (utils.isPlainObject(floorObj) && !isNaN(floorObj.floor) && floorObj.currency === 'USD') {
440
+ if (isPlainObject(floorObj) && !isNaN(floorObj.floor) && floorObj.currency === 'USD') {
440
441
  floor = floorObj.floor;
441
442
  }
442
443
  }
@@ -1,5 +1,4 @@
1
-
2
- import * as utils from '../src/utils.js';
1
+ import { deepAccess, getBidIdParameter, logWarn, logError } from '../src/utils.js';
3
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
4
3
  import { VIDEO, BANNER } from '../src/mediaTypes.js';
5
4
  import { config } from '../src/config.js';
@@ -26,11 +25,11 @@ export const spec = {
26
25
 
27
26
  getMediaType: function (bidRequest) {
28
27
  if (bidRequest == null) return BANNER;
29
- return !utils.deepAccess(bidRequest, 'mediaTypes.video') ? BANNER : VIDEO;
28
+ return !deepAccess(bidRequest, 'mediaTypes.video') ? BANNER : VIDEO;
30
29
  },
31
30
 
32
31
  getPlayerSize: function (bidRequest) {
33
- var playerSize = utils.deepAccess(bidRequest, 'mediaTypes.video.playerSize');
32
+ var playerSize = deepAccess(bidRequest, 'mediaTypes.video.playerSize');
34
33
  if (playerSize == null) return [640, 440];
35
34
  if (playerSize[0] != null) playerSize = playerSize[0];
36
35
  if (playerSize == null || playerSize[0] == null || playerSize[1] == null) return [640, 440];
@@ -48,13 +47,13 @@ export const spec = {
48
47
  for (var i = 0; i < validBidRequests.length; i++) {
49
48
  var bidRequest = validBidRequests[i];
50
49
  var referer = encodeURIComponent(bidderRequest.refererInfo.referer);
51
- var e = utils.getBidIdParameter('endpoint', bidRequest.params);
50
+ var e = getBidIdParameter('endpoint', bidRequest.params);
52
51
  var ENDPOINT = e == 'dev' ? ENDPOINT_DEV : e == 'staging' ? ENDPOINT_STAGING : ENDPOINT_PRODUCTION;
53
52
  var mediaType = spec.getMediaType(bidRequest);
54
53
  var playerSize = spec.getPlayerSize(bidRequest);
55
54
  var videoArgs = '&fv=0' + (playerSize ? ('&w=' + playerSize[0] + '&h=' + playerSize[1]) : '');
56
55
  var url = ENDPOINT + '?media=' + mediaType + (mediaType == VIDEO ? videoArgs : '') +
57
- '&json=c_b&mv=1&poolid=' + utils.getBidIdParameter('placementId', bidRequest.params) +
56
+ '&json=c_b&mv=1&poolid=' + getBidIdParameter('placementId', bidRequest.params) +
58
57
  '&reachedTop=' + encodeURIComponent(bidderRequest.refererInfo.reachedTop) +
59
58
  '&requestid=' + bidRequest.bidId +
60
59
  '&referer=' + encodeURIComponent(referer);
@@ -117,13 +116,13 @@ export const spec = {
117
116
  var raw = serverResponse.body[i];
118
117
  var rawBid = raw.creatives[0];
119
118
  if (!rawBid) {
120
- utils.logWarn('cpmstarBidAdapter: server response failed check');
119
+ logWarn('cpmstarBidAdapter: server response failed check');
121
120
  return;
122
121
  }
123
122
  var cpm = (parseFloat(rawBid.cpm) || 0);
124
123
 
125
124
  if (!cpm) {
126
- utils.logWarn('cpmstarBidAdapter: server response failed check. Missing cpm')
125
+ logWarn('cpmstarBidAdapter: server response failed check. Missing cpm')
127
126
  return;
128
127
  }
129
128
 
@@ -156,7 +155,7 @@ export const spec = {
156
155
  bidResponse.mediaType = VIDEO;
157
156
  bidResponse.vastXml = rawBid.creativemacros.HTML5VID_VASTSTRING;
158
157
  } else {
159
- return utils.logError('bad response', rawBid);
158
+ return logError('bad response', rawBid);
160
159
  }
161
160
 
162
161
  bidResponses.push(bidResponse);
@@ -1,4 +1,4 @@
1
- import * as utils from '../src/utils.js';
1
+ import { logError, convertTypes, convertCamelToUnderscore, isArray, deepAccess, getBidRequest, isEmpty, transformBidderParamKeywords } from '../src/utils.js';
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
3
3
  import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
4
4
  import { auctionManager } from '../src/auctionManager.js';
@@ -67,7 +67,7 @@ export const spec = {
67
67
  if (serverResponse.error) {
68
68
  errorMessage += `: ${serverResponse.error}`;
69
69
  }
70
- utils.logError(errorMessage);
70
+ logError(errorMessage);
71
71
  return bids;
72
72
  }
73
73
  if (serverResponse.tags) {
@@ -89,17 +89,17 @@ export const spec = {
89
89
  },
90
90
 
91
91
  transformBidParams: function(params, isOpenRtb) {
92
- params = utils.convertTypes({
92
+ params = convertTypes({
93
93
  'sitekey': 'string',
94
94
  'placementId': 'string',
95
- 'keywords': utils.transformBidderParamKeywords
95
+ 'keywords': transformBidderParamKeywords
96
96
  }, params);
97
97
  if (isOpenRtb) {
98
98
  if (isPopulatedArray(params.keywords)) {
99
99
  params.keywords.forEach(deleteValues);
100
100
  }
101
101
  Object.keys(params).forEach(paramKey => {
102
- let convertedKey = utils.convertCamelToUnderscore(paramKey);
102
+ let convertedKey = convertCamelToUnderscore(paramKey);
103
103
  if (convertedKey !== paramKey) {
104
104
  params[convertedKey] = params[paramKey];
105
105
  delete params[paramKey];
@@ -117,7 +117,7 @@ export const spec = {
117
117
  };
118
118
 
119
119
  function isPopulatedArray(arr) {
120
- return !!(utils.isArray(arr) && arr.length > 0);
120
+ return !!(isArray(arr) && arr.length > 0);
121
121
  }
122
122
 
123
123
  function deleteValues(keyPairObj) {
@@ -130,7 +130,7 @@ function hasPurpose1Consent(bidderRequest) {
130
130
  let result = true;
131
131
  if (bidderRequest && bidderRequest.gdprConsent) {
132
132
  if (bidderRequest.gdprConsent.gdprApplies && bidderRequest.gdprConsent.apiVersion === 2) {
133
- result = !!(utils.deepAccess(bidderRequest.gdprConsent, 'vendorData.purpose.consents.1') === true);
133
+ result = !!(deepAccess(bidderRequest.gdprConsent, 'vendorData.purpose.consents.1') === true);
134
134
  }
135
135
  }
136
136
  return result;
@@ -155,7 +155,7 @@ function formatRequest(payload, bidderRequest) {
155
155
  }
156
156
 
157
157
  function newBid(serverBid, rtbBid, bidderRequest) {
158
- const bidRequest = utils.getBidRequest(serverBid.uuid, [bidderRequest]);
158
+ const bidRequest = getBidRequest(serverBid.uuid, [bidderRequest]);
159
159
  const bid = {
160
160
  requestId: serverBid.uuid,
161
161
  cpm: rtbBid.cpm,
@@ -190,8 +190,8 @@ function bidToTag(bid) {
190
190
  tag.primary_size = tag.sizes[0];
191
191
  tag.ad_types = [];
192
192
  tag.uuid = bid.bidId;
193
- if (!utils.isEmpty(bid.params.keywords)) {
194
- let keywords = utils.transformBidderParamKeywords(bid.params.keywords);
193
+ if (!isEmpty(bid.params.keywords)) {
194
+ let keywords = transformBidderParamKeywords(bid.params.keywords);
195
195
  if (keywords.length > 0) {
196
196
  keywords.forEach(deleteValues);
197
197
  }