aws-delivlib 14.15.64 → 14.15.66
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/lib/custom-resource-handlers/src/certificate-signing-request.tsbuildinfo +1 -1
- package/lib/custom-resource-handlers/src/pgp-secret.tsbuildinfo +1 -1
- package/lib/custom-resource-handlers/src/private-key.tsbuildinfo +1 -1
- package/lib/publishing/github/node_modules/.yarn-integrity +2 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/README.md +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs.d.ts +15 -16
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/https.d.ts +3 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/module.d.ts +50 -5
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/package.json +4 -4
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/process.d.ts +28 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sqlite.d.ts +63 -17
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test.d.ts +82 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers/promises.d.ts +24 -13
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers.d.ts +159 -112
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/util.d.ts +11 -4
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/worker_threads.d.ts +1 -0
- package/lib/publishing/github/node_modules/undici-types/dispatcher.d.ts +1 -0
- package/lib/publishing/github/node_modules/undici-types/package.json +1 -1
- package/lib/publishing/github/node_modules/undici-types/readable.d.ts +5 -0
- package/lib/publishing/github/node_modules/undici-types/webidl.d.ts +6 -0
- package/package.json +2 -2
package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/module.d.ts
CHANGED
@@ -128,12 +128,54 @@ declare module "module" {
|
|
128
128
|
*/
|
129
129
|
function getCompileCacheDir(): string | undefined;
|
130
130
|
/**
|
131
|
-
*
|
131
|
+
* ```text
|
132
|
+
* /path/to/project
|
133
|
+
* ├ packages/
|
134
|
+
* ├ bar/
|
135
|
+
* ├ bar.js
|
136
|
+
* └ package.json // name = '@foo/bar'
|
137
|
+
* └ qux/
|
138
|
+
* ├ node_modules/
|
139
|
+
* └ some-package/
|
140
|
+
* └ package.json // name = 'some-package'
|
141
|
+
* ├ qux.js
|
142
|
+
* └ package.json // name = '@foo/qux'
|
143
|
+
* ├ main.js
|
144
|
+
* └ package.json // name = '@foo'
|
145
|
+
* ```
|
146
|
+
* ```js
|
147
|
+
* // /path/to/project/packages/bar/bar.js
|
148
|
+
* import { findPackageJSON } from 'node:module';
|
149
|
+
*
|
150
|
+
* findPackageJSON('..', import.meta.url);
|
151
|
+
* // '/path/to/project/package.json'
|
152
|
+
* // Same result when passing an absolute specifier instead:
|
153
|
+
* findPackageJSON(new URL('../', import.meta.url));
|
154
|
+
* findPackageJSON(import.meta.resolve('../'));
|
155
|
+
*
|
156
|
+
* findPackageJSON('some-package', import.meta.url);
|
157
|
+
* // '/path/to/project/packages/bar/node_modules/some-package/package.json'
|
158
|
+
* // When passing an absolute specifier, you might get a different result if the
|
159
|
+
* // resolved module is inside a subfolder that has nested `package.json`.
|
160
|
+
* findPackageJSON(import.meta.resolve('some-package'));
|
161
|
+
* // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json'
|
162
|
+
*
|
163
|
+
* findPackageJSON('@foo/qux', import.meta.url);
|
164
|
+
* // '/path/to/project/packages/qux/package.json'
|
165
|
+
* ```
|
166
|
+
* @since v22.14.0
|
167
|
+
* @param specifier The specifier for the module whose `package.json` to
|
168
|
+
* retrieve. When passing a _bare specifier_, the `package.json` at the root of
|
169
|
+
* the package is returned. When passing a _relative specifier_ or an _absolute specifier_,
|
170
|
+
* the closest parent `package.json` is returned.
|
171
|
+
* @param base The absolute location (`file:` URL string or FS path) of the
|
172
|
+
* containing module. For CJS, use `__filename` (not `__dirname`!); for ESM, use
|
173
|
+
* `import.meta.url`. You do not need to pass it if `specifier` is an _absolute specifier_.
|
174
|
+
* @returns A path if the `package.json` is found. When `startLocation`
|
175
|
+
* is a package, the package's root `package.json`; when a relative or unresolved, the closest
|
176
|
+
* `package.json` to the `startLocation`.
|
132
177
|
*/
|
133
|
-
function findPackageJSON(
|
134
|
-
specifier: string | URL,
|
135
|
-
base?: string | URL,
|
136
|
-
): undefined | string;
|
178
|
+
function findPackageJSON(specifier: string | URL, base?: string | URL): string | undefined;
|
137
179
|
/**
|
138
180
|
* @since v18.6.0, v16.17.0
|
139
181
|
*/
|
@@ -162,6 +204,9 @@ declare module "module" {
|
|
162
204
|
* Register a module that exports hooks that customize Node.js module
|
163
205
|
* resolution and loading behavior. See
|
164
206
|
* [Customization hooks](https://nodejs.org/docs/latest-v22.x/api/module.html#customization-hooks).
|
207
|
+
*
|
208
|
+
* This feature requires `--allow-worker` if used with the
|
209
|
+
* [Permission Model](https://nodejs.org/docs/latest-v22.x/api/permissions.html#permission-model).
|
165
210
|
* @since v20.6.0, v18.19.0
|
166
211
|
* @param specifier Customization hooks to be registered; this should be
|
167
212
|
* the same string that would be passed to `import()`, except that if it is
|
package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/node",
|
3
|
-
"version": "22.
|
3
|
+
"version": "22.14.0",
|
4
4
|
"description": "TypeScript definitions for node",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
6
6
|
"license": "MIT",
|
@@ -212,9 +212,9 @@
|
|
212
212
|
},
|
213
213
|
"scripts": {},
|
214
214
|
"dependencies": {
|
215
|
-
"undici-types": "~6.
|
215
|
+
"undici-types": "~6.21.0"
|
216
216
|
},
|
217
217
|
"peerDependencies": {},
|
218
|
-
"typesPublisherContentHash": "
|
219
|
-
"typeScriptVersion": "5.
|
218
|
+
"typesPublisherContentHash": "85380e858018285cbe47b1f83eb49c9bd791be4b6f059c2ae75b99b5b202ea93",
|
219
|
+
"typeScriptVersion": "5.1"
|
220
220
|
}
|
package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/process.d.ts
CHANGED
@@ -1910,6 +1910,34 @@ declare module "process" {
|
|
1910
1910
|
* @since v0.8.0
|
1911
1911
|
*/
|
1912
1912
|
traceDeprecation: boolean;
|
1913
|
+
/**
|
1914
|
+
* An object is "refable" if it implements the Node.js "Refable protocol".
|
1915
|
+
* Specifically, this means that the object implements the `Symbol.for('nodejs.ref')`
|
1916
|
+
* and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js
|
1917
|
+
* event loop alive, while "unref'd" objects will not. Historically, this was
|
1918
|
+
* implemented by using `ref()` and `unref()` methods directly on the objects.
|
1919
|
+
* This pattern, however, is being deprecated in favor of the "Refable protocol"
|
1920
|
+
* in order to better support Web Platform API types whose APIs cannot be modified
|
1921
|
+
* to add `ref()` and `unref()` methods but still need to support that behavior.
|
1922
|
+
* @since v22.14.0
|
1923
|
+
* @experimental
|
1924
|
+
* @param maybeRefable An object that may be "refable".
|
1925
|
+
*/
|
1926
|
+
ref(maybeRefable: any): void;
|
1927
|
+
/**
|
1928
|
+
* An object is "unrefable" if it implements the Node.js "Refable protocol".
|
1929
|
+
* Specifically, this means that the object implements the `Symbol.for('nodejs.ref')`
|
1930
|
+
* and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js
|
1931
|
+
* event loop alive, while "unref'd" objects will not. Historically, this was
|
1932
|
+
* implemented by using `ref()` and `unref()` methods directly on the objects.
|
1933
|
+
* This pattern, however, is being deprecated in favor of the "Refable protocol"
|
1934
|
+
* in order to better support Web Platform API types whose APIs cannot be modified
|
1935
|
+
* to add `ref()` and `unref()` methods but still need to support that behavior.
|
1936
|
+
* @since v22.14.0
|
1937
|
+
* @experimental
|
1938
|
+
* @param maybeRefable An object that may be "unref'd".
|
1939
|
+
*/
|
1940
|
+
unref(maybeRefable: any): void;
|
1913
1941
|
/* EventEmitter */
|
1914
1942
|
addListener(event: "beforeExit", listener: BeforeExitListener): this;
|
1915
1943
|
addListener(event: "disconnect", listener: DisconnectListener): this;
|
package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sqlite.d.ts
CHANGED
@@ -43,7 +43,10 @@
|
|
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
|
46
|
+
type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView;
|
47
|
+
type SQLOutputValue = null | number | bigint | string | Uint8Array;
|
48
|
+
/** @deprecated Use `SQLInputValue` or `SQLOutputValue` instead. */
|
49
|
+
type SupportedValueType = SQLOutputValue;
|
47
50
|
interface DatabaseSyncOptions {
|
48
51
|
/**
|
49
52
|
* If `true`, the database is opened by the constructor. When
|
@@ -109,10 +112,30 @@ declare module "node:sqlite" {
|
|
109
112
|
*/
|
110
113
|
filter?: ((tableName: string) => boolean) | undefined;
|
111
114
|
/**
|
112
|
-
*
|
115
|
+
* A function that determines how to handle conflicts. The function receives one argument,
|
116
|
+
* which can be one of the following values:
|
117
|
+
*
|
118
|
+
* * `SQLITE_CHANGESET_DATA`: A `DELETE` or `UPDATE` change does not contain the expected "before" values.
|
119
|
+
* * `SQLITE_CHANGESET_NOTFOUND`: A row matching the primary key of the `DELETE` or `UPDATE` change does not exist.
|
120
|
+
* * `SQLITE_CHANGESET_CONFLICT`: An `INSERT` change results in a duplicate primary key.
|
121
|
+
* * `SQLITE_CHANGESET_FOREIGN_KEY`: Applying a change would result in a foreign key violation.
|
122
|
+
* * `SQLITE_CHANGESET_CONSTRAINT`: Applying a change results in a `UNIQUE`, `CHECK`, or `NOT NULL` constraint
|
123
|
+
* violation.
|
124
|
+
*
|
125
|
+
* The function should return one of the following values:
|
126
|
+
*
|
127
|
+
* * `SQLITE_CHANGESET_OMIT`: Omit conflicting changes.
|
128
|
+
* * `SQLITE_CHANGESET_REPLACE`: Replace existing values with conflicting changes (only valid with
|
129
|
+
`SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT` conflicts).
|
130
|
+
* * `SQLITE_CHANGESET_ABORT`: Abort on conflict and roll back the database.
|
131
|
+
*
|
132
|
+
* When an error is thrown in the conflict handler or when any other value is returned from the handler,
|
133
|
+
* applying the changeset is aborted and the database is rolled back.
|
134
|
+
*
|
135
|
+
* **Default**: A function that returns `SQLITE_CHANGESET_ABORT`.
|
113
136
|
* @since v22.12.0
|
114
137
|
*/
|
115
|
-
onConflict?: number | undefined;
|
138
|
+
onConflict?: ((conflictType: number) => number) | undefined;
|
116
139
|
}
|
117
140
|
interface FunctionOptions {
|
118
141
|
/**
|
@@ -322,11 +345,11 @@ declare module "node:sqlite" {
|
|
322
345
|
* @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of
|
323
346
|
* the row.
|
324
347
|
*/
|
325
|
-
all(...anonymousParameters:
|
348
|
+
all(...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue>[];
|
326
349
|
all(
|
327
|
-
namedParameters: Record<string,
|
328
|
-
...anonymousParameters:
|
329
|
-
):
|
350
|
+
namedParameters: Record<string, SQLInputValue>,
|
351
|
+
...anonymousParameters: SQLInputValue[]
|
352
|
+
): Record<string, SQLOutputValue>[];
|
330
353
|
/**
|
331
354
|
* The source SQL text of the prepared statement with parameter
|
332
355
|
* placeholders replaced by the values that were used during the most recent
|
@@ -346,8 +369,11 @@ declare module "node:sqlite" {
|
|
346
369
|
* @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no
|
347
370
|
* rows were returned from the database then this method returns `undefined`.
|
348
371
|
*/
|
349
|
-
get(...anonymousParameters:
|
350
|
-
get(
|
372
|
+
get(...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue> | undefined;
|
373
|
+
get(
|
374
|
+
namedParameters: Record<string, SQLInputValue>,
|
375
|
+
...anonymousParameters: SQLInputValue[]
|
376
|
+
): Record<string, SQLOutputValue> | undefined;
|
351
377
|
/**
|
352
378
|
* This method executes a prepared statement and returns an iterator of
|
353
379
|
* objects. If the prepared statement does not return any results, this method
|
@@ -361,11 +387,11 @@ declare module "node:sqlite" {
|
|
361
387
|
* returned by executing the prepared statement. The keys and values of each
|
362
388
|
* object correspond to the column names and values of the row.
|
363
389
|
*/
|
364
|
-
iterate(...anonymousParameters:
|
390
|
+
iterate(...anonymousParameters: SQLInputValue[]): NodeJS.Iterator<Record<string, SQLOutputValue>>;
|
365
391
|
iterate(
|
366
|
-
namedParameters: Record<string,
|
367
|
-
...anonymousParameters:
|
368
|
-
): NodeJS.Iterator<
|
392
|
+
namedParameters: Record<string, SQLInputValue>,
|
393
|
+
...anonymousParameters: SQLInputValue[]
|
394
|
+
): NodeJS.Iterator<Record<string, SQLOutputValue>>;
|
369
395
|
/**
|
370
396
|
* This method executes a prepared statement and returns an object summarizing the
|
371
397
|
* resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the
|
@@ -374,10 +400,10 @@ declare module "node:sqlite" {
|
|
374
400
|
* @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping.
|
375
401
|
* @param anonymousParameters Zero or more values to bind to anonymous parameters.
|
376
402
|
*/
|
377
|
-
run(...anonymousParameters:
|
403
|
+
run(...anonymousParameters: SQLInputValue[]): StatementResultingChanges;
|
378
404
|
run(
|
379
|
-
namedParameters: Record<string,
|
380
|
-
...anonymousParameters:
|
405
|
+
namedParameters: Record<string, SQLInputValue>,
|
406
|
+
...anonymousParameters: SQLInputValue[]
|
381
407
|
): StatementResultingChanges;
|
382
408
|
/**
|
383
409
|
* The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding
|
@@ -420,13 +446,33 @@ declare module "node:sqlite" {
|
|
420
446
|
* @since v22.13.0
|
421
447
|
*/
|
422
448
|
namespace constants {
|
449
|
+
/**
|
450
|
+
* The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is present in the database, but one or more other (non primary-key) fields modified by the update do not contain the expected "before" values.
|
451
|
+
* @since v22.14.0
|
452
|
+
*/
|
453
|
+
const SQLITE_CHANGESET_DATA: number;
|
454
|
+
/**
|
455
|
+
* The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database.
|
456
|
+
* @since v22.14.0
|
457
|
+
*/
|
458
|
+
const SQLITE_CHANGESET_NOTFOUND: number;
|
459
|
+
/**
|
460
|
+
* This constant is passed to the conflict handler while processing an INSERT change if the operation would result in duplicate primary key values.
|
461
|
+
* @since v22.14.0
|
462
|
+
*/
|
463
|
+
const SQLITE_CHANGESET_CONFLICT: number;
|
464
|
+
/**
|
465
|
+
* If foreign key handling is enabled, and applying a changeset leaves the database in a state containing foreign key violations, the conflict handler is invoked with this constant exactly once before the changeset is committed. If the conflict handler returns `SQLITE_CHANGESET_OMIT`, the changes, including those that caused the foreign key constraint violation, are committed. Or, if it returns `SQLITE_CHANGESET_ABORT`, the changeset is rolled back.
|
466
|
+
* @since v22.14.0
|
467
|
+
*/
|
468
|
+
const SQLITE_CHANGESET_FOREIGN_KEY: number;
|
423
469
|
/**
|
424
470
|
* Conflicting changes are omitted.
|
425
471
|
* @since v22.12.0
|
426
472
|
*/
|
427
473
|
const SQLITE_CHANGESET_OMIT: number;
|
428
474
|
/**
|
429
|
-
* Conflicting changes replace existing values.
|
475
|
+
* Conflicting changes replace existing values. Note that this value can only be returned when the type of conflict is either `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT`.
|
430
476
|
* @since v22.12.0
|
431
477
|
*/
|
432
478
|
const SQLITE_CHANGESET_REPLACE: number;
|
package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test.d.ts
CHANGED
@@ -147,6 +147,7 @@ declare module "node:test" {
|
|
147
147
|
export {
|
148
148
|
after,
|
149
149
|
afterEach,
|
150
|
+
assert,
|
150
151
|
before,
|
151
152
|
beforeEach,
|
152
153
|
describe,
|
@@ -753,6 +754,18 @@ declare module "node:test" {
|
|
753
754
|
* @returns A {@link Promise} resolved with `undefined` once the test completes.
|
754
755
|
*/
|
755
756
|
test: typeof test;
|
757
|
+
/**
|
758
|
+
* This method polls a `condition` function until that function either returns
|
759
|
+
* successfully or the operation times out.
|
760
|
+
* @since v22.14.0
|
761
|
+
* @param condition An assertion function that is invoked
|
762
|
+
* periodically until it completes successfully or the defined polling timeout
|
763
|
+
* elapses. Successful completion is defined as not throwing or rejecting. This
|
764
|
+
* function does not accept any arguments, and is allowed to return any value.
|
765
|
+
* @param options An optional configuration object for the polling operation.
|
766
|
+
* @returns Fulfilled with the value returned by `condition`.
|
767
|
+
*/
|
768
|
+
waitFor<T>(condition: () => T, options?: TestContextWaitForOptions): Promise<Awaited<T>>;
|
756
769
|
/**
|
757
770
|
* Each test provides its own MockTracker instance.
|
758
771
|
*/
|
@@ -781,6 +794,33 @@ declare module "node:test" {
|
|
781
794
|
| "throws"
|
782
795
|
>
|
783
796
|
{
|
797
|
+
/**
|
798
|
+
* This function serializes `value` and writes it to the file specified by `path`.
|
799
|
+
*
|
800
|
+
* ```js
|
801
|
+
* test('snapshot test with default serialization', (t) => {
|
802
|
+
* t.assert.fileSnapshot({ value1: 1, value2: 2 }, './snapshots/snapshot.json');
|
803
|
+
* });
|
804
|
+
* ```
|
805
|
+
*
|
806
|
+
* This function differs from `context.assert.snapshot()` in the following ways:
|
807
|
+
*
|
808
|
+
* * The snapshot file path is explicitly provided by the user.
|
809
|
+
* * Each snapshot file is limited to a single snapshot value.
|
810
|
+
* * No additional escaping is performed by the test runner.
|
811
|
+
*
|
812
|
+
* These differences allow snapshot files to better support features such as syntax
|
813
|
+
* highlighting.
|
814
|
+
* @since v22.14.0
|
815
|
+
* @param value A value to serialize to a string. If Node.js was started with
|
816
|
+
* the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--test-update-snapshots)
|
817
|
+
* flag, the serialized value is written to
|
818
|
+
* `path`. Otherwise, the serialized value is compared to the contents of the
|
819
|
+
* existing snapshot file.
|
820
|
+
* @param path The file where the serialized `value` is written.
|
821
|
+
* @param options Optional configuration options.
|
822
|
+
*/
|
823
|
+
fileSnapshot(value: any, path: string, options?: AssertSnapshotOptions): void;
|
784
824
|
/**
|
785
825
|
* This function implements assertions for snapshot testing.
|
786
826
|
* ```js
|
@@ -795,8 +835,17 @@ declare module "node:test" {
|
|
795
835
|
* });
|
796
836
|
* ```
|
797
837
|
* @since v22.3.0
|
838
|
+
* @param value A value to serialize to a string. If Node.js was started with
|
839
|
+
* the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--test-update-snapshots)
|
840
|
+
* flag, the serialized value is written to
|
841
|
+
* the snapshot file. Otherwise, the serialized value is compared to the
|
842
|
+
* corresponding value in the existing snapshot file.
|
798
843
|
*/
|
799
844
|
snapshot(value: any, options?: AssertSnapshotOptions): void;
|
845
|
+
/**
|
846
|
+
* A custom assertion function registered with `assert.register()`.
|
847
|
+
*/
|
848
|
+
[name: string]: (...args: any[]) => void;
|
800
849
|
}
|
801
850
|
interface AssertSnapshotOptions {
|
802
851
|
/**
|
@@ -809,6 +858,20 @@ declare module "node:test" {
|
|
809
858
|
*/
|
810
859
|
serializers?: ReadonlyArray<(value: any) => any> | undefined;
|
811
860
|
}
|
861
|
+
interface TestContextWaitForOptions {
|
862
|
+
/**
|
863
|
+
* The number of milliseconds to wait after an unsuccessful
|
864
|
+
* invocation of `condition` before trying again.
|
865
|
+
* @default 50
|
866
|
+
*/
|
867
|
+
interval?: number | undefined;
|
868
|
+
/**
|
869
|
+
* The poll timeout in milliseconds. If `condition` has not
|
870
|
+
* succeeded by the time this elapses, an error occurs.
|
871
|
+
* @default 1000
|
872
|
+
*/
|
873
|
+
timeout?: number | undefined;
|
874
|
+
}
|
812
875
|
|
813
876
|
/**
|
814
877
|
* An instance of `SuiteContext` is passed to each suite function in order to
|
@@ -1594,6 +1657,24 @@ declare module "node:test" {
|
|
1594
1657
|
*/
|
1595
1658
|
[Symbol.dispose](): void;
|
1596
1659
|
}
|
1660
|
+
/**
|
1661
|
+
* An object whose methods are used to configure available assertions on the
|
1662
|
+
* `TestContext` objects in the current process. The methods from `node:assert`
|
1663
|
+
* and snapshot testing functions are available by default.
|
1664
|
+
*
|
1665
|
+
* It is possible to apply the same configuration to all files by placing common
|
1666
|
+
* configuration code in a module
|
1667
|
+
* preloaded with `--require` or `--import`.
|
1668
|
+
* @since v22.14.0
|
1669
|
+
*/
|
1670
|
+
namespace assert {
|
1671
|
+
/**
|
1672
|
+
* Defines a new assertion function with the provided name and function. If an
|
1673
|
+
* assertion already exists with the same name, it is overwritten.
|
1674
|
+
* @since v22.14.0
|
1675
|
+
*/
|
1676
|
+
function register(name: string, fn: (this: TestContext, ...args: any[]) => void): void;
|
1677
|
+
}
|
1597
1678
|
/**
|
1598
1679
|
* @since v22.3.0
|
1599
1680
|
*/
|
@@ -1625,6 +1706,7 @@ declare module "node:test" {
|
|
1625
1706
|
export {
|
1626
1707
|
after,
|
1627
1708
|
afterEach,
|
1709
|
+
assert,
|
1628
1710
|
before,
|
1629
1711
|
beforeEach,
|
1630
1712
|
describe,
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* The `timers/promises` API provides an alternative set of timer functions
|
3
|
-
* that return `Promise` objects. The API is accessible via
|
3
|
+
* that return `Promise` objects. The API is accessible via
|
4
|
+
* `require('node:timers/promises')`.
|
4
5
|
*
|
5
6
|
* ```js
|
6
7
|
* import {
|
@@ -10,6 +11,7 @@
|
|
10
11
|
* } from 'node:timers/promises';
|
11
12
|
* ```
|
12
13
|
* @since v15.0.0
|
14
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/timers/promises.js)
|
13
15
|
*/
|
14
16
|
declare module "timers/promises" {
|
15
17
|
import { TimerOptions } from "node:timers";
|
@@ -24,7 +26,8 @@ declare module "timers/promises" {
|
|
24
26
|
* console.log(res); // Prints 'result'
|
25
27
|
* ```
|
26
28
|
* @since v15.0.0
|
27
|
-
* @param
|
29
|
+
* @param delay The number of milliseconds to wait before fulfilling the
|
30
|
+
* promise. **Default:** `1`.
|
28
31
|
* @param value A value with which the promise is fulfilled.
|
29
32
|
*/
|
30
33
|
function setTimeout<T = void>(delay?: number, value?: T, options?: TimerOptions): Promise<T>;
|
@@ -62,33 +65,41 @@ declare module "timers/promises" {
|
|
62
65
|
* console.log(Date.now());
|
63
66
|
* ```
|
64
67
|
* @since v15.9.0
|
68
|
+
* @param delay The number of milliseconds to wait between iterations.
|
69
|
+
* **Default:** `1`.
|
70
|
+
* @param value A value with which the iterator returns.
|
65
71
|
*/
|
66
|
-
function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions):
|
72
|
+
function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): NodeJS.AsyncIterator<T>;
|
67
73
|
interface Scheduler {
|
68
74
|
/**
|
69
|
-
* An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification
|
75
|
+
* An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification
|
76
|
+
* being developed as a standard Web Platform API.
|
70
77
|
*
|
71
|
-
* Calling `timersPromises.scheduler.wait(delay, options)` is roughly equivalent
|
72
|
-
*
|
78
|
+
* Calling `timersPromises.scheduler.wait(delay, options)` is roughly equivalent
|
79
|
+
* to calling `timersPromises.setTimeout(delay, undefined, options)` except that
|
80
|
+
* the `ref` option is not supported.
|
73
81
|
*
|
74
82
|
* ```js
|
75
83
|
* import { scheduler } from 'node:timers/promises';
|
76
84
|
*
|
77
85
|
* await scheduler.wait(1000); // Wait one second before continuing
|
78
86
|
* ```
|
79
|
-
* @since v16.14.0
|
87
|
+
* @since v17.3.0, v16.14.0
|
80
88
|
* @experimental
|
81
|
-
* @param
|
89
|
+
* @param delay The number of milliseconds to wait before resolving the
|
90
|
+
* promise.
|
82
91
|
*/
|
83
|
-
wait
|
92
|
+
wait(delay: number, options?: { signal?: AbortSignal }): Promise<void>;
|
84
93
|
/**
|
85
|
-
* An experimental API defined by the [Scheduling APIs](https://
|
94
|
+
* An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification
|
86
95
|
* being developed as a standard Web Platform API.
|
87
|
-
*
|
88
|
-
*
|
96
|
+
*
|
97
|
+
* Calling `timersPromises.scheduler.yield()` is equivalent to calling
|
98
|
+
* `timersPromises.setImmediate()` with no arguments.
|
99
|
+
* @since v17.3.0, v16.14.0
|
89
100
|
* @experimental
|
90
101
|
*/
|
91
|
-
yield
|
102
|
+
yield(): Promise<void>;
|
92
103
|
}
|
93
104
|
const scheduler: Scheduler;
|
94
105
|
}
|