@prosopo/procaptcha-frictionless 2.21.9 → 2.22.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 (55) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +10 -9
  2. package/.turbo/turbo-build$colon$esm.log +10 -9
  3. package/.turbo/turbo-build$colon$tsc.log +27 -27
  4. package/CHANGELOG.md +51 -0
  5. package/dist/cjs/customDetectBot.cjs +16 -5
  6. package/dist/cjs/detectorPrefetch.cjs +32 -19
  7. package/dist/cjs/procaptchaFrictionless.cjs +11 -2
  8. package/dist/cjs/widgetSlot.cjs +21 -0
  9. package/dist/esm/customDetectBot.js +16 -6
  10. package/dist/esm/detectorPrefetch.js +33 -20
  11. package/dist/esm/procaptchaFrictionless.js +11 -2
  12. package/dist/esm/widgetSlot.js +20 -0
  13. package/dist/tsc/customDetectBot.d.ts.map +1 -1
  14. package/dist/tsc/customDetectBot.js +18 -6
  15. package/dist/tsc/customDetectBot.js.map +1 -1
  16. package/dist/tsc/detectorPrefetch.d.ts +1 -1
  17. package/dist/tsc/detectorPrefetch.d.ts.map +1 -1
  18. package/dist/tsc/detectorPrefetch.js +19 -13
  19. package/dist/tsc/detectorPrefetch.js.map +1 -1
  20. package/dist/tsc/procaptchaFrictionless.d.ts.map +1 -1
  21. package/dist/tsc/procaptchaFrictionless.js +16 -4
  22. package/dist/tsc/procaptchaFrictionless.js.map +1 -1
  23. package/dist/tsc/tests/customDetectBotAssignTimeout.test.js +2 -0
  24. package/dist/tsc/tests/customDetectBotAssignTimeout.test.js.map +1 -1
  25. package/dist/tsc/tests/customDetectBotFingerprint.test.d.ts +2 -0
  26. package/dist/tsc/tests/customDetectBotFingerprint.test.d.ts.map +1 -0
  27. package/dist/tsc/tests/customDetectBotFingerprint.test.js +120 -0
  28. package/dist/tsc/tests/customDetectBotFingerprint.test.js.map +1 -0
  29. package/dist/tsc/tests/customDetectBotLanguage.test.js +2 -0
  30. package/dist/tsc/tests/customDetectBotLanguage.test.js.map +1 -1
  31. package/dist/tsc/tests/customDetectBotSimd.test.js +2 -0
  32. package/dist/tsc/tests/customDetectBotSimd.test.js.map +1 -1
  33. package/dist/tsc/tests/detectorPrefetch.test.js +35 -2
  34. package/dist/tsc/tests/detectorPrefetch.test.js.map +1 -1
  35. package/dist/tsc/tests/procaptchaFrictionless.test.js +77 -0
  36. package/dist/tsc/tests/procaptchaFrictionless.test.js.map +1 -1
  37. package/dist/tsc/tests/widgetSlot.test.d.ts +2 -0
  38. package/dist/tsc/tests/widgetSlot.test.d.ts.map +1 -0
  39. package/dist/tsc/tests/widgetSlot.test.js +37 -0
  40. package/dist/tsc/tests/widgetSlot.test.js.map +1 -0
  41. package/dist/tsc/widgetSlot.d.ts +3 -0
  42. package/dist/tsc/widgetSlot.d.ts.map +1 -0
  43. package/dist/tsc/widgetSlot.js +22 -0
  44. package/dist/tsc/widgetSlot.js.map +1 -0
  45. package/dist/types/customDetectBot.d.ts.map +1 -1
  46. package/dist/types/detectorPrefetch.d.ts +1 -1
  47. package/dist/types/detectorPrefetch.d.ts.map +1 -1
  48. package/dist/types/procaptchaFrictionless.d.ts.map +1 -1
  49. package/dist/types/tests/customDetectBotFingerprint.test.d.ts +2 -0
  50. package/dist/types/tests/customDetectBotFingerprint.test.d.ts.map +1 -0
  51. package/dist/types/tests/widgetSlot.test.d.ts +2 -0
  52. package/dist/types/tests/widgetSlot.test.d.ts.map +1 -0
  53. package/dist/types/widgetSlot.d.ts +3 -0
  54. package/dist/types/widgetSlot.d.ts.map +1 -0
  55. package/package.json +15 -14
@@ -8,13 +8,13 @@ ViteCommonJSConfig: .
8
8
  '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
9
9
  '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
10
10
  '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
11
+ '/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
12
+ '/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
11
13
  '/home/runner/work/captcha/captcha/packages/procaptcha-audio/tsconfig.json',
12
14
  '/home/runner/work/captcha/captcha/packages/procaptcha-common/tsconfig.json',
13
15
  '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
14
16
  '/home/runner/work/captcha/captcha/packages/widget-skeleton/tsconfig.json',
15
17
  '/home/runner/work/captcha/captcha/packages/account/tsconfig.json',
16
- '/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
17
- '/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
18
18
  '/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
19
19
  '/home/runner/work/captcha/captcha/packages/procaptcha-icon-order/tsconfig.json',
20
20
  '/home/runner/work/captcha/captcha/packages/procaptcha-pow/tsconfig.json',
@@ -33,13 +33,13 @@ ViteCommonJSConfig: .
33
33
  '@prosopo/util',
34
34
  '@prosopo/util-crypto',
35
35
  '@prosopo/common',
36
+ '@prosopo/fingerprint',
37
+ '@prosopo/fingerprintjs',
36
38
  '@prosopo/procaptcha-audio',
