prebid.js 6.9.0 → 6.10.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 (201) hide show
  1. package/allowedModules.js +4 -7
  2. package/integrationExamples/gpt/{haloRtdProvider_example.html → hadronRtdProvider_example.html} +9 -9
  3. package/integrationExamples/gpt/idImportLibrary_example.html +2 -2
  4. package/integrationExamples/gpt/userId_example.html +2 -2
  5. package/modules/.submodules.json +3 -0
  6. package/modules/adagioBidAdapter.js +1 -1
  7. package/modules/adbookpspBidAdapter.js +2 -2
  8. package/modules/adhashBidAdapter.js +1 -1
  9. package/modules/adkernelBidAdapter.js +2 -2
  10. package/modules/adlooxAnalyticsAdapter.js +1 -1
  11. package/modules/adlooxRtdProvider.js +1 -1
  12. package/modules/adnowBidAdapter.js +1 -1
  13. package/modules/adnuntiusRtdProvider.js +96 -0
  14. package/modules/adnuntiusRtdProvider.md +41 -0
  15. package/modules/adomikAnalyticsAdapter.js +2 -2
  16. package/modules/adotBidAdapter.js +1 -1
  17. package/modules/adpod.js +14 -17
  18. package/modules/adrelevantisBidAdapter.js +2 -2
  19. package/modules/adtargetBidAdapter.js +1 -1
  20. package/modules/adtelligentBidAdapter.js +1 -1
  21. package/modules/advangelistsBidAdapter.js +2 -2
  22. package/modules/adxpremiumAnalyticsAdapter.js +1 -1
  23. package/modules/adyoulikeBidAdapter.js +1 -1
  24. package/modules/afpBidAdapter.js +1 -1
  25. package/modules/appnexusBidAdapter.js +2 -2
  26. package/modules/beachfrontBidAdapter.js +2 -2
  27. package/modules/betweenBidAdapter.js +1 -1
  28. package/modules/bidViewability.js +1 -1
  29. package/modules/bluebillywigBidAdapter.js +1 -1
  30. package/modules/bridgewellBidAdapter.js +1 -1
  31. package/modules/browsiRtdProvider.js +2 -2
  32. package/modules/cleanmedianetBidAdapter.js +1 -1
  33. package/modules/connectIdSystem.js +1 -1
  34. package/modules/consentManagement.js +2 -3
  35. package/modules/craftBidAdapter.js +2 -2
  36. package/modules/criteoBidAdapter.js +1 -1
  37. package/modules/currency.js +1 -4
  38. package/modules/cwireBidAdapter.js +1 -1
  39. package/modules/dailyhuntBidAdapter.js +1 -1
  40. package/modules/dchain.js +1 -1
  41. package/modules/dspxBidAdapter.js +69 -29
  42. package/modules/dspxBidAdapter.md +2 -1
  43. package/modules/emx_digitalBidAdapter.js +2 -2
  44. package/modules/fluctBidAdapter.js +0 -1
  45. package/modules/gamoshiBidAdapter.js +1 -1
  46. package/modules/gdprEnforcement.js +2 -2
  47. package/modules/glomexBidAdapter.js +1 -1
  48. package/modules/goldbachBidAdapter.js +2 -2
  49. package/modules/gptPreAuction.js +1 -1
  50. package/modules/gridBidAdapter.js +15 -1
  51. package/modules/gumgumBidAdapter.js +1 -1
  52. package/modules/hadronIdSystem.js +96 -0
  53. package/modules/hadronIdSystem.md +35 -0
  54. package/modules/hadronRtdProvider.js +254 -0
  55. package/modules/hadronRtdProvider.md +126 -0
  56. package/modules/haloIdSystem.md +4 -35
  57. package/modules/haloRtdProvider.md +3 -126
  58. package/modules/hybridBidAdapter.js +1 -1
  59. package/modules/improvedigitalBidAdapter.js +1 -1
  60. package/modules/insticatorBidAdapter.js +1 -1
  61. package/modules/intersectionRtdProvider.js +1 -1
  62. package/modules/ixBidAdapter.js +2 -2
  63. package/modules/jwplayerRtdProvider.js +1 -1
  64. package/modules/livewrappedBidAdapter.js +1 -1
  65. package/modules/malltvBidAdapter.js +7 -3
  66. package/modules/malltvBidAdapter.md +64 -51
  67. package/modules/mass.js +3 -5
  68. package/modules/mediakeysBidAdapter.js +2 -2
  69. package/modules/medianetAnalyticsAdapter.js +2 -2
  70. package/modules/medianetRtdProvider.js +1 -1
  71. package/modules/mediasquareBidAdapter.js +1 -0
  72. package/modules/nextMillenniumBidAdapter.js +1 -0
  73. package/modules/nextrollBidAdapter.js +1 -1
  74. package/modules/oguryBidAdapter.js +2 -2
  75. package/modules/onetagBidAdapter.js +1 -1
  76. package/modules/openwebBidAdapter.js +1 -1
  77. package/modules/openxAnalyticsAdapter.js +2 -2
  78. package/modules/openxBidAdapter.js +1 -1
  79. package/modules/parrableIdSystem.js +1 -1
  80. package/modules/permutiveRtdProvider.js +1 -1
  81. package/modules/pixfutureBidAdapter.js +2 -2
  82. package/modules/prebidServerBidAdapter/index.js +63 -41
  83. package/modules/priceFloors.js +13 -13
  84. package/modules/pubmaticBidAdapter.js +1 -1
  85. package/modules/quantcastBidAdapter.js +1 -1
  86. package/modules/reconciliationRtdProvider.js +1 -1
  87. package/modules/roxotAnalyticsAdapter.js +1 -1
  88. package/modules/rtbhouseBidAdapter.js +1 -1
  89. package/modules/rtdModule/index.js +1 -1
  90. package/modules/rubiconBidAdapter.js +1 -1
  91. package/modules/saambaaBidAdapter.js +420 -420
  92. package/modules/sigmoidAnalyticsAdapter.js +1 -1
  93. package/modules/sirdataRtdProvider.js +1 -1
  94. package/modules/sizeMappingV2.js +2 -9
  95. package/modules/smarticoBidAdapter.js +1 -1
  96. package/modules/sovrnAnalyticsAdapter.js +2 -2
  97. package/modules/sspBCBidAdapter.js +54 -21
  98. package/modules/synacormediaBidAdapter.js +1 -1
  99. package/modules/targetVideoBidAdapter.js +1 -1
  100. package/modules/telariaBidAdapter.js +22 -29
  101. package/modules/trustpidSystem.js +197 -0
  102. package/modules/trustpidSystem.md +45 -0
  103. package/modules/userId/eids.js +16 -1
  104. package/modules/userId/eids.md +10 -2
  105. package/modules/userId/index.js +2 -2
  106. package/modules/userId/userId.md +17 -2
  107. package/modules/ventesBidAdapter.js +1 -1
  108. package/modules/verizonMediaIdSystem.js +1 -1
  109. package/modules/vibrantmediaBidAdapter.js +220 -0
  110. package/modules/vibrantmediaBidAdapter.md +92 -0
  111. package/modules/viewability.js +1 -1
  112. package/modules/viewdeosDXBidAdapter.js +1 -1
  113. package/modules/voxBidAdapter.js +1 -1
  114. package/modules/waardexBidAdapter.js +1 -1
  115. package/modules/widespaceBidAdapter.js +2 -2
  116. package/modules/winrBidAdapter.js +7 -7
  117. package/modules/yahoosspBidAdapter.js +1 -1
  118. package/modules/yieldlabBidAdapter.js +1 -1
  119. package/modules/yieldmoBidAdapter.js +2 -2
  120. package/modules/yieldoneBidAdapter.js +6 -0
  121. package/modules/yuktamediaAnalyticsAdapter.js +1 -1
  122. package/package.json +2 -1
  123. package/plugins/poly/arrayFrom.js +3 -0
  124. package/plugins/poly/find.js +3 -0
  125. package/plugins/poly/findIndex.js +3 -0
  126. package/plugins/poly/includes.js +3 -0
  127. package/plugins/poly/package.json +8 -0
  128. package/src/Renderer.js +1 -1
  129. package/src/adapterManager.js +33 -28
  130. package/src/adapters/bidderFactory.js +13 -11
  131. package/src/adloader.js +1 -1
  132. package/src/auction.js +57 -64
  133. package/src/auctionIndex.js +85 -0
  134. package/src/auctionManager.js +4 -1
  135. package/src/bidfactory.js +18 -6
  136. package/src/config.js +3 -4
  137. package/src/cpmBucketManager.js +1 -1
  138. package/src/native.js +30 -22
  139. package/src/prebid.js +1 -1
  140. package/src/secureCreatives.js +2 -2
  141. package/src/sizeMapping.js +1 -1
  142. package/src/storageManager.js +1 -1
  143. package/src/targeting.js +10 -2
  144. package/src/userSync.js +1 -1
  145. package/src/utils.js +3 -9
  146. package/src/video.js +11 -12
  147. package/src/videoCache.js +10 -9
  148. package/test/fixtures/fixtures.js +2 -1
  149. package/test/helpers/indexStub.js +28 -0
  150. package/test/spec/auctionmanager_spec.js +113 -98
  151. package/test/spec/config_spec.js +24 -1
  152. package/test/spec/e2e/longform/basic_w_bidderSettings.spec.js +1 -1
  153. package/test/spec/e2e/longform/basic_w_custom_adserver_translation.spec.js +1 -1
  154. package/test/spec/e2e/longform/basic_w_priceGran.spec.js +1 -1
  155. package/test/spec/e2e/longform/basic_w_requireExactDuration.spec.js +1 -1
  156. package/test/spec/e2e/longform/basic_wo_brandCategoryExclusion.spec.js +1 -1
  157. package/test/spec/e2e/longform/basic_wo_requireExactDuration.spec.js +1 -1
  158. package/test/spec/modules/adnuntiusRtdProvider_spec.js +145 -0
  159. package/test/spec/modules/adpod_spec.js +91 -156
  160. package/test/spec/modules/afpBidAdapter_spec.js +1 -1
  161. package/test/spec/modules/currency_spec.js +15 -9
  162. package/test/spec/modules/deepintentDpesIdsystem_spec.js +1 -1
  163. package/test/spec/modules/dspxBidAdapter_spec.js +20 -15
  164. package/test/spec/modules/eids_spec.js +2 -2
  165. package/test/spec/modules/eplanningAnalyticsAdapter_spec.js +1 -1
  166. package/test/spec/modules/fintezaAnalyticsAdapter_spec.js +1 -1
  167. package/test/spec/modules/gridBidAdapter_spec.js +18 -0
  168. package/test/spec/modules/gumgumBidAdapter_spec.js +3 -3
  169. package/test/spec/modules/hadronIdSystem_spec.js +57 -0
  170. package/test/spec/modules/hadronRtdProvider_spec.js +762 -0
  171. package/test/spec/modules/idxIdSystem_spec.js +1 -1
  172. package/test/spec/modules/mass_spec.js +2 -14
  173. package/test/spec/modules/mediakeysBidAdapter_spec.js +1 -1
  174. package/test/spec/modules/multibid_spec.js +1 -1
  175. package/test/spec/modules/oguryBidAdapter_spec.js +4 -4
  176. package/test/spec/modules/onetagBidAdapter_spec.js +1 -1
  177. package/test/spec/modules/openxAnalyticsAdapter_spec.js +1 -1
  178. package/test/spec/modules/parrableIdSystem_spec.js +1 -1
  179. package/test/spec/modules/prebidServerBidAdapter_spec.js +43 -6
  180. package/test/spec/modules/priceFloors_spec.js +37 -24
  181. package/test/spec/modules/pubmaticBidAdapter_spec.js +40 -0
  182. package/test/spec/modules/rubiconBidAdapter_spec.js +1 -1
  183. package/test/spec/modules/sspBCBidAdapter_spec.js +7 -7
  184. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +1 -1
  185. package/test/spec/modules/telariaBidAdapter_spec.js +1 -3
  186. package/test/spec/modules/trustpidSystem_spec.js +232 -0
  187. package/test/spec/modules/userId_spec.js +40 -40
  188. package/test/spec/modules/vibrantmediaBidAdapter_spec.js +1237 -0
  189. package/test/spec/modules/widespaceBidAdapter_spec.js +1 -1
  190. package/test/spec/modules/yieldoneBidAdapter_spec.js +33 -0
  191. package/test/spec/modules/zeotapIdPlusIdSystem_spec.js +1 -1
  192. package/test/spec/native_spec.js +62 -40
  193. package/test/spec/sizeMapping_spec.js +1 -1
  194. package/test/spec/unit/core/adapterManager_spec.js +24 -2
  195. package/test/spec/unit/core/auctionIndex_spec.js +129 -0
  196. package/test/spec/unit/core/bidderFactory_spec.js +65 -12
  197. package/test/spec/unit/core/targeting_spec.js +93 -0
  198. package/test/spec/unit/pbjs_api_spec.js +63 -36
  199. package/test/spec/videoCache_spec.js +18 -19
  200. package/test/spec/video_spec.js +51 -61
  201. package/webpack.conf.js +1 -1
