mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Deploy Production Code for Commit 9749ca0243
🚀
This commit is contained in:
parent
9749ca0243
commit
da91e735be
2
node_modules/@types/node/README.md
generated
vendored
2
node_modules/@types/node/README.md
generated
vendored
@ -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`
|
||||
|
||||
|
2
node_modules/@types/node/assert.d.ts
generated
vendored
2
node_modules/@types/node/assert.d.ts
generated
vendored
@ -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' {
|
||||
/**
|
||||
|
10
node_modules/@types/node/async_hooks.d.ts
generated
vendored
10
node_modules/@types/node/async_hooks.d.ts
generated
vendored
@ -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) {
|
||||
|
18
node_modules/@types/node/buffer.d.ts
generated
vendored
18
node_modules/@types/node/buffer.d.ts
generated
vendored
@ -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<ArrayBuffer>;
|
||||
/**
|
||||
* 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<string>;
|
||||
/**
|
||||
@ -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.
|
||||
*/
|
||||
|
2
node_modules/@types/node/child_process.d.ts
generated
vendored
2
node_modules/@types/node/child_process.d.ts
generated
vendored
@ -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';
|
||||
|
2
node_modules/@types/node/cluster.d.ts
generated
vendored
2
node_modules/@types/node/cluster.d.ts
generated
vendored
@ -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';
|
||||
|
2
node_modules/@types/node/console.d.ts
generated
vendored
2
node_modules/@types/node/console.d.ts
generated
vendored
@ -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');
|
||||
|
4
node_modules/@types/node/crypto.d.ts
generated
vendored
4
node_modules/@types/node/crypto.d.ts
generated
vendored
@ -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 {
|
||||
|
4
node_modules/@types/node/dgram.d.ts
generated
vendored
4
node_modules/@types/node/dgram.d.ts
generated
vendored
@ -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
|
||||
|
2
node_modules/@types/node/diagnostics_channel.d.ts
generated
vendored
2
node_modules/@types/node/diagnostics_channel.d.ts
generated
vendored
@ -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' {
|
||||
/**
|
||||
|
27
node_modules/@types/node/dns.d.ts
generated
vendored
27
node_modules/@types/node/dns.d.ts
generated
vendored
@ -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' {
|
||||
*
|
||||
* <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
|
||||
* @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`.
|
||||
* Set the default value of `verbatim` in {@link 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 {@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.
|
||||
*/
|
||||
|
22
node_modules/@types/node/dns/promises.d.ts
generated
vendored
22
node_modules/@types/node/dns/promises.d.ts
generated
vendored
@ -119,7 +119,7 @@ declare module 'dns/promises' {
|
||||
*
|
||||
* <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
|
||||
* @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<CaaRecord[]>;
|
||||
/**
|
||||
@ -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<string[]>;
|
||||
@ -332,14 +332,16 @@ declare module 'dns/promises' {
|
||||
*/
|
||||
function setServers(servers: ReadonlyArray<string>): 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 {
|
||||
|
2
node_modules/@types/node/domain.d.ts
generated
vendored
2
node_modules/@types/node/domain.d.ts
generated
vendored
@ -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');
|
||||
|
4
node_modules/@types/node/events.d.ts
generated
vendored
4
node_modules/@types/node/events.d.ts
generated
vendored
@ -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[];
|
||||
/**
|
||||
|
73
node_modules/@types/node/fs.d.ts
generated
vendored
73
node_modules/@types/node/fs.d.ts
generated
vendored
@ -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<Stats | BigIntStats>;
|
||||
}
|
||||
/**
|
||||
* 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:
|
||||
|
10
node_modules/@types/node/fs/promises.d.ts
generated
vendored
10
node_modules/@types/node/fs/promises.d.ts
generated
vendored
@ -42,11 +42,11 @@ declare module 'fs/promises' {
|
||||
mode?: Mode | undefined;
|
||||
flag?: OpenMode | undefined;
|
||||
}
|
||||
interface FileReadResult<T extends ArrayBufferView> {
|
||||
interface FileReadResult<T extends NodeJS.ArrayBufferView> {
|
||||
bytesRead: number;
|
||||
buffer: T;
|
||||
}
|
||||
interface FileReadOptions<T extends ArrayBufferView = Buffer> {
|
||||
interface FileReadOptions<T extends NodeJS.ArrayBufferView = Buffer> {
|
||||
/**
|
||||
* @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<T extends 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: T, offset?: number | null, length?: number | null, position?: number | null): Promise<FileReadResult<T>>;
|
||||
read<T extends NodeJS.ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
|
||||
/**
|
||||
* 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(
|
||||
|
25
node_modules/@types/node/http.d.ts
generated
vendored
25
node_modules/@types/node/http.d.ts
generated
vendored
@ -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<OutgoingHttpHeader> {}
|
||||
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 <a href="stream.html#class-streamreadable" class="type">stream.Readable</a>.
|
||||
*/
|
||||
aborted: boolean;
|
||||
/**
|
||||
|
4
node_modules/@types/node/http2.d.ts
generated
vendored
4
node_modules/@types/node/http2.d.ts
generated
vendored
@ -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;
|
||||
/**
|
||||
|
2
node_modules/@types/node/https.d.ts
generated
vendored
2
node_modules/@types/node/https.d.ts
generated
vendored
@ -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';
|
||||
|
2
node_modules/@types/node/index.d.ts
generated
vendored
2
node_modules/@types/node/index.d.ts
generated
vendored
@ -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 <https://github.com/Microsoft>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
||||
|
9
node_modules/@types/node/inspector.d.ts
generated
vendored
9
node_modules/@types/node/inspector.d.ts
generated
vendored
@ -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;
|
||||
/**
|
||||
|
22
node_modules/@types/node/net.d.ts
generated
vendored
22
node_modules/@types/node/net.d.ts
generated
vendored
@ -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;
|
||||
}
|
||||
|
2
node_modules/@types/node/os.d.ts
generated
vendored
2
node_modules/@types/node/os.d.ts
generated
vendored
@ -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 {
|
||||
|
4
node_modules/@types/node/package.json
generated
vendored
4
node_modules/@types/node/package.json
generated
vendored
@ -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"
|
||||
}
|
2
node_modules/@types/node/path.d.ts
generated
vendored
2
node_modules/@types/node/path.d.ts
generated
vendored
@ -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 {
|
||||
|
8
node_modules/@types/node/perf_hooks.d.ts
generated
vendored
8
node_modules/@types/node/perf_hooks.d.ts
generated
vendored
@ -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;
|
||||
}
|
||||
|
2
node_modules/@types/node/punycode.d.ts
generated
vendored
2
node_modules/@types/node/punycode.d.ts
generated
vendored
@ -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' {
|
||||
/**
|
||||
|
2
node_modules/@types/node/querystring.d.ts
generated
vendored
2
node_modules/@types/node/querystring.d.ts
generated
vendored
@ -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 {
|
||||
|
135
node_modules/@types/node/readline.d.ts
generated
vendored
135
node_modules/@types/node/readline.d.ts
generated
vendored
@ -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: process.stdin,
|
||||
* output: process.stdout
|
||||
* });
|
||||
* const rl = readline.createInterface({ input, output });
|
||||
*
|
||||
* 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}`);
|
||||
* const answer = await rl.question('What do you think of Node.js? ');
|
||||
*
|
||||
* rl.close();
|
||||
* });
|
||||
* console.log(`Thank you for your valuable feedback: ${answer}`);
|
||||
*
|
||||
* 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;
|
||||
|
2
node_modules/@types/node/repl.d.ts
generated
vendored
2
node_modules/@types/node/repl.d.ts
generated
vendored
@ -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';
|
||||
|
4
node_modules/@types/node/stream.d.ts
generated
vendored
4
node_modules/@types/node/stream.d.ts
generated
vendored
@ -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;
|
||||
|
323
node_modules/@types/node/stream/web.d.ts
generated
vendored
323
node_modules/@types/node/stream/web.d.ts
generated
vendored
@ -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<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' {
|
||||
export * from 'stream/web';
|
||||
|
2
node_modules/@types/node/string_decoder.d.ts
generated
vendored
2
node_modules/@types/node/string_decoder.d.ts
generated
vendored
@ -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 {
|
||||
|
2
node_modules/@types/node/timers.d.ts
generated
vendored
2
node_modules/@types/node/timers.d.ts
generated
vendored
@ -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';
|
||||
|
2
node_modules/@types/node/tls.d.ts
generated
vendored
2
node_modules/@types/node/tls.d.ts
generated
vendored
@ -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';
|
||||
|
2
node_modules/@types/node/trace_events.d.ts
generated
vendored
2
node_modules/@types/node/trace_events.d.ts
generated
vendored
@ -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' {
|
||||
/**
|
||||
|
2
node_modules/@types/node/tty.d.ts
generated
vendored
2
node_modules/@types/node/tty.d.ts
generated
vendored
@ -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';
|
||||
|
78
node_modules/@types/node/url.d.ts
generated
vendored
78
node_modules/@types/node/url.d.ts
generated
vendored
@ -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
|
||||
*
|
||||
* 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'
|
||||
* // => 'https://example.com/some/path?page=1&format=json'
|
||||
* ```
|
||||
* @since v7.6.0
|
||||
* @param urlObject A `WHATWG URL` object
|
||||
* @param options
|
||||
*
|
||||
* If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
6
node_modules/@types/node/util.d.ts
generated
vendored
6
node_modules/@types/node/util.d.ts
generated
vendored
@ -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<number, [string, string]>;
|
||||
/**
|
||||
@ -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;
|
||||
/**
|
||||
|
6
node_modules/@types/node/v8.d.ts
generated
vendored
6
node_modules/@types/node/v8.d.ts
generated
vendored
@ -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;
|
||||
}
|
||||
|
2
node_modules/@types/node/vm.d.ts
generated
vendored
2
node_modules/@types/node/vm.d.ts
generated
vendored
@ -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<any> {}
|
||||
|
2
node_modules/@types/node/wasi.d.ts
generated
vendored
2
node_modules/@types/node/wasi.d.ts
generated
vendored
@ -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 {
|
||||
|
8
node_modules/@types/node/worker_threads.d.ts
generated
vendored
8
node_modules/@types/node/worker_threads.d.ts
generated
vendored
@ -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
|
||||
|
2
node_modules/@types/node/zlib.d.ts
generated
vendored
2
node_modules/@types/node/zlib.d.ts
generated
vendored
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user