Skip to content

Commit 97fcd6f

Browse files
authored
Merge branch 'master' into Functions-Versioning
2 parents 91090c4 + bc79211 commit 97fcd6f

File tree

234 files changed

+16089
-9753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+16089
-9753
lines changed

.github/styles/Vocab/Docs/accept.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
(?:P|p)endo
1313
(?:P|p)odfile
1414
(?:P|p)ostgres
15+
(?:R|r)ealtime
1516
(?:R|r)emarketing
1617
(?:U|u)nlinks?\b
1718
(?:U|u)nmaps?\b
@@ -51,6 +52,7 @@ deeplink
5152
Dev
5253
Doubleclick
5354
Eloqua
55+
Emarsys
5456
enablement
5557
endcapture
5658
endfor
@@ -72,6 +74,7 @@ https
7274
HTTPS
7375
Hubspot
7476
incrementality
77+
Innovid
7578
ios
7679
iOS
7780
Iterable
@@ -110,6 +113,7 @@ Okta
110113
Omnichannel
111114
onboarding
112115
Optimizely
116+
Outfunnel
113117
param(:?s)
114118
Pardot
115119
Passcode
@@ -119,6 +123,7 @@ Pipedrive
119123
Preact
120124
Qualtrics
121125
reformat(:?s)
126+
remarket
122127
Responsys
123128
Rokt
124129
Sabil

scripts/catalog_papi.js

Lines changed: 69 additions & 68 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
}
@@ -71,41 +71,56 @@ const getConnectionModes = (destination) => {
7171
server: false
7272
},
7373
}
74-
destination.components.forEach(component => {
75-
switch (component.type) {
76-
case 'IOS':
77-
connectionModes.device.mobile = true
78-
break
79-
case 'ANDROID':
80-
connectionModes.device.mobile = true
81-
break
82-
case 'BROWSER':
83-
if (destination.browserUnbundling) {
84-
connectionModes.cloud.web = true
85-
}
86-
connectionModes.device.web = true
87-
break
88-
case 'SERVER':
89-
connectionModes.cloud.mobile = true
90-
if (destination.platforms.server) {
91-
connectionModes.cloud.server = true
92-
}
93-
if (destination.platforms.browser) {
94-
connectionModes.cloud.web = true
95-
}
96-
break
97-
case 'CLOUD':
98-
connectionModes.cloud.mobile = true
99-
if (destination.platforms.server) {
100-
connectionModes.cloud.server = true
101-
}
102-
if (destination.platforms.browser) {
103-
connectionModes.cloud.web = true
104-
}
105-
break
10674

75+
// if destination has device specific components
76+
if (destination.components.length) {
77+
destination.components.forEach(component => {
78+
switch (component.type) {
79+
case 'IOS':
80+
connectionModes.device.mobile = true
81+
break
82+
case 'ANDROID':
83+
connectionModes.device.mobile = true
84+
break
85+
case 'BROWSER':
86+
if (destination.browserUnbundling) {
87+
connectionModes.cloud.web = true
88+
}
89+
connectionModes.device.web = true
90+
break
91+
case 'SERVER':
92+
connectionModes.cloud.mobile = true
93+
if (destination.platforms.server) {
94+
connectionModes.cloud.server = true
95+
}
96+
if (destination.platforms.browser) {
97+
connectionModes.cloud.web = true
98+
}
99+
break
100+
case 'CLOUD':
101+
connectionModes.cloud.mobile = true
102+
if (destination.platforms.server) {
103+
connectionModes.cloud.server = true
104+
}
105+
if (destination.platforms.browser) {
106+
connectionModes.cloud.web = true
107+
}
108+
break
109+
}
110+
})
111+
// if destination has no device specific components, check for supported platforms
112+
} else {
113+
if (destination.platforms.browser) {
114+
connectionModes.cloud.web = true
107115
}
108-
})
116+
if (destination.platforms.mobile) {
117+
connectionModes.cloud.mobile = true
118+
}
119+
if (destination.platforms.server) {
120+
connectionModes.cloud.server = true
121+
}
122+
}
123+
109124
return connectionModes
110125
}
111126

