@k03mad/dns-leak 7.1.0 → 7.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,6 +25,9 @@ jobs:
25
25
  with:
26
26
  node-version-file: '.nvmrc'
27
27
 
28
+ - name: Install PNPM
29
+ run: npm i pnpm -g
30
+
28
31
  - name: Run setup
29
32
  run: npm run setup
30
33
 
package/.husky/pre-commit CHANGED
@@ -1,4 +1 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
1
  npm run lint
@@ -31,24 +31,24 @@ export const address = msg => blue(msg);
31
31
 
32
32
  /**
33
33
  * @param {object} [ipInfo]
34
- * @param {string} [ipInfo.city]
35
- * @param {string} [ipInfo.country]
36
- * @param {string} [ipInfo.emoji]
37
34
  * @param {string} [ipInfo.ip]
38
- * @param {string} [ipInfo.isp]
39
- * @param {string} [ipInfo.ispDomain]
40
- * @param {string} [ipInfo.org]
35
+ * @param {string} [ipInfo.country]
36
+ * @param {string} [ipInfo.countryEmoji]
37
+ * @param {string} [ipInfo.city]
41
38
  * @param {string} [ipInfo.region]
39
+ * @param {string} [ipInfo.connectionOrg]
40
+ * @param {string} [ipInfo.connectionIsp]
41
+ * @param {string} [ipInfo.connectionDomain]
42
42
  */
43
43
  export const formatIpInfo = ({
44
- city,
45
- country,
46
- emoji,
47
44
  ip,
48
- isp,
49
- ispDomain,
50
- org,
45
+ country,
46
+ countryEmoji,
47
+ city,
51
48
  region,
49
+ connectionOrg,
50
+ connectionIsp,
51
+ connectionDomain,
52
52
  } = {}) => {
53
53
  let output = '';
54
54
 
@@ -56,26 +56,26 @@ export const formatIpInfo = ({
56
56
  output += `${address(ip)}\n`;
57
57
  }
58
58
 
59
- if (org) {
60
- output += `${orgIsp(org)} `;
59
+ if (connectionOrg) {
60
+ output += `${orgIsp(connectionOrg)} `;
61
61
  }
62
62
 
63
- if (isp && !org?.includes(isp)) {
64
- if (org) {
63
+ if (connectionIsp && !connectionOrg?.includes(connectionIsp)) {
64
+ if (connectionOrg) {
65
65
  output += orgIsp('/ ');
66
66
  }
67
67
 
68
- output += `${orgIsp(isp)} `;
68
+ output += `${orgIsp(connectionIsp)} `;
69
69
  }
70
70
 
71
- if (ispDomain) {
72
- output += info(`(${ispDomain})`);
71
+ if (connectionDomain) {
72
+ output += info(`(${connectionDomain})`);
73
73
  }
74
74
 
75
75
  output += '\n';
76
76
 
77
- if (emoji) {
78
- output += `${emoji} `;
77
+ if (countryEmoji) {
78
+ output += `${countryEmoji} `;
79
79
  }
80
80
 
81
81
  output += [
package/app/run.js CHANGED
@@ -28,7 +28,7 @@ const dnsIps = [
28
28
 
29
29
  const dnsIpsInfo = await Promise.all(dnsIps.map(async ip => {
30
30
  try {
31
- return await ip2geo(ip);
31
+ return await ip2geo({ip});
32
32
  } catch {}
33
33
  }));
34
34
 
@@ -55,7 +55,7 @@ if (dnsIpsInfoFormatted.length > 0) {
55
55
 
56
56
  if (next.value?.ecs) {
57
57
  try {
58
- const data = await ip2geo(next.value.ecs.replace(/\/.+/, ''));
58
+ const data = await ip2geo({ip: next.value.ecs.replace(/\/.+/, '')});
59
59
  data.ip += ` (${next.value.ecs})`;
60
60
 
61
61
  output.push(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k03mad/dns-leak",
3
- "version": "7.1.0",
3
+ "version": "7.1.2",
4
4
  "description": "DNS leak test",
5
5
  "maintainers": [
6
6
  "Kirill Molchanov <k03.mad@gmail.com"
@@ -18,8 +18,8 @@
18
18
  "node": ">=20"
19
19
  },
20
20
  "dependencies": {
21
- "@k03mad/ip2geo": "4.2.0",
22
- "@k03mad/request": "5.5.0",
21
+ "@k03mad/ip2geo": "6.1.0",
22
+ "@k03mad/request": "5.6.0",
23
23
  "@k03mad/simple-log": "2.1.0",
24
24
  "chalk": "5.3.0",
25
25
  "country-locale-map": "1.9.0",
@@ -28,9 +28,9 @@
28
28
  "ora": "8.0.1"
29
29
  },
30
30
  "devDependencies": {
31
- "@k03mad/eslint-config": "19.4.0",
31
+ "@k03mad/eslint-config": "20.2.0",
32
32
  "eslint": "8.56.0",
33
- "husky": "8.0.3"
33
+ "husky": "9.0.7"
34
34
  },
35
35
  "scripts": {
36
36
  "lint": "npm run lint:eslint",
@@ -38,7 +38,7 @@
38
38
  "clean": "npm run clean:modules && npm run clean:eslint:cache",
39
39
  "clean:modules": "rm -rf ./node_modules || true",
40
40
  "clean:eslint:cache": "rm -rf .eslintcache || true",
41
- "setup": "npm run clean && npm i",
42
- "prepare": "husky install || true"
41
+ "setup": "npm run clean && pnpm i",
42
+ "prepare": "husky || true"
43
43
  }
44
44
  }