Skip to content

Commit 00916cb

Browse files
author
markzegarelli
authored
Push screen method into supportedMethods (#4274)
1 parent 3e6314d commit 00916cb

File tree

3 files changed

+30
-11
lines changed

3 files changed

+30
-11
lines changed

scripts/catalog_papi.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const slugify = (displayName) => {
2929
let override = slugOverrides[key].override
3030

3131
if (slug == original) {
32-
console.log(original+" -> "+override)
32+
console.log(original + " -> " + override)
3333
slug = override
3434
}
3535
}
@@ -308,7 +308,7 @@ const updateSources = async () => {
308308
}, options);
309309
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/source_categories.yml`), output);
310310

311-
311+
312312
// output = "# AUTOGENERATED LIST OF CONNECTIONS THAT SUPPORT REGIONAL\n"
313313
// output += "# Last updated " + todayDate + " \n";
314314
output = yaml.dump({
@@ -342,8 +342,8 @@ const updateDestinations = async () => {
342342
return 0;
343343
})
344344

345-
const regionalDestinationEndpoints= regionalSupport.destinations.endpoint
346-
const regionalDestinationRegions= regionalSupport.destinations.region
345+
const regionalDestinationEndpoints = regionalSupport.destinations.endpoint
346+
const regionalDestinationRegions = regionalSupport.destinations.region
347347

348348

349349
destinations.forEach(destination => {
@@ -359,7 +359,7 @@ const updateDestinations = async () => {
359359
if (regionalDestinationRegions.includes(slug)) {
360360
regions.push('eu')
361361
}
362-
362+
363363

364364
let url = `connections/destinations/catalog/${slug}`
365365

@@ -405,6 +405,13 @@ const updateDestinations = async () => {
405405
return clonedObj;
406406
};
407407

408+
409+
// Force screen method into supportedMethods object
410+
destination.supportedMethods.screen = false
411+
// Set it true for LiveLike, per request
412+
if (destination.id == '63e42b47479274407b671071') {
413+
destination.supportedMethods.screen = true
414+
}
408415
destination.supportedMethods = renameKey(destination.supportedMethods, 'pageview', 'page')
409416

410417
let updatedDestination = {
@@ -498,7 +505,7 @@ const updateDestinations = async () => {
498505
}, {
499506
noArrayIndent: false
500507
})
501-
fs.appendFileSync(path.resolve(__dirname,`../src/_data/catalog/regional-supported.yml`),output);
508+
fs.appendFileSync(path.resolve(__dirname, `../src/_data/catalog/regional-supported.yml`), output);
502509
console.log("destinations done")
503510
}
504511

@@ -585,10 +592,9 @@ const updateWarehouses = async () => {
585592
}, {
586593
noArrayIndent: false
587594
})
588-
fs.writeFileSync(path.resolve(__dirname,`../src/_data/catalog/regional-supported.yml`),output);
595+
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/regional-supported.yml`), output);
589596
console.log("warehouses done")
590597
}
591598
updateWarehouses()
592599
updateSources()
593600
updateDestinations()
594-

scripts/private-destination.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ const getDestinationData = async (id) => {
7070
let actions = destination.actions
7171
let presets = destination.presets
7272

73-
73+
// Force screen method into supportedMethods object
74+
destination.supportedMethods.screen = false
75+
// Set it true for LiveLike, per request
76+
if (destination.id == '63e42b47479274407b671071'){
77+
destination.supportedMethods.screen = true
78+
}
7479

7580
let updatePrivateDest = {
7681
id: destination.id,

src/_data/catalog/destinations_private.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
# destination data last updated 2023-02-21
2+
# destination data last updated 2023-02-22
33
items:
44
- id: 62b256147cbb49302d1486d0
55
display_name: Heap Web (Actions)
@@ -19,6 +19,7 @@ items:
1919
identify: true
2020
group: true
2121
alias: true
22+
screen: false
2223
platforms:
2324
browser: true
2425
mobile: false
@@ -184,6 +185,7 @@ items:
184185
identify: true
185186
group: true
186187
alias: true
188+
screen: false
187189
platforms:
188190
browser: true
189191
mobile: false
@@ -294,6 +296,7 @@ items:
294296
identify: true
295297
group: true
296298
alias: true
299+
screen: false
297300
platforms:
298301
browser: true
299302
mobile: false
@@ -370,6 +373,7 @@ items:
370373
identify: true
371374
group: true
372375
alias: true
376+
screen: false
373377
platforms:
374378
browser: true
375379
mobile: false
@@ -507,6 +511,7 @@ items:
507511
identify: true
508512
group: true
509513
alias: true
514+
screen: false
510515
platforms:
511516
browser: true
512517
mobile: false
@@ -885,6 +890,7 @@ items:
885890
identify: true
886891
group: true
887892
alias: true
893+
screen: false
888894
platforms:
889895
browser: true
890896
mobile: false
@@ -1534,6 +1540,7 @@ items:
15341540
identify: true
15351541
group: true
15361542
alias: true
1543+
screen: false
15371544
platforms:
15381545
browser: true
15391546
mobile: false
@@ -2405,9 +2412,10 @@ items:
24052412
methods:
24062413
track: true
24072414
pageview: true
2408-
identify: true
2415+
identify: false
24092416
group: false
24102417
alias: false
2418+
screen: true
24112419
platforms:
24122420
browser: true
24132421
mobile: false

0 commit comments

Comments
 (0)