@prosopo/procaptcha-frictionless 2.8.22 → 2.8.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/procaptcha-frictionless@2.8.22 build:cjs
2
+ > @prosopo/procaptcha-frictionless@2.8.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: .
@@ -62,6 +62,6 @@ Build end
62
62
  rendering chunks...
63
63
  dist/cjs/index.cjs 0.24 kB
64
64
  dist/cjs/detectorLoader.cjs 1.37 kB
65
- dist/cjs/customDetectBot.cjs 2.11 kB
66
- dist/cjs/ProcaptchaFrictionless.cjs 4.98 kB
67
- ✓ built in 143ms
65
+ dist/cjs/customDetectBot.cjs 2.52 kB
66
+ dist/cjs/ProcaptchaFrictionless.cjs 5.27 kB
67
+ ✓ built in 122ms
@@ -0,0 +1,77 @@
1
+
2
+ > @prosopo/procaptcha-frictionless@2.8.31 build:tsc
3
+ > tsc --build --verbose
4
+
5
+ 4:57:40 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
+ * ../detector/tsconfig.json
12
+ * ../common/tsconfig.json
13
+ * ../load-balancer/tsconfig.json
14
+ * ../api/tsconfig.json
15
+ * ../widget-skeleton/tsconfig.json
16
+ * ../fingerprint/tsconfig.json
17
+ * ../keyring/tsconfig.json
18
+ * ../account/tsconfig.json
19
+ * ../procaptcha-common/tsconfig.json
20
+ * ../procaptcha-pow/tsconfig.json
21
+ * ../api-route/tsconfig.json
22
+ * ../redis-client/tsconfig.json
23
+ * ../user-access-policy/tsconfig.json
24
+ * ../types-database/tsconfig.json
25
+ * ../datasets/tsconfig.json
26
+ * ../procaptcha/tsconfig.json
27
+ * ../procaptcha-react/tsconfig.json
28
+ * tsconfig.json
29
+
30
+ 4:57:40 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'
31
+
32
+ 4:57:40 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
33
+
34
+ 4:57:40 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/verifyRecency.ts' is older than output '../util/tsconfig.tsbuildinfo'
35
+
36
+ 4:57:40 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'
37
+
38
+ 4:57:40 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
39
+
40
+ 4:57:40 PM - Project '../detector/tsconfig.json' is up to date because newest input '../detector/src/index.js' is older than output '../detector/tsconfig.tsbuildinfo'
41
+
42
+ 4:57:40 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:40 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'
45
+
46
+ 4:57:40 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
47
+
48
+ 4:57:40 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'
49
+
50
+ 4:57:40 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
51
+
52
+ 4:57:40 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
53
+
54
+ 4:57:40 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
+
56
+ 4:57:40 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'
57
+
58
+ 4:57:40 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'
59
+
60
+ 4:57:40 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'
61
+
62
+ 4:57:40 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'
63
+
64
+ 4:57:40 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'
65
+
66
+ 4:57:40 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'
67
+
68
+ 4:57:40 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'
69
+
70
+ 4:57:40 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/index.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
71
+
72
+ 4:57:41 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'
73
+
74
+ 4:57:41 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
75
+
76
+ 4:57:41 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
77
+
@@ -1,6 +1,10 @@
1
1
 
2
- > @prosopo/procaptcha-frictionless@2.8.22 build
3
- > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.esm.config.ts --mode $NODE_ENV
2
+ > @prosopo/procaptcha-frictionless@2.8.31 build
3
+ > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
+
5
+
6
+ > @prosopo/procaptcha-frictionless@2.8.31 build:cross-env
7
+ > vite build --config vite.esm.config.ts --mode production
4
8
 
5
9
  ViteEsmConfig: .
