@prosopo/procaptcha-frictionless 2.21.7 → 2.21.8

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.
@@ -66,4 +66,4 @@ dist/cjs/authenticatedBadge.cjs 3.81 kB │ gzip: 1.45 kB
66
66
  dist/cjs/customDetectBot.cjs 6.35 kB │ gzip: 1.91 kB
67
67
  dist/cjs/procaptchaFrictionless.cjs 13.84 kB │ gzip: 3.84 kB
68
68
 
69
- ✓ built in 35ms
69
+ ✓ built in 56ms
@@ -1,5 +1,5 @@
1
1
  $ tsc --build --verbose
2
- 7:41:14 PM - Projects in this build:
2
+ 4:00:21 PM - Projects in this build:
3
3
  * ../../dev/config/tsconfig.json
4
4
  * ../util/tsconfig.json
5
5
  * ../locale/tsconfig.json
@@ -24,51 +24,51 @@ $ tsc --build --verbose
24
24
  * ../procaptcha-react/tsconfig.json
25
25
  * tsconfig.json
26
26
 
27
- 7:41: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'
27
+ 4:00:21 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'
28
28
 
29
- 7:41:14 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
29
+ 4:00:21 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
30
30
 
31
- 7:41:14 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/process.ts' is older than output '../locale/tsconfig.tsbuildinfo'
31
+ 4:00:21 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/process.ts' is older than output '../locale/tsconfig.tsbuildinfo'
32
32
 
33
- 7:41: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'
33
+ 4:00:21 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'
34
34
 
35
- 7:41: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'
35
+ 4:00:21 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'
36
36
 
37
- 7:41:14 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
37
+ 4:00:21 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
38
38
 
39
- 7:41:14 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'
39
+ 4:00:21 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'
40
40
 
41
- 7:41: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'
41
+ 4:00:21 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'
42
42
 
43
- 7:41:14 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/webComponent/createWidget.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
43
+ 4:00:21 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/theme.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
44
44
 
45
- 7:41:14 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
45
+ 4:00:21 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
46
46
 
47
- 7:41:14 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.test.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
47
+ 4:00:21 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.test.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
48
48
 
49
- 7:41: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'
49
+ 4:00:21 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'
50
50
 
51
- 7:41:14 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/tsconfig.tsbuildinfo'
51
+ 4:00:22 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/errorSites.ts' is older than output '../account/tsconfig.tsbuildinfo'
52
52
 
53
- 7:41:14 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/extensionLoader.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
53
+ 4:00:22 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/extensionLoader.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
54
54
 
55
- 7:41:14 PM - Project '../procaptcha-audio/tsconfig.json' is up to date because newest input '../procaptcha-audio/src/errorSites.ts' is older than output '../procaptcha-audio/tsconfig.tsbuildinfo'
55
+ 4:00:22 PM - Project '../procaptcha-audio/tsconfig.json' is up to date because newest input '../procaptcha-audio/src/errorSites.ts' is older than output '../procaptcha-audio/tsconfig.tsbuildinfo'
56
56
 
57
- 7:41:14 PM - Project '../procaptcha-icon-order/tsconfig.json' is up to date because newest input '../procaptcha-icon-order/src/tests/iconOrderCanvas.unit.test.ts' is older than output '../procaptcha-icon-order/tsconfig.tsbuildinfo'
57
+ 4:00:22 PM - Project '../procaptcha-icon-order/tsconfig.json' is up to date because newest input '../procaptcha-icon-order/src/errorSites.ts' is older than output '../procaptcha-icon-order/tsconfig.tsbuildinfo'
58
58
 
59
- 7:41:14 PM - Project '../procaptcha-pow/tsconfig.json' is up to date because newest input '../procaptcha-pow/src/tests/manager.unit.test.ts' is older than output '../procaptcha-pow/tsconfig.tsbuildinfo'
59
+ 4:00:22 PM - Project '../procaptcha-pow/tsconfig.json' is up to date because newest input '../procaptcha-pow/src/tests/manager.unit.test.ts' is older than output '../procaptcha-pow/tsconfig.tsbuildinfo'
60
60
 
61
- 7:41:14 PM - Project '../procaptcha-puzzle/tsconfig.json' is up to date because newest input '../procaptcha-puzzle/src/tests/invisibleCanvasVisibility.unit.test.ts' is older than output '../procaptcha-puzzle/tsconfig.tsbuildinfo'
61
+ 4:00:22 PM - Project '../procaptcha-puzzle/tsconfig.json' is up to date because newest input '../procaptcha-puzzle/src/errorSites.ts' is older than output '../procaptcha-puzzle/tsconfig.tsbuildinfo'
62
62
 
