@prosopo/procaptcha-frictionless 2.11.7 → 2.11.9

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.11.7 build:cjs
2
+ > @prosopo/procaptcha-frictionless@2.11.9 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -61,5 +61,5 @@ rendering chunks...
61
61
  dist/cjs/index.cjs 0.24 kB
62
62
  dist/cjs/detectorLoader.cjs 1.37 kB
63
63
  dist/cjs/customDetectBot.cjs 3.44 kB
64
- dist/cjs/ProcaptchaFrictionless.cjs 7.87 kB
65
- ✓ built in 113ms
64
+ dist/cjs/ProcaptchaFrictionless.cjs 7.98 kB
65
+ ✓ built in 114ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/procaptcha-frictionless@2.11.7 build:tsc
2
+ > @prosopo/procaptcha-frictionless@2.11.9 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 12:06:27 PM - Projects in this build:
5
+ 2:10:42 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -26,49 +26,49 @@
26
26
  * ../procaptcha-react/tsconfig.json
27
27
  * tsconfig.json
28
28
 
29
- 12:06:27 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/NodejsPolarsNativeFilePlugin.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
29
+ 2:10:42 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'
30
30
 
31
- 12:06:27 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
31
+ 2:10:42 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
32
32
 
33
- 12:06:27 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
33
+ 2:10:42 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
34
34
 
35
- 12:06:27 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
+ 2:10:42 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'
36
36
 
37
- 12:06:27 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/keyring/keyring/types.ts' is older than output '../types/tsconfig.tsbuildinfo'
37
+ 2:10:42 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
38
38
 
39
- 12:06:27 PM - Project '../detector/tsconfig.json' is up to date because newest input '../detector/src/index.js' is older than output '../detector/tsconfig.tsbuildinfo'
39
+ 2:10:42 PM - Project '../detector/tsconfig.json' is up to date because newest input '../detector/src/index.js' is older than output '../detector/tsconfig.tsbuildinfo'
40
40
 
41
- 12:06:27 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/logger.ts' is older than output '../logger/tsconfig.tsbuildinfo'
41
+ 2:10:42 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
42
42
 
43
- 12:06:27 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/error.ts' is older than output '../common/tsconfig.tsbuildinfo'
43
+ 2:10:42 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
44
44
 
45
- 12:06:27 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
+ 2:10:42 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'
46
46
 
47
- 12:06:27 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
47
+ 2:10:42 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
48
48
 
49
- 12:06:27 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/async.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
49
+ 2:10:42 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
50
50
 
51
- 12:06:27 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
51
+ 2:10:42 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/merkle.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
52
52
 
53
- 12:06:27 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/webComponent/createWidget.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
53
+ 2:10:42 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'
54
54
 
55
- 12:06:27 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/keyring/keyring.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
55
+ 2:10:42 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
56
56
 
57
- 12:06:27 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/tsconfig.tsbuildinfo'
57
+ 2:10:42 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/tsconfig.tsbuildinfo'
58
58
 
59
- 12:06:27 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/tests/defaultEvents.test.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
59
+ 2:10:42 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/tests/defaultEvents.test.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
60
60
 
61
- 12:06:27 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'
61
+ 2:10:42 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'
62
62
 
63
- 12:06:27 PM - Project '../procaptcha-puzzle/tsconfig.json' is up to date because newest input '../procaptcha-puzzle/src/index.ts' is older than output '../procaptcha-puzzle/tsconfig.tsbuildinfo'
63
+ 2:10:42 PM - Project '../procaptcha-puzzle/tsconfig.json' is up to date because newest input '../procaptcha-puzzle/src/index.ts' is older than output '../procaptcha-puzzle/tsconfig.tsbuildinfo'
64
64
 
65
- 12:06:27 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
65
+ 2:10:42 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'
66
66
 
67
- 12:06:27 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/index.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
67
+ 2:10:42 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/modules/Manager.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
68
68
 
69
- 12:06:27 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'
69
+ 2:10:42 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'
70
70
 
71
- 12:06:27 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
71
+ 2:10:42 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
72
72
 
73
- 12:06:27 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
73
+ 2:10:42 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
74
74
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/procaptcha-frictionless@2.11.7 build
2
+ > @prosopo/procaptcha-frictionless@2.11.9 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/procaptcha-frictionless@2.11.7 build:cross-env
6
+ > @prosopo/procaptcha-frictionless@2.11.9 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -64,5 +64,5 @@ rendering chunks...
64
64
  dist/index.js 0.11 kB
65
65
  dist/detectorLoader.js 0.11 kB
66
66
  dist/customDetectBot.js 3.26 kB
67
- dist/ProcaptchaFrictionless.js 6.48 kB
68
- ✓ built in 179ms
67
+ dist/ProcaptchaFrictionless.js 6.59 kB
68
+ ✓ built in 158ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @prosopo/procaptcha-frictionless
2
2
 
