@prosopo/procaptcha-bundle 3.2.9 → 3.3.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 +81 -0
- package/.turbo/turbo-build$colon$tsc.log +83 -0
- package/.turbo/turbo-build.log +84 -0
- package/CHANGELOG.md +109 -0
- package/dist/cjs/util/captcha/captchaComponentProvider.cjs +0 -4
- package/dist/components.d.ts +5 -0
- package/dist/components.d.ts.map +1 -0
- package/dist/components.js +5 -0
- package/dist/components.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/tests/procaptchaReady.unit.test.d.ts +2 -0
- package/dist/tests/procaptchaReady.unit.test.d.ts.map +1 -0
- package/dist/tests/procaptchaReady.unit.test.js +32 -0
- package/dist/tests/procaptchaReady.unit.test.js.map +1 -0
- package/dist/tests/util/captchaType.test.d.ts +2 -0
- package/dist/tests/util/captchaType.test.d.ts.map +1 -0
- package/dist/tests/util/captchaType.test.js +36 -0
- package/dist/tests/util/captchaType.test.js.map +1 -0
- package/dist/tests/util/config.test.d.ts +2 -0
- package/dist/tests/util/config.test.d.ts.map +1 -0
- package/dist/tests/util/config.test.js +69 -0
- package/dist/tests/util/config.test.js.map +1 -0
- package/dist/tests/util/renderLogic.test.d.ts +2 -0
- package/dist/tests/util/renderLogic.test.d.ts.map +1 -0
- package/dist/tests/util/renderLogic.test.js +136 -0
- package/dist/tests/util/renderLogic.test.js.map +1 -0
- package/dist/util/captcha/captchaComponentProvider.d.ts +8 -0
- package/dist/util/captcha/captchaComponentProvider.d.ts.map +1 -0
- package/dist/util/captcha/captchaComponentProvider.js +0 -4
- package/dist/util/captcha/captchaComponentProvider.js.map +1 -0
- package/dist/util/captcha/captchaComponentsList.d.ts +6 -0
- package/dist/util/captcha/captchaComponentsList.d.ts.map +1 -0
- package/dist/util/captcha/captchaComponentsList.js.map +1 -0
- package/dist/util/captcha/captchaProps.d.ts +10 -0
- package/dist/util/captcha/captchaProps.d.ts.map +1 -0
- package/dist/util/captcha/captchaProps.js +2 -0
- package/dist/util/captcha/captchaProps.js.map +1 -0
- package/dist/util/captcha/captchaRenderer.d.ts +24 -0
- package/dist/util/captcha/captchaRenderer.d.ts.map +1 -0
- package/dist/util/captcha/captchaRenderer.js.map +1 -0
- package/dist/util/captcha/captchaType.d.ts +3 -0
- package/dist/util/captcha/captchaType.d.ts.map +1 -0
- package/dist/util/captcha/captchaType.js.map +1 -0
- package/dist/util/captcha/components/frictionlessCaptcha.d.ts +4 -0
- package/dist/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/dist/util/captcha/components/frictionlessCaptcha.js.map +1 -0
- package/dist/util/captcha/components/imageCaptcha.d.ts +4 -0
- package/dist/util/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/dist/util/captcha/components/imageCaptcha.js.map +1 -0
- package/dist/util/captcha/components/powCaptcha.d.ts +4 -0
- package/dist/util/captcha/components/powCaptcha.d.ts.map +1 -0
- package/dist/util/captcha/components/powCaptcha.js.map +1 -0
- package/dist/util/config.d.ts +6 -0
- package/dist/util/config.d.ts.map +1 -0
- package/dist/util/config.js.map +1 -0
- package/dist/util/configCreator.d.ts +5 -0
- package/dist/util/configCreator.d.ts.map +1 -0
- package/dist/util/configCreator.js.map +1 -0
- package/dist/util/language.d.ts +3 -0
- package/dist/util/language.d.ts.map +1 -0
- package/dist/util/language.js.map +1 -0
- package/dist/util/timeout.d.ts +3 -0
- package/dist/util/timeout.d.ts.map +1 -0
- package/dist/util/timeout.js.map +1 -0
- package/dist/util/widgetFactory.d.ts +18 -0
- package/dist/util/widgetFactory.d.ts.map +1 -0
- package/dist/util/widgetFactory.js.map +1 -0
- package/dist/util/widgetThemeResolver.d.ts +9 -0
- package/dist/util/widgetThemeResolver.d.ts.map +1 -0
- package/dist/util/widgetThemeResolver.js.map +1 -0
- package/package.json +13 -12
- package/vite.cjs.config.ts +1 -1
- package/vite.config.ts +5 -1
- package/vite.esm.config.ts +1 -1
- package/vite.serve.config.ts +6 -1
- package/vite.test.config.ts +1 -1
- package/webpack.config.cjs +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
|
|
2
|
+
> @prosopo/procaptcha-bundle@3.3.0 build:cjs
|
|
3
|
+
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
|
+
|
|
5
|
+
ViteCommonJSConfig: .
|
|
6
|
+
{
|
|
7
|
+
tsConfigPaths: [
|
|
8
|
+
'/home/runner/work/captcha/captcha/packages/dotenv/tsconfig.json',
|
|
9
|
+
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
10
|
+
'/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
|
|
11
|
+
'/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
|
|
12
|
+
'/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
|
|
13
|
+
'/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
|
|
14
|
+
'/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json',
|
|
15
|
+
'/home/runner/work/captcha/captcha/packages/detector/tsconfig.json',
|
|
16
|
+
'/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
|
|
17
|
+
'/home/runner/work/captcha/captcha/packages/procaptcha-pow/tsconfig.json',
|
|
18
|
+
'/home/runner/work/captcha/captcha/packages/api/tsconfig.json',
|
|
19
|
+
'/home/runner/work/captcha/captcha/packages/procaptcha-common/tsconfig.json',
|
|
20
|
+
'/home/runner/work/captcha/captcha/packages/widget-skeleton/tsconfig.json',
|
|
21
|
+
'/home/runner/work/captcha/captcha/packages/account/tsconfig.json',
|
|
22
|
+
'/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
|
|
23
|
+
'/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
|
|
24
|
+
'/home/runner/work/captcha/captcha/packages/procaptcha-react/tsconfig.json',
|
|
25
|
+
'/home/runner/work/captcha/captcha/packages/procaptcha/tsconfig.json',
|
|
26
|
+
'/home/runner/work/captcha/captcha/packages/datasets/tsconfig.json',
|
|
27
|
+
'/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json',
|
|
28
|
+
'/home/runner/work/captcha/captcha/packages/user-access-policy/tsconfig.json',
|
|
29
|
+
'/home/runner/work/captcha/captcha/packages/api-route/tsconfig.json',
|
|
30
|
+
'/home/runner/work/captcha/captcha/packages/redis-client/tsconfig.json'
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
{
|
|
34
|
+
externals: [
|
|
35
|
+
'@prosopo/dotenv',
|
|
36
|
+
'@prosopo/common',
|
|
37
|
+
'@prosopo/locale',
|
|
38
|
+
'@prosopo/types',
|
|
39
|
+
'@prosopo/util',
|
|
40
|
+
'@prosopo/util-crypto',
|
|
41
|
+
'@prosopo/procaptcha-frictionless',
|
|
42
|
+
'@prosopo/detector',
|
|
43
|
+
'@prosopo/load-balancer',
|
|
44
|
+
'@prosopo/procaptcha-pow',
|
|
45
|
+
'@prosopo/api',
|
|
46
|
+
'@prosopo/procaptcha-common',
|
|
47
|
+
'@prosopo/widget-skeleton',
|
|
48
|
+
'@prosopo/account',
|
|
49
|
+
'@prosopo/fingerprint',
|
|
50
|
+
'@prosopo/keyring',
|
|
51
|
+
'@prosopo/procaptcha-react',
|
|
52
|
+
'@prosopo/procaptcha',
|
|
53
|
+
'@prosopo/datasets',
|
|
54
|
+
'@prosopo/types-database',
|
|
55
|
+
'@prosopo/user-access-policy',
|
|
56
|
+
'@prosopo/api-route',
|
|
57
|
+
'@prosopo/redis-client'
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
[36mvite v6.4.1 [32mbuilding SSR bundle for production...[36m[39m
|
|
61
|
+
Bundle build started
|
|
62
|
+
transforming...
|
|
63
|
+
Build end
|
|
64
|
+
[32m✓[39m 14 modules transformed.
|
|
65
|
+
[33mEntry module "src/index.ts" is using named and default exports together. Consumers of your bundle will have to use `..default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.[39m
|
|
66
|
+
rendering chunks...
|
|
67
|
+
[2mdist/cjs/[22m[36mutil/captcha/captchaType.cjs [39m[1m[2m0.47 kB[22m[1m[22m
|
|
68
|
+
[2mdist/cjs/[22m[36mutil/captcha/components/powCaptcha.cjs [39m[1m[2m0.55 kB[22m[1m[22m
|
|
69
|
+
[2mdist/cjs/[22m[36mutil/captcha/components/imageCaptcha.cjs [39m[1m[2m0.56 kB[22m[1m[22m
|
|
70
|
+
[2mdist/cjs/[22m[36mutil/captcha/captchaComponentsList.cjs [39m[1m[2m0.60 kB[22m[1m[22m
|
|
71
|
+
[2mdist/cjs/[22m[36mutil/timeout.cjs [39m[1m[2m0.61 kB[22m[1m[22m
|
|
72
|
+
[2mdist/cjs/[22m[36mutil/widgetThemeResolver.cjs [39m[1m[2m0.62 kB[22m[1m[22m
|
|
73
|
+
[2mdist/cjs/[22m[36mutil/config.cjs [39m[1m[2m0.67 kB[22m[1m[22m
|
|
74
|
+
[2mdist/cjs/[22m[36mutil/language.cjs [39m[1m[2m0.67 kB[22m[1m[22m
|
|
75
|
+
[2mdist/cjs/[22m[36mutil/captcha/captchaComponentProvider.cjs [39m[1m[2m0.73 kB[22m[1m[22m
|
|
76
|
+
[2mdist/cjs/[22m[36mutil/captcha/components/frictionlessCaptcha.cjs [39m[1m[2m0.85 kB[22m[1m[22m
|
|
77
|
+
[2mdist/cjs/[22m[36mutil/configCreator.cjs [39m[1m[2m0.89 kB[22m[1m[22m
|
|
78
|
+
[2mdist/cjs/[22m[36mutil/captcha/captchaRenderer.cjs [39m[1m[2m2.24 kB[22m[1m[22m
|
|
79
|
+
[2mdist/cjs/[22m[36mutil/widgetFactory.cjs [39m[1m[2m3.08 kB[22m[1m[22m
|
|
80
|
+
[2mdist/cjs/[22m[36mindex.cjs [39m[1m[2m5.66 kB[22m[1m[22m
|
|
81
|
+
[32m✓ built in 225ms[39m
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
|
|
2
|
+
> @prosopo/procaptcha-bundle@3.3.0 build:tsc
|
|
3
|
+
> tsc --build --verbose
|
|
4
|
+
|
|
5
|
+
4:57:44 PM - Projects in this build:
|
|
6
|
+
* ../../dev/config/tsconfig.json
|
|
7
|
+
* ../locale/tsconfig.json
|
|
8
|
+
* ../util/tsconfig.json
|
|
9
|
+
* ../util-crypto/tsconfig.json
|
|
10
|
+
* ../types/tsconfig.json
|
|
11
|
+
* ../common/tsconfig.json
|
|
12
|
+
* ../dotenv/tsconfig.json
|
|
13
|
+
* ../detector/tsconfig.json
|
|
14
|
+
* ../load-balancer/tsconfig.json
|
|
15
|
+
* ../api/tsconfig.json
|
|
16
|
+
* ../widget-skeleton/tsconfig.json
|
|
17
|
+
* ../fingerprint/tsconfig.json
|
|
18
|
+
* ../keyring/tsconfig.json
|
|
19
|
+
* ../account/tsconfig.json
|
|
20
|
+
* ../procaptcha-common/tsconfig.json
|
|
21
|
+
* ../procaptcha-pow/tsconfig.json
|
|
22
|
+
* ../api-route/tsconfig.json
|
|
23
|
+
* ../redis-client/tsconfig.json
|
|
24
|
+
* ../user-access-policy/tsconfig.json
|
|
25
|
+
* ../types-database/tsconfig.json
|
|
26
|
+
* ../datasets/tsconfig.json
|
|
27
|
+
* ../procaptcha/tsconfig.json
|
|
28
|
+
* ../procaptcha-react/tsconfig.json
|
|
29
|
+
* ../procaptcha-frictionless/tsconfig.json
|
|
30
|
+
* tsconfig.json
|
|
31
|
+
|
|
32
|
+
4:57:44 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/dependencies.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
|
|
33
|
+
|
|
34
|
+
4:57:44 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
35
|
+
|
|
36
|
+
4:57:44 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/verifyRecency.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
37
|
+
|
|
38
|
+
4:57:44 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'
|
|
39
|
+
|
|
40
|
+
4:57:44 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
41
|
+
|
|
42
|
+
4:57:44 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/logger.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
43
|
+
|
|
44
|
+
4:57:44 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/env.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
|
|
45
|
+
|
|
46
|
+
4:57:44 PM - Project '../detector/tsconfig.json' is up to date because newest input '../detector/src/index.js' is older than output '../detector/tsconfig.tsbuildinfo'
|
|
47
|
+
|
|
48
|
+
4:57:44 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'
|
|
49
|
+
|
|
50
|
+
4:57:44 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
51
|
+
|
|
52
|
+
4:57:44 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'
|
|
53
|
+
|
|
54
|
+
4:57:44 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
|
|
55
|
+
|
|
56
|
+
4:57:44 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
|
|
57
|
+
|
|
58
|
+
4:57:44 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/tsconfig.tsbuildinfo'
|
|
59
|
+
|
|
60
|
+
4:57:44 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/state/builder.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
|
|
61
|
+
|
|
62
|
+
4:57:44 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'
|
|
63
|
+
|
|
64
|
+
4:57:44 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/index.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
|
|
65
|
+
|
|
66
|
+
4:57:44 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
|
|
67
|
+
|
|
68
|
+
4:57:44 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/transformRule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
|
|
69
|
+
|
|
70
|
+
4:57:45 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/index.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
|
|
71
|
+
|
|
72
|
+
4:57:45 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'
|
|
73
|
+
|
|
74
|
+
4:57:45 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/index.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
|
|
75
|
+
|
|
76
|
+
4:57:45 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'
|
|
77
|
+
|
|
78
|
+
4:57:45 PM - Project '../procaptcha-frictionless/tsconfig.json' is up to date because newest input '../procaptcha-frictionless/src/ProcaptchaFrictionless.tsx' is older than output '../procaptcha-frictionless/tsconfig.tsbuildinfo'
|
|
79
|
+
|
|
80
|
+
4:57:45 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
81
|
+
|
|
82
|
+
4:57:45 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-bundle/tsconfig.json'...
|
|
83
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
|
|
2
|
+
> @prosopo/procaptcha-bundle@3.3.0 build
|
|
3
|
+
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
> @prosopo/procaptcha-bundle@3.3.0 build:cross-env
|
|
7
|
+
> vite build --config vite.esm.config.ts --mode production
|
|
8
|
+
|
|
9
|
+
ViteEsmConfig: .
|
|
10
|
+
{
|
|
11
|
+
tsConfigPaths: [
|
|
12
|
+
'/home/runner/work/captcha/captcha/packages/dotenv/tsconfig.json',
|
|
13
|
+
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
14
|
+
'/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
|
|
15
|
+
'/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
|
|
16
|
+
'/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
|
|
17
|
+
'/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
|
|
18
|
+
'/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json',
|
|
19
|
+
'/home/runner/work/captcha/captcha/packages/detector/tsconfig.json',
|
|
20
|
+
'/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
|
|
21
|
+
'/home/runner/work/captcha/captcha/packages/procaptcha-pow/tsconfig.json',
|
|
22
|
+
'/home/runner/work/captcha/captcha/packages/api/tsconfig.json',
|
|
23
|
+
'/home/runner/work/captcha/captcha/packages/procaptcha-common/tsconfig.json',
|
|
24
|
+
'/home/runner/work/captcha/captcha/packages/widget-skeleton/tsconfig.json',
|
|
25
|
+
'/home/runner/work/captcha/captcha/packages/account/tsconfig.json',
|
|
26
|
+
'/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
|
|
27
|
+
'/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
|
|
28
|
+
'/home/runner/work/captcha/captcha/packages/procaptcha-react/tsconfig.json',
|
|
29
|
+
'/home/runner/work/captcha/captcha/packages/procaptcha/tsconfig.json',
|
|
30
|
+
'/home/runner/work/captcha/captcha/packages/datasets/tsconfig.json',
|
|
31
|
+
'/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json',
|
|
32
|
+
'/home/runner/work/captcha/captcha/packages/user-access-policy/tsconfig.json',
|
|
33
|
+
'/home/runner/work/captcha/captcha/packages/api-route/tsconfig.json',
|
|
34
|
+
'/home/runner/work/captcha/captcha/packages/redis-client/tsconfig.json'
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
{
|
|
38
|
+
externals: [
|
|
39
|
+
'@prosopo/dotenv',
|
|
40
|
+
'@prosopo/common',
|
|
41
|
+
'@prosopo/locale',
|
|
42
|
+
'@prosopo/types',
|
|
43
|
+
'@prosopo/util',
|
|
44
|
+
'@prosopo/util-crypto',
|
|
45
|
+
'@prosopo/procaptcha-frictionless',
|
|
46
|
+
'@prosopo/detector',
|
|
47
|
+
'@prosopo/load-balancer',
|
|
48
|
+
'@prosopo/procaptcha-pow',
|
|
49
|
+
'@prosopo/api',
|
|
50
|
+
'@prosopo/procaptcha-common',
|
|
51
|
+
'@prosopo/widget-skeleton',
|
|
52
|
+
'@prosopo/account',
|
|
53
|
+
'@prosopo/fingerprint',
|
|
54
|
+
'@prosopo/keyring',
|
|
55
|
+
'@prosopo/procaptcha-react',
|
|
56
|
+
'@prosopo/procaptcha',
|
|
57
|
+
'@prosopo/datasets',
|
|
58
|
+
'@prosopo/types-database',
|
|
59
|
+
'@prosopo/user-access-policy',
|
|
60
|
+
'@prosopo/api-route',
|
|
61
|
+
'@prosopo/redis-client'
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
[36mvite v6.4.1 [32mbuilding SSR bundle for production...[36m[39m
|
|
65
|
+
Bundle build started
|
|
66
|
+
transforming...
|
|
67
|
+
Build end
|
|
68
|
+
[32m✓[39m 14 modules transformed.
|
|
69
|
+
rendering chunks...
|
|
70
|
+
[2mdist/[22m[36mutil/captcha/captchaType.js [39m[1m[2m0.36 kB[22m[1m[22m
|
|
71
|
+
[2mdist/[22m[36mutil/captcha/components/imageCaptcha.js [39m[1m[2m0.40 kB[22m[1m[22m
|
|
72
|
+
[2mdist/[22m[36mutil/captcha/components/powCaptcha.js [39m[1m[2m0.40 kB[22m[1m[22m
|
|
73
|
+
[2mdist/[22m[36mutil/captcha/captchaComponentsList.js [39m[1m[2m0.43 kB[22m[1m[22m
|
|
74
|
+
[2mdist/[22m[36mutil/timeout.js [39m[1m[2m0.50 kB[22m[1m[22m
|
|
75
|
+
[2mdist/[22m[36mutil/widgetThemeResolver.js [39m[1m[2m0.51 kB[22m[1m[22m
|
|
76
|
+
[2mdist/[22m[36mutil/config.js [39m[1m[2m0.54 kB[22m[1m[22m
|
|
77
|
+
[2mdist/[22m[36mutil/language.js [39m[1m[2m0.57 kB[22m[1m[22m
|
|
78
|
+
[2mdist/[22m[36mutil/captcha/captchaComponentProvider.js [39m[1m[2m0.58 kB[22m[1m[22m
|
|
79
|
+
[2mdist/[22m[36mutil/captcha/components/frictionlessCaptcha.js [39m[1m[2m0.68 kB[22m[1m[22m
|
|
80
|
+
[2mdist/[22m[36mutil/configCreator.js [39m[1m[2m0.81 kB[22m[1m[22m
|
|
81
|
+
[2mdist/[22m[36mutil/captcha/captchaRenderer.js [39m[1m[2m2.09 kB[22m[1m[22m
|
|
82
|
+
[2mdist/[22m[36mutil/widgetFactory.js [39m[1m[2m2.88 kB[22m[1m[22m
|
|
83
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m5.36 kB[22m[1m[22m
|
|
84
|
+
[32m✓ built in 250ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,114 @@
|
|
|
1
1
|
# @prosopo/procaptcha-bundle
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
### Minor Changes
|
|
5
|
+
|
|
6
|
+
- 1ee3d80: More API fixes
|
|
7
|
+
- 6a4d57d: Move account creation into worker
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 0a38892: feat/cross-os-testing
|
|
12
|
+
- a8faa9a: bump license year
|
|
13
|
+
- 3acc333: Release 3.3.0
|
|
14
|
+
- Updated dependencies [a53526b]
|
|
15
|
+
- Updated dependencies [f3cf586]
|
|
16
|
+
- Updated dependencies [3acc333]
|
|
17
|
+
- Updated dependencies [0a38892]
|
|
18
|
+
- Updated dependencies [1ee3d80]
|
|
19
|
+
- Updated dependencies [a8faa9a]
|
|
20
|
+
- Updated dependencies [7543d17]
|
|
21
|
+
- Updated dependencies [fe9fe22]
|
|
22
|
+
- Updated dependencies [3acc333]
|
|
23
|
+
- @prosopo/procaptcha-pow@2.8.31
|
|
24
|
+
- @prosopo/util@3.2.5
|
|
25
|
+
- @prosopo/procaptcha-common@2.9.23
|
|
26
|
+
- @prosopo/types@3.8.0
|
|
27
|
+
- @prosopo/procaptcha-frictionless@2.8.31
|
|
28
|
+
- @prosopo/procaptcha-react@2.9.27
|
|
29
|
+
- @prosopo/widget-skeleton@2.7.13
|
|
30
|
+
- @prosopo/dotenv@3.0.33
|
|
31
|
+
- @prosopo/locale@3.1.28
|
|
32
|
+
|
|
33
|
+
## 3.2.18
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- @prosopo/procaptcha-react@2.9.26
|
|
37
|
+
- @prosopo/procaptcha-frictionless@2.8.30
|
|
38
|
+
|
|
39
|
+
## 3.2.17
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- @prosopo/procaptcha-frictionless@2.8.29
|
|
43
|
+
|
|
44
|
+
## 3.2.16
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- @prosopo/procaptcha-react@2.9.25
|
|
48
|
+
- @prosopo/procaptcha-frictionless@2.8.28
|
|
49
|
+
|
|
50
|
+
## 3.2.15
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- caf53e2: Async user creation
|
|
54
|
+
- Updated dependencies [caf53e2]
|
|
55
|
+
- @prosopo/procaptcha-frictionless@2.8.27
|
|
56
|
+
|
|
57
|
+
## 3.2.14
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- @prosopo/procaptcha-frictionless@2.8.26
|
|
61
|
+
|
|
62
|
+
## 3.2.13
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- Updated dependencies [141e462]
|
|
66
|
+
- @prosopo/procaptcha-pow@2.8.30
|
|
67
|
+
- @prosopo/types@3.7.2
|
|
68
|
+
- @prosopo/procaptcha-common@2.9.22
|
|
69
|
+
- @prosopo/procaptcha-frictionless@2.8.25
|
|
70
|
+
- @prosopo/procaptcha-react@2.9.24
|
|
71
|
+
|
|
72
|
+
## 3.2.12
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- Updated dependencies [345b25b]
|
|
76
|
+
- @prosopo/procaptcha-pow@2.8.29
|
|
77
|
+
- @prosopo/types@3.7.1
|
|
78
|
+
- @prosopo/procaptcha-frictionless@2.8.24
|
|
79
|
+
- @prosopo/procaptcha-common@2.9.21
|
|
80
|
+
- @prosopo/procaptcha-react@2.9.23
|
|
81
|
+
|
|
82
|
+
## 3.2.11
|
|
83
|
+
### Patch Changes
|
|
84
|
+
|
|
85
|
+
- Updated dependencies [ce70a2b]
|
|
86
|
+
- Updated dependencies [c2b940f]
|
|
87
|
+
- Updated dependencies [f6b5094]
|
|
88
|
+
- Updated dependencies [e01227b]
|
|
89
|
+
- @prosopo/types@3.7.0
|
|
90
|
+
- @prosopo/locale@3.1.27
|
|
91
|
+
- @prosopo/procaptcha-common@2.9.20
|
|
92
|
+
- @prosopo/procaptcha-frictionless@2.8.23
|
|
93
|
+
- @prosopo/procaptcha-pow@2.8.28
|
|
94
|
+
- @prosopo/procaptcha-react@2.9.22
|
|
95
|
+
- @prosopo/dotenv@3.0.32
|
|
96
|
+
|
|
97
|
+
## 3.2.10
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- 7d5eb3f: bump
|
|
101
|
+
- Updated dependencies [7d5eb3f]
|
|
102
|
+
- @prosopo/dotenv@3.0.31
|
|
103
|
+
- @prosopo/locale@3.1.26
|
|
104
|
+
- @prosopo/procaptcha-common@2.9.19
|
|
105
|
+
- @prosopo/procaptcha-frictionless@2.8.22
|
|
106
|
+
- @prosopo/procaptcha-pow@2.8.27
|
|
107
|
+
- @prosopo/procaptcha-react@2.9.21
|
|
108
|
+
- @prosopo/types@3.6.4
|
|
109
|
+
- @prosopo/util@3.2.4
|
|
110
|
+
- @prosopo/widget-skeleton@2.7.12
|
|
111
|
+
|
|
3
112
|
## 3.2.9
|
|
4
113
|
### Patch Changes
|
|
5
114
|
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const types = require("@prosopo/types");
|
|
5
4
|
const captchaComponentsList = require("./captchaComponentsList.cjs");
|
|
6
5
|
class CaptchaComponentProvider {
|
|
7
6
|
getCaptchaComponent(captchaType, captchaProps) {
|
|
8
|
-
if (captchaType === types.CaptchaType.invisible) {
|
|
9
|
-
throw new Error("Not Implemented");
|
|
10
|
-
}
|
|
11
7
|
const CaptchaComponent = captchaComponentsList.captchaComponentsList[captchaType];
|
|
12
8
|
console.log(`rendering ${captchaType}`);
|
|
13
9
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./util/captcha/components/frictionlessCaptcha.js";
|
|
2
|
+
export * from "./util/captcha/components/powCaptcha.js";
|
|
3
|
+
export * from "./util/captcha/components/imageCaptcha.js";
|
|
4
|
+
export * from "./util/captcha/captchaComponentProvider.js";
|
|
5
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAcA,cAAc,kDAAkD,CAAC;AACjE,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./util/captcha/components/frictionlessCaptcha.js";
|
|
2
|
+
export * from "./util/captcha/components/powCaptcha.js";
|
|
3
|
+
export * from "./util/captcha/components/imageCaptcha.js";
|
|
4
|
+
export * from "./util/captcha/captchaComponentProvider.js";
|
|
5
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAcA,cAAc,kDAAkD,CAAC;AACjE,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ProcaptchaRenderOptions } from "@prosopo/types";
|
|
2
|
+
export declare const render: (element: Element, renderOptions: ProcaptchaRenderOptions) => Promise<void>;
|
|
3
|
+
export default function ready(fn: () => void): void;
|
|
4
|
+
export declare const execute: () => void;
|
|
5
|
+
declare global {
|
|
6
|
+
interface Window {
|
|
7
|
+
procaptcha: {
|
|
8
|
+
ready: typeof ready;
|
|
9
|
+
render: typeof render;
|
|
10
|
+
reset: typeof reset;
|
|
11
|
+
execute: typeof execute;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export declare const reset: () => void;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAoF9D,eAAO,MAAM,MAAM,YACT,OAAO,iBACD,uBAAuB,kBA2BtC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,EAAE,MAAM,IAAI,QAY3C;AAED,eAAO,MAAM,OAAO,YAqBnB,CAAC;AAkCF,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,UAAU,EAAE;YACX,KAAK,EAAE,OAAO,KAAK,CAAC;YACpB,MAAM,EAAE,OAAO,MAAM,CAAC;YACtB,KAAK,EAAE,OAAO,KAAK,CAAC;YACpB,OAAO,EAAE,OAAO,OAAO,CAAC;SACxB,CAAC;KACF;CACD;AAmCD,eAAO,MAAM,KAAK,YAOjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAC3C,IAAI,eAAe,GAAW,EAAE,CAAC;AAEjC,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC;AAGnE,MAAM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CAAC,cAAc,CAAC,CAAC;QACvB,CAAC;IACF,CAAC;IAED,IAAI,iBAAiB,EAAE,CAAC;QAEvB,mBAAmB,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;YAC/D,MAAM,cAAc,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;YAC5D,KAAK,CAAC,cAAc,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAGH,IAAI,QAAQ,CAAC,UAAU,KAAK,UAAU,IAAI,CAAC,WAAW,EAAE,CAAC;YACxD,MAAM,cAAc,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;YAC5D,KAAK,CAAC,cAAc,CAAC,CAAC;QACvB,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE;IACzB,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;QACpC,IAAI,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IACD,eAAe,GAAG,EAAE,CAAC;IAErB,KAAK,EAAE,CAAC;AACT,CAAC,CAAC;AAGF,MAAM,CAAC,UAAU,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAGtD,MAAM,oBAAoB,GAAG,IAAI,WAAW,CAAC,sBAAsB,EAAE;IACpE,MAAM,EAAE;QACP,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACrB;IACD,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,KAAK;CACjB,CAAC,CAAC;AACH,QAAQ,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;AAE7C,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"procaptchaReady.unit.test.d.ts","sourceRoot":"","sources":["../../src/tests/procaptchaReady.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JSDOM } from "jsdom";
|
|
2
|
+
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
3
|
+
describe("procaptcha:ready event", () => {
|
|
4
|
+
let dom;
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
dom = new JSDOM("<!DOCTYPE html><html><body></body></html>", {
|
|
7
|
+
url: "https://example.com",
|
|
8
|
+
});
|
|
9
|
+
global.document = dom.window.document;
|
|
10
|
+
global.window = dom.window;
|
|
11
|
+
});
|
|
12
|
+
afterEach(() => {
|
|
13
|
+
global.document = undefined;
|
|
14
|
+
global.window = undefined;
|
|
15
|
+
});
|
|
16
|
+
it("should dispatch procaptcha:ready event when window.procaptcha is set", (done) => {
|
|
17
|
+
document.addEventListener("procaptcha:ready", (event) => {
|
|
18
|
+
const customEvent = event;
|
|
19
|
+
expect(customEvent.detail).toBeDefined();
|
|
20
|
+
expect(typeof customEvent.detail.timestamp).toBe("number");
|
|
21
|
+
expect(customEvent.bubbles).toBe(true);
|
|
22
|
+
expect(customEvent.cancelable).toBe(false);
|
|
23
|
+
expect(window.procaptcha).toBeDefined();
|
|
24
|
+
expect(window.procaptcha?.render).toBeDefined();
|
|
25
|
+
expect(window.procaptcha?.ready).toBeDefined();
|
|
26
|
+
expect(window.procaptcha?.reset).toBeDefined();
|
|
27
|
+
expect(window.procaptcha?.execute).toBeDefined();
|
|
28
|
+
});
|
|
29
|
+
import("../index.js");
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=procaptchaReady.unit.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"procaptchaReady.unit.test.js","sourceRoot":"","sources":["../../src/tests/procaptchaReady.unit.test.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAErE,QAAQ,CAAC,w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C,CAAC,WAAW,EAAE,CAAC;YAC/C,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;QAClD,CAAC,CAAC,CAAC;QAGH,MAAM,CAAC,aAAa,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captchaType.test.d.ts","sourceRoot":"","sources":["../../../src/tests/util/captchaType.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CaptchaType } from "@prosopo/types";
|
|
2
|
+
import { JSDOM } from "jsdom";
|
|
3
|
+
import { beforeEach, describe, expect, it } from "vitest";
|
|
4
|
+
import { getCaptchaType } from "../../util/captcha/captchaType.js";
|
|
5
|
+
describe("getCaptchaType", () => {
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
const dom = new JSDOM("<!DOCTYPE html><html><body></body></html>");
|
|
8
|
+
global.document = dom.window.document;
|
|
9
|
+
});
|
|
10
|
+
it("should return the correct captcha type when a valid type is set", () => {
|
|
11
|
+
const element = document.createElement("div");
|
|
12
|
+
element.setAttribute("data-captcha-type", CaptchaType.pow);
|
|
13
|
+
const result = getCaptchaType([element]);
|
|
14
|
+
expect(result).toBe(CaptchaType.pow);
|
|
15
|
+
});
|
|
16
|
+
it('should return "frictionless" when no captcha type is set', () => {
|
|
17
|
+
const element = document.createElement("div");
|
|
18
|
+
const result = getCaptchaType([element]);
|
|
19
|
+
expect(result).toBe("frictionless");
|
|
20
|
+
});
|
|
21
|
+
it('should return "frictionless" when an invalid captcha type is set', () => {
|
|
22
|
+
const element = document.createElement("div");
|
|
23
|
+
element.setAttribute("data-captcha-type", "invalid-type");
|
|
24
|
+
const result = getCaptchaType([element]);
|
|
25
|
+
expect(result).toBe("frictionless");
|
|
26
|
+
});
|
|
27
|
+
it("should work with all valid FeaturesEnum values", () => {
|
|
28
|
+
const element = document.createElement("div");
|
|
29
|
+
for (const feature of Object.values(CaptchaType)) {
|
|
30
|
+
element.setAttribute("data-captcha-type", feature);
|
|
31
|
+
const result = getCaptchaType([element]);
|
|
32
|
+
expect(result).toBe(feature);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=captchaType.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captchaType.test.js","sourceRoot":"","sources":["../../../src/tests/util/captchaType.test.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC/B,UAAU,CAAC,GAAG,EAAE;QACf,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACnE,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC;IACvC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,iEAAiE,EAAE,GAAG,EAAE;QAC1E,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC9C,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;QAE3D,MAAM,MAAM,GAAG,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAEzC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QACnE,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE9C,MAAM,MAAM,GAAG,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAEzC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QAC3E,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC9C,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;QAE1D,MAAM,MAAM,GAAG,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAEzC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACzD,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE9C,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;YAClD,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;YACnD,MAAM,MAAM,GAAG,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACzC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.test.d.ts","sourceRoot":"","sources":["../../../src/tests/util/config.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { JSDOM } from "jsdom";
|
|
2
|
+
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
3
|
+
import { extractParams, getProcaptchaScript } from "../../util/config.js";
|
|
4
|
+
describe("Config utility functions", () => {
|
|
5
|
+
let dom;
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
dom = new JSDOM("<!DOCTYPE html><html><body></body></html>", {
|
|
8
|
+
url: "https://example.com",
|
|
9
|
+
});
|
|
10
|
+
global.document = dom.window.document;
|
|
11
|
+
});
|
|
12
|
+
afterEach(() => {
|
|
13
|
+
global.document = undefined;
|
|
14
|
+
});
|
|
15
|
+
describe("getProcaptchaScript", () => {
|
|
16
|
+
it("should return null when no matching script is found", () => {
|
|
17
|
+
const result = getProcaptchaScript("nonexistent");
|
|
18
|
+
expect(result).toBeNull();
|
|
19
|
+
});
|
|
20
|
+
it("should return the script element when a matching script is found", () => {
|
|
21
|
+
const script = document.createElement("script");
|
|
22
|
+
script.src = "https://example.com/procaptcha.js";
|
|
23
|
+
document.body.appendChild(script);
|
|
24
|
+
const result = getProcaptchaScript("procaptcha");
|
|
25
|
+
expect(result).toBe(script);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
describe("extractParams", () => {
|
|
29
|
+
it("should return undefined values when no matching script is found", () => {
|
|
30
|
+
const result = extractParams("nonexistent");
|
|
31
|
+
expect(result).toEqual({
|
|
32
|
+
onloadUrlCallback: undefined,
|
|
33
|
+
renderExplicit: undefined,
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
it("should extract parameters from the script URL", () => {
|
|
37
|
+
const script = document.createElement("script");
|
|
38
|
+
script.src =
|
|
39
|
+
"https://example.com/procaptcha.js?onload=onloadCallback&render=explicit";
|
|
40
|
+
document.body.appendChild(script);
|
|
41
|
+
const result = extractParams("procaptcha");
|
|
42
|
+
expect(result).toEqual({
|
|
43
|
+
onloadUrlCallback: "onloadCallback",
|
|
44
|
+
renderExplicit: "explicit",
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
it("should return undefined for missing parameters", () => {
|
|
48
|
+
const script = document.createElement("script");
|
|
49
|
+
script.src = "https://example.com/procaptcha.js?onload=onloadCallback";
|
|
50
|
+
document.body.appendChild(script);
|
|
51
|
+
const result = extractParams("procaptcha");
|
|
52
|
+
expect(result).toEqual({
|
|
53
|
+
onloadUrlCallback: "onloadCallback",
|
|
54
|
+
renderExplicit: undefined,
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
it("should handle scripts without query parameters", () => {
|
|
58
|
+
const script = document.createElement("script");
|
|
59
|
+
script.src = "https://example.com/procaptcha.js";
|
|
60
|
+
document.body.appendChild(script);
|
|
61
|
+
const result = extractParams("procaptcha");
|
|
62
|
+
expect(result).toEqual({
|
|
63
|
+
onloadUrlCallback: undefined,
|
|
64
|
+
renderExplicit: undefined,
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=config.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.test.js","sourceRoot":"","sources":["../../../src/tests/util/config.test.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE1E,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACzC,IAAI,GAAU,CAAC;IAEf,UAAU,CAAC,GAAG,EAAE;QACf,GAAG,GAAG,IAAI,KAAK,CAAC,2CAA2C,EAAE;YAC5D,GAAG,EAAE,qBAAqB;SAC1B,CAAC,CAAC;QACH,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QAEb,MAAc,CAAC,QAAQ,GAAG,SAAS,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,QA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