@prosopo/provider 5.6.3 → 5.7.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 (115) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +22 -21
  2. package/.turbo/turbo-build$colon$tsc.log +28 -25
  3. package/.turbo/turbo-build.log +22 -21
  4. package/CHANGELOG.md +204 -0
  5. package/dist/api/blacklistRequestInspector.d.ts +1 -1
  6. package/dist/api/blacklistRequestInspector.d.ts.map +1 -1
  7. package/dist/api/blacklistRequestInspector.js +9 -12
  8. package/dist/api/blacklistRequestInspector.js.map +1 -1
  9. package/dist/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.d.ts.map +1 -1
  10. package/dist/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.js +4 -4
  11. package/dist/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.js.map +1 -1
  12. package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.d.ts +0 -1
  13. package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.d.ts.map +1 -1
  14. package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.js +1 -9
  15. package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.js.map +1 -1
  16. package/dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.d.ts.map +1 -1
  17. package/dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.js +11 -65
  18. package/dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.js.map +1 -1
  19. package/dist/api/captcha/getFrictionlessCaptchaChallenge/handler.d.ts.map +1 -1
  20. package/dist/api/captcha/getFrictionlessCaptchaChallenge/handler.js +1 -0
  21. package/dist/api/captcha/getFrictionlessCaptchaChallenge/handler.js.map +1 -1
  22. package/dist/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.d.ts.map +1 -1
  23. package/dist/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.js +2 -2
  24. package/dist/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.js.map +1 -1
  25. package/dist/api/captcha/getImageCaptchaChallenge.d.ts.map +1 -1
  26. package/dist/api/captcha/getImageCaptchaChallenge.js +2 -3
  27. package/dist/api/captcha/getImageCaptchaChallenge.js.map +1 -1
  28. package/dist/api/captcha/submitPoWCaptchaSolution.d.ts.map +1 -1
  29. package/dist/api/captcha/submitPoWCaptchaSolution.js +2 -1
  30. package/dist/api/captcha/submitPoWCaptchaSolution.js.map +1 -1
  31. package/dist/api/captcha/trafficFilterRequestTime.d.ts.map +1 -1
  32. package/dist/api/captcha/trafficFilterRequestTime.js +2 -2
  33. package/dist/api/captcha/trafficFilterRequestTime.js.map +1 -1
  34. package/dist/api/verify.d.ts.map +1 -1
  35. package/dist/api/verify.js +1 -1
  36. package/dist/api/verify.js.map +1 -1
  37. package/dist/cjs/api/blacklistRequestInspector.cjs +8 -11
  38. package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.cjs +3 -3
  39. package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/constants.cjs +0 -9
  40. package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.cjs +9 -63
  41. package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/handler.cjs +1 -0
  42. package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.cjs +1 -1
  43. package/dist/cjs/api/captcha/getImageCaptchaChallenge.cjs +1 -1
  44. package/dist/cjs/api/captcha/submitPoWCaptchaSolution.cjs +3 -2
  45. package/dist/cjs/api/captcha/trafficFilterRequestTime.cjs +1 -1
  46. package/dist/cjs/api/verify.cjs +1 -1
  47. package/dist/cjs/tasks/frictionless/frictionlessTasks.cjs +5 -7
  48. package/dist/cjs/tasks/frictionless/frictionlessTasksUtils.cjs +30 -1
  49. package/dist/cjs/tasks/imgCaptcha/imgCaptchaTasks.cjs +1 -2
  50. package/dist/cjs/tasks/puzzle/puzzleDifficulty.cjs +13 -170
  51. package/dist/cjs/tasks/puzzle/puzzleRenderer.cjs +2 -2
  52. package/dist/cjs/tasks/spam/checkTrafficFilter.cjs +2 -8
  53. package/dist/tasks/frictionless/frictionlessTasks.d.ts +1 -2
  54. package/dist/tasks/frictionless/frictionlessTasks.d.ts.map +1 -1
  55. package/dist/tasks/frictionless/frictionlessTasks.js +5 -7
  56. package/dist/tasks/frictionless/frictionlessTasks.js.map +1 -1
  57. package/dist/tasks/frictionless/frictionlessTasksUtils.d.ts.map +1 -1
  58. package/dist/tasks/frictionless/frictionlessTasksUtils.js +30 -1
  59. package/dist/tasks/frictionless/frictionlessTasksUtils.js.map +1 -1
  60. package/dist/tasks/frictionless/routingMachine.d.ts +1 -0
  61. package/dist/tasks/frictionless/routingMachine.d.ts.map +1 -1
  62. package/dist/tasks/frictionless/routingMachine.js.map +1 -1
  63. package/dist/tasks/imgCaptcha/imgCaptchaTasks.d.ts +1 -1
  64. package/dist/tasks/imgCaptcha/imgCaptchaTasks.d.ts.map +1 -1
  65. package/dist/tasks/imgCaptcha/imgCaptchaTasks.js +1 -3
  66. package/dist/tasks/imgCaptcha/imgCaptchaTasks.js.map +1 -1
  67. package/dist/tasks/puzzle/puzzleDifficulty.d.ts +0 -17
  68. package/dist/tasks/puzzle/puzzleDifficulty.d.ts.map +1 -1
  69. package/dist/tasks/puzzle/puzzleDifficulty.js +11 -164
  70. package/dist/tasks/puzzle/puzzleDifficulty.js.map +1 -1
  71. package/dist/tasks/puzzle/puzzleRenderer.d.ts.map +1 -1
  72. package/dist/tasks/puzzle/puzzleRenderer.js +1 -1
  73. package/dist/tasks/puzzle/puzzleRenderer.js.map +1 -1
  74. package/dist/tasks/spam/checkTrafficFilter.d.ts +1 -1
  75. package/dist/tasks/spam/checkTrafficFilter.d.ts.map +1 -1
  76. package/dist/tasks/spam/checkTrafficFilter.js +3 -9
  77. package/dist/tasks/spam/checkTrafficFilter.js.map +1 -1
  78. package/dist/tests/integration/api/admin/apiRegisterSiteKeyEndpoint.integration.test.js +3 -19
  79. package/dist/tests/integration/api/admin/apiRegisterSiteKeyEndpoint.integration.test.js.map +1 -1
  80. package/dist/tests/integration/api/admin/apiRegisterSiteKeysEndpoint.integration.test.js +1 -10
  81. package/dist/tests/integration/api/admin/apiRegisterSiteKeysEndpoint.integration.test.js.map +1 -1
  82. package/dist/tests/integration/clientSettingsPersistence.integration.test.js +3 -15
  83. package/dist/tests/integration/clientSettingsPersistence.integration.test.js.map +1 -1
  84. package/dist/tests/unit/api/admin/apiRegisterSiteKeyEndpoint.unit.test.js +1 -0
  85. package/dist/tests/unit/api/admin/apiRegisterSiteKeyEndpoint.unit.test.js.map +1 -1
  86. package/dist/tests/unit/api/blacklistRequestInspector.unit.test.js +35 -0
  87. package/dist/tests/unit/api/blacklistRequestInspector.unit.test.js.map +1 -1
  88. package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/constants.unit.test.js +1 -30
  89. package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/constants.unit.test.js.map +1 -1
  90. package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.unit.test.js +0 -6
  91. package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.unit.test.js.map +1 -1
  92. package/dist/tests/unit/api/getFrictionlessCaptchaChallenge.unit.test.js +11 -122
  93. package/dist/tests/unit/api/getFrictionlessCaptchaChallenge.unit.test.js.map +1 -1
  94. package/dist/tests/unit/tasks/captchaManager.unit.test.js +2 -10
  95. package/dist/tests/unit/tasks/captchaManager.unit.test.js.map +1 -1
  96. package/dist/tests/unit/tasks/client/clientTasks.unit.test.js +3 -23
  97. package/dist/tests/unit/tasks/client/clientTasks.unit.test.js.map +1 -1
  98. package/dist/tests/unit/tasks/frictionless/frictionlessTasksUtils.unit.test.js +64 -0
  99. package/dist/tests/unit/tasks/frictionless/frictionlessTasksUtils.unit.test.js.map +1 -1
  100. package/dist/tests/unit/tasks/frictionless/routerImageRoundsClamp.unit.test.js +22 -3
  101. package/dist/tests/unit/tasks/frictionless/routerImageRoundsClamp.unit.test.js.map +1 -1
  102. package/dist/tests/unit/tasks/imgCaptcha/imgCaptchaTasks.unit.test.js +10 -10
  103. package/dist/tests/unit/tasks/imgCaptcha/imgCaptchaTasks.unit.test.js.map +1 -1
  104. package/dist/tests/unit/tasks/puzzleDifficulty.unit.test.js +2 -53
  105. package/dist/tests/unit/tasks/puzzleDifficulty.unit.test.js.map +1 -1
  106. package/package.json +29 -28
  107. package/dist/api/captcha/contextAwareValidation.d.ts +0 -4
  108. package/dist/api/captcha/contextAwareValidation.d.ts.map +0 -1
  109. package/dist/api/captcha/contextAwareValidation.js +0 -26
  110. package/dist/api/captcha/contextAwareValidation.js.map +0 -1
  111. package/dist/cjs/api/captcha/contextAwareValidation.cjs +0 -27
  112. package/dist/tests/unit/api/contextAwareValidation.unit.test.d.ts +0 -2
  113. package/dist/tests/unit/api/contextAwareValidation.unit.test.d.ts.map +0 -1
  114. package/dist/tests/unit/api/contextAwareValidation.unit.test.js +0 -84
  115. package/dist/tests/unit/api/contextAwareValidation.unit.test.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/provider@5.6.3 build:cjs