3
+ ## 2.11.9
4
+ ### Patch Changes
5
+
6
+ - Updated dependencies [edcd450]
7
+ - Updated dependencies [5295c4b]
8
+ - @prosopo/types@4.7.2
9
+ - @prosopo/locale@3.2.5
10
+ - @prosopo/procaptcha-pow@2.10.2
11
+ - @prosopo/procaptcha-puzzle@2.10.17
12
+ - @prosopo/procaptcha-react@2.9.75
13
+ - @prosopo/api@3.5.2
14
+ - @prosopo/common@3.1.40
15
+ - @prosopo/detector@3.4.45
16
+ - @prosopo/load-balancer@2.9.19
17
+ - @prosopo/procaptcha-common@2.10.26
18
+
19
+ ## 2.11.8
20
+ ### Patch Changes
21
+
22
+ - 46fedf4: Auto-start image/puzzle widget after PoW escalation so the user does not need to click the checkbox a second time.
23
+ - Updated dependencies [46fedf4]
24
+ - @prosopo/procaptcha-react@2.9.74
25
+ - @prosopo/procaptcha-puzzle@2.10.16
26
+ - @prosopo/types@4.7.1
27
+ - @prosopo/api@3.5.1
28
+ - @prosopo/detector@3.4.44
29
+ - @prosopo/load-balancer@2.9.18
30
+ - @prosopo/procaptcha-common@2.10.25
31
+ - @prosopo/procaptcha-pow@2.10.1
32
+
3
33
  ## 2.11.7
4
34
  ### Patch Changes
5
35
 
@@ -1 +1 @@
1
- {"version":3,"file":"ProcaptchaFrictionless.d.ts","sourceRoot":"","sources":["../src/ProcaptchaFrictionless.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAKN,KAAK,2BAA2B,EAChC,MAAM,gBAAgB,CAAC;AAqDxB,eAAO,MAAM,sBAAsB,gEAOhC,2BAA2B,4CAqM7B,CAAC"}
1
+ {"version":3,"file":"ProcaptchaFrictionless.d.ts","sourceRoot":"","sources":["../src/ProcaptchaFrictionless.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAKN,KAAK,2BAA2B,EAChC,MAAM,gBAAgB,CAAC;AAqDxB,eAAO,MAAM,sBAAsB,gEAOhC,2BAA2B,4CA4M7B,CAAC"}
@@ -94,12 +94,16 @@ const ProcaptchaFrictionless = ({
94
94
  restart();
95
95
  }, 1e4);
96
96
  };
97
- const renderForCaptchaType = async (captchaType, frictionlessState) => {
97
+ const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false) => {
98
98
  const onEscalate = (next, newSessionId) => {
99
- void renderForCaptchaType(next, {
100
- ...frictionlessState,
101
- sessionId: newSessionId
102
- });
99
+ void renderForCaptchaType(
100
+ next,
101
+ {
102
+ ...frictionlessState,
103
+ sessionId: newSessionId
104
+ },
105
+ true
106
+ );
103
107
  };
104
108
  if (captchaType === CaptchaType.image) {
105
109
  const Procaptcha = await ProcaptchaLoader();
@@ -110,7 +114,8 @@ const ProcaptchaFrictionless = ({
110
114
  config,
111
115
  callbacks,
112
116
  frictionlessState,
113
- i18n
117
+ i18n,
118
+ autoStart
114
119
  }
115
120
  )
116
121
  );
@@ -123,7 +128,8 @@ const ProcaptchaFrictionless = ({
123
128
  config,
124
129
  callbacks,
125
130
  frictionlessState,
126
- i18n
131
+ i18n,
132
+ autoStart
127
133
  }
128
134
  )
129
135
  );
@@ -1 +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,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,WAAW,EAGX,sBAAsB,GAEtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAGnD,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE,CACnC,CAAC,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC,CAAC,UAAU,CAAC;AACxD,MAAM,sBAAsB,GAAG,KAAK,IAAI,EAAE,C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C,kBAAkB;gBAC7C,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;gBAC7C,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;gBAC7C,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;gBACzC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB;gBACnD,eAAe,EAAE,MAAM,CAAC,eAAe;gBACvC,EAAE,EAAE,MAAM,CAAC,EAAE;aACb,CAAC;YAEF,MAAM,oBAAoB,CAAC,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;YAElE,QAAQ,CAAC,OAAO,GAAG;gBAClB,GAAG,QAAQ,CAAC,OAAO;gBACnB,OAAO,EAAE,KAAK;aACd,CAAC;QACH,CAAC,EACD,KAAK,EACL,UAAU,EACV,QAAQ,CAAC,OAAO,CAAC,YAAY,EAC7B,CAAC,CACD,CAAC,OAAO,CAAC,GAAG,EAAE;YACd,IAAI,QAAQ,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,EAAE,CAAC;gBACxC,iBAAiB,EAAE,CAAC;gBACpB,uBAAuB,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,CACN,8BACC,KAAC,cAAc,IAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,GAAI,EACzD,iBAAiB,IAChB,CACH,CAAC;AACH,CAAC,CAAC"}
@@ -118,12 +118,16 @@ const ProcaptchaFrictionless = ({
118
118
  restart();
119
119
  }, 1e4);
120
120
  };
