Deploy Production Code for Commit 9749ca0243 🚀

This commit is contained in:
James Ives 2021-12-18 15:41:11 +00:00
parent 9749ca0243
commit da91e735be
44 changed files with 698 additions and 150 deletions

2
node_modules/@types/node/README.md generated vendored
View File

@ -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. Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
### Additional Details ### Additional Details
* Last updated: Tue, 23 Nov 2021 19:31:07 GMT * Last updated: Wed, 15 Dec 2021 21:31:06 GMT
* Dependencies: none * Dependencies: none
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require` * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`

View File

@ -1,7 +1,7 @@
/** /**
* The `assert` module provides a set of assertion functions for verifying * The `assert` module provides a set of assertion functions for verifying
* invariants. * 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' { declare module 'assert' {
/** /**

View File

@ -6,7 +6,7 @@
* import async_hooks from 'async_hooks'; * import async_hooks from 'async_hooks';
* ``` * ```
* @experimental * @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' { declare module 'async_hooks' {
/** /**
@ -395,8 +395,9 @@ declare module 'async_hooks' {
getStore(): T | undefined; getStore(): T | undefined;
/** /**
* Runs a function synchronously within a context and returns its * Runs a function synchronously within a context and returns its
* return value. The store is not accessible outside of the callback function or * return value. The store is not accessible outside of the callback function.
* the asynchronous operations created within the callback. * The store is accessible to any asynchronous operations created within the
* callback.
* *
* The optional `args` are passed to the callback function. * The optional `args` are passed to the callback function.
* *
@ -410,6 +411,9 @@ declare module 'async_hooks' {
* try { * try {
* asyncLocalStorage.run(store, () => { * asyncLocalStorage.run(store, () => {
* asyncLocalStorage.getStore(); // Returns the store object * asyncLocalStorage.getStore(); // Returns the store object
* setTimeout(() => {
* asyncLocalStorage.getStore(); // Returns the store object
* }, 200);
* throw new Error(); * throw new Error();
* }); * });
* } catch (e) { * } catch (e) {

18
node_modules/@types/node/buffer.d.ts generated vendored
View File

@ -41,7 +41,7 @@
* // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74]. * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
* const buf7 = Buffer.from('tést', 'latin1'); * 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' { declare module 'buffer' {
import { BinaryLike } from 'node:crypto'; 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 * 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. * multiple worker threads.
* @since v15.7.0 * @since v15.7.0, v14.18.0
* @experimental * @experimental
*/ */
export class Blob { export class Blob {
/** /**
* The total size of the `Blob` in bytes. * The total size of the `Blob` in bytes.
* @since v15.7.0 * @since v15.7.0, v14.18.0
*/ */
readonly size: number; readonly size: number;
/** /**
* The content-type of the `Blob`. * The content-type of the `Blob`.
* @since v15.7.0 * @since v15.7.0, v14.18.0
*/ */
readonly type: string; 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 * 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. * the `Blob` data.
* @since v15.7.0 * @since v15.7.0, v14.18.0
*/ */
arrayBuffer(): Promise<ArrayBuffer>; arrayBuffer(): Promise<ArrayBuffer>;
/** /**
* Creates and returns a new `Blob` containing a subset of this `Blob` objects * Creates and returns a new `Blob` containing a subset of this `Blob` objects
* data. The original `Blob` is not altered. * data. The original `Blob` is not altered.
* @since v15.7.0 * @since v15.7.0, v14.18.0
* @param start The starting index. * @param start The starting index.
* @param end The ending index. * @param end The ending index.
* @param type The content-type for the new `Blob` * @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 * Returns a promise that fulfills with the contents of the `Blob` decoded as a
* UTF-8 string. * UTF-8 string.
* @since v15.7.0 * @since v15.7.0, v14.18.0
*/ */
text(): Promise<string>; text(): Promise<string>;
/** /**
@ -2114,7 +2114,7 @@ declare module 'buffer' {
* **binary data and predate the introduction of typed arrays in JavaScript.** * **binary data and predate the introduction of typed arrays in JavaScript.**
* **For code running using Node.js APIs, converting between base64-encoded strings** * **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')`.** * **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. * @deprecated Use `Buffer.from(data, 'base64')` instead.
* @param data The Base64-encoded input string. * @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.** * **binary data and predate the introduction of typed arrays in JavaScript.**
* **For code running using Node.js APIs, converting between base64-encoded strings** * **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')`.** * **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. * @deprecated Use `buf.toString('base64')` instead.
* @param data An ASCII (Latin1) string. * @param data An ASCII (Latin1) string.
*/ */

View File

@ -60,7 +60,7 @@
* For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however, * 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 * the synchronous methods can have significant impact on performance due to
* stalling the event loop while spawned processes complete. * 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' { declare module 'child_process' {
import { ObjectEncodingOptions } from 'node:fs'; import { ObjectEncodingOptions } from 'node:fs';

View File

@ -49,7 +49,7 @@
* ``` * ```
* *
* On Windows, it is not yet possible to set up a named pipe server in a worker. * 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' { declare module 'cluster' {
import * as child from 'node:child_process'; import * as child from 'node:child_process';

View File

@ -53,7 +53,7 @@
* myConsole.warn(`Danger ${name}! Danger!`); * myConsole.warn(`Danger ${name}! Danger!`);
* // Prints: Danger Will Robinson! Danger!, to err * // 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' { declare module 'console' {
import console = require('node:console'); import console = require('node:console');

View File

@ -13,7 +13,7 @@
* // Prints: * // Prints:
* // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e * // 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' { declare module 'crypto' {
import * as stream from 'node:stream'; 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 * 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. * cryptographic pseudorandom number generator.
* @since v15.6.0 * @since v15.6.0, v14.17.0
*/ */
function randomUUID(options?: RandomUUIDOptions): string; function randomUUID(options?: RandomUUIDOptions): string;
interface X509CheckOptions { interface X509CheckOptions {

View File

@ -23,7 +23,7 @@
* server.bind(41234); * server.bind(41234);
* // Prints: server listening 0.0.0.0: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' { declare module 'dgram' {
import { AddressInfo } from 'node:net'; 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, * 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 * 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 * 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 * is assigned a random port number and is bound to the "all interfaces" address

View File

@ -20,7 +20,7 @@
* should generally include the module name to avoid collisions with data from * should generally include the module name to avoid collisions with data from
* other modules. * other modules.
* @experimental * @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' { declare module 'diagnostics_channel' {
/** /**

27
node_modules/@types/node/dns.d.ts generated vendored
View File

@ -42,7 +42,7 @@
* ``` * ```
* *
* See the `Implementation considerations section` for more information. * 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' { declare module 'dns' {
import * as dnsPromises from 'node:dns/promises'; import * as dnsPromises from 'node:dns/promises';
@ -58,6 +58,9 @@ declare module 'dns' {
family?: number | undefined; family?: number | undefined;
hints?: number | undefined; hints?: number | undefined;
all?: boolean | undefined; all?: boolean | undefined;
/**
* @default true
*/
verbatim?: boolean | undefined; verbatim?: boolean | undefined;
} }
export interface LookupOneOptions extends LookupOptions { export interface LookupOneOptions extends LookupOptions {
@ -241,7 +244,7 @@ declare module 'dns' {
* *
* <omitted> * <omitted>
* *
* 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 * @since v0.1.27
* @param hostname Host name to resolve. * @param hostname Host name to resolve.
* @param [rrtype='A'] Resource record type. * @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 * 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 * 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'}]`). * 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 function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void;
export namespace resolveCaa { export namespace resolveCaa {
@ -527,14 +530,16 @@ declare module 'dns' {
*/ */
export function getServers(): string[]; export function getServers(): string[];
/** /**
* Set the default value of `verbatim` in {@link lookup}. The value could be: * 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`. * * `ipv4first`: sets default `verbatim` `false`.
* When using worker threads, {@link setDefaultResultOrder} from the main thread won't affect the default dns orders in workers. * * `verbatim`: sets default `verbatim` `true`.
* @since v14.18.0 *
* @param order must be 'ipv4first' or 'verbatim'. * 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; export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
// Error codes // Error codes
@ -640,7 +645,7 @@ declare module 'dns' {
* The resolver will use the v4 local address when making requests to IPv4 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. * 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. * 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 [ipv4='0.0.0.0'] A string representation of an IPv4 address.
* @param [ipv6='::0'] A string representation of an IPv6 address. * @param [ipv6='::0'] A string representation of an IPv6 address.
*/ */

View File

@ -119,7 +119,7 @@ declare module 'dns/promises' {
* *
* <omitted> * <omitted>
* *
* 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 * @since v10.6.0
* @param hostname Host name to resolve. * @param hostname Host name to resolve.
* @param [rrtype='A'] Resource record type. * @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, * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
* the `Promise` is resolved with an array of objects containing available * 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'}]`). * 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<CaaRecord[]>; function resolveCaa(hostname: string): Promise<CaaRecord[]>;
/** /**
@ -300,7 +300,7 @@ declare module 'dns/promises' {
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
* array of host names. * 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 * @since v10.6.0
*/ */
function reverse(ip: string): Promise<string[]>; function reverse(ip: string): Promise<string[]>;
@ -332,14 +332,16 @@ declare module 'dns/promises' {
*/ */
function setServers(servers: ReadonlyArray<string>): void; function setServers(servers: ReadonlyArray<string>): void;
/** /**
* Set the default value of `verbatim` in {@link lookup}. The value could be: * Set the default value of `verbatim` in `dns.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`. * * `ipv4first`: sets default `verbatim` `false`.
* When using worker threads, {@link setDefaultResultOrder} from the main thread won't affect the default dns orders in workers. * * `verbatim`: sets default `verbatim` `true`.
* @since v14.18.0 *
* @param order must be 'ipv4first' or 'verbatim'. * 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; function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
class Resolver { class Resolver {

View File

@ -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 * 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. * exit immediately with an error code.
* @deprecated Since v1.4.2 - Deprecated * @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' { declare module 'domain' {
import EventEmitter = require('node:events'); import EventEmitter = require('node:events');

View File

@ -32,7 +32,7 @@
* }); * });
* myEmitter.emit('event'); * 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' { declare module 'events' {
interface EventEmitterOptions { interface EventEmitterOptions {
@ -257,7 +257,7 @@ declare module 'events' {
* getEventListeners(et, 'foo'); // [listener] * 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[]; static getEventListeners(emitter: DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
/** /**

73
node_modules/@types/node/fs.d.ts generated vendored
View File

@ -16,7 +16,7 @@
* *
* All file system operations have synchronous, callback, and promise-based * All file system operations have synchronous, callback, and promise-based
* forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM). * 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' { declare module 'fs' {
import * as stream from 'node:stream'; import * as stream from 'node:stream';
@ -268,18 +268,22 @@ declare module 'fs' {
*/ */
export interface StatWatcher extends EventEmitter { 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 * @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; 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 * @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; unref(): this;
} }
@ -1014,8 +1018,10 @@ declare module 'fs' {
function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>; function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
} }
/** /**
* Synchronous fstat(2) - Get file status. * Retrieves the `fs.Stats` for the file descriptor.
* @param fd A 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( export function fstatSync(
fd: number, fd: number,
@ -1030,7 +1036,6 @@ declare module 'fs' {
} }
): BigIntStats; ): BigIntStats;
export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
/** /**
* Retrieves the `fs.Stats` for the symbolic link referred to by the path. * 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 * 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; persistent?: boolean | undefined;
interval?: number | 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( export function watchFile(
filename: PathLike, filename: PathLike,
options: options:

View File

@ -42,11 +42,11 @@ declare module 'fs/promises' {
mode?: Mode | undefined; mode?: Mode | undefined;
flag?: OpenMode | undefined; flag?: OpenMode | undefined;
} }
interface FileReadResult<T extends ArrayBufferView> { interface FileReadResult<T extends NodeJS.ArrayBufferView> {
bytesRead: number; bytesRead: number;
buffer: T; buffer: T;
} }
interface FileReadOptions<T extends ArrayBufferView = Buffer> { interface FileReadOptions<T extends NodeJS.ArrayBufferView = Buffer> {
/** /**
* @default `Buffer.alloc(0xffff)` * @default `Buffer.alloc(0xffff)`
*/ */
@ -207,8 +207,8 @@ declare module 'fs/promises' {
* integer, the current file position will remain unchanged. * integer, the current file position will remain unchanged.
* @return Fulfills upon success with an object with two properties: * @return Fulfills upon success with an object with two properties:
*/ */
read<T extends ArrayBufferView>(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise<FileReadResult<T>>; read<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise<FileReadResult<T>>;
read<T extends ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>; read<T extends NodeJS.ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
/** /**
* Asynchronously reads the entire contents of a file. * Asynchronously reads the entire contents of a file.
* *
@ -1043,7 +1043,7 @@ declare module 'fs/promises' {
* disappears in the directory. * disappears in the directory.
* *
* All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. * 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: * @return of objects with the properties:
*/ */
function watch( function watch(

25
node_modules/@types/node/http.d.ts generated vendored
View File

@ -37,7 +37,7 @@
* 'Host', 'mysite.com', * 'Host', 'mysite.com',
* 'accepT', '*' ] * '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' { declare module 'http' {
import * as stream from 'node:stream'; import * as stream from 'node:stream';
@ -113,7 +113,7 @@ declare module 'http' {
type OutgoingHttpHeader = number | string | string[]; type OutgoingHttpHeader = number | string | string[];
interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {} interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {}
interface ClientRequestArgs { interface ClientRequestArgs {
abort?: AbortSignal | undefined; signal?: AbortSignal | undefined;
protocol?: string | null | undefined; protocol?: string | null | undefined;
host?: string | null | undefined; host?: string | null | undefined;
hostname?: string | null | undefined; hostname?: string | null | undefined;
@ -341,7 +341,7 @@ declare module 'http' {
/** /**
* Aliases of `outgoingMessage.socket` * Aliases of `outgoingMessage.socket`
* @since v0.3.0 * @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; readonly connection: Socket | null;
/** /**
@ -608,6 +608,7 @@ declare module 'http' {
* The `request.aborted` property will be `true` if the request has * The `request.aborted` property will be `true` if the request has
* been aborted. * been aborted.
* @since v0.11.14 * @since v0.11.14
* @deprecated Since v17.0.0 - Check `destroyed` instead.
*/ */
aborted: boolean; aborted: boolean;
/** /**
@ -667,9 +668,12 @@ declare module 'http' {
* const headerNames = request.getRawHeaderNames(); * const headerNames = request.getRawHeaderNames();
* // headerNames === ['Foo', 'Set-Cookie'] * // headerNames === ['Foo', 'Set-Cookie']
* ``` * ```
* @since v15.13.0 * @since v15.13.0, v14.17.0
*/ */
getRawHeaderNames(): string[]; getRawHeaderNames(): string[];
/**
* @deprecated
*/
addListener(event: 'abort', listener: () => void): this; addListener(event: 'abort', listener: () => void): this;
addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
addListener(event: 'continue', listener: () => 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: 'pipe', listener: (src: stream.Readable) => void): this;
addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this;
/**
* @deprecated
*/
on(event: 'abort', listener: () => void): this; on(event: 'abort', listener: () => void): this;
on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
on(event: 'continue', listener: () => 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: 'pipe', listener: (src: stream.Readable) => void): this;
on(event: 'unpipe', listener: (src: stream.Readable) => void): this; on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this;
/**
* @deprecated
*/
once(event: 'abort', listener: () => void): this; once(event: 'abort', listener: () => void): this;
once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
once(event: 'continue', listener: () => 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: 'pipe', listener: (src: stream.Readable) => void): this;
once(event: 'unpipe', listener: (src: stream.Readable) => void): this; once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
once(event: string | symbol, listener: (...args: any[]) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this;
/**
* @deprecated
*/
prependListener(event: 'abort', listener: () => void): this; prependListener(event: 'abort', listener: () => void): this;
prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
prependListener(event: 'continue', listener: () => 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: 'pipe', listener: (src: stream.Readable) => void): this;
prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this; prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
/**
* @deprecated
*/
prependOnceListener(event: 'abort', listener: () => void): this; prependOnceListener(event: 'abort', listener: () => void): this;
prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
prependOnceListener(event: 'continue', listener: () => 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 * The `message.aborted` property will be `true` if the request has
* been aborted. * been aborted.
* @since v10.1.0 * @since v10.1.0
* @deprecated Since v17.0.0 - Check `message.destroyed` from <a href="stream.html#class-streamreadable" class="type">stream.Readable</a>.
*/ */
aborted: boolean; aborted: boolean;
/** /**

View File

@ -6,7 +6,7 @@
* const http2 = require('http2'); * const http2 = require('http2');
* ``` * ```
* @since v8.4.0 * @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' { declare module 'http2' {
import EventEmitter = require('node:events'); import EventEmitter = require('node:events');
@ -757,7 +757,7 @@ declare module 'http2' {
* session.setLocalWindowSize(expectedWindowSize); * session.setLocalWindowSize(expectedWindowSize);
* }); * });
* ``` * ```
* @since v15.3.0 * @since v15.3.0, v14.18.0
*/ */
setLocalWindowSize(windowSize: number): void; setLocalWindowSize(windowSize: number): void;
/** /**

View File

@ -1,7 +1,7 @@
/** /**
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
* separate module. * 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' { declare module 'https' {
import { Duplex } from 'node:stream'; import { Duplex } from 'node:stream';

View File

@ -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/ // Project: https://nodejs.org/
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft> // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
// DefinitelyTyped <https://github.com/DefinitelyTyped> // DefinitelyTyped <https://github.com/DefinitelyTyped>

View File

@ -15,7 +15,7 @@
* ```js * ```js
* const inspector = require('inspector'); * 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' { declare module 'inspector' {
import EventEmitter = require('node:events'); import EventEmitter = require('node:events');
@ -1779,10 +1779,9 @@ declare module 'inspector' {
*/ */
connect(): void; connect(): void;
/** /**
* Connects a session to the main thread inspector back-end. * Connects a session to the main thread inspector back-end. An exception will
* An exception will be thrown if this API was not called on a Worker * be thrown if this API was not called on a Worker thread.
* thread. * @since v12.11.0
* @since 12.11.0
*/ */
connectToMainThread(): void; connectToMainThread(): void;
/** /**

22
node_modules/@types/node/net.d.ts generated vendored
View File

@ -10,7 +10,7 @@
* ```js * ```js
* const net = require('net'); * 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' { declare module 'net' {
import * as stream from 'node:stream'; 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 * 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 * disabling inbound or outbound access to specific IP addresses, IP ranges, or
* IP subnets. * IP subnets.
* @since v15.0.0 * @since v15.0.0, v14.18.0
*/ */
class BlockList { class BlockList {
/** /**
* Adds a rule to block the given IP address. * 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 address An IPv4 or IPv6 address.
* @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
*/ */
@ -573,7 +573,7 @@ declare module 'net' {
addAddress(address: SocketAddress): void; addAddress(address: SocketAddress): void;
/** /**
* Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). * 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 start The starting IPv4 or IPv6 address in the range.
* @param end The ending 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'`. * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
@ -582,7 +582,7 @@ declare module 'net' {
addRange(start: SocketAddress, end: SocketAddress): void; addRange(start: SocketAddress, end: SocketAddress): void;
/** /**
* Adds a rule to block a range of IP addresses specified as a subnet mask. * 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 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 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'`. * @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:7b7b:7b7b', 'ipv6')); // Prints: true
* console.log(blockList.check('::ffff:123.123.123.123', '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 address The IP address to check
* @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
*/ */
@ -754,26 +754,26 @@ declare module 'net' {
port?: number | undefined; port?: number | undefined;
} }
/** /**
* @since v15.14.0 * @since v15.14.0, v14.18.0
*/ */
class SocketAddress { class SocketAddress {
constructor(options: SocketAddressInitOptions); constructor(options: SocketAddressInitOptions);
/** /**
* Either \`'ipv4'\` or \`'ipv6'\`. * Either \`'ipv4'\` or \`'ipv6'\`.
* @since v15.14.0 * @since v15.14.0, v14.18.0
*/ */
readonly address: string; readonly address: string;
/** /**
* Either \`'ipv4'\` or \`'ipv6'\`. * Either \`'ipv4'\` or \`'ipv6'\`.
* @since v15.14.0 * @since v15.14.0, v14.18.0
*/ */
readonly family: IPVersion; readonly family: IPVersion;
/** /**
* @since v15.14.0 * @since v15.14.0, v14.18.0
*/ */
readonly port: number; readonly port: number;
/** /**
* @since v15.14.0 * @since v15.14.0, v14.18.0
*/ */
readonly flowlabel: number; readonly flowlabel: number;
} }

2
node_modules/@types/node/os.d.ts generated vendored
View File

@ -5,7 +5,7 @@
* ```js * ```js
* const os = require('os'); * 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' { declare module 'os' {
interface CpuInfo { interface CpuInfo {

View File

@ -1,6 +1,6 @@
{ {
"name": "@types/node", "name": "@types/node",
"version": "16.11.10", "version": "17.0.0",
"description": "TypeScript definitions for Node.js", "description": "TypeScript definitions for Node.js",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
"license": "MIT", "license": "MIT",
@ -225,6 +225,6 @@
}, },
"scripts": {}, "scripts": {},
"dependencies": {}, "dependencies": {},
"typesPublisherContentHash": "b24d5d157d742f1a54b5d70ed1c014862c87e0187063c31ed2038790f909f02d", "typesPublisherContentHash": "6a6a3a40242455c8b732c50c33bcbbd96f68ccf65d366fbd96a6773223877826",
"typeScriptVersion": "3.8" "typeScriptVersion": "3.8"
} }

2
node_modules/@types/node/path.d.ts generated vendored
View File

@ -13,7 +13,7 @@ declare module 'path/win32' {
* ```js * ```js
* const path = require('path'); * 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' { declare module 'path' {
namespace path { namespace path {

View File

@ -26,7 +26,7 @@
* performance.measure('A to B', 'A', 'B'); * 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' { declare module 'perf_hooks' {
import { AsyncResource } from 'node:async_hooks'; import { AsyncResource } from 'node:async_hooks';
@ -485,7 +485,7 @@ declare module 'perf_hooks' {
} }
interface RecordableHistogram extends Histogram { interface RecordableHistogram extends Histogram {
/** /**
* @since v15.9.0 * @since v15.9.0, v14.18.0
* @param val The amount to record in the histogram. * @param val The amount to record in the histogram.
*/ */
record(val: number | bigint): void; record(val: number | bigint): void;
@ -494,7 +494,7 @@ declare module 'perf_hooks' {
* previous call to `recordDelta()` and records that amount in the histogram. * previous call to `recordDelta()` and records that amount in the histogram.
* *
* ## Examples * ## Examples
* @since v15.9.0 * @since v15.9.0, v14.18.0
*/ */
recordDelta(): void; recordDelta(): void;
} }
@ -546,7 +546,7 @@ declare module 'perf_hooks' {
} }
/** /**
* Returns a `RecordableHistogram`. * Returns a `RecordableHistogram`.
* @since v15.9.0 * @since v15.9.0, v14.18.0
*/ */
function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
} }

View File

@ -24,7 +24,7 @@
* made available to developers as a convenience. Fixes or other modifications to * 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. * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
* @deprecated Since v7.0.0 - Deprecated * @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' { declare module 'punycode' {
/** /**

View File

@ -9,7 +9,7 @@
* The `querystring` API is considered Legacy. While it is still maintained, * The `querystring` API is considered Legacy. While it is still maintained,
* new code should use the `URLSearchParams` API instead. * new code should use the `URLSearchParams` API instead.
* @deprecated Legacy * @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' { declare module 'querystring' {
interface StringifyOptions { interface StringifyOptions {

View File

@ -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 * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
* using: *
* To use the promise-based APIs:
* *
* ```js * ```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. * The following simple example illustrates the basic use of the `readline` module.
* *
* ```js * ```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({ * const rl = readline.createInterface({ input, output });
* 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 * 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. * 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' { declare module 'readline' {
import { Abortable, EventEmitter } from 'node:events'; import { Abortable, EventEmitter } from 'node:events';
@ -394,6 +398,109 @@ declare module 'readline' {
* if (process.stdin.isTTY) * if (process.stdin.isTTY)
* process.stdin.setRawMode(true); * 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 * @since v0.7.7
*/ */
function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;

2
node_modules/@types/node/repl.d.ts generated vendored
View File

@ -6,7 +6,7 @@
* ```js * ```js
* const repl = require('repl'); * 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' { declare module 'repl' {
import { Interface, Completer, AsyncCompleter } from 'node:readline'; import { Interface, Completer, AsyncCompleter } from 'node:readline';

View File

@ -14,7 +14,7 @@
* *
* The `stream` module is useful for creating new types of stream instances. It is * 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. * 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' { declare module 'stream' {
import { EventEmitter, Abortable } from 'node:events'; import { EventEmitter, Abortable } from 'node:events';
@ -71,7 +71,7 @@ declare module 'stream' {
readable: boolean; readable: boolean;
/** /**
* Returns whether `'data'` has been emitted. * Returns whether `'data'` has been emitted.
* @since v16.7.0 * @since v16.7.0, v14.18.0
* @experimental * @experimental
*/ */
readonly readableDidRead: boolean; readonly readableDidRead: boolean;

View File

@ -1,5 +1,328 @@
declare module 'stream/web' { declare module 'stream/web' {
// stub module, pending copy&paste from .d.ts or manual impl // stub module, pending copy&paste from .d.ts or manual impl
// copy from lib.dom.d.ts
interface ReadableWritablePair<R = any, W = any> {
readable: ReadableStream<R>;
/**
* 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<W>;
}
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<undefined>;
cancel(reason?: any): Promise<void>;
}
interface ReadableStreamDefaultReadValueResult<T> {
done: false;
value: T;
}
interface ReadableStreamDefaultReadDoneResult {
done: true;
value?: undefined;
}
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
interface ReadableByteStreamControllerCallback {
(controller: ReadableByteStreamController): void | PromiseLike<void>;
}
interface UnderlyingSinkAbortCallback {
(reason?: any): void | PromiseLike<void>;
}
interface UnderlyingSinkCloseCallback {
(): void | PromiseLike<void>;
}
interface UnderlyingSinkStartCallback {
(controller: WritableStreamDefaultController): any;
}
interface UnderlyingSinkWriteCallback<W> {
(chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
}
interface UnderlyingSourceCancelCallback {
(reason?: any): void | PromiseLike<void>;
}
interface UnderlyingSourcePullCallback<R> {
(controller: ReadableStreamController<R>): void | PromiseLike<void>;
}
interface UnderlyingSourceStartCallback<R> {
(controller: ReadableStreamController<R>): any;
}
interface TransformerFlushCallback<O> {
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
}
interface TransformerStartCallback<O> {
(controller: TransformStreamDefaultController<O>): any;
}
interface TransformerTransformCallback<I, O> {
(chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
}
interface UnderlyingByteSource {
autoAllocateChunkSize?: number;
cancel?: ReadableStreamErrorCallback;
pull?: ReadableByteStreamControllerCallback;
start?: ReadableByteStreamControllerCallback;
type: 'bytes';
}
interface UnderlyingSource<R = any> {
cancel?: UnderlyingSourceCancelCallback;
pull?: UnderlyingSourcePullCallback<R>;
start?: UnderlyingSourceStartCallback<R>;
type?: undefined;
}
interface UnderlyingSink<W = any> {
abort?: UnderlyingSinkAbortCallback;
close?: UnderlyingSinkCloseCallback;
start?: UnderlyingSinkStartCallback;
type?: undefined;
write?: UnderlyingSinkWriteCallback<W>;
}
interface ReadableStreamErrorCallback {
(reason: any): void | PromiseLike<void>;
}
/** This Streams API interface represents a readable stream of byte data. */
interface ReadableStream<R = any> {
readonly locked: boolean;
cancel(reason?: any): Promise<void>;
getReader(): ReadableStreamDefaultReader<R>;
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>];
[Symbol.asyncIterator](options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
}
const ReadableStream: {
prototype: ReadableStream;
new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
};
interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
read(): Promise<ReadableStreamDefaultReadResult<R>>;
releaseLock(): void;
}
const ReadableStreamDefaultReader: {
prototype: ReadableStreamDefaultReader;
new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
};
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<R = any> {
readonly desiredSize: number | null;
close(): void;
enqueue(chunk?: R): void;
error(e?: any): void;
}
const ReadableStreamDefaultController: {
prototype: ReadableStreamDefaultController;
new (): ReadableStreamDefaultController;
};
interface Transformer<I = any, O = any> {
flush?: TransformerFlushCallback<O>;
readableType?: undefined;
start?: TransformerStartCallback<O>;
transform?: TransformerTransformCallback<I, O>;
writableType?: undefined;
}
interface TransformStream<I = any, O = any> {
readonly readable: ReadableStream<O>;
readonly writable: WritableStream<I>;
}
const TransformStream: {
prototype: TransformStream;
new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
};
interface TransformStreamDefaultController<O = any> {
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<W = any> {
readonly locked: boolean;
abort(reason?: any): Promise<void>;
close(): Promise<void>;
getWriter(): WritableStreamDefaultWriter<W>;
}
const WritableStream: {
prototype: WritableStream;
new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
};
/**
* 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<W = any> {
readonly closed: Promise<undefined>;
readonly desiredSize: number | null;
readonly ready: Promise<undefined>;
abort(reason?: any): Promise<void>;
close(): Promise<void>;
releaseLock(): void;
write(chunk?: W): Promise<void>;
}
const WritableStreamDefaultWriter: {
prototype: WritableStreamDefaultWriter;
new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
};
/**
* 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<T = any> {
highWaterMark?: number;
size?: QueuingStrategySize<T>;
}
interface QueuingStrategySize<T = any> {
(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<ArrayBufferView> {
readonly highWaterMark: number;
readonly size: QueuingStrategySize<ArrayBufferView>;
}
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<Uint8Array>;
readonly writable: WritableStream<string>;
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<string>;
readonly writable: WritableStream<BufferSource>;
readonly [Symbol.toStringTag]: string;
}
const TextDecoderStream: {
prototype: TextDecoderStream;
new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
};
} }
declare module 'node:stream/web' { declare module 'node:stream/web' {
export * from 'stream/web'; export * from 'stream/web';

View File

@ -36,7 +36,7 @@
* decoder.write(Buffer.from([0x82])); * decoder.write(Buffer.from([0x82]));
* console.log(decoder.end(Buffer.from([0xAC]))); * 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' { declare module 'string_decoder' {
class StringDecoder { class StringDecoder {

View File

@ -6,7 +6,7 @@
* The timer functions within Node.js implement a similar API as the timers API * 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 * 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). * 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' { declare module 'timers' {
import { Abortable } from 'node:events'; import { Abortable } from 'node:events';

2
node_modules/@types/node/tls.d.ts generated vendored
View File

@ -6,7 +6,7 @@
* ```js * ```js
* const tls = require('tls'); * 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' { declare module 'tls' {
import { X509Certificate } from 'node:crypto'; import { X509Certificate } from 'node:crypto';

View File

@ -73,7 +73,7 @@
* *
* The features from this module are not available in `Worker` threads. * The features from this module are not available in `Worker` threads.
* @experimental * @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' { declare module 'trace_events' {
/** /**

2
node_modules/@types/node/tty.d.ts generated vendored
View File

@ -22,7 +22,7 @@
* *
* In most cases, there should be little to no reason for an application to * 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. * 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' { declare module 'tty' {
import * as net from 'node:net'; import * as net from 'node:net';

78
node_modules/@types/node/url.d.ts generated vendored
View File

@ -5,7 +5,7 @@
* ```js * ```js
* import url from 'url'; * 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' { declare module 'url' {
import { Blob } from 'node:buffer'; 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: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; 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. * The `url.format()` method returns a formatted URL string derived from`urlObject`.
* 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.
* *
* ```js * ```js
* import url from 'url'; * const url = require('url');
* const myURL = new URL('https://a:b@測試?abc#foo'); * url.format({
* protocol: 'https',
* hostname: 'example.com',
* pathname: '/some/path',
* query: {
* page: 1,
* format: 'json'
* }
* });
* *
* console.log(myURL.href); * // => 'https://example.com/some/path?page=1&#x26;format=json'
* // Prints https://a:b@xn--g6w251d/?abc#foo
*
* console.log(myURL.toString());
* // Prints https://a:b@xn--g6w251d/?abc#foo
*
* console.log(url.format(myURL, { fragment: false, unicode: true, auth: false }));
* // Prints 'https://測試/?abc'
* ``` * ```
* @since v7.6.0 *
* @param urlObject A `WHATWG URL` object * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
* @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; 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. * @param url The `WHATWG URL` object to convert to an options object.
* @return Options object * @return Options object
*/ */

6
node_modules/@types/node/util.d.ts generated vendored
View File

@ -6,7 +6,7 @@
* ```js * ```js
* const util = require('util'); * 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' { declare module 'util' {
import * as types from 'node:util/types'; import * as types from 'node:util/types';
@ -139,7 +139,7 @@ declare module 'util' {
* console.error(name); // ENOENT * console.error(name); // ENOENT
* }); * });
* ``` * ```
* @since v16.0.0 * @since v16.0.0, v14.17.0
*/ */
export function getSystemErrorMap(): Map<number, [string, string]>; export function getSystemErrorMap(): Map<number, [string, string]>;
/** /**
@ -159,7 +159,7 @@ declare module 'util' {
* Returns the `string` after replacing any surrogate code points * Returns the `string` after replacing any surrogate code points
* (or equivalently, any unpaired surrogate code units) with the * (or equivalently, any unpaired surrogate code units) with the
* Unicode "replacement character" U+FFFD. * Unicode "replacement character" U+FFFD.
* @since v16.8.0 * @since v16.8.0, v14.18.0
*/ */
export function toUSVString(string: string): string; export function toUSVString(string: string): string;
/** /**

6
node_modules/@types/node/v8.d.ts generated vendored
View File

@ -4,7 +4,7 @@
* ```js * ```js
* const v8 = require('v8'); * 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' { declare module 'v8' {
import { Readable } from 'node:stream'; 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 * 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. * 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; function takeCoverage(): void;
/** /**
* The `v8.stopCoverage()` method allows the user to stop the coverage collection * 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 * 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. * 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; function stopCoverage(): void;
} }

2
node_modules/@types/node/vm.d.ts generated vendored
View File

@ -32,7 +32,7 @@
* *
* console.log(x); // 1; y is not defined. * 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' { declare module 'vm' {
interface Context extends NodeJS.Dict<any> {} interface Context extends NodeJS.Dict<any> {}

2
node_modules/@types/node/wasi.d.ts generated vendored
View File

@ -68,7 +68,7 @@
* The `--experimental-wasi-unstable-preview1` CLI argument is needed for this * The `--experimental-wasi-unstable-preview1` CLI argument is needed for this
* example to run. * example to run.
* @experimental * @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' { declare module 'wasi' {
interface WASIOptions { interface WASIOptions {

View File

@ -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, * 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. * 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' { declare module 'worker_threads' {
import { Blob } from 'node:buffer'; 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 * An object that can be used to query performance information from a worker
* instance. Similar to `perf_hooks.performance`. * 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; readonly performance: WorkerPerformance;
/** /**
@ -629,14 +629,14 @@ declare module 'worker_threads' {
* console.log(getEnvironmentData('Hello')); // Prints 'World!'. * console.log(getEnvironmentData('Hello')); // Prints 'World!'.
* } * }
* ``` * ```
* @since v15.12.0 * @since v15.12.0, v14.18.0
* @experimental * @experimental
* @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key. * @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
*/ */
function getEnvironmentData(key: Serializable): Serializable; 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. * 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 * @experimental
* @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key. * @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 * @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

2
node_modules/@types/node/zlib.d.ts generated vendored
View File

@ -88,7 +88,7 @@
* }); * });
* ``` * ```
* @since v0.5.8 * @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' { declare module 'zlib' {
import * as stream from 'node:stream'; import * as stream from 'node:stream';