Skip to content

Commit 19a7089

Browse files
authored
Merge branch 'master' into visual-html-editor
2 parents cf7cb39 + 1fe4384 commit 19a7089

File tree

388 files changed

+6986
-3685
lines changed

Some content is hidden

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

388 files changed

+6986
-3685
lines changed

Gemfile.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ GEM
119119
webrick (1.8.1)
120120

121121
PLATFORMS
122+
x86_64-darwin-19
122123
x86_64-darwin-20
123124

124125
DEPENDENCIES
@@ -139,4 +140,4 @@ DEPENDENCIES
139140
wdm (~> 0.1.0)
140141

141142
BUNDLED WITH
142-
2.2.2
143+
2.2.18

scripts/catalog_papi.js

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ PAPI_URL = "https://api.segmentapis.com"
1313

1414
const regionalSupport = yaml.load(fs.readFileSync(path.resolve(__dirname, `../src/_data/regional-support.yml`)))
1515
const slugOverrides = yaml.load(fs.readFileSync(path.resolve(__dirname, `../src/_data/catalog/slugs.yml`)))
16-
16+
const testSources = yaml.load(fs.readFileSync(path.resolve(__dirname, `../src/_data/catalog/test_sources.yml`)))
1717

1818
const slugify = (displayName, type) => {
1919
let slug = displayName
@@ -27,11 +27,11 @@ const slugify = (displayName, type) => {
2727
let overrides = ""
2828
if (type == "sources") {
2929
overrides = slugOverrides.sources
30-
}
30+
}
3131

3232
if (type == "destinations") {
3333
overrides = slugOverrides.destinations
34-
}
34+
}
3535

3636
for (key in overrides) {
3737
let original = overrides[key].original
@@ -223,6 +223,7 @@ const updateSources = async () => {
223223
let endpoints = ['us']
224224
let mainCategory = source.categories[0] ? source.categories[0].toLowerCase() : ''
225225

226+
226227
// determine the doc url based on the source's main category
227228
if (libraryCategories.includes(mainCategory)) {
228229
url = `connections/sources/catalog/libraries/${mainCategory}/${slug}`
@@ -256,27 +257,37 @@ const updateSources = async () => {
256257
}
257258

258259
// create the catalog metadata
259-
let updatedSource = {
260-
id: source.id,
261-
display_name: source.name,
262-
isCloudEventSource: source.isCloudEventSource,
263-
slug,
264-
url,
265-
hidden: isCatalogItemHidden(url),
266-
regions,
267-
endpoints,
268-
source_type: mainCategory,
269-
description: source.description,
270-
logo: {
271-
url: source.logos.default
272-
},
273-
// mark: {
274-
// url: source.logos.mark
275-
// },
276-
categories: source.categories,
260+
// A lot of test sources are visible in the catalog. We filter them out here.
261+
// If they aren't in the testSources array, we add them to the catalog.
262+
if (testSources.includes(source.id)) {
263+
console.log(`skipped ${source.name}`)
264+
} else {
265+
let updatedSource = {
266+
id: source.id,
267+
display_name: source.name,
268+
isCloudEventSource: source.isCloudEventSource,
269+
slug,
270+
url,
271+
hidden: isCatalogItemHidden(url),
272+
regions,
273+
endpoints,
274+
source_type: mainCategory,
275+
description: source.description,
276+
logo: {
277+
url: source.logos.default
278+
},
279+
// mark: {
280+
// url: source.logos.mark
281+
// },
282+
categories: source.categories,
283+
}
284+
sourcesUpdated.push(updatedSource)
285+
doesCatalogItemExist(updatedSource)
286+
277287
}
278-
sourcesUpdated.push(updatedSource)
279-
doesCatalogItemExist(updatedSource)
288+
289+
290+
280291
source.categories.reduce((s, e) => s.add(e), categories);
281292

282293
let updatedRegional = {

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-06-01
2+
# destination categories last updated 2023-06-22
33
items:
44
- display_name: A/B Testing
55
slug: a-b-testing

0 commit comments

Comments
 (0)