@prosopo/cli 3.8.2 → 3.8.4

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.2 build:cjs
2
+ > @prosopo/cli@3.8.4 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -79,11 +79,12 @@ dist/cjs/reloader.cjs 1.87 kB │ gzip: 0.76 kB
79
79
  dist/cjs/commands/migrateAbuserScoreThreshold.cjs 2.17 kB │ gzip: 0.90 kB
80
80
  dist/cjs/argv.cjs 2.30 kB │ gzip: 0.66 kB
81
81
  dist/cjs/start.cjs 2.45 kB │ gzip: 0.84 kB
82
- dist/cjs/commands/siteKeyRegisterApi.cjs 3.48 kB │ gzip: 1.16 kB
83
- dist/cjs/commands/siteKeyRegister.cjs 3.94 kB │ gzip: 1.24 kB
82
+ dist/cjs/commands/siteKeyRegisterApi.cjs 3.70 kB │ gzip: 1.19 kB
83
+ dist/cjs/commands/siteKeyRegister.cjs 4.29 kB │ gzip: 1.30 kB
84
84
  dist/cjs/prosopo.config.cjs 4.58 kB │ gzip: 1.46 kB
85
85
  dist/cjs/RateLimiter.cjs 5.58 kB │ gzip: 0.89 kB
86
86
 
87
+ ✓ built in 48ms
87
88
  [EMPTY_IMPORT_META] `import.meta` may not be a valid syntax with the `cjs` output format.
88
89
  ╭─[ src/prosopo.config.ts:56:21 ]
89
90
  │
