@prosopo/cli 3.8.6 → 3.8.7

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/cli@3.8.6 build:cjs
2
+ > @prosopo/cli@3.8.7 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -94,4 +94,4 @@ dist/cjs/RateLimiter.cjs 5.58 kB │ gzip: 0.89 kB
94
94
   │ ╰─────── This `import.meta` will be replaced with an empty object (`{}`) automatically. If this is desired, you can suppress this warning by adding `transform.define: { 'import.meta': {} }`. If `import.meta` needs to be kept as-is, you need to set the output format to `esm`.
95
95
  ────╯
96
96
  
97
- ✓ built in 64ms
97
+ ✓ built in 30ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/cli@3.8.6 build:tsc
2
+ > @prosopo/cli@3.8.7 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 1:16:13 PM - Projects in this build:
5
+ 8:02:33 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -30,57 +30,57 @@
30
30
  * ../../dev/workspace/tsconfig.json
31
31
  * tsconfig.json
32
32
 
33
- 1:16:14 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
33
+ 8:02:33 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/NodejsPolarsNativeFilePlugin.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
34
34
 
35
- 1:16:14 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
35
+ 8:02:33 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
36
36
 
37
- 1:16:14 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
37
+ 8:02:33 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
38
38
 
39
- 1:16:14 PM - 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'
39
+ 8:02:34 PM - 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'
40
40
 
41
- 1:16:14 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
41
+ 8:02:34 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
42
42
 
43
- 1:16:14 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
43
+ 8:02:34 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
44
44
 
45
- 1:16:14 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
45
+ 8:02:34 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
46
46
 
47
- 1:16:14 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/utils/batches.ts' is older than output '../common/tsconfig.tsbuildinfo'
47
+ 8:02:34 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
48
48
 
49
- 1:16:14 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/env.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
49
+ 8:02:34 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/index.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
50
50
 
51
- 1:16:14 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
51
+ 8:02:34 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
52
52
 
53
- 1:16:14 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
53
+ 8:02:34 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/tests/apiRoute.unit.test.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
54
54
 
55
- 1:16:14 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
55
+ 8:02:34 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/tests/testRedisConnection.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
56
56
 
57
- 1:16:14 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/transformRule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
57
+ 8:02:34 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/transformRule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
58
58
 
59
- 1:16:14 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/types.test-d.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
59
+ 8:02:34 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/types.test-d.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
60
60
 
61
- 1:16:14 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/unit/captchaLabel.unit.test.ts' is older than output '../database/tsconfig.tsbuildinfo'
61
+ 8:02:34 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/unit/captchaLabel.unit.test.ts' is older than output '../database/tsconfig.tsbuildinfo'
62
62
 
63
- 1:16:14 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/keyring/keyring.test.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
63
+ 8:02:34 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
64
64
 
65
- 1:16:14 PM - Project '../types-env/tsconfig.json' is up to date because newest input '../types-env/src/env.ts' is older than output '../types-env/tsconfig.tsbuildinfo'
65
+ 8:02:34 PM - Project '../types-env/tsconfig.json' is up to date because newest input '../types-env/src/index.ts' is older than output '../types-env/tsconfig.tsbuildinfo'
66
66
 
67
- 1:16:14 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/index.ts' is older than output '../env/tsconfig.tsbuildinfo'
67
+ 8:02:34 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/env.ts' is older than output '../env/tsconfig.tsbuildinfo'
68
68
 
69
- 1:16:14 PM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/errorHandler.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
69
+ 8:02:34 PM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/middlewares/requestLoggerMiddleware.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
70
70
 
71
- 1:16:14 PM - Project '../captcha-severity/tsconfig.json' is up to date because newest input '../captcha-severity/src/index.test.ts' is older than output '../captcha-severity/tsconfig.tsbuildinfo'
71
+ 8:02:34 PM - Project '../captcha-severity/tsconfig.json' is up to date because newest input '../captcha-severity/src/index.test.ts' is older than output '../captcha-severity/tsconfig.tsbuildinfo'
72
72
 
73
- 1:16:14 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/dataset.unit.test.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
73
+ 8:02:34 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
74
74
 
75
- 1:16:14 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
75
+ 8:02:34 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
76
76
 
77
- 1:16:14 PM - Project '../puzzle-assets/tsconfig.json' is up to date because newest input '../puzzle-assets/src/background.ts' is older than output '../puzzle-assets/tsconfig.tsbuildinfo'
77
+ 8:02:34 PM - Project '../puzzle-assets/tsconfig.json' is up to date because newest input '../puzzle-assets/src/background.ts' is older than output '../puzzle-assets/tsconfig.tsbuildinfo'
78
78
 
79
- 1:16:14 PM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/util.ts' is older than output '../provider/tsconfig.tsbuildinfo'
79
+ 8:02:34 PM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/util.ts' is older than output '../provider/tsconfig.tsbuildinfo'
80
80
 
