Skip to content

Commit 90a3998

Browse files
author
sanscontext
committed
some papi catalog improvements
1 parent f663b31 commit 90a3998

File tree

6 files changed

+6540
-4063
lines changed

6 files changed

+6540
-4063
lines changed

scripts/papi.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ const updateSources = async () => {
272272
url = `connections/sources/catalog/libraries/${mainCategory}/${slug}`
273273
} else {
274274
url = `connections/sources/catalog/cloud-apps/${slug}`
275+
mainCategory = 'cloud-app'
275276
}
276277

277278
// sort the sources alphabetically
@@ -292,6 +293,7 @@ const updateSources = async () => {
292293
slug,
293294
url,
294295
hidden,
296+
source_type: mainCategory,
295297
description: source.description,
296298
logo: {
297299
url: source.logos.default
@@ -320,14 +322,14 @@ const updateSources = async () => {
320322
// Create source catalog yaml file
321323
const options = { noArrayIndent: false };
322324
var todayDate = new Date().toISOString().slice(0,10);
323-
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
325+
output = "# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT\n"
324326
output += "# sources last updated " + todayDate + " \n";
325327
output += yaml.safeDump({ items: sourcesUpdated }, options);
326328
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/sources_papi.yml`), output);
327329

328330
// Create source-category mapping yaml file
329331
var todayDate = new Date().toISOString().slice(0,10);
330-
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
332+
output = "# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT\n"
331333
output += "# source cateogries last updated " + todayDate + " \n";
332334
output += yaml.safeDump({ items: sourceCategories }, options);
333335
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/source_categories_papi.yml`), output);
@@ -396,13 +398,13 @@ const updateDestinations = async () => {
396398
url: destination.logos.mark
397399
},
398400
methods: destination.supportedMethods,
399-
components: destination.components,
400401
platforms: destination.supportedPlatforms,
402+
components: destination.components,
401403
browserUnbundlingSupported: destination.supportedFeatures.browserUnbundling,
402404
browserUnbundlingPublic: destination.supportedFeatures.browserUnbundlingPublic,
403405
replay: destination.supportedFeatures.replay,
404-
settings,
405-
connection_modes
406+
connection_modes,
407+
settings
406408
}
407409
destinationsUpdated.push(updatedDestination)
408410
doesCatalogItemExist(updatedDestination)

src/_data/catalog/destination_categories_papi.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 2021-06-09
2+
# destination categories last updated 2021-06-29
33
items:
44
- display_name: Email Marketing
55
slug: email-marketing

0 commit comments

Comments
 (0)