From 7c811776ad675019dd21ff54d25a838b5534ab00 Mon Sep 17 00:00:00 2001 From: Pramod Pisal Date: Thu, 19 Nov 2020 14:45:29 +0530 Subject: [PATCH] Prebid upgarde automate- test pull request created through git api please ignore it (#421) * Merge Conflicts Resolved and errors fixed * triggering usersyncs manually, to ensure syncup occurs in case of server side enabled partners * changes in native keys from hb_ to pwt_ * added ext in logo and icon * Hook Fix * Support for ext object in icon * automate-creation of modules.json file * Fixed merge issue and test cases fixes * Check for valid sizes only * Unit test cases for the change * automate-creation of modules.json file * Fixed Merge issues * UOE-4404 if adslot and mediatype both contain sizes * automate-creation of modules.json file * Initial User Id Module * Updated modules.json * automate-creation of modules.json file * Server Side throttling based on condition * Condition for all partners throttled * Changed gulp task dependencies * Build Time Optimization * changed unused gulp packages * Updated Package.json * automate-creation of modules.json file * resolved conflixt * automate-creation of modules.json file * IdentityPartners * Changes for Hashed Key and parseAdSlot logic * Fix for custom module * making call secure of ow * Removed implicit customId system and added it as a separated submodule * Making server side calls secure and flag secure to 1 * Changed unifiedId from implicit to explicit * Updated The code to fix text cases * Fixed unit test cases * Took latest for all ids * Fixed the linting issue * Custom Data support and ParseInt for Id5 * Fixed custom data * Updated function call * Changed Event from Auction End to Request Bid * added secure flag * Revert "Open identity" * Revert "Revert "Open identity"" * First Party Id name updated for cookies * PubMatic Handle first Party Id * Pubmatic alias * Handle regex pattern in logger for Hybrid Implementation * Increment pre version * Somo: fix an issue where the requestId was being set to the wrong value (#4596) * Sovrn ccpa support legacy (#4623) * sovrn ccpa support * use array map/join instead of object.entries * TripleLift: CCPA legacy support (#4641) * Add CCPA query param * Simplify check for usPrivacy argument * pbsBidAdapter currency fix for legacy branch (#4642) * pbsBidAdapter currency fix for legacy branch * fixed unit tests * Prebid 2.44.1 Release * Revert "Prebid 2.44.1 Release" This reverts commit 105313b792b79002c0ada3301d154afd49adb7cd. * fix a bug when the iframe locator is not present on page (#4637) * fix a bug when the iframe locator is not present on page * clean up * Prebid 2.44.1 Release * increment pre version * Index Exchange: CCPA support (#4662) * support for us privacy (CCPA) (#4665) * Added CCPA support for legacy (#4663) * Update CCPA v3 (#4677) CCPA support V2 compatibility Sample tag update * automate-creation of modules.json file * Medianet: CCPA support added (#4656) * Ccpa legacy support for OneVideo (#4648) * outstream changes * removing global filtet * reverting page * message * adapter change * remove space * testcases * testpage * spaces for test page * renderer exist case * reverting package-lock.json * adding schain object * adding tagid * syntaxx error fix * video.html * space trailing * space * tagid * inventoryId and placement * rewarded video * added unit test case * ccpa cahnges * ccpa change * test page * test page change * test page change 2 * change the variable * handling the case if both GDPR and CCPA case * handiling both cases * test cases * legacy ccpa support * Update oneVideoBidAdapter.js * Add us privacy 2.X (#4669) * cedato adapter gdpr and usp compliance (#4686) * Fidelity Media Bid Adapter 2.44.x legacy. CCPA support. (#4652) * Fidelity Media Bid Adapter v2.44.x. CCPA support. * Fidelity Media Bid Adapter v2.44.x. CCPA support. * add dh adapter for legacy prebid 2.x (#4670) * Prebid 2.44.2 Release * automate-creation of modules.json file * Support for CCPA * Adding tracker in vast creative before cache * add adform alias adform2 * Updated First Party Module * Updated our adapter to have firstpartyid * automate-creation of modules.json file * Update key value pair for video in openwrap * Server side syncup in accordance with latest filter settings * Support for Eids in PubMaticServerBidAdapter * Fix for pubCommonId * Fix for pubmatic server bid adapter * fix for player size and considering w & h for video * automate-creation of modules.json file * Fixed test issues * automate-creation of modules.json file * fix test cases * Pull changes for dspid and seatid from prebid master * Support for buyerId * Updated location of buyid * automate-creation of modules.json file * Changes for consuming targeting from server side * Fix test cases * Updated rubiconBidAdapter for alias * adding sspId * UOE-5262 : OpenWrap: Add Secondary Ad Generation Bidder * bluebillywig outstream renderer * Fix an issue with replacing Renderer * Replaced Renderee * code review comments * automate-creation of modules.json file * added missing adatpers * updating package.json for prod dependecies * updated namespace * Fix for SSP ID * fixed test cases * took latest * ternay adapters * Update adformBidAdapter.js * automate-creation of modules.json file * updated modules.json removed audienceNetworkBidAdapter * wiid fix * Targeting Keys * dg bid adapter * automate-creation of modules.json file * fixes for dfp * removed audienceNetwork from modules.json * Fix for UOE-5694 * Fix for test cases * regex support * OpenWrap Nightly Release v21.1.0 (#417) * support for video in hybrid profiles * added newBid.mediaType for pubmaticServerBidAdapter * unit test case for video request * reverted debug flag * Changes for UOe-5712/5705 * Manually took the changes for DVC related info * Fix Typo * piid for hybrid profiles * removed fix for piid from staged_nightly * Removing OW PB Same Changes regarding device as it will be releaed in Q1 * Log SSPId in piid for pubmatic Co-authored-by: pm-shashank-jain <40654031+pm-shashank-jain@users.noreply.github.com> Co-authored-by: pm-shashank-jain Co-authored-by: Manasi Moghe Co-authored-by: Jaimin Panchal Co-authored-by: travisbeale Co-authored-by: Ankit Prakash Co-authored-by: David Andersen Co-authored-by: bretg Co-authored-by: Jason Snellbaker Co-authored-by: Matt Kendall <1870166+mkendall07@users.noreply.github.com> Co-authored-by: Index Exchange 3 Prebid Team Co-authored-by: nwlosinski Co-authored-by: JonGoSonobi Co-authored-by: Itay Nave <38345760+itaynave@users.noreply.github.com> Co-authored-by: binoy-chitale Co-authored-by: DeepthiNeeladri Co-authored-by: Valentin Souche Co-authored-by: Alex Khmelnitsky Co-authored-by: Oleg Naydenov Co-authored-by: Montu Thakore Co-authored-by: Deepak Sahu Co-authored-by: PubMatic-OpenWrap Co-authored-by: Harshad Mane --- gulpfile.js | 107 +- .../gpt/gdpr_iframe_hello_world.html | 109 + integrationExamples/gpt/gdpr_iframe_test.html | 10 + modules.json | 2 +- modules/.submodules.json | 1 + modules/adformBidAdapter.js | 1 + modules/adgenerationBidAdapter.js | 2 +- modules/appnexusBidAdapter.js | 1 + modules/customIdSystem.js | 69 + modules/dfpAdServerVideo.js | 12 +- modules/id5IdSystem.js | 1 - modules/ixBidAdapter.js | 1 + modules/pubmaticBidAdapter.js | 196 +- modules/pubmaticBidAdapter.md | 1 + modules/pubmaticServerBidAdapter.js | 730 ++ modules/pubmaticServerBidAdapter.md | 47 + modules/rdnBidAdapter.md | 0 modules/rubiconBidAdapter.js | 1 + modules/teadsBidAdapter.js | 15 +- modules/userId/index.js | 4 +- modules/widespaceBidAdapter.js | 1 - package.json | 31 +- src/ajax.js | 14 +- src/config.js | 2 - src/constants.json | 60 +- src/hook.js | 1 + src/videoCache.js | 7 +- .../modules/appierAnalyticsAdapter_spec.js | 2 +- test/spec/modules/dfpAdServerVideo_spec.js | 14 +- .../modules/fintezaAnalyticsAdapter_spec.js | 8 +- test/spec/modules/id5IdSystem_spec.js | 38 +- .../modules/invisiblyAnalyticsAdapter_spec.js | 3 +- .../modules/pubmaticAnalyticsAdapter_spec.js | 101 + test/spec/modules/pubmaticBidAdapter_spec.js | 1188 ++- .../modules/pubmaticServerBidAdapter_spec.js | 540 + .../modules/richaudienceBidAdapter_spec.js | 4 +- test/spec/modules/userId_spec.js | 10 +- test/spec/native_spec.js | 6 +- test/spec/unit/core/adapterManager_spec.js | 3 - test/spec/unit/core/targeting_spec.js | 4 +- yarn.lock | 9409 +++++++++++++++++ 41 files changed, 12091 insertions(+), 665 deletions(-) create mode 100644 integrationExamples/gpt/gdpr_iframe_hello_world.html create mode 100644 integrationExamples/gpt/gdpr_iframe_test.html create mode 100644 modules/customIdSystem.js create mode 100644 modules/pubmaticServerBidAdapter.js create mode 100644 modules/pubmaticServerBidAdapter.md mode change 100644 => 100755 modules/rdnBidAdapter.md create mode 100644 test/spec/modules/pubmaticServerBidAdapter_spec.js create mode 100644 yarn.lock diff --git a/gulpfile.js b/gulpfile.js index 879e34ae588..bbc2e6eb08a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,31 +1,30 @@ /* eslint-disable no-console */ 'use strict'; - -var _ = require('lodash'); +console.time('Loading Plugins in Prebid'); var argv = require('yargs').argv; var gulp = require('gulp'); -var gutil = require('gulp-util'); -var connect = require('gulp-connect'); -var webpack = require('webpack'); -var webpackStream = require('webpack-stream'); -var uglify = require('gulp-uglify'); -var gulpClean = require('gulp-clean'); -var KarmaServer = require('karma').Server; -var karmaConfMaker = require('./karma.conf.maker'); -var opens = require('opn'); -var webpackConfig = require('./webpack.conf'); -var helpers = require('./gulpHelpers'); +// var gutil = require('gulp-util'); +// var connect = require('gulp-connect'); +// var webpack = require('webpack'); +// var webpackStream = require('webpack-stream'); +// var uglify = require('gulp-uglify'); +// var gulpClean = require('gulp-clean'); +// var KarmaServer = require('karma').Server; +// var karmaConfMaker = require('./karma.conf.maker'); +// var opens = require('opn'); +// var webpackConfig = require('./webpack.conf'); +// var helpers = require('./gulpHelpers'); var concat = require('gulp-concat'); -var header = require('gulp-header'); -var footer = require('gulp-footer'); +// var header = require('gulp-header'); +// var footer = require('gulp-footer'); var replace = require('gulp-replace'); -var shell = require('gulp-shell'); -var eslint = require('gulp-eslint'); -var gulpif = require('gulp-if'); -var sourcemaps = require('gulp-sourcemaps'); -var through = require('through2'); -var fs = require('fs'); -var jsEscape = require('gulp-js-escape'); +// var shell = require('gulp-shell'); +// var eslint = require('gulp-eslint'); +// var gulpif = require('gulp-if'); +// var sourcemaps = require('gulp-sourcemaps'); +// var through = require('through2'); +// var fs = require('fs'); +// var jsEscape = require('gulp-js-escape'); const path = require('path'); const execa = require('execa'); @@ -33,6 +32,7 @@ var prebid = require('./package.json'); var dateString = 'Updated : ' + (new Date()).toISOString().substring(0, 10); var banner = '/* <%= prebid.name %> v<%= prebid.version %>\n' + dateString + ' */\n'; var port = 9999; +console.timeEnd('Loading Plugins in Prebid'); const FAKE_SERVER_HOST = argv.host ? argv.host : 'localhost'; const FAKE_SERVER_PORT = 4444; const { spawn } = require('child_process'); @@ -49,6 +49,7 @@ function bundleToStdout() { bundleToStdout.displayName = 'bundle-to-stdout'; function clean() { + var gulpClean = require('gulp-clean'); return gulp.src(['build'], { read: false, allowEmpty: true @@ -58,6 +59,8 @@ function clean() { // Dependant task for building postbid. It escapes postbid-config file. function escapePostbidConfig() { + var jsEscape = require('gulp-js-escape'); + gulp.src('./integrationExamples/postbid/oas/postbid-config.js') .pipe(jsEscape()) .pipe(gulp.dest('build/postbid/')); @@ -65,6 +68,9 @@ function escapePostbidConfig() { escapePostbidConfig.displayName = 'escape-postbid-config'; function lint(done) { + var eslint = require('gulp-eslint'); + var gulpif = require('gulp-if'); + if (argv.nolint) { return done(); } @@ -80,6 +86,9 @@ function lint(done) { // View the code coverage report in the browser. function viewCoverage(done) { + var connect = require('gulp-connect'); + var opens = require('opn'); + var coveragePort = 1999; var mylocalhost = (argv.host) ? argv.host : 'localhost'; @@ -96,6 +105,8 @@ viewCoverage.displayName = 'view-coverage'; // Watch Task with Live Reload function watch(done) { + var connect = require('gulp-connect'); + var mainWatcher = gulp.watch([ 'src/**/*.js', 'modules/**/*.js', @@ -121,6 +132,13 @@ function watch(done) { }; function makeDevpackPkg() { + var _ = require('lodash'); + var connect = require('gulp-connect'); + var webpack = require('webpack'); + var webpackStream = require('webpack-stream'); + var webpackConfig = require('./webpack.conf'); + var helpers = require('./gulpHelpers'); + var cloned = _.cloneDeep(webpackConfig); cloned.devtool = 'source-map'; var externalModules = helpers.getArgModules(); @@ -136,6 +154,15 @@ function makeDevpackPkg() { } function makeWebpackPkg() { + var _ = require('lodash'); + var webpack = require('webpack'); + var webpackStream = require('webpack-stream'); + var uglify = require('gulp-uglify'); + var webpackConfig = require('./webpack.conf'); + var helpers = require('./gulpHelpers'); + var header = require('gulp-header'); + var gulpif = require('gulp-if'); + var cloned = _.cloneDeep(webpackConfig); delete cloned.devtool; @@ -157,6 +184,8 @@ function gulpBundle(dev) { } function nodeBundle(modules) { + var through = require('through2'); + return new Promise((resolve, reject) => { bundle(false, modules) .on('error', (err) => { @@ -170,9 +199,17 @@ function nodeBundle(modules) { } function bundle(dev, moduleArr) { + // console.time('Loading Plugins for Prebid'); + var _ = require('lodash'); + var gutil = require('gulp-util'); + var helpers = require('./gulpHelpers'); + var footer = require('gulp-footer'); + var gulpif = require('gulp-if'); + var sourcemaps = require('gulp-sourcemaps'); var modules = moduleArr || helpers.getArgModules(); var allModules = helpers.getModuleNames(modules); - + // console.timeEnd('Loading Plugins for Prebid'); + // console.time('Getting Modules for Prebid'); if (modules.length === 0) { modules = allModules.filter(module => explicitModules.indexOf(module) === -1); } else { @@ -184,7 +221,8 @@ function bundle(dev, moduleArr) { }); } } - + // console.timeEnd('Getting Modules for Prebid'); + // console.time('Concating Starts'); var entries = [helpers.getBuiltPrebidCoreFile(dev)].concat(helpers.getBuiltModules(dev, modules)); var outputFileName = argv.bundleName ? argv.bundleName : 'prebid.js'; @@ -194,10 +232,10 @@ function bundle(dev, moduleArr) { outputFileName = outputFileName.replace(/\.js$/, `.${argv.tag}.js`); } - gutil.log('Concatenating files:\n', entries); - gutil.log('Appending ' + prebid.globalVarName + '.processQueue();'); - gutil.log('Generating bundle:', outputFileName); - + // gutil.log('Concatenating files:\n', entries); + // gutil.log('Appending ' + prebid.globalVarName + '.processQueue();'); + // gutil.log('Generating bundle:', outputFileName); + // console.timeEnd('Concating Starts'); return gulp.src( entries ) @@ -221,6 +259,10 @@ function bundle(dev, moduleArr) { // If --notest is given, it will immediately skip the test task (useful for developing changes with `gulp serve --notest`) function test(done) { + var KarmaServer = require('karma').Server; + var karmaConfMaker = require('./karma.conf.maker'); + var helpers = require('./gulpHelpers'); + if (argv.notest) { done(); } else if (argv.e2e) { @@ -292,10 +334,15 @@ function newKarmaCallback(done) { // If --file "" is given, the task will only run tests in the specified file. function testCoverage(done) { + var KarmaServer = require('karma').Server; + var karmaConfMaker = require('./karma.conf.maker'); + new KarmaServer(karmaConfMaker(true, false, false, argv.file), newKarmaCallback(done)).start(); } function coveralls() { // 2nd arg is a dependency: 'test' must be finished + var shell = require('gulp-shell'); + // first send results of istanbul's test coverage to coveralls.io. return gulp.src('gulpfile.js', { read: false }) // You have to give it a file, but you don't // have to read it. @@ -306,6 +353,8 @@ function coveralls() { // 2nd arg is a dependency: 'test' must be finished // More info can be found here http://prebid.org/overview/what-is-post-bid.html function buildPostbid() { + var fs = require('fs'); + var fileContent = fs.readFileSync('./build/postbid/postbid-config.js', 'utf8'); return gulp.src('./integrationExamples/postbid/oas/postbid.js') @@ -314,6 +363,8 @@ function buildPostbid() { } function setupE2e(done) { + var gutil = require('gulp-util'); + if (!argv.host) { throw new gutil.PluginError({ plugin: 'E2E test', diff --git a/integrationExamples/gpt/gdpr_iframe_hello_world.html b/integrationExamples/gpt/gdpr_iframe_hello_world.html new file mode 100644 index 00000000000..4ead5832bc7 --- /dev/null +++ b/integrationExamples/gpt/gdpr_iframe_hello_world.html @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + +

Prebid.js Test

+
Div-1
+
+ +
+ + \ No newline at end of file diff --git a/integrationExamples/gpt/gdpr_iframe_test.html b/integrationExamples/gpt/gdpr_iframe_test.html new file mode 100644 index 00000000000..bb643da24a6 --- /dev/null +++ b/integrationExamples/gpt/gdpr_iframe_test.html @@ -0,0 +1,10 @@ + + + + + + + +