@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
|
@@ -45,22 +45,22 @@ declare module "stream" {
|
|
|
45
45
|
emitClose?: boolean | undefined;
|
|
46
46
|
highWaterMark?: number | undefined;
|
|
47
47
|
objectMode?: boolean | undefined;
|
|
48
|
-
construct
|
|
49
|
-
destroy
|
|
48
|
+
construct?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
|
|
49
|
+
destroy?: ((this: T, error: Error | null, callback: (error?: Error | null) => void) => void) | undefined;
|
|
50
50
|
autoDestroy?: boolean | undefined;
|
|
51
51
|
}
|
|
52
52
|
interface ReadableOptions<T extends Readable = Readable> extends StreamOptions<T> {
|
|
53
53
|
encoding?: BufferEncoding | undefined;
|
|
54
|
-
read
|
|
54
|
+
read?: ((this: T, size: number) => void) | undefined;
|
|
55
55
|
}
|
|
56
56
|
interface ArrayOptions {
|
|
57
57
|
/**
|
|
58
58
|
* The maximum concurrent invocations of `fn` to call on the stream at once.
|
|
59
59
|
* @default 1
|
|
60
60
|
*/
|
|
61
|
-
concurrency?: number;
|
|
61
|
+
concurrency?: number | undefined;
|
|
62
62
|
/** Allows destroying the stream if the signal is aborted. */
|
|
63
|
-
signal?: AbortSignal;
|
|
63
|
+
signal?: AbortSignal | undefined;
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* @since v0.9.4
|
|
@@ -697,21 +697,25 @@ declare module "stream" {
|
|
|
697
697
|
interface WritableOptions<T extends Writable = Writable> extends StreamOptions<T> {
|
|
698
698
|
decodeStrings?: boolean | undefined;
|
|
699
699
|
defaultEncoding?: BufferEncoding | undefined;
|
|
700
|
-
write
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
700
|
+
write?:
|
|
701
|
+
| ((
|
|
702
|
+
this: T,
|
|
703
|
+
chunk: any,
|
|
704
|
+
encoding: BufferEncoding,
|
|
705
|
+
callback: (error?: Error | null) => void,
|
|
706
|
+
) => void)
|
|
707
|
+
| undefined;
|
|
708
|
+
writev?:
|
|
709
|
+
| ((
|
|
710
|
+
this: T,
|
|
711
|
+
chunks: Array<{
|
|
712
|
+
chunk: any;
|
|
713
|
+
encoding: BufferEncoding;
|
|
714
|
+
}>,
|
|
715
|
+
callback: (error?: Error | null) => void,
|
|
716
|
+
) => void)
|
|
717
|
+
| undefined;
|
|
718
|
+
final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
|
|
715
719
|
}
|
|
716
720
|
/**
|
|
717
721
|
* @since v0.9.4
|
|
@@ -1235,8 +1239,10 @@ declare module "stream" {
|
|
|
1235
1239
|
function duplexPair(options?: DuplexOptions): [Duplex, Duplex];
|
|
1236
1240
|
type TransformCallback = (error?: Error | null, data?: any) => void;
|
|
1237
1241
|
interface TransformOptions<T extends Transform = Transform> extends DuplexOptions<T> {
|
|
1238
|
-
transform
|
|
1239
|
-
|
|
1242
|
+
transform?:
|
|
1243
|
+
| ((this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback) => void)
|
|
1244
|
+
| undefined;
|
|
1245
|
+
flush?: ((this: T, callback: TransformCallback) => void) | undefined;
|
|
1240
1246
|
}
|
|
1241
1247
|
/**
|
|
1242
1248
|
* Transform streams are `Duplex` streams where the output is in some way
|
|
@@ -1643,12 +1649,14 @@ declare module "stream" {
|
|
|
1643
1649
|
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
|
|
1644
1650
|
): Promise<void>;
|
|
1645
1651
|
}
|
|
1652
|
+
// TODO: this interface never existed; remove in next major
|
|
1646
1653
|
interface Pipe {
|
|
1647
1654
|
close(): void;
|
|
1648
1655
|
hasRef(): boolean;
|
|
1649
1656
|
ref(): void;
|
|
1650
1657
|
unref(): void;
|
|
1651
1658
|
}
|
|
1659
|
+
// TODO: these should all take webstream arguments
|
|
1652
1660
|
/**
|
|
1653
1661
|
* Returns whether the stream has encountered an error.
|
|
1654
1662
|
* @since v17.3.0, v16.14.0
|
|
@@ -1657,8 +1665,15 @@ declare module "stream" {
|
|
|
1657
1665
|
/**
|
|
1658
1666
|
* Returns whether the stream is readable.
|
|
1659
1667
|
* @since v17.4.0, v16.14.0
|
|
1668
|
+
* @returns Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`.
|
|
1669
|
+
*/
|
|
1670
|
+
function isReadable(stream: Readable | NodeJS.ReadableStream): boolean | null;
|
|
1671
|
+
/**
|
|
1672
|
+
* Returns whether the stream is writable.
|
|
1673
|
+
* @since v20.0.0
|
|
1674
|
+
* @returns Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`.
|
|
1660
1675
|
*/
|
|
1661
|
-
function
|
|
1676
|
+
function isWritable(stream: Writable | NodeJS.WritableStream): boolean | null;
|
|
1662
1677
|
}
|
|
1663
1678
|
export = Stream;
|
|
1664
1679
|
}
|
|
@@ -48,7 +48,7 @@ declare module "string_decoder" {
|
|
|
48
48
|
* @since v0.1.99
|
|
49
49
|
* @param buffer The bytes to decode.
|
|
50
50
|
*/
|
|
51
|
-
write(buffer: string |
|
|
51
|
+
write(buffer: string | NodeJS.ArrayBufferView): string;
|
|
52
52
|
/**
|
|
53
53
|
* Returns any remaining input stored in the internal buffer as a string. Bytes
|
|
54
54
|
* representing incomplete UTF-8 and UTF-16 characters will be replaced with
|
|
@@ -59,7 +59,7 @@ declare module "string_decoder" {
|
|
|
59
59
|
* @since v0.9.3
|
|
60
60
|
* @param buffer The bytes to decode.
|
|
61
61
|
*/
|
|
62
|
-
end(buffer?: string |
|
|
62
|
+
end(buffer?: string | NodeJS.ArrayBufferView): string;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
declare module "node:string_decoder" {
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/test.js)
|
|
80
80
|
*/
|
|
81
81
|
declare module "node:test" {
|
|
82
|
+
import { AssertMethodNames } from "node:assert";
|
|
82
83
|
import { Readable } from "node:stream";
|
|
83
84
|
import TestFn = test.TestFn;
|
|
84
85
|
import TestOptions = test.TestOptions;
|
|
@@ -342,6 +343,13 @@ declare module "node:test" {
|
|
|
342
343
|
* @default undefined
|
|
343
344
|
*/
|
|
344
345
|
shard?: TestShard | undefined;
|
|
346
|
+
/**
|
|
347
|
+
* A file path where the test runner will
|
|
348
|
+
* store the state of the tests to allow rerunning only the failed tests on a next run.
|
|
349
|
+
* @since v24.7.0
|
|
350
|
+
* @default undefined
|
|
351
|
+
*/
|
|
352
|
+
rerunFailuresFilePath?: string | undefined;
|
|
345
353
|
/**
|
|
346
354
|
* enable [code coverage](https://nodejs.org/docs/latest-v24.x/api/test.html#collecting-code-coverage) collection.
|
|
347
355
|
* @since v22.10.0
|
|
@@ -710,7 +718,7 @@ declare module "node:test" {
|
|
|
710
718
|
/**
|
|
711
719
|
* The type of the test, used to denote whether this is a suite.
|
|
712
720
|
*/
|
|
713
|
-
type?: "suite";
|
|
721
|
+
type?: "suite" | "test";
|
|
714
722
|
};
|
|
715
723
|
/**
|
|
716
724
|
* The test name.
|
|
@@ -780,7 +788,13 @@ declare module "node:test" {
|
|
|
780
788
|
* The type of the test, used to denote whether this is a suite.
|
|
781
789
|
* @since v20.0.0, v19.9.0, v18.17.0
|
|
782
790
|
*/
|
|
783
|
-
type?: "suite";
|
|
791
|
+
type?: "suite" | "test";
|
|
792
|
+
/**
|
|
793
|
+
* The attempt number of the test run,
|
|
794
|
+
* present only when using the `--test-rerun-failures` flag.
|
|
795
|
+
* @since v24.7.0
|
|
796
|
+
*/
|
|
797
|
+
attempt?: number;
|
|
784
798
|
};
|
|
785
799
|
/**
|
|
786
800
|
* The test name.
|
|
@@ -816,7 +830,19 @@ declare module "node:test" {
|
|
|
816
830
|
* The type of the test, used to denote whether this is a suite.
|
|
817
831
|
* @since 20.0.0, 19.9.0, 18.17.0
|
|
818
832
|
*/
|
|
819
|
-
type?: "suite";
|
|
833
|
+
type?: "suite" | "test";
|
|
834
|
+
/**
|
|
835
|
+
* The attempt number of the test run,
|
|
836
|
+
* present only when using the `--test-rerun-failures` flag.
|
|
837
|
+
* @since v24.7.0
|
|
838
|
+
*/
|
|
839
|
+
attempt?: number;
|
|
840
|
+
/**
|
|
841
|
+
* The attempt number the test passed on,
|
|
842
|
+
* present only when using the `--test-rerun-failures` flag.
|
|
843
|
+
* @since v24.7.0
|
|
844
|
+
*/
|
|
845
|
+
passed_on_attempt?: number;
|
|
820
846
|
};
|
|
821
847
|
/**
|
|
822
848
|
* The test name.
|
|
@@ -961,6 +987,7 @@ declare module "node:test" {
|
|
|
961
987
|
* @since v22.2.0, v20.15.0
|
|
962
988
|
*/
|
|
963
989
|
readonly assert: TestContextAssert;
|
|
990
|
+
readonly attempt: number;
|
|
964
991
|
/**
|
|
965
992
|
* This function is used to create a hook running before subtest of the current test.
|
|
966
993
|
* @param fn The hook function. The first argument to this function is a `TestContext` object.
|
|
@@ -1171,29 +1198,7 @@ declare module "node:test" {
|
|
|
1171
1198
|
*/
|
|
1172
1199
|
readonly mock: MockTracker;
|
|
1173
1200
|
}
|
|
1174
|
-
interface TestContextAssert extends
|
|
1175
|
-
Pick<
|
|
1176
|
-
typeof import("assert"),
|
|
1177
|
-
| "deepEqual"
|
|
1178
|
-
| "deepStrictEqual"
|
|
1179
|
-
| "doesNotMatch"
|
|
1180
|
-
| "doesNotReject"
|
|
1181
|
-
| "doesNotThrow"
|
|
1182
|
-
| "equal"
|
|
1183
|
-
| "fail"
|
|
1184
|
-
| "ifError"
|
|
1185
|
-
| "match"
|
|
1186
|
-
| "notDeepEqual"
|
|
1187
|
-
| "notDeepStrictEqual"
|
|
1188
|
-
| "notEqual"
|
|
1189
|
-
| "notStrictEqual"
|
|
1190
|
-
| "ok"
|
|
1191
|
-
| "partialDeepStrictEqual"
|
|
1192
|
-
| "rejects"
|
|
1193
|
-
| "strictEqual"
|
|
1194
|
-
| "throws"
|
|
1195
|
-
>
|
|
1196
|
-
{
|
|
1201
|
+
interface TestContextAssert extends Pick<typeof import("assert"), AssertMethodNames> {
|
|
1197
1202
|
/**
|
|
1198
1203
|
* This function serializes `value` and writes it to the file specified by `path`.
|
|
1199
1204
|
*
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/tls.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module "tls" {
|
|
12
|
+
import { NonSharedBuffer } from "node:buffer";
|
|
12
13
|
import { X509Certificate } from "node:crypto";
|
|
13
14
|
import * as net from "node:net";
|
|
14
15
|
import * as stream from "stream";
|
|
@@ -49,7 +50,7 @@ declare module "tls" {
|
|
|
49
50
|
/**
|
|
50
51
|
* The DER encoded X.509 certificate data.
|
|
51
52
|
*/
|
|
52
|
-
raw:
|
|
53
|
+
raw: NonSharedBuffer;
|
|
53
54
|
/**
|
|
54
55
|
* The certificate subject.
|
|
55
56
|
*/
|
|
@@ -115,7 +116,7 @@ declare module "tls" {
|
|
|
115
116
|
/**
|
|
116
117
|
* The public key.
|
|
117
118
|
*/
|
|
118
|
-
pubkey?:
|
|
119
|
+
pubkey?: NonSharedBuffer;
|
|
119
120
|
/**
|
|
120
121
|
* The ASN.1 name of the OID of the elliptic curve.
|
|
121
122
|
* Well-known curves are identified by an OID.
|
|
@@ -295,7 +296,7 @@ declare module "tls" {
|
|
|
295
296
|
* @since v9.9.0
|
|
296
297
|
* @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet.
|
|
297
298
|
*/
|
|
298
|
-
getFinished():
|
|
299
|
+
getFinished(): NonSharedBuffer | undefined;
|
|
299
300
|
/**
|
|
300
301
|
* Returns an object representing the peer's certificate. If the peer does not
|
|
301
302
|
* provide a certificate, an empty object will be returned. If the socket has been
|
|
@@ -322,7 +323,7 @@ declare module "tls" {
|
|
|
322
323
|
* @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so
|
|
323
324
|
* far.
|
|
324
325
|
*/
|
|
325
|
-
getPeerFinished():
|
|
326
|
+
getPeerFinished(): NonSharedBuffer | undefined;
|
|
326
327
|
/**
|
|
327
328
|
* Returns a string containing the negotiated SSL/TLS protocol version of the
|
|
328
329
|
* current connection. The value `'unknown'` will be returned for connected
|
|
@@ -352,7 +353,7 @@ declare module "tls" {
|
|
|
352
353
|
* must use the `'session'` event (it also works for TLSv1.2 and below).
|
|
353
354
|
* @since v0.11.4
|
|
354
355
|
*/
|
|
355
|
-
getSession():
|
|
356
|
+
getSession(): NonSharedBuffer | undefined;
|
|
356
357
|
/**
|
|
357
358
|
* See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information.
|
|
358
359
|
* @since v12.11.0
|
|
@@ -367,7 +368,7 @@ declare module "tls" {
|
|
|
367
368
|
* See `Session Resumption` for more information.
|
|
368
369
|
* @since v0.11.4
|
|
369
370
|
*/
|
|
370
|
-
getTLSTicket():
|
|
371
|
+
getTLSTicket(): NonSharedBuffer | undefined;
|
|
371
372
|
/**
|
|
372
373
|
* See `Session Resumption` for more information.
|
|
373
374
|
* @since v0.5.6
|
|
@@ -478,37 +479,37 @@ declare module "tls" {
|
|
|
478
479
|
* @param context Optionally provide a context.
|
|
479
480
|
* @return requested bytes of the keying material
|
|
480
481
|
*/
|
|
481
|
-
exportKeyingMaterial(length: number, label: string, context: Buffer):
|
|
482
|
+
exportKeyingMaterial(length: number, label: string, context: Buffer): NonSharedBuffer;
|
|
482
483
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
483
|
-
addListener(event: "OCSPResponse", listener: (response:
|
|
484
|
+
addListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
|
|
484
485
|
addListener(event: "secureConnect", listener: () => void): this;
|
|
485
|
-
addListener(event: "session", listener: (session:
|
|
486
|
-
addListener(event: "keylog", listener: (line:
|
|
486
|
+
addListener(event: "session", listener: (session: NonSharedBuffer) => void): this;
|
|
487
|
+
addListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
|
|
487
488
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
488
|
-
emit(event: "OCSPResponse", response:
|
|
489
|
+
emit(event: "OCSPResponse", response: NonSharedBuffer): boolean;
|
|
489
490
|
emit(event: "secureConnect"): boolean;
|
|
490
|
-
emit(event: "session", session:
|
|
491
|
-
emit(event: "keylog", line:
|
|
491
|
+
emit(event: "session", session: NonSharedBuffer): boolean;
|
|
492
|
+
emit(event: "keylog", line: NonSharedBuffer): boolean;
|
|
492
493
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
493
|
-
on(event: "OCSPResponse", listener: (response:
|
|
494
|
+
on(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
|
|
494
495
|
on(event: "secureConnect", listener: () => void): this;
|
|
495
|
-
on(event: "session", listener: (session:
|
|
496
|
-
on(event: "keylog", listener: (line:
|
|
496
|
+
on(event: "session", listener: (session: NonSharedBuffer) => void): this;
|
|
497
|
+
on(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
|
|
497
498
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
498
|
-
once(event: "OCSPResponse", listener: (response:
|
|
499
|
+
once(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
|
|
499
500
|
once(event: "secureConnect", listener: () => void): this;
|
|
500
|
-
once(event: "session", listener: (session:
|
|
501
|
-
once(event: "keylog", listener: (line:
|
|
501
|
+
once(event: "session", listener: (session: NonSharedBuffer) => void): this;
|
|
502
|
+
once(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
|
|
502
503
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
503
|
-
prependListener(event: "OCSPResponse", listener: (response:
|
|
504
|
+
prependListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
|
|
504
505
|
prependListener(event: "secureConnect", listener: () => void): this;
|
|
505
|
-
prependListener(event: "session", listener: (session:
|
|
506
|
-
prependListener(event: "keylog", listener: (line:
|
|
506
|
+
prependListener(event: "session", listener: (session: NonSharedBuffer) => void): this;
|
|
507
|
+
prependListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
|
|
507
508
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
508
|
-
prependOnceListener(event: "OCSPResponse", listener: (response:
|
|
509
|
+
prependOnceListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this;
|
|
509
510
|
prependOnceListener(event: "secureConnect", listener: () => void): this;
|
|
510
|
-
prependOnceListener(event: "session", listener: (session:
|
|
511
|
-
prependOnceListener(event: "keylog", listener: (line:
|
|
511
|
+
prependOnceListener(event: "session", listener: (session: NonSharedBuffer) => void): this;
|
|
512
|
+
prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this;
|
|
512
513
|
}
|
|
513
514
|
interface CommonConnectionOptions {
|
|
514
515
|
/**
|
|
@@ -531,7 +532,7 @@ declare module "tls" {
|
|
|
531
532
|
* An array of strings or a Buffer naming possible ALPN protocols.
|
|
532
533
|
* (Protocols should be ordered by their priority.)
|
|
533
534
|
*/
|
|
534
|
-
ALPNProtocols?: string[] |
|
|
535
|
+
ALPNProtocols?: readonly string[] | NodeJS.ArrayBufferView | undefined;
|
|
535
536
|
/**
|
|
536
537
|
* SNICallback(servername, cb) <Function> A function that will be
|
|
537
538
|
* called if the client supports SNI TLS extension. Two arguments
|
|
@@ -586,7 +587,7 @@ declare module "tls" {
|
|
|
586
587
|
* requires explicitly specifying a cipher suite with the `ciphers` option.
|
|
587
588
|
* More information can be found in the RFC 4279.
|
|
588
589
|
*/
|
|
589
|
-
pskCallback
|
|
590
|
+
pskCallback?: ((socket: TLSSocket, identity: string) => NodeJS.ArrayBufferView | null) | undefined;
|
|
590
591
|
/**
|
|
591
592
|
* hint to send to a client to help
|
|
592
593
|
* with selecting the identity during TLS-PSK negotiation. Will be ignored
|
|
@@ -596,7 +597,7 @@ declare module "tls" {
|
|
|
596
597
|
pskIdentityHint?: string | undefined;
|
|
597
598
|
}
|
|
598
599
|
interface PSKCallbackNegotation {
|
|
599
|
-
psk:
|
|
600
|
+
psk: NodeJS.ArrayBufferView;
|
|
600
601
|
identity: string;
|
|
601
602
|
}
|
|
602
603
|
interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions {
|
|
@@ -627,7 +628,7 @@ declare module "tls" {
|
|
|
627
628
|
* compatible with the selected cipher's digest.
|
|
628
629
|
* `identity` must use UTF-8 encoding.
|
|
629
630
|
*/
|
|
630
|
-
pskCallback
|
|
631
|
+
pskCallback?: ((hint: string | null) => PSKCallbackNegotation | null) | undefined;
|
|
631
632
|
}
|
|
632
633
|
/**
|
|
633
634
|
* Accepts encrypted connections using TLS or SSL.
|
|
@@ -655,7 +656,7 @@ declare module "tls" {
|
|
|
655
656
|
* @since v3.0.0
|
|
656
657
|
* @return A 48-byte buffer containing the session ticket keys.
|
|
657
658
|
*/
|
|
658
|
-
getTicketKeys():
|
|
659
|
+
getTicketKeys(): NonSharedBuffer;
|
|
659
660
|
/**
|
|
660
661
|
* The `server.setSecureContext()` method replaces the secure context of an
|
|
661
662
|
* existing server. Existing connections to the server are not interrupted.
|
|
@@ -687,115 +688,138 @@ declare module "tls" {
|
|
|
687
688
|
addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
688
689
|
addListener(
|
|
689
690
|
event: "newSession",
|
|
690
|
-
listener: (sessionId:
|
|
691
|
+
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
|
691
692
|
): this;
|
|
692
693
|
addListener(
|
|
693
694
|
event: "OCSPRequest",
|
|
694
695
|
listener: (
|
|
695
|
-
certificate:
|
|
696
|
-
issuer:
|
|
697
|
-
callback: (err: Error | null, resp: Buffer) => void,
|
|
696
|
+
certificate: NonSharedBuffer,
|
|
697
|
+
issuer: NonSharedBuffer,
|
|
698
|
+
callback: (err: Error | null, resp: Buffer | null) => void,
|
|
698
699
|
) => void,
|
|
699
700
|
): this;
|
|
700
701
|
addListener(
|
|
701
702
|
event: "resumeSession",
|
|
702
|
-
listener: (
|
|
703
|
+
listener: (
|
|
704
|
+
sessionId: NonSharedBuffer,
|
|
705
|
+
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
706
|
+
) => void,
|
|
703
707
|
): this;
|
|
704
708
|
addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
705
|
-
addListener(event: "keylog", listener: (line:
|
|
709
|
+
addListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
|
706
710
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
707
711
|
emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean;
|
|
708
|
-
emit(
|
|
712
|
+
emit(
|
|
713
|
+
event: "newSession",
|
|
714
|
+
sessionId: NonSharedBuffer,
|
|
715
|
+
sessionData: NonSharedBuffer,
|
|
716
|
+
callback: () => void,
|
|
717
|
+
): boolean;
|
|
709
718
|
emit(
|
|
710
719
|
event: "OCSPRequest",
|
|
711
|
-
certificate:
|
|
712
|
-
issuer:
|
|
713
|
-
callback: (err: Error | null, resp: Buffer) => void,
|
|
720
|
+
certificate: NonSharedBuffer,
|
|
721
|
+
issuer: NonSharedBuffer,
|
|
722
|
+
callback: (err: Error | null, resp: Buffer | null) => void,
|
|
714
723
|
): boolean;
|
|
715
724
|
emit(
|
|
716
725
|
event: "resumeSession",
|
|
717
|
-
sessionId:
|
|
726
|
+
sessionId: NonSharedBuffer,
|
|
718
727
|
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
719
728
|
): boolean;
|
|
720
729
|
emit(event: "secureConnection", tlsSocket: TLSSocket): boolean;
|
|
721
|
-
emit(event: "keylog", line:
|
|
730
|
+
emit(event: "keylog", line: NonSharedBuffer, tlsSocket: TLSSocket): boolean;
|
|
722
731
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
723
732
|
on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
724
|
-
on(
|
|
733
|
+
on(
|
|
734
|
+
event: "newSession",
|
|
735
|
+
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
|
736
|
+
): this;
|
|
725
737
|
on(
|
|
726
738
|
event: "OCSPRequest",
|
|
727
739
|
listener: (
|
|
728
|
-
certificate:
|
|
729
|
-
issuer:
|
|
730
|
-
callback: (err: Error | null, resp: Buffer) => void,
|
|
740
|
+
certificate: NonSharedBuffer,
|
|
741
|
+
issuer: NonSharedBuffer,
|
|
742
|
+
callback: (err: Error | null, resp: Buffer | null) => void,
|
|
731
743
|
) => void,
|
|
732
744
|
): this;
|
|
733
745
|
on(
|
|
734
746
|
event: "resumeSession",
|
|
735
|
-
listener: (
|
|
747
|
+
listener: (
|
|
748
|
+
sessionId: NonSharedBuffer,
|
|
749
|
+
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
750
|
+
) => void,
|
|
736
751
|
): this;
|
|
737
752
|
on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
738
|
-
on(event: "keylog", listener: (line:
|
|
753
|
+
on(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
|
739
754
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
740
755
|
once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
741
756
|
once(
|
|
742
757
|
event: "newSession",
|
|
743
|
-
listener: (sessionId:
|
|
758
|
+
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
|
744
759
|
): this;
|
|
745
760
|
once(
|
|
746
761
|
event: "OCSPRequest",
|
|
747
762
|
listener: (
|
|
748
|
-
certificate:
|
|
749
|
-
issuer:
|
|
750
|
-
callback: (err: Error | null, resp: Buffer) => void,
|
|
763
|
+
certificate: NonSharedBuffer,
|
|
764
|
+
issuer: NonSharedBuffer,
|
|
765
|
+
callback: (err: Error | null, resp: Buffer | null) => void,
|
|
751
766
|
) => void,
|
|
752
767
|
): this;
|
|
753
768
|
once(
|
|
754
769
|
event: "resumeSession",
|
|
755
|
-
listener: (
|
|
770
|
+
listener: (
|
|
771
|
+
sessionId: NonSharedBuffer,
|
|
772
|
+
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
773
|
+
) => void,
|
|
756
774
|
): this;
|
|
757
775
|
once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
758
|
-
once(event: "keylog", listener: (line:
|
|
776
|
+
once(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
|
759
777
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
760
778
|
prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
761
779
|
prependListener(
|
|
762
780
|
event: "newSession",
|
|
763
|
-
listener: (sessionId:
|
|
781
|
+
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
|
764
782
|
): this;
|
|
765
783
|
prependListener(
|
|
766
784
|
event: "OCSPRequest",
|
|
767
785
|
listener: (
|
|
768
|
-
certificate:
|
|
769
|
-
issuer:
|
|
770
|
-
callback: (err: Error | null, resp: Buffer) => void,
|
|
786
|
+
certificate: NonSharedBuffer,
|
|
787
|
+
issuer: NonSharedBuffer,
|
|
788
|
+
callback: (err: Error | null, resp: Buffer | null) => void,
|
|
771
789
|
) => void,
|
|
772
790
|
): this;
|
|
773
791
|
prependListener(
|
|
774
792
|
event: "resumeSession",
|
|
775
|
-
listener: (
|
|
793
|
+
listener: (
|
|
794
|
+
sessionId: NonSharedBuffer,
|
|
795
|
+
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
796
|
+
) => void,
|
|
776
797
|
): this;
|
|
777
798
|
prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
778
|
-
prependListener(event: "keylog", listener: (line:
|
|
799
|
+
prependListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
|
779
800
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
780
801
|
prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
781
802
|
prependOnceListener(
|
|
782
803
|
event: "newSession",
|
|
783
|
-
listener: (sessionId:
|
|
804
|
+
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
|
784
805
|
): this;
|
|
785
806
|
prependOnceListener(
|
|
786
807
|
event: "OCSPRequest",
|
|
787
808
|
listener: (
|
|
788
|
-
certificate:
|
|
789
|
-
issuer:
|
|
790
|
-
callback: (err: Error | null, resp: Buffer) => void,
|
|
809
|
+
certificate: NonSharedBuffer,
|
|
810
|
+
issuer: NonSharedBuffer,
|
|
811
|
+
callback: (err: Error | null, resp: Buffer | null) => void,
|
|
791
812
|
) => void,
|
|
792
813
|
): this;
|
|
793
814
|
prependOnceListener(
|
|
794
815
|
event: "resumeSession",
|
|
795
|
-
listener: (
|
|
816
|
+
listener: (
|
|
817
|
+
sessionId: NonSharedBuffer,
|
|
818
|
+
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
819
|
+
) => void,
|
|
796
820
|
): this;
|
|
797
821
|
prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
798
|
-
prependOnceListener(event: "keylog", listener: (line:
|
|
822
|
+
prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
|
799
823
|
}
|
|
800
824
|
type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1";
|
|
801
825
|
interface SecureContextOptions {
|
|
@@ -32,7 +32,7 @@ declare module "buffer" {
|
|
|
32
32
|
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
33
33
|
* @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
|
|
34
34
|
*/
|
|
35
|
-
new(arrayBuffer:
|
|
35
|
+
new(arrayBuffer: ArrayBufferLike): Buffer;
|
|
36
36
|
/**
|
|
37
37
|
* Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
|
|
38
38
|
* Array entries outside that range will be truncated to fit into it.
|
|
@@ -126,7 +126,7 @@ declare module "buffer" {
|
|
|
126
126
|
* `arrayBuffer.byteLength - byteOffset`.
|
|
127
127
|
*/
|
|
128
128
|
from(
|
|
129
|
-
arrayBuffer: WithImplicitCoercion<
|
|
129
|
+
arrayBuffer: WithImplicitCoercion<ArrayBufferLike>,
|
|
130
130
|
byteOffset?: number,
|
|
131
131
|
length?: number,
|
|
132
132
|
): Buffer;
|
|
@@ -448,7 +448,15 @@ declare module "buffer" {
|
|
|
448
448
|
*/
|
|
449
449
|
subarray(start?: number, end?: number): Buffer;
|
|
450
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
|
|
453
|
+
* TypeScript versions earlier than 5.7.
|
|
454
|
+
*/
|
|
451
455
|
type NonSharedBuffer = Buffer;
|
|
456
|
+
/**
|
|
457
|
+
* @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
|
|
458
|
+
* TypeScript versions earlier than 5.7.
|
|
459
|
+
*/
|
|
452
460
|
type AllowSharedBuffer = Buffer;
|
|
453
461
|
}
|
|
454
462
|
/** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
|
|
@@ -16,5 +16,21 @@ declare global {
|
|
|
16
16
|
| Float32Array
|
|
17
17
|
| Float64Array;
|
|
18
18
|
type ArrayBufferView = TypedArray | DataView;
|
|
19
|
+
|
|
20
|
+
type NonSharedUint8Array = Uint8Array;
|
|
21
|
+
type NonSharedUint8ClampedArray = Uint8ClampedArray;
|
|
22
|
+
type NonSharedUint16Array = Uint16Array;
|
|
23
|
+
type NonSharedUint32Array = Uint32Array;
|
|
24
|
+
type NonSharedInt8Array = Int8Array;
|
|
25
|
+
type NonSharedInt16Array = Int16Array;
|
|
26
|
+
type NonSharedInt32Array = Int32Array;
|
|
27
|
+
type NonSharedBigUint64Array = BigUint64Array;
|
|
28
|
+
type NonSharedBigInt64Array = BigInt64Array;
|
|
29
|
+
type NonSharedFloat16Array = Float16Array;
|
|
30
|
+
type NonSharedFloat32Array = Float32Array;
|
|
31
|
+
type NonSharedFloat64Array = Float64Array;
|
|
32
|
+
type NonSharedDataView = DataView;
|
|
33
|
+
type NonSharedTypedArray = TypedArray;
|
|
34
|
+
type NonSharedArrayBufferView = ArrayBufferView;
|
|
19
35
|
}
|
|
20
36
|
}
|
|
@@ -41,11 +41,13 @@
|
|
|
41
41
|
// Definitions for Node.js modules that are not specific to any version of TypeScript:
|
|
42
42
|
/// <reference path="../globals.d.ts" />
|
|
43
43
|
/// <reference path="../web-globals/abortcontroller.d.ts" />
|
|
44
|
+
/// <reference path="../web-globals/crypto.d.ts" />
|
|
44
45
|
/// <reference path="../web-globals/domexception.d.ts" />
|
|
45
46
|
/// <reference path="../web-globals/events.d.ts" />
|
|
46
47
|
/// <reference path="../web-globals/fetch.d.ts" />
|
|
47
48
|
/// <reference path="../web-globals/navigator.d.ts" />
|
|
48
49
|
/// <reference path="../web-globals/storage.d.ts" />
|
|
50
|
+
/// <reference path="../web-globals/streams.d.ts" />
|
|
49
51
|
/// <reference path="../assert.d.ts" />
|
|
50
52
|
/// <reference path="../assert/strict.d.ts" />
|
|
51
53
|
/// <reference path="../async_hooks.d.ts" />
|