@k03mad/ip2geo 9.1.0 → 9.3.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.
- package/app/cli.js +1 -0
- package/app/helpers/cache.js +1 -8
- package/package.json +2 -3
package/app/cli.js
CHANGED
package/app/helpers/cache.js
CHANGED
|
@@ -2,7 +2,6 @@ import fs from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
|
|
4
4
|
import _debug from 'debug';
|
|
5
|
-
import ora from 'ora';
|
|
6
5
|
|
|
7
6
|
const debug = _debug('mad:geoip');
|
|
8
7
|
|
|
@@ -171,10 +170,8 @@ export const pruneCache = async (cacheDir, cacheFileSeparator, cacheFileNewline)
|
|
|
171
170
|
|
|
172
171
|
let duplicates = 0;
|
|
173
172
|
let empty = 0;
|
|
174
|
-
let counter = 0;
|
|
175
|
-
const longLinesFiles = new Set();
|
|
176
173
|
|
|
177
|
-
const
|
|
174
|
+
const longLinesFiles = new Set();
|
|
178
175
|
|
|
179
176
|
await Promise.all(files.map(async file => {
|
|
180
177
|
const fullFilePath = path.join(cacheDir, file);
|
|
@@ -200,11 +197,7 @@ export const pruneCache = async (cacheDir, cacheFileSeparator, cacheFileNewline)
|
|
|
200
197
|
|
|
201
198
|
empty += dataArr.length - dataArrRemoveEmpty.length;
|
|
202
199
|
duplicates += dataArrRemoveEmpty.length - uniq.length;
|
|
203
|
-
|
|
204
|
-
counter++;
|
|
205
|
-
spinner.text = `[${counter}/${files.length}]: ${fullFilePath}`;
|
|
206
200
|
}));
|
|
207
201
|
|
|
208
|
-
spinner.stop();
|
|
209
202
|
return {duplicates, empty, longLinesFiles};
|
|
210
203
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k03mad/ip2geo",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"description": "GeoIP library",
|
|
5
5
|
"maintainers": [
|
|
6
6
|
"Kirill Molchanov <k03.mad@gmail.com"
|
|
@@ -22,8 +22,7 @@
|
|
|
22
22
|
"@k03mad/request": "6.1.0",
|
|
23
23
|
"@k03mad/simple-log": "2.3.0",
|
|
24
24
|
"chalk": "5.3.0",
|
|
25
|
-
"debug": "4.3.6"
|
|
26
|
-
"ora": "8.0.1"
|
|
25
|
+
"debug": "4.3.6"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
28
|
"@k03mad/eslint-config": "23.0.0",
|