cdk-ecr-deployment 3.1.8 → 3.1.10
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 +2 -2
- package/.jsii.tabl.json +1 -1
- package/lib/index.js +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +55 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.buffer.d.ts +114 -39
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +4 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +3 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +1 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +81 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +24 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +5 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +19 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/sqlite.d.ts +105 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +6 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +936 -1000
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +40 -138
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +107 -35
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +52 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +55 -0
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.buffer.d.ts +114 -39
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +4 -11
- package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +3 -1
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +1 -0
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +81 -0
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +24 -0
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +5 -0
- package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +19 -2
- package/node_modules/@types/keyv/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/sqlite.d.ts +105 -15
- package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +6 -1
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +936 -1000
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +40 -138
- package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +107 -35
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +52 -10
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +55 -0
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.buffer.d.ts +114 -39
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +4 -11
- package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +3 -1
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +1 -0
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +81 -0
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +24 -0
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +5 -0
- package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +19 -2
- package/node_modules/@types/responselike/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/sqlite.d.ts +105 -15
- package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +6 -1
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +936 -1000
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +40 -138
- package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +107 -35
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +52 -10
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare module "buffer" {
|
|
2
|
+
type ImplicitArrayBuffer<T extends WithImplicitCoercion<ArrayBufferLike>> = T extends
|
|
3
|
+
{ valueOf(): infer V extends ArrayBufferLike } ? V : T;
|
|
2
4
|
global {
|
|
3
5
|
interface BufferConstructor {
|
|
4
6
|
// see buffer.d.ts for implementation shared with all TypeScript versions
|
|
@@ -24,7 +26,7 @@ declare module "buffer" {
|
|
|
24
26
|
* @param array The octets to store.
|
|
25
27
|
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
26
28
|
*/
|
|
27
|
-
new(array:
|
|
29
|
+
new(array: ArrayLike<number>): Buffer<ArrayBuffer>;
|
|
28
30
|
/**
|
|
29
31
|
* Produces a Buffer backed by the same allocated memory as
|
|
30
32
|
* the given {ArrayBuffer}/{SharedArrayBuffer}.
|
|
@@ -33,20 +35,6 @@ declare module "buffer" {
|
|
|
33
35
|
* @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
|
|
34
36
|
*/
|
|
35
37
|
new<TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(arrayBuffer: TArrayBuffer): Buffer<TArrayBuffer>;
|
|
36
|
-
/**
|
|
37
|
-
* Allocates a new buffer containing the given {array} of octets.
|
|
38
|
-
*
|
|
39
|
-
* @param array The octets to store.
|
|
40
|
-
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
41
|
-
*/
|
|
42
|
-
new(array: readonly any[]): Buffer<ArrayBuffer>;
|
|
43
|
-
/**
|
|
44
|
-
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
45
|
-
*
|
|
46
|
-
* @param buffer The buffer to copy.
|
|
47
|
-
* @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
|
|
48
|
-
*/
|
|
49
|
-
new(buffer: Buffer): Buffer<ArrayBuffer>;
|
|
50
38
|
/**
|
|
51
39
|
* Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
|
|
52
40
|
* Array entries outside that range will be truncated to fit into it.
|
|
@@ -58,40 +46,120 @@ declare module "buffer" {
|
|
|
58
46
|
* const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
|
|
59
47
|
* ```
|
|
60
48
|
*
|
|
61
|
-
* If `array` is an `Array
|
|
49
|
+
* If `array` is an `Array`-like object (that is, one with a `length` property of
|
|
62
50
|
* type `number`), it is treated as if it is an array, unless it is a `Buffer` or
|
|
63
|
-
* a `Uint8Array`. This means all other `TypedArray` variants get treated as an
|
|
51
|
+
* a `Uint8Array`. This means all other `TypedArray` variants get treated as an
|
|
52
|
+
* `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use
|
|
53
|
+
* `Buffer.copyBytesFrom()`.
|
|
64
54
|
*
|
|
65
55
|
* A `TypeError` will be thrown if `array` is not an `Array` or another type
|
|
66
56
|
* appropriate for `Buffer.from()` variants.
|
|
67
57
|
*
|
|
68
|
-
* `Buffer.from(array)` and `Buffer.from(string)` may also use the internal
|
|
58
|
+
* `Buffer.from(array)` and `Buffer.from(string)` may also use the internal
|
|
59
|
+
* `Buffer` pool like `Buffer.allocUnsafe()` does.
|
|
69
60
|
* @since v5.10.0
|
|
70
61
|
*/
|
|
71
|
-
from<
|
|
72
|
-
arrayBuffer: WithImplicitCoercion<TArrayBuffer>,
|
|
73
|
-
byteOffset?: number,
|
|
74
|
-
length?: number,
|
|
75
|
-
): Buffer<TArrayBuffer>;
|
|
62
|
+
from(array: WithImplicitCoercion<ArrayLike<number>>): Buffer<ArrayBuffer>;
|
|
76
63
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
64
|
+
* This creates a view of the `ArrayBuffer` without copying the underlying
|
|
65
|
+
* memory. For example, when passed a reference to the `.buffer` property of a
|
|
66
|
+
* `TypedArray` instance, the newly created `Buffer` will share the same
|
|
67
|
+
* allocated memory as the `TypedArray`'s underlying `ArrayBuffer`.
|
|
68
|
+
*
|
|
69
|
+
* ```js
|
|
70
|
+
* import { Buffer } from 'node:buffer';
|
|
71
|
+
*
|
|
72
|
+
* const arr = new Uint16Array(2);
|
|
73
|
+
*
|
|
74
|
+
* arr[0] = 5000;
|
|
75
|
+
* arr[1] = 4000;
|
|
76
|
+
*
|
|
77
|
+
* // Shares memory with `arr`.
|
|
78
|
+
* const buf = Buffer.from(arr.buffer);
|
|
79
|
+
*
|
|
80
|
+
* console.log(buf);
|
|
81
|
+
* // Prints: <Buffer 88 13 a0 0f>
|
|
82
|
+
*
|
|
83
|
+
* // Changing the original Uint16Array changes the Buffer also.
|
|
84
|
+
* arr[1] = 6000;
|
|
85
|
+
*
|
|
86
|
+
* console.log(buf);
|
|
87
|
+
* // Prints: <Buffer 88 13 70 17>
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
90
|
+
* The optional `byteOffset` and `length` arguments specify a memory range within
|
|
91
|
+
* the `arrayBuffer` that will be shared by the `Buffer`.
|
|
92
|
+
*
|
|
93
|
+
* ```js
|
|
94
|
+
* import { Buffer } from 'node:buffer';
|
|
95
|
+
*
|
|
96
|
+
* const ab = new ArrayBuffer(10);
|
|
97
|
+
* const buf = Buffer.from(ab, 0, 2);
|
|
98
|
+
*
|
|
99
|
+
* console.log(buf.length);
|
|
100
|
+
* // Prints: 2
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a
|
|
104
|
+
* `SharedArrayBuffer` or another type appropriate for `Buffer.from()`
|
|
105
|
+
* variants.
|
|
106
|
+
*
|
|
107
|
+
* It is important to remember that a backing `ArrayBuffer` can cover a range
|
|
108
|
+
* of memory that extends beyond the bounds of a `TypedArray` view. A new
|
|
109
|
+
* `Buffer` created using the `buffer` property of a `TypedArray` may extend
|
|
110
|
+
* beyond the range of the `TypedArray`:
|
|
111
|
+
*
|
|
112
|
+
* ```js
|
|
113
|
+
* import { Buffer } from 'node:buffer';
|
|
114
|
+
*
|
|
115
|
+
* const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements
|
|
116
|
+
* const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements
|
|
117
|
+
* console.log(arrA.buffer === arrB.buffer); // true
|
|
118
|
+
*
|
|
119
|
+
* const buf = Buffer.from(arrB.buffer);
|
|
120
|
+
* console.log(buf);
|
|
121
|
+
* // Prints: <Buffer 63 64 65 66>
|
|
122
|
+
* ```
|
|
123
|
+
* @since v5.10.0
|
|
124
|
+
* @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the
|
|
125
|
+
* `.buffer` property of a `TypedArray`.
|
|
126
|
+
* @param byteOffset Index of first byte to expose. **Default:** `0`.
|
|
127
|
+
* @param length Number of bytes to expose. **Default:**
|
|
128
|
+
* `arrayBuffer.byteLength - byteOffset`.
|
|
79
129
|
*/
|
|
80
|
-
from
|
|
81
|
-
|
|
130
|
+
from<TArrayBuffer extends WithImplicitCoercion<ArrayBufferLike>>(
|
|
131
|
+
arrayBuffer: TArrayBuffer,
|
|
132
|
+
byteOffset?: number,
|
|
133
|
+
length?: number,
|
|
134
|
+
): Buffer<ImplicitArrayBuffer<TArrayBuffer>>;
|
|
82
135
|
/**
|
|
83
|
-
* Creates a new Buffer containing
|
|
84
|
-
*
|
|
85
|
-
*
|
|
136
|
+
* Creates a new `Buffer` containing `string`. The `encoding` parameter identifies
|
|
137
|
+
* the character encoding to be used when converting `string` into bytes.
|
|
138
|
+
*
|
|
139
|
+
* ```js
|
|
140
|
+
* import { Buffer } from 'node:buffer';
|
|
141
|
+
*
|
|
142
|
+
* const buf1 = Buffer.from('this is a tést');
|
|
143
|
+
* const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
|
|
144
|
+
*
|
|
145
|
+
* console.log(buf1.toString());
|
|
146
|
+
* // Prints: this is a tést
|
|
147
|
+
* console.log(buf2.toString());
|
|
148
|
+
* // Prints: this is a tést
|
|
149
|
+
* console.log(buf1.toString('latin1'));
|
|
150
|
+
* // Prints: this is a tést
|
|
151
|
+
* ```
|
|
152
|
+
*
|
|
153
|
+
* A `TypeError` will be thrown if `string` is not a string or another type
|
|
154
|
+
* appropriate for `Buffer.from()` variants.
|
|
155
|
+
*
|
|
156
|
+
* `Buffer.from(string)` may also use the internal `Buffer` pool like
|
|
157
|
+
* `Buffer.allocUnsafe()` does.
|
|
158
|
+
* @since v5.10.0
|
|
159
|
+
* @param string A string to encode.
|
|
160
|
+
* @param encoding The encoding of `string`. **Default:** `'utf8'`.
|
|
86
161
|
*/
|
|
87
|
-
from(
|
|
88
|
-
str:
|
|
89
|
-
| WithImplicitCoercion<string>
|
|
90
|
-
| {
|
|
91
|
-
[Symbol.toPrimitive](hint: "string"): string;
|
|
92
|
-
},
|
|
93
|
-
encoding?: BufferEncoding,
|
|
94
|
-
): Buffer<ArrayBuffer>;
|
|
162
|
+
from(string: WithImplicitCoercion<string>, encoding?: BufferEncoding): Buffer<ArrayBuffer>;
|
|
95
163
|
/**
|
|
96
164
|
* Creates a new Buffer using the passed {data}
|
|
97
165
|
* @param values to create a new Buffer
|
|
@@ -107,7 +175,8 @@ declare module "buffer" {
|
|
|
107
175
|
*
|
|
108
176
|
* If `totalLength` is provided, it is coerced to an unsigned integer. If the
|
|
109
177
|
* combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
|
|
110
|
-
* truncated to `totalLength`.
|
|
178
|
+
* truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is
|
|
179
|
+
* less than `totalLength`, the remaining space is filled with zeros.
|
|
111
180
|
*
|
|
112
181
|
* ```js
|
|
113
182
|
* import { Buffer } from 'node:buffer';
|
|
@@ -382,4 +451,10 @@ declare module "buffer" {
|
|
|
382
451
|
subarray(start?: number, end?: number): Buffer<TArrayBuffer>;
|
|
383
452
|
}
|
|
384
453
|
}
|
|
454
|
+
/** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
|
|
455
|
+
var SlowBuffer: {
|
|
456
|
+
/** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
|
|
457
|
+
new(size: number): Buffer<ArrayBuffer>;
|
|
458
|
+
prototype: Buffer;
|
|
459
|
+
};
|
|
385
460
|
}
|
|
@@ -114,11 +114,6 @@ declare module "buffer" {
|
|
|
114
114
|
* @param toEnc To target encoding.
|
|
115
115
|
*/
|
|
116
116
|
export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
|
|
117
|
-
export const SlowBuffer: {
|
|
118
|
-
/** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
|
|
119
|
-
new(size: number): Buffer;
|
|
120
|
-
prototype: Buffer;
|
|
121
|
-
};
|
|
122
117
|
/**
|
|
123
118
|
* Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
|
|
124
119
|
* a prior call to `URL.createObjectURL()`.
|
|
@@ -237,7 +232,10 @@ declare module "buffer" {
|
|
|
237
232
|
}
|
|
238
233
|
export import atob = globalThis.atob;
|
|
239
234
|
export import btoa = globalThis.btoa;
|
|
240
|
-
|
|
235
|
+
export type WithImplicitCoercion<T> =
|
|
236
|
+
| T
|
|
237
|
+
| { valueOf(): T }
|
|
238
|
+
| (T extends string ? { [Symbol.toPrimitive](hint: "string"): T } : never);
|
|
241
239
|
global {
|
|
242
240
|
namespace NodeJS {
|
|
243
241
|
export { BufferEncoding };
|
|
@@ -256,11 +254,6 @@ declare module "buffer" {
|
|
|
256
254
|
| "latin1"
|
|
257
255
|
| "binary"
|
|
258
256
|
| "hex";
|
|
259
|
-
type WithImplicitCoercion<T> =
|
|
260
|
-
| T
|
|
261
|
-
| {
|
|
262
|
-
valueOf(): T;
|
|
263
|
-
};
|
|
264
257
|
/**
|
|
265
258
|
* Raw data is stored in instances of the Buffer class.
|
|
266
259
|
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/dgram.js)
|
|
27
27
|
*/
|
|
28
28
|
declare module "dgram" {
|
|
29
|
-
import { AddressInfo } from "node:net";
|
|
29
|
+
import { AddressInfo, BlockList } from "node:net";
|
|
30
30
|
import * as dns from "node:dns";
|
|
31
31
|
import { Abortable, EventEmitter } from "node:events";
|
|
32
32
|
interface RemoteInfo {
|
|
@@ -59,6 +59,8 @@ declare module "dgram" {
|
|
|
59
59
|
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
60
60
|
) => void)
|
|
61
61
|
| undefined;
|
|
62
|
+
receiveBlockList?: BlockList | undefined;
|
|
63
|
+
sendBlockList?: BlockList | undefined;
|
|
62
64
|
}
|
|
63
65
|
/**
|
|
64
66
|
* Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram
|
|
@@ -112,7 +112,7 @@ declare module "fs/promises" {
|
|
|
112
112
|
appendFile(
|
|
113
113
|
data: string | Uint8Array,
|
|
114
114
|
options?:
|
|
115
|
-
| (ObjectEncodingOptions &
|
|
115
|
+
| (ObjectEncodingOptions & Abortable)
|
|
116
116
|
| BufferEncoding
|
|
117
117
|
| null,
|
|
118
118
|
): Promise<void>;
|
|
@@ -402,7 +402,7 @@ declare module "fs/promises" {
|
|
|
402
402
|
writeFile(
|
|
403
403
|
data: string | Uint8Array,
|
|
404
404
|
options?:
|
|
405
|
-
| (ObjectEncodingOptions &
|
|
405
|
+
| (ObjectEncodingOptions & Abortable)
|
|
406
406
|
| BufferEncoding
|
|
407
407
|
| null,
|
|
408
408
|
): Promise<void>;
|
|
@@ -223,6 +223,7 @@ declare module "http" {
|
|
|
223
223
|
path?: string | null | undefined;
|
|
224
224
|
port?: number | string | null | undefined;
|
|
225
225
|
protocol?: string | null | undefined;
|
|
226
|
+
setDefaultHeaders?: boolean | undefined;
|
|
226
227
|
setHost?: boolean | undefined;
|
|
227
228
|
signal?: AbortSignal | undefined;
|
|
228
229
|
socketPath?: string | undefined;
|
|
@@ -127,6 +127,13 @@ declare module "module" {
|
|
|
127
127
|
* directory if it is enabled, or `undefined` otherwise.
|
|
128
128
|
*/
|
|
129
129
|
function getCompileCacheDir(): string | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* @since v23.2.0, v22.14.0
|
|
132
|
+
*/
|
|
133
|
+
function findPackageJSON(
|
|
134
|
+
specifier: string | URL,
|
|
135
|
+
base?: string | URL,
|
|
136
|
+
): undefined | string;
|
|
130
137
|
/**
|
|
131
138
|
* @since v18.6.0, v16.17.0
|
|
132
139
|
*/
|
|
@@ -168,6 +175,80 @@ declare module "module" {
|
|
|
168
175
|
options?: RegisterOptions<Data>,
|
|
169
176
|
): void;
|
|
170
177
|
function register<Data = any>(specifier: string | URL, options?: RegisterOptions<Data>): void;
|
|
178
|
+
interface StripTypeScriptTypesOptions {
|
|
179
|
+
/**
|
|
180
|
+
* Possible values are:
|
|
181
|
+
* * `'strip'` Only strip type annotations without performing the transformation of TypeScript features.
|
|
182
|
+
* * `'transform'` Strip type annotations and transform TypeScript features to JavaScript.
|
|
183
|
+
* @default 'strip'
|
|
184
|
+
*/
|
|
185
|
+
mode?: "strip" | "transform" | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* Only when `mode` is `'transform'`, if `true`, a source map
|
|
188
|
+
* will be generated for the transformed code.
|
|
189
|
+
* @default false
|
|
190
|
+
*/
|
|
191
|
+
sourceMap?: boolean | undefined;
|
|
192
|
+
/**
|
|
193
|
+
* Specifies the source url used in the source map.
|
|
194
|
+
*/
|
|
195
|
+
sourceUrl?: string | undefined;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It
|
|
199
|
+
* can be used to strip type annotations from TypeScript code before running it
|
|
200
|
+
* with `vm.runInContext()` or `vm.compileFunction()`.
|
|
201
|
+
* By default, it will throw an error if the code contains TypeScript features
|
|
202
|
+
* that require transformation such as `Enums`,
|
|
203
|
+
* see [type-stripping](https://nodejs.org/docs/latest-v22.x/api/typescript.md#type-stripping) for more information.
|
|
204
|
+
* When mode is `'transform'`, it also transforms TypeScript features to JavaScript,
|
|
205
|
+
* see [transform TypeScript features](https://nodejs.org/docs/latest-v22.x/api/typescript.md#typescript-features) for more information.
|
|
206
|
+
* When mode is `'strip'`, source maps are not generated, because locations are preserved.
|
|
207
|
+
* If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown.
|
|
208
|
+
*
|
|
209
|
+
* _WARNING_: The output of this function should not be considered stable across Node.js versions,
|
|
210
|
+
* due to changes in the TypeScript parser.
|
|
211
|
+
*
|
|
212
|
+
* ```js
|
|
213
|
+
* import { stripTypeScriptTypes } from 'node:module';
|
|
214
|
+
* const code = 'const a: number = 1;';
|
|
215
|
+
* const strippedCode = stripTypeScriptTypes(code);
|
|
216
|
+
* console.log(strippedCode);
|
|
217
|
+
* // Prints: const a = 1;
|
|
218
|
+
* ```
|
|
219
|
+
*
|
|
220
|
+
* If `sourceUrl` is provided, it will be used appended as a comment at the end of the output:
|
|
221
|
+
*
|
|
222
|
+
* ```js
|
|
223
|
+
* import { stripTypeScriptTypes } from 'node:module';
|
|
224
|
+
* const code = 'const a: number = 1;';
|
|
225
|
+
* const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' });
|
|
226
|
+
* console.log(strippedCode);
|
|
227
|
+
* // Prints: const a = 1\n\n//# sourceURL=source.ts;
|
|
228
|
+
* ```
|
|
229
|
+
*
|
|
230
|
+
* When `mode` is `'transform'`, the code is transformed to JavaScript:
|
|
231
|
+
*
|
|
232
|
+
* ```js
|
|
233
|
+
* import { stripTypeScriptTypes } from 'node:module';
|
|
234
|
+
* const code = `
|
|
235
|
+
* namespace MathUtil {
|
|
236
|
+
* export const add = (a: number, b: number) => a + b;
|
|
237
|
+
* }`;
|
|
238
|
+
* const strippedCode = stripTypeScriptTypes(code, { mode: 'transform', sourceMap: true });
|
|
239
|
+
* console.log(strippedCode);
|
|
240
|
+
* // Prints:
|
|
241
|
+
* // var MathUtil;
|
|
242
|
+
* // (function(MathUtil) {
|
|
243
|
+
* // MathUtil.add = (a, b)=>a + b;
|
|
244
|
+
* // })(MathUtil || (MathUtil = {}));
|
|
245
|
+
* // # sourceMappingURL=data:application/json;base64, ...
|
|
246
|
+
* ```
|
|
247
|
+
* @since v22.13.0
|
|
248
|
+
* @param code The code to strip type annotations from.
|
|
249
|
+
* @returns The code with type annotations stripped.
|
|
250
|
+
*/
|
|
251
|
+
function stripTypeScriptTypes(code: string, options?: StripTypeScriptTypesOptions): string;
|
|
171
252
|
/* eslint-enable @definitelytyped/no-unnecessary-generics */
|
|
172
253
|
/**
|
|
173
254
|
* The `module.syncBuiltinESMExports()` method updates all the live bindings for
|
|
@@ -65,6 +65,7 @@ declare module "net" {
|
|
|
65
65
|
* @since v18.13.0
|
|
66
66
|
*/
|
|
67
67
|
autoSelectFamilyAttemptTimeout?: number | undefined;
|
|
68
|
+
blockList?: BlockList | undefined;
|
|
68
69
|
}
|
|
69
70
|
interface IpcSocketConnectOpts {
|
|
70
71
|
path: string;
|
|
@@ -535,6 +536,15 @@ declare module "net" {
|
|
|
535
536
|
* @since v18.17.0, v20.1.0
|
|
536
537
|
*/
|
|
537
538
|
highWaterMark?: number | undefined;
|
|
539
|
+
/**
|
|
540
|
+
* `blockList` can be used for disabling inbound
|
|
541
|
+
* access to specific IP addresses, IP ranges, or IP subnets. This does not
|
|
542
|
+
* work if the server is behind a reverse proxy, NAT, etc. because the address
|
|
543
|
+
* checked against the block list is the address of the proxy, or the one
|
|
544
|
+
* specified by the NAT.
|
|
545
|
+
* @since v22.13.0
|
|
546
|
+
*/
|
|
547
|
+
blockList?: BlockList | undefined;
|
|
538
548
|
}
|
|
539
549
|
interface DropArgument {
|
|
540
550
|
localAddress?: string;
|
|
@@ -786,6 +796,12 @@ declare module "net" {
|
|
|
786
796
|
* @since v15.0.0, v14.18.0
|
|
787
797
|
*/
|
|
788
798
|
rules: readonly string[];
|
|
799
|
+
/**
|
|
800
|
+
* Returns `true` if the `value` is a `net.BlockList`.
|
|
801
|
+
* @since v22.13.0
|
|
802
|
+
* @param value Any JS value
|
|
803
|
+
*/
|
|
804
|
+
static isBlockList(value: unknown): value is BlockList;
|
|
789
805
|
}
|
|
790
806
|
interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
|
|
791
807
|
timeout?: number | undefined;
|
|
@@ -998,6 +1014,14 @@ declare module "net" {
|
|
|
998
1014
|
* @since v15.14.0, v14.18.0
|
|
999
1015
|
*/
|
|
1000
1016
|
readonly flowlabel: number;
|
|
1017
|
+
/**
|
|
1018
|
+
* @since v22.13.0
|
|
1019
|
+
* @param input An input string containing an IP address and optional port,
|
|
1020
|
+
* e.g. `123.1.2.3:1234` or `[1::1]:1234`.
|
|
1021
|
+
* @returns Returns a `SocketAddress` if parsing was successful.
|
|
1022
|
+
* Otherwise returns `undefined`.
|
|
1023
|
+
*/
|
|
1024
|
+
static parse(input: string): SocketAddress | undefined;
|
|
1001
1025
|
}
|
|
1002
1026
|
}
|
|
1003
1027
|
declare module "node:net" {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.13.8",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -215,6 +215,6 @@
|
|
|
215
215
|
"undici-types": "~6.20.0"
|
|
216
216
|
},
|
|
217
217
|
"peerDependencies": {},
|
|
218
|
-
"typesPublisherContentHash": "
|
|
218
|
+
"typesPublisherContentHash": "5bedf97bc7316e968d26ed4056ab5980a72db818c2493f707d9cc1f728b11c88",
|
|
219
219
|
"typeScriptVersion": "5.0"
|
|
220
220
|
}
|
|
@@ -594,6 +594,11 @@ declare module "perf_hooks" {
|
|
|
594
594
|
buffered?: boolean | undefined;
|
|
595
595
|
},
|
|
596
596
|
): void;
|
|
597
|
+
/**
|
|
598
|
+
* @since v16.0.0
|
|
599
|
+
* @returns Current list of entries stored in the performance observer, emptying it out.
|
|
600
|
+
*/
|
|
601
|
+
takeRecords(): PerformanceEntry[];
|
|
597
602
|
}
|
|
598
603
|
/**
|
|
599
604
|
* Provides detailed network timing data regarding the loading of an application's resources.
|
|
@@ -186,7 +186,10 @@ declare module "process" {
|
|
|
186
186
|
readonly inspector: boolean;
|
|
187
187
|
/**
|
|
188
188
|
* A boolean value that is `true` if the current Node.js build includes support for IPv6.
|
|
189
|
+
*
|
|
190
|
+
* Since all Node.js builds have IPv6 support, this value is always `true`.
|
|
189
191
|
* @since v0.5.3
|
|
192
|
+
* @deprecated This property is always true, and any checks based on it are redundant.
|
|
190
193
|
*/
|
|
191
194
|
readonly ipv6: boolean;
|
|
192
195
|
/**
|
|
@@ -202,17 +205,29 @@ declare module "process" {
|
|
|
202
205
|
readonly tls: boolean;
|
|
203
206
|
/**
|
|
204
207
|
* A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS.
|
|
208
|
+
*
|
|
209
|
+
* In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional ALPN support.
|
|
210
|
+
* This value is therefore identical to that of `process.features.tls`.
|
|
205
211
|
* @since v4.8.0
|
|
212
|
+
* @deprecated Use `process.features.tls` instead.
|
|
206
213
|
*/
|
|
207
214
|
readonly tls_alpn: boolean;
|
|
208
215
|
/**
|
|
209
216
|
* A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS.
|
|
217
|
+
*
|
|
218
|
+
* In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional OCSP support.
|
|
219
|
+
* This value is therefore identical to that of `process.features.tls`.
|
|
210
220
|
* @since v0.11.13
|
|
221
|
+
* @deprecated Use `process.features.tls` instead.
|
|
211
222
|
*/
|
|
212
223
|
readonly tls_ocsp: boolean;
|
|
213
224
|
/**
|
|
214
225
|
* A boolean value that is `true` if the current Node.js build includes support for SNI in TLS.
|
|
226
|
+
*
|
|
227
|
+
* In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional SNI support.
|
|
228
|
+
* This value is therefore identical to that of `process.features.tls`.
|
|
215
229
|
* @since v0.5.3
|
|
230
|
+
* @deprecated Use `process.features.tls` instead.
|
|
216
231
|
*/
|
|
217
232
|
readonly tls_sni: boolean;
|
|
218
233
|
/**
|
|
@@ -223,8 +238,10 @@ declare module "process" {
|
|
|
223
238
|
readonly typescript: "strip" | "transform" | false;
|
|
224
239
|
/**
|
|
225
240
|
* A boolean value that is `true` if the current Node.js build includes support for libuv.
|
|
226
|
-
*
|
|
241
|
+
*
|
|
242
|
+
* Since it's not possible to build Node.js without libuv, this value is always `true`.
|
|
227
243
|
* @since v0.5.3
|
|
244
|
+
* @deprecated This property is always true, and any checks based on it are redundant.
|
|
228
245
|
*/
|
|
229
246
|
readonly uv: boolean;
|
|
230
247
|
}
|
|
@@ -1676,7 +1693,7 @@ declare module "process" {
|
|
|
1676
1693
|
*/
|
|
1677
1694
|
nextTick(callback: Function, ...args: any[]): void;
|
|
1678
1695
|
/**
|
|
1679
|
-
* This API is available through the [--
|
|
1696
|
+
* This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag.
|
|
1680
1697
|
*
|
|
1681
1698
|
* `process.permission` is an object whose methods are used to manage permissions for the current process.
|
|
1682
1699
|
* Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model).
|