2
+ > @prosopo/provider@5.7.0 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -22,13 +22,13 @@ ViteCommonJSConfig: .
22
22
  '/home/runner/work/captcha/captcha/packages/api/tsconfig.json',
23
23
  '/home/runner/work/captcha/captcha/packages/types-env/tsconfig.json',
24
24
  '/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
25
+ '/home/runner/work/captcha/captcha/packages/captcha-severity/tsconfig.json',
25
26
  '/home/runner/work/captcha/captcha/packages/datasets/tsconfig.json',
26
27
  '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
27
28
  '/home/runner/work/captcha/captcha/packages/puzzle-assets/tsconfig.json'
28
29
  ]
29
30
  }
30
31
  {
31
- The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
32
32
  externals: [
33
33
  '@prosopo/api-route',
34
34
  '@prosopo/logger',
@@ -47,15 +47,17 @@ ViteCommonJSConfig: .
47
47
  '@prosopo/api',
48
48
  '@prosopo/types-env',
49
49
  '@prosopo/keyring',
50
+ '@prosopo/captcha-severity',
50
51
  '@prosopo/datasets',
51
52
  '@prosopo/load-balancer',
52
53
  '@prosopo/puzzle-assets'
53
54
  ]
54
55
  }
56
+ The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
55
57
  vite v8.1.5 building ssr environment for production...
56
58
  Bundle build started
57
59
  
58
- ✓ 108 modules transformed.
60
+ ✓ 107 modules transformed.
59
61
  rendering chunks...
60
62
  computing gzip size...
61
63
  dist/cjs/tasks/index.cjs 0.08 kB │ gzip: 0.07 kB
@@ -71,7 +73,6 @@ dist/cjs/utils/hashUserIp.cjs 0
71
73
  dist/cjs/api/testSiteKey.cjs 0.65 kB │ gzip: 0.32 kB
72
74
  dist/cjs/utils/hashUserAgent.cjs 0.66 kB │ gzip: 0.40 kB
73
75
  dist/cjs/api/validateAddress.cjs 0.80 kB │ gzip: 0.36 kB
74
- dist/cjs/tasks/frictionless/frictionlessTasksUtils.cjs 0.85 kB │ gzip: 0.43 kB
75
76
  dist/cjs/api/ja4.cjs 0.85 kB │ gzip: 0.47 kB
76
77
  dist/cjs/api/dnsEventUrl.cjs 0.85 kB │ gzip: 0.46 kB
77
78
  dist/cjs/tasks/dataset/datasetTasks.cjs 0.92 kB │ gzip: 0.41 kB
@@ -82,10 +83,10 @@ dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/sessionDedup.cjs 1
82
83
  dist/cjs/tasks/powCaptcha/powTasksUtils.cjs 1.05 kB │ gzip: 0.50 kB
83
84
  dist/cjs/api/admin/apiRegisterSiteKeyEndpoint.cjs 1.07 kB │ gzip: 0.48 kB
84
85
  dist/cjs/api/admin/apiRegisterSiteKeysEndpoint.cjs 1.14 kB │ gzip: 0.52 kB
86
+ dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/constants.cjs 1.15 kB │ gzip: 0.60 kB
85
87
  dist/cjs/utils/normalizeRequestIp.cjs 1.16 kB │ gzip: 0.52 kB
86
88
  dist/cjs/api/admin/apiRemoveSiteKeysEndpoint.cjs 1.16 kB │ gzip: 0.50 kB
87
89
  dist/cjs/api/admin/apiRemoveSiteKeyEndpoint.cjs 1.17 kB │ gzip: 0.50 kB
88
- dist/cjs/api/captcha/contextAwareValidation.cjs 1.17 kB │ gzip: 0.46 kB
89
90
  dist/cjs/schedulers/captchaScheduler.cjs 1.21 kB │ gzip: 0.50 kB
90
91
  dist/cjs/api/block.cjs 1.28 kB │ gzip: 0.48 kB
91
92
  dist/cjs/schedulers/getClientList.cjs 1.28 kB │ gzip: 0.55 kB
@@ -95,7 +96,6 @@ dist/cjs/api/admin/apiRemoveAllDecisionMachinesEndpoint.cjs 1
95
96
  dist/cjs/tasks/puzzle/backgroundBuffer.cjs 1.37 kB │ gzip: 0.52 kB
96
97
  dist/cjs/pairs.cjs 1.39 kB │ gzip: 0.60 kB
97
98
  dist/cjs/tasks/dataset/datasetTasksUtils.cjs 1.42 kB │ gzip: 0.49 kB
98
- dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/constants.cjs 1.42 kB │ gzip: 0.66 kB
99
99
  dist/cjs/utils/clientMetaData.cjs 1.48 kB │ gzip: 0.72 kB
100
100
  dist/cjs/compositeIpAddress.cjs 1.55 kB │ gzip: 0.57 kB
