diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/countries.ts | 5 | ||||
| -rw-r--r-- | src/environment/environment.ts | 2 | ||||
| -rw-r--r-- | src/models/FetchedCountry.model.ts | 1 | ||||
| -rw-r--r-- | src/models/country.model.ts | 1 | ||||
| -rw-r--r-- | src/util/logger.ts | 22 |
5 files changed, 18 insertions, 13 deletions
diff --git a/src/countries.ts b/src/countries.ts index 4b0a0c9..974edec 100644 --- a/src/countries.ts +++ b/src/countries.ts @@ -108,7 +108,8 @@ export class Countries { region: country.region, subregion: country.subregion, capitalLatLng: country.capitalInfo.latlng.join("/"), - timezones: country.timezones.join("\n\t\t "), + timezones: country.timezones.join("\n\t\t\t "), + tld: country.tld.join(" | "), currencies, languages, }); @@ -134,7 +135,7 @@ export class Countries { const currency = currencies[currencyAbbr]; result.push(`${currency.name} [${currency.symbol}](${currencyAbbr})`); } - return result.join("\n\t\t "); + return result.join("\n\t\t\t "); } private extractLanguages(languages: Languages) { diff --git a/src/environment/environment.ts b/src/environment/environment.ts index 479de91..ef48c3d 100644 --- a/src/environment/environment.ts +++ b/src/environment/environment.ts @@ -6,5 +6,5 @@ export const environment = { syncInterval: 7, cacheDir: join(home_dir() as string, ".cache", "countryfetch"), queries: - "all?fields=name,capital,currencies,population,flag,languages,region,subregion,timezones,latlng,capitalInfo", + "all?fields=name,capital,currencies,population,flag,languages,region,subregion,timezones,latlng,capitalInfo,tld", }; diff --git a/src/models/FetchedCountry.model.ts b/src/models/FetchedCountry.model.ts index af80281..a53482e 100644 --- a/src/models/FetchedCountry.model.ts +++ b/src/models/FetchedCountry.model.ts @@ -10,4 +10,5 @@ export interface FetchedCountry { population: string; currencies: string; timezones: string; + tld: string; } diff --git a/src/models/country.model.ts b/src/models/country.model.ts index 7866187..61e0dfc 100644 --- a/src/models/country.model.ts +++ b/src/models/country.model.ts @@ -34,4 +34,5 @@ export interface Country { capitalInfo: { latlng: number[]; }; + tld: string[]; } diff --git a/src/util/logger.ts b/src/util/logger.ts index bfbffbf..aaa92c5 100644 --- a/src/util/logger.ts +++ b/src/util/logger.ts @@ -20,26 +20,28 @@ export class Logger { public logCountry(country: FetchedCountry) { console.log( - nano.cyan("\nCountry:\t"), + nano.cyan("\nCountry:\t\t"), country.country, country.flag, - nano.green("\nLat/Lng\t\t"), + nano.green("\nLat/Lng\t\t\t"), country.latlng, - nano.green("\nPopulation:\t"), + nano.green("\nPopulation:\t\t"), country.population, - nano.green("\nLanguages:\t"), + nano.green("\nLanguages:\t\t"), country.languages, - nano.green("\nCapital:\t"), + nano.green("\nCapital:\t\t"), country.capital, - nano.green("\nCapital Lat/Lng:"), + nano.green("\nCapital Lat/Lng:\t"), country.capitalLatLng, - nano.green("\nRegion:\t\t"), + nano.green("\nRegion:\t\t\t"), country.region, - nano.green("\nSubregion:\t"), + nano.green("\nSubregion:\t\t"), country.subregion, - nano.green("\nTimezones:\t"), + nano.green("\nTimezones:\t\t"), country.timezones, - nano.green("\nCurrencies:\t"), + nano.green("\nTop Level Domain:\t"), + country.tld, + nano.green("\nCurrencies:\t\t"), country.currencies ); } |
