@prosopo/detector 3.4.47 → 3.5.1

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/detector@3.4.47 build:cjs
2
+ > @prosopo/detector@3.5.1 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -27,4 +27,4 @@ Build end
27
27
  Entry module "src/index.js" 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.
28
28
  rendering chunks...
29
29
  dist/cjs/index.cjs 935.80 kB
30
- ✓ built in 1.09s
30
+ ✓ built in 1.20s
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/detector@3.4.47 build:tsc
2
+ > @prosopo/detector@3.5.1 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 1:01:19 PM - Projects in this build:
5
+ 3:24:34 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -10,17 +10,17 @@
10
10
  * ../types/tsconfig.json
11
11
  * tsconfig.json
12
12
 
13
- 1:01:19 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'
13
+ 3:24:34 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
14
14
 
15
- 1:01:19 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
15
+ 3:24:34 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
16
16
 
17
- 1:01:19 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
17
+ 3:24:34 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
18
18
 
19
- 1:01:19 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'
19
+ 3:24:34 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
20
20
 
21
- 1:01:19 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/provider/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
21
+ 3:24:34 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
22
22
 
23
- 1:01:19 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
23
+ 3:24:34 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
24
24
 
25
- 1:01:19 PM - Building project '/home/runner/work/captcha/captcha/packages/detector/tsconfig.json'...
25
+ 3:24:34 PM - Building project '/home/runner/work/captcha/captcha/packages/detector/tsconfig.json'...
26
26
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/detector@3.4.47 build
2
+ > @prosopo/detector@3.5.1 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/detector@3.4.47 build:cross-env
6
+ > @prosopo/detector@3.5.1 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -30,4 +30,4 @@ Build end
30
30
  ✓ 1 modules transformed.
31
31
  rendering chunks...
32
32
  dist/index.js 935.67 kB
33
- ✓ built in 1.24s
33
+ ✓ built in 1.23s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # @prosopo/detector
2
2
 
3
+ ## 3.5.1
4
+ ### Patch Changes
5
+
6
+ - Updated dependencies [b166037]
7
+ - Updated dependencies [1111ff2]
8
+ - @prosopo/types@4.9.0
9
+
10
+ ## 3.5.0
11
+ ### Minor Changes
12
+
13
+ - 12cd0a6: Replace client-side weighted-random provider selection with static DNS endpoints.
14
+
15
+ - Removed the `providerSelectEntropy` field from `DetectorResult`, `Session`, the
16
+ Mongoose `SessionRecordSchema` (including its standalone index), and every
17
+ call-site that threaded it through frictionless / image / pow / puzzle flows.
18
+ - Removed `FrictionlessManager.hostVerified` and its decision-machine call site
19
+ — there's nothing to verify when the DNS layer picks the host.
20
+ - `getRandomActiveProvider(env)` now returns the per-environment static DNS
21
+ endpoint (`pronode.prosopo.io` family) instead of fetching the provider list
22
+ and weighted-selecting. The entropy parameter is gone.
23
+ - `getProcaptchaRandomActiveProvider` is now a thin re-export so widget packages
24
+ keep importing from `procaptcha-common`.
25
+ - `FrontendProvider.datasetId` is dropped; `CaptchaRequestBody.datasetId` is
26
+ optional. The server falls back to its own most-recently-uploaded dataset
27
+ (`env.datasetId`, populated from `db.getMostRecentDatasetId()` at startup) —
28
+ clients can't pin a dataset under DNS routing because they don't know which
29
+ pronode they'll hit.
30
+ - Removed dead `setProviderLoader` / `prefetchProviders` / `selectWeightedProvider`
31
+ plumbing from `@prosopo/load-balancer`. The server's cacheFile-based loader
32
+ setup in `startProviderApi` goes with them.
33
+ - `getRandomActiveProvider` now hits `/healthz` on the global hostname once per
34
+ page load, reads the responding pronode's identity from the JSON body, and
35
+ pins subsequent captcha calls to that pronode (`https://pronodeN.prosopo.io`)
36
+ so session creation and submission land on the same backend. Falls back to
37
+ the dual-stack global hostname when `/healthz` is unreachable.
38
+ - `/healthz` now returns `{ ok: true, host: <pronode-identity> }` instead of
39
+ `"OK"` to support the above pinning.
40
+ - CORS preflight is now cached for 24h (`maxAge: 86400`) — previously the
41
+ browser refired an OPTIONS preflight before every captcha call because
42
+ the custom `Prosopo-Site-Key` / `Prosopo-User` headers make the request
43
+ non-simple and the default `maxAge` is 5s.
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies [12cd0a6]
48
+ - Updated dependencies [12cd0a6]
49
+ - @prosopo/types@4.8.0
50
+
3
51
  ## 3.4.47
4
52
  ### Patch Changes
5
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/detector",
3
- "version": "3.4.47",
3
+ "version": "3.5.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "engines": {
@@ -24,11 +24,11 @@
24
24
  },
25
25
  "type": "module",
26
26
  "dependencies": {
27
- "@prosopo/types": "4.7.4",
27
+ "@prosopo/types": "4.9.0",
28
28
  "dotenv": "16.4.5"
29
29
  },
30
30
  "devDependencies": {
31
- "@prosopo/config": "3.3.2",
31
+ "@prosopo/config": "3.3.4",
32
32
  "@types/node": "22.10.2",
33
33
  "@vitest/coverage-v8": "3.2.4",
34
34
  "concurrently": "9.0.1",