101
101
  dist/cjs/tasks/detection/getBotScore.cjs 1.55 kB │ gzip: 0.55 kB
@@ -118,56 +118,57 @@ dist/cjs/tasks/frictionless/routingMachine.cjs 2
118
118
  dist/cjs/api/public.cjs 2.18 kB │ gzip: 0.91 kB
119
119
  dist/cjs/migrations/frictionlessLadder.cjs 2.19 kB │ gzip: 0.95 kB
120
120
  dist/cjs/tasks/puzzle/stratifiedSampler.cjs 2.20 kB │ gzip: 1.08 kB
121
+ dist/cjs/tasks/frictionless/frictionlessTasksUtils.cjs 2.21 kB │ gzip: 1.10 kB
121
122
  dist/cjs/tasks/captchaTypeSelection.cjs 2.44 kB │ gzip: 1.04 kB
122
123
  dist/cjs/api/admin/apiDnsEventEndpoint.cjs 2.59 kB │ gzip: 1.00 kB
123
124
  dist/cjs/utils/dns.cjs 2.66 kB │ gzip: 1.02 kB
124
125
  dist/cjs/api/forwardVerify.cjs 2.66 kB │ gzip: 1.12 kB
126
+ dist/cjs/tasks/puzzle/puzzleDifficulty.cjs 2.66 kB │ gzip: 1.10 kB
125
127
  dist/cjs/api/captcha/checkSpamEmail.cjs 2.73 kB │ gzip: 0.95 kB
126
128
  dist/cjs/api/captcha/submitPuzzleCaptchaSolution.cjs 2.77 kB │ gzip: 0.99 kB
127
129
  dist/cjs/api/captcha/maintenanceModeResponses.cjs 2.91 kB │ gzip: 0.77 kB
128
130
  dist/cjs/api/captcha/submitImageCaptchaSolution.cjs 2.93 kB │ gzip: 1.03 kB
129
- dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.cjs 3.64 kB │ gzip: 1.35 kB
131
+ dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.cjs 3.66 kB │ gzip: 1.35 kB
130
132
  dist/cjs/api/admin/apiAdminRoutesProvider.cjs 3.67 kB │ gzip: 0.62 kB
131
133
  dist/cjs/api/rawTlsSignalsMiddleware.cjs 3.84 kB │ gzip: 1.16 kB
132
134
  dist/cjs/api/domainMiddleware.cjs 3.85 kB │ gzip: 1.26 kB
133
135
  dist/cjs/services/ipComparison.cjs 3.98 kB │ gzip: 1.20 kB
134
136
  dist/cjs/tasks/spam/evaluateEmailSpamRules.cjs 4.03 kB │ gzip: 1.60 kB
135
- dist/cjs/api/captcha/trafficFilterRequestTime.cjs 4.12 kB │ gzip: 1.52 kB
136
137
  dist/cjs/tasks/spam/checkSpamEmail.cjs 4.14 kB │ gzip: 1.14 kB
137
- dist/cjs/tasks/puzzle/puzzleRenderer.cjs 4.24 kB │ gzip: 1.51 kB
138
+ dist/cjs/api/captcha/trafficFilterRequestTime.cjs 4.17 kB │ gzip: 1.53 kB
139
+ dist/cjs/tasks/puzzle/puzzleRenderer.cjs 4.25 kB │ gzip: 1.51 kB
138
140
  dist/cjs/api/hardBlockVerdictCache.cjs 4.27 kB │ gzip: 1.70 kB
139
- dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.cjs 4.44 kB │ gzip: 1.05 kB
140
141
  dist/cjs/api/captcha.cjs 4.51 kB │ gzip: 1.40 kB
142
+ dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.cjs 4.56 kB │ gzip: 1.07 kB
141
143
  dist/cjs/tasks/dnsEvent/enrichDnsEvent.cjs 4.84 kB │ gzip: 1.74 kB
142
144
  dist/cjs/index.cjs 4.85 kB │ gzip: 1.01 kB
143
145
  dist/cjs/tasks/tasks.cjs 5.07 kB │ gzip: 1.57 kB
144
146
  dist/cjs/util/usageCounters.cjs 5.72 kB │ gzip: 2.03 kB
145
- dist/cjs/tasks/puzzle/puzzleDifficulty.cjs 5.78 kB │ gzip: 2.05 kB
146
147
  dist/cjs/api/captcha/getPoWCaptchaChallenge.cjs 6.65 kB │ gzip: 1.87 kB
147
- dist/cjs/api/captcha/getImageCaptchaChallenge.cjs 7.01 kB │ gzip: 2.00 kB
148
+ dist/cjs/api/captcha/getImageCaptchaChallenge.cjs 6.98 kB │ gzip: 1.99 kB
149
+ dist/cjs/tasks/spam/checkTrafficFilter.cjs 7.47 kB │ gzip: 2.48 kB
148
150
  dist/cjs/api/captcha/getPuzzleCaptchaChallenge.cjs 7.48 kB │ gzip: 2.00 kB
149
151
  dist/cjs/api/metrics.cjs 7.51 kB │ gzip: 2.12 kB
150
- dist/cjs/tasks/spam/checkTrafficFilter.cjs 7.65 kB │ gzip: 2.55 kB
151
152
  dist/cjs/tasks/detection/bundlePool.cjs 8.72 kB │ gzip: 3.26 kB
152
- dist/cjs/api/captcha/submitPoWCaptchaSolution.cjs 8.85 kB │ gzip: 2.66 kB
153
+ dist/cjs/api/captcha/submitPoWCaptchaSolution.cjs 8.93 kB │ gzip: 2.68 kB
154
+ dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.cjs 10.33 kB │ gzip: 1.82 kB
153
155
  dist/cjs/api/startProviderApi.cjs 11.62 kB │ gzip: 3.70 kB
154
156
  dist/cjs/tasks/client/clientTasks.cjs 11.73 kB │ gzip: 3.04 kB
155
157
  dist/cjs/tasks/decisionMachine/decisionMachineRunner.cjs 12.32 kB │ gzip: 3.81 kB
156
- dist/cjs/api/blacklistRequestInspector.cjs 12.41 kB │ gzip: 4.31 kB
157
- dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.cjs 12.53 kB │ gzip: 2.29 kB
158
+ dist/cjs/api/blacklistRequestInspector.cjs 12.38 kB │ gzip: 4.27 kB
158
159
  dist/cjs/util.cjs 13.25 kB │ gzip: 3.22 kB
159
- dist/cjs/api/verify.cjs 13.86 kB │ gzip: 2.60 kB
160
- dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/handler.cjs 18.28 kB │ gzip: 4.29 kB
161
- dist/cjs/tasks/frictionless/frictionlessTasks.cjs 20.36 kB │ gzip: 5.39 kB
160
+ dist/cjs/api/verify.cjs 13.81 kB │ gzip: 2.58 kB
161
+ dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/handler.cjs 18.33 kB │ gzip: 4.30 kB
162
+ dist/cjs/tasks/frictionless/frictionlessTasks.cjs 20.29 kB │ gzip: 5.36 kB
162
163
  dist/cjs/tasks/captchaManager.cjs 22.33 kB │ gzip: 6.35 kB
163
164
  dist/cjs/tasks/puzzleCaptcha/puzzleTasks.cjs 24.03 kB │ gzip: 5.15 kB