@@ -92,4 +93,3 @@ dist/cjs/RateLimiter.cjs 5.58 kB │ gzip: 0.89 kB
92
93
   │ ╰─────── 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`.
93
94
  ────╯
94
95
  
95
- ✓ built in 40ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/cli@3.8.2 build:tsc
2
+ > @prosopo/cli@3.8.4 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 6:47:56 PM - Projects in this build:
5
+ 1:57:00 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -29,55 +29,55 @@
29
29
  * ../../dev/workspace/tsconfig.json
30
30
  * tsconfig.json
31
31
 
32
- 6:47:56 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'
32
+ 1:57:00 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
33
 
34
- 6:47:56 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
34
+ 1:57:00 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
35
35
 
36
- 6:47:56 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
36
+ 1:57:00 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
37
37
 
38
- 6:47:56 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'
38
+ 1:57:00 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
39
 
40
- 6:47:56 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'
40
+ 1:57:00 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/index.ts' is older than output '../types/tsconfig.tsbuildinfo'
41
41
 
42
- 6:47:56 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
42
+ 1:57:00 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
43
43
 
44
- 6:47:56 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/tests/loggerBrowser.unit.test.ts' is older than output '../logger/tsconfig.tsbuildinfo'
44
+ 1:57:00 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
45
45
 
46
- 6:47:56 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/tests/utils/batches.unit.test.ts' is older than output '../common/tsconfig.tsbuildinfo'
46
+ 1:57:00 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
47
47
 
48
- 6:47:56 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/index.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
48
+ 1:57:00 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/index.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
49
49
 
50
- 6:47:56 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/types.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
50
+ 1:57:00 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
51
51
 
52
- 6:47:56 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'
52
+ 1:57:00 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/index.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
53
53
 
54
- 6:47:56 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'
54
+ 1:57:00 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
55
 
56
- 6:47:56 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/ruleRecord.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
56
+ 1:57:00 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/rule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
57
57
 
58
- 6:47:56 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'
58
+ 1:57:00 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/index.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
59
59
 
60
- 6:47:56 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/unit/redisCacheEscalation.unit.test.ts' is older than output '../database/tsconfig.tsbuildinfo'
60
+ 1:57:00 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/mongoGlobalSetup.ts' is older than output '../database/tsconfig.tsbuildinfo'
61
61
 
62
- 6:47:56 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'
62
+ 1:57:00 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
63
63
 
64
- 6:47:56 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'
64
+ 1:57:00 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'
65
65
 
66
- 6:47:57 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/env.ts' is older than output '../env/tsconfig.tsbuildinfo'
66
+ 1:57:00 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/index.ts' is older than output '../env/tsconfig.tsbuildinfo'
67
67
 
68
- 6:47:57 PM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/apiExpressRouterFactory.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
68
+ 1:57:00 PM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/tests/unit/testDoubles.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
69
69
 
70
- 6:47:57 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
70
+ 1:57:00 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
71
71
 
72
- 6:47:57 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/index.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
72
+ 1:57:00 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'
73
73
 
74
- 6:47:57 PM - Project '../puzzle-assets/tsconfig.json' is up to date because newest input '../puzzle-assets/src/browser.ts' is older than output '../puzzle-assets/tsconfig.tsbuildinfo'
74
+ 1:57:00 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'
75
75
 
76
- 6:47:57 PM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/util.ts' is older than output '../provider/tsconfig.tsbuildinfo'
76
+ 1:57:00 PM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/util.ts' is older than output '../provider/tsconfig.tsbuildinfo'
77
77
 
78
- 6:47:57 PM - Project '../../dev/workspace/tsconfig.json' is up to date because newest input '../../dev/workspace/src/tests/projectInfo.unit.test.ts' is older than output '../../dev/workspace/tsconfig.tsbuildinfo'
78
+ 1:57:00 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'
79
79
 
80
- 6:47:57 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
80
+ 1:57:00 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
81
81
 
82
- 6:47:57 PM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
82
+ 1:57:00 PM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
83
83
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/cli@3.8.2 build
2
+ > @prosopo/cli@3.8.4 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/cli@3.8.2 build:cross-env
6
+ > @prosopo/cli@3.8.4 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -83,9 +83,9 @@ dist/reloader.js 1.62 kB │ gzip: 0.69 kB
83
83
  dist/argv.js 1.98 kB │ gzip: 0.59 kB
84
84
  dist/commands/migrateAbuserScoreThreshold.js 2.11 kB │ gzip: 0.89 kB
85
85
  dist/start.js 2.23 kB │ gzip: 0.82 kB
86
- dist/commands/siteKeyRegisterApi.js 3.39 kB │ gzip: 1.15 kB
87
- dist/commands/siteKeyRegister.js 3.77 kB │ gzip: 1.24 kB
86
+ dist/commands/siteKeyRegisterApi.js 3.63 kB │ gzip: 1.19 kB
87
+ dist/commands/siteKeyRegister.js 4.16 kB │ gzip: 1.31 kB
88
88
  dist/prosopo.config.js 4.43 kB │ gzip: 1.47 kB
89
89
  dist/RateLimiter.js 5.16 kB │ gzip: 0.89 kB
90
90
 
91
- ✓ built in 50ms
91
+ ✓ built in 42ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,72 @@
1
1
  # @prosopo/cli
2
2
 
3
+ ## 3.8.4
4
+ ### Patch Changes
5
+
6
+ - a62b994: Context-aware validation buckets by device type, not just webview.
7
+
8
+ Context-aware validation compares a session's head SimHash against a baseline
9
+ for its context. That context was `default | webview`, which puts a phone and
10
+ a desktop in the same bucket — and those two emit genuinely different
11
+ `<head>`s, so the blended baseline matches neither well. Contexts are now the
12
+ device family crossed with the webview flag: `desktop`, `desktop-webview`,
13
+ `mobile`, `mobile-webview`, `tablet`, `tablet-webview`.
14
+
15
+ `desktop-webview` is included deliberately. Desktop webviews are a real and
16
+ notably fraudulent population here (see the Twickets desktop-webview rules),
17
+ and folding them into the plain `desktop` baseline would let exactly the
18
+ traffic we want excluded define what "normal desktop" looks like.
19
+
20
+ **Classification.** `deviceTypeFromUserAgent` in `@prosopo/types` is a
21
+ dependency-free UA classifier, deliberately not ua-parser-js: this module is
22
+ imported by the browser bundles, and the off-provider entropy sweep has to
23
+ bucket stored sessions *identically* or it writes baselines the decision
24
+ machine never looks up. One shared function keeps the two sides in lockstep.
25
+ Tablets are matched before phones because an iPad's UA carries a
26
+ `Mobile/<build>` token and an Android tablet is exactly "Android without
27
+ Mobile". Known gap, documented at the call site: an iPadOS 13+ Safari in
28
+ desktop mode identifies as a Mac and lands in `desktop` — nothing in the UA
29
+ separates it from a real Mac, and both sides make the same call, which is
30
+ what matters for the lookup.
31
+
32
+ **Back-compat.** `default` and `webview` remain valid `ContextType` members,
33
+ so settings already stored against them keep parsing. `expandContexts` maps a
34
+ legacy `default` onto the three non-webview families and a legacy `webview`
35
+ onto the three webview families, at the threshold they were saved with; an
36
+ explicit device entry always wins over the legacy entry covering it. Nothing
37
+ downstream of settings parsing branches on the legacy keys, and no data
38
+ migration is required.
39
+
40
+ **Behaviour change.** A request whose context is not configured now skips
41
+ context validation instead of borrowing another context's baseline.
42
+ Previously, configuring a single context validated *every* request against it
43
+ — with six contexts that would measure desktop traffic against a tablet
44
+ baseline and reject real users wholesale. `isContextConfigured` is the new
45
+ guard; `determineContextType` now takes the raw request UA alongside the
46
+ webview flag.
47
+
48
+ New site-key registrations default to all six device contexts.
49
+ - a447afa: Per-sitekey `imageMinRounds` alongside the existing `imageMaxRounds`.
50
+
51
+ Every source of an image round count — access-policy rules, traffic-filter categories, routing machines, the staleness curve, and the provider's own heuristics — is now clamped into `[imageMinRounds, imageMaxRounds]` via `clampImageRounds`, so the sitekey's settings override its rules in both directions rather than only capping them. `imageMinRounds` defaults to 2, matching the floor that was previously hard-coded, so existing sitekeys are unaffected.
52
+ - Updated dependencies [a62b994]
53
+ - Updated dependencies [a447afa]
54
+ - @prosopo/types@5.5.3
55
+ - @prosopo/provider@5.6.4
56
+ - @prosopo/api@4.1.4
57
+ - @prosopo/env@3.6.49
58
+ - @prosopo/keyring@2.9.83
59
+
60
+ ## 3.8.3
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [458cf17]
64
+ - @prosopo/provider@5.6.3
65
+ - @prosopo/types@5.5.2
66
+ - @prosopo/api@4.1.3
67
+ - @prosopo/env@3.6.48
68
+ - @prosopo/keyring@2.9.82
69
+
3
70
  ## 3.8.2
4
71
  ### Patch Changes
5
72