cdk-ecr-deployment 3.1.7 → 3.1.9
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 +2 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +4 -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/fs.d.ts +0 -3
- 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 +74 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +30 -5
- 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 +206 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +0 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +85 -17
- 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 +2 -1
- package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +4 -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/fs.d.ts +0 -3
- 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 +74 -0
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +30 -5
- 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 +206 -1
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +0 -5
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +85 -17
- 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 +2 -1
- package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +4 -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/fs.d.ts +0 -3
- 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 +74 -0
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +30 -5
- 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 +206 -1
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +0 -5
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +85 -17
- package/package.json +2 -2
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/sqlite.js)
|
|
44
44
|
*/
|
|
45
45
|
declare module "node:sqlite" {
|
|
46
|
+
type SupportedValueType = null | number | bigint | string | Uint8Array;
|
|
46
47
|
interface DatabaseSyncOptions {
|
|
47
48
|
/**
|
|
48
49
|
* If `true`, the database is opened by the constructor. When
|
|
@@ -70,6 +71,76 @@ declare module "node:sqlite" {
|
|
|
70
71
|
* @default false
|
|
71
72
|
*/
|
|
72
73
|
enableDoubleQuotedStringLiterals?: boolean | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* If `true`, the database is opened in read-only mode.
|
|
76
|
+
* If the database does not exist, opening it will fail.
|
|
77
|
+
* @since v22.12.0
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
readOnly?: boolean | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* If `true`, the `loadExtension` SQL function
|
|
83
|
+
* and the `loadExtension()` method are enabled.
|
|
84
|
+
* You can call `enableLoadExtension(false)` later to disable this feature.
|
|
85
|
+
* @since v22.13.0
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
88
|
+
allowExtension?: boolean | undefined;
|
|
89
|
+
}
|
|
90
|
+
interface CreateSessionOptions {
|
|
91
|
+
/**
|
|
92
|
+
* A specific table to track changes for. By default, changes to all tables are tracked.
|
|
93
|
+
* @since v22.12.0
|
|
94
|
+
*/
|
|
95
|
+
table?: string | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Name of the database to track. This is useful when multiple databases have been added using
|
|
98
|
+
* [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html).
|
|
99
|
+
* @since v22.12.0
|
|
100
|
+
* @default 'main'
|
|
101
|
+
*/
|
|
102
|
+
db?: string | undefined;
|
|
103
|
+
}
|
|
104
|
+
interface ApplyChangesetOptions {
|
|
105
|
+
/**
|
|
106
|
+
* Skip changes that, when targeted table name is supplied to this function, return a truthy value.
|
|
107
|
+
* By default, all changes are attempted.
|
|
108
|
+
* @since v22.12.0
|
|
109
|
+
*/
|
|
110
|
+
filter?: ((tableName: string) => boolean) | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* Determines how conflicts are handled. **Default**: `SQLITE_CHANGESET_ABORT`.
|
|
113
|
+
* @since v22.12.0
|
|
114
|
+
*/
|
|
115
|
+
onConflict?: number | undefined;
|
|
116
|
+
}
|
|
117
|
+
interface FunctionOptions {
|
|
118
|
+
/**
|
|
119
|
+
* If `true`, the [`SQLITE_DETERMINISTIC`](https://www.sqlite.org/c3ref/c_deterministic.html) flag is
|
|
120
|
+
* set on the created function.
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
123
|
+
deterministic?: boolean | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* If `true`, the [`SQLITE_DIRECTONLY`](https://www.sqlite.org/c3ref/c_directonly.html) flag is set on
|
|
126
|
+
* the created function.
|
|
127
|
+
* @default false
|
|
128
|
+
*/
|
|
129
|
+
directOnly?: boolean | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* If `true`, integer arguments to `function`
|
|
132
|
+
* are converted to `BigInt`s. If `false`, integer arguments are passed as
|
|
133
|
+
* JavaScript numbers.
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
useBigIntArguments?: boolean | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* If `true`, `function` can accept a variable number of
|
|
139
|
+
* arguments. If `false`, `function` must be invoked with exactly
|
|
140
|
+
* `function.length` arguments.
|
|
141
|
+
* @default false
|
|
142
|
+
*/
|
|
143
|
+
varargs?: boolean | undefined;
|
|
73
144
|
}
|
|
74
145
|
/**
|
|
75
146
|
* This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs
|
|
@@ -92,6 +163,22 @@ declare module "node:sqlite" {
|
|
|
92
163
|
* @since v22.5.0
|
|
93
164
|
*/
|
|
94
165
|
close(): void;
|
|
166
|
+
/**
|
|
167
|
+
* Loads a shared library into the database connection. This method is a wrapper
|
|
168
|
+
* around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the
|
|
169
|
+
* `allowExtension` option when constructing the `DatabaseSync` instance.
|
|
170
|
+
* @since v22.13.0
|
|
171
|
+
* @param path The path to the shared library to load.
|
|
172
|
+
*/
|
|
173
|
+
loadExtension(path: string): void;
|
|
174
|
+
/**
|
|
175
|
+
* Enables or disables the `loadExtension` SQL function, and the `loadExtension()`
|
|
176
|
+
* method. When `allowExtension` is `false` when constructing, you cannot enable
|
|
177
|
+
* loading extensions for security reasons.
|
|
178
|
+
* @since v22.13.0
|
|
179
|
+
* @param allow Whether to allow loading extensions.
|
|
180
|
+
*/
|
|
181
|
+
enableLoadExtension(allow: boolean): void;
|
|
95
182
|
/**
|
|
96
183
|
* This method allows one or more SQL statements to be executed without returning
|
|
97
184
|
* any results. This method is useful when executing SQL statements read from a
|
|
@@ -100,6 +187,21 @@ declare module "node:sqlite" {
|
|
|
100
187
|
* @param sql A SQL string to execute.
|
|
101
188
|
*/
|
|
102
189
|
exec(sql: string): void;
|
|
190
|
+
/**
|
|
191
|
+
* This method is used to create SQLite user-defined functions. This method is a
|
|
192
|
+
* wrapper around [`sqlite3_create_function_v2()`](https://www.sqlite.org/c3ref/create_function.html).
|
|
193
|
+
* @since v22.13.0
|
|
194
|
+
* @param name The name of the SQLite function to create.
|
|
195
|
+
* @param options Optional configuration settings for the function.
|
|
196
|
+
* @param func The JavaScript function to call when the SQLite
|
|
197
|
+
* function is invoked.
|
|
198
|
+
*/
|
|
199
|
+
function(
|
|
200
|
+
name: string,
|
|
201
|
+
options: FunctionOptions,
|
|
202
|
+
func: (...args: SupportedValueType[]) => SupportedValueType,
|
|
203
|
+
): void;
|
|
204
|
+
function(name: string, func: (...args: SupportedValueType[]) => SupportedValueType): void;
|
|
103
205
|
/**
|
|
104
206
|
* Opens the database specified in the `location` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via
|
|
105
207
|
* the constructor. An exception is thrown if the database is already open.
|
|
@@ -114,8 +216,73 @@ declare module "node:sqlite" {
|
|
|
114
216
|
* @return The prepared statement.
|
|
115
217
|
*/
|
|
116
218
|
prepare(sql: string): StatementSync;
|
|
219
|
+
/**
|
|
220
|
+
* Creates and attaches a session to the database. This method is a wrapper around
|
|
221
|
+
* [`sqlite3session_create()`](https://www.sqlite.org/session/sqlite3session_create.html) and
|
|
222
|
+
* [`sqlite3session_attach()`](https://www.sqlite.org/session/sqlite3session_attach.html).
|
|
223
|
+
* @param options The configuration options for the session.
|
|
224
|
+
* @returns A session handle.
|
|
225
|
+
* @since v22.12.0
|
|
226
|
+
*/
|
|
227
|
+
createSession(options?: CreateSessionOptions): Session;
|
|
228
|
+
/**
|
|
229
|
+
* An exception is thrown if the database is not
|
|
230
|
+
* open. This method is a wrapper around
|
|
231
|
+
* [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html).
|
|
232
|
+
*
|
|
233
|
+
* ```js
|
|
234
|
+
* const sourceDb = new DatabaseSync(':memory:');
|
|
235
|
+
* const targetDb = new DatabaseSync(':memory:');
|
|
236
|
+
*
|
|
237
|
+
* sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
|
|
238
|
+
* targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
|
|
239
|
+
*
|
|
240
|
+
* const session = sourceDb.createSession();
|
|
241
|
+
*
|
|
242
|
+
* const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
|
|
243
|
+
* insert.run(1, 'hello');
|
|
244
|
+
* insert.run(2, 'world');
|
|
245
|
+
*
|
|
246
|
+
* const changeset = session.changeset();
|
|
247
|
+
* targetDb.applyChangeset(changeset);
|
|
248
|
+
* // Now that the changeset has been applied, targetDb contains the same data as sourceDb.
|
|
249
|
+
* ```
|
|
250
|
+
* @param changeset A binary changeset or patchset.
|
|
251
|
+
* @param options The configuration options for how the changes will be applied.
|
|
252
|
+
* @returns Whether the changeset was applied succesfully without being aborted.
|
|
253
|
+
* @since v22.12.0
|
|
254
|
+
*/
|
|
255
|
+
applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* @since v22.12.0
|
|
259
|
+
*/
|
|
260
|
+
interface Session {
|
|
261
|
+
/**
|
|
262
|
+
* Retrieves a changeset containing all changes since the changeset was created. Can be called multiple times.
|
|
263
|
+
* An exception is thrown if the database or the session is not open. This method is a wrapper around
|
|
264
|
+
* [`sqlite3session_changeset()`](https://www.sqlite.org/session/sqlite3session_changeset.html).
|
|
265
|
+
* @returns Binary changeset that can be applied to other databases.
|
|
266
|
+
* @since v22.12.0
|
|
267
|
+
*/
|
|
268
|
+
changeset(): Uint8Array;
|
|
269
|
+
/**
|
|
270
|
+
* Similar to the method above, but generates a more compact patchset. See
|
|
271
|
+
* [Changesets and Patchsets](https://www.sqlite.org/sessionintro.html#changesets_and_patchsets)
|
|
272
|
+
* in the documentation of SQLite. An exception is thrown if the database or the session is not open. This method is a
|
|
273
|
+
* wrapper around
|
|
274
|
+
* [`sqlite3session_patchset()`](https://www.sqlite.org/session/sqlite3session_patchset.html).
|
|
275
|
+
* @returns Binary patchset that can be applied to other databases.
|
|
276
|
+
* @since v22.12.0
|
|
277
|
+
*/
|
|
278
|
+
patchset(): Uint8Array;
|
|
279
|
+
/**
|
|
280
|
+
* Closes the session. An exception is thrown if the database or the session is not open. This method is a
|
|
281
|
+
* wrapper around
|
|
282
|
+
* [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html).
|
|
283
|
+
*/
|
|
284
|
+
close(): void;
|
|
117
285
|
}
|
|
118
|
-
type SupportedValueType = null | number | bigint | string | Uint8Array;
|
|
119
286
|
interface StatementResultingChanges {
|
|
120
287
|
/**
|
|
121
288
|
* The number of rows modified, inserted, or deleted by the most recently completed `INSERT`, `UPDATE`, or `DELETE` statement.
|
|
@@ -181,6 +348,24 @@ declare module "node:sqlite" {
|
|
|
181
348
|
*/
|
|
182
349
|
get(...anonymousParameters: SupportedValueType[]): unknown;
|
|
183
350
|
get(namedParameters: Record<string, SupportedValueType>, ...anonymousParameters: SupportedValueType[]): unknown;
|
|
351
|
+
/**
|
|
352
|
+
* This method executes a prepared statement and returns an iterator of
|
|
353
|
+
* objects. If the prepared statement does not return any results, this method
|
|
354
|
+
* returns an empty iterator. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using
|
|
355
|
+
* the values in `namedParameters` and `anonymousParameters`.
|
|
356
|
+
* @since v22.13.0
|
|
357
|
+
* @param namedParameters An optional object used to bind named parameters.
|
|
358
|
+
* The keys of this object are used to configure the mapping.
|
|
359
|
+
* @param anonymousParameters Zero or more values to bind to anonymous parameters.
|
|
360
|
+
* @returns An iterable iterator of objects. Each object corresponds to a row
|
|
361
|
+
* returned by executing the prepared statement. The keys and values of each
|
|
362
|
+
* object correspond to the column names and values of the row.
|
|
363
|
+
*/
|
|
364
|
+
iterate(...anonymousParameters: SupportedValueType[]): NodeJS.Iterator<unknown>;
|
|
365
|
+
iterate(
|
|
366
|
+
namedParameters: Record<string, SupportedValueType>,
|
|
367
|
+
...anonymousParameters: SupportedValueType[]
|
|
368
|
+
): NodeJS.Iterator<unknown>;
|
|
184
369
|
/**
|
|
185
370
|
* This method executes a prepared statement and returns an object summarizing the
|
|
186
371
|
* resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the
|
|
@@ -231,4 +416,24 @@ declare module "node:sqlite" {
|
|
|
231
416
|
*/
|
|
232
417
|
readonly sourceSQL: string;
|
|
233
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* @since v22.13.0
|
|
421
|
+
*/
|
|
422
|
+
namespace constants {
|
|
423
|
+
/**
|
|
424
|
+
* Conflicting changes are omitted.
|
|
425
|
+
* @since v22.12.0
|
|
426
|
+
*/
|
|
427
|
+
const SQLITE_CHANGESET_OMIT: number;
|
|
428
|
+
/**
|
|
429
|
+
* Conflicting changes replace existing values.
|
|
430
|
+
* @since v22.12.0
|
|
431
|
+
*/
|
|
432
|
+
const SQLITE_CHANGESET_REPLACE: number;
|
|
433
|
+
/**
|
|
434
|
+
* Abort when a change encounters a conflict and roll back database.
|
|
435
|
+
* @since v22.12.0
|
|
436
|
+
*/
|
|
437
|
+
const SQLITE_CHANGESET_ABORT: number;
|
|
438
|
+
}
|
|
234
439
|
}
|
|
@@ -887,10 +887,7 @@ declare module "node:test" {
|
|
|
887
887
|
* });
|
|
888
888
|
* });
|
|
889
889
|
* ```
|
|
890
|
-
*
|
|
891
|
-
* Only available through the [--experimental-test-snapshots](https://nodejs.org/api/cli.html#--experimental-test-snapshots) flag.
|
|
892
890
|
* @since v22.3.0
|
|
893
|
-
* @experimental
|
|
894
891
|
*/
|
|
895
892
|
snapshot(value: any, options?: AssertSnapshotOptions): void;
|
|
896
893
|
}
|
|
@@ -1691,9 +1688,7 @@ declare module "node:test" {
|
|
|
1691
1688
|
[Symbol.dispose](): void;
|
|
1692
1689
|
}
|
|
1693
1690
|
/**
|
|
1694
|
-
* Only available through the [--experimental-test-snapshots](https://nodejs.org/api/cli.html#--experimental-test-snapshots) flag.
|
|
1695
1691
|
* @since v22.3.0
|
|
1696
|
-
* @experimental
|
|
1697
1692
|
*/
|
|
1698
1693
|
namespace snapshot {
|
|
1699
1694
|
/**
|
|
@@ -108,14 +108,14 @@ declare module "util" {
|
|
|
108
108
|
export interface InspectOptionsStylized extends InspectOptions {
|
|
109
109
|
stylize(text: string, styleType: Style): string;
|
|
110
110
|
}
|
|
111
|
-
export interface
|
|
111
|
+
export interface CallSiteObject {
|
|
112
112
|
/**
|
|
113
|
-
* Returns the name of the function associated with this
|
|
113
|
+
* Returns the name of the function associated with this call site.
|
|
114
114
|
*/
|
|
115
115
|
functionName: string;
|
|
116
116
|
/**
|
|
117
117
|
* Returns the name of the resource that contains the script for the
|
|
118
|
-
* function for this
|
|
118
|
+
* function for this call site.
|
|
119
119
|
*/
|
|
120
120
|
scriptName: string;
|
|
121
121
|
/**
|
|
@@ -185,15 +185,22 @@ declare module "util" {
|
|
|
185
185
|
* @since v10.0.0
|
|
186
186
|
*/
|
|
187
187
|
export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
|
|
188
|
+
interface GetCallSitesOptions {
|
|
189
|
+
/**
|
|
190
|
+
* Reconstruct the original location in the stacktrace from the source-map.
|
|
191
|
+
* Enabled by default with the flag `--enable-source-maps`.
|
|
192
|
+
*/
|
|
193
|
+
sourceMap?: boolean | undefined;
|
|
194
|
+
}
|
|
188
195
|
/**
|
|
189
|
-
* Returns an array of
|
|
196
|
+
* Returns an array of call site objects containing the stack of
|
|
190
197
|
* the caller function.
|
|
191
198
|
*
|
|
192
199
|
* ```js
|
|
193
200
|
* const util = require('node:util');
|
|
194
201
|
*
|
|
195
202
|
* function exampleFunction() {
|
|
196
|
-
* const callSites = util.
|
|
203
|
+
* const callSites = util.getCallSites();
|
|
197
204
|
*
|
|
198
205
|
* console.log('Call Sites:');
|
|
199
206
|
* callSites.forEach((callSite, index) => {
|
|
@@ -225,12 +232,40 @@ declare module "util" {
|
|
|
225
232
|
*
|
|
226
233
|
* anotherFunction();
|
|
227
234
|
* ```
|
|
228
|
-
*
|
|
235
|
+
*
|
|
236
|
+
* It is possible to reconstruct the original locations by setting the option `sourceMap` to `true`.
|
|
237
|
+
* If the source map is not available, the original location will be the same as the current location.
|
|
238
|
+
* When the `--enable-source-maps` flag is enabled, for example when using `--experimental-transform-types`,
|
|
239
|
+
* `sourceMap` will be true by default.
|
|
240
|
+
*
|
|
241
|
+
* ```ts
|
|
242
|
+
* import util from 'node:util';
|
|
243
|
+
*
|
|
244
|
+
* interface Foo {
|
|
245
|
+
* foo: string;
|
|
246
|
+
* }
|
|
247
|
+
*
|
|
248
|
+
* const callSites = util.getCallSites({ sourceMap: true });
|
|
249
|
+
*
|
|
250
|
+
* // With sourceMap:
|
|
251
|
+
* // Function Name: ''
|
|
252
|
+
* // Script Name: example.js
|
|
253
|
+
* // Line Number: 7
|
|
254
|
+
* // Column Number: 26
|
|
255
|
+
*
|
|
256
|
+
* // Without sourceMap:
|
|
257
|
+
* // Function Name: ''
|
|
258
|
+
* // Script Name: example.js
|
|
259
|
+
* // Line Number: 2
|
|
260
|
+
* // Column Number: 26
|
|
261
|
+
* ```
|
|
262
|
+
* @param frameCount Number of frames to capture as call site objects.
|
|
229
263
|
* **Default:** `10`. Allowable range is between 1 and 200.
|
|
230
|
-
* @return An array of
|
|
264
|
+
* @return An array of call site objects
|
|
231
265
|
* @since v22.9.0
|
|
232
266
|
*/
|
|
233
|
-
export function
|
|
267
|
+
export function getCallSites(frameCount?: number, options?: GetCallSitesOptions): CallSiteObject[];
|
|
268
|
+
export function getCallSites(options: GetCallSitesOptions): CallSiteObject[];
|
|
234
269
|
/**
|
|
235
270
|
* Returns the string name for a numeric error code that comes from a Node.js API.
|
|
236
271
|
* The mapping between error codes and error names is platform-dependent.
|
|
@@ -260,6 +295,20 @@ declare module "util" {
|
|
|
260
295
|
* @since v16.0.0, v14.17.0
|
|
261
296
|
*/
|
|
262
297
|
export function getSystemErrorMap(): Map<number, [string, string]>;
|
|
298
|
+
/**
|
|
299
|
+
* Returns the string message for a numeric error code that comes from a Node.js
|
|
300
|
+
* API.
|
|
301
|
+
* The mapping between error codes and string messages is platform-dependent.
|
|
302
|
+
*
|
|
303
|
+
* ```js
|
|
304
|
+
* fs.access('file/that/does/not/exist', (err) => {
|
|
305
|
+
* const name = util.getSystemErrorMessage(err.errno);
|
|
306
|
+
* console.error(name); // no such file or directory
|
|
307
|
+
* });
|
|
308
|
+
* ```
|
|
309
|
+
* @since v22.12.0
|
|
310
|
+
*/
|
|
311
|
+
export function getSystemErrorMessage(err: number): string;
|
|
263
312
|
/**
|
|
264
313
|
* The `util.log()` method prints the given `string` to `stdout` with an included
|
|
265
314
|
* timestamp.
|
|
@@ -303,27 +352,36 @@ declare module "util" {
|
|
|
303
352
|
*/
|
|
304
353
|
export function transferableAbortSignal(signal: AbortSignal): AbortSignal;
|
|
305
354
|
/**
|
|
306
|
-
* Listens to abort event on the provided `signal` and
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
*
|
|
355
|
+
* Listens to abort event on the provided `signal` and returns a promise that resolves when the `signal` is aborted.
|
|
356
|
+
* If `resource` is provided, it weakly references the operation's associated object,
|
|
357
|
+
* so if `resource` is garbage collected before the `signal` aborts,
|
|
358
|
+
* then returned promise shall remain pending.
|
|
359
|
+
* This prevents memory leaks in long-running or non-cancelable operations.
|
|
310
360
|
*
|
|
311
361
|
* ```js
|
|
312
362
|
* import { aborted } from 'node:util';
|
|
313
363
|
*
|
|
364
|
+
* // Obtain an object with an abortable signal, like a custom resource or operation.
|
|
314
365
|
* const dependent = obtainSomethingAbortable();
|
|
315
366
|
*
|
|
367
|
+
* // Pass `dependent` as the resource, indicating the promise should only resolve
|
|
368
|
+
* // if `dependent` is still in memory when the signal is aborted.
|
|
316
369
|
* aborted(dependent.signal, dependent).then(() => {
|
|
317
|
-
* //
|
|
370
|
+
* // This code runs when `dependent` is aborted.
|
|
371
|
+
* console.log('Dependent resource was aborted.');
|
|
318
372
|
* });
|
|
319
373
|
*
|
|
374
|
+
* // Simulate an event that triggers the abort.
|
|
320
375
|
* dependent.on('event', () => {
|
|
321
|
-
* dependent.abort();
|
|
376
|
+
* dependent.abort(); // This will cause the `aborted` promise to resolve.
|
|
322
377
|
* });
|
|
323
378
|
* ```
|
|
324
379
|
* @since v19.7.0
|
|
325
380
|
* @experimental
|
|
326
|
-
* @param resource Any non-null
|
|
381
|
+
* @param resource Any non-null object tied to the abortable operation and held weakly.
|
|
382
|
+
* If `resource` is garbage collected before the `signal` aborts, the promise remains pending,
|
|
383
|
+
* allowing Node.js to stop tracking it.
|
|
384
|
+
* This helps prevent memory leaks in long-running or non-cancelable operations.
|
|
327
385
|
*/
|
|
328
386
|
export function aborted(signal: AbortSignal, resource: any): Promise<void>;
|
|
329
387
|
/**
|
|
@@ -1307,8 +1365,6 @@ declare module "util" {
|
|
|
1307
1365
|
| "strikethrough"
|
|
1308
1366
|
| "underline";
|
|
1309
1367
|
/**
|
|
1310
|
-
* Stability: 1.1 - Active development
|
|
1311
|
-
*
|
|
1312
1368
|
* This function returns a formatted text considering the `format` passed.
|
|
1313
1369
|
*
|
|
1314
1370
|
* ```js
|
|
@@ -1917,6 +1973,18 @@ declare module "util/types" {
|
|
|
1917
1973
|
* @since v10.0.0
|
|
1918
1974
|
*/
|
|
1919
1975
|
function isBigInt64Array(value: unknown): value is BigInt64Array;
|
|
1976
|
+
/**
|
|
1977
|
+
* Returns `true` if the value is a BigInt object, e.g. created
|
|
1978
|
+
* by `Object(BigInt(123))`.
|
|
1979
|
+
*
|
|
1980
|
+
* ```js
|
|
1981
|
+
* util.types.isBigIntObject(Object(BigInt(123))); // Returns true
|
|
1982
|
+
* util.types.isBigIntObject(BigInt(123)); // Returns false
|
|
1983
|
+
* util.types.isBigIntObject(123); // Returns false
|
|
1984
|
+
* ```
|
|
1985
|
+
* @since v10.4.0
|
|
1986
|
+
*/
|
|
1987
|
+
function isBigIntObject(object: unknown): object is BigInt;
|
|
1920
1988
|
/**
|
|
1921
1989
|
* Returns `true` if the value is a `BigUint64Array` instance.
|
|
1922
1990
|
*
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Thu,
|
|
11
|
+
* Last updated: Thu, 13 Feb 2025 04:35:29 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -956,6 +956,59 @@ declare module "assert" {
|
|
|
956
956
|
* @since v13.6.0, v12.16.0
|
|
957
957
|
*/
|
|
958
958
|
function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
|
|
959
|
+
/**
|
|
960
|
+
* `assert.partialDeepStrictEqual()` Asserts the equivalence between the `actual` and `expected` parameters through a
|
|
961
|
+
* deep comparison, ensuring that all properties in the `expected` parameter are
|
|
962
|
+
* present in the `actual` parameter with equivalent values, not allowing type coercion.
|
|
963
|
+
* The main difference with `assert.deepStrictEqual()` is that `assert.partialDeepStrictEqual()` does not require
|
|
964
|
+
* all properties in the `actual` parameter to be present in the `expected` parameter.
|
|
965
|
+
* This method should always pass the same test cases as `assert.deepStrictEqual()`, behaving as a super set of it.
|
|
966
|
+
*
|
|
967
|
+
* ```js
|
|
968
|
+
* import assert from 'node:assert';
|
|
969
|
+
*
|
|
970
|
+
* assert.partialDeepStrictEqual({ a: 1, b: 2 }, { a: 1, b: 2 });
|
|
971
|
+
* // OK
|
|
972
|
+
*
|
|
973
|
+
* assert.partialDeepStrictEqual({ a: { b: { c: 1 } } }, { a: { b: { c: 1 } } });
|
|
974
|
+
* // OK
|
|
975
|
+
*
|
|
976
|
+
* assert.partialDeepStrictEqual({ a: 1, b: 2, c: 3 }, { a: 1, b: 2 });
|
|
977
|
+
* // OK
|
|
978
|
+
*
|
|
979
|
+
* assert.partialDeepStrictEqual(new Set(['value1', 'value2']), new Set(['value1', 'value2']));
|
|
980
|
+
* // OK
|
|
981
|
+
*
|
|
982
|
+
* assert.partialDeepStrictEqual(new Map([['key1', 'value1']]), new Map([['key1', 'value1']]));
|
|
983
|
+
* // OK
|
|
984
|
+
*
|
|
985
|
+
* assert.partialDeepStrictEqual(new Uint8Array([1, 2, 3]), new Uint8Array([1, 2, 3]));
|
|
986
|
+
* // OK
|
|
987
|
+
*
|
|
988
|
+
* assert.partialDeepStrictEqual(/abc/, /abc/);
|
|
989
|
+
* // OK
|
|
990
|
+
*
|
|
991
|
+
* assert.partialDeepStrictEqual([{ a: 5 }, { b: 5 }], [{ a: 5 }]);
|
|
992
|
+
* // OK
|
|
993
|
+
*
|
|
994
|
+
* assert.partialDeepStrictEqual(new Set([{ a: 1 }, { b: 1 }]), new Set([{ a: 1 }]));
|
|
995
|
+
* // OK
|
|
996
|
+
*
|
|
997
|
+
* assert.partialDeepStrictEqual(new Date(0), new Date(0));
|
|
998
|
+
* // OK
|
|
999
|
+
*
|
|
1000
|
+
* assert.partialDeepStrictEqual({ a: 1 }, { a: 1, b: 2 });
|
|
1001
|
+
* // AssertionError
|
|
1002
|
+
*
|
|
1003
|
+
* assert.partialDeepStrictEqual({ a: 1, b: '2' }, { a: 1, b: 2 });
|
|
1004
|
+
* // AssertionError
|
|
1005
|
+
*
|
|
1006
|
+
* assert.partialDeepStrictEqual({ a: { b: 2 } }, { a: { b: '2' } });
|
|
1007
|
+
* // AssertionError
|
|
1008
|
+
* ```
|
|
1009
|
+
* @since v22.13.0
|
|
1010
|
+
*/
|
|
1011
|
+
function partialDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
959
1012
|
/**
|
|
960
1013
|
* In strict assertion mode, non-strict methods behave like their corresponding strict methods. For example,
|
|
961
1014
|
* {@link deepEqual} will behave like {@link deepStrictEqual}.
|
|
@@ -1015,6 +1068,7 @@ declare module "assert" {
|
|
|
1015
1068
|
| "deepStrictEqual"
|
|
1016
1069
|
| "ifError"
|
|
1017
1070
|
| "strict"
|
|
1071
|
+
| "AssertionError"
|
|
1018
1072
|
>
|
|
1019
1073
|
& {
|
|
1020
1074
|
(value: unknown, message?: string | Error): asserts value;
|
|
@@ -1030,6 +1084,7 @@ declare module "assert" {
|
|
|
1030
1084
|
deepStrictEqual: typeof deepStrictEqual;
|
|
1031
1085
|
ifError: typeof ifError;
|
|
1032
1086
|
strict: typeof strict;
|
|
1087
|
+
AssertionError: typeof AssertionError;
|
|
1033
1088
|
};
|
|
1034
1089
|
}
|
|
1035
1090
|
export = assert;
|
|
@@ -107,7 +107,8 @@ declare module "buffer" {
|
|
|
107
107
|
*
|
|
108
108
|
* If `totalLength` is provided, it is coerced to an unsigned integer. If the
|
|
109
109
|
* combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
|
|
110
|
-
* truncated to `totalLength`.
|
|
110
|
+
* truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is
|
|
111
|
+
* less than `totalLength`, the remaining space is filled with zeros.
|
|
111
112
|
*
|
|
112
113
|
* ```js
|
|
113
114
|
* import { Buffer } from 'node:buffer';
|
|
@@ -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 {
|
|
@@ -45,6 +45,7 @@ declare module "dgram" {
|
|
|
45
45
|
interface SocketOptions extends Abortable {
|
|
46
46
|
type: SocketType;
|
|
47
47
|
reuseAddr?: boolean | undefined;
|
|
48
|
+
reusePort?: boolean | undefined;
|
|
48
49
|
/**
|
|
49
50
|
* @default false
|
|
50
51
|
*/
|
|
@@ -58,6 +59,8 @@ declare module "dgram" {
|
|
|
58
59
|
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
59
60
|
) => void)
|
|
60
61
|
| undefined;
|
|
62
|
+
receiveBlockList?: BlockList | undefined;
|
|
63
|
+
sendBlockList?: BlockList | undefined;
|
|
61
64
|
}
|
|
62
65
|
/**
|
|
63
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>;
|
|
@@ -3795,9 +3795,6 @@ declare module "fs" {
|
|
|
3795
3795
|
flush?: boolean | undefined;
|
|
3796
3796
|
}
|
|
3797
3797
|
/**
|
|
3798
|
-
* Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
|
|
3799
|
-
* returned by this method has a default `highWaterMark` of 64 KiB.
|
|
3800
|
-
*
|
|
3801
3798
|
* `options` can include `start` and `end` values to read a range of bytes from
|
|
3802
3799
|
* the file instead of the entire file. Both `start` and `end` are inclusive and
|
|
3803
3800
|
* start counting at 0, allowed values are in the
|
|
@@ -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;
|