37
39
  '@prosopo/procaptcha-common',
38
40
  '@prosopo/load-balancer',
39
41
  '@prosopo/widget-skeleton',
40
42
  '@prosopo/account',
41
- '@prosopo/fingerprint',
42
- '@prosopo/fingerprintjs',
43
43
  '@prosopo/keyring',
44
44
  '@prosopo/procaptcha-icon-order',
45
45
  '@prosopo/procaptcha-pow',
@@ -54,16 +54,17 @@ ViteCommonJSConfig: .
54
54
  vite v8.1.6 building ssr environment for production...
55
55
  Bundle build started
56
56
  
57
- ✓ 9 modules transformed.
57
+ ✓ 10 modules transformed.
58
58
  rendering chunks...
59
59
  computing gzip size...
60
60
  dist/cjs/index.cjs 0.55 kB │ gzip: 0.21 kB
61
+ dist/cjs/widgetSlot.cjs 0.74 kB │ gzip: 0.33 kB
61
62
  dist/cjs/detectorLoader.cjs 1.65 kB │ gzip: 0.90 kB
62
63
  dist/cjs/sessionInvalidatedRecovery.cjs 2.50 kB │ gzip: 1.14 kB
63
64
  dist/cjs/frictionlessResultGuard.cjs 2.78 kB │ gzip: 1.42 kB
64
- dist/cjs/detectorPrefetch.cjs 3.12 kB │ gzip: 1.40 kB
65
+ dist/cjs/detectorPrefetch.cjs 3.56 kB │ gzip: 1.56 kB
65
66
  dist/cjs/authenticatedBadge.cjs 3.81 kB │ gzip: 1.45 kB
66
- dist/cjs/customDetectBot.cjs 6.35 kB │ gzip: 1.91 kB
67
- dist/cjs/procaptchaFrictionless.cjs 13.84 kB │ gzip: 3.84 kB
67
+ dist/cjs/customDetectBot.cjs 6.93 kB │ gzip: 2.04 kB
68
+ dist/cjs/procaptchaFrictionless.cjs 14.20 kB │ gzip: 3.90 kB
68
69
 
69
- ✓ built in 49ms
70
+ ✓ built in 54ms
@@ -8,13 +8,13 @@ ViteEsmConfig: .
8
8
  '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
9
9
  '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
10
10
  '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
11
+ '/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
12
+ '/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
11
13
  '/home/runner/work/captcha/captcha/packages/procaptcha-audio/tsconfig.json',
12
14
  '/home/runner/work/captcha/captcha/packages/procaptcha-common/tsconfig.json',
13
15
  '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
14
16
  '/home/runner/work/captcha/captcha/packages/widget-skeleton/tsconfig.json',
15
17
  '/home/runner/work/captcha/captcha/packages/account/tsconfig.json',
16
- '/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
17
- '/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
18
18
  '/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
19
19
  '/home/runner/work/captcha/captcha/packages/procaptcha-icon-order/tsconfig.json',
20
20
  '/home/runner/work/captcha/captcha/packages/procaptcha-pow/tsconfig.json',
@@ -33,13 +33,13 @@ ViteEsmConfig: .
33
33
  '@prosopo/util',
34
34
  '@prosopo/util-crypto',
35
35
  '@prosopo/common',
36
+ '@prosopo/fingerprint',
37
+ '@prosopo/fingerprintjs',
36
38
  '@prosopo/procaptcha-audio',
37
39
  '@prosopo/procaptcha-common',
38
40
  '@prosopo/load-balancer',
39
41
  '@prosopo/widget-skeleton',
40
42
  '@prosopo/account',
41
- '@prosopo/fingerprint',
42
- '@prosopo/fingerprintjs',
43
43
  '@prosopo/keyring',
44
44
  '@prosopo/procaptcha-icon-order',
45
45
  '@prosopo/procaptcha-pow',
@@ -54,17 +54,18 @@ ViteEsmConfig: .
54
54
  vite v8.1.6 building ssr environment for production...
55
55
  Bundle build started
56
56
  
57
- ✓ 9 modules transformed.
57
+ ✓ 10 modules transformed.
58
58
  rendering chunks...
59
59
  computing gzip size...
60
60
  dist/esm/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
61
61
  dist/esm/index.js 0.33 kB │ gzip: 0.15 kB
62
+ dist/esm/widgetSlot.js 0.66 kB │ gzip: 0.32 kB
62
63
  dist/esm/detectorLoader.js 1.63 kB │ gzip: 0.90 kB
63
64
  dist/esm/sessionInvalidatedRecovery.js 2.41 kB │ gzip: 1.13 kB
64
65
  dist/esm/frictionlessResultGuard.js 2.71 kB │ gzip: 1.41 kB
65
- dist/esm/detectorPrefetch.js 2.98 kB │ gzip: 1.37 kB
66
66
  dist/esm/authenticatedBadge.js 3.30 kB │ gzip: 1.42 kB
67
- dist/esm/customDetectBot.js 6.15 kB │ gzip: 1.88 kB
68
- dist/esm/procaptchaFrictionless.js 13.15 kB │ gzip: 3.81 kB
67
+ dist/esm/detectorPrefetch.js 3.43 kB │ gzip: 1.53 kB
68
+ dist/esm/customDetectBot.js 6.69 kB │ gzip: 2.01 kB
69
+ dist/esm/procaptchaFrictionless.js 13.49 kB │ gzip: 3.87 kB
69
70
 
70
- ✓ built in 38ms
71
+ ✓ built in 47ms
@@ -1,5 +1,5 @@
1
1
  $ tsc --build --verbose