package/allowedModules.js CHANGED
@@ -1,12 +1,9 @@
1
1
 
2
2
  const sharedWhiteList = [
3
- 'core-js-pure/features/array/find', // no ie11
4
- 'core-js-pure/features/array/includes', // no ie11
5
- 'core-js-pure/features/set', // ie11 supports Set but not Set#values
6
- 'core-js-pure/features/string/includes', // no ie11
7
- 'core-js-pure/features/number/is-integer', // no ie11,
8
- 'core-js-pure/features/array/from', // no ie11
9
- 'core-js-pure/web/url-search-params' // no ie11
3
+ 'prebidjs-polyfill/arrayFrom',
4
+ 'prebidjs-polyfill/find',
5
+ 'prebidjs-polyfill/findIndex',
6
+ 'prebidjs-polyfill/includes',
10
7
  ];
11
8
 
12
9
  module.exports = {
@@ -1,8 +1,8 @@
1
1
  <html>
2
2
  <head>
3
3
  <script>
4
- var testHaloId = "030tstezbb07jv2yg08xizqr0bwpa0c0evvmq00eivtcg0nc9v970ntek210qskvk40trr7270wqxik90zq3u2d12pa5j3137rx2918nmsj905vat8b1elzfjf1hl5r1i1kkc2jl";
5
- window.localStorage.setItem('auHaloId', testHaloId);
4
+ var testHadronId = "030tstezbb07jv2yg08xizqr0bwpa0c0evvmq00eivtcg0nc9v970ntek210qskvk40trr7270wqxik90zq3u2d12pa5j3137rx2918nmsj905vat8b1elzfjf1hl5r1i1kkc2jl";
5
+ window.localStorage.setItem('auHadronId', testHadronId);
6
6
  </script>
7
7
 
8
8
  <script>
@@ -47,7 +47,7 @@
47
47
  auctionDelay: testAuctionDelay, // lower in real scenario to meet publisher spec
48
48
  dataProviders: [
49
49
  {
50
- name: "halo",
50
+ name: "hadron",
51
51
  waitForIt: true,
52
52
  params: {
53
53
  segmentCache: false,
@@ -65,8 +65,8 @@
65
65
  });
66
66
 
67
67
  function sendAdserverRequest() {
68
- document.getElementById('audigent_segments').innerHTML = window.localStorage.getItem('auHaloRtd');
69
- document.getElementById('halo_id').innerHTML = testHaloId;
68
+ document.getElementById('audigent_segments').innerHTML = window.localStorage.getItem('auHadronRtd');
69
+ document.getElementById('hadron_id').innerHTML = testHadronId;
70
70
 
71
71
  if (pbjs.adserverRequestSent) return;
72
72
  pbjs.adserverRequestSent = true;
@@ -106,7 +106,7 @@
106
106
  </head>
107
107
 
108
108
  <body>
109
- <h2>Halo RTD Prebid</h2>
109
+ <h2>Hadron RTD Prebid</h2>
110
110
 
111
111
  <div id='test-div'>
112
112
  <script>
@@ -114,11 +114,11 @@
114
114
  </script>
115
115
  </div>
116
116
 
117
- Halo Id:
118
- <div id='halo_id'>
117
+ Hadron Id:
118
+ <div id='hadron_id'>
119
119
  </div>
120
120
 
121
- Halo Real-Time Data:
121
+ Hadron Real-Time Data:
122
122
  <div id='audigent_segments'>
123
123
  </div>
124
124
  </body>
@@ -69,10 +69,10 @@
69
69
  name: "zeotapIdPlus"
70
70
  },
71
71
  {
72
- name: 'haloId',
72
+ name: 'hadronId',
73
73
  storage: {
74
74
  type: "html5",
75
- name: "haloId",
75
+ name: "hadronId",
76
76
  expires: 28
77
77
  }
78
78
  }, {
@@ -215,10 +215,10 @@
215
215
  "name": "zeotapIdPlus"
216
216
  },
217
217
  {
218
- "name": "haloId",
218
+ "name": "hadronId",
219
219
  "storage": {
220
220
  "type": "cookie",
221
- "name": "haloId",
221
+ "name": "hadronId",
222
222
  "expires": 28
223
223
  }
224
224
  },
@@ -11,6 +11,7 @@
11
11
  "dmdIdSystem",
12
12
  "fabrickIdSystem",
13
13
  "flocIdSystem",
14
+ "hadronIdSystem",
14
15
  "haloIdSystem",
15
16
  "id5IdSystem",
16
17
  "identityLinkIdSystem",
@@ -32,6 +33,7 @@
32
33
  "quantcastIdSystem",
33
34
  "sharedIdSystem",
34
35
  "tapadIdSystem",
36
+ "trustpidSystem",
35
37
  "uid2IdSystem",
36
38
  "unifiedIdSystem",
37
39
  "verizonMediaIdSystem",
@@ -46,6 +48,7 @@
46
48
  "browsiRtdProvider",
47
49
  "dgkeywordRtdProvider",
48
50
  "geoedgeRtdProvider",
51
+ "hadronRtdProvider",
49
52
  "haloRtdProvider",
50
53
  "iasRtdProvider",
51
54
  "jwplayerRtdProvider",
@@ -1,4 +1,4 @@
1
- import find from 'core-js-pure/features/array/find.js';
1
+ import find from 'prebidjs-polyfill/find.js';
2
2
  import {
3
3
  isInteger, isArray, deepAccess, mergeDeep, logWarn, logInfo, logError, getWindowTop, getWindowSelf, generateUUID, _map,
4
4
  getDNT, parseUrl, getUniqueIdentifierStr, isNumber, cleanObj, isFn, inIframe, deepClone, getGptSlotInfoForAdUnitCode
@@ -1,5 +1,5 @@
1
- import includes from 'core-js-pure/features/array/includes.js';
2
- import find from 'core-js-pure/features/array/find';
1
+ import includes from 'prebidjs-polyfill/includes.js';
2
+ import find from 'prebidjs-polyfill/find.js';
3
3
  import { config } from '../src/config.js';
4
4
  import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
5
5
  import { getStorageManager } from '../src/storageManager.js';
@@ -1,5 +1,5 @@
1
1
  import { registerBidder } from '../src/adapters/bidderFactory.js';
2
- import includes from 'core-js-pure/features/array/includes.js';
2
+ import includes from 'prebidjs-polyfill/includes.js';
3
3
  import { BANNER } from '../src/mediaTypes.js';
4
4
 
5
5
  const VERSION = '1.0';
@@ -4,8 +4,8 @@ import {
4
4
  } from '../src/utils.js';
5
5
  import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js';
6
6
  import {registerBidder} from '../src/adapters/bidderFactory.js';
7
- import find from 'core-js-pure/features/array/find.js';
8
- import includes from 'core-js-pure/features/array/includes.js';
7
+ import find from 'prebidjs-polyfill/find.js';
8
+ import includes from 'prebidjs-polyfill/includes.js';
9
9
  import {config} from '../src/config.js';
10
10
 
11
11
  /*
@@ -10,7 +10,7 @@ import { loadExternalScript } from '../src/adloader.js';
10
10
  import { auctionManager } from '../src/auctionManager.js';
11
11
  import { AUCTION_COMPLETED } from '../src/auction.js';
12
12
  import CONSTANTS from '../src/constants.json';
13
- import find from 'core-js-pure/features/array/find.js';
13
+ import find from 'prebidjs-polyfill/find.js';
14
14
  import {
15
15
  deepAccess, logInfo, isPlainObject, logError, isStr, isNumber, getGptSlotInfoForAdUnitCode,
16
16
  isFn, mergeDeep, logMessage, insertElement, logWarn, getUniqueIdentifierStr, parseUrl
@@ -20,7 +20,7 @@ import {
20
20
  getAdUnitSizes, logInfo, isPlainObject, logError, isStr, isInteger, isArray, isBoolean, mergeDeep, deepAccess,
21
21
  _each, deepSetValue, logWarn, getGptSlotInfoForAdUnitCode
22
22
  } from '../src/utils.js';
23
- import includes from 'core-js-pure/features/array/includes.js';
23
+ import includes from 'prebidjs-polyfill/includes.js';
24
24
 
25
25
  const MODULE_NAME = 'adloox';
26
26
  const MODULE = `${MODULE_NAME}RtdProvider`;
@@ -1,7 +1,7 @@
1
1
  import { registerBidder } from '../src/adapters/bidderFactory.js';
2
2
  import { NATIVE, BANNER } from '../src/mediaTypes.js';
3
3
  import { parseSizesInput, deepAccess, parseQueryStringParameters } from '../src/utils.js';
4
- import includes from 'core-js-pure/features/array/includes.js';
4
+ import includes from 'prebidjs-polyfill/includes.js';
5
5
 
6
6
  const BIDDER_CODE = 'adnow';
7
7
  const ENDPOINT = 'https://n.ads3-adnow.com/a';
@@ -0,0 +1,96 @@
1
+
2
+ import { submodule } from '../src/hook.js'
3
+ import { logError, logInfo } from '../src/utils.js'
4
+ import { ajax } from '../src/ajax.js';
5
+
6
+ import { config as sourceConfig } from '../src/config.js';
7
+
8
+ const GVLID = 855;
9
+
10
+ function init(config, userConsent) {
11
+ if (!config.params || !config.params.providers) return false
12
+ logInfo(userConsent)
13
+ return true;
14
+ }
15
+
16
+ // Make sure that ajax has a function as callback
17
+ function prepProvider(provider) {
18
+ // Map parameter to something that adnuntius endpoint understands.
19
+ const mappedParameters = {
20
+ siteId: 's',
21
+ userId: 'browserId',
22
+ browserId: 'browserId',
23
+ folderId: 'folderId'
24
+ }
25
+
26
+ const tzo = new Date().getTimezoneOffset();
27
+ const URL = ['https://data.adnuntius.com/usr?tzo=' + tzo]
28
+ Object.keys(provider).forEach(key => {
29
+ URL.push(`${mappedParameters[key]}=${provider[key]}`)
30
+ })
31
+
32
+ return new Promise((resolve, reject) => {
33
+ ajax(URL.join('&'), {
34
+ success: function (res) {
35
+ const response = JSON.parse(res)
36
+ resolve(response)
37
+ },
38
+ error: function (err) { reject(err) }
39
+ });
40
+ });
41
+ }
42
+
43
+ function setGlobalConfig(config, segments) {
44
+ const ortbSegments = {
45
+ ortb2: {
46
+ user: {
47
+ data: [{
48
+ name: 'adnuntius',
49
+ segment: segments
50
+ }]
51
+ }
52
+ }
53
+ }
54
+ if (config.params && config.params.bidders) {
55
+ sourceConfig.mergeBidderConfig({
56
+ bidders: config.params.bidders,
57
+ config: ortbSegments
58
+ })
59
+ } else {
60
+ sourceConfig.mergeConfig(ortbSegments)
61
+ }
62
+ }
63
+
64
+ function alterBidRequests(reqBidsConfigObj, callback, config, userConsent) {
65
+ const gdpr = userConsent && userConsent.gdpr;
66
+ let allowedToRun = true
67
+ if (gdpr) {
68
+ if (userConsent.gdpr.gdprApplies) {
69
+ if (gdpr.gdprApplies && !gdpr.vendorData.vendorConsents[GVLID]) allowedToRun = false;
70
+ }
71
+ }
72
+ if (allowedToRun) {
73
+ const providerRequests = config.params.providers.map(provider => prepProvider(provider))
74
+
75
+ Promise.allSettled(providerRequests).then((values) => {
76
+ const segments = values.reduce((segments, array) => (array.status === 'fulfilled') ? segments.concat(array.value.segments) : [], []).map(segmentId => ({ id: segmentId }))
77
+ setGlobalConfig(config, segments)
78
+ callback();
79
+ })
80
+ .catch(err => logError('ADN: err', err));
81
+ } else callback();
82
+ }
83
+
84
+ /** @type {RtdSubmodule} */
85
+ export const adnuntiusSubmodule = {
86
+ name: 'adnuntius',
87
+ init: init,
88
+ getBidRequestData: alterBidRequests,
89
+ setGlobalConfig: setGlobalConfig,
90
+ };
91
+
92
+ export function beforeInit() {
93
+ submodule('realTimeData', adnuntiusSubmodule);
94
+ }
95
+
96
+ beforeInit();
@@ -0,0 +1,41 @@
1
+ ### Overview
2
+
3
+ The Adnuntius Real Time Data Provider will request segments from adnuntius data, based on what is defined in the realTimeData object. It uses the siteId and userId that a publisher provides. These will have to correspond to a previously uploaded user to Adnuntius Data.
4
+
5
+ ### Integration
6
+
7
+ 1. Build the adnuntiusRTD module into the Prebid.js package with:
8
+
9
+ ```
10
+ gulp build --modules=adnuntiusRtdProvider,...
11
+ ```
12
+
13
+ 2. Use `setConfig` to instruct Prebid.js to initilaize the adnuntiusRtdProvider module, as specified below.
14
+
15
+ ### Configuration
16
+
17
+ ```
18
+ var pbjs = pbjs || { que: [] }
19
+ pbjs.que.push(function () {
20
+ pbjs.setConfig({
21
+ realTimeData: {
22
+ auctionDelay: 300,
23
+ dataProviders: [
24
+ {
25
+ name: 'adnuntius',
26
+ waitForIt: true,
27
+ params: {
28
+ bidders: ['adnuntius'],
29
+ providers: [{
30
+ siteId: 'site123',
31
+ userId: 'user123'
32
+ }]
33
+ }
34
+ }
35
+ ]
36
+ },
37
+ });
38
+ });
39
+ ```
40
+
41
+ Please reach out to Adnuntius if you need more info about this: prebid@adnuntius.com
@@ -2,8 +2,8 @@ import adapter from '../src/AnalyticsAdapter.js';
2
2
  import CONSTANTS from '../src/constants.json';
3
3
  import adapterManager from '../src/adapterManager.js';
4
4
  import { logInfo } from '../src/utils.js';
5
- import find from 'core-js-pure/features/array/find.js';
6
- import findIndex from 'core-js-pure/features/array/find-index.js';
5
+ import find from 'prebidjs-polyfill/find.js';
6
+ import findIndex from 'prebidjs-polyfill/findIndex.js';
7
7
 
8
8
  // Events used in adomik analytics adapter
9
9
  const auctionInit = CONSTANTS.EVENTS.AUCTION_INIT;
@@ -2,7 +2,7 @@ import {Renderer} from '../src/Renderer.js';
2
2
  import {registerBidder} from '../src/adapters/bidderFactory.js';
3
3
  import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js';
4
4
  import {isStr, isArray, isNumber, isPlainObject, isBoolean, logError, replaceAuctionPrice} from '../src/utils.js';
5
- import find from 'core-js-pure/features/array/find.js';
5
+ import find from 'prebidjs-polyfill/find.js';
6
6
  import { config } from '../src/config.js';
7
7
 
8
8
  const ADAPTER_VERSION = 'v1.0.0';
package/modules/adpod.js CHANGED
@@ -23,12 +23,11 @@ import { setupBeforeHookFnOnce, module } from '../src/hook.js';
23
23
  import { store } from '../src/videoCache.js';
24
24
  import { config } from '../src/config.js';
25
25
  import { ADPOD } from '../src/mediaTypes.js';
26
- import Set from 'core-js-pure/features/set';
27
- import find from 'core-js-pure/features/array/find.js';
26
+ import find from 'prebidjs-polyfill/find.js';
28
27
  import { auctionManager } from '../src/auctionManager.js';
29
28
  import CONSTANTS from '../src/constants.json';
30
29
 
31
- const from = require('core-js-pure/features/array/from.js');
30
+ const from = require('prebidjs-polyfill/arrayFrom.js');
32
31
 
33
32
  const TARGETING_KEY_PB_CAT_DUR = 'hb_pb_cat_dur';
34
33
  const TARGETING_KEY_CACHE_ID = 'hb_cache_id';
@@ -122,7 +121,7 @@ function getPricePartForAdpodKey(bid) {
122
121
  const adpodDealPrefix = config.getConfig(`adpod.dealTier.${bid.bidderCode}.prefix`);
123
122
  pricePart = (adpodDealPrefix) ? adpodDealPrefix + deepAccess(bid, 'video.dealTier') : deepAccess(bid, 'video.dealTier');
124
123
  } else {
125
- const granularity = getPriceGranularity(bid.mediaType);
124
+ const granularity = getPriceGranularity(bid);
126
125
  pricePart = getPriceByGranularity(granularity)(bid);
127
126
  }
128
127
  return pricePart
@@ -223,10 +222,9 @@ function firePrebidCacheCall(auctionInstance, bidList, afterBidAdded) {
223
222
  * @param {*} auctionInstance running context of the auction
224
223
  * @param {Object} bidResponse incoming bid; if adpod, will be processed through hook function. If not adpod, returns to original function.
225
224
  * @param {Function} afterBidAdded callback function used when Prebid Cache responds
226
- * @param {Object} bidderRequest copy of bid's associated bidderRequest object
225
+ * @param {Object} videoConfig mediaTypes.video from the bid's adUnit
227
226
  */
228
- export function callPrebidCacheHook(fn, auctionInstance, bidResponse, afterBidAdded, bidderRequest) {
229
- let videoConfig = deepAccess(bidderRequest, 'mediaTypes.video');
227
+ export function callPrebidCacheHook(fn, auctionInstance, bidResponse, afterBidAdded, videoConfig) {
230
228
  if (videoConfig && videoConfig.context === ADPOD) {
231
229
  let brandCategoryExclusion = config.getConfig('adpod.brandCategoryExclusion');
232
230
  let adServerCatId = deepAccess(bidResponse, 'meta.adServerCatId');
@@ -250,7 +248,7 @@ export function callPrebidCacheHook(fn, auctionInstance, bidResponse, afterBidAd
250
248
  }
251
249
  }
252
250
  } else {
253
- fn.call(this, auctionInstance, bidResponse, afterBidAdded, bidderRequest);
251
+ fn.call(this, auctionInstance, bidResponse, afterBidAdded, videoConfig);
254
252
  }
255
253
  }
256
254
 
@@ -310,18 +308,17 @@ export function checkAdUnitSetupHook(fn, adUnits) {
310
308
  * (eg if range was [5, 15, 30] -> 2s is rounded to 5s; 17s is rounded back to 15s; 18s is rounded up to 30s)
311
309
  * - if the bid is above the range of the listed durations (and outside the buffer), reject the bid
312
310
  * - set the rounded duration value in the `bid.video.durationBucket` field for accepted bids
313
- * @param {Object} bidderRequest copy of the bidderRequest object associated to bidResponse
311
+ * @param {Object} videoMediaType 'mediaTypes.video' associated to bidResponse
314
312
  * @param {Object} bidResponse incoming bidResponse being evaluated by bidderFactory
315
313
  * @returns {boolean} return false if bid duration is deemed invalid as per adUnit configuration; return true if fine
316
314
  */
317
- function checkBidDuration(bidderRequest, bidResponse) {
315
+ function checkBidDuration(videoMediaType, bidResponse) {
318
316
  const buffer = 2;
319
317
  let bidDuration = deepAccess(bidResponse, 'video.durationSeconds');
320
- let videoConfig = deepAccess(bidderRequest, 'mediaTypes.video');
321
- let adUnitRanges = videoConfig.durationRangeSec;
318
+ let adUnitRanges = videoMediaType.durationRangeSec;
322
319
  adUnitRanges.sort((a, b) => a - b); // ensure the ranges are sorted in numeric order
323
320
 
324
- if (!videoConfig.requireExactDuration) {
321
+ if (!videoMediaType.requireExactDuration) {
325
322
  let max = Math.max(...adUnitRanges);
326
323
  if (bidDuration <= (max + buffer)) {
327
324
  let nextHighestRange = find(adUnitRanges, range => (range + buffer) >= bidDuration);
@@ -346,12 +343,12 @@ function checkBidDuration(bidderRequest, bidResponse) {
346
343
  * If it's found to not be an adpod bid, it will return to original function via hook logic
347
344
  * @param {Function} fn reference to original function (used by hook logic)
348
345
  * @param {Object} bid incoming bid object
349
- * @param {Object} bidRequest bidRequest object of associated bid
346
+ * @param {Object} adUnit adUnit object of associated bid
350
347
  * @param {Object} videoMediaType copy of the `bidRequest.mediaTypes.video` object; used in original function
351
348
  * @param {String} context value of the `bidRequest.mediaTypes.video.context` field; used in original function
352
349
  * @returns {boolean} this return is only used for adpod bids
353
350
  */
354
- export function checkVideoBidSetupHook(fn, bid, bidRequest, videoMediaType, context) {
351
+ export function checkVideoBidSetupHook(fn, bid, adUnit, videoMediaType, context) {
355
352
  if (context === ADPOD) {
356
353
  let result = true;
357
354
  let brandCategoryExclusion = config.getConfig('adpod.brandCategoryExclusion');
@@ -367,7 +364,7 @@ export function checkVideoBidSetupHook(fn, bid, bidRequest, videoMediaType, cont
367
364
  if (!deepAccess(bid, 'video.durationSeconds') || bid.video.durationSeconds <= 0) {
368
365
  result = false;
369
366
  } else {
370
- let isBidGood = checkBidDuration(bidRequest, bid);
367
+ let isBidGood = checkBidDuration(videoMediaType, bid);
371
368
  if (!isBidGood) result = false;
372
369
  }
373
370
  }
@@ -382,7 +379,7 @@ export function checkVideoBidSetupHook(fn, bid, bidRequest, videoMediaType, cont
382
379
 
383
380
  fn.bail(result);
384
381
  } else {
385
- fn.call(this, bid, bidRequest, videoMediaType, context);
382
+ fn.call(this, bid, adUnit, videoMediaType, context);
386
383
  }
387
384
  }
388
385
 
@@ -6,8 +6,8 @@ import {
6
6
  import { config } from '../src/config.js';
7
7
  import { registerBidder } from '../src/adapters/bidderFactory.js';
8
8
  import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
9
- import find from 'core-js-pure/features/array/find.js';
10
- import includes from 'core-js-pure/features/array/includes.js';
9
+ import find from 'prebidjs-polyfill/find.js';
10
+ import includes from 'prebidjs-polyfill/includes.js';
11
11
  import { OUTSTREAM, INSTREAM } from '../src/video.js';
12
12
 
13
13
  const BIDDER_CODE = 'adrelevantis';
@@ -2,7 +2,7 @@ import { deepAccess, isArray, chunk, _map, flatten, logError, parseSizesInput }
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
3
3
  import { BANNER, VIDEO } from '../src/mediaTypes.js';
4
4
  import { config } from '../src/config.js';
5
- import find from 'core-js-pure/features/array/find.js';
5
+ import find from 'prebidjs-polyfill/find.js';
6
6
 
7
7
  const ENDPOINT = 'https://ghb.console.adtarget.com.tr/v2/auction/';
8
8
  const BIDDER_CODE = 'adtarget';
@@ -3,7 +3,7 @@ import { registerBidder } from '../src/adapters/bidderFactory.js';
3
3
  import { ADPOD, BANNER, VIDEO } from '../src/mediaTypes.js';
4
4
  import { config } from '../src/config.js';
5
5
  import { Renderer } from '../src/Renderer.js';
6
- import find from 'core-js-pure/features/array/find.js';
6
+ import find from 'prebidjs-polyfill/find.js';
7
7
 
8
8
  const subdomainSuffixes = ['', 1, 2];
9
9
  const AUCTION_PATH = '/v2/auction/';
@@ -2,8 +2,8 @@ import { isEmpty, deepAccess, isFn, parseSizesInput, generateUUID, parseUrl } fr
2
2
  import { config } from '../src/config.js';
3
3
  import { registerBidder } from '../src/adapters/bidderFactory.js';
4
4
  import { VIDEO, BANNER } from '../src/mediaTypes.js';
5
- import find from 'core-js-pure/features/array/find.js';
6
- import includes from 'core-js-pure/features/array/includes.js';
5
+ import find from 'prebidjs-polyfill/find.js';
6
+ import includes from 'prebidjs-polyfill/includes.js';
7
7
 
8
8
  const ADAPTER_VERSION = '1.0';
9
9
  const BIDDER_CODE = 'advangelists';
@@ -3,7 +3,7 @@ import { ajax } from '../src/ajax.js';
3
3
  import adapter from '../src/AnalyticsAdapter.js';
4
4
  import adapterManager from '../src/adapterManager.js';
5
5
  import CONSTANTS from '../src/constants.json';
6
- import includes from 'core-js-pure/features/array/includes.js';
6
+ import includes from 'prebidjs-polyfill/includes.js';
7
7
 
8
8
  const analyticsType = 'endpoint';
9
9
  const defaultUrl = 'https://adxpremium.services/graphql';
@@ -2,7 +2,7 @@ import { deepAccess, buildUrl, parseSizesInput } from '../src/utils.js';
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
3
3
  import { config } from '../src/config.js';
4
4
  import { createEidsArray } from './userId/eids.js';
5
- import find from 'core-js-pure/features/array/find.js';
5
+ import find from 'prebidjs-polyfill/find.js';
6
6
  import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js';
7
7
 
8
8
  const VERSION = '1.0';
@@ -1,4 +1,4 @@
1
- import includes from 'core-js-pure/features/array/includes.js'
1
+ import includes from 'prebidjs-polyfill/includes.js'
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js'
3
3
  import { Renderer } from '../src/Renderer.js'
4
4
  import { BANNER, VIDEO } from '../src/mediaTypes.js'
@@ -4,8 +4,8 @@ import { config } from '../src/config.js';
4
4
  import { registerBidder, getIabSubCategory } from '../src/adapters/bidderFactory.js';
5
5
  import { BANNER, NATIVE, VIDEO, ADPOD } from '../src/mediaTypes.js';
6
6
  import { auctionManager } from '../src/auctionManager.js';
7
- import find from 'core-js-pure/features/array/find.js';
8
- import includes from 'core-js-pure/features/array/includes.js';
7
+ import find from 'prebidjs-polyfill/find.js';
8
+ import includes from 'prebidjs-polyfill/includes.js';
9
9
  import { OUTSTREAM, INSTREAM } from '../src/video.js';
10
10
  import { getStorageManager } from '../src/storageManager.js';
11
11
  import { bidderSettings } from '../src/bidderSettings.js';
@@ -3,8 +3,8 @@ import { config } from '../src/config.js';
3
3
  import { registerBidder } from '../src/adapters/bidderFactory.js';
4
4
  import { Renderer } from '../src/Renderer.js';
5
5
  import { VIDEO, BANNER } from '../src/mediaTypes.js';
6
- import find from 'core-js-pure/features/array/find.js';
7
- import includes from 'core-js-pure/features/array/includes.js';
6
+ import find from 'prebidjs-polyfill/find.js';
7
+ import includes from 'prebidjs-polyfill/includes.js';
8
8
 
9
9
  const ADAPTER_VERSION = '1.19';
10
10
  const ADAPTER_NAME = 'BFIO_PREBID';
@@ -6,7 +6,7 @@ const BIDDER_CODE = 'between';
6
6
  let ENDPOINT = 'https://ads.betweendigital.com/adjson?t=prebid';
7
7
  const CODE_TYPES = ['inpage', 'preroll', 'midroll', 'postroll'];
8
8
 
9
- const includes = require('core-js-pure/features/array/includes.js');
9
+ const includes = require('prebidjs-polyfill/includes.js');
10
10
  export const spec = {
11
11
  code: BIDDER_CODE,
12
12
  aliases: ['btw'],
@@ -8,7 +8,7 @@ import CONSTANTS from '../src/constants.json';
8
8
  import { logWarn, isFn, triggerPixel } from '../src/utils.js';
9
9
  import { getGlobal } from '../src/prebidGlobal.js';
10
10
  import adapterManager, { gdprDataHandler, uspDataHandler } from '../src/adapterManager.js';
11
- import find from 'core-js-pure/features/array/find.js';
11
+ import find from 'prebidjs-polyfill/find.js';
12
12
 
13
13
  const MODULE_NAME = 'bidViewability';
14
14
  const CONFIG_ENABLED = 'enabled';
@@ -1,5 +1,5 @@
1
1
  import { deepAccess, deepSetValue, deepClone, logWarn, logError } from '../src/utils.js';
2
- import find from 'core-js-pure/features/array/find.js';
2
+ import find from 'prebidjs-polyfill/find.js';
3
3
  import { registerBidder } from '../src/adapters/bidderFactory.js';
4
4
  import { VIDEO } from '../src/mediaTypes.js';
5
5
  import { config } from '../src/config.js';
@@ -1,7 +1,7 @@
1
1
  import { _each, inIframe, deepSetValue } from '../src/utils.js';
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
3
3
  import { BANNER, NATIVE } from '../src/mediaTypes.js';
4
- import find from 'core-js-pure/features/array/find.js';
4
+ import find from 'prebidjs-polyfill/find.js';
5
5
 
6
6
  const BIDDER_CODE = 'bridgewell';
7
7
  const REQUEST_ENDPOINT = 'https://prebid.scupio.com/recweb/prebid.aspx?cb=';
@@ -20,9 +20,9 @@ import {submodule} from '../src/hook.js';
20
20
  import {ajaxBuilder} from '../src/ajax.js';
21
21
  import {loadExternalScript} from '../src/adloader.js';
22
22
  import {getStorageManager} from '../src/storageManager.js';
23
- import find from 'core-js-pure/features/array/find.js';
23
+ import find from 'prebidjs-polyfill/find.js';
24
24
  import {getGlobal} from '../src/prebidGlobal.js';
25
- import includes from 'core-js-pure/features/array/includes.js';
25
+ import includes from 'prebidjs-polyfill/includes.js';
26
26
 
27
27
  const storage = getStorageManager();
28
28
 
@@ -3,7 +3,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
3
3
  import {config} from '../src/config.js';
4
4
  import {Renderer} from '../src/Renderer.js';
5
5
  import {BANNER, VIDEO} from '../src/mediaTypes.js';
6
- import includes from 'core-js-pure/features/array/includes.js';
6
+ import includes from 'prebidjs-polyfill/includes.js';
7
7
 
8
8
  export const helper = {
9
9
  getTopWindowDomain: function (url) {
@@ -8,7 +8,7 @@
8
8
  import {ajax} from '../src/ajax.js';
9
9
  import {submodule} from '../src/hook.js';
10
10
  import {logError, formatQS} from '../src/utils.js';
11
- import includes from 'core-js-pure/features/array/includes.js';
11
+ import includes from 'prebidjs-polyfill/includes.js';
12
12
 
13
13
  const MODULE_NAME = 'connectId';
14
14
  const VENDOR_ID = 25;