164
165
  dist/cjs/tasks/powCaptcha/powTasks.cjs 24.84 kB │ gzip: 5.97 kB
165
- dist/cjs/tasks/imgCaptcha/imgCaptchaTasks.cjs 28.41 kB │ gzip: 6.47 kB
166
+ dist/cjs/tasks/imgCaptcha/imgCaptchaTasks.cjs 28.20 kB │ gzip: 6.41 kB
166
167
  dist/cjs/tasks/detection/decodeBehavior.cjs 32.24 kB │ gzip: 10.32 kB
167
168
  dist/cjs/tasks/detection/decodeSimd.cjs 36.03 kB │ gzip: 11.96 kB
168
169
  dist/cjs/tasks/detection/decodePayload.cjs 49.79 kB │ gzip: 16.98 kB
169
170
 
170
- ✓ built in 194ms
171
+ ✓ built in 209ms
171
172
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodeBehavior.js to /home/runner/work/captcha/captcha/packages/provider/dist/cjs/tasks/detection/decodeBehavior.js
172
173
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodePayload.js to /home/runner/work/captcha/captcha/packages/provider/dist/cjs/tasks/detection/decodePayload.js
173
174
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodeSimd.js to /home/runner/work/captcha/captcha/packages/provider/dist/cjs/tasks/detection/decodeSimd.js
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/provider@5.6.3 build:tsc
2
+ > @prosopo/provider@5.7.0 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 10:02:57 PM - Projects in this build:
5
+ 10:40:18 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../util/tsconfig.json
8
8
  * ../logger/tsconfig.json
@@ -21,54 +21,57 @@
21
21
  * ../types-env/tsconfig.json
22
22
  * ../env/tsconfig.json
23
23
  * ../api-express-router/tsconfig.json
24
+ * ../captcha-severity/tsconfig.json
24
25
  * ../datasets/tsconfig.json
25
26
  * ../load-balancer/tsconfig.json
26
27
  * ../puzzle-assets/tsconfig.json
27
28
  * tsconfig.json
28
29
 
29
- 10:02:57 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'
30
+ 10:40:18 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/NodejsPolarsNativeFilePlugin.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
30
31
 
31
- 10:02:57 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
32
+ 10:40:18 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
32
33
 
33
- 10:02:57 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/logger.ts' is older than output '../logger/tsconfig.tsbuildinfo'
34
+ 10:40:18 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/logger.ts' is older than output '../logger/tsconfig.tsbuildinfo'
34
35
 
35
- 10:02:57 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'
36
+ 10:40:18 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/index.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
36
37
 
37
- 10:02:57 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
38
+ 10:40:18 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
38
39
 
39
- 10:02:57 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
+ 10:40:18 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
41
 
41
- 10:02:57 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
+ 10:40:18 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
43
 
43
- 10:02:57 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
44
+ 10:40:18 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/tests/utils/batches.unit.test.ts' is older than output '../common/tsconfig.tsbuildinfo'
44
45
 
45
- 10:02:57 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/types.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
46
+ 10:40:18 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
46
47
 
47
- 10:02:57 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'
48
+ 10:40:18 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'
48
49
 
49
- 10:02:57 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
50
+ 10:40:18 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
50
51
 
51
- 10:02:57 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'
52
+ 10:40:18 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/ruleRecord.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
52
53
 
53
- 10:02:57 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'
54
+ 10:40:18 PM - 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'
54
55
 
55
- 10:02:57 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/mongoGlobalSetup.ts' is older than output '../database/tsconfig.tsbuildinfo'
56
+ 10:40:18 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/unit/redisCacheEscalation.unit.test.ts' is older than output '../database/tsconfig.tsbuildinfo'
56
57
 
57
- 10:02:57 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
58
+ 10:40:18 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/pair/decode.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
58
59
 
59
- 10:02:57 PM - 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'
60
+ 10:40:18 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'
60
61
 
61
- 10:02:57 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/env.ts' is older than output '../env/tsconfig.tsbuildinfo'
62
+ 10:40:18 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'
62
63
 
63
- 10:02:57 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'
64
+ 10:40:18 PM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/tests/unit/apiExpressRouterFactory.unit.test.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
64
65
 
65
- 10:02:57 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/dataset.unit.test.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
66
+ 10:40:18 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'
66
67
 
67
- 10:02:57 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'
68
+ 10:40:18 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
68
69
 
69
- 10:02:57 PM - Project '../puzzle-assets/tsconfig.json' is up to date because newest input '../puzzle-assets/src/background.ts' is older than output '../puzzle-assets/tsconfig.tsbuildinfo'
70
+ 10:40:18 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/index.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
70
71
 
71
- 10:02:57 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
72
+ 10:40:18 PM - Project '../puzzle-assets/tsconfig.json' is up to date because newest input '../puzzle-assets/src/background.ts' is older than output '../puzzle-assets/tsconfig.tsbuildinfo'
72
73
 
73
- 10:02:57 PM - Building project '/home/runner/work/captcha/captcha/packages/provider/tsconfig.json'...
74
+ 10:40:18 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
75
+
76
+ 10:40:18 PM - Building project '/home/runner/work/captcha/captcha/packages/provider/tsconfig.json'...
74
77
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/provider@5.6.3 build
2
+ > @prosopo/provider@5.7.0 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/provider@5.6.3 build:cross-env
6
+ > @prosopo/provider@5.7.0 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -26,6 +26,7 @@ ViteEsmConfig: .
26
26
  '/home/runner/work/captcha/captcha/packages/api/tsconfig.json',
27
27
  '/home/runner/work/captcha/captcha/packages/types-env/tsconfig.json',
28
28
  '/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
29
+ '/home/runner/work/captcha/captcha/packages/captcha-severity/tsconfig.json',
29
30
  '/home/runner/work/captcha/captcha/packages/datasets/tsconfig.json',
30
31
  '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
31
32
  '/home/runner/work/captcha/captcha/packages/puzzle-assets/tsconfig.json'
@@ -50,6 +51,7 @@ ViteEsmConfig: .
50
51
  '@prosopo/api',
51
52
  '@prosopo/types-env',
52
53
  '@prosopo/keyring',
54
+ '@prosopo/captcha-severity',
53
55
  '@prosopo/datasets',
54
56
  '@prosopo/load-balancer',
55
57
  '@prosopo/puzzle-assets'
@@ -59,7 +61,7 @@ ViteEsmConfig: .
59
61
  vite v8.1.5 building ssr environment for production...
60
62
  Bundle build started
61
63
  
62
- ✓ 108 modules transformed.
64
+ ✓ 107 modules transformed.
63
65
  rendering chunks...
64
66
  computing gzip size...
65
67
  dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
@@ -76,7 +78,6 @@ dist/utils/hashUserIp.js 0.52 k
76
78
  dist/api/testSiteKey.js 0.56 kB │ gzip: 0.30 kB
77
79
  dist/utils/hashUserAgent.js 0.63 kB │ gzip: 0.39 kB
78
80
  dist/api/validateAddress.js 0.70 kB │ gzip: 0.33 kB
79
- dist/tasks/frictionless/frictionlessTasksUtils.js 0.79 kB │ gzip: 0.42 kB
80
81
  dist/api/dnsEventUrl.js 0.80 kB │ gzip: 0.44 kB
