@prosopo/procaptcha-wrapper 2.6.125 → 2.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.
- package/.turbo/turbo-build$colon$cjs.log +2 -2
- package/.turbo/turbo-build$colon$tsc.log +9 -9
- package/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +65 -0
- package/dist/tests/renderer.test-d.js +8 -0
- package/dist/tests/renderer.test-d.js.map +1 -1
- package/package.json +7 -7
- package/src/tests/renderer.test-d.ts +11 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-wrapper@2.
|
|
2
|
+
> @prosopo/procaptcha-wrapper@2.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: .
|
|
@@ -30,4 +30,4 @@ dist/cjs/index.cjs 0.32 kB │ gzip: 0.22 kB
|
|
|
30
30
|
dist/cjs/render/renderer.cjs 0.60 kB │ gzip: 0.30 kB
|
|
31
31
|
dist/cjs/render/renderFunction.cjs 1.07 kB │ gzip: 0.52 kB
|
|
32
32
|
|
|
33
|
-
[32m✓ built in
|
|
33
|
+
[32m✓ built in 62ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-wrapper@2.
|
|
2
|
+
> @prosopo/procaptcha-wrapper@2.7.0 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
1:
|
|
5
|
+
1:15:03 PM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../locale/tsconfig.json
|
|
8
8
|
* ../util/tsconfig.json
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
* ../types/tsconfig.json
|
|
11
11
|
* tsconfig.json
|
|
12
12
|
|
|
13
|
-
1:
|
|
13
|
+
1:15:03 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'
|
|
14
14
|
|
|
15
|
-
1:
|
|
15
|
+
1:15:03 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
16
16
|
|
|
17
|
-
1:
|
|
17
|
+
1:15:03 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
18
18
|
|
|
19
|
-
1:
|
|
19
|
+
1:15:03 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'
|
|
20
20
|
|
|
21
|
-
1:
|
|
21
|
+
1:15:03 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'
|
|
22
22
|
|
|
23
|
-
1:
|
|
23
|
+
1:15:03 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
24
24
|
|
|
25
|
-
1:
|
|
25
|
+
1:15:03 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-wrapper/tsconfig.json'...
|
|
26
26
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-wrapper@2.
|
|
2
|
+
> @prosopo/procaptcha-wrapper@2.7.0 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/procaptcha-wrapper@2.
|
|
6
|
+
> @prosopo/procaptcha-wrapper@2.7.0 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -35,4 +35,4 @@ dist/index.js 0.29 kB │ gzip: 0.20 kB
|
|
|
35
35
|
dist/render/renderer.js 0.56 kB │ gzip: 0.29 kB
|
|
36
36
|
dist/render/renderFunction.js 1.03 kB │ gzip: 0.51 kB
|
|
37
37
|
|
|
38
|
-
[32m✓ built in
|
|
38
|
+
[32m✓ built in 186ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
# @prosopo/procaptcha-wrapper
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
### Minor Changes
|
|
5
|
+
|
|
6
|
+
- d288371: Let a site choose where a challenge opens, and which button triggers it.
|
|
7
|
+
|
|
8
|
+
- `placement: "popup" | "float"`, also `data-placement`. `popup` is the default and unchanged. `float` opens the challenge directly above the widget and keeps it pinned there as the page scrolls, leaves the page usable behind it, and dismisses on Escape or an outside click. An invisible widget always uses popup.
|
|
9
|
+
- `bind: "#selector"`, also `data-bind`. The matching host-page button triggers that one widget, in visible or invisible mode. The click's default action is prevented so a submit button does not post the form before a token exists.
|
|
10
|
+
- `execute(widgetId?)`. Called with no argument every widget responds, as before. Called with the id `render()` returns, only that widget runs. Implicitly rendered invisible buttons now trigger only their own widget.
|
|
11
|
+
|
|
12
|
+
Behaviour changes for existing widgets:
|
|
13
|
+
|
|
14
|
+
- Escape now closes the image and puzzle challenge in both placements. For the image captcha this runs the cancel path, which fires `onClose` and restarts frictionless.
|
|
15
|
+
- Image and puzzle now present on one shared `ChallengeSurface`. Both were already portalled to `document.body`, so neither moves in the page, but the markup around them changed: the outer layer keeps `prosopo-modalOuter` for the image captcha and also carries `prosopo-challenge-surface`, and a new `prosopo-challenge-content` element sits between it and `prosopo-modalInner`. A direct-child selector such as `.prosopo-modalOuter > .prosopo-modalInner` no longer matches, and the centring transform now lives on `prosopo-challenge-content` rather than on `prosopo-modalInner`.
|
|
16
|
+
|
|
17
|
+
`createConfig` takes a named options object.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [6f57ee9]
|
|
22
|
+
- Updated dependencies [d288371]
|
|
23
|
+
- @prosopo/types@5.7.0
|
|
24
|
+
|
|
25
|
+
## 2.6.126
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 89dd38a: chore(deps): batch the outstanding dependabot bumps into one upgrade
|
|
29
|
+
|
|
30
|
+
Rolls up dependabot PRs #3112, #3127-#3134 and #3159. Majors: `mongoose`
|
|
31
|
+
8 -> 9, `bson` 6 -> 7, `@noble/curves` 1 -> 2, `@polkadot/util-crypto`
|
|
32
|
+
13 -> 14, `@typegoose/auto-increment` 4 -> 5, `@babel/preset-env` 7 -> 8,
|
|
33
|
+
`@types/jsdom` 21 -> 30, `@types/bcrypt` 5 -> 6, `@actions/github` 6 -> 9,
|
|
34
|
+
`testcontainers` 11 -> 12. The rest are minor/patch.
|
|
35
|
+
|
|
36
|
+
Code changes the majors forced:
|
|
37
|
+
- `@noble/curves` v2 requires `.js` specifiers and renamed the point API,
|
|
38
|
+
so `secp256k1.ProjectivePoint.fromHex(...).toRawBytes()` becomes
|
|
39
|
+
`secp256k1.Point.fromBytes(...).toBytes()`, `RistrettoPoint` becomes
|
|
40
|
+
`ristretto255.Point`, and `abstract/utils` moves to `utils.js`.
|
|
41
|
+
- mongoose 9 drops `RootFilterQuery` (now `QueryFilter`), no longer sets
|
|
42
|
+
`background: true` on schema indexes by default, and no longer declares
|
|
43
|
+
`id` on `Document`, which un-hid a mismatch between
|
|
44
|
+
`updateDappUserCommitment`'s `Hash` parameter and the `string` `id` it
|
|
45
|
+
filters on.
|
|
46
|
+
- mongoose 9 rejects an aggregation-pipeline update (an array) unless the
|
|
47
|
+
call passes `updatePipeline: true`, so the six pipeline writes in
|
|
48
|
+
`ProviderDatabase` now opt in explicitly.
|
|
49
|
+
- mongoose 9's `castUpdate` throws on a `$setOnInsert` key inside `$set`.
|
|
50
|
+
`storeUserImageCaptchaSolution` passed its record straight in as the
|
|
51
|
+
update, and mongoose's `moveImmutableProperties` mutates that object on
|
|
52
|
+
an upsert -- adding the very `$setOnInsert` key the record then carried
|
|
53
|
+
into `CentralDbStreamer.streamImageRecord`. Image records stopped
|
|
54
|
+
reaching the central DB (the streamer is fire-and-forget, so it only
|
|
55
|
+
logged) and signup verification returned 500. The update is now an
|
|
56
|
+
explicit `$set` over a shallow copy.
|
|
57
|
+
- `@prosopo/database` moves from mongodb 6.20 to 7.5 to match the driver
|
|
58
|
+
mongoose 9 pulls, so bson 7 is the only copy resolvable in the package.
|
|
59
|
+
- `vitest`/`@vitest/coverage-v8` go to 4.1.11 alongside dependabot's
|
|
60
|
+
`@vitest/spy` bump; leaving them at 4.1.10 installed a second copy of
|
|
61
|
+
`@vitest/spy` and broke type inference in the provider test utils.
|
|
62
|
+
- Updated dependencies [89dd38a]
|
|
63
|
+
- Updated dependencies [80f73c1]
|
|
64
|
+
- Updated dependencies [8a670d3]
|
|
65
|
+
- @prosopo/locale@3.4.1
|
|
66
|
+
- @prosopo/types@5.6.0
|
|
67
|
+
|
|
3
68
|
## 2.6.125
|
|
4
69
|
### Patch Changes
|
|
5
70
|
|
|
@@ -31,6 +31,14 @@ describe("re-exported types", () => {
|
|
|
31
31
|
expectTypeOf().toEqualTypeOf();
|
|
32
32
|
expectTypeOf().toEqualTypeOf();
|
|
33
33
|
});
|
|
34
|
+
it("carries the placement and bind options through to consumers", () => {
|
|
35
|
+
assertType({ siteKey: "k", placement: "float" });
|
|
36
|
+
assertType({ siteKey: "k", placement: "popup" });
|
|
37
|
+
assertType({ siteKey: "k", bind: "#submit" });
|
|
38
|
+
});
|
|
39
|
+
it("rejects a placement outside the union", () => {
|
|
40
|
+
assertType({ siteKey: "k", placement: "inline" });
|
|
41
|
+
});
|
|
34
42
|
it("exports the language union as a usable type", () => {
|
|
35
43
|
expectTypeOf().toEqualTypeOf();
|
|
36
44
|
assertType("en");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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,EAAE;QAE1C,YAAY,CAAC,kBAAkB,CAAC,CAAC,aAAa,EAAsB,CAAC;IACtE,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QAC1D,YAAY,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,aAAa,EAAiB,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC7D,YAAY,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACjD,YAAY,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAE/D,UAAU,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;QAGzC,YAAY,EAA4B,CAAC,aAAa,EAEnD,CAAC;IACL,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-wrapper",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "^24",
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"test:coverage": "NODE_ENV=${NODE_ENV:-test}; npx vitest run --coverage --config ./vite.test.config.ts"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@prosopo/types": "5.
|
|
31
|
-
"@prosopo/locale": "3.4.
|
|
30
|
+
"@prosopo/types": "5.7.0",
|
|
31
|
+
"@prosopo/locale": "3.4.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@prosopo/config": "3.3.
|
|
35
|
-
"@types/jsdom": "
|
|
34
|
+
"@prosopo/config": "3.3.14",
|
|
35
|
+
"@types/jsdom": "30.0.0",
|
|
36
36
|
"@types/node": "22.10.2",
|
|
37
|
-
"@vitest/coverage-v8": "4.1.
|
|
37
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
38
38
|
"del-cli": "6.0.0",
|
|
39
39
|
"dotenv": "17.3.1",
|
|
40
40
|
"jsdom": "25.0.0",
|
|
41
41
|
"vite": "8.1.5",
|
|
42
|
-
"vitest": "4.1.
|
|
42
|
+
"vitest": "4.1.11"
|
|
43
43
|
},
|
|
44
44
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
45
45
|
"license": "Apache-2.0",
|
|
@@ -80,6 +80,17 @@ describe("re-exported types", () => {
|
|
|
80
80
|
expectTypeOf<ExportedRenderOptions>().toEqualTypeOf<ProcaptchaRenderOptions>();
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
+
it("carries the placement and bind options through to consumers", () => {
|
|
84
|
+
assertType<ExportedRenderOptions>({ siteKey: "k", placement: "float" });
|
|
85
|
+
assertType<ExportedRenderOptions>({ siteKey: "k", placement: "popup" });
|
|
86
|
+
assertType<ExportedRenderOptions>({ siteKey: "k", bind: "#submit" });
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("rejects a placement outside the union", () => {
|
|
90
|
+
// @ts-expect-error inline is not a supported placement
|
|
91
|
+
assertType<ExportedRenderOptions>({ siteKey: "k", placement: "inline" });
|
|
92
|
+
});
|
|
93
|
+
|
|
83
94
|
it("exports the language union as a usable type", () => {
|
|
84
95
|
// `Languages` is a const object with no type meaning, so re-exporting the
|
|
85
96
|
// name as a type produced a binding consumers could not use at all.
|