@prosopo/cli 3.8.37 → 3.9.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.
Files changed (40) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +9 -4
  2. package/.turbo/turbo-build$colon$tsc.log +37 -31
  3. package/.turbo/turbo-build.log +9 -4
  4. package/CHANGELOG.md +84 -0
  5. package/Dockerfile +6 -0
  6. package/dist/argv.d.ts.map +1 -1
  7. package/dist/argv.js +3 -1
  8. package/dist/argv.js.map +1 -1
  9. package/dist/bundle/prosopo-native-puzzle.node +0 -0
  10. package/dist/bundle/provider.cli.bundle.js +89028 -88716
  11. package/dist/cjs/argv.cjs +3 -1
  12. package/dist/cjs/commands/detectorPoolSet.cjs +51 -0
  13. package/dist/cjs/commands/ensureExternalIndexes.cjs +1 -1
  14. package/dist/cjs/commands/ensureIndexes.cjs +1 -1
  15. package/dist/cjs/commands/index.cjs +2 -0
  16. package/dist/cjs/commands/migrateAbuserScoreThreshold.cjs +1 -1
  17. package/dist/cjs/commands/providerSetDataset.cjs +1 -1
  18. package/dist/cjs/commands/siteKeyRegister.cjs +2 -2
  19. package/dist/cjs/commands/siteKeyRegisterApi.cjs +1 -1
  20. package/dist/cjs/commands/storeCaptchasExternally.cjs +1 -1
  21. package/dist/cjs/commands/updateSpamEmailDomains.cjs +1 -1
  22. package/dist/cjs/start.cjs +1 -1
  23. package/dist/commands/detectorPoolSet.d.ts +14 -0
  24. package/dist/commands/detectorPoolSet.d.ts.map +1 -0
  25. package/dist/commands/detectorPoolSet.js +51 -0
  26. package/dist/commands/detectorPoolSet.js.map +1 -0
  27. package/dist/commands/ensureExternalIndexes.js +1 -1
  28. package/dist/commands/ensureIndexes.js +1 -1
  29. package/dist/commands/index.d.ts +1 -0
  30. package/dist/commands/index.d.ts.map +1 -1
  31. package/dist/commands/index.js +2 -1
  32. package/dist/commands/index.js.map +1 -1
  33. package/dist/commands/migrateAbuserScoreThreshold.js +1 -1
  34. package/dist/commands/providerSetDataset.js +1 -1
  35. package/dist/commands/siteKeyRegister.js +2 -2
  36. package/dist/commands/siteKeyRegisterApi.js +1 -1
  37. package/dist/commands/storeCaptchasExternally.js +1 -1
  38. package/dist/commands/updateSpamEmailDomains.js +1 -1
  39. package/dist/start.js +1 -1
  40. package/package.json +9 -9
@@ -27,6 +27,8 @@ ViteCommonJSConfig: .
27
27
  '/home/runner/work/captcha/captcha/packages/datasets/tsconfig.json',
28
28
  '/home/runner/work/captcha/captcha/packages/icon-order-assets/tsconfig.json',
29
29
  '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
30
+ '/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
31
+ '/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
30
32
  '/home/runner/work/captcha/captcha/packages/web-bot-auth/tsconfig.json'
31
33
  ]
32
34
  }
@@ -57,6 +59,8 @@ ViteCommonJSConfig: .
57
59
  '@prosopo/datasets',
58
60
  '@prosopo/icon-order-assets',
59
61
  '@prosopo/load-balancer',
62
+ '@prosopo/fingerprint',
63
+ '@prosopo/fingerprintjs',
60
64
  '@prosopo/web-bot-auth'
61
65
  ]
62
66
  }
@@ -64,7 +68,7 @@ ViteCommonJSConfig: .
64
68
  vite v8.1.6 building ssr environment for production...
65
69
  Bundle build started
66
70
  
67
- ✓ 21 modules transformed.
71
+ ✓ 22 modules transformed.
68
72
  rendering chunks...
69
73
  computing gzip size...
70
74
  dist/cjs/commands/version.cjs 0.52 kB │ gzip: 0.29 kB
