@contrast/agent-bundle 5.45.1 → 5.47.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.
- package/README.md +1 -1
- package/node_modules/@contrast/agent/README.md +1 -1
- package/node_modules/@contrast/agent/package.json +12 -12
- package/node_modules/@contrast/agentify/package.json +15 -15
- package/node_modules/@contrast/architecture-components/package.json +5 -5
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/common.js +1 -1
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/handlers.js +24 -11
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/index.js +6 -4
- package/node_modules/@contrast/assess/lib/configuration-analysis/install/apollo-server.js +92 -0
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/express-session.js +2 -2
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/fastify-cookie.js +2 -2
- package/node_modules/@contrast/assess/lib/configuration-analysis/install/graphql-yoga.js +90 -0
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/hapi.js +2 -2
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/koa.js +3 -3
- package/node_modules/@contrast/assess/lib/dataflow/propagation/install/string/substring.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sources/handler.js +30 -26
- package/node_modules/@contrast/assess/lib/dataflow/sources/index.js +2 -0
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/fastify-websocket.js +63 -0
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/http.js +42 -38
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/index.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-bodyparsers.js +76 -48
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-multer.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-routers.js +2 -2
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/{koa2.js → koa.js} +3 -3
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/socket.io.js +80 -0
- package/node_modules/@contrast/assess/lib/get-source-context.js +10 -21
- package/node_modules/@contrast/assess/lib/index.d.ts +4 -3
- package/node_modules/@contrast/assess/lib/index.js +2 -2
- package/node_modules/@contrast/assess/lib/make-source-context.js +5 -10
- package/node_modules/@contrast/assess/lib/policy.js +400 -0
- package/node_modules/@contrast/assess/lib/response-scanning/handlers/index.js +10 -14
- package/node_modules/@contrast/assess/package.json +12 -12
- package/node_modules/@contrast/common/lib/constants.d.ts +12 -4
- package/node_modules/@contrast/common/lib/constants.js +16 -7
- package/node_modules/@contrast/common/lib/types.d.ts +5 -1
- package/node_modules/@contrast/common/package.json +1 -1
- package/node_modules/@contrast/config/lib/common.js +1 -0
- package/node_modules/@contrast/config/lib/options.js +14 -0
- package/node_modules/@contrast/config/package.json +3 -3
- package/node_modules/@contrast/core/package.json +5 -5
- package/node_modules/@contrast/deadzones/package.json +5 -5
- package/node_modules/@contrast/dep-hooks/lib/package-finder.d.ts +2 -2
- package/node_modules/@contrast/dep-hooks/lib/package-finder.js +3 -2
- package/node_modules/@contrast/dep-hooks/package.json +4 -4
- package/node_modules/@contrast/esm-hooks/README.md +2 -2
- package/node_modules/@contrast/esm-hooks/package.json +6 -6
- package/node_modules/@contrast/instrumentation/package.json +5 -5
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/dep.json +149 -149
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/index.js +2 -11
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/utils.js +2 -0
- package/node_modules/@contrast/library-analysis/lib/install/library-usage/index.js +3 -1
- package/node_modules/@contrast/library-analysis/lib/util.js +0 -2
- package/node_modules/@contrast/library-analysis/package.json +4 -4
- package/node_modules/@contrast/logger/package.json +3 -3
- package/node_modules/@contrast/metrics/package.json +6 -6
- package/node_modules/@contrast/patcher/package.json +2 -2
- package/node_modules/@contrast/protect/lib/error-handlers/index.js +1 -1
- package/node_modules/@contrast/protect/lib/error-handlers/install/{koa2.js → koa.js} +4 -4
- package/node_modules/@contrast/protect/lib/index.d.ts +1 -1
- package/node_modules/@contrast/protect/lib/input-analysis/handlers.js +1 -12
- package/node_modules/@contrast/protect/lib/input-analysis/index.js +2 -3
- package/node_modules/@contrast/protect/lib/input-analysis/install/koa-bodyparsers.js +92 -0
- package/node_modules/@contrast/protect/lib/input-analysis/install/{koa2.js → koa.js} +5 -5
- package/node_modules/@contrast/protect/package.json +11 -11
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.js +6 -10
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/routes-observed.js +4 -0
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.d.ts +1 -1
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.js +1 -1
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.d.ts +1 -1
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.js +22 -9
- package/node_modules/@contrast/reporter/lib/reporters/file.js +1 -1
- package/node_modules/@contrast/reporter/package.json +6 -6
- package/node_modules/@contrast/rewriter/package.json +5 -5
- package/node_modules/@contrast/route-coverage/lib/index.d.ts +0 -2
- package/node_modules/@contrast/route-coverage/lib/index.js +10 -1
- package/node_modules/@contrast/route-coverage/lib/install/express/express5.js +16 -1
- package/node_modules/@contrast/route-coverage/lib/install/fastify.js +25 -15
- package/node_modules/@contrast/route-coverage/lib/install/graphql.js +6 -1
- package/node_modules/@contrast/route-coverage/lib/install/koa.js +1 -1
- package/node_modules/@contrast/route-coverage/lib/install/socket.io.js +127 -0
- package/node_modules/@contrast/route-coverage/package.json +8 -8
- package/node_modules/@contrast/scopes/package.json +5 -5
- package/node_modules/@contrast/sec-obs/package.json +9 -9
- package/node_modules/@contrast/sources/lib/index.js +65 -22
- package/node_modules/@contrast/sources/lib/index.test.js +78 -33
- package/node_modules/@contrast/sources/lib/source-info.js +1 -10
- package/node_modules/@contrast/sources/package.json +3 -3
- package/node_modules/@contrast/telemetry/package.json +5 -5
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/assert/strict.d.ts +105 -2
- package/node_modules/@types/node/assert.d.ts +154 -95
- package/node_modules/@types/node/buffer.buffer.d.ts +9 -0
- package/node_modules/@types/node/buffer.d.ts +8 -4
- package/node_modules/@types/node/child_process.d.ts +65 -42
- package/node_modules/@types/node/cluster.d.ts +4 -5
- package/node_modules/@types/node/crypto.d.ts +1173 -322
- package/node_modules/@types/node/dgram.d.ts +9 -8
- package/node_modules/@types/node/diagnostics_channel.d.ts +0 -2
- package/node_modules/@types/node/dns.d.ts +1 -1
- package/node_modules/@types/node/events.d.ts +80 -34
- package/node_modules/@types/node/fs/promises.d.ts +39 -21
- package/node_modules/@types/node/fs.d.ts +328 -87
- package/node_modules/@types/node/globals.d.ts +2 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +19 -0
- package/node_modules/@types/node/http.d.ts +94 -30
- package/node_modules/@types/node/http2.d.ts +178 -52
- package/node_modules/@types/node/https.d.ts +91 -62
- package/node_modules/@types/node/index.d.ts +2 -0
- package/node_modules/@types/node/inspector.d.ts +24 -0
- package/node_modules/@types/node/inspector.generated.d.ts +181 -0
- package/node_modules/@types/node/net.d.ts +12 -11
- package/node_modules/@types/node/os.d.ts +14 -3
- package/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/node/perf_hooks.d.ts +6 -8
- package/node_modules/@types/node/process.d.ts +12 -23
- package/node_modules/@types/node/readline/promises.d.ts +1 -1
- package/node_modules/@types/node/sea.d.ts +9 -0
- package/node_modules/@types/node/sqlite.d.ts +119 -10
- package/node_modules/@types/node/stream/consumers.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +6 -55
- package/node_modules/@types/node/stream.d.ts +38 -23
- package/node_modules/@types/node/string_decoder.d.ts +2 -2
- package/node_modules/@types/node/test.d.ts +31 -26
- package/node_modules/@types/node/tls.d.ts +90 -66
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +16 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +2 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +2 -0
- package/node_modules/@types/node/url.d.ts +8 -3
- package/node_modules/@types/node/util.d.ts +17 -3
- package/node_modules/@types/node/v8.d.ts +38 -5
- package/node_modules/@types/node/vm.d.ts +169 -88
- package/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
- package/node_modules/@types/node/web-globals/events.d.ts +3 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/node_modules/@types/node/worker_threads.d.ts +109 -48
- package/node_modules/@types/node/zlib.d.ts +31 -24
- package/node_modules/axios/CHANGELOG.md +403 -357
- package/node_modules/axios/README.md +80 -49
- package/node_modules/axios/dist/axios.js +121 -46
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +126 -57
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +126 -57
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +346 -97
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +4 -0
- package/node_modules/axios/index.d.ts +4 -0
- package/node_modules/axios/lib/adapters/adapters.js +85 -40
- package/node_modules/axios/lib/adapters/fetch.js +1 -1
- package/node_modules/axios/lib/adapters/http.js +220 -42
- package/node_modules/axios/lib/core/InterceptorManager.js +1 -1
- package/node_modules/axios/lib/core/mergeConfig.js +4 -4
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +6 -0
- package/node_modules/axios/lib/helpers/bind.js +7 -0
- package/node_modules/axios/lib/helpers/cookies.js +24 -13
- package/node_modules/axios/package.json +9 -4
- package/node_modules/detect-libc/lib/filesystem.js +1 -1
- package/node_modules/detect-libc/package.json +3 -1
- package/node_modules/node-abi/abi_registry.json +12 -2
- package/node_modules/node-abi/package.json +3 -6
- package/node_modules/semver/classes/range.js +1 -0
- package/node_modules/semver/classes/semver.js +19 -5
- package/node_modules/semver/internal/identifiers.js +4 -0
- package/node_modules/semver/package.json +3 -3
- package/node_modules/undici-types/agent.d.ts +1 -4
- package/node_modules/undici-types/client.d.ts +0 -2
- package/node_modules/undici-types/diagnostics-channel.d.ts +0 -1
- package/node_modules/undici-types/dispatcher.d.ts +0 -6
- package/node_modules/undici-types/errors.d.ts +5 -15
- package/node_modules/undici-types/eventsource.d.ts +6 -1
- package/node_modules/undici-types/h2c-client.d.ts +0 -2
- package/node_modules/undici-types/index.d.ts +6 -1
- package/node_modules/undici-types/interceptors.d.ts +5 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +0 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/webidl.d.ts +82 -21
- package/package.json +3 -3
- package/node_modules/@contrast/assess/lib/get-policy.js +0 -336
- package/node_modules/@contrast/protect/lib/input-analysis/install/koa-body5.js +0 -63
- package/node_modules/@contrast/protect/lib/input-analysis/install/koa-bodyparser4.js +0 -64
|
@@ -5,27 +5,38 @@ export default platform.hasStandardBrowserEnv ?
|
|
|
5
5
|
|
|
6
6
|
// Standard browser envs support document.cookie
|
|
7
7
|
{
|
|
8
|
-
write(name, value, expires, path, domain, secure) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
utils.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
9
|
+
if (typeof document === 'undefined') return;
|
|
10
|
+
|
|
11
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
12
|
+
|
|
13
|
+
if (utils.isNumber(expires)) {
|
|
14
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
15
|
+
}
|
|
16
|
+
if (utils.isString(path)) {
|
|
17
|
+
cookie.push(`path=${path}`);
|
|
18
|
+
}
|
|
19
|
+
if (utils.isString(domain)) {
|
|
20
|
+
cookie.push(`domain=${domain}`);
|
|
21
|
+
}
|
|
22
|
+
if (secure === true) {
|
|
23
|
+
cookie.push('secure');
|
|
24
|
+
}
|
|
25
|
+
if (utils.isString(sameSite)) {
|
|
26
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
27
|
+
}
|
|
18
28
|
|
|
19
29
|
document.cookie = cookie.join('; ');
|
|
20
30
|
},
|
|
21
31
|
|
|
22
32
|
read(name) {
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
if (typeof document === 'undefined') return null;
|
|
34
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
35
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
25
36
|
},
|
|
26
37
|
|
|
27
38
|
remove(name) {
|
|
28
|
-
this.write(name, '', Date.now() - 86400000);
|
|
39
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
29
40
|
}
|
|
30
41
|
}
|
|
31
42
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "axios",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "Promise based HTTP client for the browser and node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -80,7 +80,12 @@
|
|
|
80
80
|
"http",
|
|
81
81
|
"ajax",
|
|
82
82
|
"promise",
|
|
83
|
-
"node"
|
|
83
|
+
"node",
|
|
84
|
+
"browser",
|
|
85
|
+
"fetch",
|
|
86
|
+
"rest",
|
|
87
|
+
"api",
|
|
88
|
+
"client"
|
|
84
89
|
],
|
|
85
90
|
"author": "Matt Zabriskie",
|
|
86
91
|
"license": "MIT",
|
|
@@ -141,11 +146,11 @@
|
|
|
141
146
|
"rollup-plugin-auto-external": "^2.0.0",
|
|
142
147
|
"rollup-plugin-bundle-size": "^1.0.3",
|
|
143
148
|
"rollup-plugin-terser": "^7.0.2",
|
|
149
|
+
"selfsigned": "^3.0.1",
|
|
144
150
|
"sinon": "^4.5.0",
|
|
145
151
|
"stream-throttle": "^0.1.3",
|
|
146
152
|
"string-replace-async": "^3.0.2",
|
|
147
153
|
"tar-stream": "^3.1.7",
|
|
148
|
-
"terser-webpack-plugin": "^4.2.3",
|
|
149
154
|
"typescript": "^4.9.5"
|
|
150
155
|
},
|
|
151
156
|
"browser": {
|
|
@@ -185,7 +190,7 @@
|
|
|
185
190
|
"Remco Haszing (https://github.com/remcohaszing)",
|
|
186
191
|
"Rikki Gibson (https://github.com/RikkiGibson)",
|
|
187
192
|
"Willian Agostini (https://github.com/WillianAgostini)",
|
|
188
|
-
"
|
|
193
|
+
"Ben Carp (https://github.com/carpben)"
|
|
189
194
|
],
|
|
190
195
|
"sideEffects": false,
|
|
191
196
|
"release-it": {
|
|
@@ -19,7 +19,7 @@ const readFileSync = (path) => {
|
|
|
19
19
|
const fd = fs.openSync(path, 'r');
|
|
20
20
|
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
21
21
|
const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0);
|
|
22
|
-
fs.close(fd);
|
|
22
|
+
fs.close(fd, () => {});
|
|
23
23
|
return buffer.subarray(0, bytesRead);
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "detect-libc",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Node.js module to detect the C standard library (libc) implementation family and version",
|
|
5
5
|
"main": "lib/detect-libc.js",
|
|
6
6
|
"files": [
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "semistandard && nyc --reporter=text --check-coverage --branches=100 ava test/unit.js",
|
|
12
|
+
"changelog": "conventional-changelog -i CHANGELOG.md -s",
|
|
12
13
|
"bench": "node benchmark/detect-libc",
|
|
13
14
|
"bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js"
|
|
14
15
|
},
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"ava": "^2.4.0",
|
|
32
33
|
"benchmark": "^2.1.4",
|
|
34
|
+
"conventional-changelog-cli": "^5.0.0",
|
|
33
35
|
"eslint-config-standard": "^13.0.1",
|
|
34
36
|
"nyc": "^15.1.0",
|
|
35
37
|
"proxyquire": "^2.1.3",
|
|
@@ -122,8 +122,18 @@
|
|
|
122
122
|
"runtime": "node",
|
|
123
123
|
"target": "25.0.0",
|
|
124
124
|
"lts": false,
|
|
125
|
+
"future": false,
|
|
126
|
+
"abi": "141"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"runtime": "node",
|
|
130
|
+
"target": "26.0.0",
|
|
131
|
+
"lts": [
|
|
132
|
+
"2026-10-28",
|
|
133
|
+
"2027-10-20"
|
|
134
|
+
],
|
|
125
135
|
"future": true,
|
|
126
|
-
"abi": "
|
|
136
|
+
"abi": "142"
|
|
127
137
|
},
|
|
128
138
|
{
|
|
129
139
|
"abi": "70",
|
|
@@ -400,7 +410,7 @@
|
|
|
400
410
|
},
|
|
401
411
|
{
|
|
402
412
|
"abi": "140",
|
|
403
|
-
"future":
|
|
413
|
+
"future": false,
|
|
404
414
|
"lts": false,
|
|
405
415
|
"runtime": "electron",
|
|
406
416
|
"target": "39.0.0-alpha.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-abi",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"description": "Get the Node ABI for a given target and runtime, and vice versa.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./index.js",
|
|
@@ -30,10 +30,6 @@
|
|
|
30
30
|
"url": "https://github.com/electron/node-abi/issues"
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/electron/node-abi#readme",
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@semantic-release/npm": "13.0.0-alpha.15",
|
|
35
|
-
"semantic-release": "^24.2.7"
|
|
36
|
-
},
|
|
37
33
|
"dependencies": {
|
|
38
34
|
"semver": "^7.6.3"
|
|
39
35
|
},
|
|
@@ -42,5 +38,6 @@
|
|
|
42
38
|
},
|
|
43
39
|
"publishConfig": {
|
|
44
40
|
"provenance": true
|
|
45
|
-
}
|
|
41
|
+
},
|
|
42
|
+
"packageManager": "yarn@4.10.3+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f"
|
|
46
43
|
}
|
|
@@ -255,6 +255,7 @@ const isSatisfiable = (comparators, options) => {
|
|
|
255
255
|
// already replaced the hyphen ranges
|
|
256
256
|
// turn into a set of JUST comparators.
|
|
257
257
|
const parseComparator = (comp, options) => {
|
|
258
|
+
comp = comp.replace(re[t.BUILD], '')
|
|
258
259
|
debug('comp', comp, options)
|
|
259
260
|
comp = replaceCarets(comp, options)
|
|
260
261
|
debug('caret', comp)
|
|
@@ -111,11 +111,25 @@ class SemVer {
|
|
|
111
111
|
other = new SemVer(other, this.options)
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
if (this.major < other.major) {
|
|
115
|
+
return -1
|
|
116
|
+
}
|
|
117
|
+
if (this.major > other.major) {
|
|
118
|
+
return 1
|
|
119
|
+
}
|
|
120
|
+
if (this.minor < other.minor) {
|
|
121
|
+
return -1
|
|
122
|
+
}
|
|
123
|
+
if (this.minor > other.minor) {
|
|
124
|
+
return 1
|
|
125
|
+
}
|
|
126
|
+
if (this.patch < other.patch) {
|
|
127
|
+
return -1
|
|
128
|
+
}
|
|
129
|
+
if (this.patch > other.patch) {
|
|
130
|
+
return 1
|
|
131
|
+
}
|
|
132
|
+
return 0
|
|
119
133
|
}
|
|
120
134
|
|
|
121
135
|
comparePre (other) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semver",
|
|
3
|
-
"version": "7.7.
|
|
3
|
+
"version": "7.7.3",
|
|
4
4
|
"description": "The semantic version parser used by npm.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@npmcli/eslint-config": "^5.0.0",
|
|
18
|
-
"@npmcli/template-oss": "4.
|
|
18
|
+
"@npmcli/template-oss": "4.25.1",
|
|
19
19
|
"benchmark": "^2.1.4",
|
|
20
20
|
"tap": "^16.0.0"
|
|
21
21
|
},
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"author": "GitHub Inc.",
|
|
53
53
|
"templateOSS": {
|
|
54
54
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
55
|
-
"version": "4.
|
|
55
|
+
"version": "4.25.1",
|
|
56
56
|
"engines": ">=10",
|
|
57
57
|
"distPaths": [
|
|
58
58
|
"classes/",
|
|
@@ -22,14 +22,11 @@ declare namespace Agent {
|
|
|
22
22
|
export interface Options extends Pool.Options {
|
|
23
23
|
/** Default: `(origin, opts) => new Pool(origin, opts)`. */
|
|
24
24
|
factory?(origin: string | URL, opts: Object): Dispatcher;
|
|
25
|
-
/** Integer. Default: `0` */
|
|
26
|
-
maxRedirections?: number;
|
|
27
25
|
|
|
28
26
|
interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors']
|
|
27
|
+
maxOrigins?: number
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
export interface DispatchOptions extends Dispatcher.DispatchOptions {
|
|
32
|
-
/** Integer. */
|
|
33
|
-
maxRedirections?: number;
|
|
34
31
|
}
|
|
35
32
|
}
|
|
@@ -71,8 +71,6 @@ export declare namespace Client {
|
|
|
71
71
|
/** TODO */
|
|
72
72
|
maxCachedSessions?: number;
|
|
73
73
|
/** TODO */
|
|
74
|
-
maxRedirections?: number;
|
|
75
|
-
/** TODO */
|
|
76
74
|
connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector;
|
|
77
75
|
/** TODO */
|
|
78
76
|
maxRequestsPerClient?: number;
|
|
@@ -135,8 +135,6 @@ declare namespace Dispatcher {
|
|
|
135
135
|
signal?: AbortSignal | EventEmitter | null;
|
|
136
136
|
/** This argument parameter is passed through to `ConnectData` */
|
|
137
137
|
opaque?: TOpaque;
|
|
138
|
-
/** Default: 0 */
|
|
139
|
-
maxRedirections?: number;
|
|
140
138
|
/** Default: false */
|
|
141
139
|
redirectionLimitReached?: boolean;
|
|
142
140
|
/** Default: `null` */
|
|
@@ -147,8 +145,6 @@ declare namespace Dispatcher {
|
|
|
147
145
|
opaque?: TOpaque;
|
|
148
146
|
/** Default: `null` */
|
|
149
147
|
signal?: AbortSignal | EventEmitter | null;
|
|
150
|
-
/** Default: 0 */
|
|
151
|
-
maxRedirections?: number;
|
|
152
148
|
/** Default: false */
|
|
153
149
|
redirectionLimitReached?: boolean;
|
|
154
150
|
/** Default: `null` */
|
|
@@ -172,8 +168,6 @@ declare namespace Dispatcher {
|
|
|
172
168
|
protocol?: string;
|
|
173
169
|
/** Default: `null` */
|
|
174
170
|
signal?: AbortSignal | EventEmitter | null;
|
|
175
|
-
/** Default: 0 */
|
|
176
|
-
maxRedirections?: number;
|
|
177
171
|
/** Default: false */
|
|
178
172
|
redirectionLimitReached?: boolean;
|
|
179
173
|
/** Default: `null` */
|
|
@@ -49,21 +49,6 @@ declare namespace Errors {
|
|
|
49
49
|
headers: IncomingHttpHeaders | string[] | null
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
export class ResponseStatusCodeError extends UndiciError {
|
|
53
|
-
constructor (
|
|
54
|
-
message?: string,
|
|
55
|
-
statusCode?: number,
|
|
56
|
-
headers?: IncomingHttpHeaders | string[] | null,
|
|
57
|
-
body?: null | Record<string, any> | string
|
|
58
|
-
)
|
|
59
|
-
name: 'ResponseStatusCodeError'
|
|
60
|
-
code: 'UND_ERR_RESPONSE_STATUS_CODE'
|
|
61
|
-
body: null | Record<string, any> | string
|
|
62
|
-
status: number
|
|
63
|
-
statusCode: number
|
|
64
|
-
headers: IncomingHttpHeaders | string[] | null
|
|
65
|
-
}
|
|
66
|
-
|
|
67
52
|
/** Passed an invalid argument. */
|
|
68
53
|
export class InvalidArgumentError extends UndiciError {
|
|
69
54
|
name: 'InvalidArgumentError'
|
|
@@ -168,4 +153,9 @@ declare namespace Errors {
|
|
|
168
153
|
name: 'SecureProxyConnectionError'
|
|
169
154
|
code: 'UND_ERR_PRX_TLS'
|
|
170
155
|
}
|
|
156
|
+
|
|
157
|
+
class MaxOriginsReachedError extends UndiciError {
|
|
158
|
+
name: 'MaxOriginsReachedError'
|
|
159
|
+
code: 'UND_ERR_MAX_ORIGINS_REACHED'
|
|
160
|
+
}
|
|
171
161
|
}
|
|
@@ -56,6 +56,11 @@ export declare const EventSource: {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
interface EventSourceInit {
|
|
59
|
-
withCredentials?: boolean
|
|
59
|
+
withCredentials?: boolean
|
|
60
|
+
// @deprecated use `node.dispatcher` instead
|
|
60
61
|
dispatcher?: Dispatcher
|
|
62
|
+
node?: {
|
|
63
|
+
dispatcher?: Dispatcher
|
|
64
|
+
reconnectionTime?: number
|
|
65
|
+
}
|
|
61
66
|
}
|
|
@@ -51,8 +51,6 @@ export declare namespace H2CClient {
|
|
|
51
51
|
/** TODO */
|
|
52
52
|
maxCachedSessions?: number;
|
|
53
53
|
/** TODO */
|
|
54
|
-
maxRedirections?: number;
|
|
55
|
-
/** TODO */
|
|
56
54
|
connect?: Omit<Partial<buildConnector.BuildOptions>, 'allowH2'> | buildConnector.connector;
|
|
57
55
|
/** TODO */
|
|
58
56
|
maxRequestsPerClient?: number;
|
|
@@ -13,6 +13,7 @@ import Agent from './agent'
|
|
|
13
13
|
import MockClient from './mock-client'
|
|
14
14
|
import MockPool from './mock-pool'
|
|
15
15
|
import MockAgent from './mock-agent'
|
|
16
|
+
import { SnapshotAgent } from './snapshot-agent'
|
|
16
17
|
import { MockCallHistory, MockCallHistoryLog } from './mock-call-history'
|
|
17
18
|
import mockErrors from './mock-errors'
|
|
18
19
|
import ProxyAgent from './proxy-agent'
|
|
@@ -33,7 +34,9 @@ export * from './content-type'
|
|
|
33
34
|
export * from './cache'
|
|
34
35
|
export { Interceptable } from './mock-interceptor'
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
declare function globalThisInstall (): void
|
|
38
|
+
|
|
39
|
+
export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install }
|
|
37
40
|
export default Undici
|
|
38
41
|
|
|
39
42
|
declare namespace Undici {
|
|
@@ -58,6 +61,7 @@ declare namespace Undici {
|
|
|
58
61
|
const MockClient: typeof import('./mock-client').default
|
|
59
62
|
const MockPool: typeof import('./mock-pool').default
|
|
60
63
|
const MockAgent: typeof import('./mock-agent').default
|
|
64
|
+
const SnapshotAgent: typeof import('./snapshot-agent').SnapshotAgent
|
|
61
65
|
const MockCallHistory: typeof import('./mock-call-history').MockCallHistory
|
|
62
66
|
const MockCallHistoryLog: typeof import('./mock-call-history').MockCallHistoryLog
|
|
63
67
|
const mockErrors: typeof import('./mock-errors').default
|
|
@@ -72,4 +76,5 @@ declare namespace Undici {
|
|
|
72
76
|
MemoryCacheStore: typeof import('./cache-interceptor').default.MemoryCacheStore,
|
|
73
77
|
SqliteCacheStore: typeof import('./cache-interceptor').default.SqliteCacheStore
|
|
74
78
|
}
|
|
79
|
+
const install: typeof globalThisInstall
|
|
75
80
|
}
|
|
@@ -9,6 +9,10 @@ declare namespace Interceptors {
|
|
|
9
9
|
export type DumpInterceptorOpts = { maxSize?: number }
|
|
10
10
|
export type RetryInterceptorOpts = RetryHandler.RetryOptions
|
|
11
11
|
export type RedirectInterceptorOpts = { maxRedirections?: number }
|
|
12
|
+
export type DecompressInterceptorOpts = {
|
|
13
|
+
skipErrorResponses?: boolean
|
|
14
|
+
skipStatusCodes?: number[]
|
|
15
|
+
}
|
|
12
16
|
|
|
13
17
|
export type ResponseErrorInterceptorOpts = { throwOnError: boolean }
|
|
14
18
|
export type CacheInterceptorOpts = CacheHandler.CacheOptions
|
|
@@ -28,6 +32,7 @@ declare namespace Interceptors {
|
|
|
28
32
|
export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
29
33
|
export function retry (opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
30
34
|
export function redirect (opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
35
|
+
export function decompress (opts?: DecompressInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
31
36
|
export function responseError (opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
32
37
|
export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
33
38
|
export function cache (opts?: CacheInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
@@ -69,7 +69,6 @@ declare namespace MockInterceptor {
|
|
|
69
69
|
headers?: Headers | Record<string, string>;
|
|
70
70
|
origin?: string;
|
|
71
71
|
body?: BodyInit | Dispatcher.DispatchOptions['body'] | null;
|
|
72
|
-
maxRedirections?: number;
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
export type MockResponseDataHandler<TData extends object = object> = (
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import MockAgent from './mock-agent'
|
|
2
|
+
|
|
3
|
+
declare class SnapshotRecorder {
|
|
4
|
+
constructor (options?: SnapshotRecorder.Options)
|
|
5
|
+
|
|
6
|
+
record (requestOpts: any, response: any): Promise<void>
|
|
7
|
+
findSnapshot (requestOpts: any): SnapshotRecorder.Snapshot | undefined
|
|
8
|
+
loadSnapshots (filePath?: string): Promise<void>
|
|
9
|
+
saveSnapshots (filePath?: string): Promise<void>
|
|
10
|
+
clear (): void
|
|
11
|
+
getSnapshots (): SnapshotRecorder.Snapshot[]
|
|
12
|
+
size (): number
|
|
13
|
+
resetCallCounts (): void
|
|
14
|
+
deleteSnapshot (requestOpts: any): boolean
|
|
15
|
+
getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null
|
|
16
|
+
replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void
|
|
17
|
+
destroy (): void
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare namespace SnapshotRecorder {
|
|
21
|
+
type SnapshotRecorderMode = 'record' | 'playback' | 'update'
|
|
22
|
+
|
|
23
|
+
export interface Options {
|
|
24
|
+
snapshotPath?: string
|
|
25
|
+
mode?: SnapshotRecorderMode
|
|
26
|
+
maxSnapshots?: number
|
|
27
|
+
autoFlush?: boolean
|
|
28
|
+
flushInterval?: number
|
|
29
|
+
matchHeaders?: string[]
|
|
30
|
+
ignoreHeaders?: string[]
|
|
31
|
+
excludeHeaders?: string[]
|
|
32
|
+
matchBody?: boolean
|
|
33
|
+
matchQuery?: boolean
|
|
34
|
+
caseSensitive?: boolean
|
|
35
|
+
shouldRecord?: (requestOpts: any) => boolean
|
|
36
|
+
shouldPlayback?: (requestOpts: any) => boolean
|
|
37
|
+
excludeUrls?: (string | RegExp)[]
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface Snapshot {
|
|
41
|
+
request: {
|
|
42
|
+
method: string
|
|
43
|
+
url: string
|
|
44
|
+
headers: Record<string, string>
|
|
45
|
+
body?: string
|
|
46
|
+
}
|
|
47
|
+
responses: {
|
|
48
|
+
statusCode: number
|
|
49
|
+
headers: Record<string, string>
|
|
50
|
+
body: string
|
|
51
|
+
trailers: Record<string, string>
|
|
52
|
+
}[]
|
|
53
|
+
callCount: number
|
|
54
|
+
timestamp: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface SnapshotInfo {
|
|
58
|
+
hash: string
|
|
59
|
+
request: {
|
|
60
|
+
method: string
|
|
61
|
+
url: string
|
|
62
|
+
headers: Record<string, string>
|
|
63
|
+
body?: string
|
|
64
|
+
}
|
|
65
|
+
responseCount: number
|
|
66
|
+
callCount: number
|
|
67
|
+
timestamp: string
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface SnapshotData {
|
|
71
|
+
hash: string
|
|
72
|
+
snapshot: Snapshot
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare class SnapshotAgent extends MockAgent {
|
|
77
|
+
constructor (options?: SnapshotAgent.Options)
|
|
78
|
+
|
|
79
|
+
saveSnapshots (filePath?: string): Promise<void>
|
|
80
|
+
loadSnapshots (filePath?: string): Promise<void>
|
|
81
|
+
getRecorder (): SnapshotRecorder
|
|
82
|
+
getMode (): SnapshotRecorder.SnapshotRecorderMode
|
|
83
|
+
clearSnapshots (): void
|
|
84
|
+
resetCallCounts (): void
|
|
85
|
+
deleteSnapshot (requestOpts: any): boolean
|
|
86
|
+
getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null
|
|
87
|
+
replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
declare namespace SnapshotAgent {
|
|
91
|
+
export interface Options extends MockAgent.Options {
|
|
92
|
+
mode?: SnapshotRecorder.SnapshotRecorderMode
|
|
93
|
+
snapshotPath?: string
|
|
94
|
+
maxSnapshots?: number
|
|
95
|
+
autoFlush?: boolean
|
|
96
|
+
flushInterval?: number
|
|
97
|
+
matchHeaders?: string[]
|
|
98
|
+
ignoreHeaders?: string[]
|
|
99
|
+
excludeHeaders?: string[]
|
|
100
|
+
matchBody?: boolean
|
|
101
|
+
matchQuery?: boolean
|
|
102
|
+
caseSensitive?: boolean
|
|
103
|
+
shouldRecord?: (requestOpts: any) => boolean
|
|
104
|
+
shouldPlayback?: (requestOpts: any) => boolean
|
|
105
|
+
excludeUrls?: (string | RegExp)[]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export { SnapshotAgent, SnapshotRecorder }
|