2
- 11:55:07 AM - Projects in this build:
2
+ 12:57:50 PM - Projects in this build:
3
3
  * ../../dev/config/tsconfig.json
4
4
  * ../util/tsconfig.json
5
5
  * ../locale/tsconfig.json
@@ -7,10 +7,10 @@ $ tsc --build --verbose
7
7
  * ../types/tsconfig.json
8
8
  * ../api/tsconfig.json
9
9
  * ../common/tsconfig.json
10
- * ../load-balancer/tsconfig.json
11
- * ../widget-skeleton/tsconfig.json
12
10
  * ../fingerprintjs/tsconfig.json
13
11
  * ../fingerprint/tsconfig.json
12
+ * ../load-balancer/tsconfig.json
13
+ * ../widget-skeleton/tsconfig.json
14
14
  * ../keyring/tsconfig.json
15
15
  * ../account/tsconfig.json
16
16
  * ../procaptcha-common/tsconfig.json
@@ -24,51 +24,51 @@ $ tsc --build --verbose
24
24
  * ../procaptcha-react/tsconfig.json
25
25
  * tsconfig.json
26
26
 
27
- 11:55:07 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/dist/tsc/tsconfig.tsbuildinfo'
27
+ 12:57:50 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/vite.esm.config.ts' is older than output '../../dev/config/dist/tsc/tsconfig.tsbuildinfo'
28
28
 
29
- 11:55:07 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/dist/tsc/tsconfig.tsbuildinfo'
29
+ 12:57:50 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/dist/tsc/tsconfig.tsbuildinfo'
30
30
 
31
- 11:55:07 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/process.ts' is older than output '../locale/dist/tsc/tsconfig.tsbuildinfo'
31
+ 12:57:51 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translator.ts' is older than output '../locale/dist/tsc/tsconfig.tsbuildinfo'
32
32
 
33
- 11:55:07 AM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/dist/tsc/tsconfig.tsbuildinfo'
33
+ 12:57:51 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/dist/tsc/tsconfig.tsbuildinfo'
34
34
 
35
- 11:55:07 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/dist/tsc/tsconfig.tsbuildinfo'
35
+ 12:57:51 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/dist/tsc/tsconfig.tsbuildinfo'
36
36
 
37
- 11:55:07 AM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/dist/tsc/tsconfig.tsbuildinfo'
37
+ 12:57:51 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/dist/tsc/tsconfig.tsbuildinfo'
38
38
 
39
- 11:55:07 AM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/error.ts' is older than output '../common/dist/tsc/tsconfig.tsbuildinfo'
39
+ 12:57:51 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/error.ts' is older than output '../common/dist/tsc/tsconfig.tsbuildinfo'
40
40
 
41
- 11:55:07 AM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/dist/tsc/tsconfig.tsbuildinfo'
41
+ 12:57:51 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/sources/webgl.ts' is older than output '../fingerprintjs/dist/tsc/tsconfig.tsbuildinfo'
42
42
 
43
- 11:55:07 AM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/webComponent/createWidget.ts' is older than output '../widget-skeleton/dist/tsc/tsconfig.tsbuildinfo'
43
+ 12:57:51 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.test.ts' is older than output '../fingerprint/dist/tsc/tsconfig.tsbuildinfo'
44
44
 
45
- 11:55:07 AM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/dist/tsc/tsconfig.tsbuildinfo'
45
+ 12:57:51 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/dist/tsc/tsconfig.tsbuildinfo'
46
46
 
47
- 11:55:07 AM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.test.ts' is older than output '../fingerprint/dist/tsc/tsconfig.tsbuildinfo'
47
+ 12:57:51 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/theme.ts' is older than output '../widget-skeleton/dist/tsc/tsconfig.tsbuildinfo'
48
48
 
49
- 11:55:07 AM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/errorSites.ts' is older than output '../keyring/dist/tsc/tsconfig.tsbuildinfo'
49
+ 12:57:51 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/keyring/keyring.test.ts' is older than output '../keyring/dist/tsc/tsconfig.tsbuildinfo'
50
50
 
51
- 11:55:07 AM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/dist/tsc/tsconfig.tsbuildinfo'
51
+ 12:57:51 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/dist/tsc/tsconfig.tsbuildinfo'
52
52
 
53
- 11:55:07 AM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/extensionLoader.ts' is older than output '../procaptcha-common/dist/tsc/tsconfig.tsbuildinfo'
53
+ 12:57:51 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/tests/protectSession.test.ts' is older than output '../procaptcha-common/dist/tsc/tsconfig.tsbuildinfo'
54
54
 
55
- 11:55:07 AM - Project '../procaptcha-audio/tsconfig.json' is up to date because newest input '../procaptcha-audio/src/errorSites.ts' is older than output '../procaptcha-audio/dist/tsc/tsconfig.tsbuildinfo'
55
+ 12:57:51 PM - Project '../procaptcha-audio/tsconfig.json' is up to date because newest input '../procaptcha-audio/src/errorSites.ts' is older than output '../procaptcha-audio/dist/tsc/tsconfig.tsbuildinfo'
56
56
 
57
- 11:55:08 AM - 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/dist/tsc/tsconfig.tsbuildinfo'
57
+ 12:57:51 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/dist/tsc/tsconfig.tsbuildinfo'
58
58
 
59
- 11:55:08 AM - 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/dist/tsc/tsconfig.tsbuildinfo'
59
+ 12:57:51 PM - Project '../procaptcha-pow/tsconfig.json' is up to date because newest input '../procaptcha-pow/src/services/multiThreadedSolver.ts' is older than output '../procaptcha-pow/dist/tsc/tsconfig.tsbuildinfo'
60
60
 
