Pull.
J'ai juste update le cutie.js, CONNARD Ah oui, j'ai aussi add le info.js, qui est merdique d'ailleurs
This commit is contained in:
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 (https://nodejs.org/).
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Fri, 15 Aug 2025 08:39:32 GMT
|
||||
* Last updated: Thu, 18 Sep 2025 00:04:03 GMT
|
||||
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
||||
|
||||
# Credits
|
||||
|
||||
2
node_modules/@types/node/buffer.d.ts
generated
vendored
2
node_modules/@types/node/buffer.d.ts
generated
vendored
@@ -139,7 +139,7 @@ declare module "buffer" {
|
||||
type?: string | undefined;
|
||||
}
|
||||
/**
|
||||
* A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
|
||||
* A `Blob` encapsulates immutable, raw data that can be safely shared across
|
||||
* multiple worker threads.
|
||||
* @since v15.7.0, v14.18.0
|
||||
*/
|
||||
|
||||
2
node_modules/@types/node/child_process.d.ts
generated
vendored
2
node_modules/@types/node/child_process.d.ts
generated
vendored
@@ -24,7 +24,7 @@
|
||||
* the parent Node.js process and the spawned subprocess. These pipes have
|
||||
* limited (and platform-specific) capacity. If the subprocess writes to
|
||||
* stdout in excess of that limit without the output being captured, the
|
||||
* subprocess blocks waiting for the pipe buffer to accept more data. This is
|
||||
* subprocess blocks, waiting for the pipe buffer to accept more data. This is
|
||||
* identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed.
|
||||
*
|
||||
* The command lookup is performed using the `options.env.PATH` environment
|
||||
|
||||
54
node_modules/@types/node/crypto.d.ts
generated
vendored
54
node_modules/@types/node/crypto.d.ts
generated
vendored
@@ -3363,11 +3363,36 @@ declare module "crypto" {
|
||||
options: { privateKey: KeyObject; publicKey: KeyObject },
|
||||
callback: (err: Error | null, secret: Buffer) => void,
|
||||
): void;
|
||||
interface OneShotDigestOptions {
|
||||
/**
|
||||
* Encoding used to encode the returned digest.
|
||||
* @default 'hex'
|
||||
*/
|
||||
outputEncoding?: BinaryToTextEncoding | "buffer" | undefined;
|
||||
/**
|
||||
* For XOF hash functions such as 'shake256', the outputLength option
|
||||
* can be used to specify the desired output length in bytes.
|
||||
*/
|
||||
outputLength?: number | undefined;
|
||||
}
|
||||
interface OneShotDigestOptionsWithStringEncoding extends OneShotDigestOptions {
|
||||
outputEncoding?: BinaryToTextEncoding | undefined;
|
||||
}
|
||||
interface OneShotDigestOptionsWithBufferEncoding extends OneShotDigestOptions {
|
||||
outputEncoding: "buffer";
|
||||
}
|
||||
/**
|
||||
* A utility for creating one-shot hash digests of data. It can be faster than the object-based `crypto.createHash()` when hashing a smaller amount of data
|
||||
* (<= 5MB) that's readily available. If the data can be big or if it is streamed, it's still recommended to use `crypto.createHash()` instead. The `algorithm`
|
||||
* is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. On recent releases
|
||||
* of OpenSSL, `openssl list -digest-algorithms` will display the available digest algorithms.
|
||||
* A utility for creating one-shot hash digests of data. It can be faster than
|
||||
* the object-based `crypto.createHash()` when hashing a smaller amount of data
|
||||
* (<= 5MB) that's readily available. If the data can be big or if it is streamed,
|
||||
* it's still recommended to use `crypto.createHash()` instead.
|
||||
*
|
||||
* The `algorithm` is dependent on the available algorithms supported by the
|
||||
* version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
|
||||
* On recent releases of OpenSSL, `openssl list -digest-algorithms` will
|
||||
* display the available digest algorithms.
|
||||
*
|
||||
* If `options` is a string, then it specifies the `outputEncoding`.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
@@ -3387,16 +3412,25 @@ declare module "crypto" {
|
||||
* console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer'));
|
||||
* ```
|
||||
* @since v21.7.0, v20.12.0
|
||||
* @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different input encoding is desired for a string input, user
|
||||
* could encode the string into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing the encoded `TypedArray` into this API instead.
|
||||
* @param [outputEncoding='hex'] [Encoding](https://nodejs.org/docs/latest-v24.x/api/buffer.html#buffers-and-character-encodings) used to encode the returned digest.
|
||||
* @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different
|
||||
* input encoding is desired for a string input, user could encode the string
|
||||
* into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing
|
||||
* the encoded `TypedArray` into this API instead.
|
||||
*/
|
||||
function hash(algorithm: string, data: BinaryLike, outputEncoding?: BinaryToTextEncoding): string;
|
||||
function hash(algorithm: string, data: BinaryLike, outputEncoding: "buffer"): Buffer;
|
||||
function hash(
|
||||
algorithm: string,
|
||||
data: BinaryLike,
|
||||
outputEncoding?: BinaryToTextEncoding | "buffer",
|
||||
options?: OneShotDigestOptionsWithStringEncoding | BinaryToTextEncoding,
|
||||
): string;
|
||||
function hash(
|
||||
algorithm: string,
|
||||
data: BinaryLike,
|
||||
options: OneShotDigestOptionsWithBufferEncoding | "buffer",
|
||||
): Buffer;
|
||||
function hash(
|
||||
algorithm: string,
|
||||
data: BinaryLike,
|
||||
options: OneShotDigestOptions | BinaryToTextEncoding | "buffer",
|
||||
): string | Buffer;
|
||||
type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts";
|
||||
interface CipherInfoOptions {
|
||||
|
||||
5
node_modules/@types/node/dns.d.ts
generated
vendored
5
node_modules/@types/node/dns.d.ts
generated
vendored
@@ -830,6 +830,11 @@ declare module "dns" {
|
||||
* @default 4
|
||||
*/
|
||||
tries?: number;
|
||||
/**
|
||||
* The max retry timeout, in milliseconds.
|
||||
* @default 0
|
||||
*/
|
||||
maxTimeout?: number | undefined;
|
||||
}
|
||||
/**
|
||||
* An independent resolver for DNS requests.
|
||||
|
||||
33
node_modules/@types/node/fs.d.ts
generated
vendored
33
node_modules/@types/node/fs.d.ts
generated
vendored
@@ -1966,6 +1966,39 @@ declare module "fs" {
|
||||
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
||||
*/
|
||||
export function mkdtempSync(prefix: string, options?: EncodingOption): string | Buffer;
|
||||
export interface DisposableTempDir extends AsyncDisposable {
|
||||
/**
|
||||
* The path of the created directory.
|
||||
*/
|
||||
path: string;
|
||||
/**
|
||||
* A function which removes the created directory.
|
||||
*/
|
||||
remove(): Promise<void>;
|
||||
/**
|
||||
* The same as `remove`.
|
||||
*/
|
||||
[Symbol.asyncDispose](): Promise<void>;
|
||||
}
|
||||
/**
|
||||
* Returns a disposable object whose `path` property holds the created directory
|
||||
* path. When the object is disposed, the directory and its contents will be
|
||||
* removed if it still exists. If the directory cannot be deleted, disposal will
|
||||
* throw an error. The object has a `remove()` method which will perform the same
|
||||
* task.
|
||||
*
|
||||
* <!-- TODO: link MDN docs for disposables once https://github.com/mdn/content/pull/38027 lands -->
|
||||
*
|
||||
* For detailed information, see the documentation of `fs.mkdtemp()`.
|
||||
*
|
||||
* There is no callback-based version of this API because it is designed for use
|
||||
* with the `using` syntax.
|
||||
*
|
||||
* The optional `options` argument can be a string specifying an encoding, or an
|
||||
* object with an `encoding` property specifying the character encoding to use.
|
||||
* @since v24.4.0
|
||||
*/
|
||||
export function mkdtempDisposableSync(prefix: string, options?: EncodingOption): DisposableTempDir;
|
||||
/**
|
||||
* Reads the contents of a directory. The callback gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`.
|
||||
*
|
||||
|
||||
22
node_modules/@types/node/fs/promises.d.ts
generated
vendored
22
node_modules/@types/node/fs/promises.d.ts
generated
vendored
@@ -20,6 +20,8 @@ declare module "fs/promises" {
|
||||
CopyOptions,
|
||||
Dir,
|
||||
Dirent,
|
||||
DisposableTempDir,
|
||||
EncodingOption,
|
||||
GlobOptions,
|
||||
GlobOptionsWithFileTypes,
|
||||
GlobOptionsWithoutFileTypes,
|
||||
@@ -961,6 +963,26 @@ declare module "fs/promises" {
|
||||
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
||||
*/
|
||||
function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
|
||||
/**
|
||||
* The resulting Promise holds an async-disposable object whose `path` property
|
||||
* holds the created directory path. When the object is disposed, the directory
|
||||
* and its contents will be removed asynchronously if it still exists. If the
|
||||
* directory cannot be deleted, disposal will throw an error. The object has an
|
||||
* async `remove()` method which will perform the same task.
|
||||
*
|
||||
* Both this function and the disposal function on the resulting object are
|
||||
* async, so it should be used with `await` + `await using` as in
|
||||
* `await using dir = await fsPromises.mkdtempDisposable('prefix')`.
|
||||
*
|
||||
* <!-- TODO: link MDN docs for disposables once https://github.com/mdn/content/pull/38027 lands -->
|
||||
*
|
||||
* For detailed information, see the documentation of `fsPromises.mkdtemp()`.
|
||||
*
|
||||
* The optional `options` argument can be a string specifying an encoding, or an
|
||||
* object with an `encoding` property specifying the character encoding to use.
|
||||
* @since v24.4.0
|
||||
*/
|
||||
function mkdtempDisposable(prefix: PathLike, options?: EncodingOption): Promise<DisposableTempDir>;
|
||||
/**
|
||||
* Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an
|
||||
* [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
|
||||
|
||||
525
node_modules/@types/node/globals.d.ts
generated
vendored
525
node_modules/@types/node/globals.d.ts
generated
vendored
@@ -1,367 +1,168 @@
|
||||
export {}; // Make this a module
|
||||
declare var global: typeof globalThis;
|
||||
|
||||
// #region Fetch and friends
|
||||
// Conditional type aliases, used at the end of this file.
|
||||
// Will either be empty if lib.dom (or lib.webworker) is included, or the undici version otherwise.
|
||||
type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request;
|
||||
type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response;
|
||||
type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData;
|
||||
type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers;
|
||||
type _MessageEvent = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").MessageEvent;
|
||||
type _RequestInit = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("undici-types").RequestInit;
|
||||
type _ResponseInit = typeof globalThis extends { onmessage: any } ? {}
|
||||
: import("undici-types").ResponseInit;
|
||||
type _WebSocket = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").WebSocket;
|
||||
type _EventSource = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").EventSource;
|
||||
type _CloseEvent = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").CloseEvent;
|
||||
// #endregion Fetch and friends
|
||||
|
||||
// Conditional type definitions for webstorage interface, which conflicts with lib.dom otherwise.
|
||||
type _Storage = typeof globalThis extends { onabort: any } ? {} : {
|
||||
readonly length: number;
|
||||
clear(): void;
|
||||
getItem(key: string): string | null;
|
||||
key(index: number): string | null;
|
||||
removeItem(key: string): void;
|
||||
setItem(key: string, value: string): void;
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
// #region DOMException
|
||||
type _DOMException = typeof globalThis extends { onmessage: any } ? {} : NodeDOMException;
|
||||
interface NodeDOMException extends Error {
|
||||
readonly code: number;
|
||||
readonly message: string;
|
||||
readonly name: string;
|
||||
readonly INDEX_SIZE_ERR: 1;
|
||||
readonly DOMSTRING_SIZE_ERR: 2;
|
||||
readonly HIERARCHY_REQUEST_ERR: 3;
|
||||
readonly WRONG_DOCUMENT_ERR: 4;
|
||||
readonly INVALID_CHARACTER_ERR: 5;
|
||||
readonly NO_DATA_ALLOWED_ERR: 6;
|
||||
readonly NO_MODIFICATION_ALLOWED_ERR: 7;
|
||||
readonly NOT_FOUND_ERR: 8;
|
||||
readonly NOT_SUPPORTED_ERR: 9;
|
||||
readonly INUSE_ATTRIBUTE_ERR: 10;
|
||||
readonly INVALID_STATE_ERR: 11;
|
||||
readonly SYNTAX_ERR: 12;
|
||||
readonly INVALID_MODIFICATION_ERR: 13;
|
||||
readonly NAMESPACE_ERR: 14;
|
||||
readonly INVALID_ACCESS_ERR: 15;
|
||||
readonly VALIDATION_ERR: 16;
|
||||
readonly TYPE_MISMATCH_ERR: 17;
|
||||
readonly SECURITY_ERR: 18;
|
||||
readonly NETWORK_ERR: 19;
|
||||
readonly ABORT_ERR: 20;
|
||||
readonly URL_MISMATCH_ERR: 21;
|
||||
readonly QUOTA_EXCEEDED_ERR: 22;
|
||||
readonly TIMEOUT_ERR: 23;
|
||||
readonly INVALID_NODE_TYPE_ERR: 24;
|
||||
readonly DATA_CLONE_ERR: 25;
|
||||
}
|
||||
interface NodeDOMExceptionConstructor {
|
||||
prototype: DOMException;
|
||||
new(message?: string, nameOrOptions?: string | { name?: string; cause?: unknown }): DOMException;
|
||||
readonly INDEX_SIZE_ERR: 1;
|
||||
readonly DOMSTRING_SIZE_ERR: 2;
|
||||
readonly HIERARCHY_REQUEST_ERR: 3;
|
||||
readonly WRONG_DOCUMENT_ERR: 4;
|
||||
readonly INVALID_CHARACTER_ERR: 5;
|
||||
readonly NO_DATA_ALLOWED_ERR: 6;
|
||||
readonly NO_MODIFICATION_ALLOWED_ERR: 7;
|
||||
readonly NOT_FOUND_ERR: 8;
|
||||
readonly NOT_SUPPORTED_ERR: 9;
|
||||
readonly INUSE_ATTRIBUTE_ERR: 10;
|
||||
readonly INVALID_STATE_ERR: 11;
|
||||
readonly SYNTAX_ERR: 12;
|
||||
readonly INVALID_MODIFICATION_ERR: 13;
|
||||
readonly NAMESPACE_ERR: 14;
|
||||
readonly INVALID_ACCESS_ERR: 15;
|
||||
readonly VALIDATION_ERR: 16;
|
||||
readonly TYPE_MISMATCH_ERR: 17;
|
||||
readonly SECURITY_ERR: 18;
|
||||
readonly NETWORK_ERR: 19;
|
||||
readonly ABORT_ERR: 20;
|
||||
readonly URL_MISMATCH_ERR: 21;
|
||||
readonly QUOTA_EXCEEDED_ERR: 22;
|
||||
readonly TIMEOUT_ERR: 23;
|
||||
readonly INVALID_NODE_TYPE_ERR: 24;
|
||||
readonly DATA_CLONE_ERR: 25;
|
||||
}
|
||||
// #endregion DOMException
|
||||
|
||||
declare global {
|
||||
var global: typeof globalThis;
|
||||
|
||||
var process: NodeJS.Process;
|
||||
var console: Console;
|
||||
|
||||
interface ErrorConstructor {
|
||||
/**
|
||||
* Creates a `.stack` property on `targetObject`, which when accessed returns
|
||||
* a string representing the location in the code at which
|
||||
* `Error.captureStackTrace()` was called.
|
||||
*
|
||||
* ```js
|
||||
* const myObject = {};
|
||||
* Error.captureStackTrace(myObject);
|
||||
* myObject.stack; // Similar to `new Error().stack`
|
||||
* ```
|
||||
*
|
||||
* The first line of the trace will be prefixed with
|
||||
* `${myObject.name}: ${myObject.message}`.
|
||||
*
|
||||
* The optional `constructorOpt` argument accepts a function. If given, all frames
|
||||
* above `constructorOpt`, including `constructorOpt`, will be omitted from the
|
||||
* generated stack trace.
|
||||
*
|
||||
* The `constructorOpt` argument is useful for hiding implementation
|
||||
* details of error generation from the user. For instance:
|
||||
*
|
||||
* ```js
|
||||
* function a() {
|
||||
* b();
|
||||
* }
|
||||
*
|
||||
* function b() {
|
||||
* c();
|
||||
* }
|
||||
*
|
||||
* function c() {
|
||||
* // Create an error without stack trace to avoid calculating the stack trace twice.
|
||||
* const { stackTraceLimit } = Error;
|
||||
* Error.stackTraceLimit = 0;
|
||||
* const error = new Error();
|
||||
* Error.stackTraceLimit = stackTraceLimit;
|
||||
*
|
||||
* // Capture the stack trace above function b
|
||||
* Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
|
||||
* throw error;
|
||||
* }
|
||||
*
|
||||
* a();
|
||||
* ```
|
||||
*/
|
||||
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
||||
/**
|
||||
* @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
||||
*/
|
||||
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
||||
/**
|
||||
* The `Error.stackTraceLimit` property specifies the number of stack frames
|
||||
* collected by a stack trace (whether generated by `new Error().stack` or
|
||||
* `Error.captureStackTrace(obj)`).
|
||||
*
|
||||
* The default value is `10` but may be set to any valid JavaScript number. Changes
|
||||
* will affect any stack trace captured _after_ the value has been changed.
|
||||
*
|
||||
* If set to a non-number value, or set to a negative number, stack traces will
|
||||
* not capture any frames.
|
||||
*/
|
||||
stackTraceLimit: number;
|
||||
}
|
||||
declare var process: NodeJS.Process;
|
||||
declare var console: Console;
|
||||
|
||||
interface ErrorConstructor {
|
||||
/**
|
||||
* Enable this API with the `--expose-gc` CLI flag.
|
||||
* Creates a `.stack` property on `targetObject`, which when accessed returns
|
||||
* a string representing the location in the code at which
|
||||
* `Error.captureStackTrace()` was called.
|
||||
*
|
||||
* ```js
|
||||
* const myObject = {};
|
||||
* Error.captureStackTrace(myObject);
|
||||
* myObject.stack; // Similar to `new Error().stack`
|
||||
* ```
|
||||
*
|
||||
* The first line of the trace will be prefixed with
|
||||
* `${myObject.name}: ${myObject.message}`.
|
||||
*
|
||||
* The optional `constructorOpt` argument accepts a function. If given, all frames
|
||||
* above `constructorOpt`, including `constructorOpt`, will be omitted from the
|
||||
* generated stack trace.
|
||||
*
|
||||
* The `constructorOpt` argument is useful for hiding implementation
|
||||
* details of error generation from the user. For instance:
|
||||
*
|
||||
* ```js
|
||||
* function a() {
|
||||
* b();
|
||||
* }
|
||||
*
|
||||
* function b() {
|
||||
* c();
|
||||
* }
|
||||
*
|
||||
* function c() {
|
||||
* // Create an error without stack trace to avoid calculating the stack trace twice.
|
||||
* const { stackTraceLimit } = Error;
|
||||
* Error.stackTraceLimit = 0;
|
||||
* const error = new Error();
|
||||
* Error.stackTraceLimit = stackTraceLimit;
|
||||
*
|
||||
* // Capture the stack trace above function b
|
||||
* Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
|
||||
* throw error;
|
||||
* }
|
||||
*
|
||||
* a();
|
||||
* ```
|
||||
*/
|
||||
var gc: NodeJS.GCFunction | undefined;
|
||||
|
||||
namespace NodeJS {
|
||||
interface CallSite {
|
||||
getColumnNumber(): number | null;
|
||||
getEnclosingColumnNumber(): number | null;
|
||||
getEnclosingLineNumber(): number | null;
|
||||
getEvalOrigin(): string | undefined;
|
||||
getFileName(): string | null;
|
||||
getFunction(): Function | undefined;
|
||||
getFunctionName(): string | null;
|
||||
getLineNumber(): number | null;
|
||||
getMethodName(): string | null;
|
||||
getPosition(): number;
|
||||
getPromiseIndex(): number | null;
|
||||
getScriptHash(): string;
|
||||
getScriptNameOrSourceURL(): string | null;
|
||||
getThis(): unknown;
|
||||
getTypeName(): string | null;
|
||||
isAsync(): boolean;
|
||||
isConstructor(): boolean;
|
||||
isEval(): boolean;
|
||||
isNative(): boolean;
|
||||
isPromiseAll(): boolean;
|
||||
isToplevel(): boolean;
|
||||
}
|
||||
|
||||
interface ErrnoException extends Error {
|
||||
errno?: number | undefined;
|
||||
code?: string | undefined;
|
||||
path?: string | undefined;
|
||||
syscall?: string | undefined;
|
||||
}
|
||||
|
||||
interface ReadableStream extends EventEmitter {
|
||||
readable: boolean;
|
||||
read(size?: number): string | Buffer;
|
||||
setEncoding(encoding: BufferEncoding): this;
|
||||
pause(): this;
|
||||
resume(): this;
|
||||
isPaused(): boolean;
|
||||
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
|
||||
unpipe(destination?: WritableStream): this;
|
||||
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
|
||||
wrap(oldStream: ReadableStream): this;
|
||||
[Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
|
||||
}
|
||||
|
||||
interface WritableStream extends EventEmitter {
|
||||
writable: boolean;
|
||||
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
||||
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
||||
end(cb?: () => void): this;
|
||||
end(data: string | Uint8Array, cb?: () => void): this;
|
||||
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
||||
}
|
||||
|
||||
interface ReadWriteStream extends ReadableStream, WritableStream {}
|
||||
|
||||
interface RefCounted {
|
||||
ref(): this;
|
||||
unref(): this;
|
||||
}
|
||||
|
||||
interface Dict<T> {
|
||||
[key: string]: T | undefined;
|
||||
}
|
||||
|
||||
interface ReadOnlyDict<T> {
|
||||
readonly [key: string]: T | undefined;
|
||||
}
|
||||
|
||||
interface GCFunction {
|
||||
(minor?: boolean): void;
|
||||
(options: NodeJS.GCOptions & { execution: "async" }): Promise<void>;
|
||||
(options: NodeJS.GCOptions): void;
|
||||
}
|
||||
|
||||
interface GCOptions {
|
||||
execution?: "sync" | "async" | undefined;
|
||||
flavor?: "regular" | "last-resort" | undefined;
|
||||
type?: "major-snapshot" | "major" | "minor" | undefined;
|
||||
filename?: string | undefined;
|
||||
}
|
||||
|
||||
/** An iterable iterator returned by the Node.js API. */
|
||||
interface Iterator<T, TReturn = undefined, TNext = any> extends IteratorObject<T, TReturn, TNext> {
|
||||
[Symbol.iterator](): NodeJS.Iterator<T, TReturn, TNext>;
|
||||
}
|
||||
|
||||
/** An async iterable iterator returned by the Node.js API. */
|
||||
interface AsyncIterator<T, TReturn = undefined, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
|
||||
[Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;
|
||||
}
|
||||
}
|
||||
|
||||
// Global DOM types
|
||||
|
||||
interface DOMException extends _DOMException {}
|
||||
var DOMException: typeof globalThis extends { onmessage: any; DOMException: infer T } ? T
|
||||
: NodeDOMExceptionConstructor;
|
||||
|
||||
// #region AbortController
|
||||
interface AbortController {
|
||||
readonly signal: AbortSignal;
|
||||
abort(reason?: any): void;
|
||||
}
|
||||
var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T
|
||||
: {
|
||||
prototype: AbortController;
|
||||
new(): AbortController;
|
||||
};
|
||||
|
||||
interface AbortSignal extends EventTarget {
|
||||
readonly aborted: boolean;
|
||||
onabort: ((this: AbortSignal, ev: Event) => any) | null;
|
||||
readonly reason: any;
|
||||
throwIfAborted(): void;
|
||||
}
|
||||
var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T
|
||||
: {
|
||||
prototype: AbortSignal;
|
||||
new(): AbortSignal;
|
||||
abort(reason?: any): AbortSignal;
|
||||
any(signals: AbortSignal[]): AbortSignal;
|
||||
timeout(milliseconds: number): AbortSignal;
|
||||
};
|
||||
// #endregion AbortController
|
||||
|
||||
// #region Storage
|
||||
interface Storage extends _Storage {}
|
||||
// Conditional on `onabort` rather than `onmessage`, in order to exclude lib.webworker
|
||||
var Storage: typeof globalThis extends { onabort: any; Storage: infer T } ? T
|
||||
: {
|
||||
prototype: Storage;
|
||||
new(): Storage;
|
||||
};
|
||||
|
||||
var localStorage: Storage;
|
||||
var sessionStorage: Storage;
|
||||
// #endregion Storage
|
||||
|
||||
// #region fetch
|
||||
interface RequestInit extends _RequestInit {}
|
||||
|
||||
function fetch(
|
||||
input: string | URL | globalThis.Request,
|
||||
init?: RequestInit,
|
||||
): Promise<Response>;
|
||||
|
||||
interface Request extends _Request {}
|
||||
var Request: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
Request: infer T;
|
||||
} ? T
|
||||
: typeof import("undici-types").Request;
|
||||
|
||||
interface ResponseInit extends _ResponseInit {}
|
||||
|
||||
interface Response extends _Response {}
|
||||
var Response: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
Response: infer T;
|
||||
} ? T
|
||||
: typeof import("undici-types").Response;
|
||||
|
||||
interface FormData extends _FormData {}
|
||||
var FormData: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
FormData: infer T;
|
||||
} ? T
|
||||
: typeof import("undici-types").FormData;
|
||||
|
||||
interface Headers extends _Headers {}
|
||||
var Headers: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
Headers: infer T;
|
||||
} ? T
|
||||
: typeof import("undici-types").Headers;
|
||||
|
||||
interface MessageEvent extends _MessageEvent {}
|
||||
var MessageEvent: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
MessageEvent: infer T;
|
||||
} ? T
|
||||
: typeof import("undici-types").MessageEvent;
|
||||
|
||||
interface WebSocket extends _WebSocket {}
|
||||
var WebSocket: typeof globalThis extends { onmessage: any; WebSocket: infer T } ? T
|
||||
: typeof import("undici-types").WebSocket;
|
||||
|
||||
interface EventSource extends _EventSource {}
|
||||
var EventSource: typeof globalThis extends { onmessage: any; EventSource: infer T } ? T
|
||||
: typeof import("undici-types").EventSource;
|
||||
|
||||
interface CloseEvent extends _CloseEvent {}
|
||||
var CloseEvent: typeof globalThis extends { onmessage: any; CloseEvent: infer T } ? T
|
||||
: typeof import("undici-types").CloseEvent;
|
||||
// #endregion fetch
|
||||
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
||||
/**
|
||||
* @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
||||
*/
|
||||
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
||||
/**
|
||||
* The `Error.stackTraceLimit` property specifies the number of stack frames
|
||||
* collected by a stack trace (whether generated by `new Error().stack` or
|
||||
* `Error.captureStackTrace(obj)`).
|
||||
*
|
||||
* The default value is `10` but may be set to any valid JavaScript number. Changes
|
||||
* will affect any stack trace captured _after_ the value has been changed.
|
||||
*
|
||||
* If set to a non-number value, or set to a negative number, stack traces will
|
||||
* not capture any frames.
|
||||
*/
|
||||
stackTraceLimit: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable this API with the `--expose-gc` CLI flag.
|
||||
*/
|
||||
declare var gc: NodeJS.GCFunction | undefined;
|
||||
|
||||
declare namespace NodeJS {
|
||||
interface CallSite {
|
||||
getColumnNumber(): number | null;
|
||||
getEnclosingColumnNumber(): number | null;
|
||||
getEnclosingLineNumber(): number | null;
|
||||
getEvalOrigin(): string | undefined;
|
||||
getFileName(): string | null;
|
||||
getFunction(): Function | undefined;
|
||||
getFunctionName(): string | null;
|
||||
getLineNumber(): number | null;
|
||||
getMethodName(): string | null;
|
||||
getPosition(): number;
|
||||
getPromiseIndex(): number | null;
|
||||
getScriptHash(): string;
|
||||
getScriptNameOrSourceURL(): string | null;
|
||||
getThis(): unknown;
|
||||
getTypeName(): string | null;
|
||||
isAsync(): boolean;
|
||||
isConstructor(): boolean;
|
||||
isEval(): boolean;
|
||||
isNative(): boolean;
|
||||
isPromiseAll(): boolean;
|
||||
isToplevel(): boolean;
|
||||
}
|
||||
|
||||
interface ErrnoException extends Error {
|
||||
errno?: number | undefined;
|
||||
code?: string | undefined;
|
||||
path?: string | undefined;
|
||||
syscall?: string | undefined;
|
||||
}
|
||||
|
||||
interface ReadableStream extends EventEmitter {
|
||||
readable: boolean;
|
||||
read(size?: number): string | Buffer;
|
||||
setEncoding(encoding: BufferEncoding): this;
|
||||
pause(): this;
|
||||
resume(): this;
|
||||
isPaused(): boolean;
|
||||
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
|
||||
unpipe(destination?: WritableStream): this;
|
||||
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
|
||||
wrap(oldStream: ReadableStream): this;
|
||||
[Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
|
||||
}
|
||||
|
||||
interface WritableStream extends EventEmitter {
|
||||
writable: boolean;
|
||||
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
||||
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
||||
end(cb?: () => void): this;
|
||||
end(data: string | Uint8Array, cb?: () => void): this;
|
||||
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
||||
}
|
||||
|
||||
interface ReadWriteStream extends ReadableStream, WritableStream {}
|
||||
|
||||
interface RefCounted {
|
||||
ref(): this;
|
||||
unref(): this;
|
||||
}
|
||||
|
||||
interface Dict<T> {
|
||||
[key: string]: T | undefined;
|
||||
}
|
||||
|
||||
interface ReadOnlyDict<T> {
|
||||
readonly [key: string]: T | undefined;
|
||||
}
|
||||
|
||||
interface GCFunction {
|
||||
(minor?: boolean): void;
|
||||
(options: NodeJS.GCOptions & { execution: "async" }): Promise<void>;
|
||||
(options: NodeJS.GCOptions): void;
|
||||
}
|
||||
|
||||
interface GCOptions {
|
||||
execution?: "sync" | "async" | undefined;
|
||||
flavor?: "regular" | "last-resort" | undefined;
|
||||
type?: "major-snapshot" | "major" | "minor" | undefined;
|
||||
filename?: string | undefined;
|
||||
}
|
||||
|
||||
/** An iterable iterator returned by the Node.js API. */
|
||||
interface Iterator<T, TReturn = undefined, TNext = any> extends IteratorObject<T, TReturn, TNext> {
|
||||
[Symbol.iterator](): NodeJS.Iterator<T, TReturn, TNext>;
|
||||
}
|
||||
|
||||
/** An async iterable iterator returned by the Node.js API. */
|
||||
interface AsyncIterator<T, TReturn = undefined, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
|
||||
[Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;
|
||||
}
|
||||
}
|
||||
|
||||
34
node_modules/@types/node/http.d.ts
generated
vendored
34
node_modules/@types/node/http.d.ts
generated
vendored
@@ -1419,6 +1419,14 @@ declare module "http" {
|
||||
*/
|
||||
destroy(error?: Error): this;
|
||||
}
|
||||
interface ProxyEnv extends NodeJS.ProcessEnv {
|
||||
HTTP_PROXY?: string | undefined;
|
||||
HTTPS_PROXY?: string | undefined;
|
||||
NO_PROXY?: string | undefined;
|
||||
http_proxy?: string | undefined;
|
||||
https_proxy?: string | undefined;
|
||||
no_proxy?: string | undefined;
|
||||
}
|
||||
interface AgentOptions extends Partial<TcpSocketConnectOpts> {
|
||||
/**
|
||||
* Keep sockets around in a pool to be used by other requests in the future. Default = false
|
||||
@@ -1450,6 +1458,22 @@ declare module "http" {
|
||||
* @default `lifo`
|
||||
*/
|
||||
scheduling?: "fifo" | "lifo" | undefined;
|
||||
/**
|
||||
* Environment variables for proxy configuration. See
|
||||
* [Built-in Proxy Support](https://nodejs.org/docs/latest-v24.x/api/http.html#built-in-proxy-support) for details.
|
||||
* @since v24.5.0
|
||||
*/
|
||||
proxyEnv?: ProxyEnv | undefined;
|
||||
/**
|
||||
* Default port to use when the port is not specified in requests.
|
||||
* @since v24.5.0
|
||||
*/
|
||||
defaultPort?: number | undefined;
|
||||
/**
|
||||
* The protocol to use for the agent.
|
||||
* @since v24.5.0
|
||||
*/
|
||||
protocol?: string | undefined;
|
||||
}
|
||||
/**
|
||||
* An `Agent` is responsible for managing connection persistence
|
||||
@@ -1591,7 +1615,7 @@ declare module "http" {
|
||||
createConnection(
|
||||
options: ClientRequestArgs,
|
||||
callback?: (err: Error | null, stream: stream.Duplex) => void,
|
||||
): stream.Duplex;
|
||||
): stream.Duplex | null | undefined;
|
||||
/**
|
||||
* Called when `socket` is detached from a request and could be persisted by the`Agent`. Default behavior is to:
|
||||
*
|
||||
@@ -2028,18 +2052,18 @@ declare module "http" {
|
||||
*/
|
||||
const maxHeaderSize: number;
|
||||
/**
|
||||
* A browser-compatible implementation of [WebSocket](https://nodejs.org/docs/latest/api/http.html#websocket).
|
||||
* A browser-compatible implementation of `WebSocket`.
|
||||
* @since v22.5.0
|
||||
*/
|
||||
const WebSocket: import("undici-types").WebSocket;
|
||||
const WebSocket: typeof import("undici-types").WebSocket;
|
||||
/**
|
||||
* @since v22.5.0
|
||||
*/
|
||||
const CloseEvent: import("undici-types").CloseEvent;
|
||||
const CloseEvent: typeof import("undici-types").CloseEvent;
|
||||
/**
|
||||
* @since v22.5.0
|
||||
*/
|
||||
const MessageEvent: import("undici-types").MessageEvent;
|
||||
const MessageEvent: typeof import("undici-types").MessageEvent;
|
||||
}
|
||||
declare module "node:http" {
|
||||
export * from "http";
|
||||
|
||||
5
node_modules/@types/node/https.d.ts
generated
vendored
5
node_modules/@types/node/https.d.ts
generated
vendored
@@ -32,6 +32,11 @@ declare module "https" {
|
||||
class Agent extends http.Agent {
|
||||
constructor(options?: AgentOptions);
|
||||
options: AgentOptions;
|
||||
createConnection(
|
||||
options: RequestOptions,
|
||||
callback?: (err: Error | null, stream: Duplex) => void,
|
||||
): Duplex | null | undefined;
|
||||
getName(options?: RequestOptions): string;
|
||||
}
|
||||
interface Server<
|
||||
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
||||
|
||||
9
node_modules/@types/node/index.d.ts
generated
vendored
9
node_modules/@types/node/index.d.ts
generated
vendored
@@ -38,6 +38,12 @@
|
||||
|
||||
// Definitions for Node.js modules that are not specific to any version of TypeScript:
|
||||
/// <reference path="globals.d.ts" />
|
||||
/// <reference path="web-globals/abortcontroller.d.ts" />
|
||||
/// <reference path="web-globals/domexception.d.ts" />
|
||||
/// <reference path="web-globals/events.d.ts" />
|
||||
/// <reference path="web-globals/fetch.d.ts" />
|
||||
/// <reference path="web-globals/navigator.d.ts" />
|
||||
/// <reference path="web-globals/storage.d.ts" />
|
||||
/// <reference path="assert.d.ts" />
|
||||
/// <reference path="assert/strict.d.ts" />
|
||||
/// <reference path="async_hooks.d.ts" />
|
||||
@@ -51,9 +57,7 @@
|
||||
/// <reference path="diagnostics_channel.d.ts" />
|
||||
/// <reference path="dns.d.ts" />
|
||||
/// <reference path="dns/promises.d.ts" />
|
||||
/// <reference path="dns/promises.d.ts" />
|
||||
/// <reference path="domain.d.ts" />
|
||||
/// <reference path="dom-events.d.ts" />
|
||||
/// <reference path="events.d.ts" />
|
||||
/// <reference path="fs.d.ts" />
|
||||
/// <reference path="fs/promises.d.ts" />
|
||||
@@ -61,6 +65,7 @@
|
||||
/// <reference path="http2.d.ts" />
|
||||
/// <reference path="https.d.ts" />
|
||||
/// <reference path="inspector.d.ts" />
|
||||
/// <reference path="inspector.generated.d.ts" />
|
||||
/// <reference path="module.d.ts" />
|
||||
/// <reference path="net.d.ts" />
|
||||
/// <reference path="os.d.ts" />
|
||||
|
||||
4050
node_modules/@types/node/inspector.d.ts
generated
vendored
4050
node_modules/@types/node/inspector.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
4052
node_modules/@types/node/inspector.generated.d.ts
generated
vendored
Normal file
4052
node_modules/@types/node/inspector.generated.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@types/node/module.d.ts
generated
vendored
1
node_modules/@types/node/module.d.ts
generated
vendored
@@ -359,6 +359,7 @@ declare module "module" {
|
||||
interface ImportAttributes extends NodeJS.Dict<string> {
|
||||
type?: string | undefined;
|
||||
}
|
||||
type ImportPhase = "source" | "evaluation";
|
||||
type ModuleFormat =
|
||||
| "addon"
|
||||
| "builtin"
|
||||
|
||||
21
node_modules/@types/node/net.d.ts
generated
vendored
21
node_modules/@types/node/net.d.ts
generated
vendored
@@ -805,6 +805,27 @@ declare module "net" {
|
||||
* @param value Any JS value
|
||||
*/
|
||||
static isBlockList(value: unknown): value is BlockList;
|
||||
/**
|
||||
* ```js
|
||||
* const blockList = new net.BlockList();
|
||||
* const data = [
|
||||
* 'Subnet: IPv4 192.168.1.0/24',
|
||||
* 'Address: IPv4 10.0.0.5',
|
||||
* 'Range: IPv4 192.168.2.1-192.168.2.10',
|
||||
* 'Range: IPv4 10.0.0.1-10.0.0.10',
|
||||
* ];
|
||||
* blockList.fromJSON(data);
|
||||
* blockList.fromJSON(JSON.stringify(data));
|
||||
* ```
|
||||
* @since v24.5.0
|
||||
* @experimental
|
||||
*/
|
||||
fromJSON(data: string | readonly string[]): void;
|
||||
/**
|
||||
* @since v24.5.0
|
||||
* @experimental
|
||||
*/
|
||||
toJSON(): readonly string[];
|
||||
}
|
||||
interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
|
||||
timeout?: number | undefined;
|
||||
|
||||
6
node_modules/@types/node/package.json
generated
vendored
6
node_modules/@types/node/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@types/node",
|
||||
"version": "24.3.0",
|
||||
"version": "24.5.2",
|
||||
"description": "TypeScript definitions for node",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
||||
"license": "MIT",
|
||||
@@ -147,9 +147,9 @@
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"undici-types": "~7.10.0"
|
||||
"undici-types": "~7.12.0"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "1db0510763ba3afd8e54c0591e60a100a7b90926f5d7da28ae32d8f845d725da",
|
||||
"typesPublisherContentHash": "5df6870a3de1de1f3716802276fe0c64c2b3a2903d725578b50f533f42cfea46",
|
||||
"typeScriptVersion": "5.2"
|
||||
}
|
||||
34
node_modules/@types/node/sqlite.d.ts
generated
vendored
34
node_modules/@types/node/sqlite.d.ts
generated
vendored
@@ -97,6 +97,33 @@ declare module "node:sqlite" {
|
||||
* @default 0
|
||||
*/
|
||||
timeout?: number | undefined;
|
||||
/**
|
||||
* If `true`, integer fields are read as JavaScript `BigInt` values. If `false`,
|
||||
* integer fields are read as JavaScript numbers.
|
||||
* @since v24.4.0
|
||||
* @default false
|
||||
*/
|
||||
readBigInts?: boolean | undefined;
|
||||
/**
|
||||
* If `true`, query results are returned as arrays instead of objects.
|
||||
* @since v24.4.0
|
||||
* @default false
|
||||
*/
|
||||
returnArrays?: boolean | undefined;
|
||||
/**
|
||||
* If `true`, allows binding named parameters without the prefix
|
||||
* character (e.g., `foo` instead of `:foo`).
|
||||
* @since v24.4.40
|
||||
* @default true
|
||||
*/
|
||||
allowBareNamedParameters?: boolean | undefined;
|
||||
/**
|
||||
* If `true`, unknown named parameters are ignored when binding.
|
||||
* If `false`, an exception is thrown for unknown named parameters.
|
||||
* @since v24.4.40
|
||||
* @default false
|
||||
*/
|
||||
allowUnknownNamedParameters?: boolean | undefined;
|
||||
}
|
||||
interface CreateSessionOptions {
|
||||
/**
|
||||
@@ -566,6 +593,13 @@ declare module "node:sqlite" {
|
||||
* @param enabled Enables or disables support for unknown named parameters.
|
||||
*/
|
||||
setAllowUnknownNamedParameters(enabled: boolean): void;
|
||||
/**
|
||||
* When enabled, query results returned by the `all()`, `get()`, and `iterate()` methods will be returned as arrays instead
|
||||
* of objects.
|
||||
* @since v24.0.0
|
||||
* @param enabled Enables or disables the return of query results as arrays.
|
||||
*/
|
||||
setReturnArrays(enabled: boolean): void;
|
||||
/**
|
||||
* When reading from the database, SQLite `INTEGER`s are mapped to JavaScript
|
||||
* numbers by default. However, SQLite `INTEGER`s can store values larger than
|
||||
|
||||
32
node_modules/@types/node/tls.d.ts
generated
vendored
32
node_modules/@types/node/tls.d.ts
generated
vendored
@@ -1162,6 +1162,38 @@ declare module "tls" {
|
||||
* @since v0.10.2
|
||||
*/
|
||||
function getCiphers(): string[];
|
||||
/**
|
||||
* Sets the default CA certificates used by Node.js TLS clients. If the provided
|
||||
* certificates are parsed successfully, they will become the default CA
|
||||
* certificate list returned by {@link getCACertificates} and used
|
||||
* by subsequent TLS connections that don't specify their own CA certificates.
|
||||
* The certificates will be deduplicated before being set as the default.
|
||||
*
|
||||
* This function only affects the current Node.js thread. Previous
|
||||
* sessions cached by the HTTPS agent won't be affected by this change, so
|
||||
* this method should be called before any unwanted cachable TLS connections are
|
||||
* made.
|
||||
*
|
||||
* To use system CA certificates as the default:
|
||||
*
|
||||
* ```js
|
||||
* import tls from 'node:tls';
|
||||
* tls.setDefaultCACertificates(tls.getCACertificates('system'));
|
||||
* ```
|
||||
*
|
||||
* This function completely replaces the default CA certificate list. To add additional
|
||||
* certificates to the existing defaults, get the current certificates and append to them:
|
||||
*
|
||||
* ```js
|
||||
* import tls from 'node:tls';
|
||||
* const currentCerts = tls.getCACertificates('default');
|
||||
* const additionalCerts = ['-----BEGIN CERTIFICATE-----\n...'];
|
||||
* tls.setDefaultCACertificates([...currentCerts, ...additionalCerts]);
|
||||
* ```
|
||||
* @since v24.5.0
|
||||
* @param certs An array of CA certificates in PEM format.
|
||||
*/
|
||||
function setDefaultCACertificates(certs: ReadonlyArray<string | NodeJS.ArrayBufferView>): void;
|
||||
/**
|
||||
* The default curve name to use for ECDH key agreement in a tls server.
|
||||
* The default value is `'auto'`. See `{@link createSecureContext()}` for further
|
||||
|
||||
9
node_modules/@types/node/ts5.6/index.d.ts
generated
vendored
9
node_modules/@types/node/ts5.6/index.d.ts
generated
vendored
@@ -40,6 +40,12 @@
|
||||
|
||||
// Definitions for Node.js modules that are not specific to any version of TypeScript:
|
||||
/// <reference path="../globals.d.ts" />
|
||||
/// <reference path="../web-globals/abortcontroller.d.ts" />
|
||||
/// <reference path="../web-globals/domexception.d.ts" />
|
||||
/// <reference path="../web-globals/events.d.ts" />
|
||||
/// <reference path="../web-globals/fetch.d.ts" />
|
||||
/// <reference path="../web-globals/navigator.d.ts" />
|
||||
/// <reference path="../web-globals/storage.d.ts" />
|
||||
/// <reference path="../assert.d.ts" />
|
||||
/// <reference path="../assert/strict.d.ts" />
|
||||
/// <reference path="../async_hooks.d.ts" />
|
||||
@@ -53,9 +59,7 @@
|
||||
/// <reference path="../diagnostics_channel.d.ts" />
|
||||
/// <reference path="../dns.d.ts" />
|
||||
/// <reference path="../dns/promises.d.ts" />
|
||||
/// <reference path="../dns/promises.d.ts" />
|
||||
/// <reference path="../domain.d.ts" />
|
||||
/// <reference path="../dom-events.d.ts" />
|
||||
/// <reference path="../events.d.ts" />
|
||||
/// <reference path="../fs.d.ts" />
|
||||
/// <reference path="../fs/promises.d.ts" />
|
||||
@@ -63,6 +67,7 @@
|
||||
/// <reference path="../http2.d.ts" />
|
||||
/// <reference path="../https.d.ts" />
|
||||
/// <reference path="../inspector.d.ts" />
|
||||
/// <reference path="../inspector.generated.d.ts" />
|
||||
/// <reference path="../module.d.ts" />
|
||||
/// <reference path="../net.d.ts" />
|
||||
/// <reference path="../os.d.ts" />
|
||||
|
||||
9
node_modules/@types/node/ts5.7/index.d.ts
generated
vendored
9
node_modules/@types/node/ts5.7/index.d.ts
generated
vendored
@@ -40,6 +40,12 @@
|
||||
|
||||
// Definitions for Node.js modules that are not specific to any version of TypeScript:
|
||||
/// <reference path="../globals.d.ts" />
|
||||
/// <reference path="../web-globals/abortcontroller.d.ts" />
|
||||
/// <reference path="../web-globals/domexception.d.ts" />
|
||||
/// <reference path="../web-globals/events.d.ts" />
|
||||
/// <reference path="../web-globals/fetch.d.ts" />
|
||||
/// <reference path="../web-globals/navigator.d.ts" />
|
||||
/// <reference path="../web-globals/storage.d.ts" />
|
||||
/// <reference path="../assert.d.ts" />
|
||||
/// <reference path="../assert/strict.d.ts" />
|
||||
/// <reference path="../async_hooks.d.ts" />
|
||||
@@ -53,9 +59,7 @@
|
||||
/// <reference path="../diagnostics_channel.d.ts" />
|
||||
/// <reference path="../dns.d.ts" />
|
||||
/// <reference path="../dns/promises.d.ts" />
|
||||
/// <reference path="../dns/promises.d.ts" />
|
||||
/// <reference path="../domain.d.ts" />
|
||||
/// <reference path="../dom-events.d.ts" />
|
||||
/// <reference path="../events.d.ts" />
|
||||
/// <reference path="../fs.d.ts" />
|
||||
/// <reference path="../fs/promises.d.ts" />
|
||||
@@ -63,6 +67,7 @@
|
||||
/// <reference path="../http2.d.ts" />
|
||||
/// <reference path="../https.d.ts" />
|
||||
/// <reference path="../inspector.d.ts" />
|
||||
/// <reference path="../inspector.generated.d.ts" />
|
||||
/// <reference path="../module.d.ts" />
|
||||
/// <reference path="../net.d.ts" />
|
||||
/// <reference path="../os.d.ts" />
|
||||
|
||||
13
node_modules/@types/node/url.d.ts
generated
vendored
13
node_modules/@types/node/url.d.ts
generated
vendored
@@ -455,12 +455,15 @@ declare module "url" {
|
||||
*/
|
||||
static canParse(input: string, base?: string): boolean;
|
||||
/**
|
||||
* Parses a string as a URL. If `base` is provided, it will be used as the base URL for the purpose of resolving non-absolute `input` URLs.
|
||||
* Returns `null` if `input` is not a valid.
|
||||
* @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
|
||||
* `converted to a string` first.
|
||||
* @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
|
||||
* Parses a string as a URL. If `base` is provided, it will be used as the base
|
||||
* URL for the purpose of resolving non-absolute `input` URLs. Returns `null`
|
||||
* if the parameters can't be resolved to a valid URL.
|
||||
* @since v22.1.0
|
||||
* @param input The absolute or relative input URL to parse. If `input`
|
||||
* is relative, then `base` is required. If `input` is absolute, the `base`
|
||||
* is ignored. If `input` is not a string, it is [converted to a string](https://tc39.es/ecma262/#sec-tostring) first.
|
||||
* @param base The base URL to resolve against if the `input` is not
|
||||
* absolute. If `base` is not a string, it is [converted to a string](https://tc39.es/ecma262/#sec-tostring) first.
|
||||
*/
|
||||
static parse(input: string, base?: string): URL | null;
|
||||
constructor(input: string | { toString: () => string }, base?: string | URL);
|
||||
|
||||
10
node_modules/@types/node/util.d.ts
generated
vendored
10
node_modules/@types/node/util.d.ts
generated
vendored
@@ -1420,10 +1420,12 @@ declare module "util" {
|
||||
*/
|
||||
short?: string | undefined;
|
||||
/**
|
||||
* The default value to
|
||||
* be used if (and only if) the option does not appear in the arguments to be
|
||||
* parsed. It must be of the same type as the `type` property. When `multiple`
|
||||
* is `true`, it must be an array.
|
||||
* The value to assign to
|
||||
* the option if it does not appear in the arguments to be parsed. The value
|
||||
* must match the type specified by the `type` property. If `multiple` is
|
||||
* `true`, it must be an array. No default value is applied when the option
|
||||
* does appear in the arguments to be parsed, even if the provided value
|
||||
* is falsy.
|
||||
* @since v18.11.0
|
||||
*/
|
||||
default?: string | boolean | string[] | boolean[] | undefined;
|
||||
|
||||
83
node_modules/@types/node/vm.d.ts
generated
vendored
83
node_modules/@types/node/vm.d.ts
generated
vendored
@@ -37,7 +37,7 @@
|
||||
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/vm.js)
|
||||
*/
|
||||
declare module "vm" {
|
||||
import { ImportAttributes } from "node:module";
|
||||
import { ImportAttributes, ImportPhase } from "node:module";
|
||||
interface Context extends NodeJS.Dict<any> {}
|
||||
interface BaseOptions {
|
||||
/**
|
||||
@@ -60,7 +60,7 @@ declare module "vm" {
|
||||
specifier: string,
|
||||
referrer: T,
|
||||
importAttributes: ImportAttributes,
|
||||
phase: "source" | "evaluation",
|
||||
phase: ImportPhase,
|
||||
) => Module | Promise<Module>;
|
||||
interface ScriptOptions extends BaseOptions {
|
||||
/**
|
||||
@@ -791,14 +791,6 @@ declare module "vm" {
|
||||
* @experimental
|
||||
*/
|
||||
class Module {
|
||||
/**
|
||||
* The specifiers of all dependencies of this module. The returned array is frozen
|
||||
* to disallow any changes to it.
|
||||
*
|
||||
* Corresponds to the `[[RequestedModules]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
|
||||
* the ECMAScript specification.
|
||||
*/
|
||||
dependencySpecifiers: readonly string[];
|
||||
/**
|
||||
* If the `module.status` is `'errored'`, this property contains the exception
|
||||
* thrown by the module during evaluation. If the status is anything else,
|
||||
@@ -918,6 +910,25 @@ declare module "vm" {
|
||||
*/
|
||||
importModuleDynamically?: DynamicModuleLoader<SourceTextModule> | undefined;
|
||||
}
|
||||
/**
|
||||
* A `ModuleRequest` represents the request to import a module with given import attributes and phase.
|
||||
* @since 24.4.0
|
||||
*/
|
||||
interface ModuleRequest {
|
||||
/**
|
||||
* The specifier of the requested module.
|
||||
*/
|
||||
specifier: string;
|
||||
/**
|
||||
* The `"with"` value passed to the `WithClause` in a `ImportDeclaration`, or an empty object if no value was
|
||||
* provided.
|
||||
*/
|
||||
attributes: ImportAttributes;
|
||||
/**
|
||||
* The phase of the requested module (`"source"` or `"evaluation"`).
|
||||
*/
|
||||
phase: ImportPhase;
|
||||
}
|
||||
/**
|
||||
* This feature is only available with the `--experimental-vm-modules` command
|
||||
* flag enabled.
|
||||
@@ -933,6 +944,58 @@ declare module "vm" {
|
||||
* @param code JavaScript Module code to parse
|
||||
*/
|
||||
constructor(code: string, options?: SourceTextModuleOptions);
|
||||
/**
|
||||
* @deprecated Use `sourceTextModule.moduleRequests` instead.
|
||||
*/
|
||||
readonly dependencySpecifiers: readonly string[];
|
||||
/**
|
||||
* The requested import dependencies of this module. The returned array is frozen
|
||||
* to disallow any changes to it.
|
||||
*
|
||||
* For example, given a source text:
|
||||
*
|
||||
* ```js
|
||||
* import foo from 'foo';
|
||||
* import fooAlias from 'foo';
|
||||
* import bar from './bar.js';
|
||||
* import withAttrs from '../with-attrs.ts' with { arbitraryAttr: 'attr-val' };
|
||||
* import source Module from 'wasm-mod.wasm';
|
||||
* ```
|
||||
*
|
||||
* The value of the `sourceTextModule.moduleRequests` will be:
|
||||
*
|
||||
* ```js
|
||||
* [
|
||||
* {
|
||||
* specifier: 'foo',
|
||||
* attributes: {},
|
||||
* phase: 'evaluation',
|
||||
* },
|
||||
* {
|
||||
* specifier: 'foo',
|
||||
* attributes: {},
|
||||
* phase: 'evaluation',
|
||||
* },
|
||||
* {
|
||||
* specifier: './bar.js',
|
||||
* attributes: {},
|
||||
* phase: 'evaluation',
|
||||
* },
|
||||
* {
|
||||
* specifier: '../with-attrs.ts',
|
||||
* attributes: { arbitraryAttr: 'attr-val' },
|
||||
* phase: 'evaluation',
|
||||
* },
|
||||
* {
|
||||
* specifier: 'wasm-mod.wasm',
|
||||
* attributes: {},
|
||||
* phase: 'source',
|
||||
* },
|
||||
* ];
|
||||
* ```
|
||||
* @since v24.4.0
|
||||
*/
|
||||
readonly moduleRequests: readonly ModuleRequest[];
|
||||
}
|
||||
interface SyntheticModuleOptions {
|
||||
/**
|
||||
|
||||
21
node_modules/@types/node/wasi.d.ts
generated
vendored
21
node_modules/@types/node/wasi.d.ts
generated
vendored
@@ -121,6 +121,12 @@ declare module "wasi" {
|
||||
*/
|
||||
version: "unstable" | "preview1";
|
||||
}
|
||||
interface FinalizeBindingsOptions {
|
||||
/**
|
||||
* @default instance.exports.memory
|
||||
*/
|
||||
memory?: object | undefined;
|
||||
}
|
||||
/**
|
||||
* The `WASI` class provides the WASI system call API and additional convenience
|
||||
* methods for working with WASI-based applications. Each `WASI` instance
|
||||
@@ -167,6 +173,21 @@ declare module "wasi" {
|
||||
* @since v14.6.0, v12.19.0
|
||||
*/
|
||||
initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
|
||||
/**
|
||||
* Set up WASI host bindings to `instance` without calling `initialize()`
|
||||
* or `start()`. This method is useful when the WASI module is instantiated in
|
||||
* child threads for sharing the memory across threads.
|
||||
*
|
||||
* `finalizeBindings()` requires that either `instance` exports a
|
||||
* [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named `memory` or user specify a
|
||||
* [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) object in `options.memory`. If the `memory` is invalid
|
||||
* an exception is thrown.
|
||||
*
|
||||
* `start()` and `initialize()` will call `finalizeBindings()` internally.
|
||||
* If `finalizeBindings()` is called more than once, an exception is thrown.
|
||||
* @since v24.4.0
|
||||
*/
|
||||
finalizeBindings(instance: object, options?: FinalizeBindingsOptions): void;
|
||||
/**
|
||||
* `wasiImport` is an object that implements the WASI system call API. This object
|
||||
* should be passed as the `wasi_snapshot_preview1` import during the instantiation
|
||||
|
||||
34
node_modules/@types/node/web-globals/abortcontroller.d.ts
generated
vendored
Normal file
34
node_modules/@types/node/web-globals/abortcontroller.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
export {};
|
||||
|
||||
type _AbortController = typeof globalThis extends { onmessage: any } ? {} : AbortController;
|
||||
interface AbortController {
|
||||
readonly signal: AbortSignal;
|
||||
abort(reason?: any): void;
|
||||
}
|
||||
|
||||
type _AbortSignal = typeof globalThis extends { onmessage: any } ? {} : AbortSignal;
|
||||
interface AbortSignal extends EventTarget {
|
||||
readonly aborted: boolean;
|
||||
onabort: ((this: AbortSignal, ev: Event) => any) | null;
|
||||
readonly reason: any;
|
||||
throwIfAborted(): void;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface AbortController extends _AbortController {}
|
||||
var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T
|
||||
: {
|
||||
prototype: AbortController;
|
||||
new(): AbortController;
|
||||
};
|
||||
|
||||
interface AbortSignal extends _AbortSignal {}
|
||||
var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T
|
||||
: {
|
||||
prototype: AbortSignal;
|
||||
new(): AbortSignal;
|
||||
abort(reason?: any): AbortSignal;
|
||||
any(signals: AbortSignal[]): AbortSignal;
|
||||
timeout(milliseconds: number): AbortSignal;
|
||||
};
|
||||
}
|
||||
68
node_modules/@types/node/web-globals/domexception.d.ts
generated
vendored
Normal file
68
node_modules/@types/node/web-globals/domexception.d.ts
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
export {};
|
||||
|
||||
type _DOMException = typeof globalThis extends { onmessage: any } ? {} : DOMException;
|
||||
interface DOMException extends Error {
|
||||
readonly code: number;
|
||||
readonly message: string;
|
||||
readonly name: string;
|
||||
readonly INDEX_SIZE_ERR: 1;
|
||||
readonly DOMSTRING_SIZE_ERR: 2;
|
||||
readonly HIERARCHY_REQUEST_ERR: 3;
|
||||
readonly WRONG_DOCUMENT_ERR: 4;
|
||||
readonly INVALID_CHARACTER_ERR: 5;
|
||||
readonly NO_DATA_ALLOWED_ERR: 6;
|
||||
readonly NO_MODIFICATION_ALLOWED_ERR: 7;
|
||||
readonly NOT_FOUND_ERR: 8;
|
||||
readonly NOT_SUPPORTED_ERR: 9;
|
||||
readonly INUSE_ATTRIBUTE_ERR: 10;
|
||||
readonly INVALID_STATE_ERR: 11;
|
||||
readonly SYNTAX_ERR: 12;
|
||||
readonly INVALID_MODIFICATION_ERR: 13;
|
||||
readonly NAMESPACE_ERR: 14;
|
||||
readonly INVALID_ACCESS_ERR: 15;
|
||||
readonly VALIDATION_ERR: 16;
|
||||
readonly TYPE_MISMATCH_ERR: 17;
|
||||
readonly SECURITY_ERR: 18;
|
||||
readonly NETWORK_ERR: 19;
|
||||
readonly ABORT_ERR: 20;
|
||||
readonly URL_MISMATCH_ERR: 21;
|
||||
readonly QUOTA_EXCEEDED_ERR: 22;
|
||||
readonly TIMEOUT_ERR: 23;
|
||||
readonly INVALID_NODE_TYPE_ERR: 24;
|
||||
readonly DATA_CLONE_ERR: 25;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface DOMException extends _DOMException {}
|
||||
var DOMException: typeof globalThis extends { onmessage: any; DOMException: infer T } ? T
|
||||
: {
|
||||
prototype: DOMException;
|
||||
new(message?: string, name?: string): DOMException;
|
||||
new(message?: string, options?: { name?: string; cause?: unknown }): DOMException;
|
||||
readonly INDEX_SIZE_ERR: 1;
|
||||
readonly DOMSTRING_SIZE_ERR: 2;
|
||||
readonly HIERARCHY_REQUEST_ERR: 3;
|
||||
readonly WRONG_DOCUMENT_ERR: 4;
|
||||
readonly INVALID_CHARACTER_ERR: 5;
|
||||
readonly NO_DATA_ALLOWED_ERR: 6;
|
||||
readonly NO_MODIFICATION_ALLOWED_ERR: 7;
|
||||
readonly NOT_FOUND_ERR: 8;
|
||||
readonly NOT_SUPPORTED_ERR: 9;
|
||||
readonly INUSE_ATTRIBUTE_ERR: 10;
|
||||
readonly INVALID_STATE_ERR: 11;
|
||||
readonly SYNTAX_ERR: 12;
|
||||
readonly INVALID_MODIFICATION_ERR: 13;
|
||||
readonly NAMESPACE_ERR: 14;
|
||||
readonly INVALID_ACCESS_ERR: 15;
|
||||
readonly VALIDATION_ERR: 16;
|
||||
readonly TYPE_MISMATCH_ERR: 17;
|
||||
readonly SECURITY_ERR: 18;
|
||||
readonly NETWORK_ERR: 19;
|
||||
readonly ABORT_ERR: 20;
|
||||
readonly URL_MISMATCH_ERR: 21;
|
||||
readonly QUOTA_EXCEEDED_ERR: 22;
|
||||
readonly TIMEOUT_ERR: 23;
|
||||
readonly INVALID_NODE_TYPE_ERR: 24;
|
||||
readonly DATA_CLONE_ERR: 25;
|
||||
};
|
||||
}
|
||||
@@ -1,37 +1,61 @@
|
||||
// Make this a module
|
||||
export {};
|
||||
|
||||
// Conditional type aliases, which are later merged into the global scope.
|
||||
// Will either be empty if the relevant web library is already present, or the @types/node definition otherwise.
|
||||
interface AddEventListenerOptions extends EventListenerOptions {
|
||||
once?: boolean;
|
||||
passive?: boolean;
|
||||
signal?: AbortSignal;
|
||||
}
|
||||
|
||||
type __Event = typeof globalThis extends { onmessage: any } ? {} : Event;
|
||||
type _CustomEvent<T = any> = typeof globalThis extends { onmessage: any } ? {} : CustomEvent<T>;
|
||||
interface CustomEvent<T = any> extends Event {
|
||||
readonly detail: T;
|
||||
}
|
||||
|
||||
interface CustomEventInit<T = any> extends EventInit {
|
||||
detail?: T;
|
||||
}
|
||||
|
||||
type _Event = typeof globalThis extends { onmessage: any } ? {} : Event;
|
||||
interface Event {
|
||||
readonly bubbles: boolean;
|
||||
cancelBubble: boolean;
|
||||
readonly cancelable: boolean;
|
||||
readonly composed: boolean;
|
||||
composedPath(): [EventTarget?];
|
||||
readonly currentTarget: EventTarget | null;
|
||||
readonly defaultPrevented: boolean;
|
||||
readonly eventPhase: 0 | 2;
|
||||
initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
|
||||
readonly isTrusted: boolean;
|
||||
preventDefault(): void;
|
||||
readonly returnValue: boolean;
|
||||
returnValue: boolean;
|
||||
readonly srcElement: EventTarget | null;
|
||||
stopImmediatePropagation(): void;
|
||||
stopPropagation(): void;
|
||||
readonly target: EventTarget | null;
|
||||
readonly timeStamp: number;
|
||||
readonly type: string;
|
||||
composedPath(): [EventTarget?];
|
||||
initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
|
||||
preventDefault(): void;
|
||||
stopImmediatePropagation(): void;
|
||||
stopPropagation(): void;
|
||||
}
|
||||
|
||||
type __CustomEvent<T = any> = typeof globalThis extends { onmessage: any } ? {} : CustomEvent<T>;
|
||||
interface CustomEvent<T = any> extends Event {
|
||||
readonly detail: T;
|
||||
interface EventInit {
|
||||
bubbles?: boolean;
|
||||
cancelable?: boolean;
|
||||
composed?: boolean;
|
||||
}
|
||||
|
||||
type __EventTarget = typeof globalThis extends { onmessage: any } ? {} : EventTarget;
|
||||
interface EventListener {
|
||||
(evt: Event): void;
|
||||
}
|
||||
|
||||
interface EventListenerObject {
|
||||
handleEvent(object: Event): void;
|
||||
}
|
||||
|
||||
interface EventListenerOptions {
|
||||
capture?: boolean;
|
||||
}
|
||||
|
||||
type _EventTarget = typeof globalThis extends { onmessage: any } ? {} : EventTarget;
|
||||
interface EventTarget {
|
||||
addEventListener(
|
||||
type: string,
|
||||
@@ -46,51 +70,22 @@ interface EventTarget {
|
||||
): void;
|
||||
}
|
||||
|
||||
interface EventInit {
|
||||
bubbles?: boolean;
|
||||
cancelable?: boolean;
|
||||
composed?: boolean;
|
||||
}
|
||||
|
||||
interface CustomEventInit<T = any> extends EventInit {
|
||||
detail?: T;
|
||||
}
|
||||
|
||||
interface EventListenerOptions {
|
||||
capture?: boolean;
|
||||
}
|
||||
|
||||
interface AddEventListenerOptions extends EventListenerOptions {
|
||||
once?: boolean;
|
||||
passive?: boolean;
|
||||
signal?: AbortSignal;
|
||||
}
|
||||
|
||||
interface EventListener {
|
||||
(evt: Event): void;
|
||||
}
|
||||
|
||||
interface EventListenerObject {
|
||||
handleEvent(object: Event): void;
|
||||
}
|
||||
|
||||
// Merge conditional interfaces into global scope, and conditionally declare global constructors.
|
||||
declare global {
|
||||
interface Event extends __Event {}
|
||||
var Event: typeof globalThis extends { onmessage: any; Event: infer T } ? T
|
||||
: {
|
||||
prototype: Event;
|
||||
new(type: string, eventInitDict?: EventInit): Event;
|
||||
};
|
||||
|
||||
interface CustomEvent<T = any> extends __CustomEvent<T> {}
|
||||
interface CustomEvent<T = any> extends _CustomEvent<T> {}
|
||||
var CustomEvent: typeof globalThis extends { onmessage: any; CustomEvent: infer T } ? T
|
||||
: {
|
||||
prototype: CustomEvent;
|
||||
new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
|
||||
};
|
||||
|
||||
interface EventTarget extends __EventTarget {}
|
||||
interface Event extends _Event {}
|
||||
var Event: typeof globalThis extends { onmessage: any; Event: infer T } ? T
|
||||
: {
|
||||
prototype: Event;
|
||||
new(type: string, eventInitDict?: EventInit): Event;
|
||||
};
|
||||
|
||||
interface EventTarget extends _EventTarget {}
|
||||
var EventTarget: typeof globalThis extends { onmessage: any; EventTarget: infer T } ? T
|
||||
: {
|
||||
prototype: EventTarget;
|
||||
50
node_modules/@types/node/web-globals/fetch.d.ts
generated
vendored
Normal file
50
node_modules/@types/node/web-globals/fetch.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
export {};
|
||||
|
||||
import * as undici from "undici-types";
|
||||
|
||||
type _CloseEvent = typeof globalThis extends { onmessage: any } ? {} : undici.CloseEvent;
|
||||
type _EventSource = typeof globalThis extends { onmessage: any } ? {} : undici.EventSource;
|
||||
type _FormData = typeof globalThis extends { onmessage: any } ? {} : undici.FormData;
|
||||
type _Headers = typeof globalThis extends { onmessage: any } ? {} : undici.Headers;
|
||||
type _MessageEvent = typeof globalThis extends { onmessage: any } ? {} : undici.MessageEvent;
|
||||
type _Request = typeof globalThis extends { onmessage: any } ? {} : undici.Request;
|
||||
type _RequestInit = typeof globalThis extends { onmessage: any } ? {} : undici.RequestInit;
|
||||
type _Response = typeof globalThis extends { onmessage: any } ? {} : undici.Response;
|
||||
type _ResponseInit = typeof globalThis extends { onmessage: any } ? {} : undici.ResponseInit;
|
||||
type _WebSocket = typeof globalThis extends { onmessage: any } ? {} : undici.WebSocket;
|
||||
|
||||
declare global {
|
||||
function fetch(
|
||||
input: string | URL | Request,
|
||||
init?: RequestInit,
|
||||
): Promise<Response>;
|
||||
|
||||
interface CloseEvent extends _CloseEvent {}
|
||||
var CloseEvent: typeof globalThis extends { onmessage: any; CloseEvent: infer T } ? T : typeof undici.CloseEvent;
|
||||
|
||||
interface EventSource extends _EventSource {}
|
||||
var EventSource: typeof globalThis extends { onmessage: any; EventSource: infer T } ? T : typeof undici.EventSource;
|
||||
|
||||
interface FormData extends _FormData {}
|
||||
var FormData: typeof globalThis extends { onmessage: any; FormData: infer T } ? T : typeof undici.FormData;
|
||||
|
||||
interface Headers extends _Headers {}
|
||||
var Headers: typeof globalThis extends { onmessage: any; Headers: infer T } ? T : typeof undici.Headers;
|
||||
|
||||
interface MessageEvent extends _MessageEvent {}
|
||||
var MessageEvent: typeof globalThis extends { onmessage: any; MessageEvent: infer T } ? T
|
||||
: typeof undici.MessageEvent;
|
||||
|
||||
interface Request extends _Request {}
|
||||
var Request: typeof globalThis extends { onmessage: any; Request: infer T } ? T : typeof undici.Request;
|
||||
|
||||
interface RequestInit extends _RequestInit {}
|
||||
|
||||
interface Response extends _Response {}
|
||||
var Response: typeof globalThis extends { onmessage: any; Response: infer T } ? T : typeof undici.Response;
|
||||
|
||||
interface ResponseInit extends _ResponseInit {}
|
||||
|
||||
interface WebSocket extends _WebSocket {}
|
||||
var WebSocket: typeof globalThis extends { onmessage: any; WebSocket: infer T } ? T : typeof undici.WebSocket;
|
||||
}
|
||||
25
node_modules/@types/node/web-globals/navigator.d.ts
generated
vendored
Normal file
25
node_modules/@types/node/web-globals/navigator.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
export {};
|
||||
|
||||
import { LockManager } from "worker_threads";
|
||||
|
||||
// lib.webworker has `WorkerNavigator` rather than `Navigator`, so conditionals use `onabort` instead of `onmessage`
|
||||
type _Navigator = typeof globalThis extends { onabort: any } ? {} : Navigator;
|
||||
interface Navigator {
|
||||
readonly hardwareConcurrency: number;
|
||||
readonly language: string;
|
||||
readonly languages: readonly string[];
|
||||
readonly locks: LockManager;
|
||||
readonly platform: string;
|
||||
readonly userAgent: string;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Navigator extends _Navigator {}
|
||||
var Navigator: typeof globalThis extends { onabort: any; Navigator: infer T } ? T : {
|
||||
prototype: Navigator;
|
||||
new(): Navigator;
|
||||
};
|
||||
|
||||
// Needs conditional inference for lib.dom and lib.webworker compatibility
|
||||
var navigator: typeof globalThis extends { onmessage: any; navigator: infer T } ? T : Navigator;
|
||||
}
|
||||
24
node_modules/@types/node/web-globals/storage.d.ts
generated
vendored
Normal file
24
node_modules/@types/node/web-globals/storage.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
export {};
|
||||
|
||||
// These interfaces are absent from lib.webworker, so the conditionals use `onabort` rather than `onmessage`
|
||||
type _Storage = typeof globalThis extends { onabort: any } ? {} : Storage;
|
||||
interface Storage {
|
||||
readonly length: number;
|
||||
clear(): void;
|
||||
getItem(key: string): string | null;
|
||||
key(index: number): string | null;
|
||||
removeItem(key: string): void;
|
||||
setItem(key: string, value: string): void;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Storage extends _Storage {}
|
||||
var Storage: typeof globalThis extends { onabort: any; Storage: infer T } ? T : {
|
||||
prototype: Storage;
|
||||
new(): Storage;
|
||||
};
|
||||
|
||||
var localStorage: Storage;
|
||||
var sessionStorage: Storage;
|
||||
}
|
||||
54
node_modules/@types/node/worker_threads.d.ts
generated
vendored
54
node_modules/@types/node/worker_threads.d.ts
generated
vendored
@@ -63,6 +63,7 @@ declare module "worker_threads" {
|
||||
import { ReadableStream, TransformStream, WritableStream } from "node:stream/web";
|
||||
import { URL } from "node:url";
|
||||
import { HeapInfo } from "node:v8";
|
||||
import { MessageEvent } from "undici-types";
|
||||
const isInternalThread: boolean;
|
||||
const isMainThread: boolean;
|
||||
const parentPort: null | MessagePort;
|
||||
@@ -574,18 +575,18 @@ declare module "worker_threads" {
|
||||
* ```
|
||||
* @since v15.4.0
|
||||
*/
|
||||
class BroadcastChannel {
|
||||
class BroadcastChannel extends EventTarget {
|
||||
readonly name: string;
|
||||
/**
|
||||
* Invoked with a single \`MessageEvent\` argument when a message is received.
|
||||
* @since v15.4.0
|
||||
*/
|
||||
onmessage: (message: unknown) => void;
|
||||
onmessage: (message: MessageEvent) => void;
|
||||
/**
|
||||
* Invoked with a received message cannot be deserialized.
|
||||
* @since v15.4.0
|
||||
*/
|
||||
onmessageerror: (message: unknown) => void;
|
||||
onmessageerror: (message: MessageEvent) => void;
|
||||
constructor(name: string);
|
||||
/**
|
||||
* Closes the `BroadcastChannel` connection.
|
||||
@@ -598,6 +599,35 @@ declare module "worker_threads" {
|
||||
*/
|
||||
postMessage(message: unknown): void;
|
||||
}
|
||||
interface Lock {
|
||||
readonly mode: LockMode;
|
||||
readonly name: string;
|
||||
}
|
||||
interface LockGrantedCallback<T> {
|
||||
(lock: Lock | null): T;
|
||||
}
|
||||
interface LockInfo {
|
||||
clientId: string;
|
||||
mode: LockMode;
|
||||
name: string;
|
||||
}
|
||||
interface LockManager {
|
||||
query(): Promise<LockManagerSnapshot>;
|
||||
request<T>(name: string, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
||||
request<T>(name: string, options: LockOptions, callback: LockGrantedCallback<T>): Promise<Awaited<T>>;
|
||||
}
|
||||
interface LockManagerSnapshot {
|
||||
held: LockInfo[];
|
||||
pending: LockInfo[];
|
||||
}
|
||||
type LockMode = "exclusive" | "shared";
|
||||
interface LockOptions {
|
||||
ifAvailable?: boolean;
|
||||
mode?: LockMode;
|
||||
signal?: AbortSignal;
|
||||
steal?: boolean;
|
||||
}
|
||||
var locks: LockManager;
|
||||
/**
|
||||
* Mark an object as not transferable. If `object` occurs in the transfer list of
|
||||
* a `port.postMessage()` call, it is ignored.
|
||||
@@ -739,6 +769,24 @@ declare module "worker_threads" {
|
||||
* for the `key` will be deleted.
|
||||
*/
|
||||
function setEnvironmentData(key: Serializable, value?: Serializable): void;
|
||||
/**
|
||||
* Sends a value to another worker, identified by its thread ID.
|
||||
* @param threadId The target thread ID. If the thread ID is invalid, a `ERR_WORKER_MESSAGING_FAILED` error will be thrown.
|
||||
* If the target thread ID is the current thread ID, a `ERR_WORKER_MESSAGING_SAME_THREAD` error will be thrown.
|
||||
* @param value The value to send.
|
||||
* @param transferList If one or more `MessagePort`-like objects are passed in value, a `transferList` is required for those items
|
||||
* or `ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST` is thrown. See `port.postMessage()` for more information.
|
||||
* @param timeout Time to wait for the message to be delivered in milliseconds. By default it's `undefined`, which means wait forever.
|
||||
* If the operation times out, a `ERR_WORKER_MESSAGING_TIMEOUT` error is thrown.
|
||||
* @since v22.5.0
|
||||
*/
|
||||
function postMessageToThread(threadId: number, value: any, timeout?: number): Promise<void>;
|
||||
function postMessageToThread(
|
||||
threadId: number,
|
||||
value: any,
|
||||
transferList: readonly Transferable[],
|
||||
timeout?: number,
|
||||
): Promise<void>;
|
||||
|
||||
import {
|
||||
BroadcastChannel as _BroadcastChannel,
|
||||
|
||||
Reference in New Issue
Block a user