diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md index a6cab200d..e6ef09eac 100755 --- a/node_modules/@types/node/README.md +++ b/node_modules/@types/node/README.md @@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/). Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. ### Additional Details - * Last updated: Tue, 23 Nov 2021 19:31:07 GMT + * Last updated: Wed, 15 Dec 2021 21:31:06 GMT * Dependencies: none * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require` diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts index 9f916c16b..fb7158670 100755 --- a/node_modules/@types/node/assert.d.ts +++ b/node_modules/@types/node/assert.d.ts @@ -1,7 +1,7 @@ /** * The `assert` module provides a set of assertion functions for verifying * invariants. - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/assert.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/assert.js) */ declare module 'assert' { /** diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts index 35b9be2c1..f53198e83 100755 --- a/node_modules/@types/node/async_hooks.d.ts +++ b/node_modules/@types/node/async_hooks.d.ts @@ -6,7 +6,7 @@ * import async_hooks from 'async_hooks'; * ``` * @experimental - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/async_hooks.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/async_hooks.js) */ declare module 'async_hooks' { /** @@ -395,8 +395,9 @@ declare module 'async_hooks' { getStore(): T | undefined; /** * Runs a function synchronously within a context and returns its - * return value. The store is not accessible outside of the callback function or - * the asynchronous operations created within the callback. + * return value. The store is not accessible outside of the callback function. + * The store is accessible to any asynchronous operations created within the + * callback. * * The optional `args` are passed to the callback function. * @@ -410,6 +411,9 @@ declare module 'async_hooks' { * try { * asyncLocalStorage.run(store, () => { * asyncLocalStorage.getStore(); // Returns the store object + * setTimeout(() => { + * asyncLocalStorage.getStore(); // Returns the store object + * }, 200); * throw new Error(); * }); * } catch (e) { diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts index cfcd33e0a..4b9104e3a 100755 --- a/node_modules/@types/node/buffer.d.ts +++ b/node_modules/@types/node/buffer.d.ts @@ -41,7 +41,7 @@ * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74]. * const buf7 = Buffer.from('tést', 'latin1'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/buffer.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/buffer.js) */ declare module 'buffer' { import { BinaryLike } from 'node:crypto'; @@ -113,18 +113,18 @@ declare module 'buffer' { /** * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across * multiple worker threads. - * @since v15.7.0 + * @since v15.7.0, v14.18.0 * @experimental */ export class Blob { /** * The total size of the `Blob` in bytes. - * @since v15.7.0 + * @since v15.7.0, v14.18.0 */ readonly size: number; /** * The content-type of the `Blob`. - * @since v15.7.0 + * @since v15.7.0, v14.18.0 */ readonly type: string; /** @@ -139,13 +139,13 @@ declare module 'buffer' { /** * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of * the `Blob` data. - * @since v15.7.0 + * @since v15.7.0, v14.18.0 */ arrayBuffer(): Promise; /** * Creates and returns a new `Blob` containing a subset of this `Blob` objects * data. The original `Blob` is not altered. - * @since v15.7.0 + * @since v15.7.0, v14.18.0 * @param start The starting index. * @param end The ending index. * @param type The content-type for the new `Blob` @@ -154,7 +154,7 @@ declare module 'buffer' { /** * Returns a promise that fulfills with the contents of the `Blob` decoded as a * UTF-8 string. - * @since v15.7.0 + * @since v15.7.0, v14.18.0 */ text(): Promise; /** @@ -2114,7 +2114,7 @@ declare module 'buffer' { * **binary data and predate the introduction of typed arrays in JavaScript.** * **For code running using Node.js APIs, converting between base64-encoded strings** * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.** - * @since v15.13.0 + * @since v15.13.0, v14.17.0 * @deprecated Use `Buffer.from(data, 'base64')` instead. * @param data The Base64-encoded input string. */ @@ -2130,7 +2130,7 @@ declare module 'buffer' { * **binary data and predate the introduction of typed arrays in JavaScript.** * **For code running using Node.js APIs, converting between base64-encoded strings** * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.** - * @since v15.13.0 + * @since v15.13.0, v14.17.0 * @deprecated Use `buf.toString('base64')` instead. * @param data An ASCII (Latin1) string. */ diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts index d38314551..7eae502ef 100755 --- a/node_modules/@types/node/child_process.d.ts +++ b/node_modules/@types/node/child_process.d.ts @@ -60,7 +60,7 @@ * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however, * the synchronous methods can have significant impact on performance due to * stalling the event loop while spawned processes complete. - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/child_process.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/child_process.js) */ declare module 'child_process' { import { ObjectEncodingOptions } from 'node:fs'; diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts index 7f1614105..c48084da7 100755 --- a/node_modules/@types/node/cluster.d.ts +++ b/node_modules/@types/node/cluster.d.ts @@ -49,7 +49,7 @@ * ``` * * On Windows, it is not yet possible to set up a named pipe server in a worker. - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/cluster.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/cluster.js) */ declare module 'cluster' { import * as child from 'node:child_process'; diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts index ede7a53f2..9297018c7 100755 --- a/node_modules/@types/node/console.d.ts +++ b/node_modules/@types/node/console.d.ts @@ -53,7 +53,7 @@ * myConsole.warn(`Danger ${name}! Danger!`); * // Prints: Danger Will Robinson! Danger!, to err * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/console.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/console.js) */ declare module 'console' { import console = require('node:console'); diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts index a896ae713..898612a5a 100755 --- a/node_modules/@types/node/crypto.d.ts +++ b/node_modules/@types/node/crypto.d.ts @@ -13,7 +13,7 @@ * // Prints: * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/crypto.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/crypto.js) */ declare module 'crypto' { import * as stream from 'node:stream'; @@ -3030,7 +3030,7 @@ declare module 'crypto' { /** * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a * cryptographic pseudorandom number generator. - * @since v15.6.0 + * @since v15.6.0, v14.17.0 */ function randomUUID(options?: RandomUUIDOptions): string; interface X509CheckOptions { diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts index d7b9ee2d2..b4a989279 100755 --- a/node_modules/@types/node/dgram.d.ts +++ b/node_modules/@types/node/dgram.d.ts @@ -23,7 +23,7 @@ * server.bind(41234); * // Prints: server listening 0.0.0.0:41234 * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/dgram.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/dgram.js) */ declare module 'dgram' { import { AddressInfo } from 'node:net'; @@ -260,7 +260,7 @@ declare module 'dgram' { * * The `address` argument is a string. If the value of `address` is a host name, * DNS will be used to resolve the address of the host. If `address` is not - * provided or otherwise falsy, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default. + * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default. * * If the socket has not been previously bound with a call to `bind`, the socket * is assigned a random port number and is bound to the "all interfaces" address diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts index d6747dad5..915d2af4b 100755 --- a/node_modules/@types/node/diagnostics_channel.d.ts +++ b/node_modules/@types/node/diagnostics_channel.d.ts @@ -20,7 +20,7 @@ * should generally include the module name to avoid collisions with data from * other modules. * @experimental - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/diagnostics_channel.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/diagnostics_channel.js) */ declare module 'diagnostics_channel' { /** diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts index 78776f41c..d59f554e1 100755 --- a/node_modules/@types/node/dns.d.ts +++ b/node_modules/@types/node/dns.d.ts @@ -42,7 +42,7 @@ * ``` * * See the `Implementation considerations section` for more information. - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/dns.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/dns.js) */ declare module 'dns' { import * as dnsPromises from 'node:dns/promises'; @@ -58,6 +58,9 @@ declare module 'dns' { family?: number | undefined; hints?: number | undefined; all?: boolean | undefined; + /** + * @default true + */ verbatim?: boolean | undefined; } export interface LookupOneOptions extends LookupOptions { @@ -241,7 +244,7 @@ declare module 'dns' { * * * - * On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`. + * On error, `err` is an `Error` object, where `err.code` is one of theDNS error codes. * @since v0.1.27 * @param hostname Host name to resolve. * @param [rrtype='A'] Resource record type. @@ -314,7 +317,7 @@ declare module 'dns' { * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function * will contain an array of certification authority authorization records * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). - * @since v15.0.0 + * @since v15.0.0, v14.17.0 */ export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void; export namespace resolveCaa { @@ -527,14 +530,16 @@ declare module 'dns' { */ export function getServers(): string[]; /** - * Set the default value of `verbatim` in {@link lookup}. The value could be: - * - `ipv4first`: sets default `verbatim` `false`. - * - `verbatim`: sets default `verbatim` `true`. - * - * The default is `ipv4first` and {@link setDefaultResultOrder} have higher priority than `--dns-result-order`. - * When using worker threads, {@link setDefaultResultOrder} from the main thread won't affect the default dns orders in workers. - * @since v14.18.0 - * @param order must be 'ipv4first' or 'verbatim'. + * Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be: + * + * * `ipv4first`: sets default `verbatim` `false`. + * * `verbatim`: sets default `verbatim` `true`. + * + * The default is `ipv4first` and {@link setDefaultResultOrder} have higher + * priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default + * dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'` or `'verbatim'`. */ export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void; // Error codes @@ -640,7 +645,7 @@ declare module 'dns' { * The resolver will use the v4 local address when making requests to IPv4 DNS * servers, and the v6 local address when making requests to IPv6 DNS servers. * The `rrtype` of resolution requests has no impact on the local address used. - * @since v15.1.0 + * @since v15.1.0, v14.17.0 * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. * @param [ipv6='::0'] A string representation of an IPv6 address. */ diff --git a/node_modules/@types/node/dns/promises.d.ts b/node_modules/@types/node/dns/promises.d.ts index a236b5ac6..165b62bcf 100755 --- a/node_modules/@types/node/dns/promises.d.ts +++ b/node_modules/@types/node/dns/promises.d.ts @@ -119,7 +119,7 @@ declare module 'dns/promises' { * * * - * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`. + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the DNS error codes. * @since v10.6.0 * @param hostname Host name to resolve. * @param [rrtype='A'] Resource record type. @@ -189,7 +189,7 @@ declare module 'dns/promises' { * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, * the `Promise` is resolved with an array of objects containing available * certification authority authorization records available for the `hostname`(e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). - * @since v15.0.0 + * @since v15.0.0, v14.17.0 */ function resolveCaa(hostname: string): Promise; /** @@ -300,7 +300,7 @@ declare module 'dns/promises' { * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an * array of host names. * - * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`. + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the DNS error codes. * @since v10.6.0 */ function reverse(ip: string): Promise; @@ -332,14 +332,16 @@ declare module 'dns/promises' { */ function setServers(servers: ReadonlyArray): void; /** - * Set the default value of `verbatim` in {@link lookup}. The value could be: - * - `ipv4first`: sets default `verbatim` `false`. - * - `verbatim`: sets default `verbatim` `true`. + * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be: * - * The default is `ipv4first` and {@link setDefaultResultOrder} have higher priority than `--dns-result-order`. - * When using worker threads, {@link setDefaultResultOrder} from the main thread won't affect the default dns orders in workers. - * @since v14.18.0 - * @param order must be 'ipv4first' or 'verbatim'. + * * `ipv4first`: sets default `verbatim` `false`. + * * `verbatim`: sets default `verbatim` `true`. + * + * The default is `ipv4first` and `dnsPromises.setDefaultResultOrder()` have + * higher priority than `--dns-result-order`. When using `worker threads`,`dnsPromises.setDefaultResultOrder()` from the main thread won't affect the + * default dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'` or `'verbatim'`. */ function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void; class Resolver { diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts index 383e38557..f8dd26ebe 100755 --- a/node_modules/@types/node/domain.d.ts +++ b/node_modules/@types/node/domain.d.ts @@ -11,7 +11,7 @@ * will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to * exit immediately with an error code. * @deprecated Since v1.4.2 - Deprecated - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/domain.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/domain.js) */ declare module 'domain' { import EventEmitter = require('node:events'); diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts index a1ed5ab73..9f8bcfea3 100755 --- a/node_modules/@types/node/events.d.ts +++ b/node_modules/@types/node/events.d.ts @@ -32,7 +32,7 @@ * }); * myEmitter.emit('event'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/events.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/events.js) */ declare module 'events' { interface EventEmitterOptions { @@ -257,7 +257,7 @@ declare module 'events' { * getEventListeners(et, 'foo'); // [listener] * } * ``` - * @since v15.2.0 + * @since v15.2.0, v14.17.0 */ static getEventListeners(emitter: DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[]; /** diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts index 900b4651a..c3d82ba20 100755 --- a/node_modules/@types/node/fs.d.ts +++ b/node_modules/@types/node/fs.d.ts @@ -16,7 +16,7 @@ * * All file system operations have synchronous, callback, and promise-based * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM). - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/fs.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/fs.js) */ declare module 'fs' { import * as stream from 'node:stream'; @@ -268,18 +268,22 @@ declare module 'fs' { */ export interface StatWatcher extends EventEmitter { /** + * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have + * no effect. + * + * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally + * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been + * called previously. * @since v14.3.0, v12.20.0 - * When called, requests that the Node.js event loop not exit so long as the `fs.StatWatcher` is active. - * Calling `watcher.ref()` multiple times will have no effect. - * By default, all `fs.StatWatcher`` objects are "ref'ed", making it normally unnecessary to call `watcher.ref()` - * unless `watcher.unref()` had been called previously. */ ref(): this; /** + * When called, the active `fs.StatWatcher` object will not require the Node.js + * event loop to remain active. If there is no other activity keeping the + * event loop running, the process may exit before the `fs.StatWatcher` object's + * callback is invoked. Calling `watcher.unref()` multiple times will have + * no effect. * @since v14.3.0, v12.20.0 - * When called, the active `fs.StatWatcher`` object will not require the Node.js event loop to remain active. - * If there is no other activity keeping the event loop running, the process may exit before the `fs.StatWatcher`` object's callback is invoked. - * `Calling watcher.unref()` multiple times will have no effect. */ unref(): this; } @@ -1014,8 +1018,10 @@ declare module 'fs' { function __promisify__(fd: number, options?: StatOptions): Promise; } /** - * Synchronous fstat(2) - Get file status. - * @param fd A file descriptor. + * Retrieves the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 */ export function fstatSync( fd: number, @@ -1030,7 +1036,6 @@ declare module 'fs' { } ): BigIntStats; export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; - /** * Retrieves the `fs.Stats` for the symbolic link referred to by the path. * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic @@ -2812,6 +2817,52 @@ declare module 'fs' { persistent?: boolean | undefined; interval?: number | undefined; } + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ export function watchFile( filename: PathLike, options: diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts index f2e981d8e..f6c77d3bd 100755 --- a/node_modules/@types/node/fs/promises.d.ts +++ b/node_modules/@types/node/fs/promises.d.ts @@ -42,11 +42,11 @@ declare module 'fs/promises' { mode?: Mode | undefined; flag?: OpenMode | undefined; } - interface FileReadResult { + interface FileReadResult { bytesRead: number; buffer: T; } - interface FileReadOptions { + interface FileReadOptions { /** * @default `Buffer.alloc(0xffff)` */ @@ -207,8 +207,8 @@ declare module 'fs/promises' { * integer, the current file position will remain unchanged. * @return Fulfills upon success with an object with two properties: */ - read(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise>; - read(options?: FileReadOptions): Promise>; + read(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise>; + read(options?: FileReadOptions): Promise>; /** * Asynchronously reads the entire contents of a file. * @@ -1043,7 +1043,7 @@ declare module 'fs/promises' { * disappears in the directory. * * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. - * @since v15.9.0 + * @since v15.9.0, v14.18.0 * @return of objects with the properties: */ function watch( diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts index 8edac71c8..628dc3471 100755 --- a/node_modules/@types/node/http.d.ts +++ b/node_modules/@types/node/http.d.ts @@ -37,7 +37,7 @@ * 'Host', 'mysite.com', * 'accepT', '*' ] * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/http.js) */ declare module 'http' { import * as stream from 'node:stream'; @@ -113,7 +113,7 @@ declare module 'http' { type OutgoingHttpHeader = number | string | string[]; interface OutgoingHttpHeaders extends NodeJS.Dict {} interface ClientRequestArgs { - abort?: AbortSignal | undefined; + signal?: AbortSignal | undefined; protocol?: string | null | undefined; host?: string | null | undefined; hostname?: string | null | undefined; @@ -341,7 +341,7 @@ declare module 'http' { /** * Aliases of `outgoingMessage.socket` * @since v0.3.0 - * @deprecated Since v15.12.0 - Use `socket` instead. + * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead. */ readonly connection: Socket | null; /** @@ -608,6 +608,7 @@ declare module 'http' { * The `request.aborted` property will be `true` if the request has * been aborted. * @since v0.11.14 + * @deprecated Since v17.0.0 - Check `destroyed` instead. */ aborted: boolean; /** @@ -667,9 +668,12 @@ declare module 'http' { * const headerNames = request.getRawHeaderNames(); * // headerNames === ['Foo', 'Set-Cookie'] * ``` - * @since v15.13.0 + * @since v15.13.0, v14.17.0 */ getRawHeaderNames(): string[]; + /** + * @deprecated + */ addListener(event: 'abort', listener: () => void): this; addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; addListener(event: 'continue', listener: () => void): this; @@ -685,6 +689,9 @@ declare module 'http' { addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ on(event: 'abort', listener: () => void): this; on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; on(event: 'continue', listener: () => void): this; @@ -700,6 +707,9 @@ declare module 'http' { on(event: 'pipe', listener: (src: stream.Readable) => void): this; on(event: 'unpipe', listener: (src: stream.Readable) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ once(event: 'abort', listener: () => void): this; once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; once(event: 'continue', listener: () => void): this; @@ -715,6 +725,9 @@ declare module 'http' { once(event: 'pipe', listener: (src: stream.Readable) => void): this; once(event: 'unpipe', listener: (src: stream.Readable) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ prependListener(event: 'abort', listener: () => void): this; prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; prependListener(event: 'continue', listener: () => void): this; @@ -730,6 +743,9 @@ declare module 'http' { prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ prependOnceListener(event: 'abort', listener: () => void): this; prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; prependOnceListener(event: 'continue', listener: () => void): this; @@ -762,6 +778,7 @@ declare module 'http' { * The `message.aborted` property will be `true` if the request has * been aborted. * @since v10.1.0 + * @deprecated Since v17.0.0 - Check `message.destroyed` from stream.Readable. */ aborted: boolean; /** diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts index 3aa9497e0..c370c49fc 100755 --- a/node_modules/@types/node/http2.d.ts +++ b/node_modules/@types/node/http2.d.ts @@ -6,7 +6,7 @@ * const http2 = require('http2'); * ``` * @since v8.4.0 - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http2.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/http2.js) */ declare module 'http2' { import EventEmitter = require('node:events'); @@ -757,7 +757,7 @@ declare module 'http2' { * session.setLocalWindowSize(expectedWindowSize); * }); * ``` - * @since v15.3.0 + * @since v15.3.0, v14.18.0 */ setLocalWindowSize(windowSize: number): void; /** diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts index 194a3ad1c..9abd7b190 100755 --- a/node_modules/@types/node/https.d.ts +++ b/node_modules/@types/node/https.d.ts @@ -1,7 +1,7 @@ /** * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a * separate module. - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/https.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/https.js) */ declare module 'https' { import { Duplex } from 'node:stream'; diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts index 5d2bcee6d..d67b79a98 100755 --- a/node_modules/@types/node/index.d.ts +++ b/node_modules/@types/node/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for non-npm package Node.js 16.11 +// Type definitions for non-npm package Node.js 17.0 // Project: https://nodejs.org/ // Definitions by: Microsoft TypeScript // DefinitelyTyped diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts index 5e84a1a6b..7b9598c44 100755 --- a/node_modules/@types/node/inspector.d.ts +++ b/node_modules/@types/node/inspector.d.ts @@ -15,7 +15,7 @@ * ```js * const inspector = require('inspector'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/inspector.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/inspector.js) */ declare module 'inspector' { import EventEmitter = require('node:events'); @@ -1779,10 +1779,9 @@ declare module 'inspector' { */ connect(): void; /** - * Connects a session to the main thread inspector back-end. - * An exception will be thrown if this API was not called on a Worker - * thread. - * @since 12.11.0 + * Connects a session to the main thread inspector back-end. An exception will + * be thrown if this API was not called on a Worker thread. + * @since v12.11.0 */ connectToMainThread(): void; /** diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts index 870649348..50390990c 100755 --- a/node_modules/@types/node/net.d.ts +++ b/node_modules/@types/node/net.d.ts @@ -10,7 +10,7 @@ * ```js * const net = require('net'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/net.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/net.js) */ declare module 'net' { import * as stream from 'node:stream'; @@ -560,12 +560,12 @@ declare module 'net' { * The `BlockList` object can be used with some network APIs to specify rules for * disabling inbound or outbound access to specific IP addresses, IP ranges, or * IP subnets. - * @since v15.0.0 + * @since v15.0.0, v14.18.0 */ class BlockList { /** * Adds a rule to block the given IP address. - * @since v15.0.0 + * @since v15.0.0, v14.18.0 * @param address An IPv4 or IPv6 address. * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. */ @@ -573,7 +573,7 @@ declare module 'net' { addAddress(address: SocketAddress): void; /** * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). - * @since v15.0.0 + * @since v15.0.0, v14.18.0 * @param start The starting IPv4 or IPv6 address in the range. * @param end The ending IPv4 or IPv6 address in the range. * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. @@ -582,7 +582,7 @@ declare module 'net' { addRange(start: SocketAddress, end: SocketAddress): void; /** * Adds a rule to block a range of IP addresses specified as a subnet mask. - * @since v15.0.0 + * @since v15.0.0, v14.18.0 * @param net The network IPv4 or IPv6 address. * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. @@ -606,7 +606,7 @@ declare module 'net' { * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true * ``` - * @since v15.0.0 + * @since v15.0.0, v14.18.0 * @param address The IP address to check * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. */ @@ -754,26 +754,26 @@ declare module 'net' { port?: number | undefined; } /** - * @since v15.14.0 + * @since v15.14.0, v14.18.0 */ class SocketAddress { constructor(options: SocketAddressInitOptions); /** * Either \`'ipv4'\` or \`'ipv6'\`. - * @since v15.14.0 + * @since v15.14.0, v14.18.0 */ readonly address: string; /** * Either \`'ipv4'\` or \`'ipv6'\`. - * @since v15.14.0 + * @since v15.14.0, v14.18.0 */ readonly family: IPVersion; /** - * @since v15.14.0 + * @since v15.14.0, v14.18.0 */ readonly port: number; /** - * @since v15.14.0 + * @since v15.14.0, v14.18.0 */ readonly flowlabel: number; } diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts index f9cd24249..a618e9164 100755 --- a/node_modules/@types/node/os.d.ts +++ b/node_modules/@types/node/os.d.ts @@ -5,7 +5,7 @@ * ```js * const os = require('os'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/os.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/os.js) */ declare module 'os' { interface CpuInfo { diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json index f954cd6ff..197127120 100755 --- a/node_modules/@types/node/package.json +++ b/node_modules/@types/node/package.json @@ -1,6 +1,6 @@ { "name": "@types/node", - "version": "16.11.10", + "version": "17.0.0", "description": "TypeScript definitions for Node.js", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", "license": "MIT", @@ -225,6 +225,6 @@ }, "scripts": {}, "dependencies": {}, - "typesPublisherContentHash": "b24d5d157d742f1a54b5d70ed1c014862c87e0187063c31ed2038790f909f02d", + "typesPublisherContentHash": "6a6a3a40242455c8b732c50c33bcbbd96f68ccf65d366fbd96a6773223877826", "typeScriptVersion": "3.8" } \ No newline at end of file diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts index a58c0aab9..9779ce8da 100755 --- a/node_modules/@types/node/path.d.ts +++ b/node_modules/@types/node/path.d.ts @@ -13,7 +13,7 @@ declare module 'path/win32' { * ```js * const path = require('path'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/path.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/path.js) */ declare module 'path' { namespace path { diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts index 0e4b48f93..2f1fd1a7e 100755 --- a/node_modules/@types/node/perf_hooks.d.ts +++ b/node_modules/@types/node/perf_hooks.d.ts @@ -26,7 +26,7 @@ * performance.measure('A to B', 'A', 'B'); * }); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/perf_hooks.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/perf_hooks.js) */ declare module 'perf_hooks' { import { AsyncResource } from 'node:async_hooks'; @@ -485,7 +485,7 @@ declare module 'perf_hooks' { } interface RecordableHistogram extends Histogram { /** - * @since v15.9.0 + * @since v15.9.0, v14.18.0 * @param val The amount to record in the histogram. */ record(val: number | bigint): void; @@ -494,7 +494,7 @@ declare module 'perf_hooks' { * previous call to `recordDelta()` and records that amount in the histogram. * * ## Examples - * @since v15.9.0 + * @since v15.9.0, v14.18.0 */ recordDelta(): void; } @@ -546,7 +546,7 @@ declare module 'perf_hooks' { } /** * Returns a `RecordableHistogram`. - * @since v15.9.0 + * @since v15.9.0, v14.18.0 */ function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; } diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts index 345af5313..81b3c636b 100755 --- a/node_modules/@types/node/punycode.d.ts +++ b/node_modules/@types/node/punycode.d.ts @@ -24,7 +24,7 @@ * made available to developers as a convenience. Fixes or other modifications to * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project. * @deprecated Since v7.0.0 - Deprecated - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/punycode.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/punycode.js) */ declare module 'punycode' { /** diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts index 892440b78..572828a84 100755 --- a/node_modules/@types/node/querystring.d.ts +++ b/node_modules/@types/node/querystring.d.ts @@ -9,7 +9,7 @@ * The `querystring` API is considered Legacy. While it is still maintained, * new code should use the `URLSearchParams` API instead. * @deprecated Legacy - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/querystring.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/querystring.js) */ declare module 'querystring' { interface StringifyOptions { diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts index f1545fab7..43ab1dbdc 100755 --- a/node_modules/@types/node/readline.d.ts +++ b/node_modules/@types/node/readline.d.ts @@ -1,32 +1,36 @@ /** - * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time. It can be accessed - * using: + * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time. + * + * To use the promise-based APIs: * * ```js - * const readline = require('readline'); + * import * as readline from 'node:readline/promises'; + * ``` + * + * To use the callback and sync APIs: + * + * ```js + * import * as readline from 'node:readline'; * ``` * * The following simple example illustrates the basic use of the `readline` module. * * ```js - * const readline = require('readline'); + * import * as readline from 'node:readline/promises'; + * import { stdin as input, stdout as output } from 'process'; + * + * const rl = readline.createInterface({ input, output }); * - * const rl = readline.createInterface({ - * input: process.stdin, - * output: process.stdout - * }); + * const answer = await rl.question('What do you think of Node.js? '); * - * rl.question('What do you think of Node.js? ', (answer) => { - * // TODO: Log the answer in a database - * console.log(`Thank you for your valuable feedback: ${answer}`); + * console.log(`Thank you for your valuable feedback: ${answer}`); * - * rl.close(); - * }); + * rl.close(); * ``` * * 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 * received on the `input` stream. - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/readline.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/readline.js) */ declare module 'readline' { import { Abortable, EventEmitter } from 'node:events'; @@ -394,6 +398,109 @@ declare module 'readline' { * if (process.stdin.isTTY) * process.stdin.setRawMode(true); * ``` + * + * ## Example: Tiny CLI + * + * The following example illustrates the use of `readline.Interface` class to + * implement a small command-line interface: + * + * ```js + * const readline = require('readline'); + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * prompt: 'OHAI> ' + * }); + * + * rl.prompt(); + * + * rl.on('line', (line) => { + * switch (line.trim()) { + * case 'hello': + * console.log('world!'); + * break; + * default: + * console.log(`Say what? I might have heard '${line.trim()}'`); + * break; + * } + * rl.prompt(); + * }).on('close', () => { + * console.log('Have a great day!'); + * process.exit(0); + * }); + * ``` + * + * ## Example: Read file stream line-by-Line + * + * A common use case for `readline` is to consume an input file one line at a + * time. The easiest way to do so is leveraging the `fs.ReadStream` API as + * well as a `for await...of` loop: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * async function processLineByLine() { + * const fileStream = fs.createReadStream('input.txt'); + * + * const rl = readline.createInterface({ + * input: fileStream, + * crlfDelay: Infinity + * }); + * // Note: we use the crlfDelay option to recognize all instances of CR LF + * // ('\r\n') in input.txt as a single line break. + * + * for await (const line of rl) { + * // Each line in input.txt will be successively available here as `line`. + * console.log(`Line from file: ${line}`); + * } + * } + * + * processLineByLine(); + * ``` + * + * Alternatively, one could use the `'line'` event: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * const rl = readline.createInterface({ + * input: fs.createReadStream('sample.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * console.log(`Line from file: ${line}`); + * }); + * ``` + * + * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied: + * + * ```js + * const { once } = require('events'); + * const { createReadStream } = require('fs'); + * const { createInterface } = require('readline'); + * + * (async function processLineByLine() { + * try { + * const rl = createInterface({ + * input: createReadStream('big-file.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * // Process the line. + * }); + * + * await once(rl, 'close'); + * + * console.log('File processed.'); + * } catch (err) { + * console.error(err); + * } + * })(); + * ``` * @since v0.7.7 */ function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts index 04f64e183..e81fee5d8 100755 --- a/node_modules/@types/node/repl.d.ts +++ b/node_modules/@types/node/repl.d.ts @@ -6,7 +6,7 @@ * ```js * const repl = require('repl'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/repl.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/repl.js) */ declare module 'repl' { import { Interface, Completer, AsyncCompleter } from 'node:readline'; diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts index 3927144a8..6ec60e7a7 100755 --- a/node_modules/@types/node/stream.d.ts +++ b/node_modules/@types/node/stream.d.ts @@ -14,7 +14,7 @@ * * The `stream` module is useful for creating new types of stream instances. It is * usually not necessary to use the `stream` module to consume streams. - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/stream.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/stream.js) */ declare module 'stream' { import { EventEmitter, Abortable } from 'node:events'; @@ -71,7 +71,7 @@ declare module 'stream' { readable: boolean; /** * Returns whether `'data'` has been emitted. - * @since v16.7.0 + * @since v16.7.0, v14.18.0 * @experimental */ readonly readableDidRead: boolean; diff --git a/node_modules/@types/node/stream/web.d.ts b/node_modules/@types/node/stream/web.d.ts index a9d75c19c..88832fb02 100755 --- a/node_modules/@types/node/stream/web.d.ts +++ b/node_modules/@types/node/stream/web.d.ts @@ -1,5 +1,328 @@ declare module 'stream/web' { // stub module, pending copy&paste from .d.ts or manual impl + // copy from lib.dom.d.ts + interface ReadableWritablePair { + readable: ReadableStream; + /** + * Provides a convenient, chainable way of piping this readable stream + * through a transform stream (or any other { writable, readable } + * pair). It simply pipes the stream into the writable side of the + * supplied pair, and returns the readable side for further use. + * + * Piping a stream will lock it for the duration of the pipe, preventing + * any other consumer from acquiring a reader. + */ + writable: WritableStream; + } + interface StreamPipeOptions { + preventAbort?: boolean; + preventCancel?: boolean; + /** + * Pipes this readable stream to a given writable stream destination. + * The way in which the piping process behaves under various error + * conditions can be customized with a number of passed options. It + * returns a promise that fulfills when the piping process completes + * successfully, or rejects if any errors were encountered. + * + * Piping a stream will lock it for the duration of the pipe, preventing + * any other consumer from acquiring a reader. + * + * Errors and closures of the source and destination streams propagate + * as follows: + * + * An error in this source readable stream will abort destination, + * unless preventAbort is truthy. The returned promise will be rejected + * with the source's error, or with any error that occurs during + * aborting the destination. + * + * An error in destination will cancel this source readable stream, + * unless preventCancel is truthy. The returned promise will be rejected + * with the destination's error, or with any error that occurs during + * canceling the source. + * + * When this source readable stream closes, destination will be closed, + * unless preventClose is truthy. The returned promise will be fulfilled + * once this process completes, unless an error is encountered while + * closing the destination, in which case it will be rejected with that + * error. + * + * If destination starts out closed or closing, this source readable + * stream will be canceled, unless preventCancel is true. The returned + * promise will be rejected with an error indicating piping to a closed + * stream failed, or with any error that occurs during canceling the + * source. + * + * The signal option can be set to an AbortSignal to allow aborting an + * ongoing pipe operation via the corresponding AbortController. In this + * case, this source readable stream will be canceled, and destination + * aborted, unless the respective options preventCancel or preventAbort + * are set. + */ + preventClose?: boolean; + signal?: AbortSignal; + } + interface ReadableStreamGenericReader { + readonly closed: Promise; + cancel(reason?: any): Promise; + } + interface ReadableStreamDefaultReadValueResult { + done: false; + value: T; + } + interface ReadableStreamDefaultReadDoneResult { + done: true; + value?: undefined; + } + type ReadableStreamController = ReadableStreamDefaultController; + type ReadableStreamDefaultReadResult = ReadableStreamDefaultReadValueResult | ReadableStreamDefaultReadDoneResult; + interface ReadableByteStreamControllerCallback { + (controller: ReadableByteStreamController): void | PromiseLike; + } + interface UnderlyingSinkAbortCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSinkCloseCallback { + (): void | PromiseLike; + } + interface UnderlyingSinkStartCallback { + (controller: WritableStreamDefaultController): any; + } + interface UnderlyingSinkWriteCallback { + (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; + } + interface UnderlyingSourceCancelCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSourcePullCallback { + (controller: ReadableStreamController): void | PromiseLike; + } + interface UnderlyingSourceStartCallback { + (controller: ReadableStreamController): any; + } + interface TransformerFlushCallback { + (controller: TransformStreamDefaultController): void | PromiseLike; + } + interface TransformerStartCallback { + (controller: TransformStreamDefaultController): any; + } + interface TransformerTransformCallback { + (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; + } + interface UnderlyingByteSource { + autoAllocateChunkSize?: number; + cancel?: ReadableStreamErrorCallback; + pull?: ReadableByteStreamControllerCallback; + start?: ReadableByteStreamControllerCallback; + type: 'bytes'; + } + interface UnderlyingSource { + cancel?: UnderlyingSourceCancelCallback; + pull?: UnderlyingSourcePullCallback; + start?: UnderlyingSourceStartCallback; + type?: undefined; + } + interface UnderlyingSink { + abort?: UnderlyingSinkAbortCallback; + close?: UnderlyingSinkCloseCallback; + start?: UnderlyingSinkStartCallback; + type?: undefined; + write?: UnderlyingSinkWriteCallback; + } + interface ReadableStreamErrorCallback { + (reason: any): void | PromiseLike; + } + /** This Streams API interface represents a readable stream of byte data. */ + interface ReadableStream { + readonly locked: boolean; + cancel(reason?: any): Promise; + getReader(): ReadableStreamDefaultReader; + pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; + pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; + tee(): [ReadableStream, ReadableStream]; + [Symbol.asyncIterator](options?: { preventCancel?: boolean }): AsyncIterableIterator; + } + const ReadableStream: { + prototype: ReadableStream; + new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy): ReadableStream; + new (underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + }; + interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { + read(): Promise>; + releaseLock(): void; + } + const ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new (stream: ReadableStream): ReadableStreamDefaultReader; + }; + const ReadableStreamBYOBReader: any; + const ReadableStreamBYOBRequest: any; + interface ReadableByteStreamController { + readonly byobRequest: undefined; + readonly desiredSize: number | null; + close(): void; + enqueue(chunk: ArrayBufferView): void; + error(error?: any): void; + } + const ReadableByteStreamController: { + prototype: ReadableByteStreamController; + new (): ReadableByteStreamController; + }; + interface ReadableStreamDefaultController { + readonly desiredSize: number | null; + close(): void; + enqueue(chunk?: R): void; + error(e?: any): void; + } + const ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new (): ReadableStreamDefaultController; + }; + interface Transformer { + flush?: TransformerFlushCallback; + readableType?: undefined; + start?: TransformerStartCallback; + transform?: TransformerTransformCallback; + writableType?: undefined; + } + interface TransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + const TransformStream: { + prototype: TransformStream; + new (transformer?: Transformer, writableStrategy?: QueuingStrategy, readableStrategy?: QueuingStrategy): TransformStream; + }; + interface TransformStreamDefaultController { + readonly desiredSize: number | null; + enqueue(chunk?: O): void; + error(reason?: any): void; + terminate(): void; + } + const TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new (): TransformStreamDefaultController; + }; + /** + * This Streams API interface provides a standard abstraction for writing + * streaming data to a destination, known as a sink. This object comes with + * built-in back pressure and queuing. + */ + interface WritableStream { + readonly locked: boolean; + abort(reason?: any): Promise; + close(): Promise; + getWriter(): WritableStreamDefaultWriter; + } + const WritableStream: { + prototype: WritableStream; + new (underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; + }; + /** + * This Streams API interface is the object returned by + * WritableStream.getWriter() and once created locks the < writer to the + * WritableStream ensuring that no other streams can write to the underlying + * sink. + */ + interface WritableStreamDefaultWriter { + readonly closed: Promise; + readonly desiredSize: number | null; + readonly ready: Promise; + abort(reason?: any): Promise; + close(): Promise; + releaseLock(): void; + write(chunk?: W): Promise; + } + const WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new (stream: WritableStream): WritableStreamDefaultWriter; + }; + /** + * This Streams API interface represents a controller allowing control of a + * WritableStream's state. When constructing a WritableStream, the + * underlying sink is given a corresponding WritableStreamDefaultController + * instance to manipulate. + */ + interface WritableStreamDefaultController { + error(e?: any): void; + } + const WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new (): WritableStreamDefaultController; + }; + interface QueuingStrategy { + highWaterMark?: number; + size?: QueuingStrategySize; + } + interface QueuingStrategySize { + (chunk?: T): number; + } + interface QueuingStrategyInit { + /** + * Creates a new ByteLengthQueuingStrategy with the provided high water + * mark. + * + * Note that the provided high water mark will not be validated ahead of + * time. Instead, if it is negative, NaN, or not a number, the resulting + * ByteLengthQueuingStrategy will cause the corresponding stream + * constructor to throw. + */ + highWaterMark: number; + } + /** + * This Streams API interface provides a built-in byte length queuing + * strategy that can be used when constructing streams. + */ + interface ByteLengthQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + const ByteLengthQueuingStrategy: { + prototype: ByteLengthQueuingStrategy; + new (init: QueuingStrategyInit): ByteLengthQueuingStrategy; + }; + /** + * This Streams API interface provides a built-in byte length queuing + * strategy that can be used when constructing streams. + */ + interface CountQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + const CountQueuingStrategy: { + prototype: CountQueuingStrategy; + new (init: QueuingStrategyInit): CountQueuingStrategy; + }; + interface TextEncoderStream { + /** Returns "utf-8". */ + readonly encoding: 'utf-8'; + readonly readable: ReadableStream; + readonly writable: WritableStream; + readonly [Symbol.toStringTag]: string; + } + const TextEncoderStream: { + prototype: TextEncoderStream; + new (): TextEncoderStream; + }; + interface TextDecoderOptions { + fatal?: boolean; + ignoreBOM?: boolean; + } + type BufferSource = ArrayBufferView | ArrayBuffer; + interface TextDecoderStream { + /** Returns encoding's name, lower cased. */ + readonly encoding: string; + /** Returns `true` if error mode is "fatal", and `false` otherwise. */ + readonly fatal: boolean; + /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */ + readonly ignoreBOM: boolean; + readonly readable: ReadableStream; + readonly writable: WritableStream; + readonly [Symbol.toStringTag]: string; + } + const TextDecoderStream: { + prototype: TextDecoderStream; + new (label?: string, options?: TextDecoderOptions): TextDecoderStream; + }; } declare module 'node:stream/web' { export * from 'stream/web'; diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts index 584e0c5d2..da712b5ed 100755 --- a/node_modules/@types/node/string_decoder.d.ts +++ b/node_modules/@types/node/string_decoder.d.ts @@ -36,7 +36,7 @@ * decoder.write(Buffer.from([0x82])); * console.log(decoder.end(Buffer.from([0xAC]))); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/string_decoder.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/string_decoder.js) */ declare module 'string_decoder' { class StringDecoder { diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts index 1768d7fb9..59f44c197 100755 --- a/node_modules/@types/node/timers.d.ts +++ b/node_modules/@types/node/timers.d.ts @@ -6,7 +6,7 @@ * The timer functions within Node.js implement a similar API as the timers API * provided by Web Browsers but use a different internal implementation that is * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout). - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/timers.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/timers.js) */ declare module 'timers' { import { Abortable } from 'node:events'; diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts index b1f4c8707..8ff920d80 100755 --- a/node_modules/@types/node/tls.d.ts +++ b/node_modules/@types/node/tls.d.ts @@ -6,7 +6,7 @@ * ```js * const tls = require('tls'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/tls.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/tls.js) */ declare module 'tls' { import { X509Certificate } from 'node:crypto'; diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts index 2976eb6e5..cb4e3754a 100755 --- a/node_modules/@types/node/trace_events.d.ts +++ b/node_modules/@types/node/trace_events.d.ts @@ -73,7 +73,7 @@ * * The features from this module are not available in `Worker` threads. * @experimental - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/trace_events.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/trace_events.js) */ declare module 'trace_events' { /** diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts index 3bce2d366..72fdf2e1f 100755 --- a/node_modules/@types/node/tty.d.ts +++ b/node_modules/@types/node/tty.d.ts @@ -22,7 +22,7 @@ * * In most cases, there should be little to no reason for an application to * manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes. - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/tty.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/tty.js) */ declare module 'tty' { import * as net from 'node:net'; diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts index 602fca03b..3c41ed74a 100755 --- a/node_modules/@types/node/url.d.ts +++ b/node_modules/@types/node/url.d.ts @@ -5,7 +5,7 @@ * ```js * import url from 'url'; * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/url.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/url.js) */ declare module 'url' { import { Blob } from 'node:buffer'; @@ -72,27 +72,67 @@ declare module 'url' { function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; /** - * The URL object has both a `toString()` method and `href` property that return string serializations of the URL. - * These are not, however, customizable in any way. The `url.format(URL[, options])` method allows for basic - * customization of the output. - * Returns a customizable serialization of a URL `String` representation of a `WHATWG URL` object. + * The `url.format()` method returns a formatted URL string derived from`urlObject`. * * ```js - * import url from 'url'; - * const myURL = new URL('https://a:b@測試?abc#foo'); + * const url = require('url'); + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json' + * } + * }); * - * console.log(myURL.href); - * // Prints https://a:b@xn--g6w251d/?abc#foo + * // => 'https://example.com/some/path?page=1&format=json' + * ``` * - * console.log(myURL.toString()); - * // Prints https://a:b@xn--g6w251d/?abc#foo + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. * - * console.log(url.format(myURL, { fragment: false, unicode: true, auth: false })); - * // Prints 'https://測試/?abc' - * ``` - * @since v7.6.0 - * @param urlObject A `WHATWG URL` object - * @param options + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//`will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`; + * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string + * and appended to `result`followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to`result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the + * `querystring` module's `stringify()`method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search`_does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @deprecated Legacy: Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. */ function format(urlObject: URL, options?: URLFormatOptions): string; /** @@ -301,7 +341,7 @@ declare module 'url' { * } * * ``` - * @since v15.7.0 + * @since v15.7.0, v14.18.0 * @param url The `WHATWG URL` object to convert to an options object. * @return Options object */ diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts index d0f4c1764..3616de3ed 100755 --- a/node_modules/@types/node/util.d.ts +++ b/node_modules/@types/node/util.d.ts @@ -6,7 +6,7 @@ * ```js * const util = require('util'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/util.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/util.js) */ declare module 'util' { import * as types from 'node:util/types'; @@ -139,7 +139,7 @@ declare module 'util' { * console.error(name); // ENOENT * }); * ``` - * @since v16.0.0 + * @since v16.0.0, v14.17.0 */ export function getSystemErrorMap(): Map; /** @@ -159,7 +159,7 @@ declare module 'util' { * Returns the `string` after replacing any surrogate code points * (or equivalently, any unpaired surrogate code units) with the * Unicode "replacement character" U+FFFD. - * @since v16.8.0 + * @since v16.8.0, v14.18.0 */ export function toUSVString(string: string): string; /** diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts index f467fccf8..59c8302db 100755 --- a/node_modules/@types/node/v8.d.ts +++ b/node_modules/@types/node/v8.d.ts @@ -4,7 +4,7 @@ * ```js * const v8 = require('v8'); * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/v8.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/v8.js) */ declare module 'v8' { import { Readable } from 'node:stream'; @@ -362,14 +362,14 @@ declare module 'v8' { * * When the process is about to exit, one last coverage will still be written to * disk unless {@link stopCoverage} is invoked before the process exits. - * @since v15.1.0, v12.22.0 + * @since v15.1.0, v14.18.0, v12.22.0 */ function takeCoverage(): void; /** * The `v8.stopCoverage()` method allows the user to stop the coverage collection * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. - * @since v15.1.0, v12.22.0 + * @since v15.1.0, v14.18.0, v12.22.0 */ function stopCoverage(): void; } diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts index a46b39190..860b7ac4e 100755 --- a/node_modules/@types/node/vm.d.ts +++ b/node_modules/@types/node/vm.d.ts @@ -32,7 +32,7 @@ * * console.log(x); // 1; y is not defined. * ``` - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/vm.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/vm.js) */ declare module 'vm' { interface Context extends NodeJS.Dict {} diff --git a/node_modules/@types/node/wasi.d.ts b/node_modules/@types/node/wasi.d.ts index dfcf9570f..4810be8fd 100755 --- a/node_modules/@types/node/wasi.d.ts +++ b/node_modules/@types/node/wasi.d.ts @@ -68,7 +68,7 @@ * The `--experimental-wasi-unstable-preview1` CLI argument is needed for this * example to run. * @experimental - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/wasi.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/wasi.js) */ declare module 'wasi' { interface WASIOptions { diff --git a/node_modules/@types/node/worker_threads.d.ts b/node_modules/@types/node/worker_threads.d.ts index 419d04471..b50898607 100755 --- a/node_modules/@types/node/worker_threads.d.ts +++ b/node_modules/@types/node/worker_threads.d.ts @@ -49,7 +49,7 @@ * * Worker threads inherit non-process-specific options by default. Refer to `Worker constructor options` to know how to customize worker thread options, * specifically `argv` and `execArgv` options. - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/worker_threads.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/worker_threads.js) */ declare module 'worker_threads' { import { Blob } from 'node:buffer'; @@ -384,7 +384,7 @@ declare module 'worker_threads' { /** * An object that can be used to query performance information from a worker * instance. Similar to `perf_hooks.performance`. - * @since v15.1.0, v12.22.0 + * @since v15.1.0, v14.17.0, v12.22.0 */ readonly performance: WorkerPerformance; /** @@ -629,14 +629,14 @@ declare module 'worker_threads' { * console.log(getEnvironmentData('Hello')); // Prints 'World!'. * } * ``` - * @since v15.12.0 + * @since v15.12.0, v14.18.0 * @experimental * @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key. */ function getEnvironmentData(key: Serializable): Serializable; /** * The `worker.setEnvironmentData()` API sets the content of`worker.getEnvironmentData()` in the current thread and all new `Worker`instances spawned from the current context. - * @since v15.12.0 + * @since v15.12.0, v14.18.0 * @experimental * @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key. * @param value Any arbitrary, cloneable JavaScript value that will be cloned and passed automatically to all new `Worker` instances. If `value` is passed as `undefined`, any previously set value diff --git a/node_modules/@types/node/zlib.d.ts b/node_modules/@types/node/zlib.d.ts index 8cfa1452f..b3130839e 100755 --- a/node_modules/@types/node/zlib.d.ts +++ b/node_modules/@types/node/zlib.d.ts @@ -88,7 +88,7 @@ * }); * ``` * @since v0.5.8 - * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/zlib.js) + * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/zlib.js) */ declare module 'zlib' { import * as stream from 'node:stream';