@contrast/agent-bundle 5.41.0 → 5.42.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/node_modules/@contrast/agent/package.json +5 -4
- package/node_modules/@contrast/agentify/package.json +2 -2
- package/node_modules/@contrast/assess/package.json +2 -2
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.d.ts +11 -11
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.js +76 -86
- package/node_modules/@contrast/reporter/package.json +1 -1
- package/node_modules/@contrast/route-coverage/lib/install/hapi.js +9 -2
- package/node_modules/@contrast/route-coverage/package.json +1 -1
- package/node_modules/@swc/types/index.d.ts +3 -2
- package/node_modules/@swc/types/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/crypto.d.ts +17 -1
- package/node_modules/@types/node/fs/promises.d.ts +7 -3
- package/node_modules/@types/node/fs.d.ts +0 -2
- package/node_modules/@types/node/http2.d.ts +13 -11
- package/node_modules/@types/node/inspector.d.ts +110 -6
- package/node_modules/@types/node/module.d.ts +24 -0
- package/node_modules/@types/node/package.json +4 -9
- package/node_modules/@types/node/perf_hooks.d.ts +14 -0
- package/node_modules/@types/node/repl.d.ts +11 -1
- package/node_modules/@types/node/sqlite.d.ts +0 -1
- package/node_modules/@types/node/stream/web.d.ts +4 -0
- package/node_modules/@types/node/stream.d.ts +17 -6
- package/node_modules/@types/node/test.d.ts +16 -1
- package/node_modules/@types/node/timers.d.ts +0 -2
- package/node_modules/@types/node/url.d.ts +1 -1
- package/node_modules/@types/node/util.d.ts +6 -2
- package/node_modules/@types/node/worker_threads.d.ts +12 -0
- package/node_modules/@types/node/zlib.d.ts +8 -2
- package/node_modules/undici-types/agent.d.ts +4 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +6 -3
- package/node_modules/undici-types/mock-agent.d.ts +3 -0
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/pool.d.ts +2 -0
- package/node_modules/undici-types/proxy-agent.d.ts +1 -0
- package/node_modules/yaml/README.md +2 -20
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +1 -1
- package/node_modules/yaml/dist/stringify/stringifyString.js +1 -1
- package/node_modules/yaml/package.json +2 -1
- package/package.json +3 -2
- package/node_modules/@types/node/ts5.1/compatibility/disposable.d.ts +0 -12
- package/node_modules/@types/node/ts5.1/index.d.ts +0 -98
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { URL } from 'url'
|
|
2
2
|
import Pool from './pool'
|
|
3
3
|
import Dispatcher from './dispatcher'
|
|
4
|
+
import TClientStats from './client-stats'
|
|
5
|
+
import TPoolStats from './pool-stats'
|
|
4
6
|
|
|
5
7
|
export default Agent
|
|
6
8
|
|
|
@@ -12,6 +14,8 @@ declare class Agent extends Dispatcher {
|
|
|
12
14
|
destroyed: boolean
|
|
13
15
|
/** Dispatches a request. */
|
|
14
16
|
dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
|
|
17
|
+
/** Aggregate stats for a Agent by origin. */
|
|
18
|
+
readonly stats: Record<string, TClientStats | TPoolStats>
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
declare namespace Agent {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Client from './client'
|
|
2
|
+
|
|
3
|
+
export default ClientStats
|
|
4
|
+
|
|
5
|
+
declare class ClientStats {
|
|
6
|
+
constructor (pool: Client)
|
|
7
|
+
/** If socket has open connection. */
|
|
8
|
+
connected: boolean
|
|
9
|
+
/** Number of open socket connections in this client that do not have an active request. */
|
|
10
|
+
pending: number
|
|
11
|
+
/** Number of currently active requests of this client. */
|
|
12
|
+
running: number
|
|
13
|
+
/** Number of active, pending, or queued requests of this client. */
|
|
14
|
+
size: number
|
|
15
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { URL } from 'url'
|
|
2
2
|
import Dispatcher from './dispatcher'
|
|
3
3
|
import buildConnector from './connector'
|
|
4
|
+
import TClientStats from './client-stats'
|
|
4
5
|
|
|
5
6
|
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
|
|
6
7
|
|
|
@@ -15,6 +16,8 @@ export class Client extends Dispatcher {
|
|
|
15
16
|
closed: boolean
|
|
16
17
|
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
|
|
17
18
|
destroyed: boolean
|
|
19
|
+
/** Aggregate stats for a Client. */
|
|
20
|
+
readonly stats: TClientStats
|
|
18
21
|
|
|
19
22
|
// Override dispatcher APIs.
|
|
20
23
|
override connect (
|
|
@@ -84,13 +87,13 @@ export declare namespace Client {
|
|
|
84
87
|
/**
|
|
85
88
|
* @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
|
|
86
89
|
* @default false
|
|
87
|
-
|
|
90
|
+
*/
|
|
88
91
|
allowH2?: boolean;
|
|
89
92
|
/**
|
|
90
93
|
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
|
|
91
94
|
* @default 100
|
|
92
|
-
|
|
93
|
-
maxConcurrentStreams?: number
|
|
95
|
+
*/
|
|
96
|
+
maxConcurrentStreams?: number;
|
|
94
97
|
}
|
|
95
98
|
export interface SocketInfo {
|
|
96
99
|
localAddress?: string
|
|
@@ -59,6 +59,9 @@ declare namespace MockAgent {
|
|
|
59
59
|
/** Ignore trailing slashes in the path */
|
|
60
60
|
ignoreTrailingSlash?: boolean;
|
|
61
61
|
|
|
62
|
+
/** Accept URLs with search parameters using non standard syntaxes. default false */
|
|
63
|
+
acceptNonStandardSearchParameters?: boolean;
|
|
64
|
+
|
|
62
65
|
/** Enable call history. you can either call MockAgent.enableCallHistory(). default false */
|
|
63
66
|
enableCallHistory?: boolean
|
|
64
67
|
}
|
|
@@ -33,6 +33,8 @@ declare namespace Pool {
|
|
|
33
33
|
factory?(origin: URL, opts: object): Dispatcher;
|
|
34
34
|
/** The max number of clients to create. `null` if no limit. Default `null`. */
|
|
35
35
|
connections?: number | null;
|
|
36
|
+
/** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */
|
|
37
|
+
clientTtl?: number | null;
|
|
36
38
|
|
|
37
39
|
interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors']
|
|
38
40
|
}
|
|
@@ -20,6 +20,8 @@ This requirement may be updated between minor versions of the library.
|
|
|
20
20
|
|
|
21
21
|
For more information, see the project's documentation site: [**eemeli.org/yaml**](https://eemeli.org/yaml/)
|
|
22
22
|
|
|
23
|
+
For build instructions and contribution guidelines, see [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md).
|
|
24
|
+
|
|
23
25
|
To install:
|
|
24
26
|
|
|
25
27
|
```sh
|
|
@@ -30,26 +32,6 @@ deno add jsr:@eemeli/yaml
|
|
|
30
32
|
|
|
31
33
|
**Note:** These docs are for `yaml@2`. For v1, see the [v1.10.0 tag](https://github.com/eemeli/yaml/tree/v1.10.0) for the source and [eemeli.org/yaml/v1](https://eemeli.org/yaml/v1/) for the documentation.
|
|
32
34
|
|
|
33
|
-
The development and maintenance of this library is [sponsored](https://github.com/sponsors/eemeli) by:
|
|
34
|
-
|
|
35
|
-
<p align="center" width="100%">
|
|
36
|
-
<a href="https://www.scipress.io/"
|
|
37
|
-
><img
|
|
38
|
-
width="150"
|
|
39
|
-
align="top"
|
|
40
|
-
src="https://eemeli.org/yaml/images/scipress.svg"
|
|
41
|
-
alt="Scipress"
|
|
42
|
-
/></a>
|
|
43
|
-
|
|
44
|
-
<a href="https://manifest.build/"
|
|
45
|
-
><img
|
|
46
|
-
width="150"
|
|
47
|
-
align="top"
|
|
48
|
-
src="https://eemeli.org/yaml/images/manifest.svg"
|
|
49
|
-
alt="Manifest"
|
|
50
|
-
/></a>
|
|
51
|
-
</p>
|
|
52
|
-
|
|
53
35
|
## API Overview
|
|
54
36
|
|
|
55
37
|
The API provided by `yaml` has three layers, depending on how deep you need to go: [Parse & Stringify](https://eemeli.org/yaml/#parse-amp-stringify), [Documents](https://eemeli.org/yaml/#documents), and the underlying [Lexer/Parser/Composer](https://eemeli.org/yaml/#parsing-yaml).
|
|
@@ -159,7 +159,7 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
|
159
159
|
const { blockQuote, commentString, lineWidth } = ctx.options;
|
|
160
160
|
// 1. Block can't end in whitespace unless the last line is non-empty.
|
|
161
161
|
// 2. Strings consisting of only whitespace are best rendered explicitly.
|
|
162
|
-
if (!blockQuote || /\n[\t ]+$/.test(value)
|
|
162
|
+
if (!blockQuote || /\n[\t ]+$/.test(value)) {
|
|
163
163
|
return quotedString(value, ctx);
|
|
164
164
|
}
|
|
165
165
|
const indent = ctx.indent ||
|
|
@@ -161,7 +161,7 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
|
161
161
|
const { blockQuote, commentString, lineWidth } = ctx.options;
|
|
162
162
|
// 1. Block can't end in whitespace unless the last line is non-empty.
|
|
163
163
|
// 2. Strings consisting of only whitespace are best rendered explicitly.
|
|
164
|
-
if (!blockQuote || /\n[\t ]+$/.test(value)
|
|
164
|
+
if (!blockQuote || /\n[\t ]+$/.test(value)) {
|
|
165
165
|
return quotedString(value, ctx);
|
|
166
166
|
}
|
|
167
167
|
const indent = ctx.indent ||
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yaml",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"author": "Eemeli Aro <eemeli@gmail.com>",
|
|
6
6
|
"repository": "github:eemeli/yaml",
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"eslint-config-prettier": "^9.0.0",
|
|
84
84
|
"fast-check": "^2.12.0",
|
|
85
85
|
"jest": "^29.0.1",
|
|
86
|
+
"jest-resolve": "^29.7.0",
|
|
86
87
|
"jest-ts-webcompat-resolver": "^1.0.0",
|
|
87
88
|
"prettier": "^3.0.2",
|
|
88
89
|
"rollup": "^4.12.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/agent-bundle",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.42.0",
|
|
4
4
|
"description": "Contrast Security Node.js Agent bundle with all dependencies included",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"./lib/esm-loader.mjs": "./lib/esm-loader.mjs",
|
|
19
19
|
"./lib/index.js": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
+
"main": "./lib/index.js",
|
|
21
22
|
"engines": {
|
|
22
23
|
"npm": ">=6.13.7 <7 || >= 8.3.1",
|
|
23
24
|
"node": ">=16.9.1 <17 || >=18.7.0 <19 || >=20.6.0 <21 || >= 22.5.1 <23"
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
"test": "bash ../scripts/test.sh"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@contrast/agent": "5.
|
|
30
|
+
"@contrast/agent": "5.42.0"
|
|
30
31
|
},
|
|
31
32
|
"bundleDependencies": [
|
|
32
33
|
"@contrast/agent"
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* License for programmatically and manually incorporated
|
|
3
|
-
* documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
|
|
4
|
-
*
|
|
5
|
-
* Copyright Node.js contributors. All rights reserved.
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to
|
|
8
|
-
* deal in the Software without restriction, including without limitation the
|
|
9
|
-
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
10
|
-
* sell copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
|
14
|
-
* all copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
-
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
22
|
-
* IN THE SOFTWARE.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
// NOTE: These definitions support Node.js and TypeScript 5.1.
|
|
26
|
-
|
|
27
|
-
// Reference required TypeScript libraries:
|
|
28
|
-
/// <reference lib="es2020" />
|
|
29
|
-
|
|
30
|
-
// TypeScript library polyfills required for TypeScript <=5.1:
|
|
31
|
-
/// <reference path="./compatibility/disposable.d.ts" />
|
|
32
|
-
|
|
33
|
-
// TypeScript library polyfills required for TypeScript <=5.6:
|
|
34
|
-
/// <reference path="../ts5.6/compatibility/float16array.d.ts" />
|
|
35
|
-
|
|
36
|
-
// Iterator definitions required for compatibility with TypeScript <5.6:
|
|
37
|
-
/// <reference path="../compatibility/iterators.d.ts" />
|
|
38
|
-
|
|
39
|
-
// Definitions for Node.js modules specific to TypeScript <=5.6:
|
|
40
|
-
/// <reference path="../ts5.6/globals.typedarray.d.ts" />
|
|
41
|
-
/// <reference path="../ts5.6/buffer.buffer.d.ts" />
|
|
42
|
-
|
|
43
|
-
// Definitions for Node.js modules that are not specific to any version of TypeScript:
|
|
44
|
-
/// <reference path="../globals.d.ts" />
|
|
45
|
-
/// <reference path="../assert.d.ts" />
|
|
46
|
-
/// <reference path="../assert/strict.d.ts" />
|
|
47
|
-
/// <reference path="../async_hooks.d.ts" />
|
|
48
|
-
/// <reference path="../buffer.d.ts" />
|
|
49
|
-
/// <reference path="../child_process.d.ts" />
|
|
50
|
-
/// <reference path="../cluster.d.ts" />
|
|
51
|
-
/// <reference path="../console.d.ts" />
|
|
52
|
-
/// <reference path="../constants.d.ts" />
|
|
53
|
-
/// <reference path="../crypto.d.ts" />
|
|
54
|
-
/// <reference path="../dgram.d.ts" />
|
|
55
|
-
/// <reference path="../diagnostics_channel.d.ts" />
|
|
56
|
-
/// <reference path="../dns.d.ts" />
|
|
57
|
-
/// <reference path="../dns/promises.d.ts" />
|
|
58
|
-
/// <reference path="../dns/promises.d.ts" />
|
|
59
|
-
/// <reference path="../domain.d.ts" />
|
|
60
|
-
/// <reference path="../dom-events.d.ts" />
|
|
61
|
-
/// <reference path="../events.d.ts" />
|
|
62
|
-
/// <reference path="../fs.d.ts" />
|
|
63
|
-
/// <reference path="../fs/promises.d.ts" />
|
|
64
|
-
/// <reference path="../http.d.ts" />
|
|
65
|
-
/// <reference path="../http2.d.ts" />
|
|
66
|
-
/// <reference path="../https.d.ts" />
|
|
67
|
-
/// <reference path="../inspector.d.ts" />
|
|
68
|
-
/// <reference path="../module.d.ts" />
|
|
69
|
-
/// <reference path="../net.d.ts" />
|
|
70
|
-
/// <reference path="../os.d.ts" />
|
|
71
|
-
/// <reference path="../path.d.ts" />
|
|
72
|
-
/// <reference path="../perf_hooks.d.ts" />
|
|
73
|
-
/// <reference path="../process.d.ts" />
|
|
74
|
-
/// <reference path="../punycode.d.ts" />
|
|
75
|
-
/// <reference path="../querystring.d.ts" />
|
|
76
|
-
/// <reference path="../readline.d.ts" />
|
|
77
|
-
/// <reference path="../readline/promises.d.ts" />
|
|
78
|
-
/// <reference path="../repl.d.ts" />
|
|
79
|
-
/// <reference path="../sea.d.ts" />
|
|
80
|
-
/// <reference path="../sqlite.d.ts" />
|
|
81
|
-
/// <reference path="../stream.d.ts" />
|
|
82
|
-
/// <reference path="../stream/promises.d.ts" />
|
|
83
|
-
/// <reference path="../stream/consumers.d.ts" />
|
|
84
|
-
/// <reference path="../stream/web.d.ts" />
|
|
85
|
-
/// <reference path="../string_decoder.d.ts" />
|
|
86
|
-
/// <reference path="../test.d.ts" />
|
|
87
|
-
/// <reference path="../timers.d.ts" />
|
|
88
|
-
/// <reference path="../timers/promises.d.ts" />
|
|
89
|
-
/// <reference path="../tls.d.ts" />
|
|
90
|
-
/// <reference path="../trace_events.d.ts" />
|
|
91
|
-
/// <reference path="../tty.d.ts" />
|
|
92
|
-
/// <reference path="../url.d.ts" />
|
|
93
|
-
/// <reference path="../util.d.ts" />
|
|
94
|
-
/// <reference path="../v8.d.ts" />
|
|
95
|
-
/// <reference path="../vm.d.ts" />
|
|
96
|
-
/// <reference path="../wasi.d.ts" />
|
|
97
|
-
/// <reference path="../worker_threads.d.ts" />
|
|
98
|
-
/// <reference path="../zlib.d.ts" />
|