Skip to content

Commit f663b31

Browse files
author
sanscontext
committed
fix that dang stub creator
1 parent fd3f828 commit f663b31

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

scripts/papi.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const getConnectionModes = (destination) => {
9595
connectionModes.cloud.web = true
9696
}
9797
break
98-
98+
9999
}
100100
})
101101
// summarize connection modes in plain english.
@@ -206,7 +206,7 @@ const getConnectionModes = (destination) => {
206206
if (item.status === 'PUBLIC_BETA') {
207207
betaFlag = 'beta: true\n'
208208
}
209-
content =`---\ntitle: '${item.display_name} Destination'\nhidden: true\n${betaFlag}--- %}`
209+
content =`---\ntitle: '${item.display_name} Destination'\nhidden: true\n${betaFlag}---\n`
210210
}
211211
fs.mkdirSync(docsPath)
212212
fs.writeFileSync(`${docsPath}/index.md`, content)
@@ -272,8 +272,8 @@ const updateSources = async () => {
272272
url = `connections/sources/catalog/libraries/${mainCategory}/${slug}`
273273
} else {
274274
url = `connections/sources/catalog/cloud-apps/${slug}`
275-
}
276-
275+
}
276+
277277
// sort the sources alphabetically
278278
settings.sort((a, b) => {
279279
if(a.name < b.name) { return -1; }
@@ -285,7 +285,7 @@ const updateSources = async () => {
285285
if (hiddenSources.includes(slug)) {
286286
hidden = true
287287
}
288-
288+
289289
// create the catalog metadata
290290
let updatedSource = {
291291
display_name: source.name,
@@ -316,21 +316,21 @@ const updateSources = async () => {
316316
})
317317
})
318318

319-
319+
320320
// Create source catalog yaml file
321321
const options = { noArrayIndent: false };
322322
var todayDate = new Date().toISOString().slice(0,10);
323323
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
324324
output += "# sources last updated " + todayDate + " \n";
325325
output += yaml.safeDump({ items: sourcesUpdated }, options);
326-
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/sources.yml`), output);
326+
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/sources_papi.yml`), output);
327327

328328
// Create source-category mapping yaml file
329329
var todayDate = new Date().toISOString().slice(0,10);
330330
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
331331
output += "# source cateogries last updated " + todayDate + " \n";
332332
output += yaml.safeDump({ items: sourceCategories }, options);
333-
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/source_categories.yml`), output);
333+
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/source_categories_papi.yml`), output);
334334

335335

336336

@@ -359,7 +359,7 @@ const updateDestinations = async () => {
359359
destinations.forEach(destination => {
360360
let slug = slugify(destination.name)
361361
let url = `connections/destinations/catalog/${slug}`
362-
362+
363363
let tempCategories = [destination.categories]
364364
tempCategories = tempCategories.filter(category => category != '')
365365
tempCategories = tempCategories.flat()
@@ -371,7 +371,7 @@ const updateDestinations = async () => {
371371
browserUnbundlingPublic: destination.supportedFeatures.browserUnbundlingPublic,
372372
methods: destination.supportedMethods
373373
})
374-
374+
375375
let settings = destination.options
376376
settings.sort((a, b) => {
377377
if(a.name < b.name) { return -1; }
@@ -409,7 +409,7 @@ const updateDestinations = async () => {
409409

410410
tempCategories.reduce((s, e) => s.add(e), categories)
411411
})
412-
412+
413413

414414

415415
const destinationArray = Array.from(categories)
@@ -428,14 +428,14 @@ const updateDestinations = async () => {
428428
var todayDate = new Date().toISOString().slice(0,10);
429429
output += "# destination data last updated " + todayDate + " \n";
430430
output += yaml.safeDump({ items: destinationsUpdated }, options);
431-
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destinations.yml`), output);
431+
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destinations_papi.yml`), output);
432432

433433
// Create destination-category mapping yaml file
434434
output = "# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT\n"
435435
var todayDate = new Date().toISOString().slice(0,10);
436436
output += "# destination categories last updated " + todayDate + " \n";
437437
output += yaml.safeDump({ items: destinationCategories }, options);
438-
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destination_categories.yml`), output);
438+
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destination_categories_papi.yml`), output);
439439
}
440440

441441
const updateWarehouses = async () => {
@@ -492,6 +492,6 @@ const updateWarehouses = async () => {
492492

493493
}
494494

495-
//updateDestinations()
495+
updateDestinations()
496496
updateSources()
497-
// updateWarehouses()
497+
updateWarehouses()

0 commit comments

Comments
 (0)