@prosopo/cli 3.8.38 → 3.9.1
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/.turbo/turbo-build$colon$cjs.log +5 -4
- package/.turbo/turbo-build$colon$tsc.log +33 -33
- package/.turbo/turbo-build.log +4 -3
- package/CHANGELOG.md +68 -0
- package/Dockerfile +14 -5
- package/dist/argv.d.ts.map +1 -1
- package/dist/argv.js +3 -1
- package/dist/argv.js.map +1 -1
- package/dist/bundle/prosopo-native-puzzle.node +0 -0
- package/dist/bundle/provider.cli.bundle.js +80853 -80742
- package/dist/cjs/argv.cjs +3 -1
- package/dist/cjs/commands/detectorPoolSet.cjs +51 -0
- package/dist/cjs/commands/ensureExternalIndexes.cjs +1 -1
- package/dist/cjs/commands/ensureIndexes.cjs +1 -1
- package/dist/cjs/commands/index.cjs +2 -0
- package/dist/cjs/commands/migrateAbuserScoreThreshold.cjs +1 -1
- package/dist/cjs/commands/providerSetDataset.cjs +1 -1
- package/dist/cjs/commands/siteKeyRegister.cjs +2 -2
- package/dist/cjs/commands/siteKeyRegisterApi.cjs +1 -1
- package/dist/cjs/commands/storeCaptchasExternally.cjs +1 -1
- package/dist/cjs/commands/updateSpamEmailDomains.cjs +1 -1
- package/dist/cjs/start.cjs +1 -1
- package/dist/commands/detectorPoolSet.d.ts +14 -0
- package/dist/commands/detectorPoolSet.d.ts.map +1 -0
- package/dist/commands/detectorPoolSet.js +51 -0
- package/dist/commands/detectorPoolSet.js.map +1 -0
- package/dist/commands/ensureExternalIndexes.js +1 -1
- package/dist/commands/ensureIndexes.js +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +2 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/migrateAbuserScoreThreshold.js +1 -1
- package/dist/commands/providerSetDataset.js +1 -1
- package/dist/commands/siteKeyRegister.js +2 -2
- package/dist/commands/siteKeyRegisterApi.js +1 -1
- package/dist/commands/storeCaptchasExternally.js +1 -1
- package/dist/commands/updateSpamEmailDomains.js +1 -1
- package/dist/start.js +1 -1
- package/package.json +7 -7
|
@@ -68,7 +68,7 @@ ViteCommonJSConfig: .
|
|
|
68
68
|
[36mvite v8.1.6 [32mbuilding ssr environment for production...[36m[39m
|
|
69
69
|
Bundle build started
|
|
70
70
|
[2K
|
|
71
|
-
✓
|
|
71
|
+
✓ 22 modules transformed.
|
|
72
72
|
rendering chunks...
|
|
73
73
|
computing gzip size...
|
|
74
74
|
dist/cjs/commands/version.cjs 0.52 kB │ gzip: 0.29 kB
|
|
@@ -80,19 +80,21 @@ dist/cjs/process.env.cjs 0.99 kB │ gzip: 0.42 kB
|
|
|
80
80
|
dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
|
|
81
81
|
dist/cjs/commands/ensureExternalIndexes.cjs 1.07 kB │ gzip: 0.50 kB
|
|
82
82
|
dist/cjs/files.cjs 1.27 kB │ gzip: 0.58 kB
|
|
83
|
-
dist/cjs/commands/index.cjs 1.
|
|
83
|
+
dist/cjs/commands/index.cjs 1.43 kB │ gzip: 0.31 kB
|
|
84
84
|
dist/cjs/commands/providerSetDataset.cjs 1.49 kB │ gzip: 0.65 kB
|
|
85
85
|
dist/cjs/commands/updateSpamEmailDomains.cjs 1.58 kB │ gzip: 0.65 kB
|
|
86
86
|
dist/cjs/cli.cjs 1.76 kB │ gzip: 0.64 kB
|
|
87
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
|
|
88
89
|
dist/cjs/commands/migrateAbuserScoreThreshold.cjs 2.17 kB │ gzip: 0.90 kB
|
|
89
|
-
dist/cjs/argv.cjs 2.30 kB │ gzip: 0.66 kB
|
|
90
90
|
dist/cjs/start.cjs 2.45 kB │ gzip: 0.84 kB
|
|
91
|
+
dist/cjs/argv.cjs 2.45 kB │ gzip: 0.68 kB
|
|
91
92
|
dist/cjs/commands/siteKeyRegisterApi.cjs 3.85 kB │ gzip: 1.22 kB
|
|
92
93
|
dist/cjs/commands/siteKeyRegister.cjs 4.22 kB │ gzip: 1.26 kB
|
|
93
94
|
dist/cjs/prosopo.config.cjs 4.63 kB │ gzip: 1.47 kB
|
|
94
95
|
dist/cjs/RateLimiter.cjs 7.05 kB │ gzip: 1.02 kB
|
|
95
96
|
|
|
97
|
+
[32m✓ built in 98ms[39m
|
|
96
98
|
[33m[33m[EMPTY_IMPORT_META] [0m`import.meta` may not be a valid syntax with the `cjs` output format.
|
|
97
99
|
[38;5;246m╭[0m[38;5;246m─[0m[38;5;246m[[0m src/prosopo.config.ts:56:21 [38;5;246m][0m
|
|
98
100
|
[38;5;246m│[0m
|
|
@@ -101,4 +103,3 @@ dist/cjs/RateLimiter.cjs 7.05 kB │ gzip: 1.02 kB
|
|
|
101
103
|
[38;5;240m │[0m ╰─────── 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`.
|
|
102
104
|
[38;5;246m────╯[0m
|
|
103
105
|
[39m
|
|
104
|
-
[32m✓ built in 62ms[39m
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$ tsc --build --verbose
|
|
2
|
-
9:
|
|
2
|
+
9:13:57 AM - Projects in this build:
|
|
3
3
|
* ../../dev/config/tsconfig.json
|
|
4
4
|
* ../util/tsconfig.json
|
|
5
5
|
* ../locale/tsconfig.json
|
|
@@ -32,67 +32,67 @@ $ tsc --build --verbose
|
|
|
32
32
|
* ../../dev/workspace/tsconfig.json
|
|
33
33
|
* tsconfig.json
|
|
34
34
|
|
|
35
|
-
9:
|
|
35
|
+
9:13:57 AM - 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'
|
|
36
36
|
|
|
37
|
-
9:
|
|
37
|
+
9:13:57 AM - 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
|
-
9:
|
|
39
|
+
9:13:57 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translations.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
40
40
|
|
|
41
|
-
9:
|
|
41
|
+
9:13:57 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'
|
|
42
42
|
|
|
43
|
-
9:
|
|
43
|
+
9:13:57 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'
|
|
44
44
|
|
|
45
|
-
9:
|
|
45
|
+
9:13:57 AM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
46
46
|
|
|
47
|
-
9:
|
|
47
|
+
9:13:57 AM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/errorCodes.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
48
48
|
|
|
49
|
-
9:
|
|
49
|
+
9:13:57 AM - 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'
|
|
50
50
|
|
|
51
|
-
9:
|
|
51
|
+
9:13:57 AM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/env.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
|
|
52
52
|
|
|
53
|
-
9:
|
|
53
|
+
9:13:57 AM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/index.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
|
|
54
54
|
|
|
55
|
-
9:
|
|
55
|
+
9:13:57 AM - 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'
|
|
56
56
|
|
|
57
|
-
9:
|
|
57
|
+
9:13:57 AM - 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'
|
|
58
58
|
|
|
59
|
-
9:
|
|
59
|
+
9:13:57 AM - 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'
|
|
60
60
|
|
|
61
|
-
9:
|
|
61
|
+
9:13:57 AM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/types/captcha.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
|
|
62
62
|
|
|
63
|
-
9:
|
|
63
|
+
9:13:57 AM - 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'
|
|
64
64
|
|
|
65
|
-
9:
|
|
65
|
+
9:13:57 AM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/pair/decode.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
|
|
66
66
|
|
|
67
|
-
9:
|
|
67
|
+
9:13:57 AM - Project '../types-env/tsconfig.json' is up to date because newest input '../types-env/src/tests/typesEnv.test-d.ts' is older than output '../types-env/tsconfig.tsbuildinfo'
|
|
68
68
|
|
|
69
|
-
9:
|
|
69
|
+
9:13:58 AM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/env.ts' is older than output '../env/tsconfig.tsbuildinfo'
|
|
70
70
|
|
|
71
|
-
9:
|
|
71
|
+
9:13:58 AM - 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'
|
|
72
72
|
|
|
73
|
-
9:
|
|
73
|
+
9:13:58 AM - 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'
|
|
74
74
|
|
|
75
|
-
9:
|
|
75
|
+
9:13:58 AM - 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'
|
|
76
76
|
|
|
77
|
-
9:
|
|
77
|
+
9:13:58 AM - 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'
|
|
78
78
|
|
|
79
|
-
9:
|
|
79
|
+
9:13:58 AM - 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'
|
|
80
80
|
|
|
81
|
-
9:
|
|
81
|
+
9:13:58 AM - Project '../icon-order-assets/tsconfig.json' is up to date because newest input '../icon-order-assets/src/compose.ts' is older than output '../icon-order-assets/tsconfig.tsbuildinfo'
|
|
82
82
|
|
|
83
|
-
9:
|
|
83
|
+
9:13:58 AM - 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'
|
|
84
84
|
|
|
85
|
-
9:
|
|
85
|
+
9:13:58 AM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
|
|
86
86
|
|
|
87
|
-
9:
|
|
87
|
+
9:13:58 AM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.test.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
|
|
88
88
|
|
|
89
|
-
9:
|
|
89
|
+
9:13:58 AM - Project '../web-bot-auth/tsconfig.json' is up to date because newest input '../web-bot-auth/src/verify.ts' is older than output '../web-bot-auth/tsconfig.tsbuildinfo'
|
|
90
90
|
|
|
91
|
-
9:
|
|
91
|
+
9:13:58 AM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/utils/devicePlatform.ts' is older than output '../provider/tsconfig.tsbuildinfo'
|
|
92
92
|
|
|
93
|
-
9:
|
|
93
|
+
9:13:58 AM - 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'
|
|
94
94
|
|
|
95
|
-
9:
|
|
95
|
+
9:13:58 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
96
96
|
|
|
97
|
-
9:
|
|
97
|
+
9:13:58 AM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
|
|
98
98
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -69,7 +69,7 @@ ViteEsmConfig: .
|
|
|
69
69
|
[36mvite v8.1.6 [32mbuilding ssr environment for production...[36m[39m
|
|
70
70
|
Bundle build started
|
|
71
71
|
[2K
|
|
72
|
-
✓
|
|
72
|
+
✓ 22 modules transformed.
|
|
73
73
|
rendering chunks...
|
|
74
74
|
computing gzip size...
|
|
75
75
|
dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
|
|
@@ -81,13 +81,14 @@ dist/commands/storeCaptchasExternally.js 0.86 kB │ gzip: 0.44 kB
|
|
|
81
81
|
dist/process.env.js 0.90 kB │ gzip: 0.40 kB
|
|
82
82
|
dist/commands/ensureExternalIndexes.js 1.01 kB │ gzip: 0.49 kB
|
|
83
83
|
dist/files.js 1.04 kB │ gzip: 0.50 kB
|
|
84
|
-
dist/commands/index.js 1.
|
|
84
|
+
dist/commands/index.js 1.23 kB │ gzip: 0.31 kB
|
|
85
85
|
dist/commands/providerSetDataset.js 1.31 kB │ gzip: 0.60 kB
|
|
86
86
|
dist/cli.js 1.34 kB │ gzip: 0.55 kB
|
|
87
87
|
dist/commands/updateSpamEmailDomains.js 1.53 kB │ gzip: 0.64 kB
|
|
88
88
|
dist/reloader.js 1.62 kB │ gzip: 0.69 kB
|
|
89
|
-
dist/
|
|
89
|
+
dist/commands/detectorPoolSet.js 1.97 kB │ gzip: 0.94 kB
|
|
90
90
|
dist/commands/migrateAbuserScoreThreshold.js 2.11 kB │ gzip: 0.89 kB
|
|
91
|
+
dist/argv.js 2.12 kB │ gzip: 0.62 kB
|
|
91
92
|
dist/start.js 2.23 kB │ gzip: 0.82 kB
|
|
92
93
|
dist/commands/siteKeyRegisterApi.js 3.81 kB │ gzip: 1.23 kB
|
|
93
94
|
dist/commands/siteKeyRegister.js 4.10 kB │ gzip: 1.26 kB
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
# @prosopo/cli
|
|
2
2
|
|
|
3
|
+
## 3.9.1
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 0d94ae6: Pin Node to 24.22.1 in every Docker image and CI workflow, the first 24.x release with the fix for CVE-2026-111497 (an out-of-bounds write in the bundled Brotli decoder that can lead to remote code execution).
|
|
7
|
+
|
|
8
|
+
Before this, everything asked for plain `24`, which does not guarantee a patched build. Docker reuses a cached base image, and `setup-node` uses whatever 24.x a runner already has cached.
|
|
9
|
+
|
|
10
|
+
The provider image needed more than a tag bump. Its runtime, `gcr.io/distroless/nodejs24-debian12`, is stuck on Node 24.14.0 and will not get the fix. It now runs on `nodejs24-debian13`, pinned by digest because distroless publishes no Node version tags. The builder moves to `node:24.22.1-trixie-slim` so both stages still use the same Debian release and glibc. Sharp and the native ja4, merkle and puzzle addons were checked loading on the new runtime.
|
|
11
|
+
|
|
12
|
+
## 3.9.0
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 159766a: Let a self-hosted provider run a detector you built yourself, and ship a working example built on BotD.
|
|
16
|
+
|
|
17
|
+
Until now the only detector a provider could load was ours. Its output can only be read by the closed decoder in the
|
|
18
|
+
provider, so a self-hosted node with any other detector had nothing to score visitors with.
|
|
19
|
+
|
|
20
|
+
**Open detector format.** A pool bundle can now be marked `format: "open-v1"`. The provider reads those bundles with a
|
|
21
|
+
short, documented decoder: an AES-256-GCM payload whose key is wrapped with the bundle's RSA-OAEP public key, carrying
|
|
22
|
+
`{ score, timestamp, userId, userAgent, headHash, d }`. The same checks apply as for our detector — the token must
|
|
23
|
+
match this visitor's account, user agent and page, and be under ten minutes old — and `d` reaches decision and routing
|
|
24
|
+
machines as `input.d`. Open bundles are only loaded when `PROSOPO_DETECTOR_OPEN_FORMAT=1`; the hosted fleet never sets
|
|
25
|
+
it, so nothing changes there.
|
|
26
|
+
|
|
27
|
+
**`demos/detector-botd`.** A detector built on BotD that scores automated browsers as 1 and everything else as 0, plus a
|
|
28
|
+
`pool` script that builds the bundles with a fresh keypair each. Writing your own detector means replacing one function;
|
|
29
|
+
the encryption is done for you.
|
|
30
|
+
|
|
31
|
+
**`detector_pool_set` CLI command.** Writes a pool read from stdin into the provider's pool directory. Stdin rather than a
|
|
32
|
+
file because the provider image runs as a non-root user and cannot read a file copied in as root.
|
|
33
|
+
|
|
34
|
+
**Self-hosted compose and image.** The image now creates its pool directory owned by the runtime user, and the
|
|
35
|
+
self-hosted compose file mounts a `detector_pool` volume there and turns the open format on. The compose file no longer
|
|
36
|
+
defaults to provider 3.8.19, which it had silently stayed on for nineteen releases: `generateSelfHostedEnv.ts` writes
|
|
37
|
+
the version of the checkout it runs from.
|
|
38
|
+
|
|
39
|
+
`SELF_HOSTING.md` gains a "Bring your own detector" section and now loads the widget with `type="module"`, which the
|
|
40
|
+
bundle has needed since it was split into chunks.
|
|
41
|
+
|
|
42
|
+
Tested end to end on a stack built from this branch: stock headless Chromium was flagged by BotD and served a puzzle,
|
|
43
|
+
headed Chromium passed with proof of work, the detector's signals were stored on the session, and a provider without
|
|
44
|
+
the flag rejected the pool.
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- 5a1db28: Fix four things that broke the self-hosting guide for anyone starting from a fresh clone.
|
|
49
|
+
|
|
50
|
+
- **The `fingerprintjs` submodule used an SSH URL**, so it could only be fetched by someone with GitHub SSH keys. It is
|
|
51
|
+
now HTTPS. The repository is public, so nobody needs credentials for it. Without it `pnpm run build:all` fails.
|
|
52
|
+
- **The guide ran the env script before anything was built.** The script imports built workspace packages, so on a fresh
|
|
53
|
+
clone it crashed with `ERR_MODULE_NOT_FOUND`. The guide now clones with `--recurse-submodules` and runs
|
|
54
|
+
`pnpm run build:all` in step 1.
|
|
55
|
+
- **Every `docker compose exec` in the guide failed** with "no configuration file provided", because the compose file is
|
|
56
|
+
not named `docker-compose.yml`. `generateSelfHostedEnv.ts` now writes `COMPOSE_FILE=docker-compose.self-hosted.yml`
|
|
57
|
+
into `.env`, which Compose reads on its own, so plain `docker compose` commands work.
|
|
58
|
+
- **The provider CLI exited 0 on a command it did not have.** An older image given `detector_pool_set` did nothing and
|
|
59
|
+
reported success. It now fails with `Unknown command`.
|
|
60
|
+
- Updated dependencies [d02b3bc]
|
|
61
|
+
- Updated dependencies [b460b0b]
|
|
62
|
+
- Updated dependencies [159766a]
|
|
63
|
+
- @prosopo/provider@5.21.0
|
|
64
|
+
- @prosopo/locale@3.13.0
|
|
65
|
+
- @prosopo/types@5.18.0
|
|
66
|
+
- @prosopo/env@3.6.80
|
|
67
|
+
- @prosopo/api@4.7.6
|
|
68
|
+
- @prosopo/common@3.3.0
|
|
69
|
+
- @prosopo/keyring@2.10.11
|
|
70
|
+
|
|
3
71
|
## 3.8.38
|
|
4
72
|
### Patch Changes
|
|
5
73
|
|
package/Dockerfile
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# fetch happens in the builder; the runtime image is distroless and contains
|
|
3
3
|
# only the Node runtime, this bundle and its one dependency.
|
|
4
4
|
#
|
|
5
|
-
# The builder is
|
|
5
|
+
# The builder is a slim image rather than `node:24` for the same reason the
|
|
6
6
|
# runtime is distroless: `node:24` is 1.63 GB of build toolchain that a
|
|
7
7
|
# pre-bundled JS file and a single prebuilt-binary dependency never touch.
|
|
8
|
-
FROM node:24-slim AS builder
|
|
8
|
+
FROM node:24.22.1-trixie-slim AS builder
|
|
9
9
|
|
|
10
10
|
WORKDIR /build
|
|
11
11
|
|
|
@@ -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 && \
|
|
@@ -48,8 +54,11 @@ RUN echo '#!/nodejs/bin/node' | cat - provider.cli.bundle.js > temp && \
|
|
|
48
54
|
npm i --include=optional --os=linux --cpu=x64 --no-fund --no-audit && \
|
|
49
55
|
npm cache clean --force
|
|
50
56
|
|
|
51
|
-
# `nodejs24-
|
|
52
|
-
# native addons were resolved against is the same one that loads
|
|
57
|
+
# `nodejs24-debian13` matches the builder's Debian release (trixie), so the
|
|
58
|
+
# glibc the native addons were resolved against is the same one that loads
|
|
59
|
+
# them. Debian 12 is not an option: its distroless image stopped at Node
|
|
60
|
+
# 24.14.0, before the CVE-2026-111497 Brotli fix in 24.22.1. Distroless
|
|
61
|
+
# publishes no Node version tags, so the digest is what pins 24.22.1. All
|
|
53
62
|
# four (@img/sharp, native-ja4, native-merkle, native-puzzle) are
|
|
54
63
|
# linux-x64-gnu; an Alpine/musl runtime would break every one.
|
|
55
64
|
#
|
|
@@ -64,7 +73,7 @@ RUN echo '#!/nodejs/bin/node' | cat - provider.cli.bundle.js > temp && \
|
|
|
64
73
|
# CLI commands must name node explicitly (see above), and container
|
|
65
74
|
# healthchecks cannot use curl — they run `node -e "fetch(...)"` instead. Every
|
|
66
75
|
# call site in this repo and in the ansible playbooks has been moved over.
|
|
67
|
-
FROM gcr.io/distroless/nodejs24-
|
|
76
|
+
FROM gcr.io/distroless/nodejs24-debian13:nonroot@sha256:78f07ef1b5ea71ad7c055df15d0dd8997f2d288f9158623c4d4ae3d765b7d50d
|
|
68
77
|
|
|
69
78
|
WORKDIR /usr/src/app
|
|
70
79
|
|
package/dist/argv.d.ts.map
CHANGED
|
@@ -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;
|
|
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,EACxB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