@prosopo/ipinfo 0.3.23 → 0.3.25
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/ipinfo@0.3.
|
|
2
|
+
> @prosopo/ipinfo@0.3.25 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -33,4 +33,4 @@ dist/cjs/IpInfoService.cjs 2.80 kB │ gzip: 0.98 kB
|
|
|
33
33
|
dist/cjs/backends/ipapi.cjs 4.11 kB │ gzip: 1.75 kB
|
|
34
34
|
dist/cjs/backends/maxmind.cjs 4.94 kB │ gzip: 1.50 kB
|
|
35
35
|
|
|
36
|
-
[32m✓ built in
|
|
36
|
+
[32m✓ built in 74ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/ipinfo@0.3.
|
|
2
|
+
> @prosopo/ipinfo@0.3.25 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
11:40:35 AM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../util/tsconfig.json
|
|
8
8
|
* ../logger/tsconfig.json
|
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
* ../types/tsconfig.json
|
|
12
12
|
* tsconfig.json
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
11:40:36 AM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/vite.backend.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
11:40:36 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
11:40:36 AM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
11:40:36 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
11:40:36 AM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
11:40:36 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
11:40:36 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
11:40:36 AM - Building project '/home/runner/work/captcha/captcha/packages/ipinfo/tsconfig.json'...
|
|
29
29
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/ipinfo@0.3.
|
|
2
|
+
> @prosopo/ipinfo@0.3.25 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/ipinfo@0.3.
|
|
6
|
+
> @prosopo/ipinfo@0.3.25 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -38,4 +38,4 @@ dist/IpInfoService.js 2.73 kB │ gzip: 0.97 kB
|
|
|
38
38
|
dist/backends/ipapi.js 4.07 kB │ gzip: 1.75 kB
|
|
39
39
|
dist/backends/maxmind.js 4.92 kB │ gzip: 1.50 kB
|
|
40
40
|
|
|
41
|
-
[32m✓ built in
|
|
41
|
+
[32m✓ built in 166ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @prosopo/ipinfo
|
|
2
2
|
|
|
3
|
+
## 0.3.25
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [929d99b]
|
|
7
|
+
- Updated dependencies [934fa5d]
|
|
8
|
+
- Updated dependencies [27f525e]
|
|
9
|
+
- Updated dependencies [af267c2]
|
|
10
|
+
- @prosopo/types@5.8.0
|
|
11
|
+
|
|
12
|
+
## 0.3.24
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 162f591: Make the MaxMind fallback answer lookups instead of silently failing all of them.
|
|
16
|
+
|
|
17
|
+
`MaxMindBackend` was configured with `cityDbPath` pointing at `GeoLite2-Country.mmdb` (`MAXMIND_DB_PATH`), and only ever called `city()`. `Reader.open()` accepts any valid `.mmdb`, so the reader opened, `isAvailable()` reported `true`, and the backend advertised itself as a working fallback — but `city()` checks `metadata.databaseType` and throws `BadMethodCallError` against a Country database. The throw was swallowed at `debug` level, `asnReader` was never configured because nothing read a path for it, and every lookup fell through to `{ isValid: false, error: "No MaxMind data available for IP" }`.
|
|
18
|
+
|
|
19
|
+
The failure was invisible for as long as ipapi.is was up, because `IpInfoService` only reaches MaxMind when the ipapi.is lookup fails. When the self-hosted ipapi.is sidecar went down on five production provider nodes, IP lookups did not degrade to MaxMind — they failed outright, and `compareIPs` returned "Failed to lookup both IP addresses" for every request whose challenge IP differed from its solution IP.
|
|
20
|
+
|
|
21
|
+
Three changes:
|
|
22
|
+
|
|
23
|
+
- `MaxMindBackend` latches the database kind on the first `BadMethodCallError` and uses `country()` from then on, so a Country database yields country and country code rather than nothing. The latch means the rejection is constructed once per process, not once per request, and a genuine City database never pays for a second lookup. The mismatch is logged once at `warn` with the offending path, because silent degradation is what let this sit unnoticed.
|
|
24
|
+
- `maxmindAsnDbPath` is read from `MAXMIND_ASN_DB_PATH`. The image has downloaded `GeoLite2-ASN.mmdb` alongside City and Country since the Dockerfile was written, but nothing ever opened it, so the fallback could not name a provider or an AS number.
|
|
25
|
+
- `deepValidateIpAddress` logs `ip1Error` and `ip2Error` alongside the top-level comparison error. "Failed to lookup both IP addresses" on its own does not distinguish an IP that is absent from the database from a backend that is down, and diagnosing the difference meant going onto the host.
|
|
26
|
+
|
|
27
|
+
Deployments should also point `MAXMIND_DB_PATH` at `GeoLite2-City.mmdb`, which the image already ships: country-level data is enough for geoblocking but carries no coordinates, so the IP distance rule cannot run against it.
|
|
28
|
+
|
|
3
29
|
## 0.3.23
|
|
4
30
|
### Patch Changes
|
|
5
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/ipinfo",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.25",
|
|
4
4
|
"description": "IP information service with MaxMind and ipapi.is backends",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@maxmind/geoip2-node": "7.1.0",
|
|
31
31
|
"@prosopo/logger": "2.0.9",
|
|
32
|
-
"@prosopo/types": "5.
|
|
32
|
+
"@prosopo/types": "5.8.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@prosopo/config": "3.3.
|
|
35
|
+
"@prosopo/config": "3.3.15",
|
|
36
36
|
"@types/node": "22.10.2",
|
|
37
37
|
"@vitest/coverage-v8": "4.1.11",
|
|
38
38
|
"del-cli": "6.0.0",
|