@@ -15,11 +15,10 @@ const lastTagInfo = {
15
15
16
16
let TRACKER_RADAR_DOMAINS_PATH = path . join ( config . trackerRadarRepoPath , '/domains/' ) ;
17
17
const TRACKER_RADAR_ENTITIES_PATH = path . join ( config . trackerRadarRepoPath , '/entities/' ) ;
18
- const REGION = 'US' ;
19
18
20
19
// Backwards compatibility for regions updates
21
- if ( fs . existsSync ( path . join ( TRACKER_RADAR_DOMAINS_PATH , REGION ) ) ) {
22
- TRACKER_RADAR_DOMAINS_PATH = path . join ( TRACKER_RADAR_DOMAINS_PATH , REGION ) ;
20
+ if ( fs . existsSync ( path . join ( TRACKER_RADAR_DOMAINS_PATH , config . region ) ) ) {
21
+ TRACKER_RADAR_DOMAINS_PATH = path . join ( TRACKER_RADAR_DOMAINS_PATH , config . region ) ;
23
22
}
24
23
25
24
const domainFiles = getListOfJSONPathsFromFolder ( TRACKER_RADAR_DOMAINS_PATH ) ;
@@ -89,7 +88,8 @@ const renderData = {
89
88
categories : Array . from ( categories . values ( ) ) ,
90
89
lastTagInfo,
91
90
historicDataString,
92
- hostPath : config . hostPath
91
+ hostPath : config . hostPath ,
92
+ region : config . region ,
93
93
} ;
94
94
95
95
try {
@@ -106,7 +106,8 @@ fs.writeFileSync(path.join(config.basePagesPath, 'index.html'), output);
106
106
const top100RenderData = {
107
107
domains : domains . slice ( 0 , 100 ) ,
108
108
entities : entities . slice ( 0 , 100 ) ,
109
- hostPath : config . hostPath
109
+ hostPath : config . hostPath ,
110
+ region : config . region ,
110
111
} ;
111
112
112
113
const top100Output = mustache . render ( getTemplate ( 'top100' ) , top100RenderData , getTemplate ) ;
@@ -122,7 +123,8 @@ const apiHistoryRenderData = {
122
123
. map ( item => ( { api : item . api , entries : item . entries , lastValue : item . entries [ item . entries . length - 1 ] . value } ) )
123
124
. sort ( ( a , b ) => b . lastValue - a . lastValue ) ,
124
125
apiHistoryString,
125
- hostPath : config . hostPath
126
+ hostPath : config . hostPath ,
127
+ region : config . region ,
126
128
} ;
127
129
128
130
const apiHistoryOutput = mustache . render ( getTemplate ( 'apiHistory' ) , apiHistoryRenderData , getTemplate ) ;
0 commit comments