121
- const renderForCaptchaType = async (captchaType, frictionlessState) => {
121
+ const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false) => {
122
122
  const onEscalate = (next, newSessionId) => {
123
- void renderForCaptchaType(next, {
124
- ...frictionlessState,
125
- sessionId: newSessionId
126
- });
123
+ void renderForCaptchaType(
124
+ next,
125
+ {
126
+ ...frictionlessState,
127
+ sessionId: newSessionId
128
+ },
129
+ true
130
+ );
127
131
  };
128
132
  if (captchaType === types.CaptchaType.image) {
129
133
  const Procaptcha = await ProcaptchaLoader();
@@ -134,7 +138,8 @@ const ProcaptchaFrictionless = ({
134
138
  config,
135
139
  callbacks,
136
140
  frictionlessState,
137
- i18n
141
+ i18n,
142
+ autoStart
138
143
  }
139
144
  )
140
145
  );
@@ -147,7 +152,8 @@ const ProcaptchaFrictionless = ({
147
152
  config,
148
153
  callbacks,
149
154
  frictionlessState,
150
- i18n
155
+ i18n,
156
+ autoStart
151
157
  }
152
158
  )
153
159
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/procaptcha-frictionless",
3
- "version": "2.11.7",
3
+ "version": "2.11.9",
4
4
  "author": "PROSOPO LIMITED <info@prosopo.io>",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -30,16 +30,16 @@
30
30
  },
31
31
  "browserslist": ["> 0.5%, last 2 versions, not dead"],
32
32
  "dependencies": {
33
- "@prosopo/api": "3.5.0",
34
- "@prosopo/common": "3.1.39",
35
- "@prosopo/detector": "3.4.43",
36
- "@prosopo/load-balancer": "2.9.17",
37
- "@prosopo/locale": "3.2.4",
38
- "@prosopo/procaptcha-common": "2.10.24",
39
- "@prosopo/procaptcha-pow": "2.10.0",
40
- "@prosopo/procaptcha-puzzle": "2.10.15",
41
- "@prosopo/procaptcha-react": "2.9.73",
42
- "@prosopo/types": "4.7.0",
33
+ "@prosopo/api": "3.5.2",
34
+ "@prosopo/common": "3.1.40",
35
+ "@prosopo/detector": "3.4.45",
36
+ "@prosopo/load-balancer": "2.9.19",
37
+ "@prosopo/locale": "3.2.5",
38
+ "@prosopo/procaptcha-common": "2.10.26",
39
+ "@prosopo/procaptcha-pow": "2.10.2",
40
+ "@prosopo/procaptcha-puzzle": "2.10.17",
41
+ "@prosopo/procaptcha-react": "2.9.75",
42
+ "@prosopo/types": "4.7.2",
43
43
  "@prosopo/widget-skeleton": "2.8.3",
44
44
  "dotenv": "16.4.5",
45
45
  "react": "18.3.1"
@@ -159,15 +159,20 @@ export const ProcaptchaFrictionless = ({
159
159
  const renderForCaptchaType = async (
160
160
  captchaType: string,
161
161
  frictionlessState: FrictionlessState,
162
+ autoStart = false,
162
163
  ) => {
163
164
  const onEscalate = (
164
165
  next: CaptchaType.image | CaptchaType.puzzle,
165
166
  newSessionId: string,
166
167
  ) => {
167
- void renderForCaptchaType(next, {
168
- ...frictionlessState,
169
- sessionId: newSessionId,
170
- });
168
+ void renderForCaptchaType(
169
+ next,
170
+ {
171
+ ...frictionlessState,
172
+ sessionId: newSessionId,
173
+ },
174
+ true,
175
+ );
171
176
  };
172
177
 
173
178
  if (captchaType === CaptchaType.image) {
@@ -178,6 +183,7 @@ export const ProcaptchaFrictionless = ({
178
183
  callbacks={callbacks}
179
184
  frictionlessState={frictionlessState}
180
185
  i18n={i18n}
186
+ autoStart={autoStart}
181
187
  />,
182
188
  );
183
189
  } else if (captchaType === CaptchaType.puzzle) {
@@ -188,6 +194,7 @@ export const ProcaptchaFrictionless = ({
188
194
  callbacks={callbacks}
189
195
  frictionlessState={frictionlessState}
190
196
  i18n={i18n}
197
+ autoStart={autoStart}
191
198
  />,
192
199
  );
193
200
  } else {