Skip to content

Merge pull request #569 from PubMatic/UOE-11010#575

Open
pm-nitin-shirsat wants to merge 189 commits intoUOE-11674from
nightly
Open

Merge pull request #569 from PubMatic/UOE-11010#575
pm-nitin-shirsat wants to merge 189 commits intoUOE-11674from
nightly

Conversation

@pm-nitin-shirsat
Copy link

17th Dec release - Bid pooling

pm-nitin-shirsat and others added 30 commits October 10, 2024 23:04
17th Dec release - Bid pooling
Sync with nightly and taking phase 1.5 changes
{ regex: /fxios\/([-\w\.]+)/i, id: 5 }, // Firefox for iOS
{ regex: /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i, id: 6 }, // Facebook In-App Browser
{ regex: / wv\).+(chrome)\/([\w\.]+)/i, id: 7 }, // Chrome WebView
{ regex: /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i, id: 8 }, // Android Browser
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Unnecessary escape character: ..

Suggested change
{ regex: /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i, id: 8 }, // Android Browser
{ regex: /droid.+ version\/([\w.]+)\b.+(?:mobile safari|safari)/i, id: 8 }, // Android Browser

// ===========================================
var ConsentConstants = {
DEFAULT_CMP_LOOK_UP_TIMEOUT: 1000,
CONTINUOUS_CMP_CHECK_TIMEOUT: 15000,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 1 tab but found 2 spaces.

Suggested change
CONTINUOUS_CMP_CHECK_TIMEOUT: 15000,
CONTINUOUS_CMP_CHECK_TIMEOUT: 15000,

65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90];
exports.REGEX_BROWSERS = [
{ regex: /\b(?:crios)\/([\w\.]+)/i, id: 1 }, // Chrome for iOS
{ regex: /(edg|edge)(?:e|ios|a)?(?:\/([\w\.]+))?/i, id: 2 }, // Edge
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Unnecessary escape character: ..

Suggested change
{ regex: /(edg|edge)(?:e|ios|a)?(?:\/([\w\.]+))?/i, id: 2 }, // Edge
{ regex: /(edg|edge)(?:e|ios|a)?(?:\/([\w.]+))?/i, id: 2 }, // Edge

config.callbackFunctions.push(callbackFn);
},
getComplianceSupport: function () {
return config.complianceSupport;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 4 tabs but found 8 spaces.

Suggested change
return config.complianceSupport;
return config.complianceSupport;

return config.complianceSupport;
},
getPrebidCMConfig: function () {
return config.prebidCMConfig;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 4 tabs but found 8 spaces.

Suggested change
return config.prebidCMConfig;
return config.prebidCMConfig;

{ regex: /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i, id: 6 }, // Facebook In-App Browser
{ regex: / wv\).+(chrome)\/([\w\.]+)/i, id: 7 }, // Chrome WebView
{ regex: /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i, id: 8 }, // Android Browser
{ regex: /(chrome|crios)(?:\/v?([\w\.]+))?\b/i, id: 9 }, // Chrome
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Unnecessary escape character: ..

Suggested change
{ regex: /(chrome|crios)(?:\/v?([\w\.]+))?\b/i, id: 9 }, // Chrome
{ regex: /(chrome|crios)(?:\/v?([\w.]+))?\b/i, id: 9 }, // Chrome