6
10
  {
@@ -61,6 +65,6 @@ Build end
61
65
  rendering chunks...
62
66
  dist/index.js 0.11 kB
63
67
  dist/detectorLoader.js 0.11 kB
64
- dist/customDetectBot.js 1.93 kB
65
- dist/ProcaptchaFrictionless.js 4.74 kB
66
- ✓ built in 187ms
68
+ dist/customDetectBot.js 2.34 kB
69
+ dist/ProcaptchaFrictionless.js 5.02 kB
70
+ ✓ built in 223ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,107 @@
1
1
  # @prosopo/procaptcha-frictionless
2
2
 
3
+ ## 2.8.31
4
+ ### Patch Changes
5
+
6
+ - 0a38892: feat/cross-os-testing
7
+ - a8faa9a: bump license year
8
+ - 7543d17: mouse movements bot stopping
9
+ - 3acc333: Release 3.3.0
10
+ - Updated dependencies [a53526b]
11
+ - Updated dependencies [f3cf586]
12
+ - Updated dependencies [3acc333]
13
+ - Updated dependencies [3acc333]
14
+ - Updated dependencies [3acc333]
15
+ - Updated dependencies [0a38892]
16
+ - Updated dependencies [1ee3d80]
17
+ - Updated dependencies [a8faa9a]
18
+ - Updated dependencies [6a4d57d]
19
+ - Updated dependencies [7543d17]
20
+ - Updated dependencies [fe9fe22]
21
+ - Updated dependencies [3acc333]
22
+ - Updated dependencies [4ac7ef0]
23
+ - @prosopo/procaptcha-pow@2.8.31
24
+ - @prosopo/procaptcha-common@2.9.23
25
+ - @prosopo/detector@3.4.0
26
+ - @prosopo/types@3.8.0
27
+ - @prosopo/procaptcha-react@2.9.27
28
+ - @prosopo/widget-skeleton@2.7.13
29
+ - @prosopo/load-balancer@2.8.17
30
+ - @prosopo/common@3.1.28
31
+ - @prosopo/locale@3.1.28
32
+ - @prosopo/api@3.1.41
33
+
34
+ ## 2.8.30
35
+ ### Patch Changes
36
+
37
+ - @prosopo/procaptcha-react@2.9.26
38
+
39
+ ## 2.8.29
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [c6faa77]
43
+ - @prosopo/detector@3.3.24
44
+
45
+ ## 2.8.28
46
+ ### Patch Changes
47
+
48
+ - @prosopo/procaptcha-react@2.9.25
49
+
50
+ ## 2.8.27
51
+ ### Patch Changes
52
+
53
+ - caf53e2: Async user creation
54
+ - Updated dependencies [caf53e2]
55
+ - @prosopo/detector@3.3.23
56
+
57
+ ## 2.8.26
58
+ ### Patch Changes
59
+
60
+ - Updated dependencies [ea5f1f8]
61
+ - @prosopo/detector@3.3.22
62
+
63
+ ## 2.8.25
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies [141e462]
67
+ - @prosopo/procaptcha-pow@2.8.30
68
+ - @prosopo/types@3.7.2
69
+ - @prosopo/api@3.1.40
70
+ - @prosopo/detector@3.3.21
71
+ - @prosopo/load-balancer@2.8.16
72
+ - @prosopo/procaptcha-common@2.9.22
73
+ - @prosopo/procaptcha-react@2.9.24
74
+
75
+ ## 2.8.24
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [345b25b]
79
+ - @prosopo/procaptcha-pow@2.8.29
80
+ - @prosopo/types@3.7.1
81
+ - @prosopo/api@3.1.39
82
+ - @prosopo/detector@3.3.20
83
+ - @prosopo/load-balancer@2.8.15
84
+ - @prosopo/procaptcha-common@2.9.21
85
+ - @prosopo/procaptcha-react@2.9.23
86
+
87
+ ## 2.8.23
88
+ ### Patch Changes
89
+
90
+ - Updated dependencies [ce70a2b]
91
+ - Updated dependencies [c2b940f]
92
+ - Updated dependencies [5ad6f48]
93
+ - Updated dependencies [f6b5094]
94
+ - Updated dependencies [e01227b]
95
+ - @prosopo/types@3.7.0
96
+ - @prosopo/detector@3.3.19
97
+ - @prosopo/locale@3.1.27
98
+ - @prosopo/api@3.1.38
99
+ - @prosopo/common@3.1.27
100
+ - @prosopo/load-balancer@2.8.14
101
+ - @prosopo/procaptcha-common@2.9.20
102
+ - @prosopo/procaptcha-pow@2.8.28
103
+ - @prosopo/procaptcha-react@2.9.22
104
+
3
105
  ## 2.8.22
4
106
  ### Patch Changes
5
107
 
@@ -0,0 +1,3 @@
1
+ import { type ProcaptchaFrictionlessProps } from "@prosopo/types";
2
+ export declare const ProcaptchaFrictionless: ({ config, callbacks, restart, i18n, detectBot, container, }: ProcaptchaFrictionlessProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=ProcaptchaFrictionless.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcaptchaFrictionless.d.ts","sourceRoot":"","sources":["../src/ProcaptchaFrictionless.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAIN,KAAK,2BAA2B,EAChC,MAAM,gBAAgB,CAAC;AA6CxB,eAAO,MAAM,sBAAsB,gEAOhC,2BAA2B,mDAgJ7B,CAAC"}
@@ -113,8 +113,13 @@ const ProcaptchaFrictionless = ({
113
113
  provider: result.provider,
114
114
  sessionId: result.sessionId,
115
115
  userAccount: result.userAccount,
116
- restart
116
+ restart,
117
117
  // Pass restart function
118
+ behaviorCollector1: result.behaviorCollector1,
119
+ behaviorCollector2: result.behaviorCollector2,
120
+ behaviorCollector3: result.behaviorCollector3,
121
+ deviceCapability: result.deviceCapability,
122
+ encryptBehavioralData: result.encryptBehavioralData
118
123
  };
119
124
  if (result.captchaType === "image") {
120
125
  setComponentToRender(
@@ -0,0 +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,gBAAgB,EAChB,aAAa,GAC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AAuB,EAAE,CAAC;YAC3B,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;IAGF,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,qBAAqB,GAAG,KAAK,IAAI,EAAE;YACxC,MAAM,KAAK,EAAE,CAAC;QACf,CAAC,CAAC;QAEF,qBAAqB,EAAE,CAAC;IACzB,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEpD,OAAO,iBAAiB,CAAC;AAC1B,CAAC,CAAC"}
@@ -115,8 +115,13 @@ const ProcaptchaFrictionless = ({
115
115
  provider: result.provider,
116
116
  sessionId: result.sessionId,
117
117
  userAccount: result.userAccount,
118
- restart
118
+ restart,
119
119
  // Pass restart function
120
+ behaviorCollector1: result.behaviorCollector1,
121
+ behaviorCollector2: result.behaviorCollector2,
122
+ behaviorCollector3: result.behaviorCollector3,
123
+ deviceCapability: result.deviceCapability,
124
+ encryptBehavioralData: result.encryptBehavioralData
120
125
  };
121
126
  if (result.captchaType === "image") {
122
127
  setComponentToRender(
@@ -27,15 +27,15 @@ const withTimeout = async (promise, ms) => {
27
27
  };
28
28
  const customDetectBot = async (config, container, restartFn) => {
29
29
  const ext = new (await procaptchaCommon.ExtensionLoader(config.web2))();
30
- const userAccount = await ext.getAccount(config);
31
30
  const detect = await detectorLoader.DetectorLoader();
32
31
  const detectionResult = await detect(
33
32
  config.defaultEnvironment,
34
33
  loadBalancer.getRandomActiveProvider,
35
34
  container,
36
35
  restartFn,
37
- userAccount.account.address
36
+ () => ext.getAccount(config)
38
37
  );
38
+ const userAccount = detectionResult.userAccount;
39
39
  if (!config.account.address) {
40
40
  throw new common.ProsopoEnvError("GENERAL.SITE_KEY_MISSING");
41
41
  }
@@ -63,7 +63,14 @@ const customDetectBot = async (config, container, restartFn) => {
63
63
  provider,
64
64
  status: captcha.status,
65
65
  userAccount,
66
- error: captcha.error
66
+ error: captcha.error,
67
+ // Map specific trackers to generic behavioral collectors
68
+ behaviorCollector1: detectionResult.mouseTracker,
69
+ behaviorCollector2: detectionResult.touchTracker,
70
+ behaviorCollector3: detectionResult.clickTracker,
71
+ deviceCapability: detectionResult.hasTouchSupport,
72
+ encryptBehavioralData: detectionResult.encryptBehavioralData,
73
+ packBehavioralData: detectionResult.packBehavioralData
67
74
  };
68
75
  };
69
76
  exports.default = customDetectBot;
@@ -0,0 +1,5 @@
1
+ import type { BotDetectionFunction } from "@prosopo/types";
2
+ export declare const withTimeout: <T>(promise: Promise<T>, ms: number) => Promise<T>;
3
+ declare const customDetectBot: BotDetectionFunction;
4
+ export default customDetectBot;
5
+ //# sourceMappingURL=customDetectBot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customDetectBot.d.ts","sourceRoot":"","sources":["../src/customDetectBot.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACX,oBAAoB,EAEpB,MAAM,gBAAgB,CAAC;AAIxB,eAAO,MAAM,WAAW,GAAU,CAAC,WACzB,OAAO,CAAC,CAAC,CAAC,MACf,MAAM,KACR,OAAO,CAAC,CAAC,CAoBX,CAAC;AAEF,QAAA,MAAM,eAAe,EAAE,oBA4DtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -25,15 +25,15 @@ const withTimeout = async (promise, ms) => {
25
25
  };
26
26
  const customDetectBot = async (config, container, restartFn) => {
27
27
  const ext = new (await ExtensionLoader(config.web2))();
28
- const userAccount = await ext.getAccount(config);
29
28
  const detect = await DetectorLoader();
30
29
  const detectionResult = await detect(
31
30
  config.defaultEnvironment,
32
31
  getRandomActiveProvider,
33
32
  container,
34
33
  restartFn,
35
- userAccount.account.address
34
+ () => ext.getAccount(config)
36
35
  );
36
+ const userAccount = detectionResult.userAccount;
37
37
  if (!config.account.address) {
38
38
  throw new ProsopoEnvError("GENERAL.SITE_KEY_MISSING");
39
39
  }
@@ -61,7 +61,14 @@ const customDetectBot = async (config, container, restartFn) => {
61
61
  provider,
62
62
  status: captcha.status,
63
63
  userAccount,
64
- error: captcha.error
64
+ error: captcha.error,
65
+ // Map specific trackers to generic behavioral collectors
66
+ behaviorCollector1: detectionResult.mouseTracker,
67
+ behaviorCollector2: detectionResult.touchTracker,
68
+ behaviorCollector3: detectionResult.clickTracker,
69
+ deviceCapability: detectionResult.hasTouchSupport,
70
+ encryptBehavioralData: detectionResult.encryptBehavioralData,
71
+ packBehavioralData: detectionResult.packBehavioralData
65
72
  };
66
73
  };
67
74
  export {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customDetectBot.js","sourceRoot":"","sources":["../src/customDetectBot.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAM7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAC/B,OAAmB,EACnB,EAAU,EACG,EAAE;IACf,IAAI,SAAqC,CAAC;IAC1C,MAAM,cAAc,GAAG,IAAI,OAAO,CAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE;QACvD,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;YAC3B,MAAM,CAAC,IAAI,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC;QAC5C,CAAC,EAAE,EAAE,CAAC,CAAC;IACR,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;QAC7D,IAAI,SAAS,EAAE,CAAC;YACf,YAAY,CAAC,SAAS,CAAC,CAAC;QACzB,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IA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WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,WAAW,EAAE,WAAW;QACxB,KAAK,EAAE,OAAO,CAAC,KAAK;QAEpB,kBAAkB,EAAE,eAAe,CAAC,YAAY;QAChD,kBAAkB,EAAE,eAAe,CAAC,YAAY;QAChD,kBAAkB,EAAE,eAAe,CAAC,YAAY;QAChD,gBAAgB,EAAE,eAAe,CAAC,eAAe;QACjD,qBAAqB,EAAE,eAAe,CAAC,qBAAqB;QAC5D,kBAAkB,EAAE,eAAe,CAAC,kBAAkB;KACtD,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ type DetectorType = typeof import("@prosopo/detector").default;
2
+ export declare const DetectorLoader: () => Promise<DetectorType>;
3
+ export {};
4
+ //# sourceMappingURL=detectorLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detectorLoader.d.ts","sourceRoot":"","sources":["../src/detectorLoader.ts"],"names":[],"mappings":"AAcA,KAAK,YAAY,GAAG,cAAc,mBAAmB,EAAE,OAAO,CAAC;AAE/D,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC,YAAY,CAChB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detectorLoader.js","sourceRoot":"","sources":["../src/detectorLoader.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,IAA2B,EAAE,CAC/D,CAAC,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./ProcaptchaFrictionless.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=customDetectBot.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customDetectBot.test.d.ts","sourceRoot":"","sources":["../../src/tests/customDetectBot.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
1
+ import { ProsopoEnvError } from "@prosopo/common";
2
+ import { describe, expect, it, vi } from "vitest";
3
+ import { withTimeout } from "../customDetectBot.js";
4
+ describe("withTimeout", () => {
5
+ it("should resolve with the promise result when promise resolves before timeout", async () => {
6
+ const result = "success";
7
+ const promise = Promise.resolve(result);
8
+ const response = await withTimeout(promise, 1000);
9
+ expect(response).toBe(result);
10
+ });
11
+ it("should reject with original error when promise rejects before timeout", async () => {
12
+ const errorMessage = "Original error";
13
+ const promise = Promise.reject(new Error(errorMessage));
14
+ await expect(withTimeout(promise, 1000)).rejects.toThrow(errorMessage);
15
+ });
16
+ it("should reject with timeout error when promise does not resolve within the timeout", async () => {
17
+ const promise = new Promise((resolve) => {
18
+ setTimeout(resolve, 500);
19
+ });
20
+ vi.useFakeTimers();
21
+ const timeoutPromise = withTimeout(promise, 100);
22
+ vi.advanceTimersByTime(200);
23
+ await expect(timeoutPromise).rejects.toThrow(ProsopoEnvError);
24
+ await expect(timeoutPromise).rejects.toEqual(expect.objectContaining({
25
+ message: "API.UNKNOWN",
26
+ translationKey: "API.UNKNOWN",
27
+ }));
28
+ vi.useRealTimers();
29
+ });
30
+ it("should respect the provided timeout duration", async () => {
31
+ vi.useFakeTimers();
32
+ const fastResolve = Promise.resolve("success");
33
+ const fastResult = withTimeout(fastResolve, 1000);
34
+ const slowPromise = new Promise((resolve) => {
35
+ setTimeout(() => resolve("slow"), 2000);
36
+ });
37
+ const slowWithTimeout = withTimeout(slowPromise, 1000);
38
+ vi.advanceTimersByTime(500);
39
+ expect(await fastResult).toBe("success");
40
+ vi.advanceTimersByTime(600);
41
+ await expect(slowWithTimeout).rejects.toThrow(ProsopoEnvError);
42
+ vi.useRealTimers();
43
+ });
44
+ });
45
+ //# sourceMappingURL=customDetectBot.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customDetectBot.test.js","sourceRoot":"","sources":["../../src/tests/customDetectBot.test.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,6EAA6E,EAAE,KAAK,IAAI,EAAE;QAC5F,MAAM,MAAM,GAAG,SAAS,CAAC;QACzB,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAExC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAElD,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uEAAuE,EAAE,KAAK,IAAI,EAAE;QACtF,MAAM,YAAY,GAAG,gBAAgB,CAAC;QACtC,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;QAExD,MAAM,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mFAAmF,EAAE,KAAK,IAAI,EAAE;QAClG,MAAM,OAAO,GAAG,IAAI,OAAO,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AAC,eAAe,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAE/D,EAAE,CAAC,aAAa,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/procaptcha-frictionless",
3
- "version": "2.8.22",
3
+ "version": "2.8.31",
4
4
  "author": "PROSOPO LIMITED <info@prosopo.io>",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -22,28 +22,29 @@
22
22
  "scripts": {
23
23
  "clean": "del-cli --verbose dist tsconfig.tsbuildinfo",
24
24
  "test": "NODE_ENV=${NODE_ENV:-test}; npx vitest run --config ./vite.test.config.ts",
25
- "build": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.esm.config.ts --mode $NODE_ENV",
25
+ "build": "npm run build:cross-env -- --mode ${NODE_ENV:-development}",
26
+ "build:cross-env": "vite build --config vite.esm.config.ts",
26
27
  "build:tsc": "tsc --build --verbose",
27
28
  "build:cjs": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV",
28
29
  "typecheck": "tsc --project tsconfig.types.json"
29
30
  },
30
31
  "browserslist": ["> 0.5%, last 2 versions, not dead"],
31
32
  "dependencies": {
32
- "@prosopo/api": "3.1.37",
33
- "@prosopo/common": "3.1.26",
34
- "@prosopo/detector": "3.3.18",
35
- "@prosopo/load-balancer": "2.8.13",
36
- "@prosopo/locale": "3.1.26",
37
- "@prosopo/procaptcha-common": "2.9.19",
38
- "@prosopo/procaptcha-pow": "2.8.27",
39
- "@prosopo/procaptcha-react": "2.9.21",
40
- "@prosopo/types": "3.6.4",
41
- "@prosopo/widget-skeleton": "2.7.12",
33
+ "@prosopo/api": "3.1.41",
34
+ "@prosopo/common": "3.1.28",
35
+ "@prosopo/detector": "3.4.0",
36
+ "@prosopo/load-balancer": "2.8.17",
37
+ "@prosopo/locale": "3.1.28",
38
+ "@prosopo/procaptcha-common": "2.9.23",
39
+ "@prosopo/procaptcha-pow": "2.8.31",
40
+ "@prosopo/procaptcha-react": "2.9.27",
41
+ "@prosopo/types": "3.8.0",
42
+ "@prosopo/widget-skeleton": "2.7.13",
42
43
  "dotenv": "16.4.5",
43
44
  "react": "18.3.1"
44
45
  },
45
46
  "devDependencies": {
46
- "@prosopo/config": "3.1.26",
47
+ "@prosopo/config": "3.3.0",
47
48
  "@types/node": "22.10.2",
48
49
  "@vitest/coverage-v8": "3.2.4",
49
50
  "concurrently": "9.0.1",
@@ -1,5 +1,5 @@
1
1
  import path from "node:path";
2
- // Copyright 2021-2025 Prosopo (UK) Ltd.
2
+ // Copyright 2021-2026 Prosopo (UK) Ltd.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2021-2025 Prosopo (UK) Ltd.
1
+ // Copyright 2021-2026 Prosopo (UK) Ltd.
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
- // Copyright 2021-2025 Prosopo (UK) Ltd.
3
+ // Copyright 2021-2026 Prosopo (UK) Ltd.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License");
6
6
  // you may not use this file except in compliance with the License.