Skip to content

Commit

Permalink
Merge pull request jason5ng32#223 from jason5ng32/dev
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
jason5ng32 authored Jun 22, 2024
2 parents d3d42fa + 301cb27 commit 1df0057
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
6 changes: 6 additions & 0 deletions api/dnsresolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const resolveDns = async (hostname, type, name, server) => {
const resolveTxtAsync = promisify(resolver.resolveTxt.bind(resolver));
const resolveCnameAsync = promisify(resolver.resolveCname.bind(resolver));
const resolveNSAsync = promisify(resolver.resolveNs.bind(resolver));
const resolveMXAsync = promisify(resolver.resolveMx.bind(resolver));
try {
let addresses;

Expand All @@ -56,6 +57,11 @@ const resolveDns = async (hostname, type, name, server) => {
case 'NS':
addresses = await resolveNSAsync(hostname);
break;
case 'MX':
addresses = await resolveMXAsync(hostname);
addresses = addresses.map(item => `${item.priority} ${item.exchange}.`)
.join(', ');
break;
default:
throw new Error('Unsupported type');
}
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@
"dependencies": {
"@analytics/google-analytics": "^1.0.7",
"@cloudflare/speedtest": "^1.3.0",
"@khmyznikov/pwa-install": "^0.3.7",
"analytics": "^0.8.11",
"@khmyznikov/pwa-install": "^0.3.9",
"analytics": "^0.8.13",
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3",
"code-inspector-plugin": "^0.13.0",
"code-inspector-plugin": "^0.14.2",
"concurrently": "^8.2.2",
"country-code-lookup": "^0.1.3",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"express-rate-limit": "^7.2.0",
"express-slow-down": "^2.0.1",
"flag-icons": "^7.2.1",
"express-rate-limit": "^7.3.1",
"express-slow-down": "^2.0.3",
"flag-icons": "^7.2.3",
"http-proxy-middleware": "^3.0.0",
"nodemon": "^3.1.0",
"nodemon": "^3.1.4",
"pinia": "^2.1.7",
"svgmap": "^2.10.1",
"vue": "^3.4.26",
"vue": "^3.4.29",
"vue-i18n": "^9.13.1",
"vue-router": "^4.3.2",
"vue-router": "^4.4.0",
"whoiser": "^1.17.3"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.2.11",
"@vitejs/plugin-vue": "^5.0.5",
"vite": "^5.3.1",
"vite-plugin-pwa": "^0.20.0"
}
}

0 comments on commit 1df0057

Please sign in to comment.