81
82
  dist/api/ja4.js 0.80 kB │ gzip: 0.44 kB
82
83
  dist/tasks/dataset/datasetTasks.js 0.85 kB │ gzip: 0.39 kB
@@ -85,11 +86,11 @@ dist/api/headerCheckMiddleware.js 0.91 k
85
86
  dist/api/captcha/getFrictionlessCaptchaChallenge/honeypotResponse.js 0.95 kB │ gzip: 0.51 kB
86
87
  dist/api/admin/apiRegisterSiteKeyEndpoint.js 1.00 kB │ gzip: 0.46 kB
87
88
  dist/api/captcha/getFrictionlessCaptchaChallenge/sessionDedup.js 1.01 kB │ gzip: 0.45 kB
89
+ dist/api/captcha/getFrictionlessCaptchaChallenge/constants.js 1.04 kB │ gzip: 0.57 kB
88
90
  dist/api/admin/apiRemoveSiteKeysEndpoint.js 1.07 kB │ gzip: 0.48 kB
89
91
  dist/api/admin/apiRegisterSiteKeysEndpoint.js 1.08 kB │ gzip: 0.50 kB
90
92
  dist/api/admin/apiRemoveSiteKeyEndpoint.js 1.08 kB │ gzip: 0.48 kB
91
93
  dist/api/block.js 1.08 kB │ gzip: 0.46 kB
92
- dist/api/captcha/contextAwareValidation.js 1.09 kB │ gzip: 0.45 kB
93
94
  dist/schedulers/captchaScheduler.js 1.11 kB │ gzip: 0.48 kB
94
95
  dist/utils/normalizeRequestIp.js 1.14 kB │ gzip: 0.52 kB
95
96
  dist/pairs.js 1.19 kB │ gzip: 0.58 kB
@@ -97,7 +98,6 @@ dist/schedulers/getClientList.js 1.19 k
97
98
  dist/tasks/puzzle/backgroundBuffer.js 1.20 kB │ gzip: 0.50 kB
98
99
  dist/api/admin/apiGetDecisionMachineEndpoint.js 1.26 kB │ gzip: 0.50 kB
99
100
  dist/api/admin/apiRemoveAllDecisionMachinesEndpoint.js 1.27 kB │ gzip: 0.51 kB
100
- dist/api/captcha/getFrictionlessCaptchaChallenge/constants.js 1.27 kB │ gzip: 0.63 kB
101
101
  dist/api/admin/apiRemoveDecisionMachineEndpoint.js 1.29 kB │ gzip: 0.51 kB
102
102
  dist/tasks/dataset/datasetTasksUtils.js 1.30 kB │ gzip: 0.48 kB
103
103
  dist/compositeIpAddress.js 1.36 kB │ gzip: 0.55 kB
@@ -122,56 +122,57 @@ dist/api/captcha/assignDetectorBundle.js 1.90 k
122
122
  dist/migrations/frictionlessLadder.js 2.12 kB │ gzip: 0.93 kB
123
123
  dist/tasks/puzzle/stratifiedSampler.js 2.14 kB │ gzip: 1.07 kB
124
124
  dist/tasks/frictionless/routingMachine.js 2.16 kB │ gzip: 0.91 kB
125
+ dist/tasks/frictionless/frictionlessTasksUtils.js 2.16 kB │ gzip: 1.09 kB
125
126
  dist/api/captcha/maintenanceModeResponses.js 2.16 kB │ gzip: 0.73 kB
126
127
  dist/tasks/captchaTypeSelection.js 2.22 kB │ gzip: 1.03 kB
127
128
  dist/utils/dns.js 2.36 kB │ gzip: 0.95 kB
128
129
  dist/api/admin/apiDnsEventEndpoint.js 2.43 kB │ gzip: 0.96 kB
129
130
  dist/api/captcha/checkSpamEmail.js 2.47 kB │ gzip: 0.91 kB
131
+ dist/tasks/puzzle/puzzleDifficulty.js 2.50 kB │ gzip: 1.09 kB
130
132
  dist/api/captcha/submitPuzzleCaptchaSolution.js 2.55 kB │ gzip: 0.96 kB
131
133
  dist/api/forwardVerify.js 2.59 kB │ gzip: 1.10 kB
132
134
  dist/api/captcha/submitImageCaptchaSolution.js 2.59 kB │ gzip: 1.00 kB
133
135
  dist/api/admin/apiAdminRoutesProvider.js 2.78 kB │ gzip: 0.55 kB
134
136
  dist/index.js 2.86 kB │ gzip: 0.78 kB
135
- dist/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.js 3.38 kB │ gzip: 1.32 kB
137
+ dist/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.js 3.39 kB │ gzip: 1.32 kB
136
138
  dist/api/domainMiddleware.js 3.52 kB │ gzip: 1.22 kB
137
139
  dist/api/rawTlsSignalsMiddleware.js 3.69 kB │ gzip: 1.13 kB
138
140
  dist/tasks/spam/evaluateEmailSpamRules.js 3.84 kB │ gzip: 1.59 kB
139
- dist/api/captcha/trafficFilterRequestTime.js 3.89 kB │ gzip: 1.49 kB
140
- dist/tasks/puzzle/puzzleRenderer.js 3.90 kB │ gzip: 1.49 kB
141
+ dist/tasks/puzzle/puzzleRenderer.js 3.91 kB │ gzip: 1.49 kB
142
+ dist/api/captcha/trafficFilterRequestTime.js 3.94 kB │ gzip: 1.51 kB
141
143
  dist/services/ipComparison.js 3.96 kB │ gzip: 1.19 kB
142
144
  dist/api/captcha.js 4.05 kB │ gzip: 1.31 kB
143
145
  dist/tasks/spam/checkSpamEmail.js 4.12 kB │ gzip: 1.12 kB
144
146
  dist/api/hardBlockVerdictCache.js 4.14 kB │ gzip: 1.69 kB
145
- dist/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.js 4.26 kB │ gzip: 1.05 kB
147
+ dist/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.js 4.35 kB │ gzip: 1.07 kB
146
148
  dist/tasks/tasks.js 4.69 kB │ gzip: 1.51 kB
147
149
  dist/tasks/dnsEvent/enrichDnsEvent.js 4.71 kB │ gzip: 1.72 kB
148
- dist/tasks/puzzle/puzzleDifficulty.js 5.50 kB │ gzip: 2.02 kB
149
150
  dist/util/usageCounters.js 5.65 kB │ gzip: 2.01 kB
150
151
  dist/api/captcha/getPoWCaptchaChallenge.js 6.02 kB │ gzip: 1.81 kB
151
- dist/api/captcha/getImageCaptchaChallenge.js 6.38 kB │ gzip: 1.95 kB
152
+ dist/api/captcha/getImageCaptchaChallenge.js 6.28 kB │ gzip: 1.94 kB
152
153
  dist/api/captcha/getPuzzleCaptchaChallenge.js 6.77 kB │ gzip: 1.95 kB
153
154
  dist/api/metrics.js 6.96 kB │ gzip: 2.09 kB