@@ -76,14 +80,15 @@ dist/cjs/process.env.cjs 0.99 kB │ gzip: 0.42 kB
76
80
  dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
77
81
  dist/cjs/commands/ensureExternalIndexes.cjs 1.07 kB │ gzip: 0.50 kB
78
82
  dist/cjs/files.cjs 1.27 kB │ gzip: 0.58 kB
79
- dist/cjs/commands/index.cjs 1.30 kB │ gzip: 0.29 kB
83
+ dist/cjs/commands/index.cjs 1.43 kB │ gzip: 0.31 kB
80
84
  dist/cjs/commands/providerSetDataset.cjs 1.49 kB │ gzip: 0.65 kB
81
85
  dist/cjs/commands/updateSpamEmailDomains.cjs 1.58 kB │ gzip: 0.65 kB
82
86
  dist/cjs/cli.cjs 1.76 kB │ gzip: 0.64 kB
83
87
  dist/cjs/reloader.cjs 1.87 kB │ gzip: 0.76 kB
88
+ dist/cjs/commands/detectorPoolSet.cjs 2.01 kB │ gzip: 0.95 kB
84
89
  dist/cjs/commands/migrateAbuserScoreThreshold.cjs 2.17 kB │ gzip: 0.90 kB
85
- dist/cjs/argv.cjs 2.30 kB │ gzip: 0.66 kB
86
90
  dist/cjs/start.cjs 2.45 kB │ gzip: 0.84 kB
91
+ dist/cjs/argv.cjs 2.45 kB │ gzip: 0.68 kB
87
92
  dist/cjs/commands/siteKeyRegisterApi.cjs 3.85 kB │ gzip: 1.22 kB
88
93
  dist/cjs/commands/siteKeyRegister.cjs 4.22 kB │ gzip: 1.26 kB
89
94
  dist/cjs/prosopo.config.cjs 4.63 kB │ gzip: 1.47 kB
