@k03mad/ip2geo 7.0.3 → 7.1.0

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.
@@ -14,7 +14,7 @@ jobs:
14
14
  with:
15
15
  fetch-depth: 0
16
16
 
17
- - uses: tj-actions/changed-files@v42
17
+ - uses: tj-actions/changed-files@v44
18
18
  id: changed-files
19
19
  with:
20
20
  files: package.json
package/app/lib/ip2geo.js CHANGED
@@ -2,7 +2,6 @@ import os from 'node:os';
2
2
  import path from 'node:path';
3
3
 
4
4
  import {request} from '@k03mad/request';
5
- import {logErrorExit} from '@k03mad/simple-log';
6
5
 
7
6
  import {
8
7
  collectOutputData,
@@ -90,11 +89,11 @@ export const ip2geo = async ({
90
89
  const {body} = await request(reqUrl, {}, {rps});
91
90
 
92
91
  if (!body?.ip) {
93
- logErrorExit([
92
+ throw new Error([
94
93
  'API error',
95
94
  `request: ${reqUrl}`,
96
- `response body: ${body}`,
97
- ]);
95
+ `response body: ${JSON.stringify(body)}`,
96
+ ].join('\n'));
98
97
  }
99
98
 
100
99
  const outputData = collectOutputData([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k03mad/ip2geo",
3
- "version": "7.0.3",
3
+ "version": "7.1.0",
4
4
  "description": "GeoIP library",
5
5
  "maintainers": [
6
6
  "Kirill Molchanov <k03.mad@gmail.com"
@@ -19,16 +19,16 @@
19
19
  "node": ">=20"
20
20
  },
21
21
  "dependencies": {
22
- "@k03mad/request": "5.6.2",
23
- "@k03mad/simple-log": "2.1.2",
22
+ "@k03mad/request": "5.6.4",
23
+ "@k03mad/simple-log": "2.1.3",
24
24
  "chalk": "5.3.0",
25
25
  "debug": "4.3.4"
26
26
  },
27
27
  "devDependencies": {
28
- "@k03mad/eslint-config": "20.3.0",
28
+ "@k03mad/eslint-config": "20.7.0",
29
29
  "eslint": "8.57.0",
30
30
  "husky": "9.0.11",
31
- "mocha": "10.3.0"
31
+ "mocha": "10.4.0"
32
32
  },
33
33
  "scripts": {
34
34
  "lint": "npm run lint:eslint",