154
- dist/tasks/spam/checkTrafficFilter.js 7.32 kB │ gzip: 2.53 kB
155
+ dist/tasks/spam/checkTrafficFilter.js 7.16 kB │ gzip: 2.45 kB
155
156
  dist/tasks/detection/bundlePool.js 8.30 kB │ gzip: 3.21 kB
156
- dist/api/captcha/submitPoWCaptchaSolution.js 8.37 kB │ gzip: 2.62 kB
157
+ dist/api/captcha/submitPoWCaptchaSolution.js 8.41 kB │ gzip: 2.63 kB
158
+ dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.js 9.36 kB │ gzip: 1.80 kB
157
159
  dist/api/startProviderApi.js 9.93 kB │ gzip: 3.42 kB
158
160
  dist/tasks/client/clientTasks.js 11.27 kB │ gzip: 3.00 kB
159
- dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.js 11.51 kB │ gzip: 2.27 kB
160
- dist/api/blacklistRequestInspector.js 11.85 kB │ gzip: 4.28 kB
161
+ dist/api/blacklistRequestInspector.js 11.79 kB │ gzip: 4.24 kB
161
162
  dist/tasks/decisionMachine/decisionMachineRunner.js 11.93 kB │ gzip: 3.75 kB
162
- dist/api/verify.js 12.52 kB │ gzip: 2.49 kB
163
+ dist/api/verify.js 12.48 kB │ gzip: 2.48 kB
163
164
  dist/util.js 12.57 kB │ gzip: 3.17 kB
164
- dist/api/captcha/getFrictionlessCaptchaChallenge/handler.js 17.07 kB │ gzip: 4.20 kB
165
- dist/tasks/frictionless/frictionlessTasks.js 19.88 kB │ gzip: 5.37 kB
165
+ dist/api/captcha/getFrictionlessCaptchaChallenge/handler.js 17.12 kB │ gzip: 4.21 kB
166
+ dist/tasks/frictionless/frictionlessTasks.js 19.77 kB │ gzip: 5.32 kB
166
167
  dist/tasks/captchaManager.js 21.82 kB │ gzip: 6.29 kB
167
168
  dist/tasks/puzzleCaptcha/puzzleTasks.js 22.62 kB │ gzip: 5.11 kB
168
169
  dist/tasks/powCaptcha/powTasks.js 23.47 kB │ gzip: 5.93 kB
169
- dist/tasks/imgCaptcha/imgCaptchaTasks.js 26.97 kB │ gzip: 6.43 kB
170
+ dist/tasks/imgCaptcha/imgCaptchaTasks.js 26.67 kB │ gzip: 6.34 kB
170
171
  dist/tasks/detection/decodeBehavior.js 32.26 kB │ gzip: 10.34 kB
171
172
  dist/tasks/detection/decodeSimd.js 36.06 kB │ gzip: 12.00 kB
172
173
  dist/tasks/detection/decodePayload.js 49.69 kB │ gzip: 16.96 kB
173
174
 
174
- ✓ built in 212ms
175
+ ✓ built in 143ms
175
176
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodeBehavior.js to /home/runner/work/captcha/captcha/packages/provider/dist/tasks/detection/decodeBehavior.js
176
177
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodePayload.js to /home/runner/work/captcha/captcha/packages/provider/dist/tasks/detection/decodePayload.js
177
178
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodeSimd.js to /home/runner/work/captcha/captcha/packages/provider/dist/tasks/detection/decodeSimd.js
package/CHANGELOG.md CHANGED
@@ -1,5 +1,209 @@
1
1
  # @prosopo/provider
2
2
 