cmpId: 0, // CMP ID: Consent Management Platform Id, default - 0
enforcedConsentBasisOn: ConsentConstants.CONSENT_MANAGEMENT_SOURCE.NONE, // This will be used to enforce the consent basis on Possible values: 1 (CMP), 2 (GEO), 0 (NONE)
readGeoDataFrom: ConsentConstants.READ_GEO_DATA_FROM.NONE, // This will be used to identify the source of geo data read from Possible values: 1 (LOCALSTORAGE), 2 (GEO_SERVICE), 0 (NONE)
geoInfo: { // This will be used to store the geo information
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 4 tabs but found 8 spaces.

Suggested change
geoInfo: { // This will be used to store the geo information
geoInfo: { // This will be used to store the geo information

{ regex: /\b(?:crios)\/([\w\.]+)/i, id: 1 }, // Chrome for iOS
{ regex: /(edg|edge)(?:e|ios|a)?(?:\/([\w\.]+))?/i, id: 2 }, // Edge
{ regex: /(opera|opr)(?:.+version\/|[\/ ]+)([\w\.]+)/i, id: 3 }, // Opera
{ regex: /(?:ms|\()(ie) ([\w\.]+)|(?:trident\/[\w\.]+)/i, id: 4 }, // Internet Explorer
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Unnecessary escape character: ..

Suggested change
{ regex: /(?:ms|\()(ie) ([\w\.]+)|(?:trident\/[\w\.]+)/i, id: 4 }, // Internet Explorer
{ regex: /(?:ms|\()(ie) ([\w.]+)|(?:trident\/[\w\.]+)/i, id: 4 }, // Internet Explorer

NONE: "NONE"
};
function createInstance() {
function getConfig() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 2 tabs but found 4 spaces.

Suggested change
function getConfig() {
function getConfig() {

*/
function getKeyByValue(obj, value) {
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Do not access Object.prototype method 'hasOwnProperty' from target object.

Suggested change
if (obj.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {

geoMatchWithCMP: 2, // This will be used to identify the geo match with CMP Possible values: 0 - Not Matched,1 - Matched, 2 - Not Concluded(default)
prebidCMConfig: {}, // This will be used to apply the consentManagement config to the Prebid instance
callbackFunctions: [], // Functions to be called after the process is completed
continuousCmpCheck: {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 4 tabs but found 8 spaces.

Suggested change
continuousCmpCheck: {
continuousCmpCheck: {

getComplianceSupport: function () {
return config.complianceSupport;
},
getPrebidCMConfig: function () {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 3 tabs but found 6 spaces.

Suggested change
getPrebidCMConfig: function () {
getPrebidCMConfig: function () {

CMP: 1,
GEO: 2,
NONE: 0
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 1 tab but found 2 spaces.

Suggested change
},
},

{ regex: /version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i, id: 10 }, // Safari Mobile
{ regex: /version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i, id: 11 }, // Safari
{ regex: /(firefox)\/([\w\.]+)/i, id: 12 } // Firefox
];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 0 tabs but found 2 spaces.

Suggested change
];
];

},
READ_GEO_DATA_FROM: { // 1 -> LOCALSTORAGE, 2 -> GEO_SERVICE, 0 -> NONE
LOCALSTORAGE: 1,
GEO_SERVICE: 2,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 2 tabs but found 4 spaces.

Suggested change
GEO_SERVICE: 2,
GEO_SERVICE: 2,

USP: 2,
GPP: 3
},
READ_GEO_DATA_FROM: { // 1 -> LOCALSTORAGE, 2 -> GEO_SERVICE, 0 -> NONE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 1 tab but found 2 spaces.

Suggested change
READ_GEO_DATA_FROM: { // 1 -> LOCALSTORAGE, 2 -> GEO_SERVICE, 0 -> NONE
READ_GEO_DATA_FROM: { // 1 -> LOCALSTORAGE, 2 -> GEO_SERVICE, 0 -> NONE

gsId: undefined // GPP section ID
},
geoMatchWithCMP: 2, // This will be used to identify the geo match with CMP Possible values: 0 - Not Matched,1 - Matched, 2 - Not Concluded(default)
prebidCMConfig: {}, // This will be used to apply the consentManagement config to the Prebid instance
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 4 tabs but found 8 spaces.

Suggested change
prebidCMConfig: {}, // This will be used to apply the consentManagement config to the Prebid instance
prebidCMConfig: {}, // This will be used to apply the consentManagement config to the Prebid instance

callbackFunctions: [], // Functions to be called after the process is completed
continuousCmpCheck: {
enabled: false, // Continuous CMP checking enabled
timeout: ConsentConstants.CONTINUOUS_CMP_CHECK_TIMEOUT, // Continuous CMP checking timeout
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 5 tabs but found 10 spaces.

Suggested change
timeout: ConsentConstants.CONTINUOUS_CMP_CHECK_TIMEOUT, // Continuous CMP checking timeout
timeout: ConsentConstants.CONTINUOUS_CMP_CHECK_TIMEOUT, // Continuous CMP checking timeout

};
function createInstance() {
function getConfig() {
return {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 3 tabs but found 6 spaces.

Suggested change
return {
return {

complianceSupport: [], // CMP's compliance supported, 1: GDPR, 2: USP, 3: GPP
cmpId: 0, // CMP ID: Consent Management Platform Id, default - 0
enforcedConsentBasisOn: ConsentConstants.CONSENT_MANAGEMENT_SOURCE.NONE, // This will be used to enforce the consent basis on Possible values: 1 (CMP), 2 (GEO), 0 (NONE)
readGeoDataFrom: ConsentConstants.READ_GEO_DATA_FROM.NONE, // This will be used to identify the source of geo data read from Possible values: 1 (LOCALSTORAGE), 2 (GEO_SERVICE), 0 (NONE)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 4 tabs but found 8 spaces.

Suggested change
readGeoDataFrom: ConsentConstants.READ_GEO_DATA_FROM.NONE, // This will be used to identify the source of geo data read from Possible values: 1 (LOCALSTORAGE), 2 (GEO_SERVICE), 0 (NONE)
readGeoDataFrom: ConsentConstants.READ_GEO_DATA_FROM.NONE, // This will be used to identify the source of geo data read from Possible values: 1 (LOCALSTORAGE), 2 (GEO_SERVICE), 0 (NONE)

exports.BROWSER_MAPPING = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,
65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90];
exports.REGEX_BROWSERS = [
{ regex: /\b(?:crios)\/([\w\.]+)/i, id: 1 }, // Chrome for iOS
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Unnecessary escape character: ..

Suggested change
{ regex: /\b(?:crios)\/([\w\.]+)/i, id: 1 }, // Chrome for iOS
{ regex: /\b(?:crios)\/([\w.]+)/i, id: 1 }, // Chrome for iOS

}
};
}
var config = getConfig();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 2 tabs but found 4 spaces.

Suggested change
var config = getConfig();
var config = getConfig();

bidderOrderingEnabled: "0"
bidderOrderingEnabled: "0",
cmEnabled: "1",
cmCmpApi: "iab",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 1 tab but found 2 spaces.

Suggested change
cmCmpApi: "iab",
cmCmpApi: "iab",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants