This commit is contained in:
2023-08-11 10:45:20 +08:00
commit 161ca982f3
31850 changed files with 2706500 additions and 0 deletions

21
node_modules/@types/body-parser/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/body-parser/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/body-parser`
# Summary
This package contains type definitions for body-parser (https://github.com/expressjs/body-parser).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser.
### Additional Details
* Last updated: Tue, 16 Nov 2021 18:31:30 GMT
* Dependencies: [@types/connect](https://npmjs.com/package/@types/connect), [@types/node](https://npmjs.com/package/@types/node)
* Global values: none
# Credits
These definitions were written by [Santi Albo](https://github.com/santialbo), [Vilic Vane](https://github.com/vilic), [Jonathan Häberle](https://github.com/dreampulse), [Gevik Babakhani](https://github.com/blendsdk), [Tomasz Łaziuk](https://github.com/tlaziuk), [Jason Walton](https://github.com/jwalton), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).

107
node_modules/@types/body-parser/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,107 @@
// Type definitions for body-parser 1.19
// Project: https://github.com/expressjs/body-parser
// Definitions by: Santi Albo <https://github.com/santialbo>
// Vilic Vane <https://github.com/vilic>
// Jonathan Häberle <https://github.com/dreampulse>
// Gevik Babakhani <https://github.com/blendsdk>
// Tomasz Łaziuk <https://github.com/tlaziuk>
// Jason Walton <https://github.com/jwalton>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import { NextHandleFunction } from 'connect';
import * as http from 'http';
// for docs go to https://github.com/expressjs/body-parser/tree/1.19.0#body-parser
declare namespace bodyParser {
interface BodyParser {
/**
* @deprecated use individual json/urlencoded middlewares
*/
(options?: OptionsJson & OptionsText & OptionsUrlencoded): NextHandleFunction;
/**
* Returns middleware that only parses json and only looks at requests
* where the Content-Type header matches the type option.
*/
json(options?: OptionsJson): NextHandleFunction;
/**
* Returns middleware that parses all bodies as a Buffer and only looks at requests
* where the Content-Type header matches the type option.
*/
raw(options?: Options): NextHandleFunction;
/**
* Returns middleware that parses all bodies as a string and only looks at requests
* where the Content-Type header matches the type option.
*/
text(options?: OptionsText): NextHandleFunction;
/**
* Returns middleware that only parses urlencoded bodies and only looks at requests
* where the Content-Type header matches the type option
*/
urlencoded(options?: OptionsUrlencoded): NextHandleFunction;
}
interface Options {
/** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */
inflate?: boolean | undefined;
/**
* Controls the maximum request body size. If this is a number,
* then the value specifies the number of bytes; if it is a string,
* the value is passed to the bytes library for parsing. Defaults to '100kb'.
*/
limit?: number | string | undefined;
/**
* The type option is used to determine what media type the middleware will parse
*/
type?: string | string[] | ((req: http.IncomingMessage) => any) | undefined;
/**
* The verify option, if supplied, is called as verify(req, res, buf, encoding),
* where buf is a Buffer of the raw request body and encoding is the encoding of the request.
*/
verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void;
}
interface OptionsJson extends Options {
/**
*
* The reviver option is passed directly to JSON.parse as the second argument.
*/
reviver?(key: string, value: any): any;
/**
* When set to `true`, will only accept arrays and objects;
* when `false` will accept anything JSON.parse accepts. Defaults to `true`.
*/
strict?: boolean | undefined;
}
interface OptionsText extends Options {
/**
* Specify the default character set for the text content if the charset
* is not specified in the Content-Type header of the request.
* Defaults to `utf-8`.
*/
defaultCharset?: string | undefined;
}
interface OptionsUrlencoded extends Options {
/**
* The extended option allows to choose between parsing the URL-encoded data
* with the querystring library (when `false`) or the qs library (when `true`).
*/
extended?: boolean | undefined;
/**
* The parameterLimit option controls the maximum number of parameters
* that are allowed in the URL-encoded data. If a request contains more parameters than this value,
* a 413 will be returned to the client. Defaults to 1000.
*/
parameterLimit?: number | undefined;
}
}
declare const bodyParser: bodyParser.BodyParser;
export = bodyParser;

80
node_modules/@types/body-parser/package.json generated vendored Normal file
View File

@ -0,0 +1,80 @@
{
"_from": "@types/body-parser@*",
"_id": "@types/body-parser@1.19.2",
"_inBundle": false,
"_integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==",
"_location": "/@types/body-parser",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/body-parser@*",
"name": "@types/body-parser",
"escapedName": "@types%2fbody-parser",
"scope": "@types",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/@types/express"
],
"_resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
"_shasum": "aea2059e28b7658639081347ac4fab3de166e6f0",
"_spec": "@types/body-parser@*",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\@types\\express",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Santi Albo",
"url": "https://github.com/santialbo"
},
{
"name": "Vilic Vane",
"url": "https://github.com/vilic"
},
{
"name": "Jonathan Häberle",
"url": "https://github.com/dreampulse"
},
{
"name": "Gevik Babakhani",
"url": "https://github.com/blendsdk"
},
{
"name": "Tomasz Łaziuk",
"url": "https://github.com/tlaziuk"
},
{
"name": "Jason Walton",
"url": "https://github.com/jwalton"
},
{
"name": "Piotr Błażejewicz",
"url": "https://github.com/peterblazejewicz"
}
],
"dependencies": {
"@types/connect": "*",
"@types/node": "*"
},
"deprecated": false,
"description": "TypeScript definitions for body-parser",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser",
"license": "MIT",
"main": "",
"name": "@types/body-parser",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/body-parser"
},
"scripts": {},
"typeScriptVersion": "3.7",
"types": "index.d.ts",
"typesPublisherContentHash": "ad069aa8b9e8a95f66df025de11975c773540e4071000abdb7db565579b013ee",
"version": "1.19.2"
}

21
node_modules/@types/bonjour/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/bonjour/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/bonjour`
# Summary
This package contains type definitions for bonjour (https://github.com/watson/bonjour).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bonjour.
### Additional Details
* Last updated: Thu, 23 Dec 2021 23:34:20 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
* Global values: none
# Credits
These definitions were written by [Quentin Lampin](https://github.com/quentin-ol).

95
node_modules/@types/bonjour/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,95 @@
// Type definitions for bonjour 3.5
// Project: https://github.com/watson/bonjour
// Definitions by: Quentin Lampin <https://github.com/quentin-ol>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import { RemoteInfo } from 'dgram';
declare function bonjour(opts?: bonjour.BonjourOptions): bonjour.Bonjour;
export = bonjour;
declare namespace bonjour {
/**
* Start a browser
*
* The browser listens for services by querying for PTR records of a given
* type, protocol and domain, e.g. _http._tcp.local.
*
* If no type is given, a wild card search is performed.
*
* An internal list of online services is kept which starts out empty. When
* ever a new service is discovered, it's added to the list and an "up" event
* is emitted with that service. When it's discovered that the service is no
* longer available, it is removed from the list and a "down" event is emitted
* with that service.
*/
interface Browser extends NodeJS.EventEmitter {
services: RemoteService[];
start(): void;
update(): void;
stop(): void;
on(event: 'up' | 'down', listener: (service: RemoteService) => void): this;
once(event: 'up' | 'down', listener: (service: RemoteService) => void): this;
removeListener(event: 'up' | 'down', listener: (service: RemoteService) => void): this;
removeAllListeners(event?: 'up' | 'down'): this;
}
interface BrowserOptions {
type?: string | undefined;
subtypes?: string[] | undefined;
protocol?: string | undefined;
txt?: { [key: string]: string } | undefined;
}
interface ServiceOptions {
name: string;
host?: string | undefined;
port: number;
type: string;
subtypes?: string[] | undefined;
protocol?: 'udp'|'tcp' | undefined;
txt?: { [key: string]: string } | undefined;
probe?: boolean | undefined;
}
interface BaseService {
name: string;
fqdn: string;
host: string;
port: number;
type: string;
protocol: string;
subtypes: string[];
txt: { [key: string]: string };
}
interface RemoteService extends BaseService {
referer: RemoteInfo;
rawTxt: Buffer;
addresses: string[];
}
interface Service extends BaseService, NodeJS.EventEmitter {
published: boolean;
addresses: string[];
stop(cb?: () => void): void;
start(): void;
}
interface BonjourOptions {
type?: 'udp4' | 'udp6' | undefined;
multicast?: boolean | undefined;
interface?: string | undefined;
port?: number | undefined;
ip?: string | undefined;
ttl?: number | undefined;
loopback?: boolean | undefined;
reuseAddr?: boolean | undefined;
}
interface Bonjour {
(opts?: BonjourOptions): Bonjour;
publish(options: ServiceOptions): Service;
unpublishAll(cb?: () => void): void;
find(options: BrowserOptions, onUp?: (service: RemoteService) => void): Browser;
findOne(options: BrowserOptions, cb?: (service: RemoteService) => void): Browser;
destroy(): void;
}
}

55
node_modules/@types/bonjour/package.json generated vendored Normal file
View File

@ -0,0 +1,55 @@
{
"_from": "@types/bonjour@^3.5.9",
"_id": "@types/bonjour@3.5.10",
"_inBundle": false,
"_integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==",
"_location": "/@types/bonjour",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/bonjour@^3.5.9",
"name": "@types/bonjour",
"escapedName": "@types%2fbonjour",
"scope": "@types",
"rawSpec": "^3.5.9",
"saveSpec": null,
"fetchSpec": "^3.5.9"
},
"_requiredBy": [
"/webpack-dev-server"
],
"_resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz",
"_shasum": "0f6aadfe00ea414edc86f5d106357cda9701e275",
"_spec": "@types/bonjour@^3.5.9",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\webpack-dev-server",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Quentin Lampin",
"url": "https://github.com/quentin-ol"
}
],
"dependencies": {
"@types/node": "*"
},
"deprecated": false,
"description": "TypeScript definitions for bonjour",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bonjour",
"license": "MIT",
"main": "",
"name": "@types/bonjour",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/bonjour"
},
"scripts": {},
"typeScriptVersion": "3.8",
"types": "index.d.ts",
"typesPublisherContentHash": "5613f9d9eb2d0d132e0af9cbafeadfe263bf7c525c715d0db37ba47fb96ccc45",
"version": "3.5.10"
}

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

View File

@ -0,0 +1,58 @@
# Installation
> `npm install --save @types/connect-history-api-fallback`
# Summary
This package contains type definitions for connect-history-api-fallback (https://github.com/bripkens/connect-history-api-fallback#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback/index.d.ts)
````ts
// Type definitions for connect-history-api-fallback 1.5
// Project: https://github.com/bripkens/connect-history-api-fallback#readme
// Definitions by: Douglas Duteil <https://github.com/douglasduteil>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="node" />
import { Url } from 'url';
import * as core from "express-serve-static-core";
export = historyApiFallback;
declare function historyApiFallback(options?: historyApiFallback.Options): core.RequestHandler;
declare namespace historyApiFallback {
interface Options {
readonly disableDotRule?: true | undefined;
readonly htmlAcceptHeaders?: ReadonlyArray<string> | undefined;
readonly index?: string | undefined;
readonly logger?: typeof console.log | undefined;
readonly rewrites?: ReadonlyArray<Rewrite> | undefined;
readonly verbose?: boolean | undefined;
}
interface Context {
readonly match: RegExpMatchArray;
readonly parsedUrl: Url;
readonly request: core.Request;
}
type RewriteTo = (context: Context) => string;
interface Rewrite {
readonly from: RegExp;
readonly to: string | RegExp | RewriteTo;
}
}
````
### Additional Details
* Last updated: Fri, 28 Apr 2023 01:02:43 GMT
* Dependencies: [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/node](https://npmjs.com/package/@types/node)
* Global values: none
# Credits
These definitions were written by [Douglas Duteil](https://github.com/douglasduteil).

View File

@ -0,0 +1,38 @@
// Type definitions for connect-history-api-fallback 1.5
// Project: https://github.com/bripkens/connect-history-api-fallback#readme
// Definitions by: Douglas Duteil <https://github.com/douglasduteil>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="node" />
import { Url } from 'url';
import * as core from "express-serve-static-core";
export = historyApiFallback;
declare function historyApiFallback(options?: historyApiFallback.Options): core.RequestHandler;
declare namespace historyApiFallback {
interface Options {
readonly disableDotRule?: true | undefined;
readonly htmlAcceptHeaders?: ReadonlyArray<string> | undefined;
readonly index?: string | undefined;
readonly logger?: typeof console.log | undefined;
readonly rewrites?: ReadonlyArray<Rewrite> | undefined;
readonly verbose?: boolean | undefined;
}
interface Context {
readonly match: RegExpMatchArray;
readonly parsedUrl: Url;
readonly request: core.Request;
}
type RewriteTo = (context: Context) => string;
interface Rewrite {
readonly from: RegExp;
readonly to: string | RegExp | RewriteTo;
}
}

View File

@ -0,0 +1,56 @@
{
"_from": "@types/connect-history-api-fallback@^1.3.5",
"_id": "@types/connect-history-api-fallback@1.5.0",
"_inBundle": false,
"_integrity": "sha512-4x5FkPpLipqwthjPsF7ZRbOv3uoLUFkTA9G9v583qi4pACvq0uTELrB8OLUzPWUI4IJIyvM85vzkV1nyiI2Lig==",
"_location": "/@types/connect-history-api-fallback",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/connect-history-api-fallback@^1.3.5",
"name": "@types/connect-history-api-fallback",
"escapedName": "@types%2fconnect-history-api-fallback",
"scope": "@types",
"rawSpec": "^1.3.5",
"saveSpec": null,
"fetchSpec": "^1.3.5"
},
"_requiredBy": [
"/webpack-dev-server"
],
"_resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz",
"_shasum": "9fd20b3974bdc2bcd4ac6567e2e0f6885cb2cf41",
"_spec": "@types/connect-history-api-fallback@^1.3.5",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\webpack-dev-server",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Douglas Duteil",
"url": "https://github.com/douglasduteil"
}
],
"dependencies": {
"@types/express-serve-static-core": "*",
"@types/node": "*"
},
"deprecated": false,
"description": "TypeScript definitions for connect-history-api-fallback",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback",
"license": "MIT",
"main": "",
"name": "@types/connect-history-api-fallback",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/connect-history-api-fallback"
},
"scripts": {},
"typeScriptVersion": "4.3",
"types": "index.d.ts",
"typesPublisherContentHash": "27f6b8638a514554934cf162ee1888c0b4a7de710c681db7580bf0601e175e84",
"version": "1.5.0"
}

21
node_modules/@types/connect/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/connect/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/connect`
# Summary
This package contains type definitions for connect (https://github.com/senchalabs/connect).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect.
### Additional Details
* Last updated: Tue, 06 Jul 2021 20:32:28 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
* Global values: none
# Credits
These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), and [Evan Hahn](https://github.com/EvanHahn).

93
node_modules/@types/connect/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,93 @@
// Type definitions for connect v3.4.0
// Project: https://github.com/senchalabs/connect
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>
// Evan Hahn <https://github.com/EvanHahn>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import * as http from "http";
/**
* Create a new connect server.
*/
declare function createServer(): createServer.Server;
declare namespace createServer {
export type ServerHandle = HandleFunction | http.Server;
export class IncomingMessage extends http.IncomingMessage {
originalUrl?: http.IncomingMessage["url"] | undefined;
}
type NextFunction = (err?: any) => void;
export type SimpleHandleFunction = (req: IncomingMessage, res: http.ServerResponse) => void;
export type NextHandleFunction = (req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
export type ErrorHandleFunction = (err: any, req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
export type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction;
export interface ServerStackItem {
route: string;
handle: ServerHandle;
}
export interface Server extends NodeJS.EventEmitter {
(req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
route: string;
stack: ServerStackItem[];
/**
* Utilize the given middleware `handle` to the given `route`,
* defaulting to _/_. This "route" is the mount-point for the
* middleware, when given a value other than _/_ the middleware
* is only effective when that segment is present in the request's
* pathname.
*
* For example if we were to mount a function at _/admin_, it would
* be invoked on _/admin_, and _/admin/settings_, however it would
* not be invoked for _/_, or _/posts_.
*/
use(fn: NextHandleFunction): Server;
use(fn: HandleFunction): Server;
use(route: string, fn: NextHandleFunction): Server;
use(route: string, fn: HandleFunction): Server;
/**
* Handle server requests, punting them down
* the middleware stack.
*/
handle(req: http.IncomingMessage, res: http.ServerResponse, next: Function): void;
/**
* Listen for connections.
*
* This method takes the same arguments
* as node's `http.Server#listen()`.
*
* HTTP and HTTPS:
*
* If you run your application both as HTTP
* and HTTPS you may wrap them individually,
* since your Connect "server" is really just
* a JavaScript `Function`.
*
* var connect = require('connect')
* , http = require('http')
* , https = require('https');
*
* var app = connect();
*
* http.createServer(app).listen(80);
* https.createServer(options, app).listen(443);
*/
listen(port: number, hostname?: string, backlog?: number, callback?: Function): http.Server;
listen(port: number, hostname?: string, callback?: Function): http.Server;
listen(path: string, callback?: Function): http.Server;
listen(handle: any, listeningListener?: Function): http.Server;
}
}
export = createServer;

59
node_modules/@types/connect/package.json generated vendored Normal file
View File

@ -0,0 +1,59 @@
{
"_from": "@types/connect@*",
"_id": "@types/connect@3.4.35",
"_inBundle": false,
"_integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
"_location": "/@types/connect",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/connect@*",
"name": "@types/connect",
"escapedName": "@types%2fconnect",
"scope": "@types",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/@types/body-parser"
],
"_resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
"_shasum": "5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1",
"_spec": "@types/connect@*",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\@types\\body-parser",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Maxime LUCE",
"url": "https://github.com/SomaticIT"
},
{
"name": "Evan Hahn",
"url": "https://github.com/EvanHahn"
}
],
"dependencies": {
"@types/node": "*"
},
"deprecated": false,
"description": "TypeScript definitions for connect",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect",
"license": "MIT",
"main": "",
"name": "@types/connect",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/connect"
},
"scripts": {},
"typeScriptVersion": "3.6",
"types": "index.d.ts",
"typesPublisherContentHash": "09c0dcec5f675cb2bdd7487a85447955f769ef4ab174294478c4f055b528fecc",
"version": "3.4.35"
}

21
node_modules/@types/eslint-scope/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

85
node_modules/@types/eslint-scope/README.md generated vendored Normal file
View File

@ -0,0 +1,85 @@
# Installation
> `npm install --save @types/eslint-scope`
# Summary
This package contains type definitions for eslint-scope (https://github.com/eslint/eslint-scope).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope/index.d.ts)
````ts
// Type definitions for eslint-scope 3.7
// Project: https://github.com/eslint/eslint-scope
// Definitions by: Toru Nagashima <https://github.com/mysticatea>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.8
import * as eslint from "eslint";
import * as estree from "estree";
export const version: string;
export class ScopeManager implements eslint.Scope.ScopeManager {
scopes: Scope[];
globalScope: Scope;
acquire(node: {}, inner?: boolean): Scope | null;
getDeclaredVariables(node: {}): Variable[];
}
export class Scope implements eslint.Scope.Scope {
type: "block" | "catch" | "class" | "for" | "function" | "function-expression-name" | "global" | "module" | "switch" | "with" | "TDZ";
isStrict: boolean;
upper: Scope | null;
childScopes: Scope[];
variableScope: Scope;
block: estree.Node;
variables: Variable[];
set: Map<string, Variable>;
references: Reference[];
through: Reference[];
functionExpressionScope: boolean;
}
export class Variable implements eslint.Scope.Variable {
name: string;
scope: Scope;
identifiers: estree.Identifier[];
references: Reference[];
defs: eslint.Scope.Definition[];
}
export class Reference implements eslint.Scope.Reference {
identifier: estree.Identifier;
from: Scope;
resolved: Variable | null;
writeExpr: estree.Node | null;
init: boolean;
isWrite(): boolean;
isRead(): boolean;
isWriteOnly(): boolean;
isReadOnly(): boolean;
isReadWrite(): boolean;
}
export interface AnalysisOptions {
optimistic?: boolean;
directive?: boolean;
ignoreEval?: boolean;
nodejsScope?: boolean;
impliedStrict?: boolean;
fallback?: string | ((node: {}) => string[]);
sourceType?: "script" | "module";
ecmaVersion?: number;
}
export function analyze(ast: {}, options?: AnalysisOptions): ScopeManager;
````
### Additional Details
* Last updated: Thu, 30 Jun 2022 19:02:28 GMT
* Dependencies: [@types/eslint](https://npmjs.com/package/@types/eslint), [@types/estree](https://npmjs.com/package/@types/estree)
* Global values: none
# Credits
These definitions were written by [Toru Nagashima](https://github.com/mysticatea).

65
node_modules/@types/eslint-scope/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,65 @@
// Type definitions for eslint-scope 3.7
// Project: https://github.com/eslint/eslint-scope
// Definitions by: Toru Nagashima <https://github.com/mysticatea>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.8
import * as eslint from "eslint";
import * as estree from "estree";
export const version: string;
export class ScopeManager implements eslint.Scope.ScopeManager {
scopes: Scope[];
globalScope: Scope;
acquire(node: {}, inner?: boolean): Scope | null;
getDeclaredVariables(node: {}): Variable[];
}
export class Scope implements eslint.Scope.Scope {
type: "block" | "catch" | "class" | "for" | "function" | "function-expression-name" | "global" | "module" | "switch" | "with" | "TDZ";
isStrict: boolean;
upper: Scope | null;
childScopes: Scope[];
variableScope: Scope;
block: estree.Node;
variables: Variable[];
set: Map<string, Variable>;
references: Reference[];
through: Reference[];
functionExpressionScope: boolean;
}
export class Variable implements eslint.Scope.Variable {
name: string;
scope: Scope;
identifiers: estree.Identifier[];
references: Reference[];
defs: eslint.Scope.Definition[];
}
export class Reference implements eslint.Scope.Reference {
identifier: estree.Identifier;
from: Scope;
resolved: Variable | null;
writeExpr: estree.Node | null;
init: boolean;
isWrite(): boolean;
isRead(): boolean;
isWriteOnly(): boolean;
isReadOnly(): boolean;
isReadWrite(): boolean;
}
export interface AnalysisOptions {
optimistic?: boolean;
directive?: boolean;
ignoreEval?: boolean;
nodejsScope?: boolean;
impliedStrict?: boolean;
fallback?: string | ((node: {}) => string[]);
sourceType?: "script" | "module";
ecmaVersion?: number;
}
export function analyze(ast: {}, options?: AnalysisOptions): ScopeManager;

56
node_modules/@types/eslint-scope/package.json generated vendored Normal file
View File

@ -0,0 +1,56 @@
{
"_from": "@types/eslint-scope@^3.7.3",
"_id": "@types/eslint-scope@3.7.4",
"_inBundle": false,
"_integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==",
"_location": "/@types/eslint-scope",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/eslint-scope@^3.7.3",
"name": "@types/eslint-scope",
"escapedName": "@types%2feslint-scope",
"scope": "@types",
"rawSpec": "^3.7.3",
"saveSpec": null,
"fetchSpec": "^3.7.3"
},
"_requiredBy": [
"/webpack"
],
"_resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz",
"_shasum": "37fc1223f0786c39627068a12e94d6e6fc61de16",
"_spec": "@types/eslint-scope@^3.7.3",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\webpack",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Toru Nagashima",
"url": "https://github.com/mysticatea"
}
],
"dependencies": {
"@types/eslint": "*",
"@types/estree": "*"
},
"deprecated": false,
"description": "TypeScript definitions for eslint-scope",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope",
"license": "MIT",
"main": "",
"name": "@types/eslint-scope",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/eslint-scope"
},
"scripts": {},
"typeScriptVersion": "4.0",
"types": "index.d.ts",
"typesPublisherContentHash": "81c8e26e146b6b132a88bc06480ec59c5006561f35388cbc65756710cd486f05",
"version": "3.7.4"
}

21
node_modules/@types/eslint/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/eslint/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/eslint`
# Summary
This package contains type definitions for eslint (https://eslint.org).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint.
### Additional Details
* Last updated: Fri, 04 Aug 2023 20:19:53 GMT
* Dependencies: [@types/estree](https://npmjs.com/package/@types/estree), [@types/json-schema](https://npmjs.com/package/@types/json-schema)
* Global values: none
# Credits
These definitions were written by [Pierre-Marie Dartus](https://github.com/pmdartus), [Jed Fox](https://github.com/j-f1), [Saad Quadri](https://github.com/saadq), [Jason Kwok](https://github.com/JasonHK), [Brad Zacher](https://github.com/bradzacher), and [JounQin](https://github.com/JounQin).

3
node_modules/@types/eslint/helpers.d.ts generated vendored Normal file
View File

@ -0,0 +1,3 @@
type Prepend<Tuple extends any[], Addend> = ((_: Addend, ..._1: Tuple) => any) extends (..._: infer Result) => any
? Result
: never;

1209
node_modules/@types/eslint/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

89
node_modules/@types/eslint/package.json generated vendored Normal file
View File

@ -0,0 +1,89 @@
{
"_from": "@types/eslint@*",
"_id": "@types/eslint@8.44.2",
"_inBundle": false,
"_integrity": "sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg==",
"_location": "/@types/eslint",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/eslint@*",
"name": "@types/eslint",
"escapedName": "@types%2feslint",
"scope": "@types",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/@types/eslint-scope",
"/eslint-webpack-plugin"
],
"_resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.2.tgz",
"_shasum": "0d21c505f98a89b8dd4d37fa162b09da6089199a",
"_spec": "@types/eslint@*",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\@types\\eslint-scope",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Pierre-Marie Dartus",
"url": "https://github.com/pmdartus"
},
{
"name": "Jed Fox",
"url": "https://github.com/j-f1"
},
{
"name": "Saad Quadri",
"url": "https://github.com/saadq"
},
{
"name": "Jason Kwok",
"url": "https://github.com/JasonHK"
},
{
"name": "Brad Zacher",
"url": "https://github.com/bradzacher"
},
{
"name": "JounQin",
"url": "https://github.com/JounQin"
}
],
"dependencies": {
"@types/estree": "*",
"@types/json-schema": "*"
},
"deprecated": false,
"description": "TypeScript definitions for eslint",
"exports": {
".": {
"types": "./index.d.ts"
},
"./use-at-your-own-risk": {
"types": "./use-at-your-own-risk.d.ts"
},
"./rules": {
"types": "./rules/index.d.ts"
},
"./package.json": "./package.json"
},
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint",
"license": "MIT",
"main": "",
"name": "@types/eslint",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/eslint"
},
"scripts": {},
"typeScriptVersion": "4.3",
"types": "index.d.ts",
"typesPublisherContentHash": "97b0176e71d5a8db5e07c2bd8d35d2ed6738aa1eaa3f7175881f9942d304c0ba",
"version": "8.44.2"
}

931
node_modules/@types/eslint/rules/best-practices.d.ts generated vendored Normal file
View File

@ -0,0 +1,931 @@
import { Linter } from "../index";
export interface BestPractices extends Linter.RulesRecord {
/**
* Rule to enforce getter and setter pairs in objects.
*
* @since 0.22.0
* @see https://eslint.org/docs/rules/accessor-pairs
*/
"accessor-pairs": Linter.RuleEntry<
[
Partial<{
/**
* @default true
*/
setWithoutGet: boolean;
/**
* @default false
*/
getWithoutSet: boolean;
}>,
]
>;
/**
* Rule to enforce `return` statements in callbacks of array methods.
*
* @since 2.0.0-alpha-1
* @see https://eslint.org/docs/rules/array-callback-return
*/
"array-callback-return": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
allowImplicit: boolean;
}>,
]
>;
/**
* Rule to enforce the use of variables within the scope they are defined.
*
* @since 0.1.0
* @see https://eslint.org/docs/rules/block-scoped-var
*/
"block-scoped-var": Linter.RuleEntry<[]>;
/**
* Rule to enforce that class methods utilize `this`.
*
* @since 3.4.0
* @see https://eslint.org/docs/rules/class-methods-use-this
*/
"class-methods-use-this": Linter.RuleEntry<
[
Partial<{
exceptMethods: string[];
}>,
]
>;
/**
* Rule to enforce a maximum cyclomatic complexity allowed in a program.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/complexity
*/
complexity: Linter.RuleEntry<
[
| Partial<{
/**
* @default 20
*/
max: number;
/**
* @deprecated
* @default 20
*/
maximum: number;
}>
| number,
]
>;
/**
* Rule to require `return` statements to either always or never specify values.
*
* @since 0.4.0
* @see https://eslint.org/docs/rules/consistent-return
*/
"consistent-return": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
treatUndefinedAsUnspecified: boolean;
}>,
]
>;
/**
* Rule to enforce consistent brace style for all control statements.
*
* @since 0.0.2
* @see https://eslint.org/docs/rules/curly
*/
curly: Linter.RuleEntry<["all" | "multi" | "multi-line" | "multi-or-nest" | "consistent"]>;
/**
* Rule to require `default` cases in `switch` statements.
*
* @since 0.6.0
* @see https://eslint.org/docs/rules/default-case
*/
"default-case": Linter.RuleEntry<
[
Partial<{
/**
* @default '^no default$'
*/
commentPattern: string;
}>,
]
>;
/**
* Rule to enforce consistent newlines before and after dots.
*
* @since 0.21.0
* @see https://eslint.org/docs/rules/dot-location
*/
"dot-location": Linter.RuleEntry<["object" | "property"]>;
/**
* Rule to enforce dot notation whenever possible.
*
* @since 0.0.7
* @see https://eslint.org/docs/rules/dot-notation
*/
"dot-notation": Linter.RuleEntry<
[
Partial<{
/**
* @default true
*/
allowKeywords: boolean;
allowPattern: string;
}>,
]
>;
/**
* Rule to require the use of `===` and `!==`.
*
* @since 0.0.2
* @see https://eslint.org/docs/rules/eqeqeq
*/
eqeqeq:
| Linter.RuleEntry<
[
"always",
Partial<{
/**
* @default 'always'
*/
null: "always" | "never" | "ignore";
}>,
]
>
| Linter.RuleEntry<["smart" | "allow-null"]>;
/**
* Rule to require `for-in` loops to include an `if` statement.
*
* @since 0.0.6
* @see https://eslint.org/docs/rules/guard-for-in
*/
"guard-for-in": Linter.RuleEntry<[]>;
/**
* Rule to enforce a maximum number of classes per file.
*
* @since 5.0.0-alpha.3
* @see https://eslint.org/docs/rules/max-classes-per-file
*/
"max-classes-per-file": Linter.RuleEntry<[number]>;
/**
* Rule to disallow the use of `alert`, `confirm`, and `prompt`.
*
* @since 0.0.5
* @see https://eslint.org/docs/rules/no-alert
*/
"no-alert": Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of `arguments.caller` or `arguments.callee`.
*
* @since 0.0.6
* @see https://eslint.org/docs/rules/no-caller
*/
"no-caller": Linter.RuleEntry<[]>;
/**
* Rule to disallow lexical declarations in case clauses.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 1.9.0
* @see https://eslint.org/docs/rules/no-case-declarations
*/
"no-case-declarations": Linter.RuleEntry<[]>;
/**
* Rule to disallow division operators explicitly at the beginning of regular expressions.
*
* @since 0.1.0
* @see https://eslint.org/docs/rules/no-div-regex
*/
"no-div-regex": Linter.RuleEntry<[]>;
/**
* Rule to disallow `else` blocks after `return` statements in `if` statements.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-else-return
*/
"no-else-return": Linter.RuleEntry<
[
Partial<{
/**
* @default true
*/
allowElseIf: boolean;
}>,
]
>;
/**
* Rule to disallow empty functions.
*
* @since 2.0.0
* @see https://eslint.org/docs/rules/no-empty-function
*/
"no-empty-function": Linter.RuleEntry<
[
Partial<{
/**
* @default []
*/
allow: Array<
| "functions"
| "arrowFunctions"
| "generatorFunctions"
| "methods"
| "generatorMethods"
| "getters"
| "setters"
| "constructors"
>;
}>,
]
>;
/**
* Rule to disallow empty destructuring patterns.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 1.7.0
* @see https://eslint.org/docs/rules/no-empty-pattern
*/
"no-empty-pattern": Linter.RuleEntry<[]>;
/**
* Rule to disallow `null` comparisons without type-checking operators.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-eq-null
*/
"no-eq-null": Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of `eval()`.
*
* @since 0.0.2
* @see https://eslint.org/docs/rules/no-eval
*/
"no-eval": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
allowIndirect: boolean;
}>,
]
>;
/**
* Rule to disallow extending native types.
*
* @since 0.1.4
* @see https://eslint.org/docs/rules/no-extend-native
*/
"no-extend-native": Linter.RuleEntry<
[
Partial<{
exceptions: string[];
}>,
]
>;
/**
* Rule to disallow unnecessary calls to `.bind()`.
*
* @since 0.8.0
* @see https://eslint.org/docs/rules/no-extra-bind
*/
"no-extra-bind": Linter.RuleEntry<[]>;
/**
* Rule to disallow unnecessary labels.
*
* @since 2.0.0-rc.0
* @see https://eslint.org/docs/rules/no-extra-label
*/
"no-extra-label": Linter.RuleEntry<[]>;
/**
* Rule to disallow fallthrough of `case` statements.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.7
* @see https://eslint.org/docs/rules/no-fallthrough
*/
"no-fallthrough": Linter.RuleEntry<
[
Partial<{
/**
* @default 'falls?\s?through'
*/
commentPattern: string;
}>,
]
>;
/**
* Rule to disallow leading or trailing decimal points in numeric literals.
*
* @since 0.0.6
* @see https://eslint.org/docs/rules/no-floating-decimal
*/
"no-floating-decimal": Linter.RuleEntry<[]>;
/**
* Rule to disallow assignments to native objects or read-only global variables.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 3.3.0
* @see https://eslint.org/docs/rules/no-global-assign
*/
"no-global-assign": Linter.RuleEntry<
[
Partial<{
exceptions: string[];
}>,
]
>;
/**
* Rule to disallow shorthand type conversions.
*
* @since 1.0.0-rc-2
* @see https://eslint.org/docs/rules/no-implicit-coercion
*/
"no-implicit-coercion": Linter.RuleEntry<
[
Partial<{
/**
* @default true
*/
boolean: boolean;
/**
* @default true
*/
number: boolean;
/**
* @default true
*/
string: boolean;
/**
* @default []
*/
allow: Array<"~" | "!!" | "+" | "*">;
}>,
]
>;
/**
* Rule to disallow variable and `function` declarations in the global scope.
*
* @since 2.0.0-alpha-1
* @see https://eslint.org/docs/rules/no-implicit-globals
*/
"no-implicit-globals": Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of `eval()`-like methods.
*
* @since 0.0.7
* @see https://eslint.org/docs/rules/no-implied-eval
*/
"no-implied-eval": Linter.RuleEntry<[]>;
/**
* Rule to disallow `this` keywords outside of classes or class-like objects.
*
* @since 1.0.0-rc-2
* @see https://eslint.org/docs/rules/no-invalid-this
*/
"no-invalid-this": Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of the `__iterator__` property.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-iterator
*/
"no-iterator": Linter.RuleEntry<[]>;
/**
* Rule to disallow labeled statements.
*
* @since 0.4.0
* @see https://eslint.org/docs/rules/no-labels
*/
"no-labels": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
allowLoop: boolean;
/**
* @default false
*/
allowSwitch: boolean;
}>,
]
>;
/**
* Rule to disallow unnecessary nested blocks.
*
* @since 0.4.0
* @see https://eslint.org/docs/rules/no-lone-blocks
*/
"no-lone-blocks": Linter.RuleEntry<[]>;
/**
* Rule to disallow function declarations that contain unsafe references inside loop statements.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-loop-func
*/
"no-loop-func": Linter.RuleEntry<[]>;
/**
* Rule to disallow magic numbers.
*
* @since 1.7.0
* @see https://eslint.org/docs/rules/no-magic-numbers
*/
"no-magic-numbers": Linter.RuleEntry<
[
Partial<{
/**
* @default []
*/
ignore: number[];
/**
* @default false
*/
ignoreArrayIndexes: boolean;
/**
* @default false
*/
enforceConst: boolean;
/**
* @default false
*/
detectObjects: boolean;
}>,
]
>;
/**
* Rule to disallow multiple spaces.
*
* @since 0.9.0
* @see https://eslint.org/docs/rules/no-multi-spaces
*/
"no-multi-spaces": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
ignoreEOLComments: boolean;
/**
* @default { Property: true }
*/
exceptions: Record<string, boolean>;
}>,
]
>;
/**
* Rule to disallow multiline strings.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-multi-str
*/
"no-multi-str": Linter.RuleEntry<[]>;
/**
* Rule to disallow `new` operators outside of assignments or comparisons.
*
* @since 0.0.7
* @see https://eslint.org/docs/rules/no-new
*/
"no-new": Linter.RuleEntry<[]>;
/**
* Rule to disallow `new` operators with the `Function` object.
*
* @since 0.0.7
* @see https://eslint.org/docs/rules/no-new-func
*/
"no-new-func": Linter.RuleEntry<[]>;
/**
* Rule to disallow `new` operators with the `String`, `Number`, and `Boolean` objects.
*
* @since 0.0.6
* @see https://eslint.org/docs/rules/no-new-wrappers
*/
"no-new-wrappers": Linter.RuleEntry<[]>;
/**
* Rule to disallow octal literals.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.6
* @see https://eslint.org/docs/rules/no-octal
*/
"no-octal": Linter.RuleEntry<[]>;
/**
* Rule to disallow octal escape sequences in string literals.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-octal-escape
*/
"no-octal-escape": Linter.RuleEntry<[]>;
/**
* Rule to disallow reassigning `function` parameters.
*
* @since 0.18.0
* @see https://eslint.org/docs/rules/no-param-reassign
*/
"no-param-reassign": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
props: boolean;
/**
* @default []
*/
ignorePropertyModificationsFor: string[];
}>,
]
>;
/**
* Rule to disallow the use of the `__proto__` property.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-proto
*/
"no-proto": Linter.RuleEntry<[]>;
/**
* Rule to disallow variable redeclaration.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-redeclare
*/
"no-redeclare": Linter.RuleEntry<
[
Partial<{
/**
* @default true
*/
builtinGlobals: boolean;
}>,
]
>;
/**
* Rule to disallow certain properties on certain objects.
*
* @since 3.5.0
* @see https://eslint.org/docs/rules/no-restricted-properties
*/
"no-restricted-properties": Linter.RuleEntry<
[
...Array<
| {
object: string;
property?: string | undefined;
message?: string | undefined;
}
| {
property: string;
message?: string | undefined;
}
>
]
>;
/**
* Rule to disallow assignment operators in `return` statements.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-return-assign
*/
"no-return-assign": Linter.RuleEntry<["except-parens" | "always"]>;
/**
* Rule to disallow unnecessary `return await`.
*
* @since 3.10.0
* @see https://eslint.org/docs/rules/no-return-await
*/
"no-return-await": Linter.RuleEntry<[]>;
/**
* Rule to disallow `javascript:` urls.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-script-url
*/
"no-script-url": Linter.RuleEntry<[]>;
/**
* Rule to disallow assignments where both sides are exactly the same.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 2.0.0-rc.0
* @see https://eslint.org/docs/rules/no-self-assign
*/
"no-self-assign": Linter.RuleEntry<[]>;
/**
* Rule to disallow comparisons where both sides are exactly the same.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-self-compare
*/
"no-self-compare": Linter.RuleEntry<[]>;
/**
* Rule to disallow comma operators.
*
* @since 0.5.1
* @see https://eslint.org/docs/rules/no-sequences
*/
"no-sequences": Linter.RuleEntry<[]>;
/**
* Rule to disallow throwing literals as exceptions.
*
* @since 0.15.0
* @see https://eslint.org/docs/rules/no-throw-literal
*/
"no-throw-literal": Linter.RuleEntry<[]>;
/**
* Rule to disallow unmodified loop conditions.
*
* @since 2.0.0-alpha-2
* @see https://eslint.org/docs/rules/no-unmodified-loop-condition
*/
"no-unmodified-loop-condition": Linter.RuleEntry<[]>;
/**
* Rule to disallow unused expressions.
*
* @since 0.1.0
* @see https://eslint.org/docs/rules/no-unused-expressions
*/
"no-unused-expressions": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
allowShortCircuit: boolean;
/**
* @default false
*/
allowTernary: boolean;
/**
* @default false
*/
allowTaggedTemplates: boolean;
}>,
]
>;
/**
* Rule to disallow unused labels.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 2.0.0-rc.0
* @see https://eslint.org/docs/rules/no-unused-labels
*/
"no-unused-labels": Linter.RuleEntry<[]>;
/**
* Rule to disallow unnecessary calls to `.call()` and `.apply()`.
*
* @since 1.0.0-rc-1
* @see https://eslint.org/docs/rules/no-useless-call
*/
"no-useless-call": Linter.RuleEntry<[]>;
/**
* Rule to disallow unnecessary `catch` clauses.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 5.11.0
* @see https://eslint.org/docs/rules/no-useless-catch
*/
"no-useless-catch": Linter.RuleEntry<[]>;
/**
* Rule to disallow unnecessary concatenation of literals or template literals.
*
* @since 1.3.0
* @see https://eslint.org/docs/rules/no-useless-concat
*/
"no-useless-concat": Linter.RuleEntry<[]>;
/**
* Rule to disallow unnecessary escape characters.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 2.5.0
* @see https://eslint.org/docs/rules/no-useless-escape
*/
"no-useless-escape": Linter.RuleEntry<[]>;
/**
* Rule to disallow redundant return statements.
*
* @since 3.9.0
* @see https://eslint.org/docs/rules/no-useless-return
*/
"no-useless-return": Linter.RuleEntry<[]>;
/**
* Rule to disallow `void` operators.
*
* @since 0.8.0
* @see https://eslint.org/docs/rules/no-void
*/
"no-void": Linter.RuleEntry<[]>;
/**
* Rule to disallow specified warning terms in comments.
*
* @since 0.4.4
* @see https://eslint.org/docs/rules/no-warning-comments
*/
"no-warning-comments": Linter.RuleEntry<
[
{
/**
* @default ["todo", "fixme", "xxx"]
*/
terms: string[];
/**
* @default 'start'
*/
location: "start" | "anywhere";
},
]
>;
/**
* Rule to disallow `with` statements.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.2
* @see https://eslint.org/docs/rules/no-with
*/
"no-with": Linter.RuleEntry<[]>;
/**
* Rule to enforce using named capture group in regular expression.
*
* @since 5.15.0
* @see https://eslint.org/docs/rules/prefer-named-capture-group
*/
"prefer-named-capture-group": Linter.RuleEntry<[]>;
/**
* Rule to require using Error objects as Promise rejection reasons.
*
* @since 3.14.0
* @see https://eslint.org/docs/rules/prefer-promise-reject-errors
*/
"prefer-promise-reject-errors": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
allowEmptyReject: boolean;
}>,
]
>;
/**
* Rule to enforce the consistent use of the radix argument when using `parseInt()`.
*
* @since 0.0.7
* @see https://eslint.org/docs/rules/radix
*/
radix: Linter.RuleEntry<["always" | "as-needed"]>;
/**
* Rule to disallow async functions which have no `await` expression.
*
* @since 3.11.0
* @see https://eslint.org/docs/rules/require-await
*/
"require-await": Linter.RuleEntry<[]>;
/**
* Rule to enforce the use of `u` flag on RegExp.
*
* @since 5.3.0
* @see https://eslint.org/docs/rules/require-unicode-regexp
*/
"require-unicode-regexp": Linter.RuleEntry<[]>;
/**
* Rule to require `var` declarations be placed at the top of their containing scope.
*
* @since 0.8.0
* @see https://eslint.org/docs/rules/vars-on-top
*/
"vars-on-top": Linter.RuleEntry<[]>;
/**
* Rule to require parentheses around immediate `function` invocations.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/wrap-iife
*/
"wrap-iife": Linter.RuleEntry<
[
"outside" | "inside" | "any",
Partial<{
/**
* @default false
*/
functionPrototypeMethods: boolean;
}>,
]
>;
/**
* Rule to require or disallow “Yoda” conditions.
*
* @since 0.7.1
* @see https://eslint.org/docs/rules/yoda
*/
yoda:
| Linter.RuleEntry<
[
"never",
Partial<{
exceptRange: boolean;
onlyEquality: boolean;
}>,
]
>
| Linter.RuleEntry<["always"]>;
}

267
node_modules/@types/eslint/rules/deprecated.d.ts generated vendored Normal file
View File

@ -0,0 +1,267 @@
import { Linter } from "../index";
export interface Deprecated extends Linter.RulesRecord {
/**
* Rule to enforce consistent indentation.
*
* @since 4.0.0-alpha.0
* @deprecated since 4.0.0, use [`indent`](https://eslint.org/docs/rules/indent) instead.
* @see https://eslint.org/docs/rules/indent-legacy
*/
"indent-legacy": Linter.RuleEntry<
[
number | "tab",
Partial<{
/**
* @default 0
*/
SwitchCase: number;
/**
* @default 1
*/
VariableDeclarator:
| Partial<{
/**
* @default 1
*/
var: number | "first";
/**
* @default 1
*/
let: number | "first";
/**
* @default 1
*/
const: number | "first";
}>
| number
| "first";
/**
* @default 1
*/
outerIIFEBody: number;
/**
* @default 1
*/
MemberExpression: number | "off";
/**
* @default { parameters: 1, body: 1 }
*/
FunctionDeclaration: Partial<{
/**
* @default 1
*/
parameters: number | "first" | "off";
/**
* @default 1
*/
body: number;
}>;
/**
* @default { parameters: 1, body: 1 }
*/
FunctionExpression: Partial<{
/**
* @default 1
*/
parameters: number | "first" | "off";
/**
* @default 1
*/
body: number;
}>;
/**
* @default { arguments: 1 }
*/
CallExpression: Partial<{
/**
* @default 1
*/
arguments: number | "first" | "off";
}>;
/**
* @default 1
*/
ArrayExpression: number | "first" | "off";
/**
* @default 1
*/
ObjectExpression: number | "first" | "off";
/**
* @default 1
*/
ImportDeclaration: number | "first" | "off";
/**
* @default false
*/
flatTernaryExpressions: boolean;
ignoredNodes: string[];
/**
* @default false
*/
ignoreComments: boolean;
}>,
]
>;
/**
* Rule to require or disallow newlines around directives.
*
* @since 3.5.0
* @deprecated since 4.0.0, use [`padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) instead.
* @see https://eslint.org/docs/rules/lines-around-directive
*/
"lines-around-directive": Linter.RuleEntry<["always" | "never"]>;
/**
* Rule to require or disallow an empty line after variable declarations.
*
* @since 0.18.0
* @deprecated since 4.0.0, use [`padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) instead.
* @see https://eslint.org/docs/rules/newline-after-var
*/
"newline-after-var": Linter.RuleEntry<["always" | "never"]>;
/**
* Rule to require an empty line before `return` statements.
*
* @since 2.3.0
* @deprecated since 4.0.0, use [`padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) instead.
* @see https://eslint.org/docs/rules/newline-before-return
*/
"newline-before-return": Linter.RuleEntry<[]>;
/**
* Rule to disallow shadowing of variables inside of `catch`.
*
* @since 0.0.9
* @deprecated since 5.1.0, use [`no-shadow`](https://eslint.org/docs/rules/no-shadow) instead.
* @see https://eslint.org/docs/rules/no-catch-shadow
*/
"no-catch-shadow": Linter.RuleEntry<[]>;
/**
* Rule to disallow reassignment of native objects.
*
* @since 0.0.9
* @deprecated since 3.3.0, use [`no-global-assign`](https://eslint.org/docs/rules/no-global-assign) instead.
* @see https://eslint.org/docs/rules/no-native-reassign
*/
"no-native-reassign": Linter.RuleEntry<
[
Partial<{
exceptions: string[];
}>,
]
>;
/**
* Rule to disallow negating the left operand in `in` expressions.
*
* @since 0.1.2
* @deprecated since 3.3.0, use [`no-unsafe-negation`](https://eslint.org/docs/rules/no-unsafe-negation) instead.
* @see https://eslint.org/docs/rules/no-negated-in-lhs
*/
"no-negated-in-lhs": Linter.RuleEntry<[]>;
/**
* Rule to disallow spacing between function identifiers and their applications.
*
* @since 0.1.2
* @deprecated since 3.3.0, use [`func-call-spacing`](https://eslint.org/docs/rules/func-call-spacing) instead.
* @see https://eslint.org/docs/rules/no-spaced-func
*/
"no-spaced-func": Linter.RuleEntry<[]>;
/**
* Rule to suggest using `Reflect` methods where applicable.
*
* @since 1.0.0-rc-2
* @deprecated since 3.9.0
* @see https://eslint.org/docs/rules/prefer-reflect
*/
"prefer-reflect": Linter.RuleEntry<
[
Partial<{
exceptions: string[];
}>,
]
>;
/**
* Rule to require JSDoc comments.
*
* @since 1.4.0
* @deprecated since 5.10.0
* @see https://eslint.org/docs/rules/require-jsdoc
*/
"require-jsdoc": Linter.RuleEntry<
[
Partial<{
require: Partial<{
/**
* @default true
*/
FunctionDeclaration: boolean;
/**
* @default false
*/
MethodDefinition: boolean;
/**
* @default false
*/
ClassDeclaration: boolean;
/**
* @default false
*/
ArrowFunctionExpression: boolean;
/**
* @default false
*/
FunctionExpression: boolean;
}>;
}>,
]
>;
/**
* Rule to enforce valid JSDoc comments.
*
* @since 0.4.0
* @deprecated since 5.10.0
* @see https://eslint.org/docs/rules/valid-jsdoc
*/
"valid-jsdoc": Linter.RuleEntry<
[
Partial<{
prefer: Record<string, string>;
preferType: Record<string, string>;
/**
* @default true
*/
requireReturn: boolean;
/**
* @default true
*/
requireReturnType: boolean;
/**
* @remarks
* Also accept for regular expression pattern
*/
matchDescription: string;
/**
* @default true
*/
requireParamDescription: boolean;
/**
* @default true
*/
requireReturnDescription: boolean;
/**
* @default true
*/
requireParamType: boolean;
}>,
]
>;
}

502
node_modules/@types/eslint/rules/ecmascript-6.d.ts generated vendored Normal file
View File

@ -0,0 +1,502 @@
import { Linter } from "../index";
export interface ECMAScript6 extends Linter.RulesRecord {
/**
* Rule to require braces around arrow function bodies.
*
* @since 1.8.0
* @see https://eslint.org/docs/rules/arrow-body-style
*/
"arrow-body-style":
| Linter.RuleEntry<
[
"as-needed",
Partial<{
/**
* @default false
*/
requireReturnForObjectLiteral: boolean;
}>,
]
>
| Linter.RuleEntry<["always" | "never"]>;
/**
* Rule to require parentheses around arrow function arguments.
*
* @since 1.0.0-rc-1
* @see https://eslint.org/docs/rules/arrow-parens
*/
"arrow-parens":
| Linter.RuleEntry<["always"]>
| Linter.RuleEntry<
[
"as-needed",
Partial<{
/**
* @default false
*/
requireForBlockBody: boolean;
}>,
]
>;
/**
* Rule to enforce consistent spacing before and after the arrow in arrow functions.
*
* @since 1.0.0-rc-1
* @see https://eslint.org/docs/rules/arrow-spacing
*/
"arrow-spacing": Linter.RuleEntry<[]>;
/**
* Rule to require `super()` calls in constructors.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.24.0
* @see https://eslint.org/docs/rules/constructor-super
*/
"constructor-super": Linter.RuleEntry<[]>;
/**
* Rule to enforce consistent spacing around `*` operators in generator functions.
*
* @since 0.17.0
* @see https://eslint.org/docs/rules/generator-star-spacing
*/
"generator-star-spacing": Linter.RuleEntry<
[
| Partial<{
before: boolean;
after: boolean;
named:
| Partial<{
before: boolean;
after: boolean;
}>
| "before"
| "after"
| "both"
| "neither";
anonymous:
| Partial<{
before: boolean;
after: boolean;
}>
| "before"
| "after"
| "both"
| "neither";
method:
| Partial<{
before: boolean;
after: boolean;
}>
| "before"
| "after"
| "both"
| "neither";
}>
| "before"
| "after"
| "both"
| "neither",
]
>;
/**
* Rule to disallow reassigning class members.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 1.0.0-rc-1
* @see https://eslint.org/docs/rules/no-class-assign
*/
"no-class-assign": Linter.RuleEntry<[]>;
/**
* Rule to disallow arrow functions where they could be confused with comparisons.
*
* @since 2.0.0-alpha-2
* @see https://eslint.org/docs/rules/no-confusing-arrow
*/
"no-confusing-arrow": Linter.RuleEntry<
[
Partial<{
/**
* @default true
*/
allowParens: boolean;
}>,
]
>;
/**
* Rule to disallow reassigning `const` variables.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 1.0.0-rc-1
* @see https://eslint.org/docs/rules/no-const-assign
*/
"no-const-assign": Linter.RuleEntry<[]>;
/**
* Rule to disallow duplicate class members.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 1.2.0
* @see https://eslint.org/docs/rules/no-dupe-class-members
*/
"no-dupe-class-members": Linter.RuleEntry<[]>;
/**
* Rule to disallow duplicate module imports.
*
* @since 2.5.0
* @see https://eslint.org/docs/rules/no-duplicate-import
*/
"no-duplicate-import": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
includeExports: boolean;
}>,
]
>;
/**
* Rule to disallow `new` operators with the `Symbol` object.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 2.0.0-beta.1
* @see https://eslint.org/docs/rules/no-new-symbol
*/
"no-new-symbol": Linter.RuleEntry<[]>;
/**
* Rule to disallow specified modules when loaded by `import`.
*
* @since 2.0.0-alpha-1
* @see https://eslint.org/docs/rules/no-restricted-imports
*/
"no-restricted-imports": Linter.RuleEntry<
[
...Array<
| string
| {
name: string;
importNames?: string[] | undefined;
message?: string | undefined;
}
| Partial<{
paths: Array<
| string
| {
name: string;
importNames?: string[] | undefined;
message?: string | undefined;
}
>;
patterns: string[];
}>
>
]
>;
/**
* Rule to disallow `this`/`super` before calling `super()` in constructors.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.24.0
* @see https://eslint.org/docs/rules/no-this-before-super
*/
"no-this-before-super": Linter.RuleEntry<[]>;
/**
* Rule to disallow unnecessary computed property keys in object literals.
*
* @since 2.9.0
* @see https://eslint.org/docs/rules/no-useless-computed-key
*/
"no-useless-computed-key": Linter.RuleEntry<[]>;
/**
* Rule to disallow unnecessary constructors.
*
* @since 2.0.0-beta.1
* @see https://eslint.org/docs/rules/no-useless-constructor
*/
"no-useless-constructor": Linter.RuleEntry<[]>;
/**
* Rule to disallow renaming import, export, and destructured assignments to the same name.
*
* @since 2.11.0
* @see https://eslint.org/docs/rules/no-useless-rename
*/
"no-useless-rename": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
ignoreImport: boolean;
/**
* @default false
*/
ignoreExport: boolean;
/**
* @default false
*/
ignoreDestructuring: boolean;
}>,
]
>;
/**
* Rule to require `let` or `const` instead of `var`.
*
* @since 0.12.0
* @see https://eslint.org/docs/rules/no-var
*/
"no-var": Linter.RuleEntry<[]>;
/**
* Rule to require or disallow method and property shorthand syntax for object literals.
*
* @since 0.20.0
* @see https://eslint.org/docs/rules/object-shorthand
*/
"object-shorthand":
| Linter.RuleEntry<
[
"always" | "methods",
Partial<{
/**
* @default false
*/
avoidQuotes: boolean;
/**
* @default false
*/
ignoreConstructors: boolean;
/**
* @default false
*/
avoidExplicitReturnArrows: boolean;
}>,
]
>
| Linter.RuleEntry<
[
"properties",
Partial<{
/**
* @default false
*/
avoidQuotes: boolean;
}>,
]
>
| Linter.RuleEntry<["never" | "consistent" | "consistent-as-needed"]>;
/**
* Rule to require using arrow functions for callbacks.
*
* @since 1.2.0
* @see https://eslint.org/docs/rules/prefer-arrow-callback
*/
"prefer-arrow-callback": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
allowNamedFunctions: boolean;
/**
* @default true
*/
allowUnboundThis: boolean;
}>,
]
>;
/**
* Rule to require `const` declarations for variables that are never reassigned after declared.
*
* @since 0.23.0
* @see https://eslint.org/docs/rules/prefer-const
*/
"prefer-const": Linter.RuleEntry<
[
Partial<{
/**
* @default 'any'
*/
destructuring: "any" | "all";
/**
* @default false
*/
ignoreReadBeforeAssign: boolean;
}>,
]
>;
/**
* Rule to require destructuring from arrays and/or objects.
*
* @since 3.13.0
* @see https://eslint.org/docs/rules/prefer-destructuring
*/
"prefer-destructuring": Linter.RuleEntry<
[
Partial<
| {
VariableDeclarator: Partial<{
array: boolean;
object: boolean;
}>;
AssignmentExpression: Partial<{
array: boolean;
object: boolean;
}>;
}
| {
array: boolean;
object: boolean;
}
>,
Partial<{
enforceForRenamedProperties: boolean;
}>,
]
>;
/**
* Rule to disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals.
*
* @since 3.5.0
* @see https://eslint.org/docs/rules/prefer-numeric-literals
*/
"prefer-numeric-literals": Linter.RuleEntry<[]>;
/**
* Rule to require rest parameters instead of `arguments`.
*
* @since 2.0.0-alpha-1
* @see https://eslint.org/docs/rules/prefer-rest-params
*/
"prefer-rest-params": Linter.RuleEntry<[]>;
/**
* Rule to require spread operators instead of `.apply()`.
*
* @since 1.0.0-rc-1
* @see https://eslint.org/docs/rules/prefer-spread
*/
"prefer-spread": Linter.RuleEntry<[]>;
/**
* Rule to require template literals instead of string concatenation.
*
* @since 1.2.0
* @see https://eslint.org/docs/rules/prefer-template
*/
"prefer-template": Linter.RuleEntry<[]>;
/**
* Rule to require generator functions to contain `yield`.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 1.0.0-rc-1
* @see https://eslint.org/docs/rules/require-yield
*/
"require-yield": Linter.RuleEntry<[]>;
/**
* Rule to enforce spacing between rest and spread operators and their expressions.
*
* @since 2.12.0
* @see https://eslint.org/docs/rules/rest-spread-spacing
*/
"rest-spread-spacing": Linter.RuleEntry<["never" | "always"]>;
/**
* Rule to enforce sorted import declarations within modules.
*
* @since 2.0.0-beta.1
* @see https://eslint.org/docs/rules/sort-imports
*/
"sort-imports": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
ignoreCase: boolean;
/**
* @default false
*/
ignoreDeclarationSort: boolean;
/**
* @default false
*/
ignoreMemberSort: boolean;
/**
* @default ['none', 'all', 'multiple', 'single']
*/
memberSyntaxSortOrder: Array<"none" | "all" | "multiple" | "single">;
}>,
]
>;
/**
* Rule to require symbol descriptions.
*
* @since 3.4.0
* @see https://eslint.org/docs/rules/symbol-description
*/
"symbol-description": Linter.RuleEntry<[]>;
/**
* Rule to require or disallow spacing around embedded expressions of template strings.
*
* @since 2.0.0-rc.0
* @see https://eslint.org/docs/rules/template-curly-spacing
*/
"template-curly-spacing": Linter.RuleEntry<["never" | "always"]>;
/**
* Rule to require or disallow spacing around the `*` in `yield*` expressions.
*
* @since 2.0.0-alpha-1
* @see https://eslint.org/docs/rules/yield-star-spacing
*/
"yield-star-spacing": Linter.RuleEntry<
[
| Partial<{
before: boolean;
after: boolean;
}>
| "before"
| "after"
| "both"
| "neither",
]
>;
}

21
node_modules/@types/eslint/rules/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,21 @@
import { Linter } from "../index";
import { BestPractices } from "./best-practices";
import { Deprecated } from "./deprecated";
import { ECMAScript6 } from "./ecmascript-6";
import { NodeJSAndCommonJS } from "./node-commonjs";
import { PossibleErrors } from "./possible-errors";
import { StrictMode } from "./strict-mode";
import { StylisticIssues } from "./stylistic-issues";
import { Variables } from "./variables";
export interface ESLintRules
extends Linter.RulesRecord,
PossibleErrors,
BestPractices,
StrictMode,
Variables,
NodeJSAndCommonJS,
StylisticIssues,
ECMAScript6,
Deprecated {}

133
node_modules/@types/eslint/rules/node-commonjs.d.ts generated vendored Normal file
View File

@ -0,0 +1,133 @@
import { Linter } from "../index";
export interface NodeJSAndCommonJS extends Linter.RulesRecord {
/**
* Rule to require `return` statements after callbacks.
*
* @since 1.0.0-rc-1
* @see https://eslint.org/docs/rules/callback-return
*/
"callback-return": Linter.RuleEntry<[string[]]>;
/**
* Rule to require `require()` calls to be placed at top-level module scope.
*
* @since 1.4.0
* @see https://eslint.org/docs/rules/global-require
*/
"global-require": Linter.RuleEntry<[]>;
/**
* Rule to require error handling in callbacks.
*
* @since 0.4.5
* @see https://eslint.org/docs/rules/handle-callback-err
*/
"handle-callback-err": Linter.RuleEntry<[string]>;
/**
* Rule to disallow use of the `Buffer()` constructor.
*
* @since 4.0.0-alpha.0
* @see https://eslint.org/docs/rules/no-buffer-constructor
*/
"no-buffer-constructor": Linter.RuleEntry<[]>;
/**
* Rule to disallow `require` calls to be mixed with regular variable declarations.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-mixed-requires
*/
"no-mixed-requires": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
grouping: boolean;
/**
* @default false
*/
allowCall: boolean;
}>,
]
>;
/**
* Rule to disallow `new` operators with calls to `require`.
*
* @since 0.6.0
* @see https://eslint.org/docs/rules/no-new-require
*/
"no-new-require": Linter.RuleEntry<[]>;
/**
* Rule to disallow string concatenation when using `__dirname` and `__filename`.
*
* @since 0.4.0
* @see https://eslint.org/docs/rules/no-path-concat
*/
"no-path-concat": Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of `process.env`.
*
* @since 0.9.0
* @see https://eslint.org/docs/rules/no-process-env
*/
"no-process-env": Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of `process.exit()`.
*
* @since 0.4.0
* @see https://eslint.org/docs/rules/no-process-exit
*/
"no-process-exit": Linter.RuleEntry<[]>;
/**
* Rule to disallow specified modules when loaded by `require`.
*
* @since 0.6.0
* @see https://eslint.org/docs/rules/no-restricted-modules
*/
"no-restricted-modules": Linter.RuleEntry<
[
...Array<
| string
| {
name: string;
message?: string | undefined;
}
| Partial<{
paths: Array<
| string
| {
name: string;
message?: string | undefined;
}
>;
patterns: string[];
}>
>
]
>;
/**
* Rule to disallow synchronous methods.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-sync
*/
"no-sync": Linter.RuleEntry<
[
{
/**
* @default false
*/
allowAtRootLevel: boolean;
},
]
>;
}

484
node_modules/@types/eslint/rules/possible-errors.d.ts generated vendored Normal file
View File

@ -0,0 +1,484 @@
import { Linter } from "../index";
export interface PossibleErrors extends Linter.RulesRecord {
/**
* Rule to enforce `for` loop update clause moving the counter in the right direction.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 4.0.0-beta.0
* @see https://eslint.org/docs/rules/for-direction
*/
"for-direction": Linter.RuleEntry<[]>;
/**
* Rule to enforce `return` statements in getters.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 4.2.0
* @see https://eslint.org/docs/rules/getter-return
*/
"getter-return": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
allowImplicit: boolean;
}>,
]
>;
/**
* Rule to disallow using an async function as a `Promise` executor.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 5.3.0
* @see https://eslint.org/docs/rules/no-async-promise-executor
*/
"no-async-promise-executor": Linter.RuleEntry<[]>;
/**
* Rule to disallow `await` inside of loops.
*
* @since 3.12.0
* @see https://eslint.org/docs/rules/no-await-in-loop
*/
"no-await-in-loop": Linter.RuleEntry<[]>;
/**
* Rule to disallow comparing against `-0`.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 3.17.0
* @see https://eslint.org/docs/rules/no-compare-neg-zero
*/
"no-compare-neg-zero": Linter.RuleEntry<[]>;
/**
* Rule to disallow assignment operators in conditional statements.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-cond-assign
*/
"no-cond-assign": Linter.RuleEntry<["except-parens" | "always"]>;
/**
* Rule to disallow the use of `console`.
*
* @since 0.0.2
* @see https://eslint.org/docs/rules/no-console
*/
"no-console": Linter.RuleEntry<
[
Partial<{
allow: Array<keyof Console>;
}>,
]
>;
/**
* Rule to disallow constant expressions in conditions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.4.1
* @see https://eslint.org/docs/rules/no-constant-condition
*/
"no-constant-condition": Linter.RuleEntry<
[
{
/**
* @default true
*/
checkLoops: boolean;
},
]
>;
/**
* Rule to disallow control characters in regular expressions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.1.0
* @see https://eslint.org/docs/rules/no-control-regex
*/
"no-control-regex": Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of `debugger`.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.2
* @see https://eslint.org/docs/rules/no-debugger
*/
"no-debugger": Linter.RuleEntry<[]>;
/**
* Rule to disallow duplicate arguments in `function` definitions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.16.0
* @see https://eslint.org/docs/rules/no-dupe-args
*/
"no-dupe-args": Linter.RuleEntry<[]>;
/**
* Rule to disallow duplicate keys in object literals.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-dupe-keys
*/
"no-dupe-keys": Linter.RuleEntry<[]>;
/**
* Rule to disallow a duplicate case label.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.17.0
* @see https://eslint.org/docs/rules/no-duplicate-case
*/
"no-duplicate-case": Linter.RuleEntry<[]>;
/**
* Rule to disallow empty block statements.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.2
* @see https://eslint.org/docs/rules/no-empty
*/
"no-empty": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
allowEmptyCatch: boolean;
}>,
]
>;
/**
* Rule to disallow empty character classes in regular expressions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.22.0
* @see https://eslint.org/docs/rules/no-empty-character-class
*/
"no-empty-character-class": Linter.RuleEntry<[]>;
/**
* Rule to disallow reassigning exceptions in `catch` clauses.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-ex-assign
*/
"no-ex-assign": Linter.RuleEntry<[]>;
/**
* Rule to disallow unnecessary boolean casts.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.4.0
* @see https://eslint.org/docs/rules/no-extra-boolean-cast
*/
"no-extra-boolean-cast": Linter.RuleEntry<[]>;
/**
* Rule to disallow unnecessary parentheses.
*
* @since 0.1.4
* @see https://eslint.org/docs/rules/no-extra-parens
*/
"no-extra-parens":
| Linter.RuleEntry<
[
"all",
Partial<{
/**
* @default true,
*/
conditionalAssign: boolean;
/**
* @default true
*/
returnAssign: boolean;
/**
* @default true
*/
nestedBinaryExpressions: boolean;
/**
* @default 'none'
*/
ignoreJSX: "none" | "all" | "multi-line" | "single-line";
/**
* @default true
*/
enforceForArrowConditionals: boolean;
}>,
]
>
| Linter.RuleEntry<["functions"]>;
/**
* Rule to disallow unnecessary semicolons.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-extra-semi
*/
"no-extra-semi": Linter.RuleEntry<[]>;
/**
* Rule to disallow reassigning `function` declarations.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-func-assign
*/
"no-func-assign": Linter.RuleEntry<[]>;
/**
* Rule to disallow variable or `function` declarations in nested blocks.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.6.0
* @see https://eslint.org/docs/rules/no-inner-declarations
*/
"no-inner-declarations": Linter.RuleEntry<["functions" | "both"]>;
/**
* Rule to disallow invalid regular expression strings in `RegExp` constructors.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.1.4
* @see https://eslint.org/docs/rules/no-invalid-regexp
*/
"no-invalid-regexp": Linter.RuleEntry<
[
Partial<{
allowConstructorFlags: string[];
}>,
]
>;
/**
* Rule to disallow irregular whitespace.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.9.0
* @see https://eslint.org/docs/rules/no-irregular-whitespace
*/
"no-irregular-whitespace": Linter.RuleEntry<
[
Partial<{
/**
* @default true
*/
skipStrings: boolean;
/**
* @default false
*/
skipComments: boolean;
/**
* @default false
*/
skipRegExps: boolean;
/**
* @default false
*/
skipTemplates: boolean;
}>,
]
>;
/**
* Rule to disallow characters which are made with multiple code points in character class syntax.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 5.3.0
* @see https://eslint.org/docs/rules/no-misleading-character-class
*/
"no-misleading-character-class": Linter.RuleEntry<[]>;
/**
* Rule to disallow calling global object properties as functions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-obj-calls
*/
"no-obj-calls": Linter.RuleEntry<[]>;
/**
* Rule to disallow use of `Object.prototypes` builtins directly.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 2.11.0
* @see https://eslint.org/docs/rules/no-prototype-builtins
*/
"no-prototype-builtins": Linter.RuleEntry<[]>;
/**
* Rule to disallow multiple spaces in regular expressions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.4.0
* @see https://eslint.org/docs/rules/no-regex-spaces
*/
"no-regex-spaces": Linter.RuleEntry<[]>;
/**
* Rule to disallow sparse arrays.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.4.0
* @see https://eslint.org/docs/rules/no-sparse-arrays
*/
"no-sparse-arrays": Linter.RuleEntry<[]>;
/**
* Rule to disallow template literal placeholder syntax in regular strings.
*
* @since 3.3.0
* @see https://eslint.org/docs/rules/no-template-curly-in-string
*/
"no-template-curly-in-string": Linter.RuleEntry<[]>;
/**
* Rule to disallow confusing multiline expressions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.24.0
* @see https://eslint.org/docs/rules/no-unexpected-multiline
*/
"no-unexpected-multiline": Linter.RuleEntry<[]>;
/**
* Rule to disallow unreachable code after `return`, `throw`, `continue`, and `break` statements.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.6
* @see https://eslint.org/docs/rules/no-unreachable
*/
"no-unreachable": Linter.RuleEntry<[]>;
/**
* Rule to disallow control flow statements in `finally` blocks.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 2.9.0
* @see https://eslint.org/docs/rules/no-unsafe-finally
*/
"no-unsafe-finally": Linter.RuleEntry<[]>;
/**
* Rule to disallow negating the left operand of relational operators.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 3.3.0
* @see https://eslint.org/docs/rules/no-unsafe-negation
*/
"no-unsafe-negation": Linter.RuleEntry<[]>;
/**
* Rule to disallow assignments that can lead to race conditions due to usage of `await` or `yield`.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 5.3.0
* @see https://eslint.org/docs/rules/require-atomic-updates
*/
"require-atomic-updates": Linter.RuleEntry<[]>;
/**
* Rule to require calls to `isNaN()` when checking for `NaN`.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.6
* @see https://eslint.org/docs/rules/use-isnan
*/
"use-isnan": Linter.RuleEntry<[]>;
/**
* Rule to enforce comparing `typeof` expressions against valid strings.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.5.0
* @see https://eslint.org/docs/rules/valid-typeof
*/
"valid-typeof": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
requireStringLiterals: boolean;
}>,
]
>;
}

11
node_modules/@types/eslint/rules/strict-mode.d.ts generated vendored Normal file
View File

@ -0,0 +1,11 @@
import { Linter } from "../index";
export interface StrictMode extends Linter.RulesRecord {
/**
* Rule to require or disallow strict mode directives.
*
* @since 0.1.0
* @see https://eslint.org/docs/rules/strict
*/
strict: Linter.RuleEntry<["safe" | "global" | "function" | "never"]>;
}

1897
node_modules/@types/eslint/rules/stylistic-issues.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

187
node_modules/@types/eslint/rules/variables.d.ts generated vendored Normal file
View File

@ -0,0 +1,187 @@
import { Linter } from "../index";
export interface Variables extends Linter.RulesRecord {
/**
* Rule to require or disallow initialization in variable declarations.
*
* @since 1.0.0-rc-1
* @see https://eslint.org/docs/rules/init-declarations
*/
"init-declarations":
| Linter.RuleEntry<["always"]>
| Linter.RuleEntry<
[
"never",
Partial<{
ignoreForLoopInit: boolean;
}>,
]
>;
/**
* Rule to disallow deleting variables.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-delete-var
*/
"no-delete-var": Linter.RuleEntry<[]>;
/**
* Rule to disallow labels that share a name with a variable.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-label-var
*/
"no-label-var": Linter.RuleEntry<[]>;
/**
* Rule to disallow specified global variables.
*
* @since 2.3.0
* @see https://eslint.org/docs/rules/no-restricted-globals
*/
"no-restricted-globals": Linter.RuleEntry<
[
...Array<
| string
| {
name: string;
message?: string | undefined;
}
>
]
>;
/**
* Rule to disallow variable declarations from shadowing variables declared in the outer scope.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-shadow
*/
"no-shadow": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
builtinGlobals: boolean;
/**
* @default 'functions'
*/
hoist: "functions" | "all" | "never";
allow: string[];
}>,
]
>;
/**
* Rule to disallow identifiers from shadowing restricted names.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.1.4
* @see https://eslint.org/docs/rules/no-shadow-restricted-names
*/
"no-shadow-restricted-names": Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of undeclared variables unless mentioned in `global` comments.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-undef
*/
"no-undef": Linter.RuleEntry<
[
Partial<{
/**
* @default false
*/
typeof: boolean;
}>,
]
>;
/**
* Rule to disallow initializing variables to `undefined`.
*
* @since 0.0.6
* @see https://eslint.org/docs/rules/no-undef-init
*/
"no-undef-init": Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of `undefined` as an identifier.
*
* @since 0.7.1
* @see https://eslint.org/docs/rules/no-undefined
*/
"no-undefined": Linter.RuleEntry<[]>;
/**
* Rule to disallow unused variables.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-unused-vars
*/
"no-unused-vars": Linter.RuleEntry<
[
Partial<{
/**
* @default 'all'
*/
vars: "all" | "local";
varsIgnorePattern: string;
/**
* @default 'after-used'
*/
args: "after-used" | "all" | "none";
/**
* @default false
*/
ignoreRestSiblings: boolean;
argsIgnorePattern: string;
/**
* @default 'none'
*/
caughtErrors: "none" | "all";
caughtErrorsIgnorePattern: string;
}>,
]
>;
/**
* Rule to disallow the use of variables before they are defined.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-use-before-define
*/
"no-use-before-define": Linter.RuleEntry<
[
| Partial<{
/**
* @default true
*/
functions: boolean;
/**
* @default true
*/
classes: boolean;
/**
* @default true
*/
variables: boolean;
}>
| "nofunc",
]
>;
}

8
node_modules/@types/eslint/use-at-your-own-risk.d.ts generated vendored Normal file
View File

@ -0,0 +1,8 @@
/** @deprecated */
export const builtinRules: Map<string, import("./index.js").Rule.RuleModule>;
/** @deprecated */
export class FileEnumerator {
constructor(params?: {cwd?: string, configArrayFactory?: any, extensions?: any, globInputPaths?: boolean, errorOnUnmatchedPattern?: boolean, ignore?: boolean});
isTargetPath(filePath: string, providedConfig?: any): boolean;
iterateFiles(patternOrPatterns: string | string[]): IterableIterator<{config: any, filePath: string, ignored: boolean}>;
}

21
node_modules/@types/estree/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/estree/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/estree`
# Summary
This package contains type definitions for estree (https://github.com/estree/estree).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree.
### Additional Details
* Last updated: Wed, 19 Apr 2023 05:02:44 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by [RReverser](https://github.com/RReverser).

167
node_modules/@types/estree/flow.d.ts generated vendored Normal file
View File

@ -0,0 +1,167 @@
declare namespace ESTree {
interface FlowTypeAnnotation extends Node {}
interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {}
interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {}
interface FlowDeclaration extends Declaration {}
interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {}
interface ArrayTypeAnnotation extends FlowTypeAnnotation {
elementType: FlowTypeAnnotation;
}
interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {}
interface ClassImplements extends Node {
id: Identifier;
typeParameters?: TypeParameterInstantiation | null;
}
interface ClassProperty {
key: Expression;
value?: Expression | null;
typeAnnotation?: TypeAnnotation | null;
computed: boolean;
static: boolean;
}
interface DeclareClass extends FlowDeclaration {
id: Identifier;
typeParameters?: TypeParameterDeclaration | null;
body: ObjectTypeAnnotation;
extends: InterfaceExtends[];
}
interface DeclareFunction extends FlowDeclaration {
id: Identifier;
}
interface DeclareModule extends FlowDeclaration {
id: Literal | Identifier;
body: BlockStatement;
}
interface DeclareVariable extends FlowDeclaration {
id: Identifier;
}
interface FunctionTypeAnnotation extends FlowTypeAnnotation {
params: FunctionTypeParam[];
returnType: FlowTypeAnnotation;
rest?: FunctionTypeParam | null;
typeParameters?: TypeParameterDeclaration | null;
}
interface FunctionTypeParam {
name: Identifier;
typeAnnotation: FlowTypeAnnotation;
optional: boolean;
}
interface GenericTypeAnnotation extends FlowTypeAnnotation {
id: Identifier | QualifiedTypeIdentifier;
typeParameters?: TypeParameterInstantiation | null;
}
interface InterfaceExtends extends Node {
id: Identifier | QualifiedTypeIdentifier;
typeParameters?: TypeParameterInstantiation | null;
}
interface InterfaceDeclaration extends FlowDeclaration {
id: Identifier;
typeParameters?: TypeParameterDeclaration | null;
extends: InterfaceExtends[];
body: ObjectTypeAnnotation;
}
interface IntersectionTypeAnnotation extends FlowTypeAnnotation {
types: FlowTypeAnnotation[];
}
interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {}
interface NullableTypeAnnotation extends FlowTypeAnnotation {
typeAnnotation: TypeAnnotation;
}
interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {}
interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
interface StringTypeAnnotation extends FlowBaseTypeAnnotation {}
interface TupleTypeAnnotation extends FlowTypeAnnotation {
types: FlowTypeAnnotation[];
}
interface TypeofTypeAnnotation extends FlowTypeAnnotation {
argument: FlowTypeAnnotation;
}
interface TypeAlias extends FlowDeclaration {
id: Identifier;
typeParameters?: TypeParameterDeclaration | null;
right: FlowTypeAnnotation;
}
interface TypeAnnotation extends Node {
typeAnnotation: FlowTypeAnnotation;
}
interface TypeCastExpression extends Expression {
expression: Expression;
typeAnnotation: TypeAnnotation;
}
interface TypeParameterDeclaration extends Node {
params: Identifier[];
}
interface TypeParameterInstantiation extends Node {
params: FlowTypeAnnotation[];
}
interface ObjectTypeAnnotation extends FlowTypeAnnotation {
properties: ObjectTypeProperty[];
indexers: ObjectTypeIndexer[];
callProperties: ObjectTypeCallProperty[];
}
interface ObjectTypeCallProperty extends Node {
value: FunctionTypeAnnotation;
static: boolean;
}
interface ObjectTypeIndexer extends Node {
id: Identifier;
key: FlowTypeAnnotation;
value: FlowTypeAnnotation;
static: boolean;
}
interface ObjectTypeProperty extends Node {
key: Expression;
value: FlowTypeAnnotation;
optional: boolean;
static: boolean;
}
interface QualifiedTypeIdentifier extends Node {
qualification: Identifier | QualifiedTypeIdentifier;
id: Identifier;
}
interface UnionTypeAnnotation extends FlowTypeAnnotation {
types: FlowTypeAnnotation[];
}
interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {}
}

680
node_modules/@types/estree/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,680 @@
// Type definitions for non-npm package estree 1.0
// Project: https://github.com/estree/estree
// Definitions by: RReverser <https://github.com/RReverser>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// This definition file follows a somewhat unusual format. ESTree allows
// runtime type checks based on the `type` parameter. In order to explain this
// to typescript we want to use discriminated union types:
// https://github.com/Microsoft/TypeScript/pull/9163
//
// For ESTree this is a bit tricky because the high level interfaces like
// Node or Function are pulling double duty. We want to pass common fields down
// to the interfaces that extend them (like Identifier or
// ArrowFunctionExpression), but you can't extend a type union or enforce
// common fields on them. So we've split the high level interfaces into two
// types, a base type which passes down inherited fields, and a type union of
// all types which extend the base type. Only the type union is exported, and
// the union is how other types refer to the collection of inheriting types.
//
// This makes the definitions file here somewhat more difficult to maintain,
// but it has the notable advantage of making ESTree much easier to use as
// an end user.
export interface BaseNodeWithoutComments {
// Every leaf interface that extends BaseNode must specify a type property.
// The type property should be a string literal. For example, Identifier
// has: `type: "Identifier"`
type: string;
loc?: SourceLocation | null | undefined;
range?: [number, number] | undefined;
}
export interface BaseNode extends BaseNodeWithoutComments {
leadingComments?: Comment[] | undefined;
trailingComments?: Comment[] | undefined;
}
export interface NodeMap {
AssignmentProperty: AssignmentProperty;
CatchClause: CatchClause;
Class: Class;
ClassBody: ClassBody;
Expression: Expression;
Function: Function;
Identifier: Identifier;
Literal: Literal;
MethodDefinition: MethodDefinition;
ModuleDeclaration: ModuleDeclaration;
ModuleSpecifier: ModuleSpecifier;
Pattern: Pattern;
PrivateIdentifier: PrivateIdentifier;
Program: Program;
Property: Property;
PropertyDefinition: PropertyDefinition;
SpreadElement: SpreadElement;
Statement: Statement;
Super: Super;
SwitchCase: SwitchCase;
TemplateElement: TemplateElement;
VariableDeclarator: VariableDeclarator;
}
export type Node = NodeMap[keyof NodeMap];
export interface Comment extends BaseNodeWithoutComments {
type: 'Line' | 'Block';
value: string;
}
export interface SourceLocation {
source?: string | null | undefined;
start: Position;
end: Position;
}
export interface Position {
/** >= 1 */
line: number;
/** >= 0 */
column: number;
}
export interface Program extends BaseNode {
type: 'Program';
sourceType: 'script' | 'module';
body: Array<Directive | Statement | ModuleDeclaration>;
comments?: Comment[] | undefined;
}
export interface Directive extends BaseNode {
type: 'ExpressionStatement';
expression: Literal;
directive: string;
}
export interface BaseFunction extends BaseNode {
params: Pattern[];
generator?: boolean | undefined;
async?: boolean | undefined;
// The body is either BlockStatement or Expression because arrow functions
// can have a body that's either. FunctionDeclarations and
// FunctionExpressions have only BlockStatement bodies.
body: BlockStatement | Expression;
}
export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
export type Statement =
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| Declaration;
export interface BaseStatement extends BaseNode {}
export interface EmptyStatement extends BaseStatement {
type: 'EmptyStatement';
}
export interface BlockStatement extends BaseStatement {
type: 'BlockStatement';
body: Statement[];
innerComments?: Comment[] | undefined;
}
export interface StaticBlock extends Omit<BlockStatement, 'type'> {
type: 'StaticBlock';
}
export interface ExpressionStatement extends BaseStatement {
type: 'ExpressionStatement';
expression: Expression;
}
export interface IfStatement extends BaseStatement {
type: 'IfStatement';
test: Expression;
consequent: Statement;
alternate?: Statement | null | undefined;
}
export interface LabeledStatement extends BaseStatement {
type: 'LabeledStatement';
label: Identifier;
body: Statement;
}
export interface BreakStatement extends BaseStatement {
type: 'BreakStatement';
label?: Identifier | null | undefined;
}
export interface ContinueStatement extends BaseStatement {
type: 'ContinueStatement';
label?: Identifier | null | undefined;
}
export interface WithStatement extends BaseStatement {
type: 'WithStatement';
object: Expression;
body: Statement;
}
export interface SwitchStatement extends BaseStatement {
type: 'SwitchStatement';
discriminant: Expression;
cases: SwitchCase[];
}
export interface ReturnStatement extends BaseStatement {
type: 'ReturnStatement';
argument?: Expression | null | undefined;
}
export interface ThrowStatement extends BaseStatement {
type: 'ThrowStatement';
argument: Expression;
}
export interface TryStatement extends BaseStatement {
type: 'TryStatement';
block: BlockStatement;
handler?: CatchClause | null | undefined;
finalizer?: BlockStatement | null | undefined;
}
export interface WhileStatement extends BaseStatement {
type: 'WhileStatement';
test: Expression;
body: Statement;
}
export interface DoWhileStatement extends BaseStatement {
type: 'DoWhileStatement';
body: Statement;
test: Expression;
}
export interface ForStatement extends BaseStatement {
type: 'ForStatement';
init?: VariableDeclaration | Expression | null | undefined;
test?: Expression | null | undefined;
update?: Expression | null | undefined;
body: Statement;
}
export interface BaseForXStatement extends BaseStatement {
left: VariableDeclaration | Pattern;
right: Expression;
body: Statement;
}
export interface ForInStatement extends BaseForXStatement {
type: 'ForInStatement';
}
export interface DebuggerStatement extends BaseStatement {
type: 'DebuggerStatement';
}
export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
export interface BaseDeclaration extends BaseStatement {}
export interface FunctionDeclaration extends BaseFunction, BaseDeclaration {
type: 'FunctionDeclaration';
/** It is null when a function declaration is a part of the `export default function` statement */
id: Identifier | null;
body: BlockStatement;
}
export interface VariableDeclaration extends BaseDeclaration {
type: 'VariableDeclaration';
declarations: VariableDeclarator[];
kind: 'var' | 'let' | 'const';
}
export interface VariableDeclarator extends BaseNode {
type: 'VariableDeclarator';
id: Pattern;
init?: Expression | null | undefined;
}
export interface ExpressionMap {
ArrayExpression: ArrayExpression;
ArrowFunctionExpression: ArrowFunctionExpression;
AssignmentExpression: AssignmentExpression;
AwaitExpression: AwaitExpression;
BinaryExpression: BinaryExpression;
CallExpression: CallExpression;
ChainExpression: ChainExpression;
ClassExpression: ClassExpression;
ConditionalExpression: ConditionalExpression;
FunctionExpression: FunctionExpression;
Identifier: Identifier;
ImportExpression: ImportExpression;
Literal: Literal;
LogicalExpression: LogicalExpression;
MemberExpression: MemberExpression;
MetaProperty: MetaProperty;
NewExpression: NewExpression;
ObjectExpression: ObjectExpression;
SequenceExpression: SequenceExpression;
TaggedTemplateExpression: TaggedTemplateExpression;
TemplateLiteral: TemplateLiteral;
ThisExpression: ThisExpression;
UnaryExpression: UnaryExpression;
UpdateExpression: UpdateExpression;
YieldExpression: YieldExpression;
}
export type Expression = ExpressionMap[keyof ExpressionMap];
export interface BaseExpression extends BaseNode {}
export type ChainElement = SimpleCallExpression | MemberExpression;
export interface ChainExpression extends BaseExpression {
type: 'ChainExpression';
expression: ChainElement;
}
export interface ThisExpression extends BaseExpression {
type: 'ThisExpression';
}
export interface ArrayExpression extends BaseExpression {
type: 'ArrayExpression';
elements: Array<Expression | SpreadElement | null>;
}
export interface ObjectExpression extends BaseExpression {
type: 'ObjectExpression';
properties: Array<Property | SpreadElement>;
}
export interface PrivateIdentifier extends BaseNode {
type: 'PrivateIdentifier';
name: string;
}
export interface Property extends BaseNode {
type: 'Property';
key: Expression | PrivateIdentifier;
value: Expression | Pattern; // Could be an AssignmentProperty
kind: 'init' | 'get' | 'set';
method: boolean;
shorthand: boolean;
computed: boolean;
}
export interface PropertyDefinition extends BaseNode {
type: 'PropertyDefinition';
key: Expression | PrivateIdentifier;
value?: Expression | null | undefined;
computed: boolean;
static: boolean;
}
export interface FunctionExpression extends BaseFunction, BaseExpression {
id?: Identifier | null | undefined;
type: 'FunctionExpression';
body: BlockStatement;
}
export interface SequenceExpression extends BaseExpression {
type: 'SequenceExpression';
expressions: Expression[];
}
export interface UnaryExpression extends BaseExpression {
type: 'UnaryExpression';
operator: UnaryOperator;
prefix: true;
argument: Expression;
}
export interface BinaryExpression extends BaseExpression {
type: 'BinaryExpression';
operator: BinaryOperator;
left: Expression;
right: Expression;
}
export interface AssignmentExpression extends BaseExpression {
type: 'AssignmentExpression';
operator: AssignmentOperator;
left: Pattern | MemberExpression;
right: Expression;
}
export interface UpdateExpression extends BaseExpression {
type: 'UpdateExpression';
operator: UpdateOperator;
argument: Expression;
prefix: boolean;
}
export interface LogicalExpression extends BaseExpression {
type: 'LogicalExpression';
operator: LogicalOperator;
left: Expression;
right: Expression;
}
export interface ConditionalExpression extends BaseExpression {
type: 'ConditionalExpression';
test: Expression;
alternate: Expression;
consequent: Expression;
}
export interface BaseCallExpression extends BaseExpression {
callee: Expression | Super;
arguments: Array<Expression | SpreadElement>;
}
export type CallExpression = SimpleCallExpression | NewExpression;
export interface SimpleCallExpression extends BaseCallExpression {
type: 'CallExpression';
optional: boolean;
}
export interface NewExpression extends BaseCallExpression {
type: 'NewExpression';
}
export interface MemberExpression extends BaseExpression, BasePattern {
type: 'MemberExpression';
object: Expression | Super;
property: Expression | PrivateIdentifier;
computed: boolean;
optional: boolean;
}
export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
export interface BasePattern extends BaseNode {}
export interface SwitchCase extends BaseNode {
type: 'SwitchCase';
test?: Expression | null | undefined;
consequent: Statement[];
}
export interface CatchClause extends BaseNode {
type: 'CatchClause';
param: Pattern | null;
body: BlockStatement;
}
export interface Identifier extends BaseNode, BaseExpression, BasePattern {
type: 'Identifier';
name: string;
}
export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
export interface SimpleLiteral extends BaseNode, BaseExpression {
type: 'Literal';
value: string | boolean | number | null;
raw?: string | undefined;
}
export interface RegExpLiteral extends BaseNode, BaseExpression {
type: 'Literal';
value?: RegExp | null | undefined;
regex: {
pattern: string;
flags: string;
};
raw?: string | undefined;
}
export interface BigIntLiteral extends BaseNode, BaseExpression {
type: 'Literal';
value?: bigint | null | undefined;
bigint: string;
raw?: string | undefined;
}
export type UnaryOperator = '-' | '+' | '!' | '~' | 'typeof' | 'void' | 'delete';
export type BinaryOperator =
| '=='
| '!='
| '==='
| '!=='
| '<'
| '<='
| '>'
| '>='
| '<<'
| '>>'
| '>>>'
| '+'
| '-'
| '*'
| '/'
| '%'
| '**'
| '|'
| '^'
| '&'
| 'in'
| 'instanceof';
export type LogicalOperator = '||' | '&&' | '??';
export type AssignmentOperator =
| '='
| '+='
| '-='
| '*='
| '/='
| '%='
| '**='
| '<<='
| '>>='
| '>>>='
| '|='
| '^='
| '&='
| '||='
| '&&='
| '??=';
export type UpdateOperator = '++' | '--';
export interface ForOfStatement extends BaseForXStatement {
type: 'ForOfStatement';
await: boolean;
}
export interface Super extends BaseNode {
type: 'Super';
}
export interface SpreadElement extends BaseNode {
type: 'SpreadElement';
argument: Expression;
}
export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
type: 'ArrowFunctionExpression';
expression: boolean;
body: BlockStatement | Expression;
}
export interface YieldExpression extends BaseExpression {
type: 'YieldExpression';
argument?: Expression | null | undefined;
delegate: boolean;
}
export interface TemplateLiteral extends BaseExpression {
type: 'TemplateLiteral';
quasis: TemplateElement[];
expressions: Expression[];
}
export interface TaggedTemplateExpression extends BaseExpression {
type: 'TaggedTemplateExpression';
tag: Expression;
quasi: TemplateLiteral;
}
export interface TemplateElement extends BaseNode {
type: 'TemplateElement';
tail: boolean;
value: {
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
cooked?: string | null | undefined;
raw: string;
};
}
export interface AssignmentProperty extends Property {
value: Pattern;
kind: 'init';
method: boolean; // false
}
export interface ObjectPattern extends BasePattern {
type: 'ObjectPattern';
properties: Array<AssignmentProperty | RestElement>;
}
export interface ArrayPattern extends BasePattern {
type: 'ArrayPattern';
elements: Array<Pattern | null>;
}
export interface RestElement extends BasePattern {
type: 'RestElement';
argument: Pattern;
}
export interface AssignmentPattern extends BasePattern {
type: 'AssignmentPattern';
left: Pattern;
right: Expression;
}
export type Class = ClassDeclaration | ClassExpression;
export interface BaseClass extends BaseNode {
superClass?: Expression | null | undefined;
body: ClassBody;
}
export interface ClassBody extends BaseNode {
type: 'ClassBody';
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
}
export interface MethodDefinition extends BaseNode {
type: 'MethodDefinition';
key: Expression | PrivateIdentifier;
value: FunctionExpression;
kind: 'constructor' | 'method' | 'get' | 'set';
computed: boolean;
static: boolean;
}
export interface ClassDeclaration extends BaseClass, BaseDeclaration {
type: 'ClassDeclaration';
/** It is null when a class declaration is a part of the `export default class` statement */
id: Identifier | null;
}
export interface ClassExpression extends BaseClass, BaseExpression {
type: 'ClassExpression';
id?: Identifier | null | undefined;
}
export interface MetaProperty extends BaseExpression {
type: 'MetaProperty';
meta: Identifier;
property: Identifier;
}
export type ModuleDeclaration =
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration;
export interface BaseModuleDeclaration extends BaseNode {}
export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier;
export interface BaseModuleSpecifier extends BaseNode {
local: Identifier;
}
export interface ImportDeclaration extends BaseModuleDeclaration {
type: 'ImportDeclaration';
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
source: Literal;
}
export interface ImportSpecifier extends BaseModuleSpecifier {
type: 'ImportSpecifier';
imported: Identifier;
}
export interface ImportExpression extends BaseExpression {
type: 'ImportExpression';
source: Expression;
}
export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
type: 'ImportDefaultSpecifier';
}
export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
type: 'ImportNamespaceSpecifier';
}
export interface ExportNamedDeclaration extends BaseModuleDeclaration {
type: 'ExportNamedDeclaration';
declaration?: Declaration | null | undefined;
specifiers: ExportSpecifier[];
source?: Literal | null | undefined;
}
export interface ExportSpecifier extends BaseModuleSpecifier {
type: 'ExportSpecifier';
exported: Identifier;
}
export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
type: 'ExportDefaultDeclaration';
declaration: Declaration | Expression;
}
export interface ExportAllDeclaration extends BaseModuleDeclaration {
type: 'ExportAllDeclaration';
exported: Identifier | null;
source: Literal;
}
export interface AwaitExpression extends BaseExpression {
type: 'AwaitExpression';
argument: Expression;
}

55
node_modules/@types/estree/package.json generated vendored Normal file
View File

@ -0,0 +1,55 @@
{
"_from": "@types/estree@^1.0.0",
"_id": "@types/estree@1.0.1",
"_inBundle": false,
"_integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==",
"_location": "/@types/estree",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/estree@^1.0.0",
"name": "@types/estree",
"escapedName": "@types%2festree",
"scope": "@types",
"rawSpec": "^1.0.0",
"saveSpec": null,
"fetchSpec": "^1.0.0"
},
"_requiredBy": [
"/@types/eslint",
"/@types/eslint-scope",
"/webpack"
],
"_resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz",
"_shasum": "aa22750962f3bf0e79d753d3cc067f010c95f194",
"_spec": "@types/estree@^1.0.0",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\webpack",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "RReverser",
"url": "https://github.com/RReverser"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for estree",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree",
"license": "MIT",
"main": "",
"name": "@types/estree",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/estree"
},
"scripts": {},
"typeScriptVersion": "4.3",
"types": "index.d.ts",
"typesPublisherContentHash": "6bb5253923dc858fe2d49a5555adfc2902dcbdb5536fa2b595339f0b498c29cf",
"version": "1.0.1"
}

21
node_modules/@types/express-serve-static-core/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/express-serve-static-core`
# Summary
This package contains type definitions for Express (http://expressjs.com).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core.
### Additional Details
* Last updated: Sat, 13 May 2023 03:32:51 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/qs](https://npmjs.com/package/@types/qs), [@types/range-parser](https://npmjs.com/package/@types/range-parser), [@types/send](https://npmjs.com/package/@types/send)
* Global values: none
# Credits
These definitions were written by [Boris Yankov](https://github.com/borisyankov), [Satana Charuwichitratana](https://github.com/micksatana), [Sami Jaber](https://github.com/samijaber), [Jose Luis Leon](https://github.com/JoseLion), [David Stephens](https://github.com/dwrss), and [Shin Ando](https://github.com/andoshin11).

1281
node_modules/@types/express-serve-static-core/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,79 @@
{
"_from": "@types/express-serve-static-core@*",
"_id": "@types/express-serve-static-core@4.17.35",
"_inBundle": false,
"_integrity": "sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==",
"_location": "/@types/express-serve-static-core",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/express-serve-static-core@*",
"name": "@types/express-serve-static-core",
"escapedName": "@types%2fexpress-serve-static-core",
"scope": "@types",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/@types/connect-history-api-fallback",
"/@types/express"
],
"_resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz",
"_shasum": "c95dd4424f0d32e525d23812aa8ab8e4d3906c4f",
"_spec": "@types/express-serve-static-core@*",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\@types\\connect-history-api-fallback",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Boris Yankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Satana Charuwichitratana",
"url": "https://github.com/micksatana"
},
{
"name": "Sami Jaber",
"url": "https://github.com/samijaber"
},
{
"name": "Jose Luis Leon",
"url": "https://github.com/JoseLion"
},
{
"name": "David Stephens",
"url": "https://github.com/dwrss"
},
{
"name": "Shin Ando",
"url": "https://github.com/andoshin11"
}
],
"dependencies": {
"@types/node": "*",
"@types/qs": "*",
"@types/range-parser": "*",
"@types/send": "*"
},
"deprecated": false,
"description": "TypeScript definitions for Express",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core",
"license": "MIT",
"main": "",
"name": "@types/express-serve-static-core",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/express-serve-static-core"
},
"scripts": {},
"typeScriptVersion": "4.3",
"types": "index.d.ts",
"typesPublisherContentHash": "ff8dd9048ee34bf16a6700ed4e90e394e1b8262392fc0c2dfa2e9ea6246bde19",
"version": "4.17.35"
}

21
node_modules/@types/express/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/express/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/express`
# Summary
This package contains type definitions for Express (http://expressjs.com).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express.
### Additional Details
* Last updated: Fri, 03 Feb 2023 21:32:47 GMT
* Dependencies: [@types/body-parser](https://npmjs.com/package/@types/body-parser), [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/qs](https://npmjs.com/package/@types/qs), [@types/serve-static](https://npmjs.com/package/@types/serve-static)
* Global values: none
# Credits
These definitions were written by [Boris Yankov](https://github.com/borisyankov), [China Medical University Hospital](https://github.com/CMUH), [Puneet Arora](https://github.com/puneetar), and [Dylan Frankland](https://github.com/dfrankland).

136
node_modules/@types/express/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,136 @@
// Type definitions for Express 4.17
// Project: http://expressjs.com
// Definitions by: Boris Yankov <https://github.com/borisyankov>
// China Medical University Hospital <https://github.com/CMUH>
// Puneet Arora <https://github.com/puneetar>
// Dylan Frankland <https://github.com/dfrankland>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/* =================== USAGE ===================
import express = require("express");
var app = express();
=============================================== */
/// <reference types="express-serve-static-core" />
/// <reference types="serve-static" />
import * as bodyParser from 'body-parser';
import * as serveStatic from 'serve-static';
import * as core from 'express-serve-static-core';
import * as qs from 'qs';
/**
* Creates an Express application. The express() function is a top-level function exported by the express module.
*/
declare function e(): core.Express;
declare namespace e {
/**
* This is a built-in middleware function in Express. It parses incoming requests with JSON payloads and is based on body-parser.
* @since 4.16.0
*/
var json: typeof bodyParser.json;
/**
* This is a built-in middleware function in Express. It parses incoming requests with Buffer payloads and is based on body-parser.
* @since 4.17.0
*/
var raw: typeof bodyParser.raw;
/**
* This is a built-in middleware function in Express. It parses incoming requests with text payloads and is based on body-parser.
* @since 4.17.0
*/
var text: typeof bodyParser.text;
/**
* These are the exposed prototypes.
*/
var application: Application;
var request: Request;
var response: Response;
/**
* This is a built-in middleware function in Express. It serves static files and is based on serve-static.
*/
var static: serveStatic.RequestHandlerConstructor<Response>;
/**
* This is a built-in middleware function in Express. It parses incoming requests with urlencoded payloads and is based on body-parser.
* @since 4.16.0
*/
var urlencoded: typeof bodyParser.urlencoded;
/**
* This is a built-in middleware function in Express. It parses incoming request query parameters.
*/
export function query(options: qs.IParseOptions | typeof qs.parse): Handler;
export function Router(options?: RouterOptions): core.Router;
interface RouterOptions {
/**
* Enable case sensitivity.
*/
caseSensitive?: boolean | undefined;
/**
* Preserve the req.params values from the parent router.
* If the parent and the child have conflicting param names, the childs value take precedence.
*
* @default false
* @since 4.5.0
*/
mergeParams?: boolean | undefined;
/**
* Enable strict routing.
*/
strict?: boolean | undefined;
}
interface Application extends core.Application {}
interface CookieOptions extends core.CookieOptions {}
interface Errback extends core.Errback {}
interface ErrorRequestHandler<
P = core.ParamsDictionary,
ResBody = any,
ReqBody = any,
ReqQuery = core.Query,
Locals extends Record<string, any> = Record<string, any>
> extends core.ErrorRequestHandler<P, ResBody, ReqBody, ReqQuery, Locals> {}
interface Express extends core.Express {}
interface Handler extends core.Handler {}
interface IRoute extends core.IRoute {}
interface IRouter extends core.IRouter {}
interface IRouterHandler<T> extends core.IRouterHandler<T> {}
interface IRouterMatcher<T> extends core.IRouterMatcher<T> {}
interface MediaType extends core.MediaType {}
interface NextFunction extends core.NextFunction {}
interface Locals extends core.Locals {}
interface Request<
P = core.ParamsDictionary,
ResBody = any,
ReqBody = any,
ReqQuery = core.Query,
Locals extends Record<string, any> = Record<string, any>
> extends core.Request<P, ResBody, ReqBody, ReqQuery, Locals> {}
interface RequestHandler<
P = core.ParamsDictionary,
ResBody = any,
ReqBody = any,
ReqQuery = core.Query,
Locals extends Record<string, any> = Record<string, any>
> extends core.RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals> {}
interface RequestParamHandler extends core.RequestParamHandler {}
interface Response<
ResBody = any,
Locals extends Record<string, any> = Record<string, any>
> extends core.Response<ResBody, Locals> {}
interface Router extends core.Router {}
interface Send extends core.Send {}
}
export = e;

71
node_modules/@types/express/package.json generated vendored Normal file
View File

@ -0,0 +1,71 @@
{
"_from": "@types/express@^4.17.13",
"_id": "@types/express@4.17.17",
"_inBundle": false,
"_integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==",
"_location": "/@types/express",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/express@^4.17.13",
"name": "@types/express",
"escapedName": "@types%2fexpress",
"scope": "@types",
"rawSpec": "^4.17.13",
"saveSpec": null,
"fetchSpec": "^4.17.13"
},
"_requiredBy": [
"/@types/serve-index",
"/webpack-dev-server"
],
"_resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz",
"_shasum": "01d5437f6ef9cfa8668e616e13c2f2ac9a491ae4",
"_spec": "@types/express@^4.17.13",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\webpack-dev-server",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Boris Yankov",
"url": "https://github.com/borisyankov"
},
{
"name": "China Medical University Hospital",
"url": "https://github.com/CMUH"
},
{
"name": "Puneet Arora",
"url": "https://github.com/puneetar"
},
{
"name": "Dylan Frankland",
"url": "https://github.com/dfrankland"
}
],
"dependencies": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "^4.17.33",
"@types/qs": "*",
"@types/serve-static": "*"
},
"deprecated": false,
"description": "TypeScript definitions for Express",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express",
"license": "MIT",
"main": "",
"name": "@types/express",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/express"
},
"scripts": {},
"typeScriptVersion": "4.2",
"types": "index.d.ts",
"typesPublisherContentHash": "a4c3d98898199c22408b7c0662e85011cacce7899cd22a66275337ec40edac14",
"version": "4.17.17"
}

21
node_modules/@types/html-minifier-terser/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/html-minifier-terser/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/html-minifier-terser`
# Summary
This package contains type definitions for html-minifier-terser (https://github.com/terser/html-minifier-terser#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-minifier-terser.
### Additional Details
* Last updated: Tue, 23 Nov 2021 21:01:04 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by [Piotr Błażejewicz](https://github.com/peterblazejewicz).

211
node_modules/@types/html-minifier-terser/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,211 @@
// Type definitions for html-minifier-terser 6.1
// Project: https://github.com/terser/html-minifier-terser#readme
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* HTMLMinifier is a highly configurable, well-tested, JavaScript-based HTML minifier.
* @async
*/
export function minify(value: string, options?: Options): Promise<string>;
/**
* Most of the options are disabled by default
*/
export interface Options {
/**
* Treat attributes in case sensitive manner (useful for custom HTML tags)
* @default false
*/
caseSensitive?: boolean | undefined;
/**
* Omit attribute values from boolean attributes
* @default false
*/
collapseBooleanAttributes?: boolean | undefined;
/**
* Don't leave any spaces between display:inline;
* elements when collapsing. Must be used in conjunction with collapseWhitespace=true
* @default false
*/
collapseInlineTagWhitespace?: boolean | undefined;
/**
* Collapse white space that contributes to text nodes in a document tree
* @default false
*/
collapseWhitespace?: boolean | undefined;
/**
* Always collapse to 1 space (never remove it entirely). Must be used in conjunction with `collapseWhitespace=true`
* @default false
*/
conservativeCollapse?: boolean | undefined;
/**
* Handle parse errors
* @default false
*/
continueOnParseError?: boolean | undefined;
/**
* Arrays of regex'es that allow to support custom attribute assign expressions (e.g. `'<div flex?="{{mode != cover}}"></div>'`)
* @default []
*/
customAttrAssign?: RegExp[] | undefined;
/**
* Regex that specifies custom attribute to strip newlines from (e.g. `/ng-class/`
*/
customAttrCollapse?: RegExp | undefined;
/**
* Arrays of regex'es that allow to support custom attribute surround expressions (e.g. `<input {{#if value}}checked="checked"{{/if}}>`)
* @default []
*/
customAttrSurround?: RegExp[] | undefined;
/**
* Arrays of regex'es that allow to support custom event attributes for `minifyJS` (e.g. `ng-click`)
* @default [/^on[a-z]{3,}$/]
*/
customEventAttributes?: RegExp[] | undefined;
/**
* Use direct Unicode characters whenever possible
* @default false
*/
decodeEntities?: boolean | undefined;
/**
* Parse input according to HTML5 specifications
* @default true
*/
html5?: boolean | undefined;
/**
* Array of regex'es that allow to ignore certain comments, when matched
* @default [ /^!/, /^\s*#/ ]
*/
ignoreCustomComments?: RegExp[] | undefined;
/**
* Array of regex'es that allow to ignore certain fragments, when matched (e.g. `<?php ... ?>`, `{{ ... }}`, etc.)
* @default [/<%[\s\S]*?%>/, /<\?[\s\S]\*?\?>/]
*/
ignoreCustomFragments?: RegExp[] | undefined;
/**
* Insert tags generated by HTML parser
* @default true
*/
includeAutoGeneratedTags?: boolean | undefined;
/**
* Keep the trailing slash on singleton elements
* @default false
*/
keepClosingSlash?: boolean | undefined;
/**
* Specify a maximum line length. Compressed output will be split by newlines at valid HTML split-points
*/
maxLineLength?: number | undefined;
/**
* Minify CSS in style elements and style attributes
* @default false
*/
minifyCSS?: boolean | object | ((text: string, type?: string) => string) | undefined;
/**
* Minify JavaScript in script elements and event attributes
* @default false
*/
minifyJS?: boolean | object | ((text: string, inline?: boolean) => string) | undefined;
/**
* Minify URLs in various attributes
* @default false
*/
minifyURLs?: boolean | string | object | ((text: string) => string) | undefined;
/**
* Never add a newline before a tag that closes an element
* @default false
*/
noNewlinesBeforeTagClose?: boolean | undefined;
/**
* Always collapse to 1 line break (never remove it entirely) when whitespace between tags include a line break.
* Must be used in conjunction with `collapseWhitespace=true`
* @default false
*/
preserveLineBreaks?: boolean | undefined;
/**
* Prevents the escaping of the values of attributes
* @default false
*/
preventAttributesEscaping?: boolean | undefined;
/**
* Process contents of conditional comments through minifier
* @default false
*/
processConditionalComments?: boolean | undefined;
/**
* Array of strings corresponding to types of script elements to process through minifier
* (e.g. `text/ng-template`, `text/x-handlebars-template`, etc.)
* @default []
*/
processScripts?: string[] | undefined;
/**
* Type of quote to use for attribute values (' or ")
*/
quoteCharacter?: string | undefined;
/**
* Remove quotes around attributes when possible
* @default false
*/
removeAttributeQuotes?: boolean | undefined;
/**
* Strip HTML comments
* @default false
*/
removeComments?: boolean | undefined;
/**
* Remove all attributes with whitespace-only values
* @default false
*/
removeEmptyAttributes?: boolean | ((attrName: string, tag: string) => boolean) | undefined;
/**
* Remove all elements with empty contents
* @default false
*/
removeEmptyElements?: boolean | undefined;
/**
* Remove optional tags
* @default false
*/
removeOptionalTags?: boolean | undefined;
/**
* Remove attributes when value matches default
* @default false
*/
removeRedundantAttributes?: boolean | undefined;
/**
* Remove `type="text/javascript"` from `script` tags. Other `type` attribute values are left intact
* @default false
*/
removeScriptTypeAttributes?: boolean | undefined;
/**
* Remove `type="text/css"` from `style` and `link` tags. Other `type` attribute values are left intact
* @default false
*/
removeStyleLinkTypeAttributes?: boolean | undefined;
/**
* Remove space between attributes whenever possible. **Note that this will result in invalid HTML!**
* @default false
*/
removeTagWhitespace?: boolean | undefined;
/**
* Sort attributes by frequency
* @default false
*/
sortAttributes?: boolean | undefined;
/**
* Sort style classes by frequency
* @default false
*/
sortClassName?: boolean | undefined;
/**
* Trim white space around `ignoreCustomFragments`
* @default false
*/
trimCustomFragments?: boolean | undefined;
/**
* Replaces the `doctype` with the short (HTML5) doctype
* @default false
*/
useShortDoctype?: boolean | undefined;
}

53
node_modules/@types/html-minifier-terser/package.json generated vendored Normal file
View File

@ -0,0 +1,53 @@
{
"_from": "@types/html-minifier-terser@^6.0.0",
"_id": "@types/html-minifier-terser@6.1.0",
"_inBundle": false,
"_integrity": "sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==",
"_location": "/@types/html-minifier-terser",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/html-minifier-terser@^6.0.0",
"name": "@types/html-minifier-terser",
"escapedName": "@types%2fhtml-minifier-terser",
"scope": "@types",
"rawSpec": "^6.0.0",
"saveSpec": null,
"fetchSpec": "^6.0.0"
},
"_requiredBy": [
"/html-webpack-plugin"
],
"_resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz",
"_shasum": "4fc33a00c1d0c16987b1a20cf92d20614c55ac35",
"_spec": "@types/html-minifier-terser@^6.0.0",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\html-webpack-plugin",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Piotr Błażejewicz",
"url": "https://github.com/peterblazejewicz"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for html-minifier-terser",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-minifier-terser",
"license": "MIT",
"main": "",
"name": "@types/html-minifier-terser",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/html-minifier-terser"
},
"scripts": {},
"typeScriptVersion": "3.8",
"types": "index.d.ts",
"typesPublisherContentHash": "e851f65ded989d19a70b471ff32b156ed08fec7ed641ce4c5a7fdee809bd53e2",
"version": "6.1.0"
}

21
node_modules/@types/http-errors/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/http-errors/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/http-errors`
# Summary
This package contains type definitions for http-errors (https://github.com/jshttp/http-errors).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors.
### Additional Details
* Last updated: Tue, 01 Nov 2022 00:02:46 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff), and [BendingBender](https://github.com/BendingBender).

83
node_modules/@types/http-errors/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,83 @@
// Type definitions for http-errors 2.0
// Project: https://github.com/jshttp/http-errors
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = createHttpError;
declare const createHttpError: createHttpError.CreateHttpError & createHttpError.NamedConstructors & {
isHttpError: createHttpError.IsHttpError
};
declare namespace createHttpError {
interface HttpError<N extends number = number> extends Error {
status: N;
statusCode: N;
expose: boolean;
headers?: {
[key: string]: string;
} | undefined;
[key: string]: any;
}
type UnknownError = Error | string | { [key: string]: any };
interface HttpErrorConstructor<N extends number = number> {
(msg?: string): HttpError<N>;
new (msg?: string): HttpError<N>;
}
interface CreateHttpError {
<N extends number = number>(arg: N, ...rest: UnknownError[]): HttpError<N>;
(...rest: UnknownError[]): HttpError;
}
type IsHttpError = (error: unknown) => error is HttpError;
type NamedConstructors = {
HttpError: HttpErrorConstructor;
}
& Record<'BadRequest' | '400', HttpErrorConstructor<400>>
& Record<'Unauthorized' | '401', HttpErrorConstructor<401>>
& Record<'PaymentRequired' | '402', HttpErrorConstructor<402>>
& Record<'Forbidden' | '403', HttpErrorConstructor<403>>
& Record<'NotFound' | '404', HttpErrorConstructor<404>>
& Record<'MethodNotAllowed' | '405', HttpErrorConstructor<405>>
& Record<'NotAcceptable' | '406', HttpErrorConstructor<406>>
& Record<'ProxyAuthenticationRequired' | '407', HttpErrorConstructor<407>>
& Record<'RequestTimeout' | '408', HttpErrorConstructor<408>>
& Record<'Conflict' | '409', HttpErrorConstructor<409>>
& Record<'Gone' | '410', HttpErrorConstructor<410>>
& Record<'LengthRequired' | '411', HttpErrorConstructor<411>>
& Record<'PreconditionFailed' | '412', HttpErrorConstructor<412>>
& Record<'PayloadTooLarge' | '413', HttpErrorConstructor<413>>
& Record<'URITooLong' | '414', HttpErrorConstructor<414>>
& Record<'UnsupportedMediaType' | '415', HttpErrorConstructor<415>>
& Record<'RangeNotSatisfiable' | '416', HttpErrorConstructor<416>>
& Record<'ExpectationFailed' | '417', HttpErrorConstructor<417>>
& Record<'ImATeapot' | '418', HttpErrorConstructor<418>>
& Record<'MisdirectedRequest' | '421', HttpErrorConstructor<421>>
& Record<'UnprocessableEntity' | '422', HttpErrorConstructor<422>>
& Record<'Locked' | '423', HttpErrorConstructor<423>>
& Record<'FailedDependency' | '424', HttpErrorConstructor<424>>
& Record<'TooEarly' | '425', HttpErrorConstructor<425>>
& Record<'UpgradeRequired' | '426', HttpErrorConstructor<426>>
& Record<'PreconditionRequired' | '428', HttpErrorConstructor<428>>
& Record<'TooManyRequests' | '429', HttpErrorConstructor<429>>
& Record<'RequestHeaderFieldsTooLarge' | '431', HttpErrorConstructor<431>>
& Record<'UnavailableForLegalReasons' | '451', HttpErrorConstructor<451>>
& Record<'InternalServerError' | '500', HttpErrorConstructor<500>>
& Record<'NotImplemented' | '501', HttpErrorConstructor<501>>
& Record<'BadGateway' | '502', HttpErrorConstructor<502>>
& Record<'ServiceUnavailable' | '503', HttpErrorConstructor<503>>
& Record<'GatewayTimeout' | '504', HttpErrorConstructor<504>>
& Record<'HTTPVersionNotSupported' | '505', HttpErrorConstructor<505>>
& Record<'VariantAlsoNegotiates' | '506', HttpErrorConstructor<506>>
& Record<'InsufficientStorage' | '507', HttpErrorConstructor<507>>
& Record<'LoopDetected' | '508', HttpErrorConstructor<508>>
& Record<'BandwidthLimitExceeded' | '509', HttpErrorConstructor<509>>
& Record<'NotExtended' | '510', HttpErrorConstructor<510>>
& Record<'NetworkAuthenticationRequire' | '511', HttpErrorConstructor<511>>
;
}

57
node_modules/@types/http-errors/package.json generated vendored Normal file
View File

@ -0,0 +1,57 @@
{
"_from": "@types/http-errors@*",
"_id": "@types/http-errors@2.0.1",
"_inBundle": false,
"_integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==",
"_location": "/@types/http-errors",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/http-errors@*",
"name": "@types/http-errors",
"escapedName": "@types%2fhttp-errors",
"scope": "@types",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/@types/serve-static"
],
"_resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz",
"_shasum": "20172f9578b225f6c7da63446f56d4ce108d5a65",
"_spec": "@types/http-errors@*",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\@types\\serve-static",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Tanguy Krotoff",
"url": "https://github.com/tkrotoff"
},
{
"name": "BendingBender",
"url": "https://github.com/BendingBender"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for http-errors",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors",
"license": "MIT",
"main": "",
"name": "@types/http-errors",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/http-errors"
},
"scripts": {},
"typeScriptVersion": "4.1",
"types": "index.d.ts",
"typesPublisherContentHash": "1dfc69d7710a0e2de926b0320f119575b2626e7d4b615157ad092d057e039373",
"version": "2.0.1"
}

21
node_modules/@types/http-proxy/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/http-proxy/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/http-proxy`
# Summary
This package contains type definitions for node-http-proxy (https://github.com/nodejitsu/node-http-proxy).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-proxy.
### Additional Details
* Last updated: Tue, 25 Apr 2023 20:02:48 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
* Global values: none
# Credits
These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), [Florian Oellerich](https://github.com/Raigen), [Daniel Schmidt](https://github.com/DanielMSchmidt), [Jordan Abreu](https://github.com/jabreu610), and [Samuel Bodin](https://github.com/bodinsamuel).

237
node_modules/@types/http-proxy/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,237 @@
// Type definitions for node-http-proxy 1.17
// Project: https://github.com/nodejitsu/node-http-proxy
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>
// Florian Oellerich <https://github.com/Raigen>
// Daniel Schmidt <https://github.com/DanielMSchmidt>
// Jordan Abreu <https://github.com/jabreu610>
// Samuel Bodin <https://github.com/bodinsamuel>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/// <reference types="node" />
import * as net from "net";
import * as http from "http";
import * as https from "https";
import * as events from "events";
import * as url from "url";
import * as stream from "stream";
interface ProxyTargetDetailed {
host: string;
port: number;
protocol?: string | undefined;
hostname?: string | undefined;
socketPath?: string | undefined;
key?: string | undefined;
passphrase?: string | undefined;
pfx?: Buffer | string | undefined;
cert?: string | undefined;
ca?: string | undefined;
ciphers?: string | undefined;
secureProtocol?: string | undefined;
}
declare class Server<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> extends events.EventEmitter {
/**
* Creates the proxy server with specified options.
* @param options - Config object passed to the proxy
*/
constructor(options?: Server.ServerOptions);
/**
* Used for proxying regular HTTP(S) requests
* @param req - Client request.
* @param res - Client response.
* @param options - Additional options.
*/
web(
req: http.IncomingMessage,
res: http.ServerResponse,
options?: Server.ServerOptions,
callback?: Server.ErrorCallback,
): void;
/**
* Used for proxying regular HTTP(S) requests
* @param req - Client request.
* @param socket - Client socket.
* @param head - Client head.
* @param options - Additionnal options.
*/
ws(
req: http.IncomingMessage,
socket: any,
head: any,
options?: Server.ServerOptions,
callback?: Server.ErrorCallback,
): void;
/**
* A function that wraps the object in a webserver, for your convenience
* @param port - Port to listen on
* @param hostname - The hostname to listen on
*/
listen(port: number, hostname?: string): Server<TIncomingMessage, TServerResponse>;
/**
* A function that closes the inner webserver and stops listening on given port
*/
close(callback?: () => void): void;
/**
* Creates the proxy server with specified options.
* @param options Config object passed to the proxy
* @returns Proxy object with handlers for `ws` and `web` requests
*/
// tslint:disable:no-unnecessary-generics
static createProxyServer<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse>(options?: Server.ServerOptions): Server<TIncomingMessage, TServerResponse>;
/**
* Creates the proxy server with specified options.
* @param options Config object passed to the proxy
* @returns Proxy object with handlers for `ws` and `web` requests
*/
// tslint:disable:no-unnecessary-generics
static createServer<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse>(options?: Server.ServerOptions): Server<TIncomingMessage, TServerResponse>;
/**
* Creates the proxy server with specified options.
* @param options Config object passed to the proxy
* @returns Proxy object with handlers for `ws` and `web` requests
*/
// tslint:disable:no-unnecessary-generics
static createProxy<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse>(options?: Server.ServerOptions): Server<TIncomingMessage, TServerResponse>;
addListener(event: string, listener: () => void): this;
on(event: string, listener: () => void): this;
on(event: "error", listener: Server.ErrorCallback<Error, TIncomingMessage, TServerResponse>): this;
on(event: "start", listener: Server.StartCallback<TIncomingMessage, TServerResponse>): this;
on(event: "proxyReq", listener: Server.ProxyReqCallback<http.ClientRequest, TIncomingMessage, TServerResponse>): this;
on(event: "proxyRes", listener: Server.ProxyResCallback<TIncomingMessage, TServerResponse>): this;
on(event: "proxyReqWs", listener: Server.ProxyReqWsCallback<http.ClientRequest, TIncomingMessage>): this;
on(event: "econnreset", listener: Server.EconnresetCallback<Error, TIncomingMessage, TServerResponse>): this;
on(event: "end", listener: Server.EndCallback<TIncomingMessage, TServerResponse>): this;
on(event: "open", listener: Server.OpenCallback): this;
on(event: "close", listener: Server.CloseCallback<TIncomingMessage>): this;
once(event: string, listener: () => void): this;
once(event: "error", listener: Server.ErrorCallback<Error, TIncomingMessage, TServerResponse>): this;
once(event: "start", listener: Server.StartCallback<TIncomingMessage, TServerResponse>): this;
once(event: "proxyReq", listener: Server.ProxyReqCallback<http.ClientRequest, TIncomingMessage, TServerResponse>): this;
once(event: "proxyRes", listener: Server.ProxyResCallback<TIncomingMessage, TServerResponse>): this;
once(event: "proxyReqWs", listener: Server.ProxyReqWsCallback<http.ClientRequest, TIncomingMessage>): this;
once(event: "econnreset", listener: Server.EconnresetCallback<Error, TIncomingMessage, TServerResponse>): this;
once(event: "end", listener: Server.EndCallback<TIncomingMessage, TServerResponse>): this;
once(event: "open", listener: Server.OpenCallback): this;
once(event: "close", listener: Server.CloseCallback<TIncomingMessage>): this;
removeListener(event: string, listener: () => void): this;
removeAllListeners(event?: string): this;
getMaxListeners(): number;
setMaxListeners(n: number): this;
listeners(event: string): Array<() => void>;
emit(event: string, ...args: any[]): boolean;
listenerCount(type: string): number;
}
declare namespace Server {
type ProxyTarget = ProxyTargetUrl | ProxyTargetDetailed;
type ProxyTargetUrl = string | Partial<url.Url>;
interface ServerOptions {
/** URL string to be parsed with the url module. */
target?: ProxyTarget | undefined;
/** URL string to be parsed with the url module. */
forward?: ProxyTargetUrl | undefined;
/** Object to be passed to http(s).request. */
agent?: any;
/** Object to be passed to https.createServer(). */
ssl?: any;
/** If you want to proxy websockets. */
ws?: boolean | undefined;
/** Adds x- forward headers. */
xfwd?: boolean | undefined;
/** Verify SSL certificate. */
secure?: boolean | undefined;
/** Explicitly specify if we are proxying to another proxy. */
toProxy?: boolean | undefined;
/** Specify whether you want to prepend the target's path to the proxy path. */
prependPath?: boolean | undefined;
/** Specify whether you want to ignore the proxy path of the incoming request. */
ignorePath?: boolean | undefined;
/** Local interface string to bind for outgoing connections. */
localAddress?: string | undefined;
/** Changes the origin of the host header to the target URL. */
changeOrigin?: boolean | undefined;
/** specify whether you want to keep letter case of response header key */
preserveHeaderKeyCase?: boolean | undefined;
/** Basic authentication i.e. 'user:password' to compute an Authorization header. */
auth?: string | undefined;
/** Rewrites the location hostname on (301 / 302 / 307 / 308) redirects, Default: null. */
hostRewrite?: string | undefined;
/** Rewrites the location host/ port on (301 / 302 / 307 / 308) redirects based on requested host/ port.Default: false. */
autoRewrite?: boolean | undefined;
/** Rewrites the location protocol on (301 / 302 / 307 / 308) redirects to 'http' or 'https'.Default: null. */
protocolRewrite?: string | undefined;
/** rewrites domain of set-cookie headers. */
cookieDomainRewrite?: false | string | { [oldDomain: string]: string } | undefined;
/** rewrites path of set-cookie headers. Default: false */
cookiePathRewrite?: false | string | { [oldPath: string]: string } | undefined;
/** object with extra headers to be added to target requests. */
headers?: { [header: string]: string } | undefined;
/** Timeout (in milliseconds) when proxy receives no response from target. Default: 120000 (2 minutes) */
proxyTimeout?: number | undefined;
/** Timeout (in milliseconds) for incoming requests */
timeout?: number | undefined;
/** Specify whether you want to follow redirects. Default: false */
followRedirects?: boolean | undefined;
/** If set to true, none of the webOutgoing passes are called and it's your responsibility to appropriately return the response by listening and acting on the proxyRes event */
selfHandleResponse?: boolean | undefined;
/** Buffer */
buffer?: stream.Stream | undefined;
}
type StartCallback<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> = (
req: TIncomingMessage,
res: TServerResponse,
target: ProxyTargetUrl,
) => void;
type ProxyReqCallback<
TClientRequest = http.ClientRequest,
TIncomingMessage = http.IncomingMessage,
TServerResponse = http.ServerResponse,
> = (proxyReq: TClientRequest, req: TIncomingMessage, res: TServerResponse, options: ServerOptions) => void;
type ProxyResCallback<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> = (
proxyRes: TIncomingMessage,
req: TIncomingMessage,
res: TServerResponse,
) => void;
type ProxyReqWsCallback<TClientRequest = http.ClientRequest, TIncomingMessage = http.IncomingMessage> = (
proxyReq: TClientRequest,
req: TIncomingMessage,
socket: net.Socket,
options: ServerOptions,
head: any,
) => void;
type EconnresetCallback<TError = Error, TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> = (
err: TError,
req: TIncomingMessage,
res: TServerResponse,
target: ProxyTargetUrl,
) => void;
type EndCallback<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> = (
req: TIncomingMessage,
res: TServerResponse,
proxyRes: TIncomingMessage
) => void;
type OpenCallback = (proxySocket: net.Socket) => void;
type CloseCallback<TIncomingMessage = http.IncomingMessage> = (proxyRes: TIncomingMessage, proxySocket: net.Socket, proxyHead: any) => void;
type ErrorCallback<TError = Error, TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> = (
err: TError,
req: TIncomingMessage,
res: TServerResponse | net.Socket,
target?: ProxyTargetUrl,
) => void;
}
export = Server;

71
node_modules/@types/http-proxy/package.json generated vendored Normal file
View File

@ -0,0 +1,71 @@
{
"_from": "@types/http-proxy@^1.17.8",
"_id": "@types/http-proxy@1.17.11",
"_inBundle": false,
"_integrity": "sha512-HC8G7c1WmaF2ekqpnFq626xd3Zz0uvaqFmBJNRZCGEZCXkvSdJoNFn/8Ygbd9fKNQj8UzLdCETaI0UWPAjK7IA==",
"_location": "/@types/http-proxy",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/http-proxy@^1.17.8",
"name": "@types/http-proxy",
"escapedName": "@types%2fhttp-proxy",
"scope": "@types",
"rawSpec": "^1.17.8",
"saveSpec": null,
"fetchSpec": "^1.17.8"
},
"_requiredBy": [
"/http-proxy-middleware"
],
"_resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.11.tgz",
"_shasum": "0ca21949a5588d55ac2b659b69035c84bd5da293",
"_spec": "@types/http-proxy@^1.17.8",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\http-proxy-middleware",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Maxime LUCE",
"url": "https://github.com/SomaticIT"
},
{
"name": "Florian Oellerich",
"url": "https://github.com/Raigen"
},
{
"name": "Daniel Schmidt",
"url": "https://github.com/DanielMSchmidt"
},
{
"name": "Jordan Abreu",
"url": "https://github.com/jabreu610"
},
{
"name": "Samuel Bodin",
"url": "https://github.com/bodinsamuel"
}
],
"dependencies": {
"@types/node": "*"
},
"deprecated": false,
"description": "TypeScript definitions for node-http-proxy",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-proxy",
"license": "MIT",
"main": "",
"name": "@types/http-proxy",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/http-proxy"
},
"scripts": {},
"typeScriptVersion": "4.3",
"types": "index.d.ts",
"typesPublisherContentHash": "09755a617424e003f20520df0294c295f1403b2e76833c83438eb45c953f9e51",
"version": "1.17.11"
}

21
node_modules/@types/json-schema/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/json-schema/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/json-schema`
# Summary
This package contains type definitions for json-schema 4.0, 6.0 and (https://github.com/kriszyp/json-schema).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema.
### Additional Details
* Last updated: Thu, 25 May 2023 20:34:16 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by [Boris Cherny](https://github.com/bcherny), [Lucian Buzzo](https://github.com/lucianbuzzo), [Roland Groza](https://github.com/rolandjitsu), and [Jason Kwok](https://github.com/JasonHK).

758
node_modules/@types/json-schema/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,758 @@
// Type definitions for json-schema 4.0, 6.0 and 7.0
// Project: https://github.com/kriszyp/json-schema
// Definitions by: Boris Cherny <https://github.com/bcherny>
// Lucian Buzzo <https://github.com/lucianbuzzo>
// Roland Groza <https://github.com/rolandjitsu>
// Jason Kwok <https://github.com/JasonHK>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
//==================================================================================================
// JSON Schema Draft 04
//==================================================================================================
/**
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
*/
export type JSONSchema4TypeName =
| 'string' //
| 'number'
| 'integer'
| 'boolean'
| 'object'
| 'array'
| 'null'
| 'any';
/**
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
*/
export type JSONSchema4Type =
| string //
| number
| boolean
| JSONSchema4Object
| JSONSchema4Array
| null;
// Workaround for infinite type recursion
export interface JSONSchema4Object {
[key: string]: JSONSchema4Type;
}
// Workaround for infinite type recursion
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
export interface JSONSchema4Array extends Array<JSONSchema4Type> {}
/**
* Meta schema
*
* Recommended values:
* - 'http://json-schema.org/schema#'
* - 'http://json-schema.org/hyper-schema#'
* - 'http://json-schema.org/draft-04/schema#'
* - 'http://json-schema.org/draft-04/hyper-schema#'
* - 'http://json-schema.org/draft-03/schema#'
* - 'http://json-schema.org/draft-03/hyper-schema#'
*
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
*/
export type JSONSchema4Version = string;
/**
* JSON Schema V4
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04
*/
export interface JSONSchema4 {
id?: string | undefined;
$ref?: string | undefined;
$schema?: JSONSchema4Version | undefined;
/**
* This attribute is a string that provides a short description of the
* instance property.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
*/
title?: string | undefined;
/**
* This attribute is a string that provides a full description of the of
* purpose the instance property.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
*/
description?: string | undefined;
default?: JSONSchema4Type | undefined;
multipleOf?: number | undefined;
maximum?: number | undefined;
exclusiveMaximum?: boolean | undefined;
minimum?: number | undefined;
exclusiveMinimum?: boolean | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
pattern?: string | undefined;
/**
* May only be defined when "items" is defined, and is a tuple of JSONSchemas.
*
* This provides a definition for additional items in an array instance
* when tuple definitions of the items is provided. This can be false
* to indicate additional items in the array are not allowed, or it can
* be a schema that defines the schema of the additional items.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
*/
additionalItems?: boolean | JSONSchema4 | undefined;
/**
* This attribute defines the allowed items in an instance array, and
* MUST be a schema or an array of schemas. The default value is an
* empty schema which allows any value for items in the instance array.
*
* When this attribute value is a schema and the instance value is an
* array, then all the items in the array MUST be valid according to the
* schema.
*
* When this attribute value is an array of schemas and the instance
* value is an array, each position in the instance array MUST conform
* to the schema in the corresponding position for this array. This
* called tuple typing. When tuple typing is used, additional items are
* allowed, disallowed, or constrained by the "additionalItems"
* (Section 5.6) attribute using the same rules as
* "additionalProperties" (Section 5.4) for objects.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
*/
items?: JSONSchema4 | JSONSchema4[] | undefined;
maxItems?: number | undefined;
minItems?: number | undefined;
uniqueItems?: boolean | undefined;
maxProperties?: number | undefined;
minProperties?: number | undefined;
/**
* This attribute indicates if the instance must have a value, and not
* be undefined. This is false by default, making the instance
* optional.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
*/
required?: boolean | string[] | undefined;
/**
* This attribute defines a schema for all properties that are not
* explicitly defined in an object type definition. If specified, the
* value MUST be a schema or a boolean. If false is provided, no
* additional properties are allowed beyond the properties defined in
* the schema. The default value is an empty schema which allows any
* value for additional properties.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
*/
additionalProperties?: boolean | JSONSchema4 | undefined;
definitions?: {
[k: string]: JSONSchema4;
} | undefined;
/**
* This attribute is an object with property definitions that define the
* valid values of instance object property values. When the instance
* value is an object, the property values of the instance object MUST
* conform to the property definitions in this object. In this object,
* each property definition's value MUST be a schema, and the property's
* name MUST be the name of the instance property that it defines. The
* instance property value MUST be valid according to the schema from
* the property definition. Properties are considered unordered, the
* order of the instance properties MAY be in any order.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
*/
properties?: {
[k: string]: JSONSchema4;
} | undefined;
/**
* This attribute is an object that defines the schema for a set of
* property names of an object instance. The name of each property of
* this attribute's object is a regular expression pattern in the ECMA
* 262/Perl 5 format, while the value is a schema. If the pattern
* matches the name of a property on the instance object, the value of
* the instance's property MUST be valid against the pattern name's
* schema value.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
*/
patternProperties?: {
[k: string]: JSONSchema4;
} | undefined;
dependencies?: {
[k: string]: JSONSchema4 | string[];
} | undefined;
/**
* This provides an enumeration of all possible values that are valid
* for the instance property. This MUST be an array, and each item in
* the array represents a possible value for the instance value. If
* this attribute is defined, the instance value MUST be one of the
* values in the array in order for the schema to be valid.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
*/
enum?: JSONSchema4Type[] | undefined;
/**
* A single type, or a union of simple types
*/
type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
allOf?: JSONSchema4[] | undefined;
anyOf?: JSONSchema4[] | undefined;
oneOf?: JSONSchema4[] | undefined;
not?: JSONSchema4 | undefined;
/**
* The value of this property MUST be another schema which will provide
* a base schema which the current schema will inherit from. The
* inheritance rules are such that any instance that is valid according
* to the current schema MUST be valid according to the referenced
* schema. This MAY also be an array, in which case, the instance MUST
* be valid for all the schemas in the array. A schema that extends
* another schema MAY define additional attributes, constrain existing
* attributes, or add other constraints.
*
* Conceptually, the behavior of extends can be seen as validating an
* instance against all constraints in the extending schema as well as
* the extended schema(s).
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
*/
extends?: string | string[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
*/
[k: string]: any;
format?: string | undefined;
}
//==================================================================================================
// JSON Schema Draft 06
//==================================================================================================
export type JSONSchema6TypeName =
| 'string' //
| 'number'
| 'integer'
| 'boolean'
| 'object'
| 'array'
| 'null'
| 'any';
export type JSONSchema6Type =
| string //
| number
| boolean
| JSONSchema6Object
| JSONSchema6Array
| null;
// Workaround for infinite type recursion
export interface JSONSchema6Object {
[key: string]: JSONSchema6Type;
}
// Workaround for infinite type recursion
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
export interface JSONSchema6Array extends Array<JSONSchema6Type> {}
/**
* Meta schema
*
* Recommended values:
* - 'http://json-schema.org/schema#'
* - 'http://json-schema.org/hyper-schema#'
* - 'http://json-schema.org/draft-06/schema#'
* - 'http://json-schema.org/draft-06/hyper-schema#'
*
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
*/
export type JSONSchema6Version = string;
/**
* JSON Schema V6
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01
*/
export type JSONSchema6Definition = JSONSchema6 | boolean;
export interface JSONSchema6 {
$id?: string | undefined;
$ref?: string | undefined;
$schema?: JSONSchema6Version | undefined;
/**
* Must be strictly greater than 0.
* A numeric instance is valid only if division by this keyword's value results in an integer.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1
*/
multipleOf?: number | undefined;
/**
* Representing an inclusive upper limit for a numeric instance.
* This keyword validates only if the instance is less than or exactly equal to "maximum".
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2
*/
maximum?: number | undefined;
/**
* Representing an exclusive upper limit for a numeric instance.
* This keyword validates only if the instance is strictly less than (not equal to) to "exclusiveMaximum".
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3
*/
exclusiveMaximum?: number | undefined;
/**
* Representing an inclusive lower limit for a numeric instance.
* This keyword validates only if the instance is greater than or exactly equal to "minimum".
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4
*/
minimum?: number | undefined;
/**
* Representing an exclusive lower limit for a numeric instance.
* This keyword validates only if the instance is strictly greater than (not equal to) to "exclusiveMinimum".
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5
*/
exclusiveMinimum?: number | undefined;
/**
* Must be a non-negative integer.
* A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6
*/
maxLength?: number | undefined;
/**
* Must be a non-negative integer.
* A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.
* Omitting this keyword has the same behavior as a value of 0.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7
*/
minLength?: number | undefined;
/**
* Should be a valid regular expression, according to the ECMA 262 regular expression dialect.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8
*/
pattern?: string | undefined;
/**
* This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
* Omitting this keyword has the same behavior as an empty schema.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9
*/
items?: JSONSchema6Definition | JSONSchema6Definition[] | undefined;
/**
* This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
* If "items" is an array of schemas, validation succeeds if every instance element
* at a position greater than the size of "items" validates against "additionalItems".
* Otherwise, "additionalItems" MUST be ignored, as the "items" schema
* (possibly the default value of an empty schema) is applied to all elements.
* Omitting this keyword has the same behavior as an empty schema.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10
*/
additionalItems?: JSONSchema6Definition | undefined;
/**
* Must be a non-negative integer.
* An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11
*/
maxItems?: number | undefined;
/**
* Must be a non-negative integer.
* An array instance is valid against "maxItems" if its size is greater than, or equal to, the value of this keyword.
* Omitting this keyword has the same behavior as a value of 0.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12
*/
minItems?: number | undefined;
/**
* If this keyword has boolean value false, the instance validates successfully.
* If it has boolean value true, the instance validates successfully if all of its elements are unique.
* Omitting this keyword has the same behavior as a value of false.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13
*/
uniqueItems?: boolean | undefined;
/**
* An array instance is valid against "contains" if at least one of its elements is valid against the given schema.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14
*/
contains?: JSONSchema6Definition | undefined;
/**
* Must be a non-negative integer.
* An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15
*/
maxProperties?: number | undefined;
/**
* Must be a non-negative integer.
* An object instance is valid against "maxProperties" if its number of properties is greater than,
* or equal to, the value of this keyword.
* Omitting this keyword has the same behavior as a value of 0.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16
*/
minProperties?: number | undefined;
/**
* Elements of this array must be unique.
* An object instance is valid against this keyword if every item in the array is the name of a property in the instance.
* Omitting this keyword has the same behavior as an empty array.
*
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17
*/
required?: string[] | undefined;
/**
* This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.
* Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,
* the child instance for that name successfully validates against the corresponding schema.
* Omitting this keyword has the same behavior as an empty object.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18
*/
properties?: {
[k: string]: JSONSchema6Definition;
} | undefined;
/**
* This attribute is an object that defines the schema for a set of property names of an object instance.
* The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema.
* If the pattern matches the name of a property on the instance object, the value of the instance's property
* MUST be valid against the pattern name's schema value.
* Omitting this keyword has the same behavior as an empty object.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19
*/
patternProperties?: {
[k: string]: JSONSchema6Definition;
} | undefined;
/**
* This attribute defines a schema for all properties that are not explicitly defined in an object type definition.
* If specified, the value MUST be a schema or a boolean.
* If false is provided, no additional properties are allowed beyond the properties defined in the schema.
* The default value is an empty schema which allows any value for additional properties.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20
*/
additionalProperties?: JSONSchema6Definition | undefined;
/**
* This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.
* Each property specifies a dependency.
* If the dependency value is an array, each element in the array must be unique.
* Omitting this keyword has the same behavior as an empty object.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21
*/
dependencies?: {
[k: string]: JSONSchema6Definition | string[];
} | undefined;
/**
* Takes a schema which validates the names of all properties rather than their values.
* Note the property name that the schema is testing will always be a string.
* Omitting this keyword has the same behavior as an empty schema.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22
*/
propertyNames?: JSONSchema6Definition | undefined;
/**
* This provides an enumeration of all possible values that are valid
* for the instance property. This MUST be an array, and each item in
* the array represents a possible value for the instance value. If
* this attribute is defined, the instance value MUST be one of the
* values in the array in order for the schema to be valid.
*
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23
*/
enum?: JSONSchema6Type[] | undefined;
/**
* More readable form of a one-element "enum"
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24
*/
const?: JSONSchema6Type | undefined;
/**
* A single type, or a union of simple types
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25
*/
type?: JSONSchema6TypeName | JSONSchema6TypeName[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
*/
allOf?: JSONSchema6Definition[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
*/
anyOf?: JSONSchema6Definition[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
*/
oneOf?: JSONSchema6Definition[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29
*/
not?: JSONSchema6Definition | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1
*/
definitions?: {
[k: string]: JSONSchema6Definition;
} | undefined;
/**
* This attribute is a string that provides a short description of the instance property.
*
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
*/
title?: string | undefined;
/**
* This attribute is a string that provides a full description of the of purpose the instance property.
*
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
*/
description?: string | undefined;
/**
* This keyword can be used to supply a default JSON value associated with a particular schema.
* It is RECOMMENDED that a default value be valid against the associated schema.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3
*/
default?: JSONSchema6Type | undefined;
/**
* Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4
*/
examples?: JSONSchema6Type[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8
*/
format?: string | undefined;
}
//==================================================================================================
// JSON Schema Draft 07
//==================================================================================================
// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
//--------------------------------------------------------------------------------------------------
/**
* Primitive type
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
*/
export type JSONSchema7TypeName =
| 'string' //
| 'number'
| 'integer'
| 'boolean'
| 'object'
| 'array'
| 'null';
/**
* Primitive type
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
*/
export type JSONSchema7Type =
| string //
| number
| boolean
| JSONSchema7Object
| JSONSchema7Array
| null;
// Workaround for infinite type recursion
export interface JSONSchema7Object {
[key: string]: JSONSchema7Type;
}
// Workaround for infinite type recursion
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
export interface JSONSchema7Array extends Array<JSONSchema7Type> {}
/**
* Meta schema
*
* Recommended values:
* - 'http://json-schema.org/schema#'
* - 'http://json-schema.org/hyper-schema#'
* - 'http://json-schema.org/draft-07/schema#'
* - 'http://json-schema.org/draft-07/hyper-schema#'
*
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
*/
export type JSONSchema7Version = string;
/**
* JSON Schema v7
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
*/
export type JSONSchema7Definition = JSONSchema7 | boolean;
export interface JSONSchema7 {
$id?: string | undefined;
$ref?: string | undefined;
$schema?: JSONSchema7Version | undefined;
$comment?: string | undefined;
/**
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
*/
$defs?: {
[key: string]: JSONSchema7Definition;
} | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
*/
type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
enum?: JSONSchema7Type[] | undefined;
const?: JSONSchema7Type | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
*/
multipleOf?: number | undefined;
maximum?: number | undefined;
exclusiveMaximum?: number | undefined;
minimum?: number | undefined;
exclusiveMinimum?: number | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
*/
maxLength?: number | undefined;
minLength?: number | undefined;
pattern?: string | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
*/
items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
additionalItems?: JSONSchema7Definition | undefined;
maxItems?: number | undefined;
minItems?: number | undefined;
uniqueItems?: boolean | undefined;
contains?: JSONSchema7Definition | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
*/
maxProperties?: number | undefined;
minProperties?: number | undefined;
required?: string[] | undefined;
properties?: {
[key: string]: JSONSchema7Definition;
} | undefined;
patternProperties?: {
[key: string]: JSONSchema7Definition;
} | undefined;
additionalProperties?: JSONSchema7Definition | undefined;
dependencies?: {
[key: string]: JSONSchema7Definition | string[];
} | undefined;
propertyNames?: JSONSchema7Definition | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
*/
if?: JSONSchema7Definition | undefined;
then?: JSONSchema7Definition | undefined;
else?: JSONSchema7Definition | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
*/
allOf?: JSONSchema7Definition[] | undefined;
anyOf?: JSONSchema7Definition[] | undefined;
oneOf?: JSONSchema7Definition[] | undefined;
not?: JSONSchema7Definition | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
*/
format?: string | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
*/
contentMediaType?: string | undefined;
contentEncoding?: string | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
*/
definitions?: {
[key: string]: JSONSchema7Definition;
} | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
*/
title?: string | undefined;
description?: string | undefined;
default?: JSONSchema7Type | undefined;
readOnly?: boolean | undefined;
writeOnly?: boolean | undefined;
examples?: JSONSchema7Type | undefined;
}
export interface ValidationResult {
valid: boolean;
errors: ValidationError[];
}
export interface ValidationError {
property: string;
message: string;
}
/**
* To use the validator call JSONSchema.validate with an instance object and an optional schema object.
* If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
* that schema will be used to validate and the schema parameter is not necessary (if both exist,
* both validations will occur).
*/
export function validate(instance: {}, schema: JSONSchema4 | JSONSchema6 | JSONSchema7): ValidationResult;
/**
* The checkPropertyChange method will check to see if an value can legally be in property with the given schema
* This is slightly different than the validate method in that it will fail if the schema is readonly and it will
* not check for self-validation, it is assumed that the passed in value is already internally valid.
*/
export function checkPropertyChange(
value: any,
schema: JSONSchema4 | JSONSchema6 | JSONSchema7,
property: string,
): ValidationResult;
/**
* This checks to ensure that the result is valid and will throw an appropriate error message if it is not.
*/
export function mustBeValid(result: ValidationResult): void;

75
node_modules/@types/json-schema/package.json generated vendored Normal file
View File

@ -0,0 +1,75 @@
{
"_from": "@types/json-schema@^7.0.5",
"_id": "@types/json-schema@7.0.12",
"_inBundle": false,
"_integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==",
"_location": "/@types/json-schema",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/json-schema@^7.0.5",
"name": "@types/json-schema",
"escapedName": "@types%2fjson-schema",
"scope": "@types",
"rawSpec": "^7.0.5",
"saveSpec": null,
"fetchSpec": "^7.0.5"
},
"_requiredBy": [
"/@types/eslint",
"/copy-webpack-plugin/schema-utils",
"/css-minimizer-webpack-plugin/schema-utils",
"/eslint-webpack-plugin/schema-utils",
"/mini-css-extract-plugin/schema-utils",
"/schema-utils",
"/terser-webpack-plugin/schema-utils",
"/thread-loader/schema-utils",
"/webpack-dev-middleware/schema-utils",
"/webpack-dev-server/schema-utils",
"/webpack/schema-utils"
],
"_resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz",
"_shasum": "d70faba7039d5fca54c83c7dbab41051d2b6f6cb",
"_spec": "@types/json-schema@^7.0.5",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\schema-utils",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Boris Cherny",
"url": "https://github.com/bcherny"
},
{
"name": "Lucian Buzzo",
"url": "https://github.com/lucianbuzzo"
},
{
"name": "Roland Groza",
"url": "https://github.com/rolandjitsu"
},
{
"name": "Jason Kwok",
"url": "https://github.com/JasonHK"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for json-schema 4.0, 6.0 and",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema",
"license": "MIT",
"main": "",
"name": "@types/json-schema",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/json-schema"
},
"scripts": {},
"typeScriptVersion": "4.3",
"types": "index.d.ts",
"typesPublisherContentHash": "839fb01aad39138bdff54a832897abf7c18b3e294fd2aacb7e43442825a7f1d3",
"version": "7.0.12"
}

21
node_modules/@types/mime/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

10
node_modules/@types/mime/Mime.d.ts generated vendored Normal file
View File

@ -0,0 +1,10 @@
import { TypeMap } from "./index";
export default class Mime {
constructor(mimes: TypeMap);
lookup(path: string, fallback?: string): string;
extension(mime: string): string | undefined;
load(filepath: string): void;
define(mimes: TypeMap): void;
}

16
node_modules/@types/mime/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/mime`
# Summary
This package contains type definitions for mime (https://github.com/broofa/node-mime).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime/v1.
### Additional Details
* Last updated: Mon, 18 Jan 2021 14:32:15 GMT
* Dependencies: none
* Global values: `mime`, `mimelite`
# Credits
These definitions were written by [Jeff Goddard](https://github.com/jedigo), and [Daniel Hritzkiv](https://github.com/dhritzkiv).

35
node_modules/@types/mime/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,35 @@
// Type definitions for mime 1.3
// Project: https://github.com/broofa/node-mime
// Definitions by: Jeff Goddard <https://github.com/jedigo>
// Daniel Hritzkiv <https://github.com/dhritzkiv>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Originally imported from: https://github.com/soywiz/typescript-node-definitions/mime.d.ts
export as namespace mime;
export interface TypeMap { [key: string]: string[]; }
/**
* Look up a mime type based on extension.
*
* If not found, uses the fallback argument if provided, and otherwise
* uses `default_type`.
*/
export function lookup(path: string, fallback?: string): string;
/**
* Return a file extensions associated with a mime type.
*/
export function extension(mime: string): string | undefined;
/**
* Load an Apache2-style ".types" file.
*/
export function load(filepath: string): void;
export function define(mimes: TypeMap): void;
export interface Charsets {
lookup(mime: string, fallback: string): string;
}
export const charsets: Charsets;
export const default_type: string;

7
node_modules/@types/mime/lite.d.ts generated vendored Normal file
View File

@ -0,0 +1,7 @@
import { default as Mime } from "./Mime";
declare const mimelite: Mime;
export as namespace mimelite;
export = mimelite;

58
node_modules/@types/mime/package.json generated vendored Normal file
View File

@ -0,0 +1,58 @@
{
"_from": "@types/mime@^1",
"_id": "@types/mime@1.3.2",
"_inBundle": false,
"_integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==",
"_location": "/@types/mime",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/mime@^1",
"name": "@types/mime",
"escapedName": "@types%2fmime",
"scope": "@types",
"rawSpec": "^1",
"saveSpec": null,
"fetchSpec": "^1"
},
"_requiredBy": [
"/@types/send",
"/@types/serve-static"
],
"_resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
"_shasum": "93e25bf9ee75fe0fd80b594bc4feb0e862111b5a",
"_spec": "@types/mime@^1",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\@types\\send",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Jeff Goddard",
"url": "https://github.com/jedigo"
},
{
"name": "Daniel Hritzkiv",
"url": "https://github.com/dhritzkiv"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for mime",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
"license": "MIT",
"main": "",
"name": "@types/mime",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/mime"
},
"scripts": {},
"typeScriptVersion": "3.4",
"types": "index.d.ts",
"typesPublisherContentHash": "529a2ee85950b588c079bd053520c5b3c2bbff1886870bc08188284265324348",
"version": "1.3.2"
}

21
node_modules/@types/minimist/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/minimist/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/minimist`
# Summary
This package contains type definitions for minimist (https://github.com/substack/minimist).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/minimist.
### Additional Details
* Last updated: Wed, 07 Jul 2021 00:01:41 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), [Necroskillz](https://github.com/Necroskillz), [kamranayub](https://github.com/kamranayub), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).

95
node_modules/@types/minimist/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,95 @@
// Type definitions for minimist 1.2
// Project: https://github.com/substack/minimist
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Necroskillz <https://github.com/Necroskillz>
// kamranayub <https://github.com/kamranayub>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Return an argument object populated with the array arguments from args
*
* @param [args] An optional argument array (typically `process.argv.slice(2)`)
* @param [opts] An optional options object to customize the parsing
*/
declare function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs;
/**
* Return an argument object populated with the array arguments from args. Strongly-typed
* to be the intersect of type T with minimist.ParsedArgs.
*
* `T` The type that will be intersected with minimist.ParsedArgs to represent the argument object
*
* @param [args] An optional argument array (typically `process.argv.slice(2)`)
* @param [opts] An optional options object to customize the parsing
*/
declare function minimist<T>(args?: string[], opts?: minimist.Opts): T & minimist.ParsedArgs;
/**
* Return an argument object populated with the array arguments from args. Strongly-typed
* to be the the type T which should extend minimist.ParsedArgs
*
* `T` The type that extends minimist.ParsedArgs and represents the argument object
*
* @param [args] An optional argument array (typically `process.argv.slice(2)`)
* @param [opts] An optional options object to customize the parsing
*/
declare function minimist<T extends minimist.ParsedArgs>(args?: string[], opts?: minimist.Opts): T;
declare namespace minimist {
interface Opts {
/**
* A string or array of strings argument names to always treat as strings
*/
string?: string | string[] | undefined;
/**
* A boolean, string or array of strings to always treat as booleans. If true will treat
* all double hyphenated arguments without equals signs as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
*/
boolean?: boolean | string | string[] | undefined;
/**
* An object mapping string names to strings or arrays of string argument names to use as aliases
*/
alias?: { [key: string]: string | string[] } | undefined;
/**
* An object mapping string argument names to default values
*/
default?: { [key: string]: any } | undefined;
/**
* When true, populate argv._ with everything after the first non-option
*/
stopEarly?: boolean | undefined;
/**
* A function which is invoked with a command line parameter not defined in the opts
* configuration object. If the function returns false, the unknown option is not added to argv
*/
unknown?: ((arg: string) => boolean) | undefined;
/**
* When true, populate argv._ with everything before the -- and argv['--'] with everything after the --.
* Note that with -- set, parsing for arguments still stops after the `--`.
*/
'--'?: boolean | undefined;
}
interface ParsedArgs {
[arg: string]: any;
/**
* If opts['--'] is true, populated with everything after the --
*/
'--'?: string[] | undefined;
/**
* Contains all the arguments that didn't have an option associated with them
*/
_: string[];
}
}
export = minimist;

65
node_modules/@types/minimist/package.json generated vendored Normal file
View File

@ -0,0 +1,65 @@
{
"_from": "@types/minimist@^1.2.0",
"_id": "@types/minimist@1.2.2",
"_inBundle": false,
"_integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==",
"_location": "/@types/minimist",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/minimist@^1.2.0",
"name": "@types/minimist",
"escapedName": "@types%2fminimist",
"scope": "@types",
"rawSpec": "^1.2.0",
"saveSpec": null,
"fetchSpec": "^1.2.0"
},
"_requiredBy": [
"/@vue/cli-service"
],
"_resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz",
"_shasum": "ee771e2ba4b3dc5b372935d549fd9617bf345b8c",
"_spec": "@types/minimist@^1.2.0",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\@vue\\cli-service",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Bart van der Schoor",
"url": "https://github.com/Bartvds"
},
{
"name": "Necroskillz",
"url": "https://github.com/Necroskillz"
},
{
"name": "kamranayub",
"url": "https://github.com/kamranayub"
},
{
"name": "Piotr Błażejewicz",
"url": "https://github.com/peterblazejewicz"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for minimist",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/minimist",
"license": "MIT",
"main": "",
"name": "@types/minimist",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/minimist"
},
"scripts": {},
"typeScriptVersion": "3.6",
"types": "index.d.ts",
"typesPublisherContentHash": "9032205d52417d0f537f1e52af6f7ac447acb4b87dca0ab5840b83ec7818232e",
"version": "1.2.2"
}

21
node_modules/@types/node/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/node/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/node`
# Summary
This package contains type definitions for Node.js (https://nodejs.org/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
### Additional Details
* Last updated: Tue, 08 Aug 2023 20:32:42 GMT
* Dependencies: none
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
# Credits
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).

972
node_modules/@types/node/assert.d.ts generated vendored Normal file
View File

@ -0,0 +1,972 @@
/**
* The `node:assert` module provides a set of assertion functions for verifying
* invariants.
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/assert.js)
*/
declare module 'assert' {
/**
* An alias of {@link ok}.
* @since v0.5.9
* @param value The input that is checked for being truthy.
*/
function assert(value: unknown, message?: string | Error): asserts value;
namespace assert {
/**
* Indicates the failure of an assertion. All errors thrown by the `node:assert`module will be instances of the `AssertionError` class.
*/
class AssertionError extends Error {
/**
* Set to the `actual` argument for methods such as {@link assert.strictEqual()}.
*/
actual: unknown;
/**
* Set to the `expected` argument for methods such as {@link assert.strictEqual()}.
*/
expected: unknown;
/**
* Set to the passed in operator value.
*/
operator: string;
/**
* Indicates if the message was auto-generated (`true`) or not.
*/
generatedMessage: boolean;
/**
* Value is always `ERR_ASSERTION` to show that the error is an assertion error.
*/
code: 'ERR_ASSERTION';
constructor(options?: {
/** If provided, the error message is set to this value. */
message?: string | undefined;
/** The `actual` property on the error instance. */
actual?: unknown | undefined;
/** The `expected` property on the error instance. */
expected?: unknown | undefined;
/** The `operator` property on the error instance. */
operator?: string | undefined;
/** If provided, the generated stack trace omits frames before this function. */
// tslint:disable-next-line:ban-types
stackStartFn?: Function | undefined;
});
}
/**
* This feature is deprecated and will be removed in a future version.
* Please consider using alternatives such as the `mock` helper function.
* @since v14.2.0, v12.19.0
* @deprecated Deprecated
*/
class CallTracker {
/**
* The wrapper function is expected to be called exactly `exact` times. If the
* function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
* error.
*
* ```js
* import assert from 'node:assert';
*
* // Creates call tracker.
* const tracker = new assert.CallTracker();
*
* function func() {}
*
* // Returns a function that wraps func() that must be called exact times
* // before tracker.verify().
* const callsfunc = tracker.calls(func);
* ```
* @since v14.2.0, v12.19.0
* @param [fn='A no-op function']
* @param [exact=1]
* @return that wraps `fn`.
*/
calls(exact?: number): () => void;
calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
/**
* Example:
*
* ```js
* import assert from 'node:assert';
*
* const tracker = new assert.CallTracker();
*
* function func() {}
* const callsfunc = tracker.calls(func);
* callsfunc(1, 2, 3);
*
* assert.deepStrictEqual(tracker.getCalls(callsfunc),
* [{ thisArg: undefined, arguments: [1, 2, 3] }]);
* ```
* @since v18.8.0, v16.18.0
* @param fn
* @return An Array with all the calls to a tracked function.
*/
getCalls(fn: Function): CallTrackerCall[];
/**
* The arrays contains information about the expected and actual number of calls of
* the functions that have not been called the expected number of times.
*
* ```js
* import assert from 'node:assert';
*
* // Creates call tracker.
* const tracker = new assert.CallTracker();
*
* function func() {}
*
* // Returns a function that wraps func() that must be called exact times
* // before tracker.verify().
* const callsfunc = tracker.calls(func, 2);
*
* // Returns an array containing information on callsfunc()
* console.log(tracker.report());
* // [
* // {
* // message: 'Expected the func function to be executed 2 time(s) but was
* // executed 0 time(s).',
* // actual: 0,
* // expected: 2,
* // operator: 'func',
* // stack: stack trace
* // }
* // ]
* ```
* @since v14.2.0, v12.19.0
* @return An Array of objects containing information about the wrapper functions returned by `calls`.
*/
report(): CallTrackerReportInformation[];
/**
* Reset calls of the call tracker.
* If a tracked function is passed as an argument, the calls will be reset for it.
* If no arguments are passed, all tracked functions will be reset.
*
* ```js
* import assert from 'node:assert';
*
* const tracker = new assert.CallTracker();
*
* function func() {}
* const callsfunc = tracker.calls(func);
*
* callsfunc();
* // Tracker was called once
* assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
*
* tracker.reset(callsfunc);
* assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
* ```
* @since v18.8.0, v16.18.0
* @param fn a tracked function to reset.
*/
reset(fn?: Function): void;
/**
* Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
* have not been called the expected number of times.
*
* ```js
* import assert from 'node:assert';
*
* // Creates call tracker.
* const tracker = new assert.CallTracker();
*
* function func() {}
*
* // Returns a function that wraps func() that must be called exact times
* // before tracker.verify().
* const callsfunc = tracker.calls(func, 2);
*
* callsfunc();
*
* // Will throw an error since callsfunc() was only called once.
* tracker.verify();
* ```
* @since v14.2.0, v12.19.0
*/
verify(): void;
}
interface CallTrackerCall {
thisArg: object;
arguments: unknown[];
}
interface CallTrackerReportInformation {
message: string;
/** The actual number of times the function was called. */
actual: number;
/** The number of times the function was expected to be called. */
expected: number;
/** The name of the function that is wrapped. */
operator: string;
/** A stack trace of the function. */
stack: object;
}
type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
/**
* Throws an `AssertionError` with the provided error message or a default
* error message. If the `message` parameter is an instance of an `Error` then
* it will be thrown instead of the `AssertionError`.
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.fail();
* // AssertionError [ERR_ASSERTION]: Failed
*
* assert.fail('boom');
* // AssertionError [ERR_ASSERTION]: boom
*
* assert.fail(new TypeError('need array'));
* // TypeError: need array
* ```
*
* Using `assert.fail()` with more than two arguments is possible but deprecated.
* See below for further details.
* @since v0.1.21
* @param [message='Failed']
*/
function fail(message?: string | Error): never;
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
function fail(
actual: unknown,
expected: unknown,
message?: string | Error,
operator?: string,
// tslint:disable-next-line:ban-types
stackStartFn?: Function
): never;
/**
* Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`.
*
* If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default
* error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
* If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
*
* Be aware that in the `repl` the error message will be different to the one
* thrown in a file! See below for further details.
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.ok(true);
* // OK
* assert.ok(1);
* // OK
*
* assert.ok();
* // AssertionError: No value argument passed to `assert.ok()`
*
* assert.ok(false, 'it\'s false');
* // AssertionError: it's false
*
* // In the repl:
* assert.ok(typeof 123 === 'string');
* // AssertionError: false == true
*
* // In a file (e.g. test.js):
* assert.ok(typeof 123 === 'string');
* // AssertionError: The expression evaluated to a falsy value:
* //
* // assert.ok(typeof 123 === 'string')
*
* assert.ok(false);
* // AssertionError: The expression evaluated to a falsy value:
* //
* // assert.ok(false)
*
* assert.ok(0);
* // AssertionError: The expression evaluated to a falsy value:
* //
* // assert.ok(0)
* ```
*
* ```js
* import assert from 'node:assert/strict';
*
* // Using `assert()` works the same:
* assert(0);
* // AssertionError: The expression evaluated to a falsy value:
* //
* // assert(0)
* ```
* @since v0.1.21
*/
function ok(value: unknown, message?: string | Error): asserts value;
/**
* **Strict assertion mode**
*
* An alias of {@link strictEqual}.
*
* **Legacy assertion mode**
*
* > Stability: 3 - Legacy: Use {@link strictEqual} instead.
*
* Tests shallow, coercive equality between the `actual` and `expected` parameters
* using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
* and treated as being identical if both sides are `NaN`.
*
* ```js
* import assert from 'node:assert';
*
* assert.equal(1, 1);
* // OK, 1 == 1
* assert.equal(1, '1');
* // OK, 1 == '1'
* assert.equal(NaN, NaN);
* // OK
*
* assert.equal(1, 2);
* // AssertionError: 1 == 2
* assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
* // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
* ```
*
* If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default
* error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
* @since v0.1.21
*/
function equal(actual: unknown, expected: unknown, message?: string | Error): void;
/**
* **Strict assertion mode**
*
* An alias of {@link notStrictEqual}.
*
* **Legacy assertion mode**
*
* > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
*
* Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
* specially handled and treated as being identical if both sides are `NaN`.
*
* ```js
* import assert from 'node:assert';
*
* assert.notEqual(1, 2);
* // OK
*
* assert.notEqual(1, 1);
* // AssertionError: 1 != 1
*
* assert.notEqual(1, '1');
* // AssertionError: 1 != '1'
* ```
*
* If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error
* message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
* @since v0.1.21
*/
function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
/**
* **Strict assertion mode**
*
* An alias of {@link deepStrictEqual}.
*
* **Legacy assertion mode**
*
* > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
*
* Tests for deep equality between the `actual` and `expected` parameters. Consider
* using {@link deepStrictEqual} instead. {@link deepEqual} can have
* surprising results.
*
* _Deep equality_ means that the enumerable "own" properties of child objects
* are also recursively evaluated by the following rules.
* @since v0.1.21
*/
function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
/**
* **Strict assertion mode**
*
* An alias of {@link notDeepStrictEqual}.
*
* **Legacy assertion mode**
*
* > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
*
* Tests for any deep inequality. Opposite of {@link deepEqual}.
*
* ```js
* import assert from 'node:assert';
*
* const obj1 = {
* a: {
* b: 1,
* },
* };
* const obj2 = {
* a: {
* b: 2,
* },
* };
* const obj3 = {
* a: {
* b: 1,
* },
* };
* const obj4 = { __proto__: obj1 };
*
* assert.notDeepEqual(obj1, obj1);
* // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
*
* assert.notDeepEqual(obj1, obj2);
* // OK
*
* assert.notDeepEqual(obj1, obj3);
* // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
*
* assert.notDeepEqual(obj1, obj4);
* // OK
* ```
*
* If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default
* error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
* instead of the `AssertionError`.
* @since v0.1.21
*/
function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
/**
* Tests strict equality between the `actual` and `expected` parameters as
* determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.strictEqual(1, 2);
* // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
* //
* // 1 !== 2
*
* assert.strictEqual(1, 1);
* // OK
*
* assert.strictEqual('Hello foobar', 'Hello World!');
* // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
* // + actual - expected
* //
* // + 'Hello foobar'
* // - 'Hello World!'
* // ^
*
* const apples = 1;
* const oranges = 2;
* assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
* // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
*
* assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
* // TypeError: Inputs are not identical
* ```
*
* If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
* default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
* instead of the `AssertionError`.
* @since v0.1.21
*/
function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
/**
* Tests strict inequality between the `actual` and `expected` parameters as
* determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.notStrictEqual(1, 2);
* // OK
*
* assert.notStrictEqual(1, 1);
* // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
* //
* // 1
*
* assert.notStrictEqual(1, '1');
* // OK
* ```
*
* If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
* default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
* instead of the `AssertionError`.
* @since v0.1.21
*/
function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
/**
* Tests for deep equality between the `actual` and `expected` parameters.
* "Deep" equality means that the enumerable "own" properties of child objects
* are recursively evaluated also by the following rules.
* @since v1.2.0
*/
function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
/**
* Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
* // OK
* ```
*
* If the values are deeply and strictly equal, an `AssertionError` is thrown
* with a `message` property set equal to the value of the `message` parameter. If
* the `message` parameter is undefined, a default error message is assigned. If
* the `message` parameter is an instance of an `Error` then it will be thrown
* instead of the `AssertionError`.
* @since v1.2.0
*/
function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
/**
* Expects the function `fn` to throw an error.
*
* If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
* a validation object where each property will be tested for strict deep equality,
* or an instance of error where each property will be tested for strict deep
* equality including the non-enumerable `message` and `name` properties. When
* using an object, it is also possible to use a regular expression, when
* validating against a string property. See below for examples.
*
* If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation
* fails.
*
* Custom validation object/error instance:
*
* ```js
* import assert from 'node:assert/strict';
*
* const err = new TypeError('Wrong value');
* err.code = 404;
* err.foo = 'bar';
* err.info = {
* nested: true,
* baz: 'text',
* };
* err.reg = /abc/i;
*
* assert.throws(
* () => {
* throw err;
* },
* {
* name: 'TypeError',
* message: 'Wrong value',
* info: {
* nested: true,
* baz: 'text',
* },
* // Only properties on the validation object will be tested for.
* // Using nested objects requires all properties to be present. Otherwise
* // the validation is going to fail.
* },
* );
*
* // Using regular expressions to validate error properties:
* assert.throws(
* () => {
* throw err;
* },
* {
* // The `name` and `message` properties are strings and using regular
* // expressions on those will match against the string. If they fail, an
* // error is thrown.
* name: /^TypeError$/,
* message: /Wrong/,
* foo: 'bar',
* info: {
* nested: true,
* // It is not possible to use regular expressions for nested properties!
* baz: 'text',
* },
* // The `reg` property contains a regular expression and only if the
* // validation object contains an identical regular expression, it is going
* // to pass.
* reg: /abc/i,
* },
* );
*
* // Fails due to the different `message` and `name` properties:
* assert.throws(
* () => {
* const otherErr = new Error('Not found');
* // Copy all enumerable properties from `err` to `otherErr`.
* for (const [key, value] of Object.entries(err)) {
* otherErr[key] = value;
* }
* throw otherErr;
* },
* // The error's `message` and `name` properties will also be checked when using
* // an error as validation object.
* err,
* );
* ```
*
* Validate instanceof using constructor:
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.throws(
* () => {
* throw new Error('Wrong value');
* },
* Error,
* );
* ```
*
* Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
*
* Using a regular expression runs `.toString` on the error object, and will
* therefore also include the error name.
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.throws(
* () => {
* throw new Error('Wrong value');
* },
* /^Error: Wrong value$/,
* );
* ```
*
* Custom error validation:
*
* The function must return `true` to indicate all internal validations passed.
* It will otherwise fail with an `AssertionError`.
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.throws(
* () => {
* throw new Error('Wrong value');
* },
* (err) => {
* assert(err instanceof Error);
* assert(/value/.test(err));
* // Avoid returning anything from validation functions besides `true`.
* // Otherwise, it's not clear what part of the validation failed. Instead,
* // throw an error about the specific validation that failed (as done in this
* // example) and add as much helpful debugging information to that error as
* // possible.
* return true;
* },
* 'unexpected error',
* );
* ```
*
* `error` cannot be a string. If a string is provided as the second
* argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same
* message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
* a string as the second argument gets considered:
*
* ```js
* import assert from 'node:assert/strict';
*
* function throwingFirst() {
* throw new Error('First');
* }
*
* function throwingSecond() {
* throw new Error('Second');
* }
*
* function notThrowing() {}
*
* // The second argument is a string and the input function threw an Error.
* // The first case will not throw as it does not match for the error message
* // thrown by the input function!
* assert.throws(throwingFirst, 'Second');
* // In the next example the message has no benefit over the message from the
* // error and since it is not clear if the user intended to actually match
* // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
* assert.throws(throwingSecond, 'Second');
* // TypeError [ERR_AMBIGUOUS_ARGUMENT]
*
* // The string is only used (as message) in case the function does not throw:
* assert.throws(notThrowing, 'Second');
* // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
*
* // If it was intended to match for the error message do this instead:
* // It does not throw because the error messages match.
* assert.throws(throwingSecond, /Second$/);
*
* // If the error message does not match, an AssertionError is thrown.
* assert.throws(throwingFirst, /Second$/);
* // AssertionError [ERR_ASSERTION]
* ```
*
* Due to the confusing error-prone notation, avoid a string as the second
* argument.
* @since v0.1.21
*/
function throws(block: () => unknown, message?: string | Error): void;
function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
/**
* Asserts that the function `fn` does not throw an error.
*
* Using `assert.doesNotThrow()` is actually not useful because there
* is no benefit in catching an error and then rethrowing it. Instead, consider
* adding a comment next to the specific code path that should not throw and keep
* error messages as expressive as possible.
*
* When `assert.doesNotThrow()` is called, it will immediately call the `fn`function.
*
* If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a
* different type, or if the `error` parameter is undefined, the error is
* propagated back to the caller.
*
* If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
* function. See {@link throws} for more details.
*
* The following, for instance, will throw the `TypeError` because there is no
* matching error type in the assertion:
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.doesNotThrow(
* () => {
* throw new TypeError('Wrong value');
* },
* SyntaxError,
* );
* ```
*
* However, the following will result in an `AssertionError` with the message
* 'Got unwanted exception...':
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.doesNotThrow(
* () => {
* throw new TypeError('Wrong value');
* },
* TypeError,
* );
* ```
*
* If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message:
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.doesNotThrow(
* () => {
* throw new TypeError('Wrong value');
* },
* /Wrong value/,
* 'Whoops',
* );
* // Throws: AssertionError: Got unwanted exception: Whoops
* ```
* @since v0.1.21
*/
function doesNotThrow(block: () => unknown, message?: string | Error): void;
function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
/**
* Throws `value` if `value` is not `undefined` or `null`. This is useful when
* testing the `error` argument in callbacks. The stack trace contains all frames
* from the error passed to `ifError()` including the potential new frames for`ifError()` itself.
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.ifError(null);
* // OK
* assert.ifError(0);
* // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
* assert.ifError('error');
* // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
* assert.ifError(new Error());
* // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
*
* // Create some random error frames.
* let err;
* (function errorFrame() {
* err = new Error('test error');
* })();
*
* (function ifErrorFrame() {
* assert.ifError(err);
* })();
* // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
* // at ifErrorFrame
* // at errorFrame
* ```
* @since v0.1.97
*/
function ifError(value: unknown): asserts value is null | undefined;
/**
* Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
* calls the function and awaits the returned promise to complete. It will then
* check that the promise is rejected.
*
* If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the
* function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error
* handler is skipped.
*
* Besides the async nature to await the completion behaves identically to {@link throws}.
*
* If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
* an object where each property will be tested for, or an instance of error where
* each property will be tested for including the non-enumerable `message` and`name` properties.
*
* If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.
*
* ```js
* import assert from 'node:assert/strict';
*
* await assert.rejects(
* async () => {
* throw new TypeError('Wrong value');
* },
* {
* name: 'TypeError',
* message: 'Wrong value',
* },
* );
* ```
*
* ```js
* import assert from 'node:assert/strict';
*
* await assert.rejects(
* async () => {
* throw new TypeError('Wrong value');
* },
* (err) => {
* assert.strictEqual(err.name, 'TypeError');
* assert.strictEqual(err.message, 'Wrong value');
* return true;
* },
* );
* ```
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.rejects(
* Promise.reject(new Error('Wrong value')),
* Error,
* ).then(() => {
* // ...
* });
* ```
*
* `error` cannot be a string. If a string is provided as the second
* argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the
* example in {@link throws} carefully if using a string as the second
* argument gets considered.
* @since v10.0.0
*/
function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
function rejects(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
/**
* Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
* calls the function and awaits the returned promise to complete. It will then
* check that the promise is not rejected.
*
* If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If
* the function does not return a promise, `assert.doesNotReject()` will return a
* rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases
* the error handler is skipped.
*
* Using `assert.doesNotReject()` is actually not useful because there is little
* benefit in catching a rejection and then rejecting it again. Instead, consider
* adding a comment next to the specific code path that should not reject and keep
* error messages as expressive as possible.
*
* If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
* function. See {@link throws} for more details.
*
* Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
*
* ```js
* import assert from 'node:assert/strict';
*
* await assert.doesNotReject(
* async () => {
* throw new TypeError('Wrong value');
* },
* SyntaxError,
* );
* ```
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
* .then(() => {
* // ...
* });
* ```
* @since v10.0.0
*/
function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
/**
* Expects the `string` input to match the regular expression.
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.match('I will fail', /pass/);
* // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
*
* assert.match(123, /pass/);
* // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
*
* assert.match('I will pass', /pass/);
* // OK
* ```
*
* If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
* to the value of the `message` parameter. If the `message` parameter is
* undefined, a default error message is assigned. If the `message` parameter is an
* instance of an `Error` then it will be thrown instead of the `AssertionError`.
* @since v13.6.0, v12.16.0
*/
function match(value: string, regExp: RegExp, message?: string | Error): void;
/**
* Expects the `string` input not to match the regular expression.
*
* ```js
* import assert from 'node:assert/strict';
*
* assert.doesNotMatch('I will fail', /fail/);
* // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
*
* assert.doesNotMatch(123, /pass/);
* // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
*
* assert.doesNotMatch('I will pass', /different/);
* // OK
* ```
*
* If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
* to the value of the `message` parameter. If the `message` parameter is
* undefined, a default error message is assigned. If the `message` parameter is an
* instance of an `Error` then it will be thrown instead of the `AssertionError`.
* @since v13.6.0, v12.16.0
*/
function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
const strict: Omit<typeof assert, 'equal' | 'notEqual' | 'deepEqual' | 'notDeepEqual' | 'ok' | 'strictEqual' | 'deepStrictEqual' | 'ifError' | 'strict'> & {
(value: unknown, message?: string | Error): asserts value;
equal: typeof strictEqual;
notEqual: typeof notStrictEqual;
deepEqual: typeof deepStrictEqual;
notDeepEqual: typeof notDeepStrictEqual;
// Mapped types and assertion functions are incompatible?
// TS2775: Assertions require every name in the call target
// to be declared with an explicit type annotation.
ok: typeof ok;
strictEqual: typeof strictEqual;
deepStrictEqual: typeof deepStrictEqual;
ifError: typeof ifError;
strict: typeof strict;
};
}
export = assert;
}
declare module 'node:assert' {
import assert = require('assert');
export = assert;
}

8
node_modules/@types/node/assert/strict.d.ts generated vendored Normal file
View File

@ -0,0 +1,8 @@
declare module 'assert/strict' {
import { strict } from 'node:assert';
export = strict;
}
declare module 'node:assert/strict' {
import { strict } from 'node:assert';
export = strict;
}

530
node_modules/@types/node/async_hooks.d.ts generated vendored Normal file
View File

@ -0,0 +1,530 @@
/**
* We strongly discourage the use of the `async_hooks` API.
* Other APIs that can cover most of its use cases include:
*
* * `AsyncLocalStorage` tracks async context
* * `process.getActiveResourcesInfo()` tracks active resources
*
* The `node:async_hooks` module provides an API to track asynchronous resources.
* It can be accessed using:
*
* ```js
* import async_hooks from 'node:async_hooks';
* ```
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/async_hooks.js)
*/
declare module 'async_hooks' {
/**
* ```js
* import { executionAsyncId } from 'node:async_hooks';
* import fs from 'node:fs';
*
* console.log(executionAsyncId()); // 1 - bootstrap
* fs.open(path, 'r', (err, fd) => {
* console.log(executionAsyncId()); // 6 - open()
* });
* ```
*
* The ID returned from `executionAsyncId()` is related to execution timing, not
* causality (which is covered by `triggerAsyncId()`):
*
* ```js
* const server = net.createServer((conn) => {
* // Returns the ID of the server, not of the new connection, because the
* // callback runs in the execution scope of the server's MakeCallback().
* async_hooks.executionAsyncId();
*
* }).listen(port, () => {
* // Returns the ID of a TickObject (process.nextTick()) because all
* // callbacks passed to .listen() are wrapped in a nextTick().
* async_hooks.executionAsyncId();
* });
* ```
*
* Promise contexts may not get precise `executionAsyncIds` by default.
* See the section on `promise execution tracking`.
* @since v8.1.0
* @return The `asyncId` of the current execution context. Useful to track when something calls.
*/
function executionAsyncId(): number;
/**
* Resource objects returned by `executionAsyncResource()` are most often internal
* Node.js handle objects with undocumented APIs. Using any functions or properties
* on the object is likely to crash your application and should be avoided.
*
* Using `executionAsyncResource()` in the top-level execution context will
* return an empty object as there is no handle or request object to use,
* but having an object representing the top-level can be helpful.
*
* ```js
* import { open } from 'node:fs';
* import { executionAsyncId, executionAsyncResource } from 'node:async_hooks';
*
* console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
* open(new URL(import.meta.url), 'r', (err, fd) => {
* console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
* });
* ```
*
* This can be used to implement continuation local storage without the
* use of a tracking `Map` to store the metadata:
*
* ```js
* import { createServer } from 'node:http';
* import {
* executionAsyncId,
* executionAsyncResource,
* createHook,
* } from 'async_hooks';
* const sym = Symbol('state'); // Private symbol to avoid pollution
*
* createHook({
* init(asyncId, type, triggerAsyncId, resource) {
* const cr = executionAsyncResource();
* if (cr) {
* resource[sym] = cr[sym];
* }
* },
* }).enable();
*
* const server = createServer((req, res) => {
* executionAsyncResource()[sym] = { state: req.url };
* setTimeout(function() {
* res.end(JSON.stringify(executionAsyncResource()[sym]));
* }, 100);
* }).listen(3000);
* ```
* @since v13.9.0, v12.17.0
* @return The resource representing the current execution. Useful to store data within the resource.
*/
function executionAsyncResource(): object;
/**
* ```js
* const server = net.createServer((conn) => {
* // The resource that caused (or triggered) this callback to be called
* // was that of the new connection. Thus the return value of triggerAsyncId()
* // is the asyncId of "conn".
* async_hooks.triggerAsyncId();
*
* }).listen(port, () => {
* // Even though all callbacks passed to .listen() are wrapped in a nextTick()
* // the callback itself exists because the call to the server's .listen()
* // was made. So the return value would be the ID of the server.
* async_hooks.triggerAsyncId();
* });
* ```
*
* Promise contexts may not get valid `triggerAsyncId`s by default. See
* the section on `promise execution tracking`.
* @return The ID of the resource responsible for calling the callback that is currently being executed.
*/
function triggerAsyncId(): number;
interface HookCallbacks {
/**
* Called when a class is constructed that has the possibility to emit an asynchronous event.
* @param asyncId a unique ID for the async resource
* @param type the type of the async resource
* @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
* @param resource reference to the resource representing the async operation, needs to be released during destroy
*/
init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
/**
* When an asynchronous operation is initiated or completes a callback is called to notify the user.
* The before callback is called just before said callback is executed.
* @param asyncId the unique identifier assigned to the resource about to execute the callback.
*/
before?(asyncId: number): void;
/**
* Called immediately after the callback specified in before is completed.
* @param asyncId the unique identifier assigned to the resource which has executed the callback.
*/
after?(asyncId: number): void;
/**
* Called when a promise has resolve() called. This may not be in the same execution id
* as the promise itself.
* @param asyncId the unique id for the promise that was resolve()d.
*/
promiseResolve?(asyncId: number): void;
/**
* Called after the resource corresponding to asyncId is destroyed
* @param asyncId a unique ID for the async resource
*/
destroy?(asyncId: number): void;
}
interface AsyncHook {
/**
* Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
*/
enable(): this;
/**
* Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
*/
disable(): this;
}
/**
* Registers functions to be called for different lifetime events of each async
* operation.
*
* The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
* respective asynchronous event during a resource's lifetime.
*
* All callbacks are optional. For example, if only resource cleanup needs to
* be tracked, then only the `destroy` callback needs to be passed. The
* specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
*
* ```js
* import { createHook } from 'node:async_hooks';
*
* const asyncHook = createHook({
* init(asyncId, type, triggerAsyncId, resource) { },
* destroy(asyncId) { },
* });
* ```
*
* The callbacks will be inherited via the prototype chain:
*
* ```js
* class MyAsyncCallbacks {
* init(asyncId, type, triggerAsyncId, resource) { }
* destroy(asyncId) {}
* }
*
* class MyAddedCallbacks extends MyAsyncCallbacks {
* before(asyncId) { }
* after(asyncId) { }
* }
*
* const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
* ```
*
* Because promises are asynchronous resources whose lifecycle is tracked
* via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
* @since v8.1.0
* @param callbacks The `Hook Callbacks` to register
* @return Instance used for disabling and enabling hooks
*/
function createHook(callbacks: HookCallbacks): AsyncHook;
interface AsyncResourceOptions {
/**
* The ID of the execution context that created this async event.
* @default executionAsyncId()
*/
triggerAsyncId?: number | undefined;
/**
* Disables automatic `emitDestroy` when the object is garbage collected.
* This usually does not need to be set (even if `emitDestroy` is called
* manually), unless the resource's `asyncId` is retrieved and the
* sensitive API's `emitDestroy` is called with it.
* @default false
*/
requireManualDestroy?: boolean | undefined;
}
/**
* The class `AsyncResource` is designed to be extended by the embedder's async
* resources. Using this, users can easily trigger the lifetime events of their
* own resources.
*
* The `init` hook will trigger when an `AsyncResource` is instantiated.
*
* The following is an overview of the `AsyncResource` API.
*
* ```js
* import { AsyncResource, executionAsyncId } from 'node:async_hooks';
*
* // AsyncResource() is meant to be extended. Instantiating a
* // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
* // async_hook.executionAsyncId() is used.
* const asyncResource = new AsyncResource(
* type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false },
* );
*
* // Run a function in the execution context of the resource. This will
* // * establish the context of the resource
* // * trigger the AsyncHooks before callbacks
* // * call the provided function `fn` with the supplied arguments
* // * trigger the AsyncHooks after callbacks
* // * restore the original execution context
* asyncResource.runInAsyncScope(fn, thisArg, ...args);
*
* // Call AsyncHooks destroy callbacks.
* asyncResource.emitDestroy();
*
* // Return the unique ID assigned to the AsyncResource instance.
* asyncResource.asyncId();
*
* // Return the trigger ID for the AsyncResource instance.
* asyncResource.triggerAsyncId();
* ```
*/
class AsyncResource {
/**
* AsyncResource() is meant to be extended. Instantiating a
* new AsyncResource() also triggers init. If triggerAsyncId is omitted then
* async_hook.executionAsyncId() is used.
* @param type The type of async event.
* @param triggerAsyncId The ID of the execution context that created
* this async event (default: `executionAsyncId()`), or an
* AsyncResourceOptions object (since v9.3.0)
*/
constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
/**
* Binds the given function to the current execution context.
* @since v14.8.0, v12.19.0
* @param fn The function to bind to the current execution context.
* @param type An optional name to associate with the underlying `AsyncResource`.
*/
static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(fn: Func, type?: string, thisArg?: ThisArg): Func;
/**
* Binds the given function to execute to this `AsyncResource`'s scope.
* @since v14.8.0, v12.19.0
* @param fn The function to bind to the current `AsyncResource`.
*/
bind<Func extends (...args: any[]) => any>(fn: Func): Func;
/**
* Call the provided function with the provided arguments in the execution context
* of the async resource. This will establish the context, trigger the AsyncHooks
* before callbacks, call the function, trigger the AsyncHooks after callbacks, and
* then restore the original execution context.
* @since v9.6.0
* @param fn The function to call in the execution context of this async resource.
* @param thisArg The receiver to be used for the function call.
* @param args Optional arguments to pass to the function.
*/
runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
/**
* Call all `destroy` hooks. This should only ever be called once. An error will
* be thrown if it is called more than once. This **must** be manually called. If
* the resource is left to be collected by the GC then the `destroy` hooks will
* never be called.
* @return A reference to `asyncResource`.
*/
emitDestroy(): this;
/**
* @return The unique `asyncId` assigned to the resource.
*/
asyncId(): number;
/**
*
* @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
*/
triggerAsyncId(): number;
}
/**
* This class creates stores that stay coherent through asynchronous operations.
*
* While you can create your own implementation on top of the `node:async_hooks`module, `AsyncLocalStorage` should be preferred as it is a performant and memory
* safe implementation that involves significant optimizations that are non-obvious
* to implement.
*
* The following example uses `AsyncLocalStorage` to build a simple logger
* that assigns IDs to incoming HTTP requests and includes them in messages
* logged within each request.
*
* ```js
* import http from 'node:http';
* import { AsyncLocalStorage } from 'node:async_hooks';
*
* const asyncLocalStorage = new AsyncLocalStorage();
*
* function logWithId(msg) {
* const id = asyncLocalStorage.getStore();
* console.log(`${id !== undefined ? id : '-'}:`, msg);
* }
*
* let idSeq = 0;
* http.createServer((req, res) => {
* asyncLocalStorage.run(idSeq++, () => {
* logWithId('start');
* // Imagine any chain of async operations here
* setImmediate(() => {
* logWithId('finish');
* res.end();
* });
* });
* }).listen(8080);
*
* http.get('http://localhost:8080');
* http.get('http://localhost:8080');
* // Prints:
* // 0: start
* // 1: start
* // 0: finish
* // 1: finish
* ```
*
* Each instance of `AsyncLocalStorage` maintains an independent storage context.
* Multiple instances can safely exist simultaneously without risk of interfering
* with each other's data.
* @since v13.10.0, v12.17.0
*/
class AsyncLocalStorage<T> {
/**
* Binds the given function to the current execution context.
* @since v19.8.0
* @experimental
* @param fn The function to bind to the current execution context.
* @return A new function that calls `fn` within the captured execution context.
*/
static bind<Func extends (...args: any[]) => any>(fn: Func): Func;
/**
* Captures the current execution context and returns a function that accepts a
* function as an argument. Whenever the returned function is called, it
* calls the function passed to it within the captured context.
*
* ```js
* const asyncLocalStorage = new AsyncLocalStorage();
* const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
* const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
* console.log(result); // returns 123
* ```
*
* AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple
* async context tracking purposes, for example:
*
* ```js
* class Foo {
* #runInAsyncScope = AsyncLocalStorage.snapshot();
*
* get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); }
* }
*
* const foo = asyncLocalStorage.run(123, () => new Foo());
* console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123
* ```
* @since v19.8.0
* @experimental
* @return A new function with the signature `(fn: (...args) : R, ...args) : R`.
*/
static snapshot(): <R, TArgs extends any[]>(fn: (...args: TArgs) => R, ...args: TArgs) => R;
/**
* Disables the instance of `AsyncLocalStorage`. All subsequent calls
* to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
*
* When calling `asyncLocalStorage.disable()`, all current contexts linked to the
* instance will be exited.
*
* Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores
* provided by the `asyncLocalStorage`, as those objects are garbage collected
* along with the corresponding async resources.
*
* Use this method when the `asyncLocalStorage` is not in use anymore
* in the current process.
* @since v13.10.0, v12.17.0
* @experimental
*/
disable(): void;
/**
* Returns the current store.
* If called outside of an asynchronous context initialized by
* calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
* returns `undefined`.
* @since v13.10.0, v12.17.0
*/
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.
* The store is accessible to any asynchronous operations created within the
* callback.
*
* The optional `args` are passed to the callback function.
*
* If the callback function throws an error, the error is thrown by `run()` too.
* The stacktrace is not impacted by this call and the context is exited.
*
* Example:
*
* ```js
* const store = { id: 2 };
* try {
* asyncLocalStorage.run(store, () => {
* asyncLocalStorage.getStore(); // Returns the store object
* setTimeout(() => {
* asyncLocalStorage.getStore(); // Returns the store object
* }, 200);
* throw new Error();
* });
* } catch (e) {
* asyncLocalStorage.getStore(); // Returns undefined
* // The error will be caught here
* }
* ```
* @since v13.10.0, v12.17.0
*/
run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
/**
* Runs a function synchronously outside of a context and returns its
* return value. The store is not accessible within the callback function or
* the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`.
*
* The optional `args` are passed to the callback function.
*
* If the callback function throws an error, the error is thrown by `exit()` too.
* The stacktrace is not impacted by this call and the context is re-entered.
*
* Example:
*
* ```js
* // Within a call to run
* try {
* asyncLocalStorage.getStore(); // Returns the store object or value
* asyncLocalStorage.exit(() => {
* asyncLocalStorage.getStore(); // Returns undefined
* throw new Error();
* });
* } catch (e) {
* asyncLocalStorage.getStore(); // Returns the same object or value
* // The error will be caught here
* }
* ```
* @since v13.10.0, v12.17.0
* @experimental
*/
exit<R, TArgs extends any[]>(callback: (...args: TArgs) => R, ...args: TArgs): R;
/**
* Transitions into the context for the remainder of the current
* synchronous execution and then persists the store through any following
* asynchronous calls.
*
* Example:
*
* ```js
* const store = { id: 1 };
* // Replaces previous store with the given store object
* asyncLocalStorage.enterWith(store);
* asyncLocalStorage.getStore(); // Returns the store object
* someAsyncOperation(() => {
* asyncLocalStorage.getStore(); // Returns the same object
* });
* ```
*
* This transition will continue for the _entire_ synchronous execution.
* This means that if, for example, the context is entered within an event
* handler subsequent event handlers will also run within that context unless
* specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons
* to use the latter method.
*
* ```js
* const store = { id: 1 };
*
* emitter.on('my-event', () => {
* asyncLocalStorage.enterWith(store);
* });
* emitter.on('my-event', () => {
* asyncLocalStorage.getStore(); // Returns the same object
* });
*
* asyncLocalStorage.getStore(); // Returns undefined
* emitter.emit('my-event');
* asyncLocalStorage.getStore(); // Returns the same object
* ```
* @since v13.11.0, v12.17.0
* @experimental
*/
enterWith(store: T): void;
}
}
declare module 'node:async_hooks' {
export * from 'async_hooks';
}

2354
node_modules/@types/node/buffer.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1395
node_modules/@types/node/child_process.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

414
node_modules/@types/node/cluster.d.ts generated vendored Normal file
View File

@ -0,0 +1,414 @@
/**
* Clusters of Node.js processes can be used to run multiple instances of Node.js
* that can distribute workloads among their application threads. When process
* isolation is not needed, use the `worker_threads` module instead, which
* allows running multiple application threads within a single Node.js instance.
*
* The cluster module allows easy creation of child processes that all share
* server ports.
*
* ```js
* import cluster from 'node:cluster';
* import http from 'node:http';
* import { availableParallelism } from 'node:os';
* import process from 'node:process';
*
* const numCPUs = availableParallelism();
*
* if (cluster.isPrimary) {
* console.log(`Primary ${process.pid} is running`);
*
* // Fork workers.
* for (let i = 0; i < numCPUs; i++) {
* cluster.fork();
* }
*
* cluster.on('exit', (worker, code, signal) => {
* console.log(`worker ${worker.process.pid} died`);
* });
* } else {
* // Workers can share any TCP connection
* // In this case it is an HTTP server
* http.createServer((req, res) => {
* res.writeHead(200);
* res.end('hello world\n');
* }).listen(8000);
*
* console.log(`Worker ${process.pid} started`);
* }
* ```
*
* Running Node.js will now share port 8000 between the workers:
*
* ```console
* $ node server.js
* Primary 3596 is running
* Worker 4324 started
* Worker 4520 started
* Worker 6056 started
* Worker 5644 started
* ```
*
* 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/v20.2.0/lib/cluster.js)
*/
declare module 'cluster' {
import * as child from 'node:child_process';
import EventEmitter = require('node:events');
import * as net from 'node:net';
type SerializationType = 'json' | 'advanced';
export interface ClusterSettings {
execArgv?: string[] | undefined; // default: process.execArgv
exec?: string | undefined;
args?: string[] | undefined;
silent?: boolean | undefined;
stdio?: any[] | undefined;
uid?: number | undefined;
gid?: number | undefined;
inspectPort?: number | (() => number) | undefined;
serialization?: SerializationType | undefined;
cwd?: string | undefined;
windowsHide?: boolean | undefined;
}
export interface Address {
address: string;
port: number;
addressType: number | 'udp4' | 'udp6'; // 4, 6, -1, "udp4", "udp6"
}
/**
* A `Worker` object contains all public information and method about a worker.
* In the primary it can be obtained using `cluster.workers`. In a worker
* it can be obtained using `cluster.worker`.
* @since v0.7.0
*/
export class Worker extends EventEmitter {
/**
* Each new worker is given its own unique id, this id is stored in the`id`.
*
* While a worker is alive, this is the key that indexes it in`cluster.workers`.
* @since v0.8.0
*/
id: number;
/**
* All workers are created using `child_process.fork()`, the returned object
* from this function is stored as `.process`. In a worker, the global `process`is stored.
*
* See: `Child Process module`.
*
* Workers will call `process.exit(0)` if the `'disconnect'` event occurs
* on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
* accidental disconnection.
* @since v0.7.0
*/
process: child.ChildProcess;
/**
* Send a message to a worker or primary, optionally with a handle.
*
* In the primary, this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
*
* In a worker, this sends a message to the primary. It is identical to`process.send()`.
*
* This example will echo back all messages from the primary:
*
* ```js
* if (cluster.isPrimary) {
* const worker = cluster.fork();
* worker.send('hi there');
*
* } else if (cluster.isWorker) {
* process.on('message', (msg) => {
* process.send(msg);
* });
* }
* ```
* @since v0.7.0
* @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
*/
send(message: child.Serializable, callback?: (error: Error | null) => void): boolean;
send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean;
send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean;
/**
* This function will kill the worker. In the primary worker, it does this by
* disconnecting the `worker.process`, and once disconnected, killing with`signal`. In the worker, it does it by killing the process with `signal`.
*
* The `kill()` function kills the worker process without waiting for a graceful
* disconnect, it has the same behavior as `worker.process.kill()`.
*
* This method is aliased as `worker.destroy()` for backwards compatibility.
*
* In a worker, `process.kill()` exists, but it is not this function;
* it is `kill()`.
* @since v0.9.12
* @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
*/
kill(signal?: string): void;
destroy(signal?: string): void;
/**
* In a worker, this function will close all servers, wait for the `'close'` event
* on those servers, and then disconnect the IPC channel.
*
* In the primary, an internal message is sent to the worker causing it to call`.disconnect()` on itself.
*
* Causes `.exitedAfterDisconnect` to be set.
*
* After a server is closed, it will no longer accept new connections,
* but connections may be accepted by any other listening worker. Existing
* connections will be allowed to close as usual. When no more connections exist,
* see `server.close()`, the IPC channel to the worker will close allowing it
* to die gracefully.
*
* The above applies _only_ to server connections, client connections are not
* automatically closed by workers, and disconnect does not wait for them to close
* before exiting.
*
* In a worker, `process.disconnect` exists, but it is not this function;
* it is `disconnect()`.
*
* Because long living server connections may block workers from disconnecting, it
* may be useful to send a message, so application specific actions may be taken to
* close them. It also may be useful to implement a timeout, killing a worker if
* the `'disconnect'` event has not been emitted after some time.
*
* ```js
* if (cluster.isPrimary) {
* const worker = cluster.fork();
* let timeout;
*
* worker.on('listening', (address) => {
* worker.send('shutdown');
* worker.disconnect();
* timeout = setTimeout(() => {
* worker.kill();
* }, 2000);
* });
*
* worker.on('disconnect', () => {
* clearTimeout(timeout);
* });
*
* } else if (cluster.isWorker) {
* const net = require('node:net');
* const server = net.createServer((socket) => {
* // Connections never end
* });
*
* server.listen(8000);
*
* process.on('message', (msg) => {
* if (msg === 'shutdown') {
* // Initiate graceful close of any connections to server
* }
* });
* }
* ```
* @since v0.7.7
* @return A reference to `worker`.
*/
disconnect(): void;
/**
* This function returns `true` if the worker is connected to its primary via its
* IPC channel, `false` otherwise. A worker is connected to its primary after it
* has been created. It is disconnected after the `'disconnect'` event is emitted.
* @since v0.11.14
*/
isConnected(): boolean;
/**
* This function returns `true` if the worker's process has terminated (either
* because of exiting or being signaled). Otherwise, it returns `false`.
*
* ```js
* import cluster from 'node:cluster';
* import http from 'node:http';
* import { availableParallelism } from 'node:os';
* import process from 'node:process';
*
* const numCPUs = availableParallelism();
*
* if (cluster.isPrimary) {
* console.log(`Primary ${process.pid} is running`);
*
* // Fork workers.
* for (let i = 0; i < numCPUs; i++) {
* cluster.fork();
* }
*
* cluster.on('fork', (worker) => {
* console.log('worker is dead:', worker.isDead());
* });
*
* cluster.on('exit', (worker, code, signal) => {
* console.log('worker is dead:', worker.isDead());
* });
* } else {
* // Workers can share any TCP connection. In this case, it is an HTTP server.
* http.createServer((req, res) => {
* res.writeHead(200);
* res.end(`Current process\n ${process.pid}`);
* process.kill(process.pid);
* }).listen(8000);
* }
* ```
* @since v0.11.14
*/
isDead(): boolean;
/**
* This property is `true` if the worker exited due to `.disconnect()`.
* If the worker exited any other way, it is `false`. If the
* worker has not exited, it is `undefined`.
*
* The boolean `worker.exitedAfterDisconnect` allows distinguishing between
* voluntary and accidental exit, the primary may choose not to respawn a worker
* based on this value.
*
* ```js
* cluster.on('exit', (worker, code, signal) => {
* if (worker.exitedAfterDisconnect === true) {
* console.log('Oh, it was just voluntary no need to worry');
* }
* });
*
* // kill worker
* worker.kill();
* ```
* @since v6.0.0
*/
exitedAfterDisconnect: boolean;
/**
* events.EventEmitter
* 1. disconnect
* 2. error
* 3. exit
* 4. listening
* 5. message
* 6. online
*/
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'disconnect', listener: () => void): this;
addListener(event: 'error', listener: (error: Error) => void): this;
addListener(event: 'exit', listener: (code: number, signal: string) => void): this;
addListener(event: 'listening', listener: (address: Address) => void): this;
addListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(event: 'online', listener: () => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
emit(event: 'disconnect'): boolean;
emit(event: 'error', error: Error): boolean;
emit(event: 'exit', code: number, signal: string): boolean;
emit(event: 'listening', address: Address): boolean;
emit(event: 'message', message: any, handle: net.Socket | net.Server): boolean;
emit(event: 'online'): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'disconnect', listener: () => void): this;
on(event: 'error', listener: (error: Error) => void): this;
on(event: 'exit', listener: (code: number, signal: string) => void): this;
on(event: 'listening', listener: (address: Address) => void): this;
on(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: 'online', listener: () => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: 'disconnect', listener: () => void): this;
once(event: 'error', listener: (error: Error) => void): this;
once(event: 'exit', listener: (code: number, signal: string) => void): this;
once(event: 'listening', listener: (address: Address) => void): this;
once(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: 'online', listener: () => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: 'disconnect', listener: () => void): this;
prependListener(event: 'error', listener: (error: Error) => void): this;
prependListener(event: 'exit', listener: (code: number, signal: string) => void): this;
prependListener(event: 'listening', listener: (address: Address) => void): this;
prependListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependListener(event: 'online', listener: () => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'disconnect', listener: () => void): this;
prependOnceListener(event: 'error', listener: (error: Error) => void): this;
prependOnceListener(event: 'exit', listener: (code: number, signal: string) => void): this;
prependOnceListener(event: 'listening', listener: (address: Address) => void): this;
prependOnceListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependOnceListener(event: 'online', listener: () => void): this;
}
export interface Cluster extends EventEmitter {
disconnect(callback?: () => void): void;
fork(env?: any): Worker;
/** @deprecated since v16.0.0 - use isPrimary. */
readonly isMaster: boolean;
readonly isPrimary: boolean;
readonly isWorker: boolean;
schedulingPolicy: number;
readonly settings: ClusterSettings;
/** @deprecated since v16.0.0 - use setupPrimary. */
setupMaster(settings?: ClusterSettings): void;
/**
* `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings.
*/
setupPrimary(settings?: ClusterSettings): void;
readonly worker?: Worker | undefined;
readonly workers?: NodeJS.Dict<Worker> | undefined;
readonly SCHED_NONE: number;
readonly SCHED_RR: number;
/**
* events.EventEmitter
* 1. disconnect
* 2. exit
* 3. fork
* 4. listening
* 5. message
* 6. online
* 7. setup
*/
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'disconnect', listener: (worker: Worker) => void): this;
addListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
addListener(event: 'fork', listener: (worker: Worker) => void): this;
addListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
addListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(event: 'online', listener: (worker: Worker) => void): this;
addListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
emit(event: 'disconnect', worker: Worker): boolean;
emit(event: 'exit', worker: Worker, code: number, signal: string): boolean;
emit(event: 'fork', worker: Worker): boolean;
emit(event: 'listening', worker: Worker, address: Address): boolean;
emit(event: 'message', worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
emit(event: 'online', worker: Worker): boolean;
emit(event: 'setup', settings: ClusterSettings): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'disconnect', listener: (worker: Worker) => void): this;
on(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
on(event: 'fork', listener: (worker: Worker) => void): this;
on(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
on(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: 'online', listener: (worker: Worker) => void): this;
on(event: 'setup', listener: (settings: ClusterSettings) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: 'disconnect', listener: (worker: Worker) => void): this;
once(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
once(event: 'fork', listener: (worker: Worker) => void): this;
once(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
once(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: 'online', listener: (worker: Worker) => void): this;
once(event: 'setup', listener: (settings: ClusterSettings) => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: 'disconnect', listener: (worker: Worker) => void): this;
prependListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
prependListener(event: 'fork', listener: (worker: Worker) => void): this;
prependListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
// the handle is a net.Socket or net.Server object, or undefined.
prependListener(event: 'message', listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void): this;
prependListener(event: 'online', listener: (worker: Worker) => void): this;
prependListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'disconnect', listener: (worker: Worker) => void): this;
prependOnceListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
prependOnceListener(event: 'fork', listener: (worker: Worker) => void): this;
prependOnceListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
// the handle is a net.Socket or net.Server object, or undefined.
prependOnceListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
prependOnceListener(event: 'online', listener: (worker: Worker) => void): this;
prependOnceListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
}
const cluster: Cluster;
export default cluster;
}
declare module 'node:cluster' {
export * from 'cluster';
export { default as default } from 'cluster';
}

412
node_modules/@types/node/console.d.ts generated vendored Normal file
View File

@ -0,0 +1,412 @@
/**
* The `node:console` module provides a simple debugging console that is similar to
* the JavaScript console mechanism provided by web browsers.
*
* The module exports two specific components:
*
* * A `Console` class with methods such as `console.log()`, `console.error()`, and`console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('node:console')`.
*
* _**Warning**_: The global console object's methods are neither consistently
* synchronous like the browser APIs they resemble, nor are they consistently
* asynchronous like all other Node.js streams. See the `note on process I/O` for
* more information.
*
* Example using the global `console`:
*
* ```js
* console.log('hello world');
* // Prints: hello world, to stdout
* console.log('hello %s', 'world');
* // Prints: hello world, to stdout
* console.error(new Error('Whoops, something bad happened'));
* // Prints error message and stack trace to stderr:
* // Error: Whoops, something bad happened
* // at [eval]:5:15
* // at Script.runInThisContext (node:vm:132:18)
* // at Object.runInThisContext (node:vm:309:38)
* // at node:internal/process/execution:77:19
* // at [eval]-wrapper:6:22
* // at evalScript (node:internal/process/execution:76:60)
* // at node:internal/main/eval_string:23:3
*
* const name = 'Will Robinson';
* console.warn(`Danger ${name}! Danger!`);
* // Prints: Danger Will Robinson! Danger!, to stderr
* ```
*
* Example using the `Console` class:
*
* ```js
* const out = getStreamSomehow();
* const err = getStreamSomehow();
* const myConsole = new console.Console(out, err);
*
* myConsole.log('hello world');
* // Prints: hello world, to out
* myConsole.log('hello %s', 'world');
* // Prints: hello world, to out
* myConsole.error(new Error('Whoops, something bad happened'));
* // Prints: [Error: Whoops, something bad happened], to err
*
* const name = 'Will Robinson';
* myConsole.warn(`Danger ${name}! Danger!`);
* // Prints: Danger Will Robinson! Danger!, to err
* ```
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/console.js)
*/
declare module 'console' {
import console = require('node:console');
export = console;
}
declare module 'node:console' {
import { InspectOptions } from 'node:util';
global {
// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
interface Console {
Console: console.ConsoleConstructor;
/**
* `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
* writes a message and does not otherwise affect execution. The output always
* starts with `"Assertion failed"`. If provided, `message` is formatted using `util.format()`.
*
* If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
*
* ```js
* console.assert(true, 'does nothing');
*
* console.assert(false, 'Whoops %s work', 'didn\'t');
* // Assertion failed: Whoops didn't work
*
* console.assert();
* // Assertion failed
* ```
* @since v0.1.101
* @param value The value tested for being truthy.
* @param message All arguments besides `value` are used as error message.
*/
assert(value: any, message?: string, ...optionalParams: any[]): void;
/**
* When `stdout` is a TTY, calling `console.clear()` will attempt to clear the
* TTY. When `stdout` is not a TTY, this method does nothing.
*
* The specific operation of `console.clear()` can vary across operating systems
* and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the
* current terminal viewport for the Node.js
* binary.
* @since v8.3.0
*/
clear(): void;
/**
* Maintains an internal counter specific to `label` and outputs to `stdout` the
* number of times `console.count()` has been called with the given `label`.
*
* ```js
* > console.count()
* default: 1
* undefined
* > console.count('default')
* default: 2
* undefined
* > console.count('abc')
* abc: 1
* undefined
* > console.count('xyz')
* xyz: 1
* undefined
* > console.count('abc')
* abc: 2
* undefined
* > console.count()
* default: 3
* undefined
* >
* ```
* @since v8.3.0
* @param label The display label for the counter.
*/
count(label?: string): void;
/**
* Resets the internal counter specific to `label`.
*
* ```js
* > console.count('abc');
* abc: 1
* undefined
* > console.countReset('abc');
* undefined
* > console.count('abc');
* abc: 1
* undefined
* >
* ```
* @since v8.3.0
* @param label The display label for the counter.
*/
countReset(label?: string): void;
/**
* The `console.debug()` function is an alias for {@link log}.
* @since v8.0.0
*/
debug(message?: any, ...optionalParams: any[]): void;
/**
* Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`.
* This function bypasses any custom `inspect()` function defined on `obj`.
* @since v0.1.101
*/
dir(obj: any, options?: InspectOptions): void;
/**
* This method calls `console.log()` passing it the arguments received.
* This method does not produce any XML formatting.
* @since v8.0.0
*/
dirxml(...data: any[]): void;
/**
* Prints to `stderr` with newline. Multiple arguments can be passed, with the
* first used as the primary message and all additional used as substitution
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
*
* ```js
* const code = 5;
* console.error('error #%d', code);
* // Prints: error #5, to stderr
* console.error('error', code);
* // Prints: error 5, to stderr
* ```
*
* If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string
* values are concatenated. See `util.format()` for more information.
* @since v0.1.100
*/
error(message?: any, ...optionalParams: any[]): void;
/**
* Increases indentation of subsequent lines by spaces for `groupIndentation`length.
*
* If one or more `label`s are provided, those are printed first without the
* additional indentation.
* @since v8.5.0
*/
group(...label: any[]): void;
/**
* An alias for {@link group}.
* @since v8.5.0
*/
groupCollapsed(...label: any[]): void;
/**
* Decreases indentation of subsequent lines by spaces for `groupIndentation`length.
* @since v8.5.0
*/
groupEnd(): void;
/**
* The `console.info()` function is an alias for {@link log}.
* @since v0.1.100
*/
info(message?: any, ...optionalParams: any[]): void;
/**
* Prints to `stdout` with newline. Multiple arguments can be passed, with the
* first used as the primary message and all additional used as substitution
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
*
* ```js
* const count = 5;
* console.log('count: %d', count);
* // Prints: count: 5, to stdout
* console.log('count:', count);
* // Prints: count: 5, to stdout
* ```
*
* See `util.format()` for more information.
* @since v0.1.100
*/
log(message?: any, ...optionalParams: any[]): void;
/**
* Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just
* logging the argument if it cant be parsed as tabular.
*
* ```js
* // These can't be parsed as tabular data
* console.table(Symbol());
* // Symbol()
*
* console.table(undefined);
* // undefined
*
* console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
* // ┌─────────┬─────┬─────┐
* // │ (index) │ a │ b │
* // ├─────────┼─────┼─────┤
* // │ 0 │ 1 │ 'Y' │
* // │ 1 │ 'Z' │ 2 │
* // └─────────┴─────┴─────┘
*
* console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
* // ┌─────────┬─────┐
* // │ (index) │ a │
* // ├─────────┼─────┤
* // │ 0 │ 1 │
* // │ 1 │ 'Z' │
* // └─────────┴─────┘
* ```
* @since v10.0.0
* @param properties Alternate properties for constructing the table.
*/
table(tabularData: any, properties?: ReadonlyArray<string>): void;
/**
* Starts a timer that can be used to compute the duration of an operation. Timers
* are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in
* suitable time units to `stdout`. For example, if the elapsed
* time is 3869ms, `console.timeEnd()` displays "3.869s".
* @since v0.1.104
*/
time(label?: string): void;
/**
* Stops a timer that was previously started by calling {@link time} and
* prints the result to `stdout`:
*
* ```js
* console.time('100-elements');
* for (let i = 0; i < 100; i++) {}
* console.timeEnd('100-elements');
* // prints 100-elements: 225.438ms
* ```
* @since v0.1.104
*/
timeEnd(label?: string): void;
/**
* For a timer that was previously started by calling {@link time}, prints
* the elapsed time and other `data` arguments to `stdout`:
*
* ```js
* console.time('process');
* const value = expensiveProcess1(); // Returns 42
* console.timeLog('process', value);
* // Prints "process: 365.227ms 42".
* doExpensiveProcess2(value);
* console.timeEnd('process');
* ```
* @since v10.7.0
*/
timeLog(label?: string, ...data: any[]): void;
/**
* Prints to `stderr` the string `'Trace: '`, followed by the `util.format()` formatted message and stack trace to the current position in the code.
*
* ```js
* console.trace('Show me');
* // Prints: (stack trace will vary based on where trace is called)
* // Trace: Show me
* // at repl:2:9
* // at REPLServer.defaultEval (repl.js:248:27)
* // at bound (domain.js:287:14)
* // at REPLServer.runBound [as eval] (domain.js:300:12)
* // at REPLServer.<anonymous> (repl.js:412:12)
* // at emitOne (events.js:82:20)
* // at REPLServer.emit (events.js:169:7)
* // at REPLServer.Interface._onLine (readline.js:210:10)
* // at REPLServer.Interface._line (readline.js:549:8)
* // at REPLServer.Interface._ttyWrite (readline.js:826:14)
* ```
* @since v0.1.104
*/
trace(message?: any, ...optionalParams: any[]): void;
/**
* The `console.warn()` function is an alias for {@link error}.
* @since v0.1.100
*/
warn(message?: any, ...optionalParams: any[]): void;
// --- Inspector mode only ---
/**
* This method does not display anything unless used in the inspector.
* Starts a JavaScript CPU profile with an optional label.
*/
profile(label?: string): void;
/**
* This method does not display anything unless used in the inspector.
* Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
*/
profileEnd(label?: string): void;
/**
* This method does not display anything unless used in the inspector.
* Adds an event with the label `label` to the Timeline panel of the inspector.
*/
timeStamp(label?: string): void;
}
/**
* The `console` module provides a simple debugging console that is similar to the
* JavaScript console mechanism provided by web browsers.
*
* The module exports two specific components:
*
* * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
*
* _**Warning**_: The global console object's methods are neither consistently
* synchronous like the browser APIs they resemble, nor are they consistently
* asynchronous like all other Node.js streams. See the `note on process I/O` for
* more information.
*
* Example using the global `console`:
*
* ```js
* console.log('hello world');
* // Prints: hello world, to stdout
* console.log('hello %s', 'world');
* // Prints: hello world, to stdout
* console.error(new Error('Whoops, something bad happened'));
* // Prints error message and stack trace to stderr:
* // Error: Whoops, something bad happened
* // at [eval]:5:15
* // at Script.runInThisContext (node:vm:132:18)
* // at Object.runInThisContext (node:vm:309:38)
* // at node:internal/process/execution:77:19
* // at [eval]-wrapper:6:22
* // at evalScript (node:internal/process/execution:76:60)
* // at node:internal/main/eval_string:23:3
*
* const name = 'Will Robinson';
* console.warn(`Danger ${name}! Danger!`);
* // Prints: Danger Will Robinson! Danger!, to stderr
* ```
*
* Example using the `Console` class:
*
* ```js
* const out = getStreamSomehow();
* const err = getStreamSomehow();
* const myConsole = new console.Console(out, err);
*
* myConsole.log('hello world');
* // Prints: hello world, to out
* myConsole.log('hello %s', 'world');
* // Prints: hello world, to out
* myConsole.error(new Error('Whoops, something bad happened'));
* // Prints: [Error: Whoops, something bad happened], to err
*
* const name = 'Will Robinson';
* myConsole.warn(`Danger ${name}! Danger!`);
* // Prints: Danger Will Robinson! Danger!, to err
* ```
* @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/console.js)
*/
namespace console {
interface ConsoleConstructorOptions {
stdout: NodeJS.WritableStream;
stderr?: NodeJS.WritableStream | undefined;
ignoreErrors?: boolean | undefined;
colorMode?: boolean | 'auto' | undefined;
inspectOptions?: InspectOptions | undefined;
/**
* Set group indentation
* @default 2
*/
groupIndentation?: number | undefined;
}
interface ConsoleConstructor {
prototype: Console;
new (stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
new (options: ConsoleConstructorOptions): Console;
}
}
var console: Console;
}
export = globalThis.console;
}

18
node_modules/@types/node/constants.d.ts generated vendored Normal file
View File

@ -0,0 +1,18 @@
/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
declare module 'constants' {
import { constants as osConstants, SignalConstants } from 'node:os';
import { constants as cryptoConstants } from 'node:crypto';
import { constants as fsConstants } from 'node:fs';
const exp: typeof osConstants.errno &
typeof osConstants.priority &
SignalConstants &
typeof cryptoConstants &
typeof fsConstants;
export = exp;
}
declare module 'node:constants' {
import constants = require('constants');
export = constants;
}

3978
node_modules/@types/node/crypto.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

545
node_modules/@types/node/dgram.d.ts generated vendored Normal file
View File

@ -0,0 +1,545 @@
/**
* The `node:dgram` module provides an implementation of UDP datagram sockets.
*
* ```js
* import dgram from 'node:dgram';
*
* const server = dgram.createSocket('udp4');
*
* server.on('error', (err) => {
* console.error(`server error:\n${err.stack}`);
* server.close();
* });
*
* server.on('message', (msg, rinfo) => {
* console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
* });
*
* server.on('listening', () => {
* const address = server.address();
* console.log(`server listening ${address.address}:${address.port}`);
* });
*
* server.bind(41234);
* // Prints: server listening 0.0.0.0:41234
* ```
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dgram.js)
*/
declare module 'dgram' {
import { AddressInfo } from 'node:net';
import * as dns from 'node:dns';
import { EventEmitter, Abortable } from 'node:events';
interface RemoteInfo {
address: string;
family: 'IPv4' | 'IPv6';
port: number;
size: number;
}
interface BindOptions {
port?: number | undefined;
address?: string | undefined;
exclusive?: boolean | undefined;
fd?: number | undefined;
}
type SocketType = 'udp4' | 'udp6';
interface SocketOptions extends Abortable {
type: SocketType;
reuseAddr?: boolean | undefined;
/**
* @default false
*/
ipv6Only?: boolean | undefined;
recvBufferSize?: number | undefined;
sendBufferSize?: number | undefined;
lookup?: ((hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void) | undefined;
}
/**
* Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram
* messages. When `address` and `port` are not passed to `socket.bind()` the
* method will bind the socket to the "all interfaces" address on a random port
* (it does the right thing for both `udp4` and `udp6` sockets). The bound address
* and port can be retrieved using `socket.address().address` and `socket.address().port`.
*
* If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.close()` on the socket:
*
* ```js
* const controller = new AbortController();
* const { signal } = controller;
* const server = dgram.createSocket({ type: 'udp4', signal });
* server.on('message', (msg, rinfo) => {
* console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
* });
* // Later, when you want to close the server.
* controller.abort();
* ```
* @since v0.11.13
* @param options Available options are:
* @param callback Attached as a listener for `'message'` events. Optional.
*/
function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
/**
* Encapsulates the datagram functionality.
*
* New instances of `dgram.Socket` are created using {@link createSocket}.
* The `new` keyword is not to be used to create `dgram.Socket` instances.
* @since v0.1.99
*/
class Socket extends EventEmitter {
/**
* Tells the kernel to join a multicast group at the given `multicastAddress` and`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the`multicastInterface` argument is not
* specified, the operating system will choose
* one interface and will add membership to it. To add membership to every
* available interface, call `addMembership` multiple times, once per interface.
*
* When called on an unbound socket, this method will implicitly bind to a random
* port, listening on all interfaces.
*
* When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur:
*
* ```js
* import cluster from 'node:cluster';
* import dgram from 'node:dgram';
*
* if (cluster.isPrimary) {
* cluster.fork(); // Works ok.
* cluster.fork(); // Fails with EADDRINUSE.
* } else {
* const s = dgram.createSocket('udp4');
* s.bind(1234, () => {
* s.addMembership('224.0.0.114');
* });
* }
* ```
* @since v0.6.9
*/
addMembership(multicastAddress: string, multicastInterface?: string): void;
/**
* Returns an object containing the address information for a socket.
* For UDP sockets, this object will contain `address`, `family`, and `port`properties.
*
* This method throws `EBADF` if called on an unbound socket.
* @since v0.1.99
*/
address(): AddressInfo;
/**
* For UDP sockets, causes the `dgram.Socket` to listen for datagram
* messages on a named `port` and optional `address`. If `port` is not
* specified or is `0`, the operating system will attempt to bind to a
* random port. If `address` is not specified, the operating system will
* attempt to listen on all addresses. Once binding is complete, a`'listening'` event is emitted and the optional `callback` function is
* called.
*
* Specifying both a `'listening'` event listener and passing a`callback` to the `socket.bind()` method is not harmful but not very
* useful.
*
* A bound datagram socket keeps the Node.js process running to receive
* datagram messages.
*
* If binding fails, an `'error'` event is generated. In rare case (e.g.
* attempting to bind with a closed socket), an `Error` may be thrown.
*
* Example of a UDP server listening on port 41234:
*
* ```js
* import dgram from 'node:dgram';
*
* const server = dgram.createSocket('udp4');
*
* server.on('error', (err) => {
* console.error(`server error:\n${err.stack}`);
* server.close();
* });
*
* server.on('message', (msg, rinfo) => {
* console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
* });
*
* server.on('listening', () => {
* const address = server.address();
* console.log(`server listening ${address.address}:${address.port}`);
* });
*
* server.bind(41234);
* // Prints: server listening 0.0.0.0:41234
* ```
* @since v0.1.99
* @param callback with no parameters. Called when binding is complete.
*/
bind(port?: number, address?: string, callback?: () => void): this;
bind(port?: number, callback?: () => void): this;
bind(callback?: () => void): this;
bind(options: BindOptions, callback?: () => void): this;
/**
* Close the underlying socket and stop listening for data on it. If a callback is
* provided, it is added as a listener for the `'close'` event.
* @since v0.1.99
* @param callback Called when the socket has been closed.
*/
close(callback?: () => void): this;
/**
* Associates the `dgram.Socket` to a remote address and port. Every
* message sent by this handle is automatically sent to that destination. Also,
* the socket will only receive messages from that remote peer.
* Trying to call `connect()` on an already connected socket will result
* in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not
* provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets)
* will be used by default. Once the connection is complete, a `'connect'` event
* is emitted and the optional `callback` function is called. In case of failure,
* the `callback` is called or, failing this, an `'error'` event is emitted.
* @since v12.0.0
* @param callback Called when the connection is completed or on error.
*/
connect(port: number, address?: string, callback?: () => void): void;
connect(port: number, callback: () => void): void;
/**
* A synchronous function that disassociates a connected `dgram.Socket` from
* its remote address. Trying to call `disconnect()` on an unbound or already
* disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception.
* @since v12.0.0
*/
disconnect(): void;
/**
* Instructs the kernel to leave a multicast group at `multicastAddress` using the`IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the
* kernel when the socket is closed or the process terminates, so most apps will
* never have reason to call this.
*
* If `multicastInterface` is not specified, the operating system will attempt to
* drop membership on all valid interfaces.
* @since v0.6.9
*/
dropMembership(multicastAddress: string, multicastInterface?: string): void;
/**
* This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
* @since v8.7.0
* @return the `SO_RCVBUF` socket receive buffer size in bytes.
*/
getRecvBufferSize(): number;
/**
* This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
* @since v8.7.0
* @return the `SO_SNDBUF` socket send buffer size in bytes.
*/
getSendBufferSize(): number;
/**
* By default, binding a socket will cause it to block the Node.js process from
* exiting as long as the socket is open. The `socket.unref()` method can be used
* to exclude the socket from the reference counting that keeps the Node.js
* process active. The `socket.ref()` method adds the socket back to the reference
* counting and restores the default behavior.
*
* Calling `socket.ref()` multiples times will have no additional effect.
*
* The `socket.ref()` method returns a reference to the socket so calls can be
* chained.
* @since v0.9.1
*/
ref(): this;
/**
* Returns an object containing the `address`, `family`, and `port` of the remote
* endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception
* if the socket is not connected.
* @since v12.0.0
*/
remoteAddress(): AddressInfo;
/**
* Broadcasts a datagram on the socket.
* For connectionless sockets, the destination `port` and `address` must be
* specified. Connected sockets, on the other hand, will use their associated
* remote endpoint, so the `port` and `address` arguments must not be set.
*
* The `msg` argument contains the message to be sent.
* Depending on its type, different behavior can apply. If `msg` is a `Buffer`,
* any `TypedArray` or a `DataView`,
* the `offset` and `length` specify the offset within the `Buffer` where the
* message begins and the number of bytes in the message, respectively.
* If `msg` is a `String`, then it is automatically converted to a `Buffer`with `'utf8'` encoding. With messages that
* contain multi-byte characters, `offset` and `length` will be calculated with
* respect to `byte length` and not the character position.
* If `msg` is an array, `offset` and `length` must not be specified.
*
* 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 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
* (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.)
*
* An optional `callback` function may be specified to as a way of reporting
* DNS errors or for determining when it is safe to reuse the `buf` object.
* DNS lookups delay the time to send for at least one tick of the
* Node.js event loop.
*
* The only way to know for sure that the datagram has been sent is by using a`callback`. If an error occurs and a `callback` is given, the error will be
* passed as the first argument to the `callback`. If a `callback` is not given,
* the error is emitted as an `'error'` event on the `socket` object.
*
* Offset and length are optional but both _must_ be set if either are used.
* They are supported only when the first argument is a `Buffer`, a `TypedArray`,
* or a `DataView`.
*
* This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket.
*
* Example of sending a UDP packet to a port on `localhost`;
*
* ```js
* import dgram from 'node:dgram';
* import { Buffer } from 'node:buffer';
*
* const message = Buffer.from('Some bytes');
* const client = dgram.createSocket('udp4');
* client.send(message, 41234, 'localhost', (err) => {
* client.close();
* });
* ```
*
* Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`;
*
* ```js
* import dgram from 'node:dgram';
* import { Buffer } from 'node:buffer';
*
* const buf1 = Buffer.from('Some ');
* const buf2 = Buffer.from('bytes');
* const client = dgram.createSocket('udp4');
* client.send([buf1, buf2], 41234, (err) => {
* client.close();
* });
* ```
*
* Sending multiple buffers might be faster or slower depending on the
* application and operating system. Run benchmarks to
* determine the optimal strategy on a case-by-case basis. Generally speaking,
* however, sending multiple buffers is faster.
*
* Example of sending a UDP packet using a socket connected to a port on`localhost`:
*
* ```js
* import dgram from 'node:dgram';
* import { Buffer } from 'node:buffer';
*
* const message = Buffer.from('Some bytes');
* const client = dgram.createSocket('udp4');
* client.connect(41234, 'localhost', (err) => {
* client.send(message, (err) => {
* client.close();
* });
* });
* ```
* @since v0.1.99
* @param msg Message to be sent.
* @param offset Offset in the buffer where the message starts.
* @param length Number of bytes in the message.
* @param port Destination port.
* @param address Destination host name or IP address.
* @param callback Called when the message has been sent.
*/
send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
/**
* Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP
* packets may be sent to a local interface's broadcast address.
*
* This method throws `EBADF` if called on an unbound socket.
* @since v0.6.9
*/
setBroadcast(flag: boolean): void;
/**
* _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC
* 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_
* _with a scope index is written as `'IP%scope'` where scope is an interface name_
* _or interface number._
*
* Sets the default outgoing multicast interface of the socket to a chosen
* interface or back to system interface selection. The `multicastInterface` must
* be a valid string representation of an IP from the socket's family.
*
* For IPv4 sockets, this should be the IP configured for the desired physical
* interface. All packets sent to multicast on the socket will be sent on the
* interface determined by the most recent successful use of this call.
*
* For IPv6 sockets, `multicastInterface` should include a scope to indicate the
* interface as in the examples that follow. In IPv6, individual `send` calls can
* also use explicit scope in addresses, so only packets sent to a multicast
* address without specifying an explicit scope are affected by the most recent
* successful use of this call.
*
* This method throws `EBADF` if called on an unbound socket.
*
* #### Example: IPv6 outgoing multicast interface
*
* On most systems, where scope format uses the interface name:
*
* ```js
* const socket = dgram.createSocket('udp6');
*
* socket.bind(1234, () => {
* socket.setMulticastInterface('::%eth1');
* });
* ```
*
* On Windows, where scope format uses an interface number:
*
* ```js
* const socket = dgram.createSocket('udp6');
*
* socket.bind(1234, () => {
* socket.setMulticastInterface('::%2');
* });
* ```
*
* #### Example: IPv4 outgoing multicast interface
*
* All systems use an IP of the host on the desired physical interface:
*
* ```js
* const socket = dgram.createSocket('udp4');
*
* socket.bind(1234, () => {
* socket.setMulticastInterface('10.0.0.2');
* });
* ```
* @since v8.6.0
*/
setMulticastInterface(multicastInterface: string): void;
/**
* Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`,
* multicast packets will also be received on the local interface.
*
* This method throws `EBADF` if called on an unbound socket.
* @since v0.3.8
*/
setMulticastLoopback(flag: boolean): boolean;
/**
* Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
* "Time to Live", in this context it specifies the number of IP hops that a
* packet is allowed to travel through, specifically for multicast traffic. Each
* router or gateway that forwards a packet decrements the TTL. If the TTL is
* decremented to 0 by a router, it will not be forwarded.
*
* The `ttl` argument may be between 0 and 255\. The default on most systems is `1`.
*
* This method throws `EBADF` if called on an unbound socket.
* @since v0.3.8
*/
setMulticastTTL(ttl: number): number;
/**
* Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
* in bytes.
*
* This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
* @since v8.7.0
*/
setRecvBufferSize(size: number): void;
/**
* Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer
* in bytes.
*
* This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
* @since v8.7.0
*/
setSendBufferSize(size: number): void;
/**
* Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live",
* in this context it specifies the number of IP hops that a packet is allowed to
* travel through. Each router or gateway that forwards a packet decrements the
* TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.
* Changing TTL values is typically done for network probes or when multicasting.
*
* The `ttl` argument may be between 1 and 255\. The default on most systems
* is 64.
*
* This method throws `EBADF` if called on an unbound socket.
* @since v0.1.101
*/
setTTL(ttl: number): number;
/**
* By default, binding a socket will cause it to block the Node.js process from
* exiting as long as the socket is open. The `socket.unref()` method can be used
* to exclude the socket from the reference counting that keeps the Node.js
* process active, allowing the process to exit even if the socket is still
* listening.
*
* Calling `socket.unref()` multiple times will have no addition effect.
*
* The `socket.unref()` method returns a reference to the socket so calls can be
* chained.
* @since v0.9.1
*/
unref(): this;
/**
* Tells the kernel to join a source-specific multicast channel at the given`sourceAddress` and `groupAddress`, using the `multicastInterface` with the`IP_ADD_SOURCE_MEMBERSHIP` socket
* option. If the `multicastInterface` argument
* is not specified, the operating system will choose one interface and will add
* membership to it. To add membership to every available interface, call`socket.addSourceSpecificMembership()` multiple times, once per interface.
*
* When called on an unbound socket, this method will implicitly bind to a random
* port, listening on all interfaces.
* @since v13.1.0, v12.16.0
*/
addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
/**
* Instructs the kernel to leave a source-specific multicast channel at the given`sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`socket option. This method is
* automatically called by the kernel when the
* socket is closed or the process terminates, so most apps will never have
* reason to call this.
*
* If `multicastInterface` is not specified, the operating system will attempt to
* drop membership on all valid interfaces.
* @since v13.1.0, v12.16.0
*/
dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
/**
* events.EventEmitter
* 1. close
* 2. connect
* 3. error
* 4. listening
* 5. message
*/
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'close', listener: () => void): this;
addListener(event: 'connect', listener: () => void): this;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'listening', listener: () => void): this;
addListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
emit(event: 'close'): boolean;
emit(event: 'connect'): boolean;
emit(event: 'error', err: Error): boolean;
emit(event: 'listening'): boolean;
emit(event: 'message', msg: Buffer, rinfo: RemoteInfo): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'close', listener: () => void): this;
on(event: 'connect', listener: () => void): this;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'listening', listener: () => void): this;
on(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: 'close', listener: () => void): this;
once(event: 'connect', listener: () => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'listening', listener: () => void): this;
once(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: 'close', listener: () => void): this;
prependListener(event: 'connect', listener: () => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'listening', listener: () => void): this;
prependListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'close', listener: () => void): this;
prependOnceListener(event: 'connect', listener: () => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'listening', listener: () => void): this;
prependOnceListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
}
}
declare module 'node:dgram' {
export * from 'dgram';
}

191
node_modules/@types/node/diagnostics_channel.d.ts generated vendored Normal file
View File

@ -0,0 +1,191 @@
/**
* The `node:diagnostics_channel` module provides an API to create named channels
* to report arbitrary message data for diagnostics purposes.
*
* It can be accessed using:
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
* ```
*
* It is intended that a module writer wanting to report diagnostics messages
* will create one or many top-level channels to report messages through.
* Channels may also be acquired at runtime but it is not encouraged
* due to the additional overhead of doing so. Channels may be exported for
* convenience, but as long as the name is known it can be acquired anywhere.
*
* If you intend for your module to produce diagnostics data for others to
* consume it is recommended that you include documentation of what named
* channels are used along with the shape of the message data. Channel names
* should generally include the module name to avoid collisions with data from
* other modules.
* @since v15.1.0, v14.17.0
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/diagnostics_channel.js)
*/
declare module 'diagnostics_channel' {
/**
* Check if there are active subscribers to the named channel. This is helpful if
* the message you want to send might be expensive to prepare.
*
* This API is optional but helpful when trying to publish messages from very
* performance-sensitive code.
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
*
* if (diagnostics_channel.hasSubscribers('my-channel')) {
* // There are subscribers, prepare and publish message
* }
* ```
* @since v15.1.0, v14.17.0
* @param name The channel name
* @return If there are active subscribers
*/
function hasSubscribers(name: string | symbol): boolean;
/**
* This is the primary entry-point for anyone wanting to publish to a named
* channel. It produces a channel object which is optimized to reduce overhead at
* publish time as much as possible.
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
*
* const channel = diagnostics_channel.channel('my-channel');
* ```
* @since v15.1.0, v14.17.0
* @param name The channel name
* @return The named channel object
*/
function channel(name: string | symbol): Channel;
type ChannelListener = (message: unknown, name: string | symbol) => void;
/**
* Register a message handler to subscribe to this channel. This message handler
* will be run synchronously whenever a message is published to the channel. Any
* errors thrown in the message handler will trigger an `'uncaughtException'`.
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
*
* diagnostics_channel.subscribe('my-channel', (message, name) => {
* // Received data
* });
* ```
* @since v18.7.0, v16.17.0
* @param name The channel name
* @param onMessage The handler to receive channel messages
*/
function subscribe(name: string | symbol, onMessage: ChannelListener): void;
/**
* Remove a message handler previously registered to this channel with {@link subscribe}.
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
*
* function onMessage(message, name) {
* // Received data
* }
*
* diagnostics_channel.subscribe('my-channel', onMessage);
*
* diagnostics_channel.unsubscribe('my-channel', onMessage);
* ```
* @since v18.7.0, v16.17.0
* @param name The channel name
* @param onMessage The previous subscribed handler to remove
* @return `true` if the handler was found, `false` otherwise.
*/
function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean;
/**
* The class `Channel` represents an individual named channel within the data
* pipeline. It is used to track subscribers and to publish messages when there
* are subscribers present. It exists as a separate object to avoid channel
* lookups at publish time, enabling very fast publish speeds and allowing
* for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly
* with `new Channel(name)` is not supported.
* @since v15.1.0, v14.17.0
*/
class Channel {
readonly name: string | symbol;
/**
* Check if there are active subscribers to this channel. This is helpful if
* the message you want to send might be expensive to prepare.
*
* This API is optional but helpful when trying to publish messages from very
* performance-sensitive code.
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
*
* const channel = diagnostics_channel.channel('my-channel');
*
* if (channel.hasSubscribers) {
* // There are subscribers, prepare and publish message
* }
* ```
* @since v15.1.0, v14.17.0
*/
readonly hasSubscribers: boolean;
private constructor(name: string | symbol);
/**
* Publish a message to any subscribers to the channel. This will trigger
* message handlers synchronously so they will execute within the same context.
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
*
* const channel = diagnostics_channel.channel('my-channel');
*
* channel.publish({
* some: 'message',
* });
* ```
* @since v15.1.0, v14.17.0
* @param message The message to send to the channel subscribers
*/
publish(message: unknown): void;
/**
* Register a message handler to subscribe to this channel. This message handler
* will be run synchronously whenever a message is published to the channel. Any
* errors thrown in the message handler will trigger an `'uncaughtException'`.
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
*
* const channel = diagnostics_channel.channel('my-channel');
*
* channel.subscribe((message, name) => {
* // Received data
* });
* ```
* @since v15.1.0, v14.17.0
* @deprecated Since v18.7.0,v16.17.0 - Use {@link subscribe(name, onMessage)}
* @param onMessage The handler to receive channel messages
*/
subscribe(onMessage: ChannelListener): void;
/**
* Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`.
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
*
* const channel = diagnostics_channel.channel('my-channel');
*
* function onMessage(message, name) {
* // Received data
* }
*
* channel.subscribe(onMessage);
*
* channel.unsubscribe(onMessage);
* ```
* @since v15.1.0, v14.17.0
* @deprecated Since v18.7.0,v16.17.0 - Use {@link unsubscribe(name, onMessage)}
* @param onMessage The previous subscribed handler to remove
* @return `true` if the handler was found, `false` otherwise.
*/
unsubscribe(onMessage: ChannelListener): void;
}
}
declare module 'node:diagnostics_channel' {
export * from 'diagnostics_channel';
}

