cdk-common 2.1.11 → 2.1.13
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/.jsii +81 -3
- package/API.md +78 -0
- package/lib/main.js +1 -1
- package/lib/managed-policies.d.ts +14 -1
- package/lib/managed-policies.js +14 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert/strict.d.ts +0 -46
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +0 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +18 -38
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +0 -45
- package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +0 -67
- package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +0 -54
- package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +0 -58
- package/node_modules/@types/concat-stream/node_modules/@types/node/constants.d.ts +0 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +0 -18
- package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +0 -27
- package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +0 -24
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns/promises.d.ts +0 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +0 -46
- package/node_modules/@types/concat-stream/node_modules/@types/node/domain.d.ts +0 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +0 -36
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +0 -20
- package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +0 -41
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +0 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector/promises.d.ts +0 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +0 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +0 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +53 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +0 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/path.d.ts +0 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +0 -31
- package/node_modules/@types/concat-stream/node_modules/@types/node/punycode.d.ts +0 -28
- package/node_modules/@types/concat-stream/node_modules/@types/node/querystring.d.ts +0 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/quic.d.ts +0 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +0 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +0 -35
- package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/sea.d.ts +0 -115
- package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +0 -44
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/consumers.d.ts +81 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/web.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +27 -23
- package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +0 -40
- package/node_modules/@types/concat-stream/node_modules/@types/node/test/reporters.d.ts +0 -38
- package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +7 -80
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers/promises.d.ts +0 -15
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +6 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/trace_events.d.ts +0 -94
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/tty.d.ts +0 -25
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +0 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +0 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +0 -38
- package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +0 -71
- package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +15 -61
- package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +0 -93
- package/node_modules/@types/concat-stream/node_modules/undici-types/cache-interceptor.d.ts +6 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/client.d.ts +10 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/assert/strict.d.ts +0 -46
- package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +0 -5
- package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +18 -38
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +0 -45
- package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +0 -67
- package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +0 -54
- package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +0 -58
- package/node_modules/@types/form-data/node_modules/@types/node/constants.d.ts +0 -6
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +0 -18
- package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +0 -27
- package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +0 -24
- package/node_modules/@types/form-data/node_modules/@types/node/dns/promises.d.ts +0 -6
- package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +0 -46
- package/node_modules/@types/form-data/node_modules/@types/node/domain.d.ts +0 -16
- package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +0 -36
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +0 -20
- package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +0 -41
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +0 -5
- package/node_modules/@types/form-data/node_modules/@types/node/inspector/promises.d.ts +0 -6
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +0 -5
- package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +0 -3
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +53 -16
- package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +0 -9
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/path.d.ts +0 -9
- package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +0 -31
- package/node_modules/@types/form-data/node_modules/@types/node/punycode.d.ts +0 -28
- package/node_modules/@types/form-data/node_modules/@types/node/querystring.d.ts +0 -13
- package/node_modules/@types/form-data/node_modules/@types/node/quic.d.ts +0 -13
- package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +0 -3
- package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +0 -35
- package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/sea.d.ts +0 -115
- package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +0 -44
- package/node_modules/@types/form-data/node_modules/@types/node/stream/consumers.d.ts +81 -5
- package/node_modules/@types/form-data/node_modules/@types/node/stream/web.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +27 -23
- package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +0 -40
- package/node_modules/@types/form-data/node_modules/@types/node/test/reporters.d.ts +0 -38
- package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +7 -80
- package/node_modules/@types/form-data/node_modules/@types/node/timers/promises.d.ts +0 -15
- package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +6 -16
- package/node_modules/@types/form-data/node_modules/@types/node/trace_events.d.ts +0 -94
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/tty.d.ts +0 -25
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +0 -9
- package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +0 -8
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +0 -38
- package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +0 -71
- package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +15 -61
- package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +0 -93
- package/node_modules/@types/form-data/node_modules/undici-types/cache-interceptor.d.ts +6 -0
- package/node_modules/@types/form-data/node_modules/undici-types/client.d.ts +10 -0
- package/node_modules/@types/form-data/node_modules/undici-types/package.json +1 -1
- package/node_modules/qs/CHANGELOG.md +6 -0
- package/node_modules/qs/dist/qs.js +16 -16
- package/node_modules/qs/lib/parse.js +2 -2
- package/node_modules/qs/package.json +3 -3
- package/node_modules/qs/test/parse.js +86 -0
- package/node_modules/qs/test/stringify.js +9 -0
- package/node_modules/qs/test/utils.js +31 -3
- package/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/node_modules/side-channel-list/index.js +1 -3
- package/node_modules/side-channel-list/package.json +8 -8
- package/node_modules/side-channel-list/test/index.js +50 -0
- package/package.json +27 -27
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:fs` module enables interacting with the file system in a
|
|
3
|
-
* way modeled on standard POSIX functions.
|
|
4
|
-
*
|
|
5
|
-
* To use the promise-based APIs:
|
|
6
|
-
*
|
|
7
|
-
* ```js
|
|
8
|
-
* import * as fs from 'node:fs/promises';
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* To use the callback and sync APIs:
|
|
12
|
-
*
|
|
13
|
-
* ```js
|
|
14
|
-
* import * as fs from 'node:fs';
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* All file system operations have synchronous, callback, and promise-based
|
|
18
|
-
* forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
|
|
19
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/fs.js)
|
|
20
|
-
*/
|
|
21
1
|
declare module "node:fs" {
|
|
22
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
23
3
|
import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
|
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* To use the HTTP server and client one must import the `node:http` module.
|
|
3
|
-
*
|
|
4
|
-
* The HTTP interfaces in Node.js are designed to support many features
|
|
5
|
-
* of the protocol which have been traditionally difficult to use.
|
|
6
|
-
* In particular, large, possibly chunk-encoded, messages. The interface is
|
|
7
|
-
* careful to never buffer entire requests or responses, so the
|
|
8
|
-
* user is able to stream data.
|
|
9
|
-
*
|
|
10
|
-
* HTTP message headers are represented by an object like this:
|
|
11
|
-
*
|
|
12
|
-
* ```json
|
|
13
|
-
* { "content-length": "123",
|
|
14
|
-
* "content-type": "text/plain",
|
|
15
|
-
* "connection": "keep-alive",
|
|
16
|
-
* "host": "example.com",
|
|
17
|
-
* "accept": "*" }
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* Keys are lowercased. Values are not modified.
|
|
21
|
-
*
|
|
22
|
-
* In order to support the full spectrum of possible HTTP applications, the Node.js
|
|
23
|
-
* HTTP API is very low-level. It deals with stream handling and message
|
|
24
|
-
* parsing only. It parses a message into headers and body but it does not
|
|
25
|
-
* parse the actual headers or the body.
|
|
26
|
-
*
|
|
27
|
-
* See `message.headers` for details on how duplicate headers are handled.
|
|
28
|
-
*
|
|
29
|
-
* The raw headers as they were received are retained in the `rawHeaders` property, which is an array of `[key, value, key2, value2, ...]`. For
|
|
30
|
-
* example, the previous message header object might have a `rawHeaders` list like the following:
|
|
31
|
-
*
|
|
32
|
-
* ```js
|
|
33
|
-
* [ 'ConTent-Length', '123456',
|
|
34
|
-
* 'content-LENGTH', '123',
|
|
35
|
-
* 'content-type', 'text/plain',
|
|
36
|
-
* 'CONNECTION', 'keep-alive',
|
|
37
|
-
* 'Host', 'example.com',
|
|
38
|
-
* 'accepT', '*' ]
|
|
39
|
-
* ```
|
|
40
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/http.js)
|
|
41
|
-
*/
|
|
42
1
|
declare module "node:http" {
|
|
43
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
44
3
|
import { LookupOptions } from "node:dns";
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol.
|
|
3
|
-
* It can be accessed using:
|
|
4
|
-
*
|
|
5
|
-
* ```js
|
|
6
|
-
* import http2 from 'node:http2';
|
|
7
|
-
* ```
|
|
8
|
-
* @since v8.4.0
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/http2.js)
|
|
10
|
-
*/
|
|
11
1
|
declare module "node:http2" {
|
|
12
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
13
3
|
import { InternalEventEmitter } from "node:events";
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
|
|
3
|
-
* separate module.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/https.js)
|
|
5
|
-
*/
|
|
6
1
|
declare module "node:https" {
|
|
7
2
|
import * as http from "node:http";
|
|
8
3
|
import { Duplex } from "node:stream";
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:inspector/promises` module provides an API for interacting with the V8
|
|
3
|
-
* inspector.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/inspector/promises.js)
|
|
5
|
-
* @since v19.0.0
|
|
6
|
-
*/
|
|
7
1
|
declare module "node:inspector/promises" {
|
|
8
2
|
import { EventEmitter } from "node:events";
|
|
9
3
|
export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector";
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* > Stability: 2 - Stable
|
|
3
|
-
*
|
|
4
|
-
* The `node:net` module provides an asynchronous network API for creating stream-based
|
|
5
|
-
* TCP or `IPC` servers ({@link createServer}) and clients
|
|
6
|
-
* ({@link createConnection}).
|
|
7
|
-
*
|
|
8
|
-
* It can be accessed using:
|
|
9
|
-
*
|
|
10
|
-
* ```js
|
|
11
|
-
* import net from 'node:net';
|
|
12
|
-
* ```
|
|
13
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/net.js)
|
|
14
|
-
*/
|
|
15
1
|
declare module "node:net" {
|
|
16
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
17
3
|
import * as dns from "node:dns";
|
|
@@ -38,6 +24,7 @@ declare module "node:net" {
|
|
|
38
24
|
keepAlive?: boolean | undefined;
|
|
39
25
|
keepAliveInitialDelay?: number | undefined;
|
|
40
26
|
blockList?: BlockList | undefined;
|
|
27
|
+
typeOfService?: number | undefined;
|
|
41
28
|
}
|
|
42
29
|
interface OnReadOpts {
|
|
43
30
|
buffer: Uint8Array | (() => Uint8Array);
|
|
@@ -116,9 +103,14 @@ declare module "node:net" {
|
|
|
116
103
|
* See `Writable` stream `write()` method for more
|
|
117
104
|
* information.
|
|
118
105
|
* @since v0.1.90
|
|
119
|
-
* @param [encoding='utf8'] Only used when data is `string`.
|
|
120
106
|
*/
|
|
121
107
|
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Sends data on the socket, with an explicit encoding for string data.
|
|
110
|
+
* @see {@link Socket.write} for full details.
|
|
111
|
+
* @since v0.1.90
|
|
112
|
+
* @param [encoding='utf8'] Only used when data is `string`.
|
|
113
|
+
*/
|
|
122
114
|
write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
|
123
115
|
/**
|
|
124
116
|
* Initiate a connection on a given socket.
|
|
@@ -226,6 +218,37 @@ declare module "node:net" {
|
|
|
226
218
|
* @return The socket itself.
|
|
227
219
|
*/
|
|
228
220
|
setKeepAlive(enable?: boolean, initialDelay?: number): this;
|
|
221
|
+
/**
|
|
222
|
+
* Returns the current Type of Service (TOS) field for IPv4 packets or Traffic
|
|
223
|
+
* Class for IPv6 packets for this socket.
|
|
224
|
+
*
|
|
225
|
+
* `setTypeOfService()` may be called before the socket is connected; the value
|
|
226
|
+
* will be cached and applied when the socket establishes a connection.
|
|
227
|
+
* `getTypeOfService()` will return the currently set value even before connection.
|
|
228
|
+
*
|
|
229
|
+
* On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored,
|
|
230
|
+
* and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers
|
|
231
|
+
* should verify platform-specific semantics.
|
|
232
|
+
* @since v25.6.0
|
|
233
|
+
* @returns The current TOS value.
|
|
234
|
+
*/
|
|
235
|
+
getTypeOfService(): number;
|
|
236
|
+
/**
|
|
237
|
+
* Sets the Type of Service (TOS) field for IPv4 packets or Traffic Class for IPv6
|
|
238
|
+
* Packets sent from this socket. This can be used to prioritize network traffic.
|
|
239
|
+
*
|
|
240
|
+
* `setTypeOfService()` may be called before the socket is connected; the value
|
|
241
|
+
* will be cached and applied when the socket establishes a connection.
|
|
242
|
+
* `getTypeOfService()` will return the currently set value even before connection.
|
|
243
|
+
*
|
|
244
|
+
* On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored,
|
|
245
|
+
* and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers
|
|
246
|
+
* should verify platform-specific semantics.
|
|
247
|
+
* @since v25.6.0
|
|
248
|
+
* @param tos The TOS value to set (0-255).
|
|
249
|
+
* @returns The socket itself.
|
|
250
|
+
*/
|
|
251
|
+
setTypeOfService(tos: number): this;
|
|
229
252
|
/**
|
|
230
253
|
* Returns the bound `address`, the address `family` name and `port` of the
|
|
231
254
|
* socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
|
|
@@ -358,12 +381,26 @@ declare module "node:net" {
|
|
|
358
381
|
*
|
|
359
382
|
* See `writable.end()` for further details.
|
|
360
383
|
* @since v0.1.90
|
|
361
|
-
* @param [encoding='utf8'] Only used when data is `string`.
|
|
362
384
|
* @param callback Optional callback for when the socket is finished.
|
|
363
385
|
* @return The socket itself.
|
|
364
386
|
*/
|
|
365
387
|
end(callback?: () => void): this;
|
|
388
|
+
/**
|
|
389
|
+
* Half-closes the socket, with one final chunk of data.
|
|
390
|
+
* @see {@link Socket.end} for full details.
|
|
391
|
+
* @since v0.1.90
|
|
392
|
+
* @param callback Optional callback for when the socket is finished.
|
|
393
|
+
* @return The socket itself.
|
|
394
|
+
*/
|
|
366
395
|
end(buffer: Uint8Array | string, callback?: () => void): this;
|
|
396
|
+
/**
|
|
397
|
+
* Half-closes the socket, with one final chunk of data.
|
|
398
|
+
* @see {@link Socket.end} for full details.
|
|
399
|
+
* @since v0.1.90
|
|
400
|
+
* @param [encoding='utf8'] Only used when data is `string`.
|
|
401
|
+
* @param callback Optional callback for when the socket is finished.
|
|
402
|
+
* @return The socket itself.
|
|
403
|
+
*/
|
|
367
404
|
end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
|
|
368
405
|
// #region InternalEventEmitter
|
|
369
406
|
addListener<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:os` module provides operating system-related utility methods and
|
|
3
|
-
* properties. It can be accessed using:
|
|
4
|
-
*
|
|
5
|
-
* ```js
|
|
6
|
-
* import os from 'node:os';
|
|
7
|
-
* ```
|
|
8
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/os.js)
|
|
9
|
-
*/
|
|
10
1
|
declare module "node:os" {
|
|
11
2
|
import { NonSharedBuffer } from "buffer";
|
|
12
3
|
interface CpuInfo {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.6.0",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -147,9 +147,9 @@
|
|
|
147
147
|
},
|
|
148
148
|
"scripts": {},
|
|
149
149
|
"dependencies": {
|
|
150
|
-
"undici-types": "~7.
|
|
150
|
+
"undici-types": "~7.19.0"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
154
|
-
"typeScriptVersion": "5.
|
|
153
|
+
"typesPublisherContentHash": "753bd9272f1c86686cc2d1bb435a7f033157f700201f64f0319742347e1ca060",
|
|
154
|
+
"typeScriptVersion": "5.3"
|
|
155
155
|
}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:path` module provides utilities for working with file and directory
|
|
3
|
-
* paths. It can be accessed using:
|
|
4
|
-
*
|
|
5
|
-
* ```js
|
|
6
|
-
* import path from 'node:path';
|
|
7
|
-
* ```
|
|
8
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/path.js)
|
|
9
|
-
*/
|
|
10
1
|
declare module "node:path" {
|
|
11
2
|
namespace path {
|
|
12
3
|
/**
|
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for
|
|
3
|
-
* Node.js-specific performance measurements.
|
|
4
|
-
*
|
|
5
|
-
* Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/):
|
|
6
|
-
*
|
|
7
|
-
* * [High Resolution Time](https://www.w3.org/TR/hr-time-2)
|
|
8
|
-
* * [Performance Timeline](https://w3c.github.io/performance-timeline/)
|
|
9
|
-
* * [User Timing](https://www.w3.org/TR/user-timing/)
|
|
10
|
-
* * [Resource Timing](https://www.w3.org/TR/resource-timing-2/)
|
|
11
|
-
*
|
|
12
|
-
* ```js
|
|
13
|
-
* import { PerformanceObserver, performance } from 'node:perf_hooks';
|
|
14
|
-
*
|
|
15
|
-
* const obs = new PerformanceObserver((items) => {
|
|
16
|
-
* console.log(items.getEntries()[0].duration);
|
|
17
|
-
* performance.clearMarks();
|
|
18
|
-
* });
|
|
19
|
-
* obs.observe({ type: 'measure' });
|
|
20
|
-
* performance.measure('Start to Now');
|
|
21
|
-
*
|
|
22
|
-
* performance.mark('A');
|
|
23
|
-
* doSomeLongRunningProcess(() => {
|
|
24
|
-
* performance.measure('A to Now', 'A');
|
|
25
|
-
*
|
|
26
|
-
* performance.mark('B');
|
|
27
|
-
* performance.measure('A to B', 'A', 'B');
|
|
28
|
-
* });
|
|
29
|
-
* ```
|
|
30
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/perf_hooks.js)
|
|
31
|
-
*/
|
|
32
1
|
declare module "node:perf_hooks" {
|
|
33
2
|
import { InternalEventTargetEventProperties } from "node:events";
|
|
34
3
|
// #region web types
|
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* **The version of the punycode module bundled in Node.js is being deprecated. **In a future major version of Node.js this module will be removed. Users
|
|
3
|
-
* currently depending on the `punycode` module should switch to using the
|
|
4
|
-
* userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL
|
|
5
|
-
* encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`.
|
|
6
|
-
*
|
|
7
|
-
* The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It
|
|
8
|
-
* can be accessed using:
|
|
9
|
-
*
|
|
10
|
-
* ```js
|
|
11
|
-
* import punycode from 'node:punycode';
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is
|
|
15
|
-
* primarily intended for use in Internationalized Domain Names. Because host
|
|
16
|
-
* names in URLs are limited to ASCII characters only, Domain Names that contain
|
|
17
|
-
* non-ASCII characters must be converted into ASCII using the Punycode scheme.
|
|
18
|
-
* For instance, the Japanese character that translates into the English word, `'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent
|
|
19
|
-
* to `'example.com'`) is represented by Punycode as the ASCII string `'xn--fsq.com'`.
|
|
20
|
-
*
|
|
21
|
-
* The `punycode` module provides a simple implementation of the Punycode standard.
|
|
22
|
-
*
|
|
23
|
-
* The `punycode` module is a third-party dependency used by Node.js and
|
|
24
|
-
* made available to developers as a convenience. Fixes or other modifications to
|
|
25
|
-
* the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
|
|
26
|
-
* @deprecated
|
|
27
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/punycode.js)
|
|
28
|
-
*/
|
|
29
1
|
declare module "node:punycode" {
|
|
30
2
|
/**
|
|
31
3
|
* The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:querystring` module provides utilities for parsing and formatting URL
|
|
3
|
-
* query strings. It can be accessed using:
|
|
4
|
-
*
|
|
5
|
-
* ```js
|
|
6
|
-
* import querystring from 'node:querystring';
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* `querystring` is more performant than `URLSearchParams` but is not a
|
|
10
|
-
* standardized API. Use `URLSearchParams` when performance is not critical or
|
|
11
|
-
* when compatibility with browser code is desirable.
|
|
12
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/querystring.js)
|
|
13
|
-
*/
|
|
14
1
|
declare module "node:querystring" {
|
|
15
2
|
interface StringifyOptions {
|
|
16
3
|
/**
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The 'node:quic' module provides an implementation of the QUIC protocol.
|
|
3
|
-
* To access it, start Node.js with the `--experimental-quic` option and:
|
|
4
|
-
*
|
|
5
|
-
* ```js
|
|
6
|
-
* import quic from 'node:quic';
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* The module is only available under the `node:` scheme.
|
|
10
|
-
* @since v23.8.0
|
|
11
|
-
* @experimental
|
|
12
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/quic.js)
|
|
13
|
-
*/
|
|
14
1
|
declare module "node:quic" {
|
|
15
2
|
import { KeyObject, webcrypto } from "node:crypto";
|
|
16
3
|
import { SocketAddress } from "node:net";
|
|
@@ -1,38 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream
|
|
3
|
-
* (such as [`process.stdin`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdin)) one line at a time.
|
|
4
|
-
*
|
|
5
|
-
* To use the promise-based APIs:
|
|
6
|
-
*
|
|
7
|
-
* ```js
|
|
8
|
-
* import * as readline from 'node:readline/promises';
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* To use the callback and sync APIs:
|
|
12
|
-
*
|
|
13
|
-
* ```js
|
|
14
|
-
* import * as readline from 'node:readline';
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* The following simple example illustrates the basic use of the `node:readline` module.
|
|
18
|
-
*
|
|
19
|
-
* ```js
|
|
20
|
-
* import * as readline from 'node:readline/promises';
|
|
21
|
-
* import { stdin as input, stdout as output } from 'node:process';
|
|
22
|
-
*
|
|
23
|
-
* const rl = readline.createInterface({ input, output });
|
|
24
|
-
*
|
|
25
|
-
* const answer = await rl.question('What do you think of Node.js? ');
|
|
26
|
-
*
|
|
27
|
-
* console.log(`Thank you for your valuable feedback: ${answer}`);
|
|
28
|
-
*
|
|
29
|
-
* rl.close();
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be
|
|
33
|
-
* received on the `input` stream.
|
|
34
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/readline.js)
|
|
35
|
-
*/
|
|
36
1
|
declare module "node:readline" {
|
|
37
2
|
import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
|
|
38
3
|
interface Key {
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation
|
|
3
|
-
* that is available both as a standalone program or includible in other
|
|
4
|
-
* applications. It can be accessed using:
|
|
5
|
-
*
|
|
6
|
-
* ```js
|
|
7
|
-
* import repl from 'node:repl';
|
|
8
|
-
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/repl.js)
|
|
10
|
-
*/
|
|
11
1
|
declare module "node:repl" {
|
|
12
2
|
import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from "node:readline";
|
|
13
3
|
import { InspectOptions } from "node:util";
|
|
@@ -1,118 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This feature allows the distribution of a Node.js application conveniently to a
|
|
3
|
-
* system that does not have Node.js installed.
|
|
4
|
-
*
|
|
5
|
-
* Node.js supports the creation of [single executable applications](https://github.com/nodejs/single-executable) by allowing
|
|
6
|
-
* the injection of a blob prepared by Node.js, which can contain a bundled script,
|
|
7
|
-
* into the `node` binary. During start up, the program checks if anything has been
|
|
8
|
-
* injected. If the blob is found, it executes the script in the blob. Otherwise
|
|
9
|
-
* Node.js operates as it normally does.
|
|
10
|
-
*
|
|
11
|
-
* The single executable application feature currently only supports running a
|
|
12
|
-
* single embedded script using the `CommonJS` module system.
|
|
13
|
-
*
|
|
14
|
-
* Users can create a single executable application from their bundled script
|
|
15
|
-
* with the `node` binary itself and any tool which can inject resources into the
|
|
16
|
-
* binary.
|
|
17
|
-
*
|
|
18
|
-
* Here are the steps for creating a single executable application using one such
|
|
19
|
-
* tool, [postject](https://github.com/nodejs/postject):
|
|
20
|
-
*
|
|
21
|
-
* 1. Create a JavaScript file:
|
|
22
|
-
* ```bash
|
|
23
|
-
* echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js
|
|
24
|
-
* ```
|
|
25
|
-
* 2. Create a configuration file building a blob that can be injected into the
|
|
26
|
-
* single executable application (see `Generating single executable preparation blobs` for details):
|
|
27
|
-
* ```bash
|
|
28
|
-
* echo '{ "main": "hello.js", "output": "sea-prep.blob" }' > sea-config.json
|
|
29
|
-
* ```
|
|
30
|
-
* 3. Generate the blob to be injected:
|
|
31
|
-
* ```bash
|
|
32
|
-
* node --experimental-sea-config sea-config.json
|
|
33
|
-
* ```
|
|
34
|
-
* 4. Create a copy of the `node` executable and name it according to your needs:
|
|
35
|
-
* * On systems other than Windows:
|
|
36
|
-
* ```bash
|
|
37
|
-
* cp $(command -v node) hello
|
|
38
|
-
* ```
|
|
39
|
-
* * On Windows:
|
|
40
|
-
* ```text
|
|
41
|
-
* node -e "require('fs').copyFileSync(process.execPath, 'hello.exe')"
|
|
42
|
-
* ```
|
|
43
|
-
* The `.exe` extension is necessary.
|
|
44
|
-
* 5. Remove the signature of the binary (macOS and Windows only):
|
|
45
|
-
* * On macOS:
|
|
46
|
-
* ```bash
|
|
47
|
-
* codesign --remove-signature hello
|
|
48
|
-
* ```
|
|
49
|
-
* * On Windows (optional):
|
|
50
|
-
* [signtool](https://learn.microsoft.com/en-us/windows/win32/seccrypto/signtool) can be used from the installed [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/).
|
|
51
|
-
* If this step is
|
|
52
|
-
* skipped, ignore any signature-related warning from postject.
|
|
53
|
-
* ```powershell
|
|
54
|
-
* signtool remove /s hello.exe
|
|
55
|
-
* ```
|
|
56
|
-
* 6. Inject the blob into the copied binary by running `postject` with
|
|
57
|
-
* the following options:
|
|
58
|
-
* * `hello` / `hello.exe` \- The name of the copy of the `node` executable
|
|
59
|
-
* created in step 4.
|
|
60
|
-
* * `NODE_SEA_BLOB` \- The name of the resource / note / section in the binary
|
|
61
|
-
* where the contents of the blob will be stored.
|
|
62
|
-
* * `sea-prep.blob` \- The name of the blob created in step 1.
|
|
63
|
-
* * `--sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2` \- The [fuse](https://www.electronjs.org/docs/latest/tutorial/fuses) used by the Node.js project to detect if a file has been
|
|
64
|
-
* injected.
|
|
65
|
-
* * `--macho-segment-name NODE_SEA` (only needed on macOS) - The name of the
|
|
66
|
-
* segment in the binary where the contents of the blob will be
|
|
67
|
-
* stored.
|
|
68
|
-
* To summarize, here is the required command for each platform:
|
|
69
|
-
* * On Linux:
|
|
70
|
-
* ```bash
|
|
71
|
-
* npx postject hello NODE_SEA_BLOB sea-prep.blob \
|
|
72
|
-
* --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
|
|
73
|
-
* ```
|
|
74
|
-
* * On Windows - PowerShell:
|
|
75
|
-
* ```powershell
|
|
76
|
-
* npx postject hello.exe NODE_SEA_BLOB sea-prep.blob `
|
|
77
|
-
* --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
|
|
78
|
-
* ```
|
|
79
|
-
* * On Windows - Command Prompt:
|
|
80
|
-
* ```text
|
|
81
|
-
* npx postject hello.exe NODE_SEA_BLOB sea-prep.blob ^
|
|
82
|
-
* --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
|
|
83
|
-
* ```
|
|
84
|
-
* * On macOS:
|
|
85
|
-
* ```bash
|
|
86
|
-
* npx postject hello NODE_SEA_BLOB sea-prep.blob \
|
|
87
|
-
* --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
|
|
88
|
-
* --macho-segment-name NODE_SEA
|
|
89
|
-
* ```
|
|
90
|
-
* 7. Sign the binary (macOS and Windows only):
|
|
91
|
-
* * On macOS:
|
|
92
|
-
* ```bash
|
|
93
|
-
* codesign --sign - hello
|
|
94
|
-
* ```
|
|
95
|
-
* * On Windows (optional):
|
|
96
|
-
* A certificate needs to be present for this to work. However, the unsigned
|
|
97
|
-
* binary would still be runnable.
|
|
98
|
-
* ```powershell
|
|
99
|
-
* signtool sign /fd SHA256 hello.exe
|
|
100
|
-
* ```
|
|
101
|
-
* 8. Run the binary:
|
|
102
|
-
* * On systems other than Windows
|
|
103
|
-
* ```console
|
|
104
|
-
* $ ./hello world
|
|
105
|
-
* Hello, world!
|
|
106
|
-
* ```
|
|
107
|
-
* * On Windows
|
|
108
|
-
* ```console
|
|
109
|
-
* $ .\hello.exe world
|
|
110
|
-
* Hello, world!
|
|
111
|
-
* ```
|
|
112
|
-
* @since v19.7.0, v18.16.0
|
|
113
|
-
* @experimental
|
|
114
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/src/node_sea.cc)
|
|
115
|
-
*/
|
|
116
1
|
declare module "node:sea" {
|
|
117
2
|
type AssetKey = string;
|
|
118
3
|
/**
|
|
@@ -1,47 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:sqlite` module facilitates working with SQLite databases.
|
|
3
|
-
* To access it:
|
|
4
|
-
*
|
|
5
|
-
* ```js
|
|
6
|
-
* import sqlite from 'node:sqlite';
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* This module is only available under the `node:` scheme. The following will not
|
|
10
|
-
* work:
|
|
11
|
-
*
|
|
12
|
-
* ```js
|
|
13
|
-
* import sqlite from 'sqlite';
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* The following example shows the basic usage of the `node:sqlite` module to open
|
|
17
|
-
* an in-memory database, write data to the database, and then read the data back.
|
|
18
|
-
*
|
|
19
|
-
* ```js
|
|
20
|
-
* import { DatabaseSync } from 'node:sqlite';
|
|
21
|
-
* const database = new DatabaseSync(':memory:');
|
|
22
|
-
*
|
|
23
|
-
* // Execute SQL statements from strings.
|
|
24
|
-
* database.exec(`
|
|
25
|
-
* CREATE TABLE data(
|
|
26
|
-
* key INTEGER PRIMARY KEY,
|
|
27
|
-
* value TEXT
|
|
28
|
-
* ) STRICT
|
|
29
|
-
* `);
|
|
30
|
-
* // Create a prepared statement to insert data into the database.
|
|
31
|
-
* const insert = database.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
|
|
32
|
-
* // Execute the prepared statement with bound values.
|
|
33
|
-
* insert.run(1, 'hello');
|
|
34
|
-
* insert.run(2, 'world');
|
|
35
|
-
* // Create a prepared statement to read data from the database.
|
|
36
|
-
* const query = database.prepare('SELECT * FROM data ORDER BY key');
|
|
37
|
-
* // Execute the prepared statement and log the result set.
|
|
38
|
-
* console.log(query.all());
|
|
39
|
-
* // Prints: [ { key: 1, value: 'hello' }, { key: 2, value: 'world' } ]
|
|
40
|
-
* ```
|
|
41
|
-
* @since v22.5.0
|
|
42
|
-
* @experimental
|
|
43
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/sqlite.js)
|
|
44
|
-
*/
|
|
45
1
|
declare module "node:sqlite" {
|
|
46
2
|
import { PathLike } from "node:fs";
|
|
47
3
|
type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView;
|