@prosopo/detector 3.4.47 → 3.5.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/detector@3.4.47 build:cjs
2
+ > @prosopo/detector@3.5.0 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.17s
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/detector@3.4.47 build:tsc
2
+ > @prosopo/detector@3.5.0 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 1:01:19 PM - Projects in this build:
5
+ 7:02:01 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
+ 7:02:01 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
+ 7:02:01 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
+ 7:02:01 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/version.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
+ 7:02:01 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
+ 7:02:01 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
+ 7:02:01 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
+ 7:02:01 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.0 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.0 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.28s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # @prosopo/detector
2
2
 
3
+ ## 3.5.0
4
+ ### Minor Changes
5
+
6
+ - 12cd0a6: Replace client-side weighted-random provider selection with static DNS endpoints.
7
+
8
+ - Removed the `providerSelectEntropy` field from `DetectorResult`, `Session`, the
9
+ Mongoose `SessionRecordSchema` (including its standalone index), and every
10
+ call-site that threaded it through frictionless / image / pow / puzzle flows.
11
+ - Removed `FrictionlessManager.hostVerified` and its decision-machine call site
12
+ — there's nothing to verify when the DNS layer picks the host.
13
+ - `getRandomActiveProvider(env)` now returns the per-environment static DNS
14
+ endpoint (`pronode.prosopo.io` family) instead of fetching the provider list
15
+ and weighted-selecting. The entropy parameter is gone.
16
+ - `getProcaptchaRandomActiveProvider` is now a thin re-export so widget packages
17
+ keep importing from `procaptcha-common`.
18
+ - `FrontendProvider.datasetId` is dropped; `CaptchaRequestBody.datasetId` is
19
+ optional. The server falls back to its own most-recently-uploaded dataset
20
+ (`env.datasetId`, populated from `db.getMostRecentDatasetId()` at startup) —
21
+ clients can't pin a dataset under DNS routing because they don't know which
22
+ pronode they'll hit.
23
+ - Removed dead `setProviderLoader` / `prefetchProviders` / `selectWeightedProvider`
24
+ plumbing from `@prosopo/load-balancer`. The server's cacheFile-based loader
25
+ setup in `startProviderApi` goes with them.
26
+ - `getRandomActiveProvider` now hits `/healthz` on the global hostname once per
27
+ page load, reads the responding pronode's identity from the JSON body, and
28
+ pins subsequent captcha calls to that pronode (`https://pronodeN.prosopo.io`)
29
+ so session creation and submission land on the same backend. Falls back to
30
+ the dual-stack global hostname when `/healthz` is unreachable.
31
+ - `/healthz` now returns `{ ok: true, host: <pronode-identity> }` instead of
32
+ `"OK"` to support the above pinning.
33
+ - CORS preflight is now cached for 24h (`maxAge: 86400`) — previously the
34
+ browser refired an OPTIONS preflight before every captcha call because
35
+ the custom `Prosopo-Site-Key` / `Prosopo-User` headers make the request
36
+ non-simple and the default `maxAge` is 5s.
37
+
38
+ ### Patch Changes
39
+
40
+ - Updated dependencies [12cd0a6]
41
+ - Updated dependencies [12cd0a6]
42
+ - @prosopo/types@4.8.0
43
+
3
44
  ## 3.4.47
4
45
  ### Patch Changes
5
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/detector",
3
- "version": "3.4.47",
3
+ "version": "3.5.0",
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.8.0",
28
28
  "dotenv": "16.4.5"
29
29
  },
30
30
  "devDependencies": {
31
- "@prosopo/config": "3.3.2",
31
+ "@prosopo/config": "3.3.3",
32
32
  "@types/node": "22.10.2",
33
33
  "@vitest/coverage-v8": "3.2.4",
34
34
  "concurrently": "9.0.1",