61
- 11:55:08 AM - Project '../procaptcha-puzzle/tsconfig.json' is up to date because newest input '../procaptcha-puzzle/src/errorSites.ts' is older than output '../procaptcha-puzzle/dist/tsc/tsconfig.tsbuildinfo'
61
+ 12:57:51 PM - Project '../procaptcha-puzzle/tsconfig.json' is up to date because newest input '../procaptcha-puzzle/src/errorSites.ts' is older than output '../procaptcha-puzzle/dist/tsc/tsconfig.tsbuildinfo'
62
62
 
63
- 11:55:08 AM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/dist/tsc/tsconfig.tsbuildinfo'
63
+ 12:57:51 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/dist/tsc/tsconfig.tsbuildinfo'
64
64
 
65
- 11:55:08 AM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/errorSites.ts' is older than output '../datasets/dist/tsc/tsconfig.tsbuildinfo'
65
+ 12:57:51 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/mocks/data/captchas.ts' is older than output '../datasets/dist/tsc/tsconfig.tsbuildinfo'
66
66
 
67
- 11:55:08 AM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/index.ts' is older than output '../procaptcha/dist/tsc/tsconfig.tsbuildinfo'
67
+ 12:57:51 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/index.ts' is older than output '../procaptcha/dist/tsc/tsconfig.tsbuildinfo'
68
68
 
69
- 11:55:08 AM - Project '../procaptcha-react/tsconfig.json' is up to date because newest input '../procaptcha-react/src/errorSites.ts' is older than output '../procaptcha-react/dist/tsc/tsconfig.tsbuildinfo'
69
+ 12:57:51 PM - Project '../procaptcha-react/tsconfig.json' is up to date because newest input '../procaptcha-react/src/errorSites.ts' is older than output '../procaptcha-react/dist/tsc/tsconfig.tsbuildinfo'
70
70
 
71
- 11:55:08 AM - Project 'tsconfig.json' is out of date because output file 'dist/tsc/tsconfig.tsbuildinfo' does not exist
71
+ 12:57:51 PM - Project 'tsconfig.json' is out of date because output file 'dist/tsc/tsconfig.tsbuildinfo' does not exist
72
72
 
73
- 11:55:08 AM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
73
+ 12:57:51 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
74
74
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,56 @@
1
1
  # @prosopo/procaptcha-frictionless
2
2
 
3
+ ## 2.22.0
4
+ ### Minor Changes
5
+
6
+ - 78107d9: Record the fingerprint summary, and with it the device bucket, for every captcha type rather than only PoW.
7
+
8
+ The proof of fingerprint was only built by the PoW widget and only read when a PoW solution was submitted, so sessions served a puzzle or an image never had a bucket. About half of puzzle drags could only be given one by finding a PoW the same account had solved.
9
+
10
+ The widget now sends the proof with the frictionless request, best-effort and capped at a second so it never delays the captcha. The provider verifies and summarises it once, stores the summary on the session, and the PoW, puzzle and image records copy it from there. Escalation sessions inherit it. A proof sent with a PoW solution still replaces the one from the frictionless request.
11
+
12
+ The summary is only recorded at the frictionless step, not passed to the routing machine there, so existing `deviceBucket` counter rules keep firing where they did before.
13
+
14
+ ### Patch Changes
15
+
16
+ - 1966fc1: Bump the npm-minor-and-patch group across 1 directory with 15 updates
17
+ - d6cc6fe: Pages with more than one widget no longer make every widget after the first fail with `No session found`. The provider hands the same live session to every /frictionless call from one user, IP and site key, and the first challenge used it up, so each later widget got a 400 and had to fetch a new session; clicking several at once could run a widget out of retries and reset it. Each widget now sends a slot number (0, 1, 2, … in page order, capped at 15) and the provider keeps one session per slot. The first widget keeps the old dedup key, so single-widget pages are unchanged, and a reload still reuses each widget's own session.
18
+ - b2ee10d: Removing or resetting a frictionless widget while its bot-detection request is still running no longer lets that request finish the job. Before, a detection that came back after the widget was gone could still mount the Web Bot Auth badge and call `onHuman` with a token, call `onError`, keep retrying against other providers, or schedule a restart timer that nothing could cancel and that later called `onReset`. The widget now stops as soon as it is destroyed.
19
+ - 0e4bc70: Let every widget on a page share one detector-bundle assignment instead of only the first.
20
+
21
+ `takePrefetchedDetector` removed the in-flight entry on claim, so on a page carrying several widgets the first claimed the prefetch and every other widget issued its own provider resolve plus `assignDetectorBundle`. One production integration mounts a widget per form — eight on a property page — so a single page view cost eight assign calls rather than one, enough on its own to push ordinary visitors past a per-IP rate detector.
22
+
23
+ Sharing is sound: `detectorSessionId` binds to a `bundleId` in Redis purely so the provider can resolve which cipher keys decrypt that widget's SIMD readings. Widgets sharing an assignment run the same bundle, so those are the right keys — it is a lookup, not a one-shot token.
24
+
25
+ The guarantee the removal existed for is kept by two narrower mechanisms: a prefetch that rejects drops itself from the map, so no later widget inherits a failed pin, and entries go stale after 60s, so a widget rendered much later starts a fresh prefetch rather than reusing an aged provider pin. Retries were never affected either way — `customDetectBot` only claims on a first attempt.
26
+ - 76b6edd: The widget now tells the provider which bundle it is and where it was loaded from, on every request:
27
+
28
+ - `X-Prosopo-Bundle-Version`: the release the bundle was built from, or `dev` for a local build.
29
+ - `X-Prosopo-Bundle-Origin`: the origin the widget's code came from. `https://js.prosopo.io` is the hosted bundle. Anything else is a site serving its own copy, or building our npm packages into its app.
30
+
31
+ Providers store request headers on the session and in the request logs, so together with the site key these show which sites self-host and which version each one runs.
32
+
33
+ The provider now allows both headers in CORS. Every provider must run this version before the new bundle is published to the CDN: a widget sending these headers to an older provider fails the browser's preflight check and cannot load a captcha.
34
+ - Updated dependencies [1966fc1]
35
+ - Updated dependencies [c69b636]
36
+ - Updated dependencies [78107d9]
37
+ - Updated dependencies [d6cc6fe]
38
+ - Updated dependencies [f13677e]
39
+ - Updated dependencies [77bd891]
40
+ - Updated dependencies [76b6edd]
41
+ - @prosopo/common@3.3.2
42
+ - @prosopo/fingerprint@2.8.4
43
+ - @prosopo/locale@3.13.2
44
+ - @prosopo/procaptcha-common@2.21.10
45
+ - @prosopo/types@5.20.0
46
+ - @prosopo/widget-skeleton@2.10.5
47
+ - @prosopo/api@4.8.0
48
+ - @prosopo/procaptcha-pow@2.14.0
49
+ - @prosopo/procaptcha-puzzle@2.17.10
50
+ - @prosopo/procaptcha-audio@0.2.11
51
+ - @prosopo/procaptcha-icon-order@0.2.11
52
+ - @prosopo/procaptcha-react@2.14.11
53
+
3
54
  ## 2.21.9
