@prosopo/procaptcha-pow 2.10.29 → 2.10.31
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 +19 -19
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +42 -0
- package/dist/cjs/components/ProcaptchaWidget.cjs +1 -1
- package/dist/components/ProcaptchaWidget.js +2 -2
- package/dist/components/ProcaptchaWidget.js.map +1 -1
- package/package.json +10 -10
- package/src/components/ProcaptchaWidget.tsx +2 -2
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-pow@2.10.
|
|
2
|
+
> @prosopo/procaptcha-pow@2.10.31 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -48,7 +48,7 @@ rendering chunks...
|
|
|
48
48
|
computing gzip size...
|
|
49
49
|
dist/cjs/index.cjs 0.20 kB │ gzip: 0.15 kB
|
|
50
50
|
dist/cjs/components/ProcaptchaPoW.cjs 0.51 kB │ gzip: 0.27 kB
|
|
51
|
-
dist/cjs/components/ProcaptchaWidget.cjs 4.
|
|
51
|
+
dist/cjs/components/ProcaptchaWidget.cjs 4.74 kB │ gzip: 1.51 kB
|
|
52
52
|
dist/cjs/services/Manager.cjs 9.19 kB │ gzip: 2.61 kB
|
|
53
53
|
|
|
54
|
-
[32m✓ built in
|
|
54
|
+
[32m✓ built in 75ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-pow@2.10.
|
|
2
|
+
> @prosopo/procaptcha-pow@2.10.31 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
3:31:37 PM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../locale/tsconfig.json
|
|
8
8
|
* ../util/tsconfig.json
|
|
@@ -20,37 +20,37 @@
|
|
|
20
20
|
* ../procaptcha-common/tsconfig.json
|
|
21
21
|
* tsconfig.json
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
3:31:37 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'
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
3:31:37 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
3:31:37 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
3:31:37 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'
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
3:31:38 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'
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
3:31:38 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
3:31:38 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/logger.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
3:31:38 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
3:31:38 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
3:31:38 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
3:31:38 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'
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
3:31:38 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/webComponent/createWidget.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
3:31:38 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/keyring/keyring.test.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
3:31:38 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/workers/cryptoWorker.ts' is older than output '../account/tsconfig.tsbuildinfo'
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
3:31:38 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'
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
3:31:38 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
3:31:38 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-pow/tsconfig.json'...
|
|
56
56
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-pow@2.10.
|
|
2
|
+
> @prosopo/procaptcha-pow@2.10.31 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/procaptcha-pow@2.10.
|
|
6
|
+
> @prosopo/procaptcha-pow@2.10.31 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -53,7 +53,7 @@ computing gzip size...
|
|
|
53
53
|
dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
|
|
54
54
|
dist/index.js 0.13 kB │ gzip: 0.11 kB
|
|
55
55
|
dist/components/ProcaptchaPoW.js 0.37 kB │ gzip: 0.23 kB
|
|
56
|
-
dist/components/ProcaptchaWidget.js 4.
|
|
56
|
+
dist/components/ProcaptchaWidget.js 4.32 kB │ gzip: 1.49 kB
|
|
57
57
|
dist/services/Manager.js 8.54 kB │ gzip: 2.57 kB
|
|
58
58
|
|
|
59
|
-
[32m✓ built in
|
|
59
|
+
[32m✓ built in 82ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# @prosopo/procaptcha-pow
|
|
2
2
|
|
|
3
|
+
## 2.10.31
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [216f8cd]
|
|
7
|
+
- Updated dependencies [cc3ffe3]
|
|
8
|
+
- @prosopo/types@5.0.4
|
|
9
|
+
- @prosopo/procaptcha-common@2.11.24
|
|
10
|
+
- @prosopo/api@4.0.4
|
|
11
|
+
- @prosopo/fingerprint@2.7.24
|
|
12
|
+
|
|
13
|
+
## 2.10.30
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 729349e: Run the cypress suite in firefox as well as chrome whenever the PR is a release
|
|
17
|
+
PR, via a new cypress-firefox workflow. cypress.yml is untouched.
|
|
18
|
+
|
|
19
|
+
The trusted-event checks scattered across the widget components now go through a
|
|
20
|
+
single `isEventTrusted()` helper in `@prosopo/procaptcha-common`. Behaviour is
|
|
21
|
+
unchanged: it still returns early for synthetic input, unless the bundle was
|
|
22
|
+
built with `PROSOPO_ALLOW_UNTRUSTED_EVENTS=1`, which only the firefox CI leg
|
|
23
|
+
sets. Production builds pin the define to `false`, so the branch is folded away
|
|
24
|
+
at build time and the allowance cannot reach a shipped bundle.
|
|
25
|
+
|
|
26
|
+
The allowance exists because cypress-real-events dispatches input over the chrome
|
|
27
|
+
devtools protocol, which cypress exposes for chromium browsers only — on firefox
|
|
28
|
+
the specs fall back to cypress' own synthetic clicks.
|
|
29
|
+
- Updated dependencies [729349e]
|
|
30
|
+
- Updated dependencies [16dbab0]
|
|
31
|
+
- Updated dependencies [b525956]
|
|
32
|
+
- Updated dependencies [9091a78]
|
|
33
|
+
- Updated dependencies [d5e104b]
|
|
34
|
+
- Updated dependencies [063e69d]
|
|
35
|
+
- Updated dependencies [8a4d6ad]
|
|
36
|
+
- @prosopo/procaptcha-common@2.11.23
|
|
37
|
+
- @prosopo/types@5.0.3
|
|
38
|
+
- @prosopo/util@3.3.6
|
|
39
|
+
- @prosopo/widget-skeleton@2.8.6
|
|
40
|
+
- @prosopo/locale@3.3.0
|
|
41
|
+
- @prosopo/api@4.0.3
|
|
42
|
+
- @prosopo/common@3.1.50
|
|
43
|
+
- @prosopo/fingerprint@2.7.23
|
|
44
|
+
|
|
3
45
|
## 2.10.29
|
|
4
46
|
### Patch Changes
|
|
5
47
|
|
|
@@ -90,7 +90,7 @@ var Procaptcha = (props) => {
|
|
|
90
90
|
let x = 0;
|
|
91
91
|
let y = 0;
|
|
92
92
|
const mouseOrTouchEvent = event.nativeEvent;
|
|
93
|
-
if (!
|
|
93
|
+
if (!(0, _prosopo_procaptcha_common.isEventTrusted)(mouseOrTouchEvent)) {} else if ("touches" in mouseOrTouchEvent && mouseOrTouchEvent.touches.length > 0 && mouseOrTouchEvent.touches[0]) {
|
|
94
94
|
x = mouseOrTouchEvent.touches[0].clientX;
|
|
95
95
|
y = mouseOrTouchEvent.touches[0].clientY;
|
|
96
96
|
} else if ("clientX" in mouseOrTouchEvent && "clientY" in mouseOrTouchEvent) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { Manager } from "../services/Manager.js";
|
|
3
3
|
import { loadI18next, useTranslation } from "@prosopo/locale";
|
|
4
|
-
import { Checkbox, Honeypot, buildUpdateState, useProcaptcha } from "@prosopo/procaptcha-common";
|
|
4
|
+
import { Checkbox, Honeypot, buildUpdateState, isEventTrusted, useProcaptcha } from "@prosopo/procaptcha-common";
|
|
5
5
|
import { ModeEnum } from "@prosopo/types";
|
|
6
6
|
import { darkTheme, lightTheme } from "@prosopo/widget-skeleton";
|
|
7
7
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -91,7 +91,7 @@ var Procaptcha = (props) => {
|
|
|
91
91
|
let x = 0;
|
|
92
92
|
let y = 0;
|
|
93
93
|
const mouseOrTouchEvent = event.nativeEvent;
|
|
94
|
-
if (!mouseOrTouchEvent
|
|
94
|
+
if (!isEventTrusted(mouseOrTouchEvent)) {} else if ("touches" in mouseOrTouchEvent && mouseOrTouchEvent.touches.length > 0 && mouseOrTouchEvent.touches[0]) {
|
|
95
95
|
x = mouseOrTouchEvent.touches[0].clientX;
|
|
96
96
|
y = mouseOrTouchEvent.touches[0].clientY;
|
|
97
97
|
} else if ("clientX" in mouseOrTouchEvent && "clientY" in mouseOrTouchEvent) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcaptchaWidget.js","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CA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.10.31",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,21 +33,21 @@
|
|
|
33
33
|
"browserslist": ["> 0.5%, last 2 versions, not dead"],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@polkadot/util": "13.5.7",
|
|
36
|
-
"@prosopo/api": "4.0.
|
|
37
|
-
"@prosopo/common": "3.1.
|
|
38
|
-
"@prosopo/fingerprint": "2.7.
|
|
39
|
-
"@prosopo/locale": "3.
|
|
40
|
-
"@prosopo/procaptcha-common": "2.11.
|
|
41
|
-
"@prosopo/types": "5.0.
|
|
42
|
-
"@prosopo/util": "3.3.
|
|
36
|
+
"@prosopo/api": "4.0.4",
|
|
37
|
+
"@prosopo/common": "3.1.50",
|
|
38
|
+
"@prosopo/fingerprint": "2.7.24",
|
|
39
|
+
"@prosopo/locale": "3.3.0",
|
|
40
|
+
"@prosopo/procaptcha-common": "2.11.24",
|
|
41
|
+
"@prosopo/types": "5.0.4",
|
|
42
|
+
"@prosopo/util": "3.3.6",
|
|
43
43
|
"@prosopo/util-crypto": "13.5.30",
|
|
44
|
-
"@prosopo/widget-skeleton": "2.8.
|
|
44
|
+
"@prosopo/widget-skeleton": "2.8.6",
|
|
45
45
|
"react": "18.3.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@emotion/react": "11.11.1",
|
|
49
49
|
"@emotion/styled": "11.11.0",
|
|
50
|
-
"@prosopo/config": "3.3.
|
|
50
|
+
"@prosopo/config": "3.3.8",
|
|
51
51
|
"@types/node": "22.10.2",
|
|
52
52
|
"@vitest/coverage-v8": "4.1.10",
|
|
53
53
|
"concurrently": "9.0.1",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import { loadI18next, useTranslation } from "@prosopo/locale";
|
|
16
16
|
import { buildUpdateState, useProcaptcha } from "@prosopo/procaptcha-common";
|
|
17
|
-
import { Checkbox, Honeypot } from "@prosopo/procaptcha-common";
|
|
17
|
+
import { Checkbox, Honeypot, isEventTrusted } from "@prosopo/procaptcha-common";
|
|
18
18
|
import { ModeEnum, type ProcaptchaProps } from "@prosopo/types";
|
|
19
19
|
import { darkTheme, lightTheme } from "@prosopo/widget-skeleton";
|
|
20
20
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -173,7 +173,7 @@ const Procaptcha = (props: ProcaptchaProps) => {
|
|
|
173
173
|
// Try to get coordinates from the change event's underlying mouse event
|
|
174
174
|
// The original mouse event might be available in the event chain
|
|
175
175
|
const mouseOrTouchEvent = event.nativeEvent;
|
|
176
|
-
if (!mouseOrTouchEvent
|
|
176
|
+
if (!isEventTrusted(mouseOrTouchEvent)) {
|
|
177
177
|
// Don't capture coordinates for non-trusted events
|
|
178
178
|
} else if (
|
|
179
179
|
"touches" in mouseOrTouchEvent &&
|