File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ async function getCsrfTokenValue() {
212212}
213213
214214async function fetchAndWriteData ( ) {
215- let data = { } ;
215+ let data = { } as AllDataQuery ;
216216 if ( pipelineType === 'ci' ) {
217217 data = dummyData ;
218218 } else {
@@ -226,7 +226,7 @@ async function fetchAndWriteData() {
226226 graphQLClient . setHeader ( 'X-CSRFToken' , csrfTokenValue ) ;
227227 graphQLClient . setHeader ( 'Cookie' , `${ COOKIE_NAME } =${ csrfTokenValue } ` ) ;
228228 graphQLClient . setHeader ( 'Referer' , process . env . MAPSWIPE_REFERER_ENDPOINT ?? '' ) ;
229- data = await graphQLClient . request ( query ) ;
229+ data = ( await graphQLClient . request ( query ) ) as AllDataQuery ;
230230 }
231231
232232 // ensure the `data` directory exists
@@ -237,6 +237,7 @@ async function fetchAndWriteData() {
237237 fs . writeFileSync ( outputPath , JSON . stringify ( data , null , 2 ) ) ;
238238 console . log ( `Data written to ${ outputPath } ` ) ;
239239 console . log ( `Top-level keys: ${ Object . keys ( data ?? { } ) . join ( ', ' ) } ` ) ;
240+ console . log ( `Total projects count: ${ data ?. publicProjects ?. totalCount } ` ) ;
240241
241242 const lastModifiedEpoch = Date . now ( ) ;
242243 if ( process . env . GITHUB_ENV ) {
You can’t perform that action at this time.
0 commit comments