Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to forked repo #10

Merged
merged 31 commits into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
14cdd2a
Seeding alliance Adapter: multiple replacement of auction price bugfi…
Apr 5, 2022
e2c4086
Biddo Bid Adapter: add new bid adapter (#8206)
llays Apr 5, 2022
147ee96
consumableBidAdapter - add bidResponse fields (#8252)
jpiros Apr 6, 2022
301c0aa
Adtelligent Bid Adapter: add JANet adapter alias (#8102)
GeneGenie Apr 7, 2022
5406273
Add DistroScale Bid Adapter (#8221)
duancg Apr 7, 2022
90b37c1
Prebid 6.19.0 release
prebidjs-release Apr 7, 2022
5530dc1
Increment version to 6.20.0-pre
prebidjs-release Apr 7, 2022
b85ec2e
PulsePoint Bid Adapter: Support for first party eid data (#8215)
anand-venkatraman Apr 7, 2022
30d5cae
video added to nexx360 (#8259)
gchicoye Apr 7, 2022
741538f
justPremium Bid Adapter : support for user sync pixels (#8249)
marcin15g Apr 7, 2022
5b391c0
bump ajv (#8268)
robertrmartinez Apr 8, 2022
fdfa7a2
Glimpse: update api, request shape, GDPR and CCPA, optimize and refac…
eddyu0 Apr 8, 2022
7d42e11
Loglylift Bid Adapter: add support for banners (#8270)
HashimotoLogly Apr 8, 2022
f2ab346
Documentation: PR-reviewer update (#8267)
bretg Apr 11, 2022
930b94d
Permutive RTD module: support IAB Audience taxonomy (#8242)
desbo Apr 11, 2022
81bf1a9
Triplelift Bid Adapter: deprecate getLegacyFpd (#8273)
nllerandi3lift Apr 11, 2022
498e760
appnexus bid adapter - add support for setConfig pageUrl (#8266)
jsnellbaker Apr 11, 2022
c9d7e87
appnexus bid adapter - support mediaTypes pos field (#8275)
jsnellbaker Apr 12, 2022
837105d
Mediasniper bidder adapter (#8199)
OlegRomanenko Apr 12, 2022
a6496f5
JustPremium: documentation update (#8277)
gsroka Apr 12, 2022
2d14b7d
Prebid Core: add documentResolver callback and allow the user to supp…
olafbuitelaar Apr 12, 2022
60cfe79
Build system: fix basic e2e tests (#8207)
dgirardi Apr 13, 2022
c6b10ec
Vibrant Media Bid Adapter: onBidWon pixel trigger (#8191)
sardusmatt Apr 13, 2022
8035272
UserID module: better initialization logic (#8201)
dgirardi Apr 14, 2022
2d5be3f
AdYouLike Bidder - Add size in video bid (#8282)
guiann Apr 14, 2022
d2fc7e9
Prebid 6.20.0 release
prebidjs-release Apr 14, 2022
5f9e40d
Increment version to 6.21.0-pre
prebidjs-release Apr 14, 2022
998e934
test endpoint was added (#8286)
mifanich Apr 15, 2022
f359b08
fix malltv adapter name (#8280)
puhiza-d Apr 18, 2022
c96722d
[:art:] fix: set minduration and maxduration to optional (#3) (#8290)
ramyferjaniadot Apr 18, 2022
d9465ed
AudienceRun Bid Adapter: Add Support for User Matching, Referer, … (#…
audiencerun Apr 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ aliases:

- &run_endtoend_test
name: BrowserStack End to end testing
command: echo "127.0.0.1 test.localhost" | sudo tee -a /etc/hosts && gulp e2e-test --host=test.localhost
command: gulp e2e-test

# Download and run BrowserStack local
- &setup_browserstack
Expand Down Expand Up @@ -82,15 +82,6 @@ workflows:
commit:
jobs:
- build
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- e2etest

experimental:
Expand Down
9 changes: 7 additions & 2 deletions PR_REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,16 @@ Follow steps above for general review process. In addition, please verify the fo
- If the adapter being submitted is an alias type, check with the bidder contact that is being aliased to make sure it's allowed.
- All bidder parameter conventions must be followed:
- Video params must be read from AdUnit.mediaTypes.video when available; however bidder config can override the ad unit.
- First party data must be read from [`fpd.context` and `fpd.user`](https://docs.prebid.org/dev-docs/publisher-api-reference.html#setConfig-fpd).
- First party data must be read from [getConfig('ortb2');](https://docs.prebid.org/dev-docs/publisher-api-reference/setConfig.html#setConfig-fpd).
- Adapters that accept a floor parameter must also support the [floors module](https://docs.prebid.org/dev-docs/modules/floors.html) -- look for a call to the `getFloor()` function.
- Adapters cannot accept an schain parameter. Rather, they must look for the schain parameter at bidRequest.schain.
- The bidRequest page referrer must checked in addition to any bidder-specific parameter.
- The bidderRequest.refererInfo.referer must be checked in addition to any bidder-specific parameter.
- If they're getting the COPPA flag, it must come from config.getConfig('coppa');
- Page position must come from bidrequest.mediaTypes.banner.pos or bidrequest.mediaTypes.video.pos
- Global OpenRTB fields should come from [getConfig('ortb2');](https://docs.prebid.org/dev-docs/publisher-api-reference/setConfig.html#setConfig-fpd):
- bcat, battr, badv
- Impression-specific OpenRTB fields should come from bidrequest.ortb2imp
- instl
- Below are some examples of bidder specific updates that should require docs update (in their dev-docs/bidders/BIDDER.md file):
- If they support the GDPR consentManagement module and TCF1, add `gdpr_supported: true`
- If they support the GDPR consentManagement module and TCF2, add `tcf2_supported: true`
Expand Down
123 changes: 52 additions & 71 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ 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;
const FAKE_SERVER_HOST = argv.host ? argv.host : 'localhost';
const FAKE_SERVER_PORT = 4444;
const INTEG_SERVER_HOST = argv.host ? argv.host : 'localhost';
const INTEG_SERVER_PORT = 4444;
const { spawn } = require('child_process');

// these modules must be explicitly listed in --modules to be included in the build, won't be part of "all" modules
Expand Down Expand Up @@ -167,9 +167,9 @@ function gulpBundle(dev) {
return bundle(dev).pipe(gulp.dest('build/' + (dev ? 'dev' : 'dist')));
}

function nodeBundle(modules) {
function nodeBundle(modules, dev = false) {
return new Promise((resolve, reject) => {
bundle(false, modules)
bundle(dev, modules)
.on('error', (err) => {
reject(err);
})
Expand Down Expand Up @@ -243,41 +243,18 @@ function testTaskMaker(options = {}) {
if (options.notest) {
done();
} else if (options.e2e) {
let wdioCmd = path.join(__dirname, 'node_modules/.bin/wdio');
let wdioConf = path.join(__dirname, 'wdio.conf.js');
let wdioOpts;

if (options.file) {
wdioOpts = [
wdioConf,
`--spec`,
`${options.file}`
]
} else {
wdioOpts = [
wdioConf
];
}

// run fake-server
const fakeServer = spawn('node', ['./test/fake-server/index.js', `--port=${FAKE_SERVER_PORT}`]);
fakeServer.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
});
fakeServer.stderr.on('data', (data) => {
console.log(`stderr: ${data}`);
});

execa(wdioCmd, wdioOpts, { stdio: 'inherit' })
const integ = startIntegServer();
startLocalServer();
runWebdriver(options)
.then(stdout => {
// kill fake server
fakeServer.kill('SIGINT');
integ.kill('SIGINT');
done();
process.exit(0);
})
.catch(err => {
// kill fake server
fakeServer.kill('SIGINT');
integ.kill('SIGINT');
done(new Error(`Tests failed with error: ${err}`));
process.exit(1);
});
Expand All @@ -296,6 +273,26 @@ function testTaskMaker(options = {}) {

const test = testTaskMaker();

function runWebdriver({file}) {
process.env.TEST_SERVER_HOST = argv.host || 'localhost';
let wdioCmd = path.join(__dirname, 'node_modules/.bin/wdio');
let wdioConf = path.join(__dirname, 'wdio.conf.js');
let wdioOpts;

if (file) {
wdioOpts = [
wdioConf,
`--spec`,
`${file}`
]
} else {
wdioOpts = [
wdioConf
];
}
return execa(wdioCmd, wdioOpts, { stdio: 'inherit' });
}

function newKarmaCallback(done) {
return function (exitCode) {
if (exitCode) {
Expand Down Expand Up @@ -335,41 +332,29 @@ function buildPostbid() {
.pipe(gulp.dest('build/postbid/'));
}

function setupE2e(done) {
if (!argv.host) {
throw new gutil.PluginError({
plugin: 'E2E test',
message: gutil.colors.red('Host should be defined e.g. ap.localhost, anlocalhost. localhost cannot be used as safari browserstack is not able to connect to localhost')
});
function startIntegServer(dev = false) {
const args = ['./test/fake-server/index.js', `--port=${INTEG_SERVER_PORT}`, `--host=${INTEG_SERVER_HOST}`];
if (dev) {
args.push('--dev=true')
}
process.env.TEST_SERVER_HOST = argv.host;
if (argv.https) {
process.env.TEST_SERVER_PROTOCOL = argv.https;
}
argv.e2e = true;
done();
}

function injectFakeServerEndpoint() {
return gulp.src(['build/dist/*.js'])
.pipe(replace('https://ib.adnxs.com/ut/v3/prebid', `http://${FAKE_SERVER_HOST}:${FAKE_SERVER_PORT}`))
.pipe(gulp.dest('build/dist'));
}

function injectFakeServerEndpointDev() {
return gulp.src(['build/dev/*.js'])
.pipe(replace('https://ib.adnxs.com/ut/v3/prebid', `http://${FAKE_SERVER_HOST}:${FAKE_SERVER_PORT}`))
.pipe(gulp.dest('build/dev'));
}

function startFakeServer() {
const fakeServer = spawn('node', ['./test/fake-server/index.js', `--port=${FAKE_SERVER_PORT}`]);
fakeServer.stdout.on('data', (data) => {
const srv = spawn('node', args);
srv.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
});
fakeServer.stderr.on('data', (data) => {
srv.stderr.on('data', (data) => {
console.log(`stderr: ${data}`);
});
return srv;
}

function startLocalServer(options = {}) {
connect.server({
https: argv.https,
port: port,
host: INTEG_SERVER_HOST,
root: './',
livereload: options.livereload
});
}

// Watch Task with Live Reload
Expand All @@ -385,13 +370,7 @@ function watchTaskMaker(options = {}) {
'modules/**/*.js',
].concat(options.alsoWatch));

connect.server({
https: argv.https,
port: port,
host: FAKE_SERVER_HOST,
root: './',
livereload: options.livereload
});
startLocalServer(options);

mainWatcher.on('all', options.task());
done();
Expand Down Expand Up @@ -427,11 +406,13 @@ gulp.task('build-postbid', gulp.series(escapePostbidConfig, buildPostbid));
gulp.task('serve', gulp.series(clean, lint, gulp.parallel('build-bundle-dev', watch, test)));
gulp.task('serve-fast', gulp.series(clean, gulp.parallel('build-bundle-dev', watchFast)));
gulp.task('serve-and-test', gulp.series(clean, gulp.parallel('build-bundle-dev', watchFast, testTaskMaker({watch: true}))));
gulp.task('serve-fake', gulp.series(clean, gulp.parallel('build-bundle-dev', watch), injectFakeServerEndpointDev, test, startFakeServer));
gulp.task('serve-e2e', gulp.series(clean, 'build-bundle-prod', gulp.parallel(() => startIntegServer(), startLocalServer)))
gulp.task('serve-e2e-dev', gulp.series(clean, 'build-bundle-dev', gulp.parallel(() => startIntegServer(true), startLocalServer)))

gulp.task('default', gulp.series(clean, 'build-bundle-prod'));

gulp.task('e2e-test', gulp.series(clean, setupE2e, gulp.parallel('build-bundle-prod', watch), injectFakeServerEndpoint, test));
gulp.task('e2e-test-only', () => runWebdriver({file: argv.file}))
gulp.task('e2e-test', gulp.series(clean, 'build-bundle-prod', testTaskMaker({e2e: true})));
// other tasks
gulp.task(bundleToStdout);
gulp.task('bundle', gulpBundle.bind(null, false)); // used for just concatenating pre-built files with no build step
Expand Down
29 changes: 22 additions & 7 deletions integrationExamples/gpt/permutiveRtdProvider_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
}
},
bids: [
{
bidder: 'ix',
params: {
siteId: '123456',
}
},
{
bidder: 'appnexus',
params: {
Expand Down Expand Up @@ -135,15 +141,28 @@
pbjs.que.push(function() {
pbjs.setConfig({
debug: true,
pageUrl: 'http://www.test.com/test.html',
realTimeData: {
auctionDelay: 80, // maximum time for RTD modules to respond
dataProviders: [
{
name: 'permutive',
waitForIt: true,
params: {
acBidders: ['appnexus', 'rubicon', 'ozone', 'trustx'],
acBidders: ['appnexus', 'rubicon', 'ozone', 'trustx', 'ix'],
maxSegs: 500,
transformations: [
{
id: 'iab',
config: {
segtax: 4,
iabIds: {
1000001: '777777',
1000002: '888888'
}
}
}
],
overwrites: {
rubicon: function (bid, data, acEnabled, utils, defaultFn) {
if (defaultFn){
Expand All @@ -160,7 +179,7 @@
}
});
pbjs.setBidderConfig({
bidders: ['appnexus', 'rubicon'],
bidders: ['appnexus', 'rubicon', 'ix'],
config: {
ortb2: {
site: {
Expand All @@ -180,13 +199,9 @@
gender: 'm',
keywords: 'a,b',
data: [
{
name: 'www.dataprovider1.com',
ext: { taxonomyname: 'iab_audience_taxonomy' },
segment: [{ id: '687' }, { id: '123' }]
},
{
name: 'permutive.com',
ext: { segtax: 6 },
segment: [{ id: '1' }]
}
]
Expand Down
2 changes: 1 addition & 1 deletion modules/adotBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const BIDDER_CODE = 'adot';
const ADAPTER_VERSION = 'v2.0.0';
const BID_METHOD = 'POST';
const BIDDER_URL = 'https://dsp.adotmob.com/headerbidding{PUBLISHER_PATH}/bidrequest';
const REQUIRED_VIDEO_PARAMS = ['mimes', 'minduration', 'maxduration', 'protocols'];
const REQUIRED_VIDEO_PARAMS = ['mimes', 'protocols'];
const DOMAIN_REGEX = new RegExp('//([^/]*)');
const FIRST_PRICE = 1;
const IMP_BUILDER = { banner: buildBanner, video: buildVideo, native: buildNative };
Expand Down
3 changes: 2 additions & 1 deletion modules/adtelligentBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const HOST_GETTERS = {
onefiftytwomedia: () => 'ghb.ads.152media.com',
bidsxchange: () => 'ghb.hbd.bidsxchange.com',
streamkey: () => 'ghb.hb.streamkey.net',
janet: () => 'ghb.bidder.jmgads.com',
}
const getUri = function (bidderCode) {
let bidderWithoutSuffix = bidderCode.split('_')[0];
Expand All @@ -35,7 +36,7 @@ const syncsCache = {};
export const spec = {
code: BIDDER_CODE,
gvlid: 410,
aliases: ['onefiftytwomedia', 'selectmedia', 'appaloosa', 'bidsxchange', 'streamkey',
aliases: ['onefiftytwomedia', 'selectmedia', 'appaloosa', 'bidsxchange', 'streamkey', 'janet',
{ code: 'navelix', gvlid: 380 }
],
supportedMediaTypes: [VIDEO, BANNER],
Expand Down
2 changes: 2 additions & 0 deletions modules/adyoulikeBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ function createBid(response, bidRequests) {
// retreive video response if present
const vast64 = response.Vast || getVideoAd(response);
if (vast64) {
bid.width = response.Width;
bid.height = response.Height;
bid.vastXml = window.atob(vast64);
bid.mediaType = 'video';
} else if (request.Native) {
Expand Down
Loading