@prosopo/procaptcha-frictionless 2.12.15 → 2.12.17
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 +41 -0
- package/dist/ProcaptchaFrictionless.js +6 -10
- package/dist/ProcaptchaFrictionless.js.map +1 -1
- package/dist/cjs/ProcaptchaFrictionless.cjs +6 -10
- package/package.json +10 -10
- package/src/ProcaptchaFrictionless.tsx +10 -10
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-frictionless@2.12.
|
|
2
|
+
> @prosopo/procaptcha-frictionless@2.12.17 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[2m8.96 kB[22m[1m[22m
|
|
66
|
+
[32m✓ built in 131ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-frictionless@2.12.
|
|
2
|
+
> @prosopo/procaptcha-frictionless@2.12.17 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
10:28:36 AM - 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:28:37 AM - 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
30
|
|
|
31
|
-
|
|
31
|
+
10:28:37 AM - 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:28:37 AM - 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:28:37 AM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
10:28:37 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/provider/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
10:28:37 AM - 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:28:37 AM - 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:28:37 AM - 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:28:37 AM - 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'
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
10:28:37 AM - 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:28:37 AM - 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:28:37 AM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
10:28:37 AM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/constants.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
10:28:37 AM - 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:28:37 AM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/tests/cryptoWorker.unit.test.ts' is older than output '../account/tsconfig.tsbuildinfo'
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
10:28:37 AM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/tests/defaultEvents.test.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
10:28:37 AM - 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:28:37 AM - 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:28:37 AM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
10:28:37 AM - 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:28:37 AM - 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:28:37 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
10:28:37 AM - 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.17 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.17 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.52 kB[22m[1m[22m
|
|
69
|
+
[32m✓ built in 187ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @prosopo/procaptcha-frictionless
|
|
2
2
|
|
|
3
|
+
## 2.12.17
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [0a4f902]
|
|
7
|
+
- @prosopo/types@4.9.10
|
|
8
|
+
- @prosopo/procaptcha-pow@2.10.20
|
|
9
|
+
- @prosopo/procaptcha-puzzle@2.10.35
|
|
10
|
+
- @prosopo/api@3.5.17
|
|
11
|
+
- @prosopo/detector@3.5.11
|
|
12
|
+
- @prosopo/procaptcha-common@2.11.14
|
|
13
|
+
- @prosopo/procaptcha-react@2.9.93
|
|
14
|
+
|
|
15
|
+
## 2.12.16
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- b500d56: fix(widget): enforce single language across widget, kill browser/config race
|
|
19
|
+
|
|
20
|
+
`WidgetFactory.getCaptchaRenderer()` booted the i18n singleton with the
|
|
21
|
+
browser-detected language before the site-owner `renderOptions.language` /
|
|
22
|
+
`data-language` had been resolved, and each widget then called
|
|
23
|
+
`i18n.changeLanguage(config.language)` from a post-mount effect. Any child
|
|
24
|
+
component that read `useTranslation()` between first render and the async
|
|
25
|
+
`changeLanguage` resolution rendered in the browser language, then re-rendered
|
|
26
|
+
in the site-owner language — the multi-language flash customers reported.
|
|
27
|
+
|
|
28
|
+
Resolve the site-owner language in `WidgetFactory.createWidget()` before the
|
|
29
|
+
lazy renderer load and thread it into `loadI18next(false, lng)`, so the
|
|
30
|
+
singleton boots (or reconciles via `changeLanguage` + await) with the correct
|
|
31
|
+
language before React mounts. Site-owner language wins; falls back to browser
|
|
32
|
+
detection only when no `language` / `data-language` is set.
|
|
33
|
+
- Updated dependencies [b500d56]
|
|
34
|
+
- @prosopo/locale@3.2.7
|
|
35
|
+
- @prosopo/procaptcha-react@2.9.92
|
|
36
|
+
- @prosopo/procaptcha-pow@2.10.19
|
|
37
|
+
- @prosopo/procaptcha-puzzle@2.10.34
|
|
38
|
+
- @prosopo/common@3.1.46
|
|
39
|
+
- @prosopo/types@4.9.9
|
|
40
|
+
- @prosopo/api@3.5.16
|
|
41
|
+
- @prosopo/detector@3.5.10
|
|
42
|
+
- @prosopo/procaptcha-common@2.11.13
|
|
43
|
+
|
|
3
44
|
## 2.12.15
|
|
4
45
|
### Patch Changes
|
|
5
46
|
|
|
@@ -45,18 +45,14 @@ const ProcaptchaFrictionless = ({
|
|
|
45
45
|
const pendingRetryCoordsRef = useRef(null);
|
|
46
46
|
const sessionInvalidatedFiredRef = useRef(false);
|
|
47
47
|
useEffect(() => {
|
|
48
|
-
if (config.language)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
} else {
|
|
54
|
-
loadI18next(false).then((i18n2) => {
|
|
55
|
-
if (i18n2.language !== config.language)
|
|
56
|
-
i18n2.changeLanguage(config.language).then((r) => r);
|
|
57
|
-
});
|
|
48
|
+
if (!config.language) return;
|
|
49
|
+
if (i18n) {
|
|
50
|
+
if (i18n.language !== config.language) {
|
|
51
|
+
void i18n.changeLanguage(config.language);
|
|
58
52
|
}
|
|
53
|
+
return;
|
|
59
54
|
}
|
|
55
|
+
void loadI18next(false, config.language);
|
|
60
56
|
}, [i18n, config.language]);
|
|
61
57
|
const [componentToRender, setComponentToRender] = useState(
|
|
62
58
|
renderPlaceholder(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3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BACC,KAAC,cAAc,IAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,GAAI,EACzD,iBAAiB,IAChB,CACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -69,18 +69,14 @@ const ProcaptchaFrictionless = ({
|
|
|
69
69
|
const pendingRetryCoordsRef = react.useRef(null);
|
|
70
70
|
const sessionInvalidatedFiredRef = react.useRef(false);
|
|
71
71
|
react.useEffect(() => {
|
|
72
|
-
if (config.language)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
} else {
|
|
78
|
-
locale.loadI18next(false).then((i18n2) => {
|
|
79
|
-
if (i18n2.language !== config.language)
|
|
80
|
-
i18n2.changeLanguage(config.language).then((r) => r);
|
|
81
|
-
});
|
|
72
|
+
if (!config.language) return;
|
|
73
|
+
if (i18n) {
|
|
74
|
+
if (i18n.language !== config.language) {
|
|
75
|
+
void i18n.changeLanguage(config.language);
|
|
82
76
|
}
|
|
77
|
+
return;
|
|
83
78
|
}
|
|
79
|
+
void locale.loadI18next(false, config.language);
|
|
84
80
|
}, [i18n, config.language]);
|
|
85
81
|
const [componentToRender, setComponentToRender] = react.useState(
|
|
86
82
|
renderPlaceholder(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-frictionless",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.17",
|
|
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.
|
|
36
|
-
"@prosopo/locale": "3.2.
|
|
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.
|
|
33
|
+
"@prosopo/api": "3.5.17",
|
|
34
|
+
"@prosopo/common": "3.1.46",
|
|
35
|
+
"@prosopo/detector": "3.5.11",
|
|
36
|
+
"@prosopo/locale": "3.2.7",
|
|
37
|
+
"@prosopo/procaptcha-common": "2.11.14",
|
|
38
|
+
"@prosopo/procaptcha-pow": "2.10.20",
|
|
39
|
+
"@prosopo/procaptcha-puzzle": "2.10.35",
|
|
40
|
+
"@prosopo/procaptcha-react": "2.9.93",
|
|
41
|
+
"@prosopo/types": "4.9.10",
|
|
42
42
|
"@prosopo/widget-skeleton": "2.8.4",
|
|
43
43
|
"dotenv": "16.4.5",
|
|
44
44
|
"react": "18.3.1"
|
|
@@ -106,18 +106,18 @@ export const ProcaptchaFrictionless = ({
|
|
|
106
106
|
const sessionInvalidatedFiredRef = useRef(false);
|
|
107
107
|
|
|
108
108
|
useEffect(() => {
|
|
109
|
-
if (config.language)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
} else {
|
|
115
|
-
loadI18next(false).then((i18n) => {
|
|
116
|
-
if (i18n.language !== config.language)
|
|
117
|
-
i18n.changeLanguage(config.language).then((r) => r);
|
|
118
|
-
});
|
|
109
|
+
if (!config.language) return;
|
|
110
|
+
if (i18n) {
|
|
111
|
+
if (i18n.language !== config.language) {
|
|
112
|
+
void i18n.changeLanguage(config.language);
|
|
119
113
|
}
|
|
114
|
+
return;
|
|
120
115
|
}
|
|
116
|
+
// Direct-React consumers don't go through WidgetFactory, so pass the
|
|
117
|
+
// language into loadI18next — first init boots with the right language
|
|
118
|
+
// (skipping browser detection), and subsequent calls reconcile via
|
|
119
|
+
// changeLanguage inside loadI18next.
|
|
120
|
+
void loadI18next(false, config.language);
|
|
121
121
|
}, [i18n, config.language]);
|
|
122
122
|
|
|
123
123
|
const [componentToRender, setComponentToRender] = useState(
|