@prosopo/cli 3.8.5 → 3.8.7
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 +3 -3
- package/.turbo/turbo-build$colon$tsc.log +29 -29
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +40 -0
- package/dist/bundle/{i18nFrontend-BRs22JVq.js → i18nFrontend-CdO-oJlq.js} +1 -1
- package/dist/bundle/{node-ponyfill-BXKwLYwg.js → node-ponyfill-ByScaio2.js} +20 -20
- package/dist/bundle/provider.cli.bundle.js +15656 -14199
- package/dist/cjs/prosopo.config.cjs +1 -0
- package/dist/prosopo.config.d.ts.map +1 -1
- package/dist/prosopo.config.js +1 -0
- package/dist/prosopo.config.js.map +1 -1
- package/package.json +12 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/cli@3.8.
|
|
2
|
+
> @prosopo/cli@3.8.7 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -83,7 +83,7 @@ dist/cjs/argv.cjs 2.30 kB │ gzip: 0.66 kB
|
|
|
83
83
|
dist/cjs/start.cjs 2.45 kB │ gzip: 0.84 kB
|
|
84
84
|
dist/cjs/commands/siteKeyRegisterApi.cjs 3.70 kB │ gzip: 1.19 kB
|
|
85
85
|
dist/cjs/commands/siteKeyRegister.cjs 4.06 kB │ gzip: 1.22 kB
|
|
86
|
-
dist/cjs/prosopo.config.cjs 4.
|
|
86
|
+
dist/cjs/prosopo.config.cjs 4.63 kB │ gzip: 1.47 kB
|
|
87
87
|
dist/cjs/RateLimiter.cjs 5.58 kB │ gzip: 0.89 kB
|
|
88
88
|
|
|
89
89
|
[33m[33m[EMPTY_IMPORT_META] [0m`import.meta` may not be a valid syntax with the `cjs` output format.
|
|
@@ -94,4 +94,4 @@ dist/cjs/RateLimiter.cjs 5.58 kB │ gzip: 0.89 kB
|
|
|
94
94
|
[38;5;240m │[0m ╰─────── This `import.meta` will be replaced with an empty object (`{}`) automatically. If this is desired, you can suppress this warning by adding `transform.define: { 'import.meta': {} }`. If `import.meta` needs to be kept as-is, you need to set the output format to `esm`.
|
|
95
95
|
[38;5;246m────╯[0m
|
|
96
96
|
[39m
|
|
97
|
-
[32m✓ built in
|
|
97
|
+
[32m✓ built in 30ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/cli@3.8.
|
|
2
|
+
> @prosopo/cli@3.8.7 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
8:02:33 PM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../locale/tsconfig.json
|
|
8
8
|
* ../util/tsconfig.json
|
|
@@ -30,57 +30,57 @@
|
|
|
30
30
|
* ../../dev/workspace/tsconfig.json
|
|
31
31
|
* tsconfig.json
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
8:02:33 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/NodejsPolarsNativeFilePlugin.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
8:02:33 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
8:02:33 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
8:02: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'
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
8:02:34 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'
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
8:02:34 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
8:02:34 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
8:02:34 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
8:02:34 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/index.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
8:02:34 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
8:02:34 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/tests/apiRoute.unit.test.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
8:02:34 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'
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
8:02:34 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'
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
8:02:34 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/types.test-d.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
8:02:34 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/unit/captchaLabel.unit.test.ts' is older than output '../database/tsconfig.tsbuildinfo'
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
8:02:34 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
8:02:34 PM - Project '../types-env/tsconfig.json' is up to date because newest input '../types-env/src/index.ts' is older than output '../types-env/tsconfig.tsbuildinfo'
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
8:02:34 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/env.ts' is older than output '../env/tsconfig.tsbuildinfo'
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
8:02:34 PM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/middlewares/requestLoggerMiddleware.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
8:02:34 PM - Project '../captcha-severity/tsconfig.json' is up to date because newest input '../captcha-severity/src/index.test.ts' is older than output '../captcha-severity/tsconfig.tsbuildinfo'
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
8:02:34 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
8:02:34 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
8:02:34 PM - Project '../puzzle-assets/tsconfig.json' is up to date because newest input '../puzzle-assets/src/background.ts' is older than output '../puzzle-assets/tsconfig.tsbuildinfo'
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
8:02:34 PM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/util.ts' is older than output '../provider/tsconfig.tsbuildinfo'
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
8:02:34 PM - Project '../../dev/workspace/tsconfig.json' is up to date because newest input '../../dev/workspace/src/index.ts' is older than output '../../dev/workspace/tsconfig.tsbuildinfo'
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
8:02:34 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
8:02:34 PM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
|
|
86
86
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/cli@3.8.
|
|
2
|
+
> @prosopo/cli@3.8.7 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/cli@3.8.
|
|
6
|
+
> @prosopo/cli@3.8.7 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -87,7 +87,7 @@ dist/commands/migrateAbuserScoreThreshold.js 2.11 kB │ gzip: 0.89 kB
|
|
|
87
87
|
dist/start.js 2.23 kB │ gzip: 0.82 kB
|
|
88
88
|
dist/commands/siteKeyRegisterApi.js 3.63 kB │ gzip: 1.19 kB
|
|
89
89
|
dist/commands/siteKeyRegister.js 3.91 kB │ gzip: 1.22 kB
|
|
90
|
-
dist/prosopo.config.js 4.
|
|
90
|
+
dist/prosopo.config.js 4.49 kB │ gzip: 1.48 kB
|
|
91
91
|
dist/RateLimiter.js 5.16 kB │ gzip: 0.89 kB
|
|
92
92
|
|
|
93
|
-
[32m✓ built in
|
|
93
|
+
[32m✓ built in 39ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# @prosopo/cli
|
|
2
2
|
|
|
3
|
+
## 3.8.7
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 162f591: Make the MaxMind fallback answer lookups instead of silently failing all of them.
|
|
7
|
+
|
|
8
|
+
`MaxMindBackend` was configured with `cityDbPath` pointing at `GeoLite2-Country.mmdb` (`MAXMIND_DB_PATH`), and only ever called `city()`. `Reader.open()` accepts any valid `.mmdb`, so the reader opened, `isAvailable()` reported `true`, and the backend advertised itself as a working fallback — but `city()` checks `metadata.databaseType` and throws `BadMethodCallError` against a Country database. The throw was swallowed at `debug` level, `asnReader` was never configured because nothing read a path for it, and every lookup fell through to `{ isValid: false, error: "No MaxMind data available for IP" }`.
|
|
9
|
+
|
|
10
|
+
The failure was invisible for as long as ipapi.is was up, because `IpInfoService` only reaches MaxMind when the ipapi.is lookup fails. When the self-hosted ipapi.is sidecar went down on five production provider nodes, IP lookups did not degrade to MaxMind — they failed outright, and `compareIPs` returned "Failed to lookup both IP addresses" for every request whose challenge IP differed from its solution IP.
|
|
11
|
+
|
|
12
|
+
Three changes:
|
|
13
|
+
|
|
14
|
+
- `MaxMindBackend` latches the database kind on the first `BadMethodCallError` and uses `country()` from then on, so a Country database yields country and country code rather than nothing. The latch means the rejection is constructed once per process, not once per request, and a genuine City database never pays for a second lookup. The mismatch is logged once at `warn` with the offending path, because silent degradation is what let this sit unnoticed.
|
|
15
|
+
- `maxmindAsnDbPath` is read from `MAXMIND_ASN_DB_PATH`. The image has downloaded `GeoLite2-ASN.mmdb` alongside City and Country since the Dockerfile was written, but nothing ever opened it, so the fallback could not name a provider or an AS number.
|
|
16
|
+
- `deepValidateIpAddress` logs `ip1Error` and `ip2Error` alongside the top-level comparison error. "Failed to lookup both IP addresses" on its own does not distinguish an IP that is absent from the database from a backend that is down, and diagnosing the difference meant going onto the host.
|
|
17
|
+
|
|
18
|
+
Deployments should also point `MAXMIND_DB_PATH` at `GeoLite2-City.mmdb`, which the image already ships: country-level data is enough for geoblocking but carries no coordinates, so the IP distance rule cannot run against it.
|
|
19
|
+
- Updated dependencies [162f591]
|
|
20
|
+
- Updated dependencies [9149dff]
|
|
21
|
+
- @prosopo/provider@5.8.1
|
|
22
|
+
- @prosopo/env@3.6.52
|
|
23
|
+
|
|
24
|
+
## 3.8.6
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 6f57ee9: chore(deps): bump yargs from 17.7.2 to 18.1.0
|
|
28
|
+
- Updated dependencies [6f57ee9]
|
|
29
|
+
- Updated dependencies [6f57ee9]
|
|
30
|
+
- Updated dependencies [e22d5fb]
|
|
31
|
+
- Updated dependencies [c59f8a6]
|
|
32
|
+
- Updated dependencies [d288371]
|
|
33
|
+
- @prosopo/provider@5.8.0
|
|
34
|
+
- @prosopo/types@5.7.0
|
|
35
|
+
- @prosopo/util@3.3.9
|
|
36
|
+
- @prosopo/env@3.6.51
|
|
37
|
+
- @prosopo/api@4.1.6
|
|
38
|
+
- @prosopo/common@3.1.54
|
|
39
|
+
- @prosopo/dotenv@3.0.55
|
|
40
|
+
- @prosopo/keyring@2.9.85
|
|
41
|
+
- @prosopo/logger@2.0.9
|
|
42
|
+
|
|
3
43
|
## 3.8.5
|
|
4
44
|
### Patch Changes
|
|
5
45
|
|
|
@@ -542,7 +542,7 @@ var z;
|
|
|
542
542
|
M() && (typeof global < "u" && global.XMLHttpRequest ? z = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (z = window.XMLHttpRequest));
|
|
543
543
|
var B;
|
|
544
544
|
if (typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? B = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (B = window.ActiveXObject)), typeof R != "function" && (R = void 0), !R && !z && !B) try {
|
|
545
|
-
import("./node-ponyfill-
|
|
545
|
+
import("./node-ponyfill-ByScaio2.js").then((e) => /* @__PURE__ */ n(e.default, 1)).then(function(e) {
|
|
546
546
|
R = e.default;
|
|
547
547
|
}).catch(function() {});
|
|
548
548
|
} catch {}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, l as r, o as i, s as a } from "./provider.cli.bundle.js";
|
|
2
2
|
import o from "url";
|
|
3
3
|
import s from "http";
|
|
4
|
-
import c from "
|
|
5
|
-
import l from "
|
|
4
|
+
import c from "zlib";
|
|
5
|
+
import l from "stream";
|
|
6
6
|
import u from "https";
|
|
7
7
|
//#region ../../node_modules/cross-fetch/node_modules/webidl-conversions/lib/index.js
|
|
8
8
|
var d = /* @__PURE__ */ n(((e, t) => {
|
|
@@ -898,11 +898,11 @@ function b(e) {
|
|
|
898
898
|
let i = r === void 0 ? 0 : r;
|
|
899
899
|
var a = n.timeout;
|
|
900
900
|
let o = a === void 0 ? 0 : a;
|
|
901
|
-
e == null ? e = null : ie(e) ? e = Buffer.from(e.toString()) : S(e) || Buffer.isBuffer(e) || (Object.prototype.toString.call(e) === "[object ArrayBuffer]" ? e = Buffer.from(e) : ArrayBuffer.isView(e) ? e = Buffer.from(e.buffer, e.byteOffset, e.byteLength) : e instanceof
|
|
901
|
+
e == null ? e = null : ie(e) ? e = Buffer.from(e.toString()) : S(e) || Buffer.isBuffer(e) || (Object.prototype.toString.call(e) === "[object ArrayBuffer]" ? e = Buffer.from(e) : ArrayBuffer.isView(e) ? e = Buffer.from(e.buffer, e.byteOffset, e.byteLength) : e instanceof l || (e = Buffer.from(String(e)))), this[H] = {
|
|
902
902
|
body: e,
|
|
903
903
|
disturbed: !1,
|
|
904
904
|
error: null
|
|
905
|
-
}, this.size = i, this.timeout = o, e instanceof
|
|
905
|
+
}, this.size = i, this.timeout = o, e instanceof l && e.on("error", function(e) {
|
|
906
906
|
let n = e.name === "AbortError" ? e : new y(`Invalid response body while trying to fetch ${t.url}: ${e.message}`, "system", e);
|
|
907
907
|
t[H].error = n;
|
|
908
908
|
});
|
|
@@ -915,7 +915,7 @@ function x() {
|
|
|
915
915
|
if (t === null) return b.Promise.resolve(Buffer.alloc(0));
|
|
916
916
|
if (S(t) && (t = t.stream()), Buffer.isBuffer(t)) return b.Promise.resolve(t);
|
|
917
917
|
// istanbul ignore if: should never happen
|
|
918
|
-
if (!(t instanceof
|
|
918
|
+
if (!(t instanceof l)) return b.Promise.resolve(Buffer.alloc(0));
|
|
919
919
|
let n = [], r = 0, i = !1;
|
|
920
920
|
return new b.Promise(function(a, o) {
|
|
921
921
|
let s;
|
|
@@ -957,10 +957,10 @@ function S(e) {
|
|
|
957
957
|
function ae(e) {
|
|
958
958
|
let t, n, r = e.body;
|
|
959
959
|
if (e.bodyUsed) throw Error("cannot clone body after it is used");
|
|
960
|
-
return r instanceof
|
|
960
|
+
return r instanceof l && typeof r.getBoundary != "function" && (t = new U(), n = new U(), r.pipe(t), r.pipe(n), e[H].body = t, r = n), r;
|
|
961
961
|
}
|
|
962
962
|
function C(e) {
|
|
963
|
-
return e === null ? null : typeof e == "string" ? "text/plain;charset=UTF-8" : ie(e) ? "application/x-www-form-urlencoded;charset=UTF-8" : S(e) ? e.type || null : Buffer.isBuffer(e) || Object.prototype.toString.call(e) === "[object ArrayBuffer]" || ArrayBuffer.isView(e) ? null : typeof e.getBoundary == "function" ? `multipart/form-data;boundary=${e.getBoundary()}` : e instanceof
|
|
963
|
+
return e === null ? null : typeof e == "string" ? "text/plain;charset=UTF-8" : ie(e) ? "application/x-www-form-urlencoded;charset=UTF-8" : S(e) ? e.type || null : Buffer.isBuffer(e) || Object.prototype.toString.call(e) === "[object ArrayBuffer]" || ArrayBuffer.isView(e) ? null : typeof e.getBoundary == "function" ? `multipart/form-data;boundary=${e.getBoundary()}` : e instanceof l ? null : "text/plain;charset=UTF-8";
|
|
964
964
|
}
|
|
965
965
|
function oe(e) {
|
|
966
966
|
let t = e.body;
|
|
@@ -1022,7 +1022,7 @@ function le(e) {
|
|
|
1022
1022
|
let t = e[Z].parsedURL, n = new K(e[Z].headers);
|
|
1023
1023
|
if (n.has("Accept") || n.set("Accept", "*/*"), !t.protocol || !t.hostname) throw TypeError("Only absolute URLs are supported");
|
|
1024
1024
|
if (!/^https?:$/.test(t.protocol)) throw TypeError("Only HTTP(S) protocols are supported");
|
|
1025
|
-
if (e.signal && e.body instanceof
|
|
1025
|
+
if (e.signal && e.body instanceof l.Readable && !ge) throw Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");
|
|
1026
1026
|
let r = null;
|
|
1027
1027
|
if (e.body == null && /^(POST|PUT)$/i.test(e.method) && (r = "0"), e.body != null) {
|
|
1028
1028
|
let t = oe(e);
|
|
@@ -1044,7 +1044,7 @@ function P(e, t) {
|
|
|
1044
1044
|
return b.Promise = P.Promise, new P.Promise(function(n, r) {
|
|
1045
1045
|
let i = new Q(e, t), a = le(i), o = (a.protocol === "https:" ? u : s).request, d = i.signal, f = null, p = function() {
|
|
1046
1046
|
let e = new N("The user aborted a request.");
|
|
1047
|
-
r(e), i.body && i.body instanceof
|
|
1047
|
+
r(e), i.body && i.body instanceof l.Readable && F(i.body, e), !(!f || !f.body) && f.body.emit("error", e);
|
|
1048
1048
|
};
|
|
1049
1049
|
if (d && d.aborted) {
|
|
1050
1050
|
p();
|
|
@@ -1146,25 +1146,25 @@ function P(e, t) {
|
|
|
1146
1146
|
f = new X(a, o), n(f);
|
|
1147
1147
|
return;
|
|
1148
1148
|
}
|
|
1149
|
-
let
|
|
1150
|
-
flush:
|
|
1151
|
-
finishFlush:
|
|
1149
|
+
let l = {
|
|
1150
|
+
flush: c.Z_SYNC_FLUSH,
|
|
1151
|
+
finishFlush: c.Z_SYNC_FLUSH
|
|
1152
1152
|
};
|
|
1153
1153
|
if (s == "gzip" || s == "x-gzip") {
|
|
1154
|
-
a = a.pipe(
|
|
1154
|
+
a = a.pipe(c.createGunzip(l)), f = new X(a, o), n(f);
|
|
1155
1155
|
return;
|
|
1156
1156
|
}
|
|
1157
1157
|
if (s == "deflate" || s == "x-deflate") {
|
|
1158
1158
|
let t = e.pipe(new _e());
|
|
1159
1159
|
t.once("data", function(e) {
|
|
1160
|
-
a = (e[0] & 15) == 8 ? a.pipe(
|
|
1160
|
+
a = (e[0] & 15) == 8 ? a.pipe(c.createInflate()) : a.pipe(c.createInflateRaw()), f = new X(a, o), n(f);
|
|
1161
1161
|
}), t.on("end", function() {
|
|
1162
1162
|
f || (f = new X(a, o), n(f));
|
|
1163
1163
|
});
|
|
1164
1164
|
return;
|
|
1165
1165
|
}
|
|
1166
|
-
if (s == "br" && typeof
|
|
1167
|
-
a = a.pipe(
|
|
1166
|
+
if (s == "br" && typeof c.createBrotliDecompress == "function") {
|
|
1167
|
+
a = a.pipe(c.createBrotliDecompress()), f = new X(a, o), n(f);
|
|
1168
1168
|
return;
|
|
1169
1169
|
}
|
|
1170
1170
|
f = new X(a, o), n(f);
|
|
@@ -1189,7 +1189,7 @@ function F(e, t) {
|
|
|
1189
1189
|
e.destroy ? e.destroy(t) : (e.emit("error", t), e.end());
|
|
1190
1190
|
}
|
|
1191
1191
|
var I, L, R, z, B, V, H, U, de, W, G, K, q, J, Y, fe, X, Z, pe, me, he, ge, Q, $, _e, ve, ye, be = e((() => {
|
|
1192
|
-
I = /* @__PURE__ */ r(ne(), 1), L =
|
|
1192
|
+
I = /* @__PURE__ */ r(ne(), 1), L = l.Readable, R = Symbol("buffer"), z = Symbol("type"), B = class e {
|
|
1193
1193
|
constructor() {
|
|
1194
1194
|
this[z] = "";
|
|
1195
1195
|
let t = arguments[0], n = arguments[1], r = [], i = 0;
|
|
@@ -1243,7 +1243,7 @@ var I, L, R, z, B, V, H, U, de, W, G, K, q, J, Y, fe, X, Z, pe, me, he, ge, Q, $
|
|
|
1243
1243
|
try {
|
|
1244
1244
|
V = a("encoding").convert;
|
|
1245
1245
|
} catch {}
|
|
1246
|
-
H = Symbol("Body internals"), U =
|
|
1246
|
+
H = Symbol("Body internals"), U = l.PassThrough, b.prototype = {
|
|
1247
1247
|
get body() {
|
|
1248
1248
|
return this[H].body;
|
|
1249
1249
|
},
|
|
@@ -1459,7 +1459,7 @@ var I, L, R, z, B, V, H, U, de, W, G, K, q, J, Y, fe, X, Z, pe, me, he, ge, Q, $
|
|
|
1459
1459
|
writable: !1,
|
|
1460
1460
|
enumerable: !1,
|
|
1461
1461
|
configurable: !0
|
|
1462
|
-
}), Z = Symbol("Request internals"), pe = o.URL || I.URL, me = o.parse, he = o.format, ge = "destroy" in
|
|
1462
|
+
}), Z = Symbol("Request internals"), pe = o.URL || I.URL, me = o.parse, he = o.format, ge = "destroy" in l.Readable.prototype, Q = class e {
|
|
1463
1463
|
constructor(e) {
|
|
1464
1464
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n;
|
|
1465
1465
|
j(e) ? n = A(e.url) : (n = e && e.href ? A(e.href) : A(`${e}`), e = {});
|
|
@@ -1515,7 +1515,7 @@ var I, L, R, z, B, V, H, U, de, W, G, K, q, J, Y, fe, X, Z, pe, me, he, ge, Q, $
|
|
|
1515
1515
|
redirect: { enumerable: !0 },
|
|
1516
1516
|
clone: { enumerable: !0 },
|
|
1517
1517
|
signal: { enumerable: !0 }
|
|
1518
|
-
}), N.prototype = Object.create(Error.prototype), N.prototype.constructor = N, N.prototype.name = "AbortError", $ = o.URL || I.URL, _e =
|
|
1518
|
+
}), N.prototype = Object.create(Error.prototype), N.prototype.constructor = N, N.prototype.name = "AbortError", $ = o.URL || I.URL, _e = l.PassThrough, ve = function(e, t) {
|
|
1519
1519
|
let n = new $(t).hostname, r = new $(e).hostname;
|
|
1520
1520
|
return n === r || n[n.length - r.length - 1] === "." && n.endsWith(r);
|
|
1521
1521
|
}, ye = function(e, t) {
|