3
+ ## 5.7.0
4
+ ### Minor Changes
5
+
6
+ - 8a670d3: Remove the provider-side context validation path.
7
+
8
+ The provider read a per-context baseline out of `clientcontextentropies` on the frictionless path and compared a session's head hash against it. The task that wrote that collection was removed from the provider on 2026-08-21, so the read has returned `undefined` ever since and the branch has been dead in every deployment since then. Computing and applying the baseline now happens off-provider.
9
+
10
+ Removed: `contextAwareValidation.ts`, the decision-machine branch that used it, `getClientContextEntropy` on the provider and its database method, the `clientContextEntropy` table registration, the unused `getRoundsFromSimScore` helper, and the `contextAwareEnabled` parameter threaded into image verification — which logged and then did nothing, its return commented out.
11
+
12
+ Also removes the per-site `settings.contextAware` block that configured it, along with `ContextAwareSchema`, `IContextAware`, `IContexts`, `ContextConfigSchema`, `contextAwareThresholdDefault` and `expandContexts`, the legacy `default`/`webview` context keys and their helpers, and `FrictionlessReason.CONTEXT_AWARE_VALIDATION_FAILED`. The site-key registration CLI no longer writes a `contextAware` default into new sites.
13
+
14
+ `ContextType`, `contextTypeFromSession` and `deviceContextTypes` stay — the off-provider work keys on them. `ClientContextEntropyRecord` and its schema stay for the same reason; only the provider's use of them goes.
15
+
16
+ No behaviour change: every path removed here was already inert.
17
+
18
+ ### Patch Changes
19
+
20
+ - 7fd6eb2: Add a `browser` match dimension to access rules.
21
+
22
+ Rules can now be scoped to the browser classified server-side from the request
23
+ User-Agent (`chrome`, `safari`, `firefox`, `edge`, `opera`, `samsung_internet`,
24
+ `wechat`, `facebook`, `instagram`, `ie`, `unknown`), mirroring the existing `os`
25
+ dimension. The classifier duplicates `@prosopo/decision-machines`' `uaClassify`
26
+ because the provider request path cannot depend on that package.
27
+
28
+ Also fixes `os` never getting its own probe on the Redis split-query hot path:
29
+ `SCALAR_USER_SCOPE_FIELDS` in `redisRulesSplitQuery` had not been updated when
30
+ the OS dimension landed, so an OS-only rule was reachable only via the
31
+ `no-user-scope` fall-through, competing for that probe's candidate budget
32
+ against genuine client-wide blocks.
33
+
34
+ The Redis index gains a `browser` TAG field. `createRedisIndex` hashes the index
35
+ definition and drops/recreates when the hash changes, so this needs no manual
36
+ migration — verified locally: the index came back carrying `browser` and the
37
+ stored hash moved to match.
38
+ - 424e467: Add `@prosopo/captcha-severity` and use it for the access rules and the traffic filter.
39
+
40
+ "Which captcha challenge is stricter" is one idea with several callers, and each answered it with its own table: the traffic filter combining multiple `challenge` matches on one request (`resolveChallengePolicy`), the access rules breaking ties between equally-specific rules (`ruleHarshness`), and downstream routing consumers. They agreed on the order — image > puzzle > pow > frictionless — but nothing held them to it, and they disagreed on the encoding.
41
+
42
+ The new package has **zero dependencies**, deliberately. Captcha types are string enums, so a plain `string` parameter accepts them without importing `CaptchaType` — and that import would not be free, because it lives in a module that pulls zod in for its schemas. Some consumers bundle this standalone under a hard source-size ceiling that a runtime dependency on the `@prosopo/types` barrel has breached before.
43
+
44
+ Two APIs, because "stricter" means two different things:
45
+
46
+ - `rankCaptchaType` / `isStricterCaptchaType` compare the **type alone**, for callers that choose the type independently of its settings — as the traffic filter does, picking the strictest type and then separately merging the hardest parameters from every matched category.
47
+ - `captchaPolicySeverity` / `isStricterCaptchaPolicy` compare a **whole policy**, type first and its own difficulty setting second, for callers where one complete policy must beat another and a tie on type alone would otherwise be decided by argument order.
48
+
49
+ **Fixes an ordering bug in the access rules.** `ruleHarshness` scored `base + solvedImagesCount` with tiers 10 apart, and `solvedImagesCount` is validated by `imageMaxRoundsFieldSchema` — `number().int().min(2)`, with no upper bound and an `imageMaxRounds` default of 32. A `Restrict[pow]` rule carrying 32 rounds therefore scored 42 and outranked a `Restrict[image]` rule at 30, exactly inverting the intended order; 11 rounds on a puzzle rule was enough to do it. The intra-type component is now clamped below the tier gap, so no setting can lift a rule over a stricter captcha type.
50
+
51
+ One further behaviour change: pow rules now break ties on `powDifficulty` rather than `solvedImagesCount`. Rule authoring drops `solvedImagesCount` for pow, so every pow rule previously scored at the bottom of its tier regardless of difficulty. Image and puzzle both keep `solvedImagesCount` — it is the severity currency they share, which the provider maps onto a puzzle difficulty level via `severityToPuzzleDifficulty` rather than treating as a literal round count.
52
+ - 89dd38a: chore(deps): batch the outstanding dependabot bumps into one upgrade
53
+
54
+ Rolls up dependabot PRs #3112, #3127-#3134 and #3159. Majors: `mongoose`
55
+ 8 -> 9, `bson` 6 -> 7, `@noble/curves` 1 -> 2, `@polkadot/util-crypto`
56
+ 13 -> 14, `@typegoose/auto-increment` 4 -> 5, `@babel/preset-env` 7 -> 8,
57
+ `@types/jsdom` 21 -> 30, `@types/bcrypt` 5 -> 6, `@actions/github` 6 -> 9,
58
+ `testcontainers` 11 -> 12. The rest are minor/patch.
59
+
60
+ Code changes the majors forced:
61
+ - `@noble/curves` v2 requires `.js` specifiers and renamed the point API,
62
+ so `secp256k1.ProjectivePoint.fromHex(...).toRawBytes()` becomes
63
+ `secp256k1.Point.fromBytes(...).toBytes()`, `RistrettoPoint` becomes
64
+ `ristretto255.Point`, and `abstract/utils` moves to `utils.js`.
65
+ - mongoose 9 drops `RootFilterQuery` (now `QueryFilter`), no longer sets
66
+ `background: true` on schema indexes by default, and no longer declares
67
+ `id` on `Document`, which un-hid a mismatch between
68
+ `updateDappUserCommitment`'s `Hash` parameter and the `string` `id` it
69
+ filters on.
70
+ - mongoose 9 rejects an aggregation-pipeline update (an array) unless the
71
+ call passes `updatePipeline: true`, so the six pipeline writes in
72
+ `ProviderDatabase` now opt in explicitly.
73
+ - mongoose 9's `castUpdate` throws on a `$setOnInsert` key inside `$set`.
74
+ `storeUserImageCaptchaSolution` passed its record straight in as the
75
+ update, and mongoose's `moveImmutableProperties` mutates that object on
76
+ an upsert -- adding the very `$setOnInsert` key the record then carried
77
+ into `CentralDbStreamer.streamImageRecord`. Image records stopped
78
+ reaching the central DB (the streamer is fire-and-forget, so it only
79
+ logged) and signup verification returned 500. The update is now an
80
+ explicit `$set` over a shallow copy.
81
+ - `@prosopo/database` moves from mongodb 6.20 to 7.5 to match the driver
82
+ mongoose 9 pulls, so bson 7 is the only copy resolvable in the package.
83
+ - `vitest`/`@vitest/coverage-v8` go to 4.1.11 alongside dependabot's
84
+ `@vitest/spy` bump; leaving them at 4.1.10 installed a second copy of
85
+ `@vitest/spy` and broke type inference in the provider test utils.
86
+ - 4810cb3: Fix `computeFrictionlessScore` returning `NaN` when `scoreComponents` carries a non-numeric field.
87
+
88
+ The score was summed with `Object.values(...).reduce((acc, val) => acc + val, 0)` over every defined value. `ScoreComponents` also carries two non-numeric diagnostic fields — `triggeredDetectors` (`number[]`) and `shadowDomPenalty` (`boolean`) — and neither has an arithmetic weight anywhere in the scoring path. `+` on an array coerces the accumulator to a string, so any numeric component summed *after* an array turned the running total into string concatenation and the final `Math.min(1, ...)` into `NaN`:
89
+
90
+ ```
91
+ 0.42 + [] -> "0.42"
92
+ "0.42" + 0.3 -> "0.420.3"
93
+ Math.min(1, "0.420.3") -> NaN
94
+ ```
95
+
96
+ This was reachable in production rather than theoretical. The Mongoose schema declares `triggeredDetectors` as an array path and Mongoose defaults array paths to `[]`, so the field is present on every session read back from the database even when the frictionless handler omitted it; the pow / puzzle / image tasks then spread `dnsAsymmetry` on afterwards, landing it after the array in key order. Every solve-time recompute on a session with `dnsAsymmetry > 0` produced `NaN`.
97
+
98
+ Only numeric values now contribute. `shadowDomPenalty` no longer silently adds a full `1.0` when true. A genuinely numeric `NaN` component still propagates — `typeof NaN === "number"`, so it survives the filter deliberately — because a score that cannot be computed must not read as a low one.
99
+
100
+ The recomputed value is not persisted (neither `sessions` nor `usercommitments` stores it) and no decide rule currently branches on `input.score`, so the impact to date was a `NaN` in the solve-time log line and in `DecisionMachineInput.score`.
101
+ - 3d2176d: Move the puzzle difficulty ladder into `@prosopo/captcha-severity`, so every consumer derives a difficulty from one table.
102
+
103
+ `PUZZLE_DIFFICULTY_LEVELS`, `MAX_AUTO_ESCALATION_LEVEL`, `MIN_DECOY_HOLE_DARKEN_MARGIN`, `clampDifficultyLevel` and `severityToPuzzleDifficulty` lived in `provider/src/tasks/puzzle/puzzleDifficulty.ts`, reachable only from inside the provider — the severity package's own docs described the ladder at length but did not hold it. Anything else that has to answer "what difficulty is this puzzle" had to restate the mapping, and the consumers that author and edit puzzle rules sit outside the provider.
104
+
105
+ They can import it now. The severity package already answers "which of these policies is stricter" off `solvedImagesCount`; the ladder answers what a puzzle policy carrying that number is actually served at, which is the same question one step further in.
106
+
107
+ Sampling a concrete render from a level's bands stays in the provider as `samplePuzzleDifficulty`: it needs `IPuzzleSettings` from `@prosopo/types` and a `node:crypto`-backed sampler, and the severity package's zero-dependency, browser-safe property is load-bearing for consumers that bundle it standalone.
108
+
109
+ Adds `puzzleDifficultyToSeverity`, the inverse of `severityToPuzzleDifficulty`. Writers need that direction — a rule editor turning a chosen difficulty into the field the rule carries, or rule authoring normalising a count inherited from the image path. Each level spans two rounds, so without a canonical value per level a writer picks between numbers that produce the identical puzzle, and the difference survives only to break severity ties arbitrarily. The round-trip is pinned by tests.
110
+
111
+ No behaviour change in the provider: same table, same thresholds, same clamping.
112
+ - Updated dependencies [7fd6eb2]
113
+ - Updated dependencies [424e467]
114
+ - Updated dependencies [1b77849]
115
+ - Updated dependencies [89dd38a]
116
+ - Updated dependencies [80f73c1]
117
+ - Updated dependencies [3d2176d]
118
+ - Updated dependencies [8fce190]
119
+ - Updated dependencies [8a670d3]
120
+ - @prosopo/user-access-policy@3.12.33
121
+ - @prosopo/captcha-severity@1.1.0
122
+ - @prosopo/util-crypto@13.5.31
123
+ - @prosopo/api@4.1.5
124
+ - @prosopo/api-express-router@3.1.81
125
+ - @prosopo/api-route@2.6.57
126
+ - @prosopo/common@3.1.53
127
+ - @prosopo/database@4.0.27
128
+ - @prosopo/datasets@3.1.77
129
+ - @prosopo/env@3.6.50
130
+ - @prosopo/ipinfo@0.3.22
131
+ - @prosopo/keyring@2.9.84
132
+ - @prosopo/load-balancer@2.10.39
133
+ - @prosopo/locale@3.4.1
134
+ - @prosopo/logger@2.0.8
135
+ - @prosopo/redis-client@1.0.34
136
+ - @prosopo/types@5.6.0
137
+ - @prosopo/types-database@5.4.0
138
+ - @prosopo/types-env@2.10.44
139
+ - @prosopo/util@3.3.8
140
+ - @prosopo/native-ja4@0.0.4
141
+ - @prosopo/native-merkle@0.0.4
142
+
143
+ ## 5.6.4
144
+ ### Patch Changes
145
+
146
+ - a62b994: Context-aware validation buckets by device type, not just webview.
147
+
148
+ Context-aware validation compares a session's head SimHash against a baseline
149
+ for its context. That context was `default | webview`, which puts a phone and
150
+ a desktop in the same bucket — and those two emit genuinely different
151
+ `<head>`s, so the blended baseline matches neither well. Contexts are now the
152
+ device family crossed with the webview flag: `desktop`, `desktop-webview`,
153
+ `mobile`, `mobile-webview`, `tablet`, `tablet-webview`.
154
+
155
+ `desktop-webview` is included deliberately. Desktop webviews are a real and
156
+ notably fraudulent population here (see the Twickets desktop-webview rules),
157
+ and folding them into the plain `desktop` baseline would let exactly the
158
+ traffic we want excluded define what "normal desktop" looks like.
159
+
160
+ **Classification.** `deviceTypeFromUserAgent` in `@prosopo/types` is a
161
+ dependency-free UA classifier, deliberately not ua-parser-js: this module is
162
+ imported by the browser bundles, and the off-provider entropy sweep has to
163
+ bucket stored sessions *identically* or it writes baselines the decision
164
+ machine never looks up. One shared function keeps the two sides in lockstep.
165
+ Tablets are matched before phones because an iPad's UA carries a
166
+ `Mobile/<build>` token and an Android tablet is exactly "Android without
167
+ Mobile". Known gap, documented at the call site: an iPadOS 13+ Safari in
168
+ desktop mode identifies as a Mac and lands in `desktop` — nothing in the UA
169
+ separates it from a real Mac, and both sides make the same call, which is
170
+ what matters for the lookup.
171
+
172
+ **Back-compat.** `default` and `webview` remain valid `ContextType` members,
173
+ so settings already stored against them keep parsing. `expandContexts` maps a
174
+ legacy `default` onto the three non-webview families and a legacy `webview`
175
+ onto the three webview families, at the threshold they were saved with; an
176
+ explicit device entry always wins over the legacy entry covering it. Nothing
177
+ downstream of settings parsing branches on the legacy keys, and no data
178
+ migration is required.
179
+
180
+ **Behaviour change.** A request whose context is not configured now skips
181
+ context validation instead of borrowing another context's baseline.
182
+ Previously, configuring a single context validated *every* request against it
183
+ — with six contexts that would measure desktop traffic against a tablet
184
+ baseline and reject real users wholesale. `isContextConfigured` is the new
185
+ guard; `determineContextType` now takes the raw request UA alongside the
186
+ webview flag.
187
+
188
+ New site-key registrations default to all six device contexts.
189
+ - a447afa: Per-sitekey `imageMinRounds` alongside the existing `imageMaxRounds`.
190
+
191
+ Every source of an image round count — access-policy rules, traffic-filter categories, routing machines, the staleness curve, and the provider's own heuristics — is now clamped into `[imageMinRounds, imageMaxRounds]` via `clampImageRounds`, so the sitekey's settings override its rules in both directions rather than only capping them. `imageMinRounds` defaults to 2, matching the floor that was previously hard-coded, so existing sitekeys are unaffected.
192
+ - Updated dependencies [a62b994]
193
+ - Updated dependencies [a447afa]
194
+ - @prosopo/types@5.5.3
195
+ - @prosopo/types-database@5.3.4
196
+ - @prosopo/api@4.1.4
197
+ - @prosopo/api-express-router@3.1.80
198
+ - @prosopo/database@4.0.26
199
+ - @prosopo/datasets@3.1.76
200
+ - @prosopo/env@3.6.49
201
+ - @prosopo/ipinfo@0.3.21
202
+ - @prosopo/keyring@2.9.83
203
+ - @prosopo/load-balancer@2.10.38
204
+ - @prosopo/types-env@2.10.43
205
+ - @prosopo/user-access-policy@3.12.32
206
+
3
207
  ## 5.6.3
