@prosopo/types-env 2.9.29 → 2.10.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/types-env@2.9.29 build:cjs
2
+ > @prosopo/types-env@2.10.0 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
@@ -63,4 +63,4 @@ rendering chunks...
63
63
  dist/cjs/provider.cjs 0.01 kB
64
64
  dist/cjs/ipinfo.cjs 0.01 kB
65
65
  dist/cjs/index.cjs 0.09 kB
66
- ✓ built in 92ms
66
+ ✓ built in 100ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/types-env@2.9.29 build:tsc
2
+ > @prosopo/types-env@2.10.0 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 1:01:53 PM - Projects in this build:
5
+ 7:02:46 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../util/tsconfig.json
8
8
  * ../logger/tsconfig.json
@@ -18,33 +18,33 @@
18
18
  * ../keyring/tsconfig.json
19
19
  * tsconfig.json
20
20
 
21
- 1:01:53 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'
21
+ 7:02:46 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'
22
22
 
23
- 1:01:53 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
23
+ 7:02:46 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/version.ts' is older than output '../util/tsconfig.tsbuildinfo'
24
24
 
25
- 1:01:53 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
25
+ 7:02:46 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
26
26
 
27
- 1:01:53 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
27
+ 7:02:46 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
28
28
 
29
- 1:01:53 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'
29
+ 7:02:46 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'
30
30
 
31
- 1:01:53 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/provider/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
31
+ 7:02:46 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
32
32
 
33
- 1:01:53 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/tests/utils/objectUtils.unit.test.ts' is older than output '../common/tsconfig.tsbuildinfo'
33
+ 7:02:46 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
34
34
 
35
- 1:01:53 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
35
+ 7:02:46 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'
36
36
 
37
- 1:01:53 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'
37
+ 7:02:46 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/tests/testRedisConnection.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
38
38
 
39
- 1:01:53 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
39
+ 7:02:46 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
40
40
 
41
- 1:01:53 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/rule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
41
+ 7:02:46 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'
42
42
 
43
- 1:01:54 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/types/bannedDomain.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
43
+ 7:02:46 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'
44
44
 
45
- 1:01:54 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
45
+ 7:02:46 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/pair/decode.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
46
46
 
47
- 1:01:54 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
47
+ 7:02:46 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
48
48
 
49
- 1:01:54 PM - Building project '/home/runner/work/captcha/captcha/packages/types-env/tsconfig.json'...
49
+ 7:02:46 PM - Building project '/home/runner/work/captcha/captcha/packages/types-env/tsconfig.json'...
50
50
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/types-env@2.9.29 build
2
+ > @prosopo/types-env@2.10.0 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/types-env@2.9.29 build:cross-env
6
+ > @prosopo/types-env@2.10.0 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
@@ -67,4 +67,4 @@ rendering chunks...
67
67
  dist/provider.js 0.00 kB
68
68
  dist/ipinfo.js 0.00 kB
69
69
  dist/index.js 0.07 kB
70
- ✓ built in 89ms
70
+ ✓ built in 96ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # @prosopo/types-env
2
2
 
3
+ ## 2.10.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
+ - @prosopo/types-database@4.11.0
44
+ - @prosopo/keyring@2.9.46
45
+
3
46
  ## 2.9.29
4
47
  ### Patch Changes
5
48
 
@@ -2,5 +2,6 @@ import type { ProsopoConfigOutput } from "@prosopo/types";
2
2
  import type { ProsopoEnvironment } from "./env.js";
3
3
  export interface ProviderEnvironment extends ProsopoEnvironment {
4
4
  config: ProsopoConfigOutput;
5
+ datasetId?: string;
5
6
  }
6
7
  //# sourceMappingURL=provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC9D,MAAM,EAAE,mBAAmB,CAAC;CAC5B"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC9D,MAAM,EAAE,mBAAmB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/types-env",
3
- "version": "2.9.29",
3
+ "version": "2.10.0",
4
4
  "description": "Types for prosopo environment",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -37,12 +37,12 @@
37
37
  "homepage": "https://github.com/prosopo/captcha#readme",
38
38
  "dependencies": {
39
39
  "@prosopo/logger": "1.0.4",
40
- "@prosopo/keyring": "2.9.45",
41
- "@prosopo/types": "4.7.4",
42
- "@prosopo/types-database": "4.10.7"
40
+ "@prosopo/keyring": "2.9.46",
41
+ "@prosopo/types": "4.8.0",
42
+ "@prosopo/types-database": "4.11.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@prosopo/config": "3.3.2",
45
+ "@prosopo/config": "3.3.3",
46
46
  "@types/node": "22.10.2",
47
47
  "@vitest/coverage-v8": "3.2.4",
48
48
  "concurrently": "9.0.1",