@@ -18,6 +18,7 @@ const slugify = (displayName) => {
1818 . replace ( '.' , '-' )
1919
2020 if ( slug === '-net' ) slug = 'net'
21+ if ( slug === 'talon-one' ) slug = 'talonone'
2122 if ( slug === 'roku-alpha' ) slug = 'roku'
2223 if ( slug === 'shopify-by-littledata' ) slug = 'shopify-littledata'
2324 if ( slug === 'talon-one' ) slug = 'talonone'
@@ -189,11 +190,16 @@ const updateSources = async () => {
189190
190191 // Create source catalog yaml file
191192 const options = { noArrayIndent : true } ;
192- let output = yaml . safeDump ( { items : sourcesUpdated } , options ) ;
193+ var todayDate = new Date ( ) . toISOString ( ) . slice ( 0 , 10 ) ;
194+ output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
195+ output += "# sources last updated " + todayDate + " \n" ;
196+ output += yaml . safeDump ( { items : sourcesUpdated } , options ) ;
193197 fs . writeFileSync ( path . resolve ( __dirname , `../src/_data/catalog/sources.yml` ) , output ) ;
194198
195199 // Create source-category mapping yaml file
200+ var todayDate = new Date ( ) . toISOString ( ) . slice ( 0 , 10 ) ;
196201 output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
202+ output += "# source cateogries last updated " + todayDate + " \n" ;
197203 output += yaml . safeDump ( { items : sourceCategories } , options ) ;
198204 fs . writeFileSync ( path . resolve ( __dirname , `../src/_data/catalog/source_categories.yml` ) , output ) ;
199205}
@@ -272,10 +278,16 @@ const updateDestinations = async () => {
272278
273279 // Create destination catalog yaml file
274280 const options = { noArrayIndent : true } ;
275- let output = yaml . safeDump ( { items : destinationsUpdated } , options ) ;
281+ output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
282+ var todayDate = new Date ( ) . toISOString ( ) . slice ( 0 , 10 ) ;
283+ output += "# destination data last updated " + todayDate + " \n" ;
284+ output += yaml . safeDump ( { items : destinationsUpdated } , options ) ;
276285 fs . writeFileSync ( path . resolve ( __dirname , `../src/_data/catalog/destinations.yml` ) , output ) ;
277- // Create source-category mapping yaml file
286+
287+ // Create destination-category mapping yaml file
278288 output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
289+ var todayDate = new Date ( ) . toISOString ( ) . slice ( 0 , 10 ) ;
290+ output += "# destination categories last updated " + todayDate + " \n" ;
279291 output += yaml . safeDump ( { items : destinationCategories } , options ) ;
280292 fs . writeFileSync ( path . resolve ( __dirname , `../src/_data/catalog/destination_categories.yml` ) , output ) ;
281293}
0 commit comments