@prosopo/api 4.7.2 → 4.7.4

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.
@@ -17,7 +17,7 @@ ViteCommonJSConfig: .
17
17
  ]
18
18
  }
19
19
  The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
20
- vite v8.1.5 building ssr environment for production...
20
+ vite v8.1.6 building ssr environment for production...
21
21
  Bundle build started
22
22
  
23
23
  ✓ 7 modules transformed.
@@ -30,4 +30,4 @@ dist/cjs/index.cjs 0.61 kB │ gzip: 0.24 kB
30
30
  dist/cjs/api/HttpClientBase.cjs 2.97 kB │ gzip: 0.78 kB
31
31
  dist/cjs/api/ProviderApi.cjs 18.56 kB │ gzip: 3.08 kB
32
32
 
33
- ✓ built in 34ms
33
+ ✓ built in 69ms
@@ -1,5 +1,5 @@
1
1
  $ tsc --build --verbose
2
- 10:01:20 AM - Projects in this build:
2
+ 5:07:53 PM - Projects in this build:
3
3
  * ../../dev/config/tsconfig.json
4
4
  * ../util/tsconfig.json
5
5
  * ../locale/tsconfig.json
@@ -7,17 +7,17 @@ $ tsc --build --verbose
7
7
  * ../types/tsconfig.json
8
8
  * tsconfig.json
9
9
 
10
- 10:01:20 AM - 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'
10
+ 5:07: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'
11
11
 
12
- 10:01:20 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
12
+ 5:07:53 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
13
13
 
14
- 10:01:20 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/process.ts' is older than output '../locale/tsconfig.tsbuildinfo'
14
+ 5:07:53 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
15
15
 
16
- 10:01:20 AM - 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'
16
+ 5:07: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'
17
17
 
18
- 10:01:20 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
18
+ 5:07:53 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
19
19
 
20
- 10:01:20 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
20
+ 5:07:53 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
21
21
 
22
- 10:01:20 AM - Building project '/home/runner/work/captcha/captcha/packages/api/tsconfig.json'...
22
+ 5:07:53 PM - Building project '/home/runner/work/captcha/captcha/packages/api/tsconfig.json'...
23
23
 
@@ -18,7 +18,7 @@ ViteEsmConfig: .
18
18
  ]
19
19
  }
20
20
  The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
21
- vite v8.1.5 building ssr environment for production...
21
+ vite v8.1.6 building ssr environment for production...
22
22
  Bundle build started
23
23
  
24
24
  ✓ 7 modules transformed.
@@ -32,4 +32,4 @@ dist/api/apiClient.js 0.41 kB │ gzip: 0.25 kB
32
32
  dist/api/HttpClientBase.js 2.87 kB │ gzip: 0.78 kB
33
33
  dist/api/ProviderApi.js 16.59 kB │ gzip: 3.09 kB
34
34
 
35
- ✓ built in 78ms
35
+ ✓ built in 66ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # @prosopo/api
2
2
 
3
+ ## 4.7.4
4
+ ### Patch Changes
5
+
6
+ - 46b97b7: Roll up the open Dependabot updates: express 5 (with `@types/express` 5), dotenv 18, undici 8, geolib 4, vitest 5, vite 8.1.6 everywhere, 17 minor and patch bumps (Babel, mongoose, i18next, ip-address, turbo and others), `@angular/router` in the Angular demo, and a GitHub Actions bump.
7
+
8
+ The whole vitest family moves to 5.0.4, including `@vitest/coverage-v8`, because `@vitest/browser-playwright` 5 only works with vitest 5. The `@types/express-serve-static-core` override moves to 5.1.3 to match `@types/express` 5.
9
+
10
+ `@prosopo/dotenv` now loads env files with `quiet: true`. Since dotenv 17, every load prints an "injected env" line to stderr unless told not to.
11
+ - d2148c8: Errors now carry a fixed code and a site instead of a translation key.
12
+
13
+ Every error is a `ProsopoError` with a `code` from one list in
14
+ `@prosopo/common` (`ERROR_CODES`) and an `errorSite` such as `PROV-12`, which
15
+ names the one place it was thrown. Together they make the `errorId`, e.g.
16
+ `SITE_KEY_INVALID:PROV-31`, which the widget shows after the message so a
17
+ screenshot is enough to find the throw.
18
+
19
+ What a client sees:
20
+
21
+ - A public error (bad site key, blocked network, and so on) sends its code,
22
+ English message, data and errorId.
23
+ - Anything else sends only `BACKEND_ERROR:<site>` (or `FRONTEND_ERROR:<site>`
24
+ from the widget) and a status. Internal details never leave the server.
25
+
26
+ The provider no longer translates errors. The widget looks up
27
+ `ERRORS.<CODE>` in its catalogue and falls back to the English message. The
28
+ old error classes (`ProsopoApiError`, `ProsopoEnvError` and the rest), the
29
+ `key`/`messageEn` fields and `localiseErrorMessage` are gone.
30
+
31
+ Other changes in behaviour:
32
+
33
+ - An error with no specific code is a hidden 500.
34
+ - Errors no longer log themselves when they are created. The server logs each
35
+ unhandled one once: 5xx as errors, 4xx at debug.
36
+ - An invalid PoW signature is a 401 instead of a 500.
37
+ - `stringifyBigInts` returns a copy instead of changing its input, so frozen
38
+ error context can be logged.
39
+ - The provider's last hand-written error replies now use the same error body.
40
+ These were the missing-header 401s, the access-policy block, autoBan, the
41
+ metrics 401/403 and the rate limiter. The rate limiter answers with a new
42
+ public `RATE_LIMITED` (429) code.
43
+ - Updated dependencies [46b97b7]
44
+ - Updated dependencies [d2148c8]
45
+ - Updated dependencies [2bcf2fe]
46
+ - @prosopo/types@5.17.0
47
+
48
+ ## 4.7.3
49
+ ### Patch Changes
50
+
51
+ - @prosopo/types@5.16.3
52
+
3
53
  ## 4.7.2
4
54
  ### Patch Changes
5
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/api",
3
- "version": "4.7.2",
3
+ "version": "4.7.4",
4
4
  "description": "Wrapper for the provider API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,20 +27,20 @@
27
27
  },
28
28
  "homepage": "https://github.com/prosopo/captcha#readme",
29
29
  "dependencies": {
30
- "@prosopo/types": "5.16.2"
30
+ "@prosopo/types": "5.17.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@prosopo/config": "3.4.4",
33
+ "@prosopo/config": "3.5.0",
34
34
  "@types/node": "22.10.2",
35
- "@vitest/coverage-v8": "4.1.11",
35
+ "@vitest/coverage-v8": "5.0.4",
36
36
  "concurrently": "9.0.1",
37
37
  "del-cli": "6.0.0",
38
38
  "npm-run-all": "4.1.5",
39
39
  "tslib": "2.7.0",
40
40
  "tsx": "4.20.3",
41
41
  "typescript": "5.6.2",
42
- "vite": "8.1.5",
43
- "vitest": "4.1.11"
42
+ "vite": "8.1.6",
43
+ "vitest": "5.0.4"
44
44
  },
45
45
  "sideEffects": false,
46
46
  "scripts": {