@prosopo/load-balancer 2.11.12 → 2.11.14
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.
- package/.turbo/turbo-build$colon$cjs.log +5 -7
- package/.turbo/turbo-build$colon$tsc.log +9 -12
- package/.turbo/turbo-build.log +5 -7
- package/CHANGELOG.md +52 -0
- package/dist/balancer.d.ts.map +1 -1
- package/dist/balancer.js +7 -2
- package/dist/balancer.js.map +1 -1
- package/dist/cjs/balancer.cjs +6 -1
- package/dist/errorSites.d.ts +7 -0
- package/dist/errorSites.d.ts.map +1 -0
- package/dist/errorSites.js +2 -0
- package/dist/errorSites.js.map +1 -0
- package/package.json +8 -8
|
@@ -3,25 +3,23 @@ ViteCommonJSConfig: .
|
|
|
3
3
|
{
|
|
4
4
|
tsConfigPaths: [
|
|
5
5
|
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
6
|
+
'/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
|
|
6
7
|
'/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
|
|
7
8
|
'/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
|
|
8
|
-
'/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
|
|
9
|
-
'/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
|
|
10
9
|
'/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json'
|
|
11
10
|
]
|
|
12
11
|
}
|
|
13
12
|
{
|
|
14
13
|
externals: [
|
|
15
14
|
'@prosopo/common',
|
|
15
|
+
'@prosopo/types',
|
|
16
16
|
'@prosopo/locale',
|
|
17
17
|
'@prosopo/util',
|
|
18
|
-
'@prosopo/logger',
|
|
19
|
-
'@prosopo/types',
|
|
20
18
|
'@prosopo/util-crypto'
|
|
21
19
|
]
|
|
22
20
|
}
|
|
23
21
|
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
24
|
-
[36mvite v8.1.
|
|
22
|
+
[36mvite v8.1.6 [32mbuilding ssr environment for production...[36m[39m
|
|
25
23
|
Bundle build started
|
|
26
24
|
[2K
|
|
27
25
|
✓ 7 modules transformed.
|
|
@@ -31,7 +29,7 @@ dist/cjs/retry.cjs 1.27 kB │ gzip: 0.62 kB
|
|
|
31
29
|
dist/cjs/providerUrlOverride.cjs 1.42 kB │ gzip: 0.78 kB
|
|
32
30
|
dist/cjs/developmentProviderUrl.cjs 1.81 kB │ gzip: 0.88 kB
|
|
33
31
|
dist/cjs/index.cjs 1.94 kB │ gzip: 0.47 kB
|
|
34
|
-
dist/cjs/balancer.cjs
|
|
32
|
+
dist/cjs/balancer.cjs 5.01 kB │ gzip: 2.15 kB
|
|
35
33
|
dist/cjs/providers.cjs 7.56 kB │ gzip: 2.57 kB
|
|
36
34
|
|
|
37
|
-
[32m✓ built in
|
|
35
|
+
[32m✓ built in 62ms[39m
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
$ tsc --build --verbose
|
|
2
|
-
|
|
2
|
+
7:40:43 PM - Projects in this build:
|
|
3
3
|
* ../../dev/config/tsconfig.json
|
|
4
4
|
* ../util/tsconfig.json
|
|
5
5
|
* ../locale/tsconfig.json
|
|
6
|
-
* ../logger/tsconfig.json
|
|
7
6
|
* ../util-crypto/tsconfig.json
|
|
8
7
|
* ../types/tsconfig.json
|
|
9
8
|
* ../common/tsconfig.json
|
|
10
9
|
* tsconfig.json
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
7:40:43 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
12
|
|
|
14
|
-
|
|
13
|
+
7:40:43 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
7:40:43 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/process.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
7:40:43 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
18
|
|
|
20
|
-
|
|
19
|
+
7:40:43 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'
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
7:40:43 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'
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
7:40:43 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
2:43:37 PM - Building project '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json'...
|
|
25
|
+
7:40:43 PM - Building project '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json'...
|
|
29
26
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -4,25 +4,23 @@ ViteEsmConfig: .
|
|
|
4
4
|
{
|
|
5
5
|
tsConfigPaths: [
|
|
6
6
|
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
7
|
+
'/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
|
|
7
8
|
'/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
|
|
8
9
|
'/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
|
|
9
|
-
'/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
|
|
10
|
-
'/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
|
|
11
10
|
'/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json'
|
|
12
11
|
]
|
|
13
12
|
}
|
|
14
13
|
{
|
|
15
14
|
externals: [
|
|
16
15
|
'@prosopo/common',
|
|
16
|
+
'@prosopo/types',
|
|
17
17
|
'@prosopo/locale',
|
|
18
18
|
'@prosopo/util',
|
|
19
|
-
'@prosopo/logger',
|
|
20
|
-
'@prosopo/types',
|
|
21
19
|
'@prosopo/util-crypto'
|
|
22
20
|
]
|
|
23
21
|
}
|
|
24
22
|
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
25
|
-
[36mvite v8.1.
|
|
23
|
+
[36mvite v8.1.6 [32mbuilding ssr environment for production...[36m[39m
|
|
26
24
|
Bundle build started
|
|
27
25
|
[2K
|
|
28
26
|
✓ 7 modules transformed.
|
|
@@ -33,7 +31,7 @@ dist/index.js 1.20 kB │ gzip: 0.36 kB
|
|
|
33
31
|
dist/retry.js 1.23 kB │ gzip: 0.61 kB
|
|
34
32
|
dist/providerUrlOverride.js 1.39 kB │ gzip: 0.77 kB
|
|
35
33
|
dist/developmentProviderUrl.js 1.70 kB │ gzip: 0.87 kB
|
|
36
|
-
dist/balancer.js 4.
|
|
34
|
+
dist/balancer.js 4.72 kB │ gzip: 2.11 kB
|
|
37
35
|
dist/providers.js 7.19 kB │ gzip: 2.53 kB
|
|
38
36
|
|
|
39
|
-
[32m✓ built in
|
|
37
|
+
[32m✓ built in 54ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @prosopo/load-balancer
|
|
2
2
|
|
|
3
|
+
## 2.11.14
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- @prosopo/types@5.17.1
|
|
7
|
+
- @prosopo/common@3.3.0
|
|
8
|
+
|
|
9
|
+
## 2.11.13
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 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.
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
`@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.
|
|
17
|
+
- d2148c8: Errors now carry a fixed code and a site instead of a translation key.
|
|
18
|
+
|
|
19
|
+
Every error is a `ProsopoError` with a `code` from one list in
|
|
20
|
+
`@prosopo/common` (`ERROR_CODES`) and an `errorSite` such as `PROV-12`, which
|
|
21
|
+
names the one place it was thrown. Together they make the `errorId`, e.g.
|
|
22
|
+
`SITE_KEY_INVALID:PROV-31`, which the widget shows after the message so a
|
|
23
|
+
screenshot is enough to find the throw.
|
|
24
|
+
|
|
25
|
+
What a client sees:
|
|
26
|
+
|
|
27
|
+
- A public error (bad site key, blocked network, and so on) sends its code,
|
|
28
|
+
English message, data and errorId.
|
|
29
|
+
- Anything else sends only `BACKEND_ERROR:<site>` (or `FRONTEND_ERROR:<site>`
|
|
30
|
+
from the widget) and a status. Internal details never leave the server.
|
|
31
|
+
|
|
32
|
+
The provider no longer translates errors. The widget looks up
|
|
33
|
+
`ERRORS.<CODE>` in its catalogue and falls back to the English message. The
|
|
34
|
+
old error classes (`ProsopoApiError`, `ProsopoEnvError` and the rest), the
|
|
35
|
+
`key`/`messageEn` fields and `localiseErrorMessage` are gone.
|
|
36
|
+
|
|
37
|
+
Other changes in behaviour:
|
|
38
|
+
|
|
39
|
+
- An error with no specific code is a hidden 500.
|
|
40
|
+
- Errors no longer log themselves when they are created. The server logs each
|
|
41
|
+
unhandled one once: 5xx as errors, 4xx at debug.
|
|
42
|
+
- An invalid PoW signature is a 401 instead of a 500.
|
|
43
|
+
- `stringifyBigInts` returns a copy instead of changing its input, so frozen
|
|
44
|
+
error context can be logged.
|
|
45
|
+
- The provider's last hand-written error replies now use the same error body.
|
|
46
|
+
These were the missing-header 401s, the access-policy block, autoBan, the
|
|
47
|
+
metrics 401/403 and the rate limiter. The rate limiter answers with a new
|
|
48
|
+
public `RATE_LIMITED` (429) code.
|
|
49
|
+
- Updated dependencies [46b97b7]
|
|
50
|
+
- Updated dependencies [d2148c8]
|
|
51
|
+
- Updated dependencies [2bcf2fe]
|
|
52
|
+
- @prosopo/common@3.3.0
|
|
53
|
+
- @prosopo/types@5.17.0
|
|
54
|
+
|
|
3
55
|
## 2.11.12
|
|
4
56
|
### Patch Changes
|
|
5
57
|
|
package/dist/balancer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balancer.d.ts","sourceRoot":"","sources":["../src/balancer.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,MAAM,WAAW,iBAAiB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CACf;AAkCD,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAQrC,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAK/C,eAAO,MAAM,qBAAqB,aACvB,eAAe,WAChB,MAAM,KACb,iBAAiB,EAUnB,CAAC;AAKF,eAAO,MAAM,gBAAgB,aAAc,MAAM,KAAG,MACjB,CAAC;AAEpC,eAAO,MAAM,mBAAmB,aAAc,iBAAiB,KAAG,MACjB,CAAC;AA0ClD,eAAO,MAAM,uBAAuB,SAC9B,MAAM,GAAG,SAAS,WACd,MAAM,KACb,iBAAiB,EAiBnB,CAAC;AAEF,eAAO,MAAM,kBAAkB,gBAAiB,gBAAgB,KAAG,
|
|
1
|
+
{"version":3,"file":"balancer.d.ts","sourceRoot":"","sources":["../src/balancer.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,MAAM,WAAW,iBAAiB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CACf;AAkCD,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAQrC,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAK/C,eAAO,MAAM,qBAAqB,aACvB,eAAe,WAChB,MAAM,KACb,iBAAiB,EAUnB,CAAC;AAKF,eAAO,MAAM,gBAAgB,aAAc,MAAM,KAAG,MACjB,CAAC;AAEpC,eAAO,MAAM,mBAAmB,aAAc,iBAAiB,KAAG,MACjB,CAAC;AA0ClD,eAAO,MAAM,uBAAuB,SAC9B,MAAM,GAAG,SAAS,WACd,MAAM,KACb,iBAAiB,EAiBnB,CAAC;AAEF,eAAO,MAAM,kBAAkB,gBAAiB,gBAAgB,KAAG,MAalE,CAAC;AAQF,eAAO,MAAM,8BAA8B,QAAS,CAAC;AAUrD,eAAO,MAAM,YAAY,gBACX,gBAAgB,WACpB,MAAM,cACJ,MAAM,KACf,OAAO,CAAC,iBAAiB,EAAE,CAoC7B,CAAC"}
|
package/dist/balancer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getDevelopmentProviderUrl } from "./developmentProviderUrl.js";
|
|
2
2
|
import { readProviderListOverride } from "./providerUrlOverride.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ProsopoError } from "@prosopo/common";
|
|
4
4
|
//#region src/balancer.ts
|
|
5
5
|
/**
|
|
6
6
|
* The provider list is fetched JSON, so entries are checked rather than
|
|
@@ -69,7 +69,12 @@ var getProviderListOverride = (raw = readProviderListOverride(), ipMode) => {
|
|
|
69
69
|
var getLoadBalancerUrl = (environment) => {
|
|
70
70
|
if (environment === "production") return "https://provider-list.prosopo.io/";
|
|
71
71
|
if (environment === "staging") return "https://provider-list.prosopo.io/staging.json";
|
|
72
|
-
throw new
|
|
72
|
+
throw new ProsopoError({
|
|
73
|
+
code: "CONFIG_INVALID",
|
|
74
|
+
errorSite: "LBAL-1",
|
|
75
|
+
message: "Unknown environment requested",
|
|
76
|
+
context: { environment }
|
|
77
|
+
});
|
|
73
78
|
};
|
|
74
79
|
/**
|
|
75
80
|
* Upper bound on the provider-list fetch. `@prosopo/server` calls
|
package/dist/balancer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balancer.js","sourceRoot":"","sources":["../src/balancer.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"balancer.js","sourceRoot":"","sources":["../src/balancer.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAepE,MAAM,sBAAsB,GAAG,CAAC,KAAc,EAAqB,EAAE;IACpE,MAAM,KAAK,GAAG,KAAgC,CAAC;IAC/C,IACC,CAAC,gBAAgB,CAAC,KAAK,CAAC;QACxB,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QACjC,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ;QAC7B,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ;QACnC,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,EAC/D,CAAC;QAIF,MAAM,IAAI,KAAK,CACd,kDAAkD,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AAK,aAAa,EAAE,CAAC;QACnC,OAAO;YACN;gBACC,OAAO,EAAE,kDAAkD;gBAC3D,GAAG,EAAE,yBAAyB,EAAE;gBAChC,SAAS,EACR,oEAAoE;gBACrE,MAAM,EAAE,CAAC;aACT;SACD,CAAC;IACH,CAAC;IAED,MAAM,SAAS,GAAoB,MAAM,KAAK,CAC7C,kBAAkB,CAAC,WAAW,CAAC,EAC/B;QACC,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC;KAChC,CACD,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAK5B,OAAO,qBAAqB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC,CAAC"}
|
package/dist/cjs/balancer.cjs
CHANGED
|
@@ -69,7 +69,12 @@ var getProviderListOverride = (raw = require_providerUrlOverride.readProviderLis
|
|
|
69
69
|
var getLoadBalancerUrl = (environment) => {
|
|
70
70
|
if (environment === "production") return "https://provider-list.prosopo.io/";
|
|
71
71
|
if (environment === "staging") return "https://provider-list.prosopo.io/staging.json";
|
|
72
|
-
throw new _prosopo_common.
|
|
72
|
+
throw new _prosopo_common.ProsopoError({
|
|
73
|
+
code: "CONFIG_INVALID",
|
|
74
|
+
errorSite: "LBAL-1",
|
|
75
|
+
message: "Unknown environment requested",
|
|
76
|
+
context: { environment }
|
|
77
|
+
});
|
|
73
78
|
};
|
|
74
79
|
/**
|
|
75
80
|
* Upper bound on the provider-list fetch. `@prosopo/server` calls
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorSites.d.ts","sourceRoot":"","sources":["../src/errorSites.ts"],"names":[],"mappings":"AAcA,OAAO,QAAQ,iBAAiB,CAAC;IAChC,UAAU,UAAU;QACnB,QAAQ,EAAE,IAAI,CAAC;KACf;CACD;AAED,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorSites.js","sourceRoot":"","sources":["../src/errorSites.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/load-balancer",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.14",
|
|
4
4
|
"description": "Provider load balancer",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,22 +27,22 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/prosopo/captcha#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@prosopo/common": "3.
|
|
31
|
-
"@prosopo/types": "5.
|
|
30
|
+
"@prosopo/common": "3.3.0",
|
|
31
|
+
"@prosopo/types": "5.17.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@prosopo/config": "3.
|
|
34
|
+
"@prosopo/config": "3.5.0",
|
|
35
35
|
"@types/node": "22.10.2",
|
|
36
|
-
"@vitest/coverage-v8": "
|
|
36
|
+
"@vitest/coverage-v8": "5.0.4",
|
|
37
37
|
"concurrently": "9.0.1",
|
|
38
38
|
"del-cli": "6.0.0",
|
|
39
|
-
"dotenv": "
|
|
39
|
+
"dotenv": "18.0.7",
|
|
40
40
|
"npm-run-all": "4.1.5",
|
|
41
41
|
"tslib": "2.7.0",
|
|
42
42
|
"tsx": "4.20.3",
|
|
43
43
|
"typescript": "5.6.2",
|
|
44
|
-
"vite": "8.1.
|
|
45
|
-
"vitest": "
|
|
44
|
+
"vite": "8.1.6",
|
|
45
|
+
"vitest": "5.0.4"
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
48
|
"scripts": {
|