@prosopo/procaptcha-frictionless 2.16.4 → 2.16.5
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 +24 -24
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +13 -0
- package/dist/cjs/customDetectBot.cjs +6 -1
- package/dist/customDetectBot.d.ts.map +1 -1
- package/dist/customDetectBot.js +6 -1
- package/dist/customDetectBot.js.map +1 -1
- package/dist/detectorLoader.d.ts +5 -1
- package/dist/detectorLoader.d.ts.map +1 -1
- package/dist/detectorLoader.js.map +1 -1
- package/package.json +7 -7
- package/src/customDetectBot.ts +11 -2
- package/src/detectorLoader.ts +6 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-frictionless@2.16.
|
|
2
|
+
> @prosopo/procaptcha-frictionless@2.16.5 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,7 +62,7 @@ dist/cjs/sessionInvalidatedRecovery.cjs 2.50 kB │ gzip: 1.14 kB
|
|
|
62
62
|
dist/cjs/AuthenticatedBadge.cjs 2.69 kB │ gzip: 1.08 kB
|
|
63
63
|
dist/cjs/frictionlessResultGuard.cjs 2.75 kB │ gzip: 1.39 kB
|
|
64
64
|
dist/cjs/detectorPrefetch.cjs 2.98 kB │ gzip: 1.35 kB
|
|
65
|
-
dist/cjs/customDetectBot.cjs 5.
|
|
65
|
+
dist/cjs/customDetectBot.cjs 5.74 kB │ gzip: 1.75 kB
|
|
66
66
|
dist/cjs/ProcaptchaFrictionless.cjs 12.23 kB │ gzip: 3.05 kB
|
|
67
67
|
|
|
68
|
-
[32m✓ built in
|
|
68
|
+
[32m✓ built in 53ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-frictionless@2.16.
|
|
2
|
+
> @prosopo/procaptcha-frictionless@2.16.5 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
10:46:14 PM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../locale/tsconfig.json
|
|
8
8
|
* ../util/tsconfig.json
|
|
@@ -25,47 +25,47 @@
|
|
|
25
25
|
* ../procaptcha-react/tsconfig.json
|
|
26
26
|
* tsconfig.json
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
10:46:14 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'
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
10:46:14 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
10:46:14 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
10:46:14 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'
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
10:46:14 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'
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
10:46:14 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
10:46:14 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
10:46:14 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/error.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
10:46:14 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
10:46:14 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
10:46:14 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/developmentProviderUrl.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
10:46:14 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/theme.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
10:46:14 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
10:46:14 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/tsconfig.tsbuildinfo'
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
10:46:14 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/clientMetaData.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
10:46:14 PM - Project '../procaptcha-pow/tsconfig.json' is up to date because newest input '../procaptcha-pow/src/tests/managerHarness.ts' is older than output '../procaptcha-pow/tsconfig.tsbuildinfo'
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
10:46:14 PM - Project '../procaptcha-puzzle/tsconfig.json' is up to date because newest input '../procaptcha-puzzle/src/tests/managerHarness.ts' is older than output '../procaptcha-puzzle/tsconfig.tsbuildinfo'
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
10:46:14 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'
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
10:46:14 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/modules/Manager.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
10:46:15 PM - Project '../procaptcha-react/tsconfig.json' is up to date because newest input '../procaptcha-react/src/tests/captchaComponent.unit.test.tsx' is older than output '../procaptcha-react/tsconfig.tsbuildinfo'
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
10:46:15 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
10:46:15 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
|
|
71
71
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-frictionless@2.16.
|
|
2
|
+
> @prosopo/procaptcha-frictionless@2.16.5 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/procaptcha-frictionless@2.16.
|
|
6
|
+
> @prosopo/procaptcha-frictionless@2.16.5 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -67,7 +67,7 @@ dist/AuthenticatedBadge.js 2.28 kB │ gzip: 1.04 kB
|
|
|
67
67
|
dist/sessionInvalidatedRecovery.js 2.41 kB │ gzip: 1.13 kB
|
|
68
68
|
dist/frictionlessResultGuard.js 2.68 kB │ gzip: 1.39 kB
|
|
69
69
|
dist/detectorPrefetch.js 2.86 kB │ gzip: 1.32 kB
|
|
70
|
-
dist/customDetectBot.js 5.
|
|
70
|
+
dist/customDetectBot.js 5.56 kB │ gzip: 1.73 kB
|
|
71
71
|
dist/ProcaptchaFrictionless.js 11.43 kB │ gzip: 3.01 kB
|
|
72
72
|
|
|
73
|
-
[32m✓ built in
|
|
73
|
+
[32m✓ built in 64ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @prosopo/procaptcha-frictionless
|
|
2
2
|
|
|
3
|
+
## 2.16.5
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- be25974: Two optional per-site settings are now passed through to the client. Sites that
|
|
7
|
+
do not set them are unaffected.
|
|
8
|
+
- Updated dependencies [be25974]
|
|
9
|
+
- @prosopo/types@5.8.5
|
|
10
|
+
- @prosopo/api@4.2.5
|
|
11
|
+
- @prosopo/procaptcha-common@2.14.2
|
|
12
|
+
- @prosopo/procaptcha-pow@2.12.6
|
|
13
|
+
- @prosopo/procaptcha-puzzle@2.13.2
|
|
14
|
+
- @prosopo/procaptcha-react@2.11.2
|
|
15
|
+
|
|
3
16
|
## 2.16.4
|
|
4
17
|
### Patch Changes
|
|
5
18
|
|
|
@@ -79,11 +79,16 @@ var customDetectBot = async (config, container, restartFn, retryContext) => {
|
|
|
79
79
|
const providerApi = new _prosopo_api.ProviderApi(provider.provider.url, config.account.address);
|
|
80
80
|
let detectorSessionId;
|
|
81
81
|
let providerDetect;
|
|
82
|
+
let detectorOptions;
|
|
82
83
|
try {
|
|
83
84
|
const assigned = prefetchedResult?.assigned ?? await withTimeout(providerApi.assignDetectorBundle(config.account.address), ASSIGN_TIMEOUT_MS);
|
|
84
85
|
if (assigned.useProviderBundle && assigned.detectorScript) {
|
|
85
86
|
providerDetect = await require_detectorLoader.DetectorLoaderFromScript(assigned.detectorScript);
|
|
86
87
|
detectorSessionId = assigned.detectorSessionId;
|
|
88
|
+
detectorOptions = {
|
|
89
|
+
clientUrl: assigned.clientUrl,
|
|
90
|
+
assetOrigin: assigned.assetOrigin
|
|
91
|
+
};
|
|
87
92
|
}
|
|
88
93
|
} catch (err) {
|
|
89
94
|
console.error("Procaptcha: no detector bundle available, falling back to a server-chosen captcha:", err);
|
|
@@ -113,7 +118,7 @@ var customDetectBot = async (config, container, restartFn, retryContext) => {
|
|
|
113
118
|
agent: captcha.agent
|
|
114
119
|
};
|
|
115
120
|
}
|
|
116
|
-
const detectionResult = await providerDetect(container, restartFn, () => ext.getAccount(config));
|
|
121
|
+
const detectionResult = await providerDetect(container, restartFn, () => ext.getAccount(config), detectorOptions);
|
|
117
122
|
const userAccount = detectionResult.userAccount;
|
|
118
123
|
const { currentUrl, iframeUrl } = getCurrentPageUrls();
|
|
119
124
|
const captchaPromise = providerApi.getFrictionlessCaptcha(detectionResult.token, detectionResult.encryptHeadHash, config.account.address, userAccount.account.address, config.mode, void 0, detectorSessionId, currentUrl, iframeUrl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customDetectBot.d.ts","sourceRoot":"","sources":["../src/customDetectBot.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACX,oBAAoB,EAGpB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"customDetectBot.d.ts","sourceRoot":"","sources":["../src/customDetectBot.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACX,oBAAoB,EAGpB,MAAM,gBAAgB,CAAC;AA0FxB,eAAO,MAAM,WAAW,GAAU,CAAC,WACzB,OAAO,CAAC,CAAC,CAAC,MACf,MAAM,KACR,OAAO,CAAC,CAAC,CAoBX,CAAC;AAEF,QAAA,MAAM,eAAe,EAAE,oBA+OtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
package/dist/customDetectBot.js
CHANGED
|
@@ -79,11 +79,16 @@ var customDetectBot = async (config, container, restartFn, retryContext) => {
|
|
|
79
79
|
const providerApi = new ProviderApi(provider.provider.url, config.account.address);
|
|
80
80
|
let detectorSessionId;
|
|
81
81
|
let providerDetect;
|
|
82
|
+
let detectorOptions;
|
|
82
83
|
try {
|
|
83
84
|
const assigned = prefetchedResult?.assigned ?? await withTimeout(providerApi.assignDetectorBundle(config.account.address), ASSIGN_TIMEOUT_MS);
|
|
84
85
|
if (assigned.useProviderBundle && assigned.detectorScript) {
|
|
85
86
|
providerDetect = await DetectorLoaderFromScript(assigned.detectorScript);
|
|
86
87
|
detectorSessionId = assigned.detectorSessionId;
|
|
88
|
+
detectorOptions = {
|
|
89
|
+
clientUrl: assigned.clientUrl,
|
|
90
|
+
assetOrigin: assigned.assetOrigin
|
|
91
|
+
};
|
|
87
92
|
}
|
|
88
93
|
} catch (err) {
|
|
89
94
|
console.error("Procaptcha: no detector bundle available, falling back to a server-chosen captcha:", err);
|
|
@@ -113,7 +118,7 @@ var customDetectBot = async (config, container, restartFn, retryContext) => {
|
|
|
113
118
|
agent: captcha.agent
|
|
114
119
|
};
|
|
115
120
|
}
|
|
116
|
-
const detectionResult = await providerDetect(container, restartFn, () => ext.getAccount(config));
|
|
121
|
+
const detectionResult = await providerDetect(container, restartFn, () => ext.getAccount(config), detectorOptions);
|
|
117
122
|
const userAccount = detectionResult.userAccount;
|
|
118
123
|
const { currentUrl, iframeUrl } = getCurrentPageUrls();
|
|
119
124
|
const captchaPromise = providerApi.getFrictionlessCaptcha(detectionResult.token, detectionResult.encryptHeadHash, config.account.address, userAccount.account.address, config.mode, void 0, detectorSessionId, currentUrl, iframeUrl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customDetectBot.js","sourceRoot":"","sources":["../src/customDetectBot.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OA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,kBAAkB,EAAE,eAAe,CAAC,YAAY;QAChD,gBAAgB,EAAE,eAAe,CAAC,eAAe;QACjD,qBAAqB,EAAE,eAAe,CAAC,qBAAqB;QAC5D,kBAAkB,EAAE,eAAe,CAAC,kBAAkB;QACtD,eAAe,EAAE,eAAe,CAAC,eAAe;KAChD,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
package/dist/detectorLoader.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Account, BehavioralData, ClickEventPoint, MouseMovementPoint, PackedBehavioralData, TouchEventPoint } from "@prosopo/types";
|
|
2
|
-
export type
|
|
2
|
+
export type DetectorOptions = {
|
|
3
|
+
clientUrl?: string;
|
|
4
|
+
assetOrigin?: string;
|
|
5
|
+
};
|
|
6
|
+
export type DetectorType = (container: HTMLElement | undefined, restart: () => void, accountGenerator: () => Promise<Account>, options?: DetectorOptions) => Promise<{
|
|
3
7
|
token: string;
|
|
4
8
|
shadowDomCleanup: () => void;
|
|
5
9
|
encryptHeadHash: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectorLoader.d.ts","sourceRoot":"","sources":["../src/detectorLoader.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACX,OAAO,EACP,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,MAAM,gBAAgB,CAAC;AAOxB,MAAM,MAAM,YAAY,GAAG,CAC1B,SAAS,EAAE,WAAW,GAAG,SAAS,EAClC,OAAO,EAAE,MAAM,IAAI,EACnB,gBAAgB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"detectorLoader.d.ts","sourceRoot":"","sources":["../src/detectorLoader.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACX,OAAO,EACP,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,MAAM,gBAAgB,CAAC;AAO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AAM,GAAG,SAAS,CAAC,CAAC;IACtE,WAAW,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAoBH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAoB/D,eAAO,MAAM,wBAAwB,WAC5B,MAAM,iBACA,cAAc,KAC1B,OAAO,CAAC,YAAY,CAiBtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectorLoader.js","sourceRoot":"","sources":["../src/detectorLoader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"detectorLoader.js","sourceRoot":"","sources":["../src/detectorLoader.ts"],"names":[],"mappings":"AAwEA,MAAM,WAAW,GAAG,CAAC,MAAc,EAAiB,EAAE;IACrD,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAC9B,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAC/C,CAAC;IACF,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAS,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;AAC/D,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,MAAc,EAAiB,EAAE,CAAC,CAAC;IACvD,GAAG,EAAE,sCAAsC,kBAAkB,CAAC,MAAM,CAAC,EAAE;IACvE,OAAO,EAAE,GAAS,EAAE,CAAC,SAAS;CAC9B,CAAC,CAAC;AAKH,MAAM,eAAe,GAAmB,CAAC,GAAG,EAAE,EAAE,CAC/C,MAAM,CAA8C,GAAG,CAAC,CAAC;AAiB1D,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAC5C,MAAc,EACd,eAA+B,eAAe,EACtB,EAAE;IAC1B,IAAI,SAAS,GAAY,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC5D,KAAK,MAAM,KAAK,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,CAAC;QAChD,IAAI,OAAkC,CAAC;QACvC,IAAI,CAAC;YACJ,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;YACxB,MAAM,GAAG,GAAG,CAAC,MAAM,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAE3C,CAAC;YACF,OAAO,GAAG,CAAC,OAAO,CAAC;QACpB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,SAAS,GAAG,GAAG,CAAC;QACjB,CAAC;gBAAS,CAAC;YACV,OAAO,EAAE,OAAO,EAAE,CAAC;QACpB,CAAC;IACF,CAAC;IACD,MAAM,SAAS,CAAC;AACjB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-frictionless",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.5",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
},
|
|
31
31
|
"browserslist": ["> 0.5%, last 2 versions, not dead"],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@prosopo/api": "4.2.
|
|
33
|
+
"@prosopo/api": "4.2.5",
|
|
34
34
|
"@prosopo/common": "3.1.56",
|
|
35
35
|
"@prosopo/locale": "3.4.3",
|
|
36
|
-
"@prosopo/procaptcha-common": "2.14.
|
|
37
|
-
"@prosopo/procaptcha-pow": "2.12.
|
|
38
|
-
"@prosopo/procaptcha-puzzle": "2.13.
|
|
39
|
-
"@prosopo/procaptcha-react": "2.11.
|
|
40
|
-
"@prosopo/types": "5.8.
|
|
36
|
+
"@prosopo/procaptcha-common": "2.14.2",
|
|
37
|
+
"@prosopo/procaptcha-pow": "2.12.6",
|
|
38
|
+
"@prosopo/procaptcha-puzzle": "2.13.2",
|
|
39
|
+
"@prosopo/procaptcha-react": "2.11.2",
|
|
40
|
+
"@prosopo/types": "5.8.5",
|
|
41
41
|
"@prosopo/widget-skeleton": "2.8.7",
|
|
42
42
|
"dotenv": "16.4.5",
|
|
43
43
|
"react": "19.3.0"
|
package/src/customDetectBot.ts
CHANGED
|
@@ -27,6 +27,7 @@ import type {
|
|
|
27
27
|
import type { BotDetectionFunctionResult } from "@prosopo/types";
|
|
28
28
|
import {
|
|
29
29
|
DetectorLoaderFromScript,
|
|
30
|
+
type DetectorOptions,
|
|
30
31
|
type DetectorType,
|
|
31
32
|
} from "./detectorLoader.js";
|
|
32
33
|
import {
|
|
@@ -219,6 +220,7 @@ const customDetectBot: BotDetectionFunction = async (
|
|
|
219
220
|
// timeout) we have NO detector to run and there is no bundled fallback.
|
|
220
221
|
let detectorSessionId: string | undefined;
|
|
221
222
|
let providerDetect: DetectorType | undefined;
|
|
223
|
+
let detectorOptions: DetectorOptions | undefined;
|
|
222
224
|
try {
|
|
223
225
|
// Reuse the prefetched assignment when the entry already fetched one for
|
|
224
226
|
// this provider; otherwise issue it now.
|
|
@@ -234,6 +236,10 @@ const customDetectBot: BotDetectionFunction = async (
|
|
|
234
236
|
// we are already holding.
|
|
235
237
|
providerDetect = await DetectorLoaderFromScript(assigned.detectorScript);
|
|
236
238
|
detectorSessionId = assigned.detectorSessionId;
|
|
239
|
+
detectorOptions = {
|
|
240
|
+
clientUrl: assigned.clientUrl,
|
|
241
|
+
assetOrigin: assigned.assetOrigin,
|
|
242
|
+
};
|
|
237
243
|
}
|
|
238
244
|
} catch (err) {
|
|
239
245
|
// No detector available — fall through to the PoW request below.
|
|
@@ -303,8 +309,11 @@ const customDetectBot: BotDetectionFunction = async (
|
|
|
303
309
|
|
|
304
310
|
const detect: DetectorType = providerDetect;
|
|
305
311
|
|
|
306
|
-
const detectionResult = await detect(
|
|
307
|
-
|
|
312
|
+
const detectionResult = await detect(
|
|
313
|
+
container,
|
|
314
|
+
restartFn,
|
|
315
|
+
() => ext.getAccount(config),
|
|
316
|
+
detectorOptions,
|
|
308
317
|
);
|
|
309
318
|
|
|
310
319
|
const userAccount = detectionResult.userAccount;
|
package/src/detectorLoader.ts
CHANGED
|
@@ -26,10 +26,16 @@ import type {
|
|
|
26
26
|
// signature is declared locally here (mirroring `@prosopo/detector`'s default
|
|
27
27
|
// export) from shared @prosopo/types primitives, rather than importing the
|
|
28
28
|
// detector package as a build-time type dependency.
|
|
29
|
+
export type DetectorOptions = {
|
|
30
|
+
clientUrl?: string;
|
|
31
|
+
assetOrigin?: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
29
34
|
export type DetectorType = (
|
|
30
35
|
container: HTMLElement | undefined,
|
|
31
36
|
restart: () => void,
|
|
32
37
|
accountGenerator: () => Promise<Account>,
|
|
38
|
+
options?: DetectorOptions,
|
|
33
39
|
) => Promise<{
|
|
34
40
|
token: string;
|
|
35
41
|
shadowDomCleanup: () => void;
|