@prosopo/procaptcha-frictionless 2.11.7 → 2.11.9
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 +30 -0
- package/dist/ProcaptchaFrictionless.d.ts.map +1 -1
- package/dist/ProcaptchaFrictionless.js +13 -7
- package/dist/ProcaptchaFrictionless.js.map +1 -1
- package/dist/cjs/ProcaptchaFrictionless.cjs +13 -7
- package/package.json +11 -11
- package/src/ProcaptchaFrictionless.tsx +11 -4
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-frictionless@2.11.
|
|
2
|
+
> @prosopo/procaptcha-frictionless@2.11.9 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -61,5 +61,5 @@ rendering chunks...
|
|
|
61
61
|
[2mdist/cjs/[22m[36mindex.cjs [39m[1m[2m0.24 kB[22m[1m[22m
|
|
62
62
|
[2mdist/cjs/[22m[36mdetectorLoader.cjs [39m[1m[2m1.37 kB[22m[1m[22m
|
|
63
63
|
[2mdist/cjs/[22m[36mcustomDetectBot.cjs [39m[1m[2m3.44 kB[22m[1m[22m
|
|
64
|
-
[2mdist/cjs/[22m[36mProcaptchaFrictionless.cjs [39m[1m[2m7.
|
|
65
|
-
[32m✓ built in
|
|
64
|
+
[2mdist/cjs/[22m[36mProcaptchaFrictionless.cjs [39m[1m[2m7.98 kB[22m[1m[22m
|
|
65
|
+
[32m✓ built in 114ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-frictionless@2.11.
|
|
2
|
+
> @prosopo/procaptcha-frictionless@2.11.9 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
2:10:42 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
|
+
2:10:42 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
|
+
2:10:42 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
|
+
2:10:42 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
|
+
2:10:42 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
|
+
2:10:42 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
|
+
2:10:42 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
|
+
2:10:42 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
2:10:42 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
2:10:42 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'
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
2:10:42 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
2:10:42 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
2:10:42 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/merkle.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
2:10:42 PM - 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
|
+
2:10:42 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
|
+
2:10:42 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
|
+
2:10:42 PM - 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
|
+
2:10:42 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
|
+
2:10:42 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
|
+
2:10:42 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/mocks/data/captchas.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
2:10:42 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/modules/Manager.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
2:10:42 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
|
+
2:10:42 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
2:10:42 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.11.
|
|
2
|
+
> @prosopo/procaptcha-frictionless@2.11.9 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/procaptcha-frictionless@2.11.
|
|
6
|
+
> @prosopo/procaptcha-frictionless@2.11.9 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -64,5 +64,5 @@ rendering chunks...
|
|
|
64
64
|
[2mdist/[22m[36mindex.js [39m[1m[2m0.11 kB[22m[1m[22m
|
|
65
65
|
[2mdist/[22m[36mdetectorLoader.js [39m[1m[2m0.11 kB[22m[1m[22m
|
|
66
66
|
[2mdist/[22m[36mcustomDetectBot.js [39m[1m[2m3.26 kB[22m[1m[22m
|
|
67
|
-
[2mdist/[22m[36mProcaptchaFrictionless.js [39m[1m[2m6.
|
|
68
|
-
[32m✓ built in
|
|
67
|
+
[2mdist/[22m[36mProcaptchaFrictionless.js [39m[1m[2m6.59 kB[22m[1m[22m
|
|
68
|
+
[32m✓ built in 158ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @prosopo/procaptcha-frictionless
|
|
2
2
|
|
|
3
|
+
## 2.11.9
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [edcd450]
|
|
7
|
+
- Updated dependencies [5295c4b]
|
|
8
|
+
- @prosopo/types@4.7.2
|
|
9
|
+
- @prosopo/locale@3.2.5
|
|
10
|
+
- @prosopo/procaptcha-pow@2.10.2
|
|
11
|
+
- @prosopo/procaptcha-puzzle@2.10.17
|
|
12
|
+
- @prosopo/procaptcha-react@2.9.75
|
|
13
|
+
- @prosopo/api@3.5.2
|
|
14
|
+
- @prosopo/common@3.1.40
|
|
15
|
+
- @prosopo/detector@3.4.45
|
|
16
|
+
- @prosopo/load-balancer@2.9.19
|
|
17
|
+
- @prosopo/procaptcha-common@2.10.26
|
|
18
|
+
|
|
19
|
+
## 2.11.8
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 46fedf4: Auto-start image/puzzle widget after PoW escalation so the user does not need to click the checkbox a second time.
|
|
23
|
+
- Updated dependencies [46fedf4]
|
|
24
|
+
- @prosopo/procaptcha-react@2.9.74
|
|
25
|
+
- @prosopo/procaptcha-puzzle@2.10.16
|
|
26
|
+
- @prosopo/types@4.7.1
|
|
27
|
+
- @prosopo/api@3.5.1
|
|
28
|
+
- @prosopo/detector@3.4.44
|
|
29
|
+
- @prosopo/load-balancer@2.9.18
|
|
30
|
+
- @prosopo/procaptcha-common@2.10.25
|
|
31
|
+
- @prosopo/procaptcha-pow@2.10.1
|
|
32
|
+
|
|
3
33
|
## 2.11.7
|
|
4
34
|
### Patch Changes
|
|
5
35
|
|
|
@@ -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;AAqDxB,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;AAqDxB,eAAO,MAAM,sBAAsB,gEAOhC,2BAA2B,4CA4M7B,CAAC"}
|
|
@@ -94,12 +94,16 @@ const ProcaptchaFrictionless = ({
|
|
|
94
94
|
restart();
|
|
95
95
|
}, 1e4);
|
|
96
96
|
};
|
|
97
|
-
const renderForCaptchaType = async (captchaType, frictionlessState) => {
|
|
97
|
+
const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false) => {
|
|
98
98
|
const onEscalate = (next, newSessionId) => {
|
|
99
|
-
void renderForCaptchaType(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
void renderForCaptchaType(
|
|
100
|
+
next,
|
|
101
|
+
{
|
|
102
|
+
...frictionlessState,
|
|
103
|
+
sessionId: newSessionId
|
|
104
|
+
},
|
|
105
|
+
true
|
|
106
|
+
);
|
|
103
107
|
};
|
|
104
108
|
if (captchaType === CaptchaType.image) {
|
|
105
109
|
const Procaptcha = await ProcaptchaLoader();
|
|
@@ -110,7 +114,8 @@ const ProcaptchaFrictionless = ({
|
|
|
110
114
|
config,
|
|
111
115
|
callbacks,
|
|
112
116
|
frictionlessState,
|
|
113
|
-
i18n
|
|
117
|
+
i18n,
|
|
118
|
+
autoStart
|
|
114
119
|
}
|
|
115
120
|
)
|
|
116
121
|
);
|
|
@@ -123,7 +128,8 @@ const ProcaptchaFrictionless = ({
|
|
|
123
128
|
config,
|
|
124
129
|
callbacks,
|
|
125
130
|
frictionlessState,
|
|
126
|
-
i18n
|
|
131
|
+
i18n,
|
|
132
|
+
autoStart
|
|
127
133
|
}
|
|
128
134
|
)
|
|
129
135
|
);
|
|
@@ -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;AAGnD,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE,CACnC,CAAC,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC,CAAC,UAAU,CAAC;AACxD,MAAM,sBAAsB,GAAG,KAAK,IAAI,EAAE,CACzC,CAAC,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC,CAAC,gBAAgB,CAAC;AAC/D,MAAM,mBAAmB,GAAG,KAAK,IAAI,EAAE,CACtC,CAAC,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAC,aAAa,CAAC;AAEzD,MAAM,iBAAiB,GAAG,CACzB,KAAyB,EACzB,IAAc,EACd,YAAg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|
@@ -118,12 +118,16 @@ const ProcaptchaFrictionless = ({
|
|
|
118
118
|
restart();
|
|
119
119
|
}, 1e4);
|
|
120
120
|
};
|
|
121
|
-
const renderForCaptchaType = async (captchaType, frictionlessState) => {
|
|
121
|
+
const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false) => {
|
|
122
122
|
const onEscalate = (next, newSessionId) => {
|
|
123
|
-
void renderForCaptchaType(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
void renderForCaptchaType(
|
|
124
|
+
next,
|
|
125
|
+
{
|
|
126
|
+
...frictionlessState,
|
|
127
|
+
sessionId: newSessionId
|
|
128
|
+
},
|
|
129
|
+
true
|
|
130
|
+
);
|
|
127
131
|
};
|
|
128
132
|
if (captchaType === types.CaptchaType.image) {
|
|
129
133
|
const Procaptcha = await ProcaptchaLoader();
|
|
@@ -134,7 +138,8 @@ const ProcaptchaFrictionless = ({
|
|
|
134
138
|
config,
|
|
135
139
|
callbacks,
|
|
136
140
|
frictionlessState,
|
|
137
|
-
i18n
|
|
141
|
+
i18n,
|
|
142
|
+
autoStart
|
|
138
143
|
}
|
|
139
144
|
)
|
|
140
145
|
);
|
|
@@ -147,7 +152,8 @@ const ProcaptchaFrictionless = ({
|
|
|
147
152
|
config,
|
|
148
153
|
callbacks,
|
|
149
154
|
frictionlessState,
|
|
150
|
-
i18n
|
|
155
|
+
i18n,
|
|
156
|
+
autoStart
|
|
151
157
|
}
|
|
152
158
|
)
|
|
153
159
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-frictionless",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.9",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,16 +30,16 @@
|
|
|
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.4.
|
|
36
|
-
"@prosopo/load-balancer": "2.9.
|
|
37
|
-
"@prosopo/locale": "3.2.
|
|
38
|
-
"@prosopo/procaptcha-common": "2.10.
|
|
39
|
-
"@prosopo/procaptcha-pow": "2.10.
|
|
40
|
-
"@prosopo/procaptcha-puzzle": "2.10.
|
|
41
|
-
"@prosopo/procaptcha-react": "2.9.
|
|
42
|
-
"@prosopo/types": "4.7.
|
|
33
|
+
"@prosopo/api": "3.5.2",
|
|
34
|
+
"@prosopo/common": "3.1.40",
|
|
35
|
+
"@prosopo/detector": "3.4.45",
|
|
36
|
+
"@prosopo/load-balancer": "2.9.19",
|
|
37
|
+
"@prosopo/locale": "3.2.5",
|
|
38
|
+
"@prosopo/procaptcha-common": "2.10.26",
|
|
39
|
+
"@prosopo/procaptcha-pow": "2.10.2",
|
|
40
|
+
"@prosopo/procaptcha-puzzle": "2.10.17",
|
|
41
|
+
"@prosopo/procaptcha-react": "2.9.75",
|
|
42
|
+
"@prosopo/types": "4.7.2",
|
|
43
43
|
"@prosopo/widget-skeleton": "2.8.3",
|
|
44
44
|
"dotenv": "16.4.5",
|
|
45
45
|
"react": "18.3.1"
|
|
@@ -159,15 +159,20 @@ export const ProcaptchaFrictionless = ({
|
|
|
159
159
|
const renderForCaptchaType = async (
|
|
160
160
|
captchaType: string,
|
|
161
161
|
frictionlessState: FrictionlessState,
|
|
162
|
+
autoStart = false,
|
|
162
163
|
) => {
|
|
163
164
|
const onEscalate = (
|
|
164
165
|
next: CaptchaType.image | CaptchaType.puzzle,
|
|
165
166
|
newSessionId: string,
|
|
166
167
|
) => {
|
|
167
|
-
void renderForCaptchaType(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
void renderForCaptchaType(
|
|
169
|
+
next,
|
|
170
|
+
{
|
|
171
|
+
...frictionlessState,
|
|
172
|
+
sessionId: newSessionId,
|
|
173
|
+
},
|
|
174
|
+
true,
|
|
175
|
+
);
|
|
171
176
|
};
|
|
172
177
|
|
|
173
178
|
if (captchaType === CaptchaType.image) {
|
|
@@ -178,6 +183,7 @@ export const ProcaptchaFrictionless = ({
|
|
|
178
183
|
callbacks={callbacks}
|
|
179
184
|
frictionlessState={frictionlessState}
|
|
180
185
|
i18n={i18n}
|
|
186
|
+
autoStart={autoStart}
|
|
181
187
|
/>,
|
|
182
188
|
);
|
|
183
189
|
} else if (captchaType === CaptchaType.puzzle) {
|
|
@@ -188,6 +194,7 @@ export const ProcaptchaFrictionless = ({
|
|
|
188
194
|
callbacks={callbacks}
|
|
189
195
|
frictionlessState={frictionlessState}
|
|
190
196
|
i18n={i18n}
|
|
197
|
+
autoStart={autoStart}
|
|
191
198
|
/>,
|
|
192
199
|
);
|
|
193
200
|
} else {
|