63
- 7:41:14 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'
63
+ 4:00:22 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'
64
64
 
65
- 7:41:14 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/errorSites.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
65
+ 4:00:22 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'
66
66
 
67
- 7:41:14 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/errorSites.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
67
+ 4:00:22 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/modules/ProsopoCaptchaApi.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
68
68
 
69
- 7:41:14 PM - Project '../procaptcha-react/tsconfig.json' is up to date because newest input '../procaptcha-react/src/errorSites.ts' is older than output '../procaptcha-react/tsconfig.tsbuildinfo'
69
+ 4:00:22 PM - Project '../procaptcha-react/tsconfig.json' is up to date because newest input '../procaptcha-react/src/tests/captchaComponent.unit.test.ts' is older than output '../procaptcha-react/tsconfig.tsbuildinfo'
70
70
 
71
- 7:41:14 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
71
+ 4:00:22 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
72
72
 
73
- 7:41:14 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
73
+ 4:00:22 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
74
74
 
@@ -68,4 +68,4 @@ dist/authenticatedBadge.js 3.30 kB │ gzip: 1.42 kB
68
68
  dist/customDetectBot.js 6.15 kB │ gzip: 1.88 kB
69
69
  dist/procaptchaFrictionless.js 13.15 kB │ gzip: 3.81 kB
70
70
 
71
- ✓ built in 40ms
71
+ ✓ built in 81ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,52 @@
1
1
  # @prosopo/procaptcha-frictionless
2
2
 
3
+ ## 2.21.8
4
+ ### Patch 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
+ - Updated dependencies [b460b0b]
37
+ - Updated dependencies [159766a]
38
+ - Updated dependencies [96dbf9a]
39
+ - @prosopo/locale@3.13.0
40
+ - @prosopo/types@5.18.0
41
+ - @prosopo/procaptcha-common@2.21.8
42
+ - @prosopo/procaptcha-react@2.14.9
43
+ - @prosopo/procaptcha-audio@0.2.9
44
+ - @prosopo/procaptcha-icon-order@0.2.9
45
+ - @prosopo/procaptcha-pow@2.13.18
46
+ - @prosopo/procaptcha-puzzle@2.17.8
47
+ - @prosopo/api@4.7.6
48
+ - @prosopo/common@3.3.0
49
+
3
50
  ## 2.21.7
4
51
  ### Patch Changes
5
52
 
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./procaptchaFrictionless.js";
2
2
  export * from "./detectorPrefetch.js";
3
+ export type { DetectorOptions, DetectorType } from "./detectorLoader.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/procaptcha-frictionless",
3
- "version": "2.21.7",
3
+ "version": "2.21.8",
4
4
  "author": "PROSOPO LIMITED <info@prosopo.io>",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -22,16 +22,16 @@
22
22
  "> 0.5%, last 2 versions, not dead"
23
23
  ],
24
24
  "dependencies": {
25
- "@prosopo/api": "4.7.5",
25
+ "@prosopo/api": "4.7.6",
26
26
  "@prosopo/common": "3.3.0",
27
- "@prosopo/locale": "3.12.1",
28
- "@prosopo/procaptcha-audio": "0.2.8",
29
- "@prosopo/procaptcha-common": "2.21.7",
30
- "@prosopo/procaptcha-icon-order": "0.2.8",
31
- "@prosopo/procaptcha-pow": "2.13.17",
32
- "@prosopo/procaptcha-puzzle": "2.17.7",
33
- "@prosopo/procaptcha-react": "2.14.8",
34
- "@prosopo/types": "5.17.1",
27
+ "@prosopo/locale": "3.13.0",
28
+ "@prosopo/procaptcha-audio": "0.2.9",
29
+ "@prosopo/procaptcha-common": "2.21.8",
30
+ "@prosopo/procaptcha-icon-order": "0.2.9",
31
+ "@prosopo/procaptcha-pow": "2.13.18",
32
+ "@prosopo/procaptcha-puzzle": "2.17.8",
33
+ "@prosopo/procaptcha-react": "2.14.9",
34
+ "@prosopo/types": "5.18.0",
35
35
  "@prosopo/widget-skeleton": "2.10.3",
36
36
  "dotenv": "18.0.7"
37
37
  },