@@ -31,7 +31,7 @@ import { setCachedGitHubStats } from '~/utils/stats-db.server'
3131 */
3232export const handler : Handler = async (
3333 event : HandlerEvent ,
34- context : HandlerContext
34+ context : HandlerContext ,
3535) => {
3636 console . log ( '[refresh-stats-cache-background] Starting stats refresh...' )
3737
@@ -46,20 +46,20 @@ export const handler: Handler = async (
4646
4747 // Refresh GitHub org stats
4848 console . log (
49- '[refresh-stats-cache-background] Refreshing GitHub org stats...'
49+ '[refresh-stats-cache-background] Refreshing GitHub org stats...' ,
5050 )
5151 const githubCacheKey = `org:${ org } `
5252 const githubStats = await fetchGitHubOwnerStats ( org )
5353 await setCachedGitHubStats ( githubCacheKey , githubStats , 1 )
5454
5555 // Refresh GitHub stats for each library repo
5656 console . log (
57- '[refresh-stats-cache-background] Refreshing GitHub stats for individual libraries...'
57+ '[refresh-stats-cache-background] Refreshing GitHub stats for individual libraries...' ,
5858 )
5959 const { libraries } = await import ( '~/libraries' )
6060 console . log (
6161 `[refresh-stats-cache-background] Found ${ libraries . length } libraries to process:` ,
62- libraries . map ( ( lib ) => ( { id : lib . id , repo : lib . repo } ) )
62+ libraries . map ( ( lib ) => ( { id : lib . id , repo : lib . repo } ) ) ,
6363 )
6464 const libraryResults = [ ]
6565 const libraryErrors = [ ]
@@ -68,13 +68,13 @@ export const handler: Handler = async (
6868 const library = libraries [ i ]
6969 if ( ! library . repo ) {
7070 console . log (
71- `[refresh-stats-cache-background] Skipping library ${ library . id } - no repo`
71+ `[refresh-stats-cache-background] Skipping library ${ library . id } - no repo` ,
7272 )
7373 continue
7474 }
7575
7676 console . log (
77- `[refresh-stats-cache-background] Processing library ${ library . id } (${ library . repo } )...`
77+ `[refresh-stats-cache-background] Processing library ${ library . id } (${ library . repo } )...` ,
7878 )
7979 try {
8080 const repoStats = await fetchGitHubRepoStats ( library . repo )
@@ -83,11 +83,11 @@ export const handler: Handler = async (
8383 library . repo
8484 } : ${ repoStats . starCount } stars, ${
8585 repoStats . contributorCount
86- } contributors, ${ repoStats . dependentCount ?? 'N/A' } dependents`
86+ } contributors, ${ repoStats . dependentCount ?? 'N/A' } dependents`,
8787 )
8888 await setCachedGitHubStats ( library . repo , repoStats , 1 )
8989 console . log (
90- `[refresh-stats-cache-background] ✓ Successfully cached stats for ${ library . repo } `
90+ `[refresh-stats-cache-background] ✓ Successfully cached stats for ${ library . repo } ` ,
9191 )
9292 libraryResults . push ( {
9393 repo : library . repo ,
@@ -103,7 +103,7 @@ export const handler: Handler = async (
103103 error instanceof Error ? error . message : String ( error )
104104 console . error (
105105 `[refresh-stats-cache-background] Failed to refresh ${ library . repo } :` ,
106- errorMessage
106+ errorMessage ,
107107 )
108108 libraryErrors . push ( {
109109 repo : library . repo ,
@@ -118,7 +118,7 @@ export const handler: Handler = async (
118118 Object . keys ( npmStats . packageStats || { } ) . length
119119 } packages), GitHub Org: ${ githubStats . starCount . toLocaleString ( ) } stars, Libraries: ${
120120 libraryResults . length
121- } refreshed, ${ libraryErrors . length } failed`
121+ } refreshed, ${ libraryErrors . length } failed`,
122122 )
123123
124124 return {
@@ -154,7 +154,7 @@ export const handler: Handler = async (
154154
155155 console . error (
156156 `[refresh-stats-cache-background] ✗ Failed after ${ duration } ms:` ,
157- errorMessage
157+ errorMessage ,
158158 )
159159 if ( errorStack ) {
160160 console . error ( '[refresh-stats-cache-background] Stack:' , errorStack )
0 commit comments