81
- 1:16:14 PM - Project '../../dev/workspace/tsconfig.json' is up to date because newest input '../../dev/workspace/src/index.ts' is older than output '../../dev/workspace/tsconfig.tsbuildinfo'
81
+ 8:02:34 PM - Project '../../dev/workspace/tsconfig.json' is up to date because newest input '../../dev/workspace/src/index.ts' is older than output '../../dev/workspace/tsconfig.tsbuildinfo'
82
82
 
83
- 1:16:14 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
83
+ 8:02:34 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
84
84
 
85
- 1:16:14 PM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
85
+ 8:02:34 PM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
86
86
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/cli@3.8.6 build
2
+ > @prosopo/cli@3.8.7 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/cli@3.8.6 build:cross-env
6
+ > @prosopo/cli@3.8.7 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -90,4 +90,4 @@ dist/commands/siteKeyRegister.js 3.91 kB │ gzip: 1.22 kB
90
90
  dist/prosopo.config.js 4.49 kB │ gzip: 1.48 kB
91
91
  dist/RateLimiter.js 5.16 kB │ gzip: 0.89 kB
92
92
 
93
- ✓ built in 62ms
93
+ ✓ built in 39ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @prosopo/cli
2
2
 
3
+ ## 3.8.7
4
+ ### Patch Changes
5
+
6
+ - 162f591: Make the MaxMind fallback answer lookups instead of silently failing all of them.
7
+
8
+ `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" }`.
9
+
10
+ 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.
11
+
12
+ Three changes:
13
+
14
+ - `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.
15
+ - `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.
16
+ - `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.
17
+
18
+ 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.
19
+ - Updated dependencies [162f591]
20
+ - Updated dependencies [9149dff]
21
+ - @prosopo/provider@5.8.1
22
+ - @prosopo/env@3.6.52
23
+
3
24
  ## 3.8.6
4
25
  ### Patch Changes
5
26
 
@@ -1659,7 +1659,7 @@ function Gt(e, t, n) {
1659
1659
  }
1660
1660
  //#endregion
1661
1661
  //#region ../util/dist/version.js
1662
- var Kt = (typeof process < "u" ? "3.8.6" : void 0) || "dev", qt = Array(256), Jt = Array(256 * 256);
1662
+ var Kt = (typeof process < "u" ? "3.8.7" : void 0) || "dev", qt = Array(256), Jt = Array(256 * 256);
1663
1663
  for (let e = 0; e < 256; e++) qt[e] = e.toString(16).padStart(2, "0");
1664
1664
  for (let e = 0; e < 256; e++) {
1665
1665
  let t = e << 8;
@@ -87723,7 +87723,8 @@ var Dz = (e) => typeof e == "object" && !!e && "_bsontype" in e && e._bsontype =
87723
87723
  ipInfo: 1,
87724
87724
  behavioralDataPacked: 1,
87725
87725
  deviceCapability: 1,
87726
- coords: 1
87726
+ coords: 1,
87727
+ clientMetaData: 1
87727
87728
  };
87728
87729
  }
87729
87730
  async getDappUserCommitmentById(t) {
@@ -115349,7 +115350,7 @@ var s7 = new Yle(), c7 = (e, t = 500) => new Xle(e, t), l7 = "x-tls-syn-ns", u7
115349
115350
  ...n.chelloToHandshakeUs !== void 0 && { chelloToHandshakeUs: n.chelloToHandshakeUs },
115350
115351
  ...S7(n)
115351
115352
  });
115352
- let De = n.ipInfo && "isValid" in n.ipInfo && n.ipInfo.isValid ? n.ipInfo.isMobile : void 0, Oe = xe ?? "", ke = e8(T.settings?.trafficFilter);
115353
+ let De = n.ipInfo && "isValid" in n.ipInfo && n.ipInfo.isValid ? n.ipInfo.isMobile : void 0, Oe = String(n.headers["user-agent"] ?? ""), ke = e8(T.settings?.trafficFilter);
115353
115354
  b.frictionlessManager.setRoutingContext({
115354
115355
  dappAccount: s,
115355
115356
  userAccount: c,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/cli",
3
- "version": "3.8.6",
3
+ "version": "3.8.7",
4
4
  "description": "CLI for Prosopo Provider",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -39,10 +39,10 @@
39
39
  "@prosopo/common": "3.1.54",
40
40
  "@prosopo/logger": "2.0.9",
41
41
  "@prosopo/dotenv": "3.0.55",
42
- "@prosopo/env": "3.6.51",
42
+ "@prosopo/env": "3.6.52",
43
43
  "@prosopo/keyring": "2.9.85",
44
44
  "@prosopo/locale": "3.4.1",
45
- "@prosopo/provider": "5.8.0",
45
+ "@prosopo/provider": "5.8.1",
46
46
  "@prosopo/types": "5.7.0",
47
47
  "@prosopo/util": "3.3.9",
48
48
  "@prosopo/workspace": "3.2.1",