Skip to content

Commit 2bac744

Browse files
authored
Merge pull request #2634 from segmentio/develop
Release 22.12.1
2 parents 0ec34c5 + f99bb60 commit 2bac744

File tree

16 files changed

+5260
-2230
lines changed

16 files changed

+5260
-2230
lines changed

_config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ incremental: true
88

99
permalink: /:categories/:title/
1010

11+
include: ['_redirects']
12+
1113
exclude: ['js', '_site', '*.sketch']
1214
# Build settings
1315
os_links: true

scripts/catalog_papi.js

+43-20
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ const updateSources = async () => {
153153
let categories = new Set()
154154
let sourceCategories = []
155155

156-
while (nextPageToken !== null) {
156+
while (nextPageToken !== undefined) {
157157
const res = await getCatalog(`${PAPI_URL}/catalog/sources/`, nextPageToken)
158158
sources = sources.concat(res.data.sourcesCatalog)
159159
nextPageToken = res.data.pagination.next
@@ -183,13 +183,15 @@ const updateSources = async () => {
183183
'twilio-event-streams-beta'
184184
]
185185

186-
const regionalSources = regionalSupport.sources
186+
const regionalSourceEndpoint = regionalSupport.sources.endpoint
187+
const regionalSourceRegion = regionalSupport.sources.region
187188

188189
sources.forEach(source => {
189190
let slug = slugify(source.name)
190191
let settings = source.options
191192
let hidden = false
192-
let regional = ['us-west']
193+
let regions = ['us']
194+
let endpoints = ['us']
193195
let mainCategory = source.categories[0] ? source.categories[0].toLowerCase() : ''
194196

195197
// determine the doc url based on the source's main category
@@ -216,8 +218,12 @@ const updateSources = async () => {
216218
hidden = true
217219
}
218220

219-
if (regionalSources.includes(slug)) {
220-
regional.push('eu-west')
221+
if (regionalSourceEndpoint.includes(slug)) {
222+
endpoints.push('eu')
223+
}
224+
225+
if (regionalSourceRegion.includes(slug)) {
226+
regions.push('eu')
221227
}
222228

223229
// create the catalog metadata
@@ -227,7 +233,8 @@ const updateSources = async () => {
227233
slug,
228234
url,
229235
hidden,
230-
regional,
236+
regions,
237+
endpoints,
231238
source_type: mainCategory,
232239
description: source.description,
233240
logo: {
@@ -247,7 +254,8 @@ const updateSources = async () => {
247254
display_name: source.name,
248255
slug,
249256
url,
250-
regional
257+
regions,
258+
endpoints
251259
}
252260
regionalSourcesUpdated.push(updatedRegional)
253261

@@ -311,7 +319,7 @@ const updateDestinations = async () => {
311319
let categories = new Set()
312320
let nextPageToken = "MA=="
313321

314-
while (nextPageToken !== null) {
322+
while (nextPageToken !== undefined) {
315323
const res = await getCatalog(`${PAPI_URL}/catalog/destinations/`, nextPageToken)
316324
destinations = destinations.concat(res.data.destinationsCatalog)
317325
nextPageToken = res.data.pagination.next
@@ -327,18 +335,24 @@ const updateDestinations = async () => {
327335
return 0;
328336
})
329337

330-
const regionalDestinations = regionalSupport.destinations
338+
const regionalDestinationEndpoints= regionalSupport.destinations.endpoint
339+
const regionalDestinationRegions= regionalSupport.destinations.region
331340

332341

333342
destinations.forEach(destination => {
334-
let regional = ['us-west']
343+
let endpoints = ['us']
344+
let regions = ['us']
335345

336346
let slug = slugify(destination.name)
337347

338-
if (regionalDestinations.includes(slug)) {
339-
regional.push('eu-west')
348+
if (regionalDestinationEndpoints.includes(slug)) {
349+
endpoints.push('eu')
340350
}
341351

352+
if (regionalDestinationRegions.includes(slug)) {
353+
regions.push('eu')
354+
}
355+
342356

343357
let url = `connections/destinations/catalog/${slug}`
344358

@@ -386,7 +400,8 @@ const updateDestinations = async () => {
386400
name: destination.name,
387401
slug,
388402
hidden: isCatalogItemHidden(url),
389-
regional,
403+
endpoints,
404+
regions,
390405
url,
391406
previous_names: destination.previousNames,
392407
website: destination.website,
@@ -418,7 +433,8 @@ const updateDestinations = async () => {
418433
display_name: destination.name,
419434
slug,
420435
url,
421-
regional
436+
regions,
437+
endpoints
422438
}
423439

424440
regionalDestinationsUpdated.push(updatedRegionalDestination)
@@ -479,7 +495,7 @@ const updateWarehouses = async () => {
479495
let warehousesUpdated = []
480496

481497

482-
while (nextPageToken !== null) {
498+
while (nextPageToken !== undefined) {
483499
const res = await getCatalog(`${PAPI_URL}/catalog/warehouses/`, nextPageToken)
484500
warehouses = warehouses.concat(res.data.warehousesCatalog)
485501
nextPageToken = res.data.pagination.next
@@ -495,16 +511,22 @@ const updateWarehouses = async () => {
495511
return 0;
496512
})
497513

498-
const regionalWarehouses = regionalSupport.warehouses
514+
const regionalWarehouseEndpoints = regionalSupport.warehouses.endpoint
515+
const regionalWarehouseRegions = regionalSupport.warehouses.region
499516

500517

501518
warehouses.forEach(warehouse => {
502519
let slug = slugify(warehouse.slug)
503-
let regional = ['us-west']
520+
let endpoints = ['us']
521+
let regions = ['us']
504522
let url = `connections/storage/catalog/${slug}`
505523

506-
if (regionalWarehouses.includes(slug)) {
507-
regional.push('eu-west')
524+
if (regionalWarehouseEndpoints.includes(slug)) {
525+
endpoints.push('eu')
526+
}
527+
528+
if (regionalWarehouseRegions.includes(slug)) {
529+
regions.push('eu')
508530
}
509531

510532
let settings = warehouse.options
@@ -523,7 +545,8 @@ const updateWarehouses = async () => {
523545
display_name: warehouse.name,
524546
url,
525547
slug,
526-
regional,
548+
endpoints,
549+
regions
527550

528551
}
529552
warehousesUpdated.push(updatedWarehouse)

src/_data/catalog/destination_categories.yml

+1-1
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 2022-03-08
2+
# destination categories last updated 2022-03-18
33
items:
44
- display_name: A/B Testing
55
slug: a-b-testing

0 commit comments

Comments
 (0)