4
55
  ### Patch Changes
5
56
 
@@ -1,9 +1,9 @@
1
1
  const require_detectorLoader = require("./detectorLoader.cjs");
2
2
  const require_detectorPrefetch = require("./detectorPrefetch.cjs");
3
3
  let _prosopo_common = require("@prosopo/common");
4
- let _prosopo_locale = require("@prosopo/locale");
5
4
  let _prosopo_procaptcha_common = require("@prosopo/procaptcha-common");
6
5
  let _prosopo_api = require("@prosopo/api");
6
+ let _prosopo_fingerprint = require("@prosopo/fingerprint");
7
7
  //#region src/customDetectBot.ts
8
8
  var ASSIGN_TIMEOUT_MS = 1e4;
9
9
  var sanitiseHref = (href) => {
@@ -69,7 +69,16 @@ var withTimeout = async (promise, ms) => {
69
69
  throw error;
70
70
  }
71
71
  };
72
- var customDetectBot = async (config, container, restartFn, retryContext, refreshOf, switchToImage) => {
72
+ var FINGERPRINT_PROOF_TIMEOUT_MS = 1e3;
73
+ var fingerprintProofIfReady = async () => {
74
+ try {
75
+ const proof = await withTimeout((0, _prosopo_fingerprint.getFingerprintProof)(_prosopo_fingerprint.FINGERPRINT_DISCLOSURE_KEYS), FINGERPRINT_PROOF_TIMEOUT_MS);
76
+ return (0, _prosopo_fingerprint.encodeFingerprintProof)(proof);
77
+ } catch {
78
+ return;
79
+ }
80
+ };
81
+ var customDetectBot = async (config, container, restartFn, retryContext, refreshOf, switchToImage, widgetSlot) => {
73
82
  if (!config.account.address) throw new _prosopo_common.ProsopoError({
74
83
  code: "SITE_KEY_MISSING",
75
84
  errorSite: "FRIC-2"
@@ -84,7 +93,7 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
84
93
  prefetchedResult = void 0;
85
94
  }
86
95
  const provider = prefetchedResult?.provider ?? await (0, _prosopo_procaptcha_common.getProcaptchaRandomActiveProvider)(config.defaultEnvironment, ipMode, retryContext);
87
- const providerApi = new _prosopo_api.ProviderApi(provider.provider.url, config.account.address, void 0, (0, _prosopo_locale.widgetLanguageHeaders)(config.language));
96
+ const providerApi = new _prosopo_api.ProviderApi(provider.provider.url, config.account.address, void 0, (0, _prosopo_procaptcha_common.widgetRequestHeaders)(config.language));
88
97
  let detectorSessionId;
89
98
  let providerDetect;
90
99
  let detectorOptions;
@@ -106,7 +115,8 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
106
115
  if (providerDetect === void 0) {
107
116
  const userAccount = await ext.getAccount(config);
108
117
  const { currentUrl: fallbackUrl, iframeUrl: fallbackIframeUrl } = getCurrentPageUrls();
109
- const captcha = await withTimeout(providerApi.getFrictionlessCaptcha(void 0, void 0, config.account.address, userAccount.account.address, config.mode, void 0, void 0, fallbackUrl, fallbackIframeUrl, clientSessionId, refreshOf, switchToImage), 1e4);
118
+ const fallbackFingerprintProof = await fingerprintProofIfReady();
119
+ const captcha = await withTimeout(providerApi.getFrictionlessCaptcha(void 0, void 0, config.account.address, userAccount.account.address, config.mode, void 0, void 0, fallbackUrl, fallbackIframeUrl, clientSessionId, refreshOf, switchToImage, fallbackFingerprintProof, widgetSlot), 1e4);
110
120
  if (captcha.dns_url) try {
111
121
  fetch(captcha.dns_url, {
112
122
  method: "GET",
@@ -131,7 +141,8 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
131
141
  const detectionResult = await providerDetect(container, restartFn, () => ext.getAccount(config), detectorOptions);
132
142
  const userAccount = detectionResult.userAccount;
133
143
  const { currentUrl, iframeUrl } = getCurrentPageUrls();
134
- const captchaPromise = providerApi.getFrictionlessCaptcha(detectionResult.token, detectionResult.encryptHeadHash, config.account.address, userAccount.account.address, config.mode, void 0, detectorSessionId, currentUrl, iframeUrl, clientSessionId, refreshOf, switchToImage);
144
+ const fingerprintProof = await fingerprintProofIfReady();
145
+ const captchaPromise = providerApi.getFrictionlessCaptcha(detectionResult.token, detectionResult.encryptHeadHash, config.account.address, userAccount.account.address, config.mode, void 0, detectorSessionId, currentUrl, iframeUrl, clientSessionId, refreshOf, switchToImage, fingerprintProof, widgetSlot);
135
146
  if (detectionResult.getSimdReadings) detectionResult.getSimdReadings(6e4).catch(() => void 0);
136
147
  const captcha = await withTimeout(captchaPromise, 1e4);
137
148
  if (captcha.dns_url) try {
@@ -1,4 +1,3 @@
1
- let _prosopo_locale = require("@prosopo/locale");
2
1
  let _prosopo_procaptcha_common = require("@prosopo/procaptcha-common");
3
2
  let _prosopo_api = require("@prosopo/api");
4
3
  //#region src/detectorPrefetch.ts
@@ -15,16 +14,29 @@ let _prosopo_api = require("@prosopo/api");
15
14
  * Nothing in the request depends on the widget, i18n or its config: it needs
16
15
  * the site key (a DOM attribute, readable immediately), the environment (a
17
16
  * build-time constant), the IP-mode flags and the site's language (DOM
18
- * attributes). So the entry
19
- * point kicks it off as soon as it has read those, and `customDetectBot` picks
20
- * up the in-flight promise instead of starting its own.
17
+ * attributes). So the entry point kicks it off as soon as it has read those,
18
+ * and `customDetectBot` picks up the in-flight promise instead of starting its
19
+ * own.
21
20
  *
22
- * The cache is deliberately single-use. A provider pin is only valid for the
23
- * attempt it was made for — on a retry the previous pronode is the one that
24
- * just failed — so a consumed entry is dropped and the retry re-resolves.
21
+ * Every widget on the page for the same key claims the same assignment, so a
22
+ * page with one widget per form costs one assign rather than one per widget.
23
+ * That is safe because `detectorSessionId` only tells the provider which
24
+ * bundle's keys decrypt the readings, and every claimant runs that bundle. A
25
+ * retry never claims (see `customDetectBot`), a failed prefetch drops itself,
26
+ * and an entry older than PREFETCH_TTL_MS is replaced, so no claimant inherits
27
+ * a failed or aged provider pin.
25
28
  */
26
29
  var inFlight = /* @__PURE__ */ new Map();
30
+ var PREFETCH_TTL_MS = 6e4;
27
31
  var keyOf = (environment, ipMode, siteKey) => `${environment}|${ipMode ?? "auto"}|${siteKey}`;
32
+ var freshEntry = (key) => {
33
+ const entry = inFlight.get(key);
34
+ if (entry && Date.now() - entry.startedAt > PREFETCH_TTL_MS) {
35
+ inFlight.delete(key);
36
+ return;
37
+ }
38
+ return entry;
39
+ };
28
40
  /**
29
41
  * Start resolving a provider and assigning a detector bundle. Safe to call more
30
42
  * than once for the same key — subsequent calls join the in-flight request.
@@ -36,27 +48,28 @@ var keyOf = (environment, ipMode, siteKey) => `${environment}|${ipMode ?? "auto"
36
48
  */
37
49
  var prefetchDetector = (environment, ipMode, siteKey, language) => {
38
50
  const key = keyOf(environment, ipMode, siteKey);
39
- if (inFlight.has(key)) return;
51
+ if (freshEntry(key)) return;
52
+ const startedAt = Date.now();
40
53
  const promise = (async () => {
41
54
  const provider = await (0, _prosopo_procaptcha_common.getProcaptchaRandomActiveProvider)(environment, ipMode);
42
55
  return {
43
56
  provider,
44
- assigned: await new _prosopo_api.ProviderApi(provider.provider.url, siteKey, void 0, (0, _prosopo_locale.widgetLanguageHeaders)(language)).assignDetectorBundle(siteKey)
57
+ assigned: await new _prosopo_api.ProviderApi(provider.provider.url, siteKey, void 0, (0, _prosopo_procaptcha_common.widgetRequestHeaders)(language)).assignDetectorBundle(siteKey)
45
58
  };
46
59
  })();
47
- promise.catch(() => void 0);
48
- inFlight.set(key, promise);
60
+ promise.catch(() => {
61
+ if (inFlight.get(key)?.promise === promise) inFlight.delete(key);
62
+ });
63
+ inFlight.set(key, {
64
+ promise,
65
+ startedAt
66
+ });
49
67
  };
50
68
  /**
51
- * Claim a prefetched assignment, if one was started for this exact key. The
52
- * entry is removed, so a retry does not reuse a pin that may have just failed.
69
+ * Claim the prefetched assignment for this exact key, if one is still fresh.
70
+ * The entry stays in place so every widget on the page shares it.
53
71
  */
54
- var takePrefetchedDetector = (environment, ipMode, siteKey) => {
55
- const key = keyOf(environment, ipMode, siteKey);
56
- const promise = inFlight.get(key);
57
- if (promise) inFlight.delete(key);
58
- return promise;
59
- };
72
+ var takePrefetchedDetector = (environment, ipMode, siteKey) => freshEntry(keyOf(environment, ipMode, siteKey))?.promise;
60
73
  /** Test seam — drops any in-flight prefetches. */
61
74
  var clearPrefetchedDetectors = () => {
62
75
  inFlight.clear();
@@ -2,6 +2,7 @@ const require_authenticatedBadge = require("./authenticatedBadge.cjs");
2
2
  const require_customDetectBot = require("./customDetectBot.cjs");
3
3
  const require_frictionlessResultGuard = require("./frictionlessResultGuard.cjs");
4
4
  const require_sessionInvalidatedRecovery = require("./sessionInvalidatedRecovery.cjs");
5
+ const require_widgetSlot = require("./widgetSlot.cjs");
5
6
  let _prosopo_common = require("@prosopo/common");
6
7
  let _prosopo_locale = require("@prosopo/locale");
7
8
  let _prosopo_procaptcha_common = require("@prosopo/procaptcha-common");
@@ -47,7 +48,10 @@ var mountProcaptchaFrictionless = (container, props) => {
47
48
  const manualStart = _prosopo_types.StartModeEnum.manual === config.startMode;
48
49
  let manualStarted = false;
49
50
  let pendingExecute = false;
50
- const banner = (0, _prosopo_procaptcha_common.mountTestModeBanner)(container, { siteKey: config.account?.address ?? "" });
51
+ const siteKey = config.account?.address ?? "";
52
+ const banner = (0, _prosopo_procaptcha_common.mountTestModeBanner)(container, { siteKey });
53
+ const widgetSlot = require_widgetSlot.claimWidgetSlot(siteKey);
54
+ teardown.add(() => require_widgetSlot.releaseWidgetSlot(siteKey, widgetSlot));
51
55
  const slot = (0, _prosopo_procaptcha_common.createElement)("div");
52
56
  container.appendChild(slot);
53
57
  let solver;
@@ -92,6 +96,7 @@ var mountProcaptchaFrictionless = (container, props) => {
92
96
  };
93
97
  let restartCount = 0;
94
98
  const restartComponentTimeout = () => {
99
+ if (destroyed) return;
95
100
  const delay = (0, _prosopo_procaptcha_common.getRestartDelayMs)(restartCount);
96
101
  restartCount += 1;
97
102
  const timer = setTimeout(() => {
@@ -116,6 +121,7 @@ var mountProcaptchaFrictionless = (container, props) => {
116
121
  (widgetContainer ?? document).dispatchEvent(new CustomEvent(PROCAPTCHA_EXECUTE_EVENT));
117
122
  };
118
123
  const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false, escalationCoords) => {
124
+ if (destroyed) return;
119
125
  audioChosen = audioChosen && offersAudioAlternative(captchaType);
120
126
  const onEscalate = (next, newSessionId, coords) => {
121
127
  if (escalatedSessionIds.has(newSessionId)) return;
@@ -232,6 +238,7 @@ var mountProcaptchaFrictionless = (container, props) => {
232
238
  replayPendingExecute();
233
239
  };
234
240
  const start = async () => {
241
+ if (destroyed) return;
235
242
  if (!(0, _prosopo_procaptcha_common.isSecureBrowserContext)()) {
236
243
  const error = frontendError(new _prosopo_common.ProsopoError({
237
244
  code: "INSECURE_CONTEXT",
@@ -244,7 +251,8 @@ var mountProcaptchaFrictionless = (container, props) => {
244
251
  await (0, _prosopo_procaptcha_common.providerRetry)(async () => {
245
252
  state.attemptCount += 1;
246
253
  const configOutput = _prosopo_types.ProcaptchaConfigSchema.parse(config);
247
- const result = await detectBot(configOutput, widgetContainer, restart, { attempt: state.attemptCount }, nextRefreshOf, nextSwitchToImage);
254
+ const result = await detectBot(configOutput, widgetContainer, restart, { attempt: state.attemptCount }, nextRefreshOf, nextSwitchToImage, widgetSlot);
255
+ if (destroyed) return;
248
256
  const guard = require_frictionlessResultGuard.evaluateFrictionlessResult(result);
249
257
  if ("error" === guard.kind) {
250
258
  if (guard.retryable) throw new Error(guard.message);
@@ -281,6 +289,7 @@ var mountProcaptchaFrictionless = (container, props) => {
281
289
  loading: false
282
290
  };
283
291
  }, start, resetState, state.attemptCount, 5).finally(() => {
292
+ if (destroyed) return;
284
293
  if (state.attemptCount >= 5) {
285
294
  events.onError(/* @__PURE__ */ new Error("Cannot load CAPTCHA"));
286
295
  fallOverWithStyle();
@@ -0,0 +1,21 @@
1
+ let _prosopo_types = require("@prosopo/types");
2
+ //#region src/widgetSlot.ts
3
+ var claimedSlots = /* @__PURE__ */ new Map();
4
+ var claimWidgetSlot = (siteKey) => {
5
+ const claimed = claimedSlots.get(siteKey) ?? /* @__PURE__ */ new Set();
6
+ claimedSlots.set(siteKey, claimed);
7
+ for (let slot = 0; slot < _prosopo_types.MAX_WIDGET_SLOT; slot++) if (!claimed.has(slot)) {
8
+ claimed.add(slot);
9
+ return slot;
10
+ }
11
+ return _prosopo_types.MAX_WIDGET_SLOT;
12
+ };
13
+ var releaseWidgetSlot = (siteKey, slot) => {
14
+ const claimed = claimedSlots.get(siteKey);
15
+ if (!claimed) return;
16
+ claimed.delete(slot);
17
+ if (claimed.size === 0) claimedSlots.delete(siteKey);
18
+ };
19
+ //#endregion
20
+ exports.claimWidgetSlot = claimWidgetSlot;
21
+ exports.releaseWidgetSlot = releaseWidgetSlot;
@@ -1,9 +1,9 @@
1
1
  import { DetectorLoaderFromScript } from "./detectorLoader.js";
2
2
  import { takePrefetchedDetector } from "./detectorPrefetch.js";
3
3
  import { ProsopoError } from "@prosopo/common";
4
- import { widgetLanguageHeaders } from "@prosopo/locale";
5
- import { ExtensionLoader, getProcaptchaRandomActiveProvider, pickIpMode, resolveClientSessionId } from "@prosopo/procaptcha-common";
4
+ import { ExtensionLoader, getProcaptchaRandomActiveProvider, pickIpMode, resolveClientSessionId, widgetRequestHeaders } from "@prosopo/procaptcha-common";
6
5
  import { ProviderApi } from "@prosopo/api";
6
+ import { FINGERPRINT_DISCLOSURE_KEYS, encodeFingerprintProof, getFingerprintProof } from "@prosopo/fingerprint";
7
7
  //#region src/customDetectBot.ts
8
8
  var ASSIGN_TIMEOUT_MS = 1e4;
9
9
  var sanitiseHref = (href) => {
@@ -69,7 +69,15 @@ var withTimeout = async (promise, ms) => {
69
69
  throw error;
70
70
  }
71
71
  };
72
- var customDetectBot = async (config, container, restartFn, retryContext, refreshOf, switchToImage) => {
72
+ var FINGERPRINT_PROOF_TIMEOUT_MS = 1e3;
73
+ var fingerprintProofIfReady = async () => {
74
+ try {
75
+ return encodeFingerprintProof(await withTimeout(getFingerprintProof(FINGERPRINT_DISCLOSURE_KEYS), FINGERPRINT_PROOF_TIMEOUT_MS));
76
+ } catch {
77
+ return;
78
+ }
79
+ };
80
+ var customDetectBot = async (config, container, restartFn, retryContext, refreshOf, switchToImage, widgetSlot) => {
73
81
  if (!config.account.address) throw new ProsopoError({
74
82
  code: "SITE_KEY_MISSING",
75
83
  errorSite: "FRIC-2"
@@ -84,7 +92,7 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
84
92
  prefetchedResult = void 0;
85
93
  }
86
94
  const provider = prefetchedResult?.provider ?? await getProcaptchaRandomActiveProvider(config.defaultEnvironment, ipMode, retryContext);
87
- const providerApi = new ProviderApi(provider.provider.url, config.account.address, void 0, widgetLanguageHeaders(config.language));
95
+ const providerApi = new ProviderApi(provider.provider.url, config.account.address, void 0, widgetRequestHeaders(config.language));
88
96
  let detectorSessionId;
89
97
  let providerDetect;
90
98
  let detectorOptions;
@@ -106,7 +114,8 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
106
114
  if (providerDetect === void 0) {
107
115
  const userAccount = await ext.getAccount(config);
108
116
  const { currentUrl: fallbackUrl, iframeUrl: fallbackIframeUrl } = getCurrentPageUrls();
109
- const captcha = await withTimeout(providerApi.getFrictionlessCaptcha(void 0, void 0, config.account.address, userAccount.account.address, config.mode, void 0, void 0, fallbackUrl, fallbackIframeUrl, clientSessionId, refreshOf, switchToImage), 1e4);
117
+ const fallbackFingerprintProof = await fingerprintProofIfReady();
118
+ const captcha = await withTimeout(providerApi.getFrictionlessCaptcha(void 0, void 0, config.account.address, userAccount.account.address, config.mode, void 0, void 0, fallbackUrl, fallbackIframeUrl, clientSessionId, refreshOf, switchToImage, fallbackFingerprintProof, widgetSlot), 1e4);
110
119
  if (captcha.dns_url) try {
111
120
  fetch(captcha.dns_url, {
112
121
  method: "GET",
@@ -131,7 +140,8 @@ var customDetectBot = async (config, container, restartFn, retryContext, refresh
131
140
  const detectionResult = await providerDetect(container, restartFn, () => ext.getAccount(config), detectorOptions);
132
141
  const userAccount = detectionResult.userAccount;
133
142
  const { currentUrl, iframeUrl } = getCurrentPageUrls();
134
- const captchaPromise = providerApi.getFrictionlessCaptcha(detectionResult.token, detectionResult.encryptHeadHash, config.account.address, userAccount.account.address, config.mode, void 0, detectorSessionId, currentUrl, iframeUrl, clientSessionId, refreshOf, switchToImage);
143
+ const fingerprintProof = await fingerprintProofIfReady();
144
+ const captchaPromise = providerApi.getFrictionlessCaptcha(detectionResult.token, detectionResult.encryptHeadHash, config.account.address, userAccount.account.address, config.mode, void 0, detectorSessionId, currentUrl, iframeUrl, clientSessionId, refreshOf, switchToImage, fingerprintProof, widgetSlot);
135
145
  if (detectionResult.getSimdReadings) detectionResult.getSimdReadings(6e4).catch(() => void 0);
136
146
  const captcha = await withTimeout(captchaPromise, 1e4);
137
147
  if (captcha.dns_url) try {