File tree Expand file tree Collapse file tree 4 files changed +24
-10
lines changed
Expand file tree Collapse file tree 4 files changed +24
-10
lines changed Original file line number Diff line number Diff line change 11# Change Log
22
3+ ## 1.2.1 - 2025.08.16
4+
5+ ### Added
6+
7+ ### Changed
8+
9+ ### Fixed
10+
11+ - Add try-catch block when checking version from GH for rules
12+
313## 1.2.1-beta.2 - 2025.08.10
414
515### Added
Original file line number Diff line number Diff line change 11{
22 "name" : " @shriyanss/js-recon" ,
3- "version" : " 1.2.1-beta.2 " ,
3+ "version" : " 1.2.1" ,
44 "description" : " JS Recon Tool" ,
55 "main" : " build/index.js" ,
66 "type" : " module" ,
Original file line number Diff line number Diff line change @@ -70,14 +70,18 @@ const initRules = async () => {
7070
7171 // also, if the version.txt exist, check if the version.txt is latest as per the latest release on github
7272 const version = fs . readFileSync ( versionPath , "utf8" ) . trim ( ) ;
73- const response = await fetch ( "https://api.github.com/repos/shriyanss/js-recon-rules/releases/latest" ) ;
74- const release = await response . json ( ) ;
75- const release_tag_name = release . tag_name ;
76- if ( `v${ version } ` !== release_tag_name ) {
77- console . log ( chalk . yellow ( "[!] Rules are not up to date. Downloading latest version..." ) ) ;
78- // remove the rules directory
79- fs . rmSync ( path . join ( homeDir , "/.js-recon/rules" ) , { recursive : true } ) ;
80- await downloadRules ( homeDir ) ;
73+ try {
74+ const response = await fetch ( "https://api.github.com/repos/shriyanss/js-recon-rules/releases/latest" ) ;
75+ const release = await response . json ( ) ;
76+ const release_tag_name = release . tag_name ;
77+ if ( `v${ version } ` !== release_tag_name ) {
78+ console . log ( chalk . yellow ( "[!] Rules are not up to date. Downloading latest version..." ) ) ;
79+ // remove the rules directory
80+ fs . rmSync ( path . join ( homeDir , "/.js-recon/rules" ) , { recursive : true } ) ;
81+ await downloadRules ( homeDir ) ;
82+ }
83+ } catch {
84+ console . error ( chalk . red ( "[!] An error occured when fetching rules from GitHub" ) ) ;
8185 }
8286} ;
8387
Original file line number Diff line number Diff line change 11const githubURL = "https://github.com/shriyanss/js-recon" ;
22const modulesDocs = "https://js-recon.io/docs/category/modules" ;
3- const version = "1.2.1-beta.2 " ;
3+ const version = "1.2.1" ;
44const toolDesc = "JS Recon Tool" ;
55const axiosNonHttpMethods = [ "isAxiosError" ] ; // methods available in axios, which are not for making HTTP requests
66
You can’t perform that action at this time.
0 commit comments