668
node_modules/@types/node/dns.d.ts generated vendored Normal file
View File

@ -0,0 +1,668 @@
/**
* The `node:dns` module enables name resolution. For example, use it to look up IP
* addresses of host names.
*
* Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the
* DNS protocol for lookups. {@link lookup} uses the operating system
* facilities to perform name resolution. It may not need to perform any network
* communication. To perform name resolution the way other applications on the same
* system do, use {@link lookup}.
*
* ```js
* const dns = require('node:dns');
*
* dns.lookup('example.org', (err, address, family) => {
* console.log('address: %j family: IPv%s', address, family);
* });
* // address: "93.184.216.34" family: IPv4
* ```
*
* All other functions in the `node:dns` module connect to an actual DNS server to
* perform name resolution. They will always use the network to perform DNS
* queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform
* DNS queries, bypassing other name-resolution facilities.
*
* ```js
* const dns = require('node:dns');
*
* dns.resolve4('archive.org', (err, addresses) => {
* if (err) throw err;
*
* console.log(`addresses: ${JSON.stringify(addresses)}`);
*
* addresses.forEach((a) => {
* dns.reverse(a, (err, hostnames) => {
* if (err) {
* throw err;
* }
* console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
* });
* });
* });
* ```
*
* See the `Implementation considerations section` for more information.
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dns.js)
*/
declare module 'dns' {
import * as dnsPromises from 'node:dns/promises';
// Supported getaddrinfo flags.
export const ADDRCONFIG: number;
export const V4MAPPED: number;
/**
* If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
* well as IPv4 mapped IPv6 addresses.
*/
export const ALL: number;
export interface LookupOptions {
family?: number | undefined;
hints?: number | undefined;
all?: boolean | undefined;
/**
* @default true
*/
verbatim?: boolean | undefined;
}
export interface LookupOneOptions extends LookupOptions {
all?: false | undefined;
}
export interface LookupAllOptions extends LookupOptions {
all: true;
}
export interface LookupAddress {
address: string;
family: number;
}
/**
* Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
* AAAA (IPv6) record. All `option` properties are optional. If `options` is an
* integer, then it must be `4` or `6` if `options` is `0` or not provided, then
* IPv4 and IPv6 addresses are both returned if found.
*
* With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the
* properties `address` and `family`.
*
* On error, `err` is an `Error` object, where `err.code` is the error code.
* Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
* the host name does not exist but also when the lookup fails in other ways
* such as no available file descriptors.
*
* `dns.lookup()` does not necessarily have anything to do with the DNS protocol.
* The implementation uses an operating system facility that can associate names
* with addresses and vice versa. This implementation can have subtle but
* important consequences on the behavior of any Node.js program. Please take some
* time to consult the `Implementation considerations section` before using`dns.lookup()`.
*
* Example usage:
*
* ```js
* const dns = require('node:dns');
* const options = {
* family: 6,
* hints: dns.ADDRCONFIG | dns.V4MAPPED,
* };
* dns.lookup('example.com', options, (err, address, family) =>
* console.log('address: %j family: IPv%s', address, family));
* // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
*
* // When options.all is true, the result will be an Array.
* options.all = true;
* dns.lookup('example.com', options, (err, addresses) =>
* console.log('addresses: %j', addresses));
* // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
* ```
*
* If this method is invoked as its `util.promisify()` ed version, and `all`is not set to `true`, it returns a `Promise` for an `Object` with `address` and`family` properties.
* @since v0.1.90
*/
export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
export namespace lookup {
function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
}
/**
* Resolves the given `address` and `port` into a host name and service using
* the operating system's underlying `getnameinfo` implementation.
*
* If `address` is not a valid IP address, a `TypeError` will be thrown.
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
*
* On an error, `err` is an `Error` object, where `err.code` is the error code.
*
* ```js
* const dns = require('node:dns');
* dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
* console.log(hostname, service);
* // Prints: localhost ssh
* });
* ```
*
* If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties.
* @since v0.11.14
*/
export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
export namespace lookupService {
function __promisify__(
address: string,
port: number
): Promise<{
hostname: string;
service: string;
}>;
}
export interface ResolveOptions {
ttl: boolean;
}
export interface ResolveWithTtlOptions extends ResolveOptions {
ttl: true;
}
export interface RecordWithTtl {
address: string;
ttl: number;
}
/** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
export interface AnyARecord extends RecordWithTtl {
type: 'A';
}
export interface AnyAaaaRecord extends RecordWithTtl {
type: 'AAAA';
}
export interface CaaRecord {
critical: number;
issue?: string | undefined;
issuewild?: string | undefined;
iodef?: string | undefined;
contactemail?: string | undefined;
contactphone?: string | undefined;
}
export interface MxRecord {
priority: number;
exchange: string;
}
export interface AnyMxRecord extends MxRecord {
type: 'MX';
}
export interface NaptrRecord {
flags: string;
service: string;
regexp: string;
replacement: string;
order: number;
preference: number;
}
export interface AnyNaptrRecord extends NaptrRecord {
type: 'NAPTR';
}
export interface SoaRecord {
nsname: string;
hostmaster: string;
serial: number;
refresh: number;
retry: number;
expire: number;
minttl: number;
}
export interface AnySoaRecord extends SoaRecord {
type: 'SOA';
}
export interface SrvRecord {
priority: number;
weight: number;
port: number;
name: string;
}
export interface AnySrvRecord extends SrvRecord {
type: 'SRV';
}
export interface AnyTxtRecord {
type: 'TXT';
entries: string[];
}
export interface AnyNsRecord {
type: 'NS';
value: string;
}
export interface AnyPtrRecord {
type: 'PTR';
value: string;
}
export interface AnyCnameRecord {
type: 'CNAME';
value: string;
}
export type AnyRecord = AnyARecord | AnyAaaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTxtRecord;
/**
* Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
* of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource
* records. The type and structure of individual results varies based on `rrtype`:
*
* <omitted>
*
* On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`.
* @since v0.1.27
* @param hostname Host name to resolve.
* @param [rrtype='A'] Resource record type.
*/
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
export function resolve(hostname: string, rrtype: 'A', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
export function resolve(hostname: string, rrtype: 'AAAA', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
export function resolve(hostname: string, rrtype: 'ANY', callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
export function resolve(hostname: string, rrtype: 'CNAME', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
export function resolve(hostname: string, rrtype: 'MX', callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
export function resolve(hostname: string, rrtype: 'NAPTR', callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
export function resolve(hostname: string, rrtype: 'NS', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
export function resolve(hostname: string, rrtype: 'PTR', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
export function resolve(hostname: string, rrtype: 'SOA', callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
export function resolve(hostname: string, rrtype: 'SRV', callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
export function resolve(hostname: string, rrtype: 'TXT', callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
export function resolve(
hostname: string,
rrtype: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void
): void;
export namespace resolve {
function __promisify__(hostname: string, rrtype?: 'A' | 'AAAA' | 'CNAME' | 'NS' | 'PTR'): Promise<string[]>;
function __promisify__(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
function __promisify__(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
function __promisify__(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
function __promisify__(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
function __promisify__(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
function __promisify__(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
}
/**
* Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function
* will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
* @since v0.1.16
* @param hostname Host name to resolve.
*/
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
export namespace resolve4 {
function __promisify__(hostname: string): Promise<string[]>;
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
}
/**
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
* will contain an array of IPv6 addresses.
* @since v0.1.16
* @param hostname Host name to resolve.
*/
export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
export namespace resolve6 {
function __promisify__(hostname: string): Promise<string[]>;
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
}
/**
* Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The`addresses` argument passed to the `callback` function
* will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`).
* @since v0.3.2
*/
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
export namespace resolveCname {
function __promisify__(hostname: string): Promise<string[]>;
}
/**
* 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, v14.17.0
*/
export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void;
export namespace resolveCaa {
function __promisify__(hostname: string): Promise<CaaRecord[]>;
}
/**
* Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
* contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
* @since v0.1.27
*/
export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
export namespace resolveMx {
function __promisify__(hostname: string): Promise<MxRecord[]>;
}
/**
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of
* objects with the following properties:
*
* * `flags`
* * `service`
* * `regexp`
* * `replacement`
* * `order`
* * `preference`
*
* ```js
* {
* flags: 's',
* service: 'SIP+D2U',
* regexp: '',
* replacement: '_sip._udp.example.com',
* order: 30,
* preference: 100
* }
* ```
* @since v0.9.12
*/
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
export namespace resolveNaptr {
function __promisify__(hostname: string): Promise<NaptrRecord[]>;
}
/**
* Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
* contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`).
* @since v0.1.90
*/
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
export namespace resolveNs {
function __promisify__(hostname: string): Promise<string[]>;
}
/**
* Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
* be an array of strings containing the reply records.
* @since v6.0.0
*/
export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
export namespace resolvePtr {
function __promisify__(hostname: string): Promise<string[]>;
}
/**
* Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
* the `hostname`. The `address` argument passed to the `callback` function will
* be an object with the following properties:
*
* * `nsname`
* * `hostmaster`
* * `serial`
* * `refresh`
* * `retry`
* * `expire`
* * `minttl`
*
* ```js
* {
* nsname: 'ns.example.com',
* hostmaster: 'root.example.com',
* serial: 2013101809,
* refresh: 10000,
* retry: 2400,
* expire: 604800,
* minttl: 3600
* }
* ```
* @since v0.11.10
*/
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
export namespace resolveSoa {
function __promisify__(hostname: string): Promise<SoaRecord>;
}
/**
* Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
* be an array of objects with the following properties:
*
* * `priority`
* * `weight`
* * `port`
* * `name`
*
* ```js
* {
* priority: 10,
* weight: 5,
* port: 21223,
* name: 'service.example.com'
* }
* ```
* @since v0.1.27
*/
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
export namespace resolveSrv {
function __promisify__(hostname: string): Promise<SrvRecord[]>;
}
/**
* Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. The `records` argument passed to the `callback` function is a
* two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
* one record. Depending on the use case, these could be either joined together or
* treated separately.
* @since v0.1.27
*/
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
export namespace resolveTxt {
function __promisify__(hostname: string): Promise<string[][]>;
}
/**
* Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
* The `ret` argument passed to the `callback` function will be an array containing
* various types of records. Each object has a property `type` that indicates the
* type of the current record. And depending on the `type`, additional properties
* will be present on the object:
*
* <omitted>
*
* Here is an example of the `ret` object passed to the callback:
*
* ```js
* [ { type: 'A', address: '127.0.0.1', ttl: 299 },
* { type: 'CNAME', value: 'example.com' },
* { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
* { type: 'NS', value: 'ns1.example.com' },
* { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
* { type: 'SOA',
* nsname: 'ns1.example.com',
* hostmaster: 'admin.example.com',
* serial: 156696742,
* refresh: 900,
* retry: 900,
* expire: 1800,
* minttl: 60 } ]
* ```
*
* DNS server operators may choose not to respond to `ANY`queries. It may be better to call individual methods like {@link resolve4},{@link resolveMx}, and so on. For more details, see [RFC
* 8482](https://tools.ietf.org/html/rfc8482).
*/
export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
export namespace resolveAny {
function __promisify__(hostname: string): Promise<AnyRecord[]>;
}
/**
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
* array of host names.
*
* On error, `err` is an `Error` object, where `err.code` is
* one of the `DNS error codes`.
* @since v0.1.16
*/
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
/**
* Get the default value for `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
*
* * `ipv4first`: for `verbatim` defaulting to `false`.
* * `verbatim`: for `verbatim` defaulting to `true`.
* @since v20.1.0
*/
export function getDefaultResultOrder(): 'ipv4first' | 'verbatim';
/**
* Sets the IP address and port of servers to be used when performing DNS
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
* addresses. If the port is the IANA default DNS port (53) it can be omitted.
*
* ```js
* dns.setServers([
* '4.4.4.4',
* '[2001:4860:4860::8888]',
* '4.4.4.4:1053',
* '[2001:4860:4860::8888]:1053',
* ]);
* ```
*
* An error will be thrown if an invalid address is provided.
*
* The `dns.setServers()` method must not be called while a DNS query is in
* progress.
*
* The {@link setServers} method affects only {@link resolve},`dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
*
* This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
* That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
* subsequent servers provided. Fallback DNS servers will only be used if the
* earlier ones time out or result in some other error.
* @since v0.11.3
* @param servers array of `RFC 5952` formatted addresses
*/
export function setServers(servers: ReadonlyArray<string>): void;
/**
* Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
* that are currently configured for DNS resolution. A string will include a port
* section if a custom port is used.
*
* ```js
* [
* '4.4.4.4',
* '2001:4860:4860::8888',
* '4.4.4.4:1053',
* '[2001:4860:4860::8888]:1053',
* ]
* ```
* @since v0.11.3
*/
export function getServers(): string[];
/**
* Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
*
* * `ipv4first`: sets default `verbatim` `false`.
* * `verbatim`: sets default `verbatim` `true`.
*
* The default is `verbatim` 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
export const NODATA: string;
export const FORMERR: string;
export const SERVFAIL: string;
export const NOTFOUND: string;
export const NOTIMP: string;
export const REFUSED: string;
export const BADQUERY: string;
export const BADNAME: string;
export const BADFAMILY: string;
export const BADRESP: string;
export const CONNREFUSED: string;
export const TIMEOUT: string;
export const EOF: string;
export const FILE: string;
export const NOMEM: string;
export const DESTRUCTION: string;
export const BADSTR: string;
export const BADFLAGS: string;
export const NONAME: string;
export const BADHINTS: string;
export const NOTINITIALIZED: string;
export const LOADIPHLPAPI: string;
export const ADDRGETNETWORKPARAMS: string;
export const CANCELLED: string;
export interface ResolverOptions {
timeout?: number | undefined;
/**
* @default 4
*/
tries?: number;
}
/**
* An independent resolver for DNS requests.
*
* Creating a new resolver uses the default server settings. Setting
* the servers used for a resolver using `resolver.setServers()` does not affect
* other resolvers:
*
* ```js
* const { Resolver } = require('node:dns');
* const resolver = new Resolver();
* resolver.setServers(['4.4.4.4']);
*
* // This request will use the server at 4.4.4.4, independent of global settings.
* resolver.resolve4('example.org', (err, addresses) => {
* // ...
* });
* ```
*
* The following methods from the `node:dns` module are available:
*
* * `resolver.getServers()`
* * `resolver.resolve()`
* * `resolver.resolve4()`
* * `resolver.resolve6()`
* * `resolver.resolveAny()`
* * `resolver.resolveCaa()`
* * `resolver.resolveCname()`
* * `resolver.resolveMx()`
* * `resolver.resolveNaptr()`
* * `resolver.resolveNs()`
* * `resolver.resolvePtr()`
* * `resolver.resolveSoa()`
* * `resolver.resolveSrv()`
* * `resolver.resolveTxt()`
* * `resolver.reverse()`
* * `resolver.setServers()`
* @since v8.3.0
*/
export class Resolver {
constructor(options?: ResolverOptions);
/**
* Cancel all outstanding DNS queries made by this resolver. The corresponding
* callbacks will be called with an error with code `ECANCELLED`.
* @since v8.3.0
*/
cancel(): void;
getServers: typeof getServers;
resolve: typeof resolve;
resolve4: typeof resolve4;
resolve6: typeof resolve6;
resolveAny: typeof resolveAny;
resolveCaa: typeof resolveCaa;
resolveCname: typeof resolveCname;
resolveMx: typeof resolveMx;
resolveNaptr: typeof resolveNaptr;
resolveNs: typeof resolveNs;
resolvePtr: typeof resolvePtr;
resolveSoa: typeof resolveSoa;
resolveSrv: typeof resolveSrv;
resolveTxt: typeof resolveTxt;
reverse: typeof reverse;
/**
* The resolver instance will send its requests from the specified IP address.
* This allows programs to specify outbound interfaces when used on multi-homed
* systems.
*
* If a v4 or v6 address is not specified, it is set to the default and the
* operating system will choose a local address automatically.
*
* 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, 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.
*/
setLocalAddress(ipv4?: string, ipv6?: string): void;
setServers: typeof setServers;
}
export { dnsPromises as promises };
}
declare module 'node:dns' {
export * from 'dns';
}

414
node_modules/@types/node/dns/promises.d.ts generated vendored Normal file
View File

@ -0,0 +1,414 @@
/**
* The `dns.promises` API provides an alternative set of asynchronous DNS methods
* that return `Promise` objects rather than using callbacks. The API is accessible
* via `require('node:dns').promises` or `require('node:dns/promises')`.
* @since v10.6.0
*/
declare module 'dns/promises' {
import {
LookupAddress,
LookupOneOptions,
LookupAllOptions,
LookupOptions,
AnyRecord,
CaaRecord,
MxRecord,
NaptrRecord,
SoaRecord,
SrvRecord,
ResolveWithTtlOptions,
RecordWithTtl,
ResolveOptions,
ResolverOptions,
} from 'node:dns';
/**
* Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
* that are currently configured for DNS resolution. A string will include a port
* section if a custom port is used.
*
* ```js
* [
* '4.4.4.4',
* '2001:4860:4860::8888',
* '4.4.4.4:1053',
* '[2001:4860:4860::8888]:1053',
* ]
* ```
* @since v10.6.0
*/
function getServers(): string[];
/**
* Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
* AAAA (IPv6) record. All `option` properties are optional. If `options` is an
* integer, then it must be `4` or `6` if `options` is not provided, then IPv4
* and IPv6 addresses are both returned if found.
*
* With the `all` option set to `true`, the `Promise` is resolved with `addresses`being an array of objects with the properties `address` and `family`.
*
* On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
* Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
* the host name does not exist but also when the lookup fails in other ways
* such as no available file descriptors.
*
* `dnsPromises.lookup()` does not necessarily have anything to do with the DNS
* protocol. The implementation uses an operating system facility that can
* associate names with addresses and vice versa. This implementation can have
* subtle but important consequences on the behavior of any Node.js program. Please
* take some time to consult the `Implementation considerations section` before
* using `dnsPromises.lookup()`.
*
* Example usage:
*
* ```js
* const dns = require('node:dns');
* const dnsPromises = dns.promises;
* const options = {
* family: 6,
* hints: dns.ADDRCONFIG | dns.V4MAPPED,
* };
*
* dnsPromises.lookup('example.com', options).then((result) => {
* console.log('address: %j family: IPv%s', result.address, result.family);
* // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
* });
*
* // When options.all is true, the result will be an Array.
* options.all = true;
* dnsPromises.lookup('example.com', options).then((result) => {
* console.log('addresses: %j', result);
* // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
* });
* ```
* @since v10.6.0
*/
function lookup(hostname: string, family: number): Promise<LookupAddress>;
function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
function lookup(hostname: string): Promise<LookupAddress>;
/**
* Resolves the given `address` and `port` into a host name and service using
* the operating system's underlying `getnameinfo` implementation.
*
* If `address` is not a valid IP address, a `TypeError` will be thrown.
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
*
* On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
*
* ```js
* const dnsPromises = require('node:dns').promises;
* dnsPromises.lookupService('127.0.0.1', 22).then((result) => {
* console.log(result.hostname, result.service);
* // Prints: localhost ssh
* });
* ```
* @since v10.6.0
*/
function lookupService(
address: string,
port: number
): Promise<{
hostname: string;
service: string;
}>;
/**
* Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
* of the resource records. When successful, the `Promise` is resolved with an
* array of resource records. The type and structure of individual results vary
* based on `rrtype`:
*
* <omitted>
*
* 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.
*/
function resolve(hostname: string): Promise<string[]>;
function resolve(hostname: string, rrtype: 'A'): Promise<string[]>;
function resolve(hostname: string, rrtype: 'AAAA'): Promise<string[]>;
function resolve(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
function resolve(hostname: string, rrtype: 'CAA'): Promise<CaaRecord[]>;
function resolve(hostname: string, rrtype: 'CNAME'): Promise<string[]>;
function resolve(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
function resolve(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
function resolve(hostname: string, rrtype: 'NS'): Promise<string[]>;
function resolve(hostname: string, rrtype: 'PTR'): Promise<string[]>;
function resolve(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
function resolve(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
function resolve(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
/**
* Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv4
* addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
* @since v10.6.0
* @param hostname Host name to resolve.
*/
function resolve4(hostname: string): Promise<string[]>;
function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
/**
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv6
* addresses.
* @since v10.6.0
* @param hostname Host name to resolve.
*/
function resolve6(hostname: string): Promise<string[]>;
function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
/**
* Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
* On success, the `Promise` is resolved with an array containing various types of
* records. Each object has a property `type` that indicates the type of the
* current record. And depending on the `type`, additional properties will be
* present on the object:
*
* <omitted>
*
* Here is an example of the result object:
*
* ```js
* [ { type: 'A', address: '127.0.0.1', ttl: 299 },
* { type: 'CNAME', value: 'example.com' },
* { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
* { type: 'NS', value: 'ns1.example.com' },
* { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
* { type: 'SOA',
* nsname: 'ns1.example.com',
* hostmaster: 'admin.example.com',
* serial: 156696742,
* refresh: 900,
* retry: 900,
* expire: 1800,
* minttl: 60 } ]
* ```
* @since v10.6.0
*/
function resolveAny(hostname: string): Promise<AnyRecord[]>;
/**
* 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, v14.17.0
*/
function resolveCaa(hostname: string): Promise<CaaRecord[]>;
/**
* Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success,
* the `Promise` is resolved with an array of canonical name records available for
* the `hostname` (e.g. `['bar.example.com']`).
* @since v10.6.0
*/
function resolveCname(hostname: string): Promise<string[]>;
/**
* Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects
* containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`).
* @since v10.6.0
*/
function resolveMx(hostname: string): Promise<MxRecord[]>;
/**
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array
* of objects with the following properties:
*
* * `flags`
* * `service`
* * `regexp`
* * `replacement`
* * `order`
* * `preference`
*
* ```js
* {
* flags: 's',
* service: 'SIP+D2U',
* regexp: '',
* replacement: '_sip._udp.example.com',
* order: 30,
* preference: 100
* }
* ```
* @since v10.6.0
*/
function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
/**
* Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. On success, the `Promise` is resolved with an array of name server
* records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`).
* @since v10.6.0
*/
function resolveNs(hostname: string): Promise<string[]>;
/**
* Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. On success, the `Promise` is resolved with an array of strings
* containing the reply records.
* @since v10.6.0
*/
function resolvePtr(hostname: string): Promise<string[]>;
/**
* Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
* the `hostname`. On success, the `Promise` is resolved with an object with the
* following properties:
*
* * `nsname`
* * `hostmaster`
* * `serial`
* * `refresh`
* * `retry`
* * `expire`
* * `minttl`
*
* ```js
* {
* nsname: 'ns.example.com',
* hostmaster: 'root.example.com',
* serial: 2013101809,
* refresh: 10000,
* retry: 2400,
* expire: 604800,
* minttl: 3600
* }
* ```
* @since v10.6.0
*/
function resolveSoa(hostname: string): Promise<SoaRecord>;
/**
* Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects with
* the following properties:
*
* * `priority`
* * `weight`
* * `port`
* * `name`
*
* ```js
* {
* priority: 10,
* weight: 5,
* port: 21223,
* name: 'service.example.com'
* }
* ```
* @since v10.6.0
*/
function resolveSrv(hostname: string): Promise<SrvRecord[]>;
/**
* Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. On success, the `Promise` is resolved with a two-dimensional array
* of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
* one record. Depending on the use case, these could be either joined together or
* treated separately.
* @since v10.6.0
*/
function resolveTxt(hostname: string): Promise<string[][]>;
/**
* 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`.
* @since v10.6.0
*/
function reverse(ip: string): Promise<string[]>;
/**
* Sets the IP address and port of servers to be used when performing DNS
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
* addresses. If the port is the IANA default DNS port (53) it can be omitted.
*
* ```js
* dnsPromises.setServers([
* '4.4.4.4',
* '[2001:4860:4860::8888]',
* '4.4.4.4:1053',
* '[2001:4860:4860::8888]:1053',
* ]);
* ```
*
* An error will be thrown if an invalid address is provided.
*
* The `dnsPromises.setServers()` method must not be called while a DNS query is in
* progress.
*
* This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
* That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
* subsequent servers provided. Fallback DNS servers will only be used if the
* earlier ones time out or result in some other error.
* @since v10.6.0
* @param servers array of `RFC 5952` formatted addresses
*/
function setServers(servers: ReadonlyArray<string>): void;
/**
* Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:
*
* * `ipv4first`: sets default `verbatim` `false`.
* * `verbatim`: sets default `verbatim` `true`.
*
* The default is `verbatim` 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;
/**
* An independent resolver for DNS requests.
*
* Creating a new resolver uses the default server settings. Setting
* the servers used for a resolver using `resolver.setServers()` does not affect
* other resolvers:
*
* ```js
* const { Resolver } = require('node:dns').promises;
* const resolver = new Resolver();
* resolver.setServers(['4.4.4.4']);
*
* // This request will use the server at 4.4.4.4, independent of global settings.
* resolver.resolve4('example.org').then((addresses) => {
* // ...
* });
*
* // Alternatively, the same code can be written using async-await style.
* (async function() {
* const addresses = await resolver.resolve4('example.org');
* })();
* ```
*
* The following methods from the `dnsPromises` API are available:
*
* * `resolver.getServers()`
* * `resolver.resolve()`
* * `resolver.resolve4()`
* * `resolver.resolve6()`
* * `resolver.resolveAny()`
* * `resolver.resolveCaa()`
* * `resolver.resolveCname()`
* * `resolver.resolveMx()`
* * `resolver.resolveNaptr()`
* * `resolver.resolveNs()`
* * `resolver.resolvePtr()`
* * `resolver.resolveSoa()`
* * `resolver.resolveSrv()`
* * `resolver.resolveTxt()`
* * `resolver.reverse()`
* * `resolver.setServers()`
* @since v10.6.0
*/
class Resolver {
constructor(options?: ResolverOptions);
cancel(): void;
getServers: typeof getServers;
resolve: typeof resolve;
resolve4: typeof resolve4;
resolve6: typeof resolve6;
resolveAny: typeof resolveAny;
resolveCaa: typeof resolveCaa;
resolveCname: typeof resolveCname;
resolveMx: typeof resolveMx;
resolveNaptr: typeof resolveNaptr;
resolveNs: typeof resolveNs;
resolvePtr: typeof resolvePtr;
resolveSoa: typeof resolveSoa;
resolveSrv: typeof resolveSrv;
resolveTxt: typeof resolveTxt;
reverse: typeof reverse;
setLocalAddress(ipv4?: string, ipv6?: string): void;
setServers: typeof setServers;
}
}
declare module 'node:dns/promises' {
export * from 'dns/promises';
}

126
node_modules/@types/node/dom-events.d.ts generated vendored Normal file
View File

@ -0,0 +1,126 @@
export {}; // Don't export anything!
//// DOM-like Events
// NB: The Event / EventTarget / EventListener implementations below were copied
// from lib.dom.d.ts, then edited to reflect Node's documentation at
// https://nodejs.org/api/events.html#class-eventtarget.
// Please read that link to understand important implementation differences.
// This conditional type will be the existing global Event in a browser, or
// the copy below in a Node environment.
type __Event = typeof globalThis extends { onmessage: any, Event: any }
? {}
: {
/** This is not used in Node.js and is provided purely for completeness. */
readonly bubbles: boolean;
/** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */
cancelBubble: () => void;
/** True if the event was created with the cancelable option */
readonly cancelable: boolean;
/** This is not used in Node.js and is provided purely for completeness. */
readonly composed: boolean;
/** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */
composedPath(): [EventTarget?]
/** Alias for event.target. */
readonly currentTarget: EventTarget | null;
/** Is true if cancelable is true and event.preventDefault() has been called. */
readonly defaultPrevented: boolean;
/** This is not used in Node.js and is provided purely for completeness. */
readonly eventPhase: 0 | 2;
/** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */
readonly isTrusted: boolean;
/** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
preventDefault(): void;
/** This is not used in Node.js and is provided purely for completeness. */
returnValue: boolean;
/** Alias for event.target. */
readonly srcElement: EventTarget | null;
/** Stops the invocation of event listeners after the current one completes. */
stopImmediatePropagation(): void;
/** This is not used in Node.js and is provided purely for completeness. */
stopPropagation(): void;
/** The `EventTarget` dispatching the event */
readonly target: EventTarget | null;
/** The millisecond timestamp when the Event object was created. */
readonly timeStamp: number;
/** Returns the type of event, e.g. "click", "hashchange", or "submit". */
readonly type: string;
};
// See comment above explaining conditional type
type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: any }
? {}
: {
/**
* Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.
*
* If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched.
*
* The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification.
* Specifically, the `capture` option is used as part of the key when registering a `listener`.
* Any individual `listener` may be added once with `capture = false`, and once with `capture = true`.
*/
addEventListener(
type: string,
listener: EventListener | EventListenerObject,
options?: AddEventListenerOptions | boolean,
): void;
/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
dispatchEvent(event: Event): boolean;
/** Removes the event listener in target's event listener list with the same type, callback, and options. */
removeEventListener(
type: string,
listener: EventListener | EventListenerObject,
options?: EventListenerOptions | boolean,
): void;
};
interface EventInit {
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
}
interface EventListenerOptions {
/** Not directly used by Node.js. Added for API completeness. Default: `false`. */
capture?: boolean;
}
interface AddEventListenerOptions extends EventListenerOptions {
/** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */
once?: boolean;
/** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */
passive?: boolean;
}
interface EventListener {
(evt: Event): void;
}
interface EventListenerObject {
handleEvent(object: Event): void;
}
import {} from 'events'; // Make this an ambient declaration
declare global {
/** An event which takes place in the DOM. */
interface Event extends __Event {}
var Event: typeof globalThis extends { onmessage: any, Event: infer T }
? T
: {
prototype: __Event;
new (type: string, eventInitDict?: EventInit): __Event;
};
/**
* EventTarget is a DOM interface implemented by objects that can
* receive events and may have listeners for them.
*/
interface EventTarget extends __EventTarget {}
var EventTarget: typeof globalThis extends { onmessage: any, EventTarget: infer T }
? T
: {
prototype: __EventTarget;
new (): __EventTarget;
};
}

170
node_modules/@types/node/domain.d.ts generated vendored Normal file
View File

@ -0,0 +1,170 @@
/**
* **This module is pending deprecation.** Once a replacement API has been
* finalized, this module will be fully deprecated. Most developers should
* **not** have cause to use this module. Users who absolutely must have
* the functionality that domains provide may rely on it for the time being
* but should expect to have to migrate to a different solution
* in the future.
*
* Domains provide a way to handle multiple different IO operations as a
* single group. If any of the event emitters or callbacks registered to a
* domain emit an `'error'` event, or throw an error, then the domain object
* 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/v20.2.0/lib/domain.js)
*/
declare module 'domain' {
import EventEmitter = require('node:events');
/**
* The `Domain` class encapsulates the functionality of routing errors and
* uncaught exceptions to the active `Domain` object.
*
* To handle the errors that it catches, listen to its `'error'` event.
*/
class Domain extends EventEmitter {
/**
* An array of timers and event emitters that have been explicitly added
* to the domain.
*/
members: Array<EventEmitter | NodeJS.Timer>;
/**
* The `enter()` method is plumbing used by the `run()`, `bind()`, and`intercept()` methods to set the active domain. It sets `domain.active` and`process.domain` to the domain, and implicitly
* pushes the domain onto the domain
* stack managed by the domain module (see {@link exit} for details on the
* domain stack). The call to `enter()` delimits the beginning of a chain of
* asynchronous calls and I/O operations bound to a domain.
*
* Calling `enter()` changes only the active domain, and does not alter the domain
* itself. `enter()` and `exit()` can be called an arbitrary number of times on a
* single domain.
*/
enter(): void;
/**
* The `exit()` method exits the current domain, popping it off the domain stack.
* Any time execution is going to switch to the context of a different chain of
* asynchronous calls, it's important to ensure that the current domain is exited.
* The call to `exit()` delimits either the end of or an interruption to the chain
* of asynchronous calls and I/O operations bound to a domain.
*
* If there are multiple, nested domains bound to the current execution context,`exit()` will exit any domains nested within this domain.
*
* Calling `exit()` changes only the active domain, and does not alter the domain
* itself. `enter()` and `exit()` can be called an arbitrary number of times on a
* single domain.
*/
exit(): void;
/**
* Run the supplied function in the context of the domain, implicitly
* binding all event emitters, timers, and low-level requests that are
* created in that context. Optionally, arguments can be passed to
* the function.
*
* This is the most basic way to use a domain.
*
* ```js
* const domain = require('node:domain');
* const fs = require('node:fs');
* const d = domain.create();
* d.on('error', (er) => {
* console.error('Caught error!', er);
* });
* d.run(() => {
* process.nextTick(() => {
* setTimeout(() => { // Simulating some various async stuff
* fs.open('non-existent file', 'r', (er, fd) => {
* if (er) throw er;
* // proceed...
* });
* }, 100);
* });
* });
* ```
*
* In this example, the `d.on('error')` handler will be triggered, rather
* than crashing the program.
*/
run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
/**
* Explicitly adds an emitter to the domain. If any event handlers called by
* the emitter throw an error, or if the emitter emits an `'error'` event, it
* will be routed to the domain's `'error'` event, just like with implicit
* binding.
*
* This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
* the domain `'error'` handler.
*
* If the Timer or `EventEmitter` was already bound to a domain, it is removed
* from that one, and bound to this one instead.
* @param emitter emitter or timer to be added to the domain
*/
add(emitter: EventEmitter | NodeJS.Timer): void;
/**
* The opposite of {@link add}. Removes domain handling from the
* specified emitter.
* @param emitter emitter or timer to be removed from the domain
*/
remove(emitter: EventEmitter | NodeJS.Timer): void;
/**
* The returned function will be a wrapper around the supplied callback
* function. When the returned function is called, any errors that are
* thrown will be routed to the domain's `'error'` event.
*
* ```js
* const d = domain.create();
*
* function readSomeFile(filename, cb) {
* fs.readFile(filename, 'utf8', d.bind((er, data) => {
* // If this throws, it will also be passed to the domain.
* return cb(er, data ? JSON.parse(data) : null);
* }));
* }
*
* d.on('error', (er) => {
* // An error occurred somewhere. If we throw it now, it will crash the program
* // with the normal line number and stack message.
* });
* ```
* @param callback The callback function
* @return The bound function
*/
bind<T extends Function>(callback: T): T;
/**
* This method is almost identical to {@link bind}. However, in
* addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function.
*
* In this way, the common `if (err) return callback(err);` pattern can be replaced
* with a single error handler in a single place.
*
* ```js
* const d = domain.create();
*
* function readSomeFile(filename, cb) {
* fs.readFile(filename, 'utf8', d.intercept((data) => {
* // Note, the first argument is never passed to the
* // callback since it is assumed to be the 'Error' argument
* // and thus intercepted by the domain.
*
* // If this throws, it will also be passed to the domain
* // so the error-handling logic can be moved to the 'error'
* // event on the domain instead of being repeated throughout
* // the program.
* return cb(null, JSON.parse(data));
* }));
* }
*
* d.on('error', (er) => {
* // An error occurred somewhere. If we throw it now, it will crash the program
* // with the normal line number and stack message.
* });
* ```
* @param callback The callback function
* @return The intercepted function
*/
intercept<T extends Function>(callback: T): T;
}
function create(): Domain;
}
declare module 'node:domain' {
export * from 'domain';
}

753
node_modules/@types/node/events.d.ts generated vendored Normal file
View File

@ -0,0 +1,753 @@
/**
* Much of the Node.js core API is built around an idiomatic asynchronous
* event-driven architecture in which certain kinds of objects (called "emitters")
* emit named events that cause `Function` objects ("listeners") to be called.
*
* For instance: a `net.Server` object emits an event each time a peer
* connects to it; a `fs.ReadStream` emits an event when the file is opened;
* a `stream` emits an event whenever data is available to be read.
*
* All objects that emit events are instances of the `EventEmitter` class. These
* objects expose an `eventEmitter.on()` function that allows one or more
* functions to be attached to named events emitted by the object. Typically,
* event names are camel-cased strings but any valid JavaScript property key
* can be used.
*
* When the `EventEmitter` object emits an event, all of the functions attached
* to that specific event are called _synchronously_. Any values returned by the
* called listeners are _ignored_ and discarded.
*
* The following example shows a simple `EventEmitter` instance with a single
* listener. The `eventEmitter.on()` method is used to register listeners, while
* the `eventEmitter.emit()` method is used to trigger the event.
*
* ```js
* import { EventEmitter } from 'node:events';
*
* class MyEmitter extends EventEmitter {}
*
* const myEmitter = new MyEmitter();
* myEmitter.on('event', () => {
* console.log('an event occurred!');
* });
* myEmitter.emit('event');
* ```
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/events.js)
*/
declare module 'events' {
// NOTE: This class is in the docs but is **not actually exported** by Node.
// If https://github.com/nodejs/node/issues/39903 gets resolved and Node
// actually starts exporting the class, uncomment below.
// import { EventListener, EventListenerObject } from '__dom-events';
// /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */
// interface NodeEventTarget extends EventTarget {
// /**
// * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API.
// * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget.
// */
// addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
// /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */
// eventNames(): string[];
// /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */
// listenerCount(type: string): number;
// /** Node.js-specific alias for `eventTarget.removeListener()`. */
// off(type: string, listener: EventListener | EventListenerObject): this;
// /** Node.js-specific alias for `eventTarget.addListener()`. */
// on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
// /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */
// once(type: string, listener: EventListener | EventListenerObject): this;
// /**
// * Node.js-specific extension to the `EventTarget` class.
// * If `type` is specified, removes all registered listeners for `type`,
// * otherwise removes all registered listeners.
// */
// removeAllListeners(type: string): this;
// /**
// * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`.
// * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`.
// */
// removeListener(type: string, listener: EventListener | EventListenerObject): this;
// }
interface EventEmitterOptions {
/**
* Enables automatic capturing of promise rejection.
*/
captureRejections?: boolean | undefined;
}
// Any EventTarget with a Node-style `once` function
interface _NodeEventTarget {
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
}
// Any EventTarget with a DOM-style `addEventListener`
interface _DOMEventTarget {
addEventListener(
eventName: string,
listener: (...args: any[]) => void,
opts?: {
once: boolean;
}
): any;
}
interface StaticEventEmitterOptions {
signal?: AbortSignal | undefined;
}
interface EventEmitter extends NodeJS.EventEmitter {}
/**
* The `EventEmitter` class is defined and exposed by the `node:events` module:
*
* ```js
* import { EventEmitter } from 'node:events';
* ```
*
* All `EventEmitter`s emit the event `'newListener'` when new listeners are
* added and `'removeListener'` when existing listeners are removed.
*
* It supports the following option:
* @since v0.1.26
*/
class EventEmitter {
constructor(options?: EventEmitterOptions);
/**
* Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
* event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
* The `Promise` will resolve with an array of all the arguments emitted to the
* given event.
*
* This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event
* semantics and does not listen to the `'error'` event.
*
* ```js
* import { once, EventEmitter } from 'node:events';
* import process from 'node:process';
*
* const ee = new EventEmitter();
*
* process.nextTick(() => {
* ee.emit('myevent', 42);
* });
*
* const [value] = await once(ee, 'myevent');
* console.log(value);
*
* const err = new Error('kaboom');
* process.nextTick(() => {
* ee.emit('error', err);
* });
*
* try {
* await once(ee, 'myevent');
* } catch (err) {
* console.error('error happened', err);
* }
* ```
*
* The special handling of the `'error'` event is only used when `events.once()`is used to wait for another event. If `events.once()` is used to wait for the
* '`error'` event itself, then it is treated as any other kind of event without
* special handling:
*
* ```js
* import { EventEmitter, once } from 'node:events';
*
* const ee = new EventEmitter();
*
* once(ee, 'error')
* .then(([err]) => console.log('ok', err.message))
* .catch((err) => console.error('error', err.message));
*
* ee.emit('error', new Error('boom'));
*
* // Prints: ok boom
* ```
*
* An `AbortSignal` can be used to cancel waiting for the event:
*
* ```js
* import { EventEmitter, once } from 'node:events';
*
* const ee = new EventEmitter();
* const ac = new AbortController();
*
* async function foo(emitter, event, signal) {
* try {
* await once(emitter, event, { signal });
* console.log('event emitted!');
* } catch (error) {
* if (error.name === 'AbortError') {
* console.error('Waiting for the event was canceled!');
* } else {
* console.error('There was an error', error.message);
* }
* }
* }
*
* foo(ee, 'foo', ac.signal);
* ac.abort(); // Abort waiting for the event
* ee.emit('foo'); // Prints: Waiting for the event was canceled!
* ```
* @since v11.13.0, v10.16.0
*/
static once(emitter: _NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
static once(emitter: _DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
/**
* ```js
* import { on, EventEmitter } from 'node:events';
* import process from 'node:process';
*
* const ee = new EventEmitter();
*
* // Emit later on
* process.nextTick(() => {
* ee.emit('foo', 'bar');
* ee.emit('foo', 42);
* });
*
* for await (const event of on(ee, 'foo')) {
* // The execution of this inner block is synchronous and it
* // processes one event at a time (even with await). Do not use
* // if concurrent execution is required.
* console.log(event); // prints ['bar'] [42]
* }
* // Unreachable here
* ```
*
* Returns an `AsyncIterator` that iterates `eventName` events. It will throw
* if the `EventEmitter` emits `'error'`. It removes all listeners when
* exiting the loop. The `value` returned by each iteration is an array
* composed of the emitted event arguments.
*
* An `AbortSignal` can be used to cancel waiting on events:
*
* ```js
* import { on, EventEmitter } from 'node:events';
* import process from 'node:process';
*
* const ac = new AbortController();
*
* (async () => {
* const ee = new EventEmitter();
*
* // Emit later on
* process.nextTick(() => {
* ee.emit('foo', 'bar');
* ee.emit('foo', 42);
* });
*
* for await (const event of on(ee, 'foo', { signal: ac.signal })) {
* // The execution of this inner block is synchronous and it
* // processes one event at a time (even with await). Do not use
* // if concurrent execution is required.
* console.log(event); // prints ['bar'] [42]
* }
* // Unreachable here
* })();
*
* process.nextTick(() => ac.abort());
* ```
* @since v13.6.0, v12.16.0
* @param eventName The name of the event being listened for
* @return that iterates `eventName` events emitted by the `emitter`
*/
static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>;
/**
* A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
*
* ```js
* import { EventEmitter, listenerCount } from 'node:events';
*
* const myEmitter = new EventEmitter();
* myEmitter.on('event', () => {});
* myEmitter.on('event', () => {});
* console.log(listenerCount(myEmitter, 'event'));
* // Prints: 2
* ```
* @since v0.9.12
* @deprecated Since v3.2.0 - Use `listenerCount` instead.
* @param emitter The emitter to query
* @param eventName The event name
*/
static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number;
/**
* Returns a copy of the array of listeners for the event named `eventName`.
*
* For `EventEmitter`s this behaves exactly the same as calling `.listeners` on
* the emitter.
*
* For `EventTarget`s this is the only way to get the event listeners for the
* event target. This is useful for debugging and diagnostic purposes.
*
* ```js
* import { getEventListeners, EventEmitter } from 'node:events';
*
* {
* const ee = new EventEmitter();
* const listener = () => console.log('Events are fun');
* ee.on('foo', listener);
* console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
* }
* {
* const et = new EventTarget();
* const listener = () => console.log('Events are fun');
* et.addEventListener('foo', listener);
* console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
* }
* ```
* @since v15.2.0, v14.17.0
*/
static getEventListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
/**
* Returns the currently set max amount of listeners.
*
* For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on
* the emitter.
*
* For `EventTarget`s this is the only way to get the max event listeners for the
* event target. If the number of event handlers on a single EventTarget exceeds
* the max set, the EventTarget will print a warning.
*
* ```js
* import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';
*
* {
* const ee = new EventEmitter();
* console.log(getMaxListeners(ee)); // 10
* setMaxListeners(11, ee);
* console.log(getMaxListeners(ee)); // 11
* }
* {
* const et = new EventTarget();
* console.log(getMaxListeners(et)); // 10
* setMaxListeners(11, et);
* console.log(getMaxListeners(et)); // 11
* }
* ```
* @since v19.9.0
*/
static getMaxListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter): number;
/**
* ```js
* import { setMaxListeners, EventEmitter } from 'node:events';
*
* const target = new EventTarget();
* const emitter = new EventEmitter();
*
* setMaxListeners(5, target, emitter);
* ```
* @since v15.4.0
* @param n A non-negative number. The maximum number of listeners per `EventTarget` event.
* @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
* objects.
*/
static setMaxListeners(n?: number, ...eventTargets: Array<_DOMEventTarget | NodeJS.EventEmitter>): void;
/**
* This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called.
*
* Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no
* regular `'error'` listener is installed.
* @since v13.6.0, v12.17.0
*/
static readonly errorMonitor: unique symbol;
/**
* Value: `Symbol.for('nodejs.rejection')`
*
* See how to write a custom `rejection handler`.
* @since v13.4.0, v12.16.0
*/
static readonly captureRejectionSymbol: unique symbol;
/**
* Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
*
* Change the default `captureRejections` option on all new `EventEmitter` objects.
* @since v13.4.0, v12.16.0
*/
static captureRejections: boolean;
/**
* By default, a maximum of `10` listeners can be registered for any single
* event. This limit can be changed for individual `EventEmitter` instances
* using the `emitter.setMaxListeners(n)` method. To change the default
* for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown.
*
* Take caution when setting the `events.defaultMaxListeners` because the
* change affects _all_`EventEmitter` instances, including those created before
* the change is made. However, calling `emitter.setMaxListeners(n)` still has
* precedence over `events.defaultMaxListeners`.
*
* This is not a hard limit. The `EventEmitter` instance will allow
* more listeners to be added but will output a trace warning to stderr indicating
* that a "possible EventEmitter memory leak" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to
* temporarily avoid this warning:
*
* ```js
* import { EventEmitter } from 'node:events';
* const emitter = new EventEmitter();
* emitter.setMaxListeners(emitter.getMaxListeners() + 1);
* emitter.once('event', () => {
* // do stuff
* emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
* });
* ```
*
* The `--trace-warnings` command-line flag can be used to display the
* stack trace for such warnings.
*
* The emitted warning can be inspected with `process.on('warning')` and will
* have the additional `emitter`, `type`, and `count` properties, referring to
* the event emitter instance, the event's name and the number of attached
* listeners, respectively.
* Its `name` property is set to `'MaxListenersExceededWarning'`.
* @since v0.11.2
*/
static defaultMaxListeners: number;
}
import internal = require('node:events');
namespace EventEmitter {
// Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
export { internal as EventEmitter };
export interface Abortable {
/**
* When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
*/
signal?: AbortSignal | undefined;
}
}
global {
namespace NodeJS {
interface EventEmitter {
/**
* Alias for `emitter.on(eventName, listener)`.
* @since v0.1.26
*/
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Adds the `listener` function to the end of the listeners array for the
* event named `eventName`. No checks are made to see if the `listener` has
* already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
* times.
*
* ```js
* server.on('connection', (stream) => {
* console.log('someone connected!');
* });
* ```
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
*
* By default, event listeners are invoked in the order they are added. The`emitter.prependListener()` method can be used as an alternative to add the
* event listener to the beginning of the listeners array.
*
* ```js
* import { EventEmitter } from 'node:events';
* const myEE = new EventEmitter();
* myEE.on('foo', () => console.log('a'));
* myEE.prependListener('foo', () => console.log('b'));
* myEE.emit('foo');
* // Prints:
* // b
* // a
* ```
* @since v0.1.101
* @param eventName The name of the event.
* @param listener The callback function
*/
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Adds a **one-time**`listener` function for the event named `eventName`. The
* next time `eventName` is triggered, this listener is removed and then invoked.
*
* ```js
* server.once('connection', (stream) => {
* console.log('Ah, we have our first user!');
* });
* ```
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
*
* By default, event listeners are invoked in the order they are added. The`emitter.prependOnceListener()` method can be used as an alternative to add the
* event listener to the beginning of the listeners array.
*
* ```js
* import { EventEmitter } from 'node:events';
* const myEE = new EventEmitter();
* myEE.once('foo', () => console.log('a'));
* myEE.prependOnceListener('foo', () => console.log('b'));
* myEE.emit('foo');
* // Prints:
* // b
* // a
* ```
* @since v0.3.0
* @param eventName The name of the event.
* @param listener The callback function
*/
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Removes the specified `listener` from the listener array for the event named`eventName`.
*
* ```js
* const callback = (stream) => {
* console.log('someone connected!');
* };
* server.on('connection', callback);
* // ...
* server.removeListener('connection', callback);
* ```
*
* `removeListener()` will remove, at most, one instance of a listener from the
* listener array. If any single listener has been added multiple times to the
* listener array for the specified `eventName`, then `removeListener()` must be
* called multiple times to remove each instance.
*
* Once an event is emitted, all listeners attached to it at the
* time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
* will not remove them from`emit()` in progress. Subsequent events behave as expected.
*
* ```js
* import { EventEmitter } from 'node:events';
* class MyEmitter extends EventEmitter {}
* const myEmitter = new MyEmitter();
*
* const callbackA = () => {
* console.log('A');
* myEmitter.removeListener('event', callbackB);
* };
*
* const callbackB = () => {
* console.log('B');
* };
*
* myEmitter.on('event', callbackA);
*
* myEmitter.on('event', callbackB);
*
* // callbackA removes listener callbackB but it will still be called.
* // Internal listener array at time of emit [callbackA, callbackB]
* myEmitter.emit('event');
* // Prints:
* // A
* // B
*
* // callbackB is now removed.
* // Internal listener array [callbackA]
* myEmitter.emit('event');
* // Prints:
* // A
* ```
*
* Because listeners are managed using an internal array, calling this will
* change the position indices of any listener registered _after_ the listener
* being removed. This will not impact the order in which listeners are called,
* but it means that any copies of the listener array as returned by
* the `emitter.listeners()` method will need to be recreated.
*
* When a single function has been added as a handler multiple times for a single
* event (as in the example below), `removeListener()` will remove the most
* recently added instance. In the example the `once('ping')`listener is removed:
*
* ```js
* import { EventEmitter } from 'node:events';
* const ee = new EventEmitter();
*
* function pong() {
* console.log('pong');
* }
*
* ee.on('ping', pong);
* ee.once('ping', pong);
* ee.removeListener('ping', pong);
*
* ee.emit('ping');
* ee.emit('ping');
* ```
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
* @since v0.1.26
*/
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Alias for `emitter.removeListener()`.
* @since v10.0.0
*/
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Removes all listeners, or those of the specified `eventName`.
*
* It is bad practice to remove listeners added elsewhere in the code,
* particularly when the `EventEmitter` instance was created by some other
* component or module (e.g. sockets or file streams).
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
* @since v0.1.26
*/
removeAllListeners(event?: string | symbol): this;
/**
* By default `EventEmitter`s will print a warning if more than `10` listeners are
* added for a particular event. This is a useful default that helps finding
* memory leaks. The `emitter.setMaxListeners()` method allows the limit to be
* modified for this specific `EventEmitter` instance. The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners.
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
* @since v0.3.5
*/
setMaxListeners(n: number): this;
/**
* Returns the current max listener value for the `EventEmitter` which is either
* set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}.
* @since v1.0.0
*/
getMaxListeners(): number;
/**
* Returns a copy of the array of listeners for the event named `eventName`.
*
* ```js
* server.on('connection', (stream) => {
* console.log('someone connected!');
* });
* console.log(util.inspect(server.listeners('connection')));
* // Prints: [ [Function] ]
* ```
* @since v0.1.26
*/
listeners(eventName: string | symbol): Function[];
/**
* Returns a copy of the array of listeners for the event named `eventName`,
* including any wrappers (such as those created by `.once()`).
*
* ```js
* import { EventEmitter } from 'node:events';
* const emitter = new EventEmitter();
* emitter.once('log', () => console.log('log once'));
*
* // Returns a new Array with a function `onceWrapper` which has a property
* // `listener` which contains the original listener bound above
* const listeners = emitter.rawListeners('log');
* const logFnWrapper = listeners[0];
*
* // Logs "log once" to the console and does not unbind the `once` event
* logFnWrapper.listener();
*
* // Logs "log once" to the console and removes the listener
* logFnWrapper();
*
* emitter.on('log', () => console.log('log persistently'));
* // Will return a new Array with a single function bound by `.on()` above
* const newListeners = emitter.rawListeners('log');
*
* // Logs "log persistently" twice
* newListeners[0]();
* emitter.emit('log');
* ```
* @since v9.4.0
*/
rawListeners(eventName: string | symbol): Function[];
/**
* Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
* to each.
*
* Returns `true` if the event had listeners, `false` otherwise.
*
* ```js
* import { EventEmitter } from 'node:events';
* const myEmitter = new EventEmitter();
*
* // First listener
* myEmitter.on('event', function firstListener() {
* console.log('Helloooo! first listener');
* });
* // Second listener
* myEmitter.on('event', function secondListener(arg1, arg2) {
* console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
* });
* // Third listener
* myEmitter.on('event', function thirdListener(...args) {
* const parameters = args.join(', ');
* console.log(`event with parameters ${parameters} in third listener`);
* });
*
* console.log(myEmitter.listeners('event'));
*
* myEmitter.emit('event', 1, 2, 3, 4, 5);
*
* // Prints:
* // [
* // [Function: firstListener],
* // [Function: secondListener],
* // [Function: thirdListener]
* // ]
* // Helloooo! first listener
* // event with parameters 1, 2 in second listener
* // event with parameters 1, 2, 3, 4, 5 in third listener
* ```
* @since v0.1.26
*/
emit(eventName: string | symbol, ...args: any[]): boolean;
/**
* Returns the number of listeners listening for the event named `eventName`.
* If `listener` is provided, it will return how many times the listener is found
* in the list of the listeners of the event.
* @since v3.2.0
* @param eventName The name of the event being listened for
* @param listener The event handler function
*/
listenerCount(eventName: string | symbol, listener?: Function): number;
/**
* Adds the `listener` function to the _beginning_ of the listeners array for the
* event named `eventName`. No checks are made to see if the `listener` has
* already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
* times.
*
* ```js
* server.prependListener('connection', (stream) => {
* console.log('someone connected!');
* });
* ```
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
* @since v6.0.0
* @param eventName The name of the event.
* @param listener The callback function
*/
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
* listener is removed, and then invoked.
*
* ```js
* server.prependOnceListener('connection', (stream) => {
* console.log('Ah, we have our first user!');
* });
* ```
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
* @since v6.0.0
* @param eventName The name of the event.
* @param listener The callback function
*/
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Returns an array listing the events for which the emitter has registered
* listeners. The values in the array are strings or `Symbol`s.
*
* ```js
* import { EventEmitter } from 'node:events';
*
* const myEE = new EventEmitter();
* myEE.on('foo', () => {});
* myEE.on('bar', () => {});
*
* const sym = Symbol('symbol');
* myEE.on(sym, () => {});
*
* console.log(myEE.eventNames());
* // Prints: [ 'foo', 'bar', Symbol(symbol) ]
* ```
* @since v6.0.0
*/
eventNames(): Array<string | symbol>;
}
}
}
export = EventEmitter;
}
declare module 'node:events' {
import events = require('events');
export = events;
}

4044
node_modules/@types/node/fs.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1197
node_modules/@types/node/fs/promises.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

303
node_modules/@types/node/globals.d.ts generated vendored Normal file
View File

@ -0,0 +1,303 @@
// Declare "static" methods in Error
interface ErrorConstructor {
/** Create .stack property on a target object */
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
/**
* Optional override for formatting stack traces
*
* @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
*/
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
stackTraceLimit: number;
}
/*-----------------------------------------------*
* *
* GLOBAL *
* *
------------------------------------------------*/
// For backwards compability
interface NodeRequire extends NodeJS.Require { }
interface RequireResolve extends NodeJS.RequireResolve { }
interface NodeModule extends NodeJS.Module { }
declare var process: NodeJS.Process;
declare var console: Console;
declare var __filename: string;
declare var __dirname: string;
declare var require: NodeRequire;
declare var module: NodeModule;
// Same as module.exports
declare var exports: any;
/**
* Only available if `--expose-gc` is passed to the process.
*/
declare var gc: undefined | (() => void);
//#region borrowed
// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
/** A controller object that allows you to abort one or more DOM requests as and when desired. */
interface AbortController {
/**
* Returns the AbortSignal object associated with this object.
*/
readonly signal: AbortSignal;
/**
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
*/
abort(reason?: any): void;
}
/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
interface AbortSignal extends EventTarget {
/**
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
*/
readonly aborted: boolean;
readonly reason: any;
onabort: null | ((this: AbortSignal, event: Event) => any);
throwIfAborted(): void;
}
declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
? T
: {
prototype: AbortController;
new(): AbortController;
};
declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T}
? T
: {
prototype: AbortSignal;
new(): AbortSignal;
abort(reason?: any): AbortSignal;
timeout(milliseconds: number): AbortSignal;
};
//#endregion borrowed
//#region ArrayLike.at()
interface RelativeIndexable<T> {
/**
* Takes an integer value and returns the item at that index,
* allowing for positive and negative integers.
* Negative integers count back from the last item in the array.
*/
at(index: number): T | undefined;
}
interface String extends RelativeIndexable<string> {}
interface Array<T> extends RelativeIndexable<T> {}
interface ReadonlyArray<T> extends RelativeIndexable<T> {}
interface Int8Array extends RelativeIndexable<number> {}
interface Uint8Array extends RelativeIndexable<number> {}
interface Uint8ClampedArray extends RelativeIndexable<number> {}
interface Int16Array extends RelativeIndexable<number> {}
interface Uint16Array extends RelativeIndexable<number> {}
interface Int32Array extends RelativeIndexable<number> {}
interface Uint32Array extends RelativeIndexable<number> {}
interface Float32Array extends RelativeIndexable<number> {}
interface Float64Array extends RelativeIndexable<number> {}
interface BigInt64Array extends RelativeIndexable<bigint> {}
interface BigUint64Array extends RelativeIndexable<bigint> {}
//#endregion ArrayLike.at() end
/**
* @since v17.0.0
*
* Creates a deep clone of an object.
*/
declare function structuredClone<T>(
value: T,
transfer?: { transfer: ReadonlyArray<import('worker_threads').TransferListItem> },
): T;
/*----------------------------------------------*
* *
* GLOBAL INTERFACES *
* *
*-----------------------------------------------*/
declare namespace NodeJS {
interface CallSite {
/**
* Value of "this"
*/
getThis(): unknown;
/**
* Type of "this" as a string.
* This is the name of the function stored in the constructor field of
* "this", if available. Otherwise the object's [[Class]] internal
* property.
*/
getTypeName(): string | null;
/**
* Current function
*/
getFunction(): Function | undefined;
/**
* Name of the current function, typically its name property.
* If a name property is not available an attempt will be made to try
* to infer a name from the function's context.
*/
getFunctionName(): string | null;
/**
* Name of the property [of "this" or one of its prototypes] that holds
* the current function
*/
getMethodName(): string | null;
/**
* Name of the script [if this function was defined in a script]
*/
getFileName(): string | undefined;
/**
* Current line number [if this function was defined in a script]
*/
getLineNumber(): number | null;
/**
* Current column number [if this function was defined in a script]
*/
getColumnNumber(): number | null;
/**
* A call site object representing the location where eval was called
* [if this function was created using a call to eval]
*/
getEvalOrigin(): string | undefined;
/**
* Is this a toplevel invocation, that is, is "this" the global object?
*/
isToplevel(): boolean;
/**
* Does this call take place in code defined by a call to eval?
*/
isEval(): boolean;
/**
* Is this call in native V8 code?
*/
isNative(): boolean;
/**
* Is this a constructor call?
*/
isConstructor(): 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;
}
type TypedArray =
| Uint8Array
| Uint8ClampedArray
| Uint16Array
| Uint32Array
| Int8Array
| Int16Array
| Int32Array
| BigUint64Array
| BigInt64Array
| Float32Array
| Float64Array;
type ArrayBufferView = TypedArray | DataView;
interface Require {
(id: string): any;
resolve: RequireResolve;
cache: Dict<NodeModule>;
/**
* @deprecated
*/
extensions: RequireExtensions;
main: Module | undefined;
}
interface RequireResolve {
(id: string, options?: { paths?: string[] | undefined; }): string;
paths(request: string): string[] | null;
}
interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
'.js': (m: Module, filename: string) => any;
'.json': (m: Module, filename: string) => any;
'.node': (m: Module, filename: string) => any;
}
interface Module {
/**
* `true` if the module is running during the Node.js preload
*/
isPreloading: boolean;
exports: any;
require: Require;
id: string;
filename: string;
loaded: boolean;
/** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
parent: Module | null | undefined;
children: Module[];
/**
* @since v11.14.0
*
* The directory name of the module. This is usually the same as the path.dirname() of the module.id.
*/
path: string;
paths: string[];
}
interface Dict<T> {
[key: string]: T | undefined;
}
interface ReadOnlyDict<T> {
readonly [key: string]: T | undefined;
}
}

1
node_modules/@types/node/globals.global.d.ts generated vendored Normal file
View File

@ -0,0 +1 @@
declare var global: typeof globalThis;

1724
node_modules/@types/node/http.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

2129
node_modules/@types/node/http2.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

441
node_modules/@types/node/https.d.ts generated vendored Normal file
View File

@ -0,0 +1,441 @@
/**
* 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/v20.2.0/lib/https.js)
*/
declare module 'https' {
import { Duplex } from 'node:stream';
import * as tls from 'node:tls';
import * as http from 'node:http';
import { URL } from 'node:url';
type ServerOptions<
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
> = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
type RequestOptions = http.RequestOptions &
tls.SecureContextOptions & {
checkServerIdentity?: typeof tls.checkServerIdentity | undefined;
rejectUnauthorized?: boolean | undefined; // Defaults to true
servername?: string | undefined; // SNI TLS Extension
};
interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
rejectUnauthorized?: boolean | undefined;
maxCachedSessions?: number | undefined;
}
/**
* An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
* @since v0.4.5
*/
class Agent extends http.Agent {
constructor(options?: AgentOptions);
options: AgentOptions;
}
interface Server<
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
> extends http.Server<Request, Response> {}
/**
* See `http.Server` for more information.
* @since v0.3.4
*/
class Server<
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
> extends tls.Server {
constructor(requestListener?: http.RequestListener<Request, Response>);
constructor(
options: ServerOptions<Request, Response>,
requestListener?: http.RequestListener<Request, Response>,
);
/**
* Closes all connections connected to this server.
* @since v18.2.0
*/
closeAllConnections(): void;
/**
* Closes all connections connected to this server which are not sending a request or waiting for a response.
* @since v18.2.0
*/
closeIdleConnections(): void;
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
addListener(event: 'close', listener: () => void): this;
addListener(event: 'connection', listener: (socket: Duplex) => void): this;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'listening', listener: () => void): this;
addListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
addListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
addListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
addListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
emit(event: string, ...args: any[]): boolean;
emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean;
emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
emit(event: 'close'): boolean;
emit(event: 'connection', socket: Duplex): boolean;
emit(event: 'error', err: Error): boolean;
emit(event: 'listening'): boolean;
emit(
event: 'checkContinue',
req: InstanceType<Request>,
res: InstanceType<Response> & {
req: InstanceType<Request>;
}
): boolean;
emit(
event: 'checkExpectation',
req: InstanceType<Request>,
res: InstanceType<Response> & {
req: InstanceType<Request>;
}
): boolean;
emit(event: 'clientError', err: Error, socket: Duplex): boolean;
emit(event: 'connect', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
emit(
event: 'request',
req: InstanceType<Request>,
res: InstanceType<Response> & {
req: InstanceType<Request>;
}
): boolean;
emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
on(event: 'close', listener: () => void): this;
on(event: 'connection', listener: (socket: Duplex) => void): this;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'listening', listener: () => void): this;
on(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
on(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
on(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
on(event: 'request', listener: http.RequestListener<Request, Response>): this;
on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
once(event: 'close', listener: () => void): this;
once(event: 'connection', listener: (socket: Duplex) => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'listening', listener: () => void): this;
once(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
once(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
once(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
once(event: 'request', listener: http.RequestListener<Request, Response>): this;
once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: 'close', listener: () => void): this;
prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'listening', listener: () => void): this;
prependListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
prependListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
prependListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
prependListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: 'close', listener: () => void): this;
prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'listening', listener: () => void): this;
prependOnceListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
prependOnceListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
}
/**
* ```js
* // curl -k https://localhost:8000/
* const https = require('node:https');
* const fs = require('node:fs');
*
* const options = {
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* };
*
* https.createServer(options, (req, res) => {
* res.writeHead(200);
* res.end('hello world\n');
* }).listen(8000);
* ```
*
* Or
*
* ```js
* const https = require('node:https');
* const fs = require('node:fs');
*
* const options = {
* pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
* passphrase: 'sample',
* };
*
* https.createServer(options, (req, res) => {
* res.writeHead(200);
* res.end('hello world\n');
* }).listen(8000);
* ```
* @since v0.3.4
* @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
* @param requestListener A listener to be added to the `'request'` event.
*/
function createServer<
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
>(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
function createServer<
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
>(
options: ServerOptions<Request, Response>,
requestListener?: http.RequestListener<Request, Response>,
): Server<Request, Response>;
/**
* Makes a request to a secure web server.
*
* The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`,
* `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`.
*
* `options` can be an object, a string, or a `URL` object. If `options` is a
* string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
*
* `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to
* upload a file with a POST request, then write to the `ClientRequest` object.
*
* ```js
* const https = require('node:https');
*
* const options = {
* hostname: 'encrypted.google.com',
* port: 443,
* path: '/',
* method: 'GET',
* };
*
* const req = https.request(options, (res) => {
* console.log('statusCode:', res.statusCode);
* console.log('headers:', res.headers);
*
* res.on('data', (d) => {
* process.stdout.write(d);
* });
* });
*
* req.on('error', (e) => {
* console.error(e);
* });
* req.end();
* ```
*
* Example using options from `tls.connect()`:
*
* ```js
* const options = {
* hostname: 'encrypted.google.com',
* port: 443,
* path: '/',
* method: 'GET',
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* };
* options.agent = new https.Agent(options);
*
* const req = https.request(options, (res) => {
* // ...
* });
* ```
*
* Alternatively, opt out of connection pooling by not using an `Agent`.
*
* ```js
* const options = {
* hostname: 'encrypted.google.com',
* port: 443,
* path: '/',
* method: 'GET',
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* agent: false,
* };
*
* const req = https.request(options, (res) => {
* // ...
* });
* ```
*
* Example using a `URL` as `options`:
*
* ```js
* const options = new URL('https://abc:xyz@example.com');
*
* const req = https.request(options, (res) => {
* // ...
* });
* ```
*
* Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
*
* ```js
* const tls = require('node:tls');
* const https = require('node:https');
* const crypto = require('node:crypto');
*
* function sha256(s) {
* return crypto.createHash('sha256').update(s).digest('base64');
* }
* const options = {
* hostname: 'github.com',
* port: 443,
* path: '/',
* method: 'GET',
* checkServerIdentity: function(host, cert) {
* // Make sure the certificate is issued to the host we are connected to
* const err = tls.checkServerIdentity(host, cert);
* if (err) {
* return err;
* }
*
* // Pin the public key, similar to HPKP pin-sha256 pinning
* const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
* if (sha256(cert.pubkey) !== pubkey256) {
* const msg = 'Certificate verification error: ' +
* `The public key of '${cert.subject.CN}' ` +
* 'does not match our pinned fingerprint';
* return new Error(msg);
* }
*
* // Pin the exact certificate, rather than the pub key
* const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' +
* 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16';
* if (cert.fingerprint256 !== cert256) {
* const msg = 'Certificate verification error: ' +
* `The certificate of '${cert.subject.CN}' ` +
* 'does not match our pinned fingerprint';
* return new Error(msg);
* }
*
* // This loop is informational only.
* // Print the certificate and public key fingerprints of all certs in the
* // chain. Its common to pin the public key of the issuer on the public
* // internet, while pinning the public key of the service in sensitive
* // environments.
* do {
* console.log('Subject Common Name:', cert.subject.CN);
* console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256);
*
* hash = crypto.createHash('sha256');
* console.log(' Public key ping-sha256:', sha256(cert.pubkey));
*
* lastprint256 = cert.fingerprint256;
* cert = cert.issuerCertificate;
* } while (cert.fingerprint256 !== lastprint256);
*
* },
* };
*
* options.agent = new https.Agent(options);
* const req = https.request(options, (res) => {
* console.log('All OK. Server matched our pinned cert or public key');
* console.log('statusCode:', res.statusCode);
* // Print the HPKP values
* console.log('headers:', res.headers['public-key-pins']);
*
* res.on('data', (d) => {});
* });
*
* req.on('error', (e) => {
* console.error(e.message);
* });
* req.end();
* ```
*
* Outputs for example:
*
* ```text
* Subject Common Name: github.com
* Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16
* Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=
* Subject Common Name: DigiCert SHA2 Extended Validation Server CA
* Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A
* Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=
* Subject Common Name: DigiCert High Assurance EV Root CA
* Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF
* Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=
* All OK. Server matched our pinned cert or public key
* statusCode: 200
* headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=";
* pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=";
* pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
* ```
* @since v0.3.6
* @param options Accepts all `options` from `request`, with some differences in default values:
*/
function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
/**
* Like `http.get()` but for HTTPS.
*
* `options` can be an object, a string, or a `URL` object. If `options` is a
* string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
*
* ```js
* const https = require('node:https');
*
* https.get('https://encrypted.google.com/', (res) => {
* console.log('statusCode:', res.statusCode);
* console.log('headers:', res.headers);
*
* res.on('data', (d) => {
* process.stdout.write(d);
* });
*
* }).on('error', (e) => {
* console.error(e);
* });
* ```
* @since v0.3.6
* @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`.
*/
function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
let globalAgent: Agent;
}
declare module 'node:https' {
export * from 'https';
}

133
node_modules/@types/node/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,133 @@
// Type definitions for non-npm package Node.js 20.4
// Project: https://nodejs.org/
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
// DefinitelyTyped <https://github.com/DefinitelyTyped>
// Alberto Schiabel <https://github.com/jkomyno>
// Alvis HT Tang <https://github.com/alvis>
// Andrew Makarov <https://github.com/r3nya>
// Benjamin Toueg <https://github.com/btoueg>
// Chigozirim C. <https://github.com/smac89>
// David Junger <https://github.com/touffy>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Eugene Y. Q. Shen <https://github.com/eyqs>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Huw <https://github.com/hoo29>
// Kelvin Jin <https://github.com/kjin>
// Klaus Meinhardt <https://github.com/ajafff>
// Lishude <https://github.com/islishude>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// Mohsen Azimi <https://github.com/mohsen1>
// Nicolas Even <https://github.com/n-e>
// Nikita Galkin <https://github.com/galkin>
// Parambir Singh <https://github.com/parambirs>
// Sebastian Silbermann <https://github.com/eps1lon>
// Thomas den Hollander <https://github.com/ThomasdenH>
// Wilco Bakker <https://github.com/WilcoBakker>
// wwwy3y3 <https://github.com/wwwy3y3>
// Samuel Ainsworth <https://github.com/samuela>
// Kyle Uehlein <https://github.com/kuehlein>
// Thanik Bhongbhibhat <https://github.com/bhongy>
// Marcin Kopacz <https://github.com/chyzwar>
// Trivikram Kamat <https://github.com/trivikr>
// Junxiao Shi <https://github.com/yoursunny>
// Ilia Baryshnikov <https://github.com/qwelias>
// ExE Boss <https://github.com/ExE-Boss>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Anna Henningsen <https://github.com/addaleax>
// Victor Perin <https://github.com/victorperin>
// Yongsheng Zhang <https://github.com/ZYSzys>
// NodeJS Contributors <https://github.com/NodeJS>
// Linus Unnebäck <https://github.com/LinusU>
// wafuwafu13 <https://github.com/wafuwafu13>
// Matteo Collina <https://github.com/mcollina>
// Dmitry Semigradsky <https://github.com/Semigradsky>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* License for programmatically and manually incorporated
* documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
*
* Copyright Node.js contributors. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
// NOTE: These definitions support NodeJS and TypeScript 4.9+.
// Reference required types from the default lib:
/// <reference lib="es2020" />
/// <reference lib="esnext.asynciterable" />
/// <reference lib="esnext.intl" />
/// <reference lib="esnext.bigint" />
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
/// <reference path="assert.d.ts" />
/// <reference path="assert/strict.d.ts" />
/// <reference path="globals.d.ts" />
/// <reference path="async_hooks.d.ts" />
/// <reference path="buffer.d.ts" />
/// <reference path="child_process.d.ts" />
/// <reference path="cluster.d.ts" />
/// <reference path="console.d.ts" />
/// <reference path="constants.d.ts" />
/// <reference path="crypto.d.ts" />
/// <reference path="dgram.d.ts" />
/// <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" />
/// <reference path="http.d.ts" />
/// <reference path="http2.d.ts" />
/// <reference path="https.d.ts" />
/// <reference path="inspector.d.ts" />
/// <reference path="module.d.ts" />
/// <reference path="net.d.ts" />
/// <reference path="os.d.ts" />
/// <reference path="path.d.ts" />
/// <reference path="perf_hooks.d.ts" />
/// <reference path="process.d.ts" />
/// <reference path="punycode.d.ts" />
/// <reference path="querystring.d.ts" />
/// <reference path="readline.d.ts" />
/// <reference path="readline/promises.d.ts" />
/// <reference path="repl.d.ts" />
/// <reference path="stream.d.ts" />
/// <reference path="stream/promises.d.ts" />
/// <reference path="stream/consumers.d.ts" />
/// <reference path="stream/web.d.ts" />
/// <reference path="string_decoder.d.ts" />
/// <reference path="test.d.ts" />
/// <reference path="timers.d.ts" />
/// <reference path="timers/promises.d.ts" />
/// <reference path="tls.d.ts" />
/// <reference path="trace_events.d.ts" />
/// <reference path="tty.d.ts" />
/// <reference path="url.d.ts" />
/// <reference path="util.d.ts" />
/// <reference path="v8.d.ts" />
/// <reference path="vm.d.ts" />
/// <reference path="wasi.d.ts" />
/// <reference path="worker_threads.d.ts" />
/// <reference path="zlib.d.ts" />
/// <reference path="globals.global.d.ts" />

Some files were not shown because too many files have changed in this diff Show More