File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,16 @@ console.log(
26
26
` \n \n${ package . description } \n `
27
27
) ;
28
28
29
+ axios . get ( "https://raw.githubusercontent.com/HirziDevs/PteroStats/refs/heads/main/package.json" ) . then ( response => {
30
+ if ( response . data && response . data . version !== package . version ) console . log (
31
+ cliColor . yellowBright ( `+============================================================+\n` ) +
32
+ ` Update available: ${ package . version } → ${ cliColor . green ( response . data . version ) } \n` +
33
+ ` Download at ${ cliColor . blueBright ( "https://ps.znproject.my.id/download" ) } to update.\n` +
34
+ cliColor . redBright ( ` Make sure to backup ${ cliColor . blueBright ( "config.yml" ) } and ${ cliColor . blueBright ( ".env" ) } before updating.\n` ) +
35
+ cliColor . yellowBright ( `+============================================================+` )
36
+ )
37
+ } ) . catch ( error => console . log ( `${ cliColor . cyanBright ( "[PteroStats]" ) } ${ cliColor . redBright ( "Failed to check for updates." ) } ` ) ) ;
38
+
29
39
if ( ! fs . existsSync ( ".env" ) || ! fs . existsSync ( ".setup-complete" ) ) return require ( "./handlers/setup.js" ) ( ) ;
30
40
31
41
process . on ( 'uncaughtException' , ( error ) => errorLogging ( error ) )
You can’t perform that action at this time.
0 commit comments