@@ -308,7 +323,7 @@ const updateSources = async () => {
308323
}, options);
309324
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/source_categories.yml`), output);
310325

311-
326+
312327
// output = "# AUTOGENERATED LIST OF CONNECTIONS THAT SUPPORT REGIONAL\n"
313328
// output += "# Last updated " + todayDate + " \n";
314329
output = yaml.dump({
@@ -321,7 +336,6 @@ const updateSources = async () => {
321336
const updateDestinations = async () => {
322337
let destinations = []
323338
let destinationsUpdated = []
324-
let regionalDestinationsUpdated = []
325339
let destinationCategories = []
326340
let categories = new Set()
327341
let nextPageToken = "MA=="
@@ -342,25 +356,23 @@ const updateDestinations = async () => {
342356
return 0;
343357
})
344358

345-
const regionalDestinationEndpoints= regionalSupport.destinations.endpoint
346-
const regionalDestinationRegions= regionalSupport.destinations.region
347-
348359

349360
destinations.forEach(destination => {
350-
let endpoints = ['us']
351-
let regions = ['us']
361+
let endpoints = []
362+
let regions = []
352363

353364
let slug = slugify(destination.name)
354-
355-
if (regionalDestinationEndpoints.includes(slug)) {
356-
endpoints.push('eu')
365+
366+
if (typeof destination.supportedRegions != "undefined") {
367+
regions = destination.supportedRegions
368+
} else {
369+
regions.push('us-west-2','eu-west-1')
357370
}
358-
359-
if (regionalDestinationRegions.includes(slug)) {
360-
regions.push('eu')
371+
if (typeof destination.regionEndpoints != "undefined"){
372+
endpoints = destination.regionEndpoints
373+
} else {
374+
endpoints.push('US')
361375
}
362-
363-
364376
let url = `connections/destinations/catalog/${slug}`
365377

366378
let tempCategories = [destination.categories]
@@ -405,6 +417,13 @@ const updateDestinations = async () => {
405417
return clonedObj;
406418
};
407419

420+
421+
// Force screen method into supportedMethods object
422+
destination.supportedMethods.screen = false
423+
// Set it true for LiveLike, per request
424+
if (destination.id == '63e42b47479274407b671071') {
425+
destination.supportedMethods.screen = true
426+
}
408427
destination.supportedMethods = renameKey(destination.supportedMethods, 'pageview', 'page')
409428

410429
let updatedDestination = {
@@ -441,16 +460,6 @@ const updateDestinations = async () => {
441460
doesCatalogItemExist(updatedDestination)
442461
tempCategories.reduce((s, e) => s.add(e), categories)
443462

444-
let updatedRegionalDestination = {
445-
id: destination.id,
446-
display_name: destination.name,
447-
slug,
448-
url,
449-
regions,
450-
endpoints
451-
}
452-
453-
regionalDestinationsUpdated.push(updatedRegionalDestination)
454463
})
455464

456465

@@ -492,13 +501,6 @@ const updateDestinations = async () => {
492501
}, options);
493502
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destination_categories.yml`), output);
494503

495-
// Append regional destinations to regional file
496-
output = yaml.dump({
497-
destinations: regionalDestinationsUpdated
498-
}, {
499-
noArrayIndent: false
500-
})
501-
fs.appendFileSync(path.resolve(__dirname,`../src/_data/catalog/regional-supported.yml`),output);
502504
console.log("destinations done")
503505
}
504506

@@ -585,10 +587,9 @@ const updateWarehouses = async () => {
585587
}, {
586588
noArrayIndent: false
587589
})
588-
fs.writeFileSync(path.resolve(__dirname,`../src/_data/catalog/regional-supported.yml`),output);
590+
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/regional-supported.yml`), output);
589591
console.log("warehouses done")
590592
}
591593
updateWarehouses()
592594
updateSources()
593595
updateDestinations()
594-

scripts/private-destination.js

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

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+
}
79+
80+
const clone = (obj) => Object.assign({}, obj)
81+
const renameKey = (object, key, newKey) => {
82+
const clonedObj = clone(object);
83+
const targetKey = clonedObj[key];
84+
delete clonedObj[key];
85+
86+
clonedObj[newKey] = targetKey;
87+
return clonedObj;
88+
};
7389

90+
destination.supportedMethods = renameKey(destination.supportedMethods, 'pageview', 'page')
7491

7592
let updatePrivateDest = {
7693
id: destination.id,

src/_data/catalog/destination_categories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
# destination categories last updated 2023-02-16
2+
# destination categories last updated 2023-03-28
33
items:
44
- display_name: A/B Testing
55
slug: a-b-testing

0 commit comments

Comments
 (0)