@@ -97,4 +102,4 @@ dist/cjs/RateLimiter.cjs 7.05 kB │ gzip: 1.02 kB
97
102
   │ ╰─────── 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`.
98
103
  ────╯
99
104
  
100
- ✓ built in 35ms
105
+ ✓ built in 65ms
@@ -1,5 +1,5 @@
1
1
  $ tsc --build --verbose
2
- 7:41:26 PM - Projects in this build:
2
+ 4:00:36 PM - Projects in this build:
3
3
  * ../../dev/config/tsconfig.json
4
4
  * ../util/tsconfig.json
5
5
  * ../locale/tsconfig.json
@@ -25,68 +25,74 @@ $ tsc --build --verbose
25
25
  * ../datasets/tsconfig.json
26
26
  * ../icon-order-assets/tsconfig.json
27
27
  * ../load-balancer/tsconfig.json
28
+ * ../fingerprintjs/tsconfig.json
29
+ * ../fingerprint/tsconfig.json
28
30
  * ../web-bot-auth/tsconfig.json
29
31
  * ../provider/tsconfig.json
30
32
  * ../../dev/workspace/tsconfig.json
31
33
  * tsconfig.json
32
34
 
33
- 7:41:26 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'
35
+ 4:00:36 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'
34
36
 
35
- 7:41:26 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
37
+ 4:00:36 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
36
38
 
37
- 7:41:26 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/process.ts' is older than output '../locale/tsconfig.tsbuildinfo'
39
+ 4:00:36 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/process.ts' is older than output '../locale/tsconfig.tsbuildinfo'
38
40
 
39
- 7:41:26 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'
41
+ 4:00:36 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
42
 
41
- 7:41:26 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'
43
+ 4:00:36 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
44
 
43
- 7:41:26 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
45
+ 4:00:36 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
44
46
 
45
- 7:41:26 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/tests/utils/objectUtils.unit.test.ts' is older than output '../common/tsconfig.tsbuildinfo'
47
+ 4:00:36 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/tests/errorSites.unit.test.ts' is older than output '../common/tsconfig.tsbuildinfo'
46
48
 
47
- 7:41:26 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'
49
+ 4:00:36 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'
48
50
 
49
- 7:41:26 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/env.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
51
+ 4:00:36 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/tests/env.unit.test.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
50
52
 
51
- 7:41:26 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/types.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
53
+ 4:00:36 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
52
54
 
53
- 7:41:26 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'
55
+ 4:00:36 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
56
 
55
- 7:41:26 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'
57
+ 4:00:36 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'
56
58
 
57
- 7:41:26 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'
59
+ 4:00:36 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
60
 
59
- 7:41:26 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'
61
+ 4:00:36 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'
60
62
 
61
- 7:41:26 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'
63
+ 4:00:36 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
64
 
63
- 7:41:26 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'
65
+ 4:00:36 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'
64
66
 
65
- 7:41:26 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'
67
+ 4:00:36 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
68
 
67
- 7:41:27 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/tests/env.maintenance.unit.test.ts' is older than output '../env/tsconfig.tsbuildinfo'
69
+ 4:00:37 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/env.ts' is older than output '../env/tsconfig.tsbuildinfo'
68
70
 
69
- 7:41:27 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'
71
+ 4:00:37 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'
70
72
 
71
- 7:41:27 PM - Project '../puzzle-assets/tsconfig.json' is up to date because newest input '../puzzle-assets/src/types.ts' is older than output '../puzzle-assets/tsconfig.tsbuildinfo'
73
+ 4:00:37 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'
72
74
 
73
- 7:41:27 PM - Project '../audio-assets/tsconfig.json' is up to date because newest input '../audio-assets/src/distort.ts' is older than output '../audio-assets/tsconfig.tsbuildinfo'
75
+ 4:00:37 PM - Project '../audio-assets/tsconfig.json' is up to date because newest input '../audio-assets/src/distort.ts' is older than output '../audio-assets/tsconfig.tsbuildinfo'
74
76
 
75
- 7:41:27 PM - Project '../captcha-severity/tsconfig.json' is up to date because newest input '../captcha-severity/src/index.ts' is older than output '../captcha-severity/tsconfig.tsbuildinfo'
77
+ 4:00:37 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'
76
78
 
77
- 7:41:27 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/errorSites.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
79
+ 4:00:37 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/mocks/data/captchas.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
78
80
 
79
- 7:41:27 PM - Project '../icon-order-assets/tsconfig.json' is up to date because newest input '../icon-order-assets/src/background.ts' is older than output '../icon-order-assets/tsconfig.tsbuildinfo'
81
+ 4:00:37 PM - Project '../icon-order-assets/tsconfig.json' is up to date because newest input '../icon-order-assets/src/background.ts' is older than output '../icon-order-assets/tsconfig.tsbuildinfo'
80
82
 
81
- 7:41:27 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'
83
+ 4:00:37 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/tests/productionProviderList.unit.test.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
82
84
 
83
- 7:41:27 PM - Project '../web-bot-auth/tsconfig.json' is up to date because newest input '../web-bot-auth/src/base64.ts' is older than output '../web-bot-auth/tsconfig.tsbuildinfo'
85
+ 4:00:37 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
84
86
 
85
- 7:41:27 PM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/utils/devicePlatform.ts' is older than output '../provider/tsconfig.tsbuildinfo'
87
+ 4:00:37 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.test.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
86
88
 
87
- 7:41:27 PM - Project '../../dev/workspace/tsconfig.json' is up to date because newest input '../../dev/workspace/src/projectInfo.ts' is older than output '../../dev/workspace/tsconfig.tsbuildinfo'
89
+ 4:00:37 PM - Project '../web-bot-auth/tsconfig.json' is up to date because newest input '../web-bot-auth/src/base64.ts' is older than output '../web-bot-auth/tsconfig.tsbuildinfo'
88
90
 
89
- 7:41:27 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
91
+ 4:00:37 PM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/utils/devicePlatform.ts' is older than output '../provider/tsconfig.tsbuildinfo'
90
92
 
91
- 7:41:27 PM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
93
+ 4:00:37 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'
94
+
95
+ 4:00:37 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
96
+
97
+ 4:00:37 PM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
92
98
 
@@ -28,6 +28,8 @@ ViteEsmConfig: .
28
28
  '/home/runner/work/captcha/captcha/packages/datasets/tsconfig.json',
29
29
  '/home/runner/work/captcha/captcha/packages/icon-order-assets/tsconfig.json',
30
30
  '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
31
+ '/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
32
+ '/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
31
33
  '/home/runner/work/captcha/captcha/packages/web-bot-auth/tsconfig.json'
32
34
  ]
33
35
  }
@@ -58,6 +60,8 @@ ViteEsmConfig: .
58
60
  '@prosopo/datasets',
59
61
  '@prosopo/icon-order-assets',
60
62
  '@prosopo/load-balancer',
63
+ '@prosopo/fingerprint',
64
+ '@prosopo/fingerprintjs',
61
65
  '@prosopo/web-bot-auth'
62
66
  ]
63
67
  }
@@ -65,7 +69,7 @@ ViteEsmConfig: .
65
69
  vite v8.1.6 building ssr environment for production...
66
70
  Bundle build started
67
71
  
68
- ✓ 21 modules transformed.
72
+ ✓ 22 modules transformed.
69
73
  rendering chunks...
70
74
  computing gzip size...
71
75
  dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
@@ -77,17 +81,18 @@ dist/commands/storeCaptchasExternally.js 0.86 kB │ gzip: 0.44 kB
77
81
  dist/process.env.js 0.90 kB │ gzip: 0.40 kB
78
82
  dist/commands/ensureExternalIndexes.js 1.01 kB │ gzip: 0.49 kB
79
83
  dist/files.js 1.04 kB │ gzip: 0.50 kB
80
- dist/commands/index.js 1.12 kB │ gzip: 0.29 kB
84
+ dist/commands/index.js 1.23 kB │ gzip: 0.31 kB
81
85
  dist/commands/providerSetDataset.js 1.31 kB │ gzip: 0.60 kB
82
86
  dist/cli.js 1.34 kB │ gzip: 0.55 kB
83
87
  dist/commands/updateSpamEmailDomains.js 1.53 kB │ gzip: 0.64 kB
84
88
  dist/reloader.js 1.62 kB │ gzip: 0.69 kB
85
- dist/argv.js 1.98 kB │ gzip: 0.59 kB
89
+ dist/commands/detectorPoolSet.js 1.97 kB │ gzip: 0.94 kB
86
90
  dist/commands/migrateAbuserScoreThreshold.js 2.11 kB │ gzip: 0.89 kB
91
+ dist/argv.js 2.12 kB │ gzip: 0.62 kB
87
92
  dist/start.js 2.23 kB │ gzip: 0.82 kB
88
93
  dist/commands/siteKeyRegisterApi.js 3.81 kB │ gzip: 1.23 kB
89
94
  dist/commands/siteKeyRegister.js 4.10 kB │ gzip: 1.26 kB
90
95
  dist/prosopo.config.js 4.49 kB │ gzip: 1.48 kB
91
96
  dist/RateLimiter.js 6.52 kB │ gzip: 1.02 kB
92
97
 
93
- ✓ built in 39ms
98
+ ✓ built in 124ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,89 @@
1
1
  # @prosopo/cli
2
2
 
3
+ ## 3.9.0
4
+ ### Minor Changes
5
+
6
+ - 159766a: Let a self-hosted provider run a detector you built yourself, and ship a working example built on BotD.
7
+
8
+ Until now the only detector a provider could load was ours. Its output can only be read by the closed decoder in the
9
+ provider, so a self-hosted node with any other detector had nothing to score visitors with.
10
+
11
+ **Open detector format.** A pool bundle can now be marked `format: "open-v1"`. The provider reads those bundles with a
12
+ short, documented decoder: an AES-256-GCM payload whose key is wrapped with the bundle's RSA-OAEP public key, carrying
13
+ `{ score, timestamp, userId, userAgent, headHash, d }`. The same checks apply as for our detector — the token must
14
+ match this visitor's account, user agent and page, and be under ten minutes old — and `d` reaches decision and routing
15
+ machines as `input.d`. Open bundles are only loaded when `PROSOPO_DETECTOR_OPEN_FORMAT=1`; the hosted fleet never sets
16
+ it, so nothing changes there.
17
+
18
+ **`demos/detector-botd`.** A detector built on BotD that scores automated browsers as 1 and everything else as 0, plus a
19
+ `pool` script that builds the bundles with a fresh keypair each. Writing your own detector means replacing one function;
20
+ the encryption is done for you.
21
+
22
+ **`detector_pool_set` CLI command.** Writes a pool read from stdin into the provider's pool directory. Stdin rather than a
23
+ file because the provider image runs as a non-root user and cannot read a file copied in as root.
24
+
25
+ **Self-hosted compose and image.** The image now creates its pool directory owned by the runtime user, and the
26
+ self-hosted compose file mounts a `detector_pool` volume there and turns the open format on. The compose file no longer
27
+ defaults to provider 3.8.19, which it had silently stayed on for nineteen releases: `generateSelfHostedEnv.ts` writes
28
+ the version of the checkout it runs from.
29
+
30
+ `SELF_HOSTING.md` gains a "Bring your own detector" section and now loads the widget with `type="module"`, which the
31
+ bundle has needed since it was split into chunks.
32
+
33
+ Tested end to end on a stack built from this branch: stock headless Chromium was flagged by BotD and served a puzzle,
34
+ headed Chromium passed with proof of work, the detector's signals were stored on the session, and a provider without
35
+ the flag rejected the pool.
36
+
37
+ ### Patch Changes
38
+
39
+ - 5a1db28: Fix four things that broke the self-hosting guide for anyone starting from a fresh clone.
40
+
41
+ - **The `fingerprintjs` submodule used an SSH URL**, so it could only be fetched by someone with GitHub SSH keys. It is
42
+ now HTTPS. The repository is public, so nobody needs credentials for it. Without it `pnpm run build:all` fails.
43
+ - **The guide ran the env script before anything was built.** The script imports built workspace packages, so on a fresh
44
+ clone it crashed with `ERR_MODULE_NOT_FOUND`. The guide now clones with `--recurse-submodules` and runs
45
+ `pnpm run build:all` in step 1.
46
+ - **Every `docker compose exec` in the guide failed** with "no configuration file provided", because the compose file is
47
+ not named `docker-compose.yml`. `generateSelfHostedEnv.ts` now writes `COMPOSE_FILE=docker-compose.self-hosted.yml`
48
+ into `.env`, which Compose reads on its own, so plain `docker compose` commands work.
49
+ - **The provider CLI exited 0 on a command it did not have.** An older image given `detector_pool_set` did nothing and
50
+ reported success. It now fails with `Unknown command`.
51
+ - Updated dependencies [d02b3bc]
52
+ - Updated dependencies [b460b0b]
53
+ - Updated dependencies [159766a]
54
+ - @prosopo/provider@5.21.0
55
+ - @prosopo/locale@3.13.0
56
+ - @prosopo/types@5.18.0
57
+ - @prosopo/env@3.6.80
58
+ - @prosopo/api@4.7.6
59
+ - @prosopo/common@3.3.0
60
+ - @prosopo/keyring@2.10.11
61
+
62
+ ## 3.8.38
63
+ ### Patch Changes
64
+
65
+ - 749fe8a: Finish holding express at 4, and build `@prosopo/fingerprint` before the
66
+ provider that imports it.
67
+
68
+ v3.8.37 pinned `@prosopo/locale` back to express 4 because the i18next
69
+ middleware has no express 5 typings, but left `provider`, `cli`,
70
+ `api-express-router` and the two demos on express 5. That split the workspace:
71
+ `provider` takes the middleware handler from `locale`, which is now typed for
72
+ express 4, and hands it to its own express 5 `app.use`, which does not accept
73
+ it. All six are on express 4 now.
74
+
75
+ Separately, `packages/provider` gained a dependency on `@prosopo/fingerprint`
76
+ without a matching tsconfig project reference, so `tsc --build` did not build
77
+ it first. A full build hid this because something else built fingerprint
78
+ earlier; a partial build of just the packages a consumer needs did not, and
79
+ failed with "Cannot find module '@prosopo/fingerprint/summary'". The reference
80
+ is now declared.
81
+
82
+ Lift the express pins together with the dependabot ignore once the middleware
83
+ ships express 5 typings.
84
+ - Updated dependencies [749fe8a]
85
+ - @prosopo/provider@5.20.2
86
+
3
87
  ## 3.8.37
4
88
  ### Patch Changes
5
89
 
package/Dockerfile CHANGED
@@ -22,6 +22,12 @@ COPY ./packages/cli/dist/bundle/ ./
22
22
 
23
23
  COPY ./packages/locale/dist/locales/ ./locales/
24
24
 
25
+ # Created here so it reaches the runtime image owned by the runtime user. A
26
+ # named volume mounted on it starts with that ownership; one mounted on a path
27
+ # the image lacks is created root-owned, and the provider cannot write a pool
28
+ # into it. The self-hosted compose file mounts its pool volume here.
29
+ RUN mkdir -p data/detector-pool
30
+
25
31
  # Download the GeoLite2 databases into the same directory. One layer rather
26
32
  # than three so the intermediate states are not retained.
27
33
  RUN curl -fLsS -o GeoLite2-Country.mmdb https://git.io/GeoLite2-Country.mmdb && \
@@ -1 +1 @@
1
- {"version":3,"file":"argv.d.ts","sourceRoot":"","sources":["../src/argv.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAe1D,MAAM,MAAM,oBAAoB,GAAG;IAClC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACrB,GAAG,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;CACX,CAAC;AAqBF,wBAAgB,WAAW,CAC1B,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,EAAE,WAAW,EACjB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,mBAAmB;;;;;;;;;;;;GAoB3B"}
1
+ {"version":3,"file":"argv.d.ts","sourceRoot":"","sources":["../src/argv.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAgB1D,MAAM,MAAM,oBAAoB,GAAG;IAClC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACrB,GAAG,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;CACX,CAAC;AAsBF,wBAAgB,WAAW,CAC1B,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,EAAE,WAAW,EACjB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,mBAAmB;;;;;;;;;;;;GAuB3B"}
package/dist/argv.js CHANGED
@@ -1,3 +1,4 @@
1
+ import detectorPoolSet_default from "./commands/detectorPoolSet.js";
1
2
  import providerSetDataset_default from "./commands/providerSetDataset.js";
2
3
  import storeCaptchasExternally_default from "./commands/storeCaptchasExternally.js";
3
4
  import updateSpamEmailDomains_default from "./commands/updateSpamEmailDomains.js";
@@ -17,6 +18,7 @@ function getCommands(pair, config, authAccount, logger) {
17
18
  ensureExternalIndexes_default(pair, config, { logger }),
18
19
  migrateAbuserScoreThreshold_default(pair, config, { logger }),
19
20
  providerSetDataset_default(pair, config, { logger }),
21
+ detectorPoolSet_default(pair, config, { logger }),
20
22
  storeCaptchasExternally_default(pair, config, { logger }),
21
23
  updateSpamEmailDomains_default(pair, config, { logger }),
22
24
  siteKeyRegister_default(pair, config, { logger }),
@@ -26,7 +28,7 @@ function getCommands(pair, config, authAccount, logger) {
26
28
  }
27
29
  function processArgs(args, pair, authAccount, config) {
28
30
  const logger = getLogger(LogLevel.enum.info, "cli");
29
- const commandManager = yargs(hideBin(args)).usage("Usage: $0 [global options] <command> [options]").option("api", {
31
+ const commandManager = yargs(hideBin(args)).usage("Usage: $0 [global options] <command> [options]").strictCommands().option("api", {
30
32
  demand: false,
31
33
  default: false,
32
34
  type: "boolean"
package/dist/argv.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"argv.js","sourceRoot":"","sources":["../src/argv.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,QAAQ,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGnE,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EACN,4BAA4B,EAC5B,oBAAoB,EACpB,kCAAkC,EAClC,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,8BAA8B,EAC9B,6BAA6B,EAC7B,cAAc,GACd,MAAM,qBAAqB,CAAC;AAS7B,SAAS,WAAW,CACnB,IAAiB,EACjB,MAA2B,EAC3B,WAAwB,EACx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