@prosopo/procaptcha-frictionless 2.12.19 → 2.12.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$cjs.log +3 -3
- package/.turbo/turbo-build$colon$tsc.log +25 -25
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +31 -0
- package/dist/ProcaptchaFrictionless.d.ts.map +1 -1
- package/dist/ProcaptchaFrictionless.js +6 -7
- package/dist/ProcaptchaFrictionless.js.map +1 -1
- package/dist/cjs/ProcaptchaFrictionless.cjs +6 -7
- package/package.json +9 -9
- package/src/ProcaptchaFrictionless.tsx +10 -4
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-frictionless@2.12.
|
|
2
|
+
> @prosopo/procaptcha-frictionless@2.12.21 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -62,5 +62,5 @@ rendering chunks...
|
|
|
62
62
|
[2mdist/cjs/[22m[36msessionInvalidatedRecovery.cjs [39m[1m[2m0.85 kB[22m[1m[22m
|
|
63
63
|
[2mdist/cjs/[22m[36mdetectorLoader.cjs [39m[1m[2m1.37 kB[22m[1m[22m
|
|
64
64
|
[2mdist/cjs/[22m[36mcustomDetectBot.cjs [39m[1m[2m4.58 kB[22m[1m[22m
|
|
65
|
-
[2mdist/cjs/[22m[36mProcaptchaFrictionless.cjs [39m[1m[
|
|
66
|
-
[32m✓ built in
|
|
65
|
+
[2mdist/cjs/[22m[36mProcaptchaFrictionless.cjs [39m[1m[2m9.07 kB[22m[1m[22m
|
|
66
|
+
[32m✓ built in 158ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-frictionless@2.12.
|
|
2
|
+
> @prosopo/procaptcha-frictionless@2.12.21 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
10:23:05 PM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../locale/tsconfig.json
|
|
8
8
|
* ../util/tsconfig.json
|
|
@@ -26,49 +26,49 @@
|
|
|
26
26
|
* ../procaptcha-react/tsconfig.json
|
|
27
27
|
* tsconfig.json
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
10:23:06 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
30
|
|
|
31
|
-
|
|
31
|
+
10:23:06 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
10:23:06 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
10:23:06 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'
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
10:23:06 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
10:23:06 PM - Project '../detector/tsconfig.json' is up to date because newest input '../detector/src/index.js' is older than output '../detector/tsconfig.tsbuildinfo'
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
10:23:06 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
10:23:06 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
10:23:06 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/error.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
10:23:06 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
10:23:06 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
10:23:06 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'
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
10:23:06 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/index.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
10:23:06 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
10:23:06 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/tsconfig.tsbuildinfo'
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
10:23:06 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/reactComponents/Honeypot.tsx' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
10:23:06 PM - Project '../procaptcha-pow/tsconfig.json' is up to date because newest input '../procaptcha-pow/src/index.ts' is older than output '../procaptcha-pow/tsconfig.tsbuildinfo'
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
10:23:06 PM - Project '../procaptcha-puzzle/tsconfig.json' is up to date because newest input '../procaptcha-puzzle/src/index.ts' is older than output '../procaptcha-puzzle/tsconfig.tsbuildinfo'
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
10:23:06 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
66
|
|
|
67
|
-
|
|
67
|
+
10:23:06 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/index.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
10:23:06 PM - Project '../procaptcha-react/tsconfig.json' is up to date because newest input '../procaptcha-react/src/index.ts' is older than output '../procaptcha-react/tsconfig.tsbuildinfo'
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
10:23:06 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
10:23:06 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
|
|
74
74
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-frictionless@2.12.
|
|
2
|
+
> @prosopo/procaptcha-frictionless@2.12.21 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/procaptcha-frictionless@2.12.
|
|
6
|
+
> @prosopo/procaptcha-frictionless@2.12.21 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -65,5 +65,5 @@ rendering chunks...
|
|
|
65
65
|
[2mdist/[22m[36mdetectorLoader.js [39m[1m[2m0.11 kB[22m[1m[22m
|
|
66
66
|
[2mdist/[22m[36msessionInvalidatedRecovery.js [39m[1m[2m0.71 kB[22m[1m[22m
|
|
67
67
|
[2mdist/[22m[36mcustomDetectBot.js [39m[1m[2m4.37 kB[22m[1m[22m
|
|
68
|
-
[2mdist/[22m[36mProcaptchaFrictionless.js [39m[1m[2m7.
|
|
69
|
-
[32m✓ built in
|
|
68
|
+
[2mdist/[22m[36mProcaptchaFrictionless.js [39m[1m[2m7.62 kB[22m[1m[22m
|
|
69
|
+
[32m✓ built in 258ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @prosopo/procaptcha-frictionless
|
|
2
2
|
|
|
3
|
+
## 2.12.21
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [a0cb39e]
|
|
7
|
+
- @prosopo/types@4.9.12
|
|
8
|
+
- @prosopo/api@3.5.19
|
|
9
|
+
- @prosopo/detector@3.5.13
|
|
10
|
+
- @prosopo/procaptcha-common@2.11.17
|
|
11
|
+
- @prosopo/procaptcha-pow@2.10.23
|
|
12
|
+
- @prosopo/procaptcha-puzzle@2.10.39
|
|
13
|
+
- @prosopo/procaptcha-react@2.9.96
|
|
14
|
+
|
|
15
|
+
## 2.12.20
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- b9ca0e7: feat(decision-machine): thread puzzle fields and forward checkbox coords on escalation
|
|
19
|
+
|
|
20
|
+
- Add optional `coords` and `puzzleEvents` to `DecisionMachineInput` so decision machines can gate on entry-point telemetry and puzzle drag trails.
|
|
21
|
+
- Populate `coords` on the pow, puzzle and image `decide()` inputs. Puzzle also passes `puzzleEvents`. Image gains `behavioralDataPacked` / `deviceCapability` — previously always undefined, which silently disabled the global synthetic-mouse-timing check on the one captcha type it targets.
|
|
22
|
+
- Extend `ProcaptchaEscalationHandler` with an optional `coords` argument so the PoW widget can forward its trusted checkbox click through the PoW→image/puzzle escalation. The frictionless wrapper prefers escalation coords over pending retry coords. Puzzle and image widgets already accept `startCoords`, so the escalated widget now seeds the salt with the real (x, y) instead of (0, 0).
|
|
23
|
+
- Updated dependencies [b9ca0e7]
|
|
24
|
+
- Updated dependencies [fde6896]
|
|
25
|
+
- @prosopo/types@4.9.11
|
|
26
|
+
- @prosopo/procaptcha-pow@2.10.22
|
|
27
|
+
- @prosopo/common@3.1.47
|
|
28
|
+
- @prosopo/api@3.5.18
|
|
29
|
+
- @prosopo/detector@3.5.12
|
|
30
|
+
- @prosopo/procaptcha-common@2.11.16
|
|
31
|
+
- @prosopo/procaptcha-puzzle@2.10.38
|
|
32
|
+
- @prosopo/procaptcha-react@2.9.95
|
|
33
|
+
|
|
3
34
|
## 2.12.19
|
|
4
35
|
### Patch Changes
|
|
5
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcaptchaFrictionless.d.ts","sourceRoot":"","sources":["../src/ProcaptchaFrictionless.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAKN,KAAK,2BAA2B,EAChC,MAAM,gBAAgB,CAAC;AA0DxB,eAAO,MAAM,sBAAsB,gEAOhC,2BAA2B,
|
|
1
|
+
{"version":3,"file":"ProcaptchaFrictionless.d.ts","sourceRoot":"","sources":["../src/ProcaptchaFrictionless.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAKN,KAAK,2BAA2B,EAChC,MAAM,gBAAgB,CAAC;AA0DxB,eAAO,MAAM,sBAAsB,gEAOhC,2BAA2B,4CAwR7B,CAAC"}
|
|
@@ -93,15 +93,16 @@ const ProcaptchaFrictionless = ({
|
|
|
93
93
|
restart();
|
|
94
94
|
}, 1e4);
|
|
95
95
|
};
|
|
96
|
-
const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false) => {
|
|
97
|
-
const onEscalate = (next, newSessionId) => {
|
|
96
|
+
const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false, escalationCoords) => {
|
|
97
|
+
const onEscalate = (next, newSessionId, coords) => {
|
|
98
98
|
void renderForCaptchaType(
|
|
99
99
|
next,
|
|
100
100
|
{
|
|
101
101
|
...frictionlessState,
|
|
102
102
|
sessionId: newSessionId
|
|
103
103
|
},
|
|
104
|
-
true
|
|
104
|
+
true,
|
|
105
|
+
coords
|
|
105
106
|
);
|
|
106
107
|
};
|
|
107
108
|
const onSessionInvalidated = (x, y) => {
|
|
@@ -115,10 +116,8 @@ const ProcaptchaFrictionless = ({
|
|
|
115
116
|
resetState(0);
|
|
116
117
|
void start();
|
|
117
118
|
};
|
|
118
|
-
const { autoStart: resumedAutoStart, startCoords } = consumeRetryMountProps(
|
|
119
|
-
|
|
120
|
-
autoStart
|
|
121
|
-
);
|
|
119
|
+
const { autoStart: resumedAutoStart, startCoords: retryStartCoords } = consumeRetryMountProps(pendingRetryCoordsRef, autoStart);
|
|
120
|
+
const startCoords = escalationCoords ?? retryStartCoords;
|
|
122
121
|
if (captchaType === CaptchaType.image) {
|
|
123
122
|
const Procaptcha = await ProcaptchaLoader();
|
|
124
123
|
setComponentToRender(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcaptchaFrictionless.js","sourceRoot":"","sources":["../src/ProcaptchaFrictionless.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACN,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,WAAW,EAGX,sBAAsB,GAEtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAEN,sBAAsB,EACtB,wBAAwB,GACxB,MAAM,iCAAiC,CAAC;AAGzC,M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
restart();
|
|
118
118
|
}, 1e4);
|
|
119
119
|
};
|
|
120
|
-
const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false) => {
|
|
121
|
-
const onEscalate = (next, newSessionId) => {
|
|
120
|
+
const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false, escalationCoords) => {
|
|
121
|
+
const onEscalate = (next, newSessionId, coords) => {
|
|
122
122
|
void renderForCaptchaType(
|
|
123
123
|
next,
|
|
124
124
|
{
|
|
125
125
|
...frictionlessState,
|
|
126
126
|
sessionId: newSessionId
|
|
127
127
|
},
|
|
128
|
-
true
|
|
128
|
+
true,
|
|
129
|
+
coords
|
|
129
130
|
);
|
|
130
131
|
};
|
|
131
132
|
const onSessionInvalidated = (x, y) => {
|
|
@@ -139,10 +140,8 @@ const ProcaptchaFrictionless = ({
|
|
|
139
140
|
resetState(0);
|
|
140
141
|
void start();
|
|
141
142
|
};
|
|
142
|
-
const { autoStart: resumedAutoStart, startCoords } = sessionInvalidatedRecovery.consumeRetryMountProps(
|
|
143
|
-
|
|
144
|
-
autoStart
|
|
145
|
-
);
|
|
143
|
+
const { autoStart: resumedAutoStart, startCoords: retryStartCoords } = sessionInvalidatedRecovery.consumeRetryMountProps(pendingRetryCoordsRef, autoStart);
|
|
144
|
+
const startCoords = escalationCoords ?? retryStartCoords;
|
|
146
145
|
if (captchaType === types.CaptchaType.image) {
|
|
147
146
|
const Procaptcha = await ProcaptchaLoader();
|
|
148
147
|
setComponentToRender(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-frictionless",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.21",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
},
|
|
31
31
|
"browserslist": ["> 0.5%, last 2 versions, not dead"],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@prosopo/api": "3.5.
|
|
34
|
-
"@prosopo/common": "3.1.
|
|
35
|
-
"@prosopo/detector": "3.5.
|
|
33
|
+
"@prosopo/api": "3.5.19",
|
|
34
|
+
"@prosopo/common": "3.1.47",
|
|
35
|
+
"@prosopo/detector": "3.5.13",
|
|
36
36
|
"@prosopo/locale": "3.2.7",
|
|
37
|
-
"@prosopo/procaptcha-common": "2.11.
|
|
38
|
-
"@prosopo/procaptcha-pow": "2.10.
|
|
39
|
-
"@prosopo/procaptcha-puzzle": "2.10.
|
|
40
|
-
"@prosopo/procaptcha-react": "2.9.
|
|
41
|
-
"@prosopo/types": "4.9.
|
|
37
|
+
"@prosopo/procaptcha-common": "2.11.17",
|
|
38
|
+
"@prosopo/procaptcha-pow": "2.10.23",
|
|
39
|
+
"@prosopo/procaptcha-puzzle": "2.10.39",
|
|
40
|
+
"@prosopo/procaptcha-react": "2.9.96",
|
|
41
|
+
"@prosopo/types": "4.9.12",
|
|
42
42
|
"@prosopo/widget-skeleton": "2.8.4",
|
|
43
43
|
"dotenv": "16.4.5",
|
|
44
44
|
"react": "18.3.1"
|
|
@@ -175,10 +175,12 @@ export const ProcaptchaFrictionless = ({
|
|
|
175
175
|
captchaType: string,
|
|
176
176
|
frictionlessState: FrictionlessState,
|
|
177
177
|
autoStart = false,
|
|
178
|
+
escalationCoords?: RetryCoords,
|
|
178
179
|
) => {
|
|
179
180
|
const onEscalate = (
|
|
180
181
|
next: CaptchaType.image | CaptchaType.puzzle,
|
|
181
182
|
newSessionId: string,
|
|
183
|
+
coords?: RetryCoords,
|
|
182
184
|
) => {
|
|
183
185
|
void renderForCaptchaType(
|
|
184
186
|
next,
|
|
@@ -187,6 +189,7 @@ export const ProcaptchaFrictionless = ({
|
|
|
187
189
|
sessionId: newSessionId,
|
|
188
190
|
},
|
|
189
191
|
true,
|
|
192
|
+
coords,
|
|
190
193
|
);
|
|
191
194
|
};
|
|
192
195
|
|
|
@@ -214,10 +217,13 @@ export const ProcaptchaFrictionless = ({
|
|
|
214
217
|
// Consume any pending retry coords now — the resumed widget owns them
|
|
215
218
|
// for exactly one auto-fired `manager.start(x, y)`. Cleared so a
|
|
216
219
|
// subsequent escalation/re-render doesn't accidentally re-inject.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
220
|
+
// Escalation coords (from a PoW→image/puzzle handoff) take precedence
|
|
221
|
+
// over pending retry coords when both are present, because escalation
|
|
222
|
+
// is the current transition and the pending retry belongs to a prior
|
|
223
|
+
// widget instance that never got to consume them.
|
|
224
|
+
const { autoStart: resumedAutoStart, startCoords: retryStartCoords } =
|
|
225
|
+
consumeRetryMountProps(pendingRetryCoordsRef, autoStart);
|
|
226
|
+
const startCoords = escalationCoords ?? retryStartCoords;
|
|
221
227
|
|
|
222
228
|
if (captchaType === CaptchaType.image) {
|
|
223
229
|
const Procaptcha = await ProcaptchaLoader();
|