4
208
  ### Patch Changes
5
209
 
@@ -4,7 +4,7 @@ import type { IProviderDatabase } from "@prosopo/types-database";
4
4
  import { type AccessRule, type AccessRulesStorage, type UserScope, type UserScopeRecord } from "@prosopo/user-access-policy";
5
5
  import type { NextFunction, Request, Response } from "express";
6
6
  import { HardBlockVerdictCache } from "./hardBlockVerdictCache.js";
7
- export declare const getRequestUserScope: (requestHeaders: Record<string, unknown>, ja4?: string, ip?: string, user?: string, headHash?: string, coords?: string, countryCode?: string, asn?: number) => Pick<UserScopeRecord, "userId" | "ja4Hash" | "userAgent" | "ip" | "headHash" | "coords" | "countryCode" | "asn" | "os">;
7
+ export declare const getRequestUserScope: (requestHeaders: Record<string, unknown>, ja4?: string, ip?: string, user?: string, headHash?: string, coords?: string, countryCode?: string, asn?: number) => Pick<UserScopeRecord, "userId" | "ja4Hash" | "userAgent" | "ip" | "headHash" | "coords" | "countryCode" | "asn" | "os" | "browser">;
8
8
  export declare const rankCandidateRules: (rules: AccessRule[], request: UserScope, requestClientId: string | undefined) => AccessRule[];
9
9
  export declare const getVerdictCache: () => HardBlockVerdictCache;
10
10
  export type GetPrioritisedAccessRuleOptions = {