ac-geoip 3.0.2 → 3.0.3
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/CHANGELOG.md +10 -0
- package/index.js +3 -3
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
<a name="3.0.3"></a>
|
|
2
|
+
|
|
3
|
+
## [3.0.3](https://github.com/admiralcloud/ac-geoip/compare/v3.0.2..v3.0.3) (2024-07-06 12:44:21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fix
|
|
7
|
+
|
|
8
|
+
* **App:** Package updates | MP | [89c90ffb42fbc601449bff5c58d866bcdb11a28c](https://github.com/admiralcloud/ac-geoip/commit/89c90ffb42fbc601449bff5c58d866bcdb11a28c)
|
|
9
|
+
Replaced ip with ac-ip
|
|
10
|
+
Related issues: [undefined/undefined#master](undefined/browse/master)
|
|
1
11
|
<a name="3.0.2"></a>
|
|
2
12
|
|
|
3
13
|
## [3.0.2](https://github.com/admiralcloud/ac-geoip/compare/v3.0.1..v3.0.2) (2024-02-26 07:45:31)
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const _ = require('lodash')
|
|
2
|
-
const ipPackage = require('ip')
|
|
2
|
+
const ipPackage = require('ac-ip')
|
|
3
3
|
const fs = require('fs')
|
|
4
4
|
|
|
5
5
|
const WebServiceClient = require('@maxmind/geoip2-node').WebServiceClient
|
|
@@ -64,7 +64,7 @@ const acgeoip = () => {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
const ip = _.get(params, 'ip')
|
|
67
|
-
if (ipPackage.
|
|
67
|
+
if (ipPackage.isPrivateIP(ip)) return
|
|
68
68
|
|
|
69
69
|
const mapping = _.get(params, 'mapping', geoip.mapping)
|
|
70
70
|
const debug = _.get(params, 'debug')
|
|
@@ -155,7 +155,7 @@ const acgeoip = () => {
|
|
|
155
155
|
throw Error(message)
|
|
156
156
|
}
|
|
157
157
|
const ip = _.get(params, 'ip')
|
|
158
|
-
if (ipPackage.
|
|
158
|
+
if (ipPackage.isPrivateIP(ip)) {
|
|
159
159
|
return
|
|
160
160
|
}
|
|
161
161
|
|
package/package.json
CHANGED
|
@@ -3,24 +3,27 @@
|
|
|
3
3
|
"author": "Mark Poepping (https://www.admiralcloud.com)",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "admiralcloud/ac-geoip",
|
|
6
|
-
"version": "3.0.
|
|
6
|
+
"version": "3.0.3",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@maxmind/geoip2-node": "^5.0.0",
|
|
9
|
-
"ip": "^
|
|
9
|
+
"ac-ip": "^4.0.0",
|
|
10
10
|
"lodash": "^4.17.21",
|
|
11
11
|
"node-cache": "^5.1.2"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"ac-semantic-release": "^0.4.2",
|
|
15
15
|
"chai": "^4.4.1",
|
|
16
|
-
"eslint": "^
|
|
17
|
-
"ioredis": "^5.
|
|
18
|
-
"mocha": "^10.
|
|
16
|
+
"eslint": "^9.6.0",
|
|
17
|
+
"ioredis": "^5.4.1",
|
|
18
|
+
"mocha": "^10.6.0"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"test": "./node_modules/.bin/mocha --bail --exit --slow 1000 ./test/test.js || :"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": ">=
|
|
24
|
+
"node": ">=18.0"
|
|
25
|
+
},
|
|
26
|
+
"resolutions": {
|
|
27
|
+
"mocha/chokidar/braces": "^3.0.3"
|
|
25
28
